xref: /illumos-gate/usr/src/boot/efi/include/Protocol/StatusCode.h (revision cdd3e9a818787b4def17c9f707f435885ce0ed31)
1 /** @file
2   Status code Runtime Protocol as defined in PI Specification 1.4a VOLUME 2 DXE
3 
4   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5   SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7 **/
8 
9 #ifndef __STATUS_CODE_RUNTIME_PROTOCOL_H__
10 #define __STATUS_CODE_RUNTIME_PROTOCOL_H__
11 
12 #define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID  \
13 { 0xd2b2b828, 0x826, 0x48a7,  { 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0 } }
14 
15 /**
16   Provides an interface that a software module can call to report a status code.
17 
18   @param  Type             Indicates the type of status code being reported.
19   @param  Value            Describes the current status of a hardware or software entity.
20                            This included information about the class and subclass that is used to
21                            classify the entity as well as an operation.
22   @param  Instance         The enumeration of a hardware or software entity within
23                            the system. Valid instance numbers start with 1.
24   @param  CallerId         This optional parameter may be used to identify the caller.
25                            This parameter allows the status code driver to apply different rules to
26                            different callers.
27   @param  Data             This optional parameter may be used to pass additional data.
28 
29   @retval EFI_SUCCESS           The function completed successfully
30   @retval EFI_DEVICE_ERROR      The function should not be completed due to a device error.
31 
32 **/
33 typedef
34 EFI_STATUS
35 (EFIAPI *EFI_REPORT_STATUS_CODE)(
36   IN EFI_STATUS_CODE_TYPE     Type,
37   IN EFI_STATUS_CODE_VALUE    Value,
38   IN UINT32                   Instance,
39   IN EFI_GUID                 *CallerId  OPTIONAL,
40   IN EFI_STATUS_CODE_DATA     *Data      OPTIONAL
41   );
42 
43 ///
44 /// Provides the service required to report a status code to the platform firmware.
45 /// This protocol must be produced by a runtime DXE driver.
46 ///
47 typedef struct _EFI_STATUS_CODE_PROTOCOL {
48   EFI_REPORT_STATUS_CODE    ReportStatusCode;
49 } EFI_STATUS_CODE_PROTOCOL;
50 
51 extern EFI_GUID  gEfiStatusCodeRuntimeProtocolGuid;
52 
53 #endif
54