1 /*++ 2 3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 Module Name: 13 14 StatusCode.h 15 16 Abstract: 17 18 Status code Architectural Protocol as defined in the DXE CIS 19 20 This code abstracts Status Code reporting. 21 22 The StatusCode () Tiano service is added to the EFI system table and the 23 EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is registered with a NULL 24 pointer. 25 26 No CRC of the EFI system table is required, as it is done in the DXE core. 27 28 --*/ 29 30 #ifndef __STATUS_CODE_RUNTIME_PROTOCOL_H__ 31 #define __STATUS_CODE_RUNTIME_PROTOCOL_H__ 32 33 #define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID \ 34 { 0xd2b2b828, 0x826, 0x48a7, {0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0}} 35 36 #if (EFI_SPECIFICATION_VERSION >= 0x00020000) 37 typedef 38 EFI_STATUS 39 (EFIAPI *EFI_REPORT_STATUS_CODE) ( 40 IN EFI_STATUS_CODE_TYPE Type, 41 IN EFI_STATUS_CODE_VALUE Value, 42 IN UINT32 Instance, 43 IN EFI_GUID *CallerId OPTIONAL, 44 IN EFI_STATUS_CODE_DATA *Data OPTIONAL 45 ) 46 /*++ 47 Routine Description: 48 49 Provides an interface that a software module can call to report a status code. 50 51 Arguments: 52 53 Type - Indicates the type of status code being reported. 54 55 Value - Describes the current status of a hardware or software entity. 56 This included information about the class and subclass that is 57 used to classify the entity as well as an operation. 58 59 Instance - The enumeration of a hardware or software entity within 60 the system. Valid instance numbers start with 1. 61 62 CallerId - This optional parameter may be used to identify the caller. 63 This parameter allows the status code driver to apply different 64 rules to different callers. 65 66 Data - This optional parameter may be used to pass additional data. 67 68 Returns: 69 70 EFI_SUCCESS - The function completed successfully 71 72 EFI_DEVICE_ERROR - The function should not be completed due to a device error. 73 74 --*/ 75 ; 76 #endif 77 78 // 79 // Interface stucture for the STATUS CODE Architectural Protocol 80 // 81 typedef struct _EFI_STATUS_CODE_PROTOCOL { 82 EFI_REPORT_STATUS_CODE ReportStatusCode; 83 } EFI_STATUS_CODE_PROTOCOL; 84 85 /*++ 86 // Protocol Description: 87 // 88 // Provides the service required to report a status code to the platform firmware. 89 // This protocol must be produced by a runtime DXE driver and may be consumed 90 // only by the DXE Foundation. 91 // 92 // Parameter: 93 // 94 // ReportStatusCode - Emit a status code. 95 --*/ 96 97 98 extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid; 99 100 #endif 101