]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update PeiReportStatusCodeLib instance, which will support report data prior to...
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 3 Feb 2008 03:53:58 +0000 (03:53 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 3 Feb 2008 03:53:58 +0000 (03:53 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4665 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
Nt32Pkg/Nt32Pkg.dsc

index a860c7a137873ab39922cb62e1ca6f92354afc28..aeee6c182eef3234dbca0de03b9df93ee53cd55a 100644 (file)
@@ -24,6 +24,8 @@
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
+  CONSTRUCTOR                    = PeiReportStatusCodeLibConstructor\r
+\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
@@ -46,6 +48,7 @@
   BaseMemoryLib\r
   BaseLib\r
   DebugLib\r
+  OemHookStatusCodeLib\r
 \r
 \r
 [Guids]\r
index 2d08ccdeb4b50ef4ca33581792756ddb2713a24a..c79d93e643d4df996f24722b6b73b058f48b14d9 100644 (file)
@@ -22,6 +22,7 @@
 #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
@@ -65,16 +89,21 @@ InternalReportStatusCode (
   )\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
index 98e0520fa892925788a3ed52a9c3a24240ef2b70..d8f5cd76cd9772100fa54a164217b7cb98000b5c 100644 (file)
   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