blob: 281e0ce159f54f2b1a94c05fabf7a54b3b12cfa0 [file] [log] [blame]
Vishal Bhoj82c80712015-12-15 21:13:33 +05301/** @file
2 Status code Runtime Protocol as defined in PI Specification VOLUME 2 DXE
3
4 The StatusCode () service is added to the EFI system table and the
5 EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is registered with a NULL
6 pointer.
7
8 No CRC of the EFI system table is required, since that is done in the DXE core.
9
10 This code abstracts Status Code reporting.
11
12 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
13 This program and the accompanying materials
14 are licensed and made available under the terms and conditions of the BSD License
15 which accompanies this distribution. The full text of the license may be found at
16 http://opensource.org/licenses/bsd-license.php
17
18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20
21**/
22
23#ifndef __STATUS_CODE_RUNTIME_PROTOCOL_H__
24#define __STATUS_CODE_RUNTIME_PROTOCOL_H__
25
26#define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID \
27{ 0xd2b2b828, 0x826, 0x48a7, { 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0 } }
28
29/**
30 Provides an interface that a software module can call to report a status code.
31
32 @param Type Indicates the type of status code being reported.
33 @param Value Describes the current status of a hardware or software entity.
34 This included information about the class and subclass that is used to
35 classify the entity as well as an operation.
36 @param Instance The enumeration of a hardware or software entity within
37 the system. Valid instance numbers start with 1.
38 @param CallerId This optional parameter may be used to identify the caller.
39 This parameter allows the status code driver to apply different rules to
40 different callers.
41 @param Data This optional parameter may be used to pass additional data.
42
43 @retval EFI_SUCCESS The function completed successfully
44 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.
45
46**/
47typedef
48EFI_STATUS
49(EFIAPI *EFI_REPORT_STATUS_CODE)(
50 IN EFI_STATUS_CODE_TYPE Type,
51 IN EFI_STATUS_CODE_VALUE Value,
52 IN UINT32 Instance,
53 IN EFI_GUID *CallerId OPTIONAL,
54 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
55 );
56
57///
58/// Provides the service required to report a status code to the platform firmware.
59/// This protocol must be produced by a runtime DXE driver and may be consumed
60/// only by the DXE Foundation.
61///
62typedef struct _EFI_STATUS_CODE_PROTOCOL {
63 EFI_REPORT_STATUS_CODE ReportStatusCode;
64} EFI_STATUS_CODE_PROTOCOL;
65
66extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid;
67
68#endif