summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Library')
-rw-r--r--IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf2
-rw-r--r--IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c28
2 files changed, 4 insertions, 26 deletions
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
index aeee6c182e..47507151c2 100644
--- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
+++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
@@ -24,8 +24,6 @@
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
- CONSTRUCTOR = PeiReportStatusCodeLibConstructor
-
#
# The following information is for reference only and not required by the build tools.
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
index c79d93e643..89224dacd1 100644
--- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
@@ -32,29 +32,6 @@
//
#define MAX_EXTENDED_DATA_SIZE 0x200
-
-/**
- The constructor function initializes the OEM hooked status
- code device.
-
- @param FfsHeader Pointer to FFS header the loaded driver.
- @param PeiServices Pointer to the PEI services.
-
- @return Status of initialization of OEM hook status code
- device.
-
-**/
-EFI_STATUS
-EFIAPI
-PeiReportStatusCodeLibConstructor (
- IN EFI_PEI_FILE_HANDLE FileHandle,
- IN EFI_PEI_SERVICES **PeiServices
- )
-{
- return OemHookStatusCodeInitialize ();
-}
-
-
/**
Internal worker function that reports a status code through the Status Code Protocol
@@ -101,7 +78,10 @@ InternalReportStatusCode (
Data
);
if (Status == EFI_NOT_AVAILABLE_YET) {
- return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);
+ Status = OemHookStatusCodeInitialize ();
+ if (!EFI_ERROR (Status)) {
+ return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);
+ }
}
return Status;
}