#include <Library/BaseLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/PeiServicesTablePointerLib.h>\r
+#include< Library/OemHookStatusCodeLib.h>\r
#include <Library/PcdLib.h>\r
\r
#include <DebugInfo.h>\r
//\r
#define MAX_EXTENDED_DATA_SIZE 0x200\r
\r
+\r
+/**\r
+ The constructor function initializes the OEM hooked status\r
+ code device.\r
+ \r
+ @param FfsHeader Pointer to FFS header the loaded driver.\r
+ @param PeiServices Pointer to the PEI services.\r
+\r
+ @return Status of initialization of OEM hook status code\r
+ device.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiReportStatusCodeLibConstructor (\r
+ IN EFI_PEI_FILE_HANDLE FileHandle,\r
+ IN EFI_PEI_SERVICES **PeiServices\r
+ )\r
+{\r
+ return OemHookStatusCodeInitialize ();\r
+}\r
+\r
+\r
/**\r
Internal worker function that reports a status code through the Status Code Protocol\r
\r
)\r
{\r
CONST EFI_PEI_SERVICES **PeiServices;\r
+ EFI_STATUS Status;\r
\r
PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();\r
- return (*PeiServices)->ReportStatusCode (\r
- PeiServices,\r
- Type,\r
- Value,\r
- Instance,\r
- (EFI_GUID *)CallerId,\r
- Data\r
- );\r
+ Status = (*PeiServices)->ReportStatusCode (\r
+ PeiServices,\r
+ Type,\r
+ Value,\r
+ Instance,\r
+ (EFI_GUID *)CallerId,\r
+ Data\r
+ );\r
+ if (Status == EFI_NOT_AVAILABLE_YET) {\r
+ return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);\r
+ }\r
+ return Status;\r
}\r
\r
\r
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf\r
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
+ OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
PeCoffGetEntryPointLib|Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf\r
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r