]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/StatusCode.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Protocol / StatusCode.h
1 /** @file
2 Status code Runtime Protocol as defined in PI Specification VOLUME 2 DXE
3
4 The StatusCode () Tiano 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, as it is done in the DXE core.
9
10 This code abstracts Status Code reporting.
11
12 Copyright (c) 2006 - 2008, Intel Corporation
13 All rights reserved. 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 #include <Pi/PiMultiPhase.h>
27 #include <Uefi/UefiBaseType.h>
28
29 #define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID \
30 { 0xd2b2b828, 0x826, 0x48a7, { 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0 } }
31
32 /**
33 Provides an interface that a software module can call to report a status code.
34
35 @param Type Indicates the type of status code being reported.
36 @param Value Describes the current status of a hardware or software entity.
37 This included information about the class and subclass that is used to
38 classify the entity as well as an operation.
39 @param Instance The enumeration of a hardware or software entity within
40 the system. Valid instance numbers start with 1.
41 @param CallerId This optional parameter may be used to identify the caller.
42 This parameter allows the status code driver to apply different rules to
43 different callers.
44 @param Data This optional parameter may be used to pass additional data.
45
46 @retval EFI_SUCCESS The function completed successfully
47 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.
48
49 **/
50 typedef
51 EFI_STATUS
52 (EFIAPI *EFI_REPORT_STATUS_CODE)(
53 IN EFI_STATUS_CODE_TYPE Type,
54 IN EFI_STATUS_CODE_VALUE Value,
55 IN UINT32 Instance,
56 IN EFI_GUID *CallerId OPTIONAL,
57 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
58 );
59
60 /**
61 @par Protocol Description:
62 Provides the service required to report a status code to the platform firmware.
63 This protocol must be produced by a runtime DXE driver and may be consumed
64 only by the DXE Foundation.
65
66 @param ReportStatusCode Emit a status code.
67
68 **/
69 typedef struct _EFI_STATUS_CODE_PROTOCOL {
70 EFI_REPORT_STATUS_CODE ReportStatusCode;
71 } EFI_STATUS_CODE_PROTOCOL;
72
73 extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid;
74
75 #endif