--- /dev/null
+/** @file\r
+ This ppi provide registering and unregistering services to status code consumers.\r
+ \r
+ Copyright (c) 2007 - 2009, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __REPORT_STATUS_CODE_HANDLER_PPI_H__\r
+#define __REPORT_STATUS_CODE_HANDLER_PPI_H__\r
+\r
+#define EFI_PEI_RSC_HANDLER_PPI_GUID \\r
+ { \\r
+ 0x65d394, 0x9951, 0x4144, \\r
+ 0x82, 0xa3, 0xa, 0xfc, 0x85, 0x79, 0xc2, 0x51 \\r
+ }\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_RSC_HANDLER_CALLBACK)(\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN CONST EFI_GUID *CallerId,\r
+ IN CONST EFI_STATUS_CODE_DATA *Data\r
+);\r
+\r
+/**\r
+ Register the callback function for ReportStatusCode() notification.\r
+ \r
+ When this function is called the function pointer is added to an internal list and any future calls to\r
+ ReportStatusCode() will be forwarded to the Callback function.\r
+\r
+ @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called\r
+ when a call to ReportStatusCode() occurs.\r
+ \r
+ @retval EFI_SUCCESS Function was successfully registered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
+ registered.\r
+ @retval EFI_ALREADY_STARTED The function was already registered. It can’t be registered again.\r
+ \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_RSC_HANDLER_REGISTER)(\r
+ IN EFI_PEI_RSC_HANDLER_CALLBACK Callback\r
+);\r
+\r
+/**\r
+ Remove a previously registered callback function from the notification list.\r
+ \r
+ ReportStatusCode() messages will no longer be forwarded to the Callback function.\r
+ \r
+ @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be\r
+ unregistered.\r
+\r
+ @retval EFI_SUCCESS The function was successfully unregistered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_NOT_FOUND The callback function was not found to be unregistered.\r
+ \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_RSC_HANDLER_UNREGISTER)(\r
+ IN EFI_PEI_RSC_HANDLER_CALLBACK Callback\r
+);\r
+\r
+typedef struct _EFI_PEI_RSC_HANDLER_PPI {\r
+ EFI_PEI_RSC_HANDLER_REGISTER Register;\r
+ EFI_PEI_RSC_HANDLER_UNREGISTER Unregister;\r
+} EFI_PEI_RSC_HANDLER_PPI;\r
+\r
+extern EFI_GUID gEfiPeiRscHandlerPpiGuid;\r
+\r
+#endif // __REPORT_STATUS_CODE_HANDLER_PPI_H__\r
--- /dev/null
+/** @file\r
+ This protocol provide registering and unregistering services to status code \r
+ consumers while in DXE.\r
+ \r
+ Copyright (c) 2007 - 2009, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
+#define __REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
+\r
+#define EFI_RSC_HANDLER_PROTOCOL_GUID \\r
+ { \\r
+ 0x86212936, 0xe76, 0x41c8, \\r
+ 0xa0, 0x3a, 0x2a, 0xf2, 0xfc, 0x1c, 0x39, 0xe2 \\r
+ }\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_RSC_HANDLER_CALLBACK)(\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN EFI_GUID *CallerId,\r
+ IN EFI_STATUS_CODE_DATA *Data\r
+);\r
+\r
+/**\r
+ Register the callback function for ReportStatusCode() notification.\r
+ \r
+ When this function is called the function pointer is added to an internal list and any future calls to\r
+ ReportStatusCode() will be forwarded to the Callback function. During the bootservices,\r
+ this is the callback for which this service can be invoked. The report status code router\r
+ will create an event such that the callback function is only invoked at the TPL for which it was\r
+ registered. The entity that registers for the callback should also register for an event upon\r
+ generation of exit boot services and invoke the unregister service.\r
+ If the handler does not have a TPL dependency, it should register for a callback at TPL high. The\r
+ router infrastructure will support making callbacks at runtime, but the caller for runtime invocation\r
+ must meet the following criteria:\r
+ 1. must be a runtime driver type so that its memory is not reclaimed\r
+ 2. not unregister at exit boot services so that the router will still have its callback address\r
+ 3. the caller must be self-contained (eg. Not call out into any boot-service interfaces) and be\r
+ runtime safe, in general.\r
+ \r
+ @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when\r
+ a call to ReportStatusCode() occurs.\r
+ @param[in] Tpl TPL at which callback can be safely invoked. \r
+ \r
+ @retval EFI_SUCCESS Function was successfully registered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
+ registered.\r
+ @retval EFI_ALREADY_STARTED The function was already registered. It can’t be registered again. \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_RSC_HANDLER_REGISTER)(\r
+ IN EFI_RSC_HANDLER_CALLBACK Callback,\r
+ IN EFI_TPL Tpl\r
+);\r
+\r
+/**\r
+ Remove a previously registered callback function from the notification list.\r
+ \r
+ A callback function must be unregistered before it is deallocated. It is important that any registered\r
+ callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.\r
+ \r
+ @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is to be\r
+ unregistered.\r
+ \r
+ @retval EFI_SUCCESS The function was successfully unregistered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_NOT_FOUND The callback function was not found to be unregistered. \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_RSC_HANDLER_UNREGISTER)(\r
+ IN EFI_RSC_HANDLER_CALLBACK Callback\r
+);\r
+\r
+typedef struct {\r
+ EFI_RSC_HANDLER_REGISTER Register;\r
+ EFI_RSC_HANDLER_UNREGISTER Unregister;\r
+} EFI_RSC_HANDLER_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiRscHandlerProtocolGuid;\r
+\r
+#endif // __REPORT_STATUS_CODE_HANDLER_H__\r
--- /dev/null
+/** @file\r
+ This protocol provides registering and unregistering services to status code consumers while in DXE SMM.\r
+ \r
+ Copyright (c) 2007 - 2009, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
+#define __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
+\r
+#define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID \\r
+ { \\r
+ 0x2ff29fa7, 0x5e80, 0x4ed9, 0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55,\r
+ 0x4f, 0xf4\r
+ }\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_RSC_HANDLER_CALLBACK)(\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN EFI_GUID *CallerId,\r
+ IN EFI_STATUS_CODE_DATA *Data\r
+);\r
+\r
+/**\r
+ Register the callback function for ReportStatusCode() notification.\r
+ \r
+ When this function is called the function pointer is added to an internal list and any future calls to\r
+ ReportStatusCode() will be forwarded to the Callback function.\r
+ \r
+ @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when\r
+ a call to ReportStatusCode() occurs.\r
+\r
+ @retval EFI_SUCCESS Function was successfully registered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
+ registered.\r
+ @retval EFI_ALREADY_STARTED The function was already registered. It can’t be registered again.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_RSC_HANDLER_REGISTER)(\r
+ IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
+);\r
+\r
+/**\r
+ Remove a previously registered callback function from the notification list.\r
+ \r
+ A callback function must be unregistered before it is deallocated. It is important that any registered\r
+ callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.\r
+\r
+ @param[in] Callback A pointer to a function of type EFI_SMM_RSC_HANDLER_CALLBACK that is to be\r
+ unregistered.\r
+ \r
+ @retval EFI_SUCCESS The function was successfully unregistered.\r
+ @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
+ @retval EFI_NOT_FOUND The callback function was not found to be unregistered.\r
+ \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_RSC_HANDLER_UNREGISTER) (\r
+ IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
+);\r
+\r
+typedef struct _EFI_SMM_RSC_HANDLER_PROTOCOL {\r
+ EFI_SMM_RSC_HANDLER_REGISTER Register;\r
+ SMM_RSC_HANDLER_UNREGISTER Unregister;\r
+} EFI_SMM_RSC_HANDLER_PROTOCOL;\r
+\r
+extern gEfiSmmRscHandlerProtocolGuid;\r
+\r
+#endif // __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
## Include/Ppi/S3Resume.h\r
gEfiPeiS3ResumePpiGuid = { 0x4426CCB2, 0xE684, 0x4a8a, { 0xae, 0x40, 0x20, 0xd4, 0xb0, 0x25, 0xb7, 0x10 }}\r
\r
+ ## Include/Ppi/ReportStatusCodeHandler.h\r
+ gEfiPeiRscHandlerPpiGuid = { 0x65d394, 0x9951, 0x4144, {0x82, 0xa3, 0xa, 0xfc, 0x85, 0x79, 0xc2, 0x51 }}\r
+ \r
[Protocols]\r
#\r
# Protocols defined in PI1.0.\r
## Include/Protocol/S3SmmSaveState.h\r
gEfiS3SmmSaveStateProtocolGuid = {0x320afe62, 0xe593, 0x49cb, { 0xa9, 0xf1, 0xd4, 0xc2, 0xf4, 0xaf, 0x1, 0x4c}}\r
\r
+ ## Include/Protocol/ReportStatusCodeHandler.h\r
+ gEfiRscHandlerProtocolGuid = { 0x86212936, 0xe76, 0x41c8, { 0xa0, 0x3a, 0x2a, 0xf2, 0xfc, 0x1c, 0x39, 0xe2 }}\r
+ \r
+ ## Include/Protocol/SmmReportStatusCodeHandler.h\r
+ gEfiSmmRscHandlerProtocolGuid = { 0x2ff29fa7, 0x5e80, 0x4ed9, { 0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55, 0x4f, 0xf4 }}\r
+ \r
#\r
# Protocols defined in UEFI2.1/UEFI2.0/EFI1.1\r
#\r