summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 14:31:09 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 14:31:09 +0000
commit15cd6a822c3b96cc3d5e12d4ec271b686e7d0bd8 (patch)
tree3eefc2764fe0cfa9fbb460a8e921622c7aa01a12 /IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib
parent1d0cab2ec2f57a31832799473a5174a422ce2ed0 (diff)
downloadedk2-platforms-15cd6a822c3b96cc3d5e12d4ec271b686e7d0bd8.tar.xz
Add conditional check before output status code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7603 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib')
-rw-r--r--IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
index f39f36d6b6..d027dc4a8e 100644
--- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
@@ -67,22 +67,28 @@ InternalReportStatusCode (
CONST EFI_PEI_SERVICES **PeiServices;
EFI_STATUS Status;
- PeiServices = GetPeiServicesTablePointer ();
- Status = (*PeiServices)->ReportStatusCode (
- PeiServices,
- Type,
- Value,
- Instance,
- (EFI_GUID *)CallerId,
- Data
- );
- if (Status == EFI_NOT_AVAILABLE_YET) {
- Status = OemHookStatusCodeInitialize ();
- if (!EFI_ERROR (Status)) {
- return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);
+ if ((ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
+ (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ||
+ (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE)) {
+ PeiServices = GetPeiServicesTablePointer ();
+ Status = (*PeiServices)->ReportStatusCode (
+ PeiServices,
+ Type,
+ Value,
+ Instance,
+ (EFI_GUID *)CallerId,
+ Data
+ );
+ if (Status == EFI_NOT_AVAILABLE_YET) {
+ Status = OemHookStatusCodeInitialize ();
+ if (!EFI_ERROR (Status)) {
+ return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data);
+ }
}
+ return Status;
}
- return Status;
+
+ return EFI_UNSUPPORTED;
}