diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-03 03:53:58 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-03 03:53:58 +0000 |
commit | ff8ff1391d20bd7846a972652c25b7631a9bef8e (patch) | |
tree | d04ec99052c811f67557043fbd037ed066607855 /IntelFrameworkModulePkg | |
parent | 2a5726b9bf863b71a2b674ef4a36e4401f5a2dea (diff) | |
download | edk2-platforms-ff8ff1391d20bd7846a972652c25b7631a9bef8e.tar.xz |
Update PeiReportStatusCodeLib instance, which will support report data prior to installed the REPORT STATUSCODE PPI.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4665 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r-- | IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf | 3 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c | 45 |
2 files changed, 40 insertions, 8 deletions
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf index a860c7a137..aeee6c182e 100644 --- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf +++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf @@ -24,6 +24,8 @@ EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
+ CONSTRUCTOR = PeiReportStatusCodeLibConstructor
+
#
# The following information is for reference only and not required by the build tools.
@@ -46,6 +48,7 @@ BaseMemoryLib
BaseLib
DebugLib
+ OemHookStatusCodeLib
[Guids]
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c index 2d08ccdeb4..c79d93e643 100644 --- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c @@ -22,6 +22,7 @@ #include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeiServicesTablePointerLib.h>
+#include< Library/OemHookStatusCodeLib.h>
#include <Library/PcdLib.h>
#include <DebugInfo.h>
@@ -31,6 +32,29 @@ //
#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
@@ -65,16 +89,21 @@ InternalReportStatusCode ( )
{
CONST EFI_PEI_SERVICES **PeiServices;
+ EFI_STATUS Status;
PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
- return (*PeiServices)->ReportStatusCode (
- PeiServices,
- Type,
- Value,
- Instance,
- (EFI_GUID *)CallerId,
- Data
- );
+ Status = (*PeiServices)->ReportStatusCode (
+ PeiServices,
+ Type,
+ Value,
+ Instance,
+ (EFI_GUID *)CallerId,
+ Data
+ );
+ if (Status == EFI_NOT_AVAILABLE_YET) {
+ return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);
+ }
+ return Status;
}
|