--- /dev/null
+/** @file\r
+ Include file for PI SMM Status Code Protocol on Framework SMM Status Code Protocol Thunk driver.\r
+\r
+ Copyright (c) 2010, Intel Corporation. All rights reserved<BR>\r
+ This program and the accompanying materials are licensed and made available under \r
+ the terms and conditions of the BSD License that accompanies this distribution. \r
+ 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 __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__\r
+#define __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__\r
+\r
+\r
+#include <Protocol/SmmReportStatusCodeHandler.h>\r
+#include <Protocol/SmmStatusCode.h>\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/SynchronizationLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/SmmServicesTableLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+\r
+#define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ EFI_SMM_RSC_HANDLER_CALLBACK RscHandlerCallback;\r
+ LIST_ENTRY Node;\r
+} SMM_RSC_HANDLER_CALLBACK_ENTRY;\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
+EFI_STATUS\r
+EFIAPI\r
+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
+ 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
+EFI_STATUS\r
+EFIAPI\r
+Unregister (\r
+ IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
+ );\r
+\r
+/**\r
+ Provides an interface that a software module can call to report a status code.\r
+\r
+ @param This EFI_SMM_STATUS_CODE_PROTOCOL instance.\r
+ @param Type Indicates the type of status code being reported.\r
+ @param Value Describes the current status of a hardware or software entity.\r
+ This included information about the class and subclass that is used to\r
+ classify the entity as well as an operation.\r
+ @param Instance The enumeration of a hardware or software entity within\r
+ the system. Valid instance numbers start with 1.\r
+ @param CallerId This optional parameter may be used to identify the caller.\r
+ This parameter allows the status code driver to apply different rules to\r
+ different callers.\r
+ @param Data This optional parameter may be used to pass additional data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully\r
+ @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ReportDispatcher (\r
+ IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This,\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
+ );\r
+\r
+#endif\r
+/** @file\r
+ Include file for PI SMM Status Code Protocol on Framework SMM Status Code Protocol Thunk driver.\r
+\r
+ Copyright (c) 2010, Intel Corporation. All rights reserved<BR>\r
+ This program and the accompanying materials are licensed and made available under \r
+ the terms and conditions of the BSD License that accompanies this distribution. \r
+ 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 __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__\r
+#define __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__\r
+\r
+\r
+#include <Protocol/SmmReportStatusCodeHandler.h>\r
+#include <Protocol/SmmStatusCode.h>\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/SynchronizationLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/SmmServicesTableLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+\r
+#define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ EFI_SMM_RSC_HANDLER_CALLBACK RscHandlerCallback;\r
+ LIST_ENTRY Node;\r
+} SMM_RSC_HANDLER_CALLBACK_ENTRY;\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
+EFI_STATUS\r
+EFIAPI\r
+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
+ 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
+EFI_STATUS\r
+EFIAPI\r
+Unregister (\r
+ IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
+ );\r
+\r
+/**\r
+ Provides an interface that a software module can call to report a status code.\r
+\r
+ @param This EFI_SMM_STATUS_CODE_PROTOCOL instance.\r
+ @param Type Indicates the type of status code being reported.\r
+ @param Value Describes the current status of a hardware or software entity.\r
+ This included information about the class and subclass that is used to\r
+ classify the entity as well as an operation.\r
+ @param Instance The enumeration of a hardware or software entity within\r
+ the system. Valid instance numbers start with 1.\r
+ @param CallerId This optional parameter may be used to identify the caller.\r
+ This parameter allows the status code driver to apply different rules to\r
+ different callers.\r
+ @param Data This optional parameter may be used to pass additional data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully\r
+ @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ReportDispatcher (\r
+ IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This,\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
+ );\r
+\r
+#endif\r