diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-30 01:53:13 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-30 01:53:13 +0000 |
commit | 5db9d35f079a39eb5cdb733846835ebe8ea93d63 (patch) | |
tree | 9154c66b1b59aa00249539e33504f4f75296824c /MdeModulePkg/Library | |
parent | 0c1992fbccd139e9d3bb730c19a79847c6a5a246 (diff) | |
download | edk2-platforms-5db9d35f079a39eb5cdb733846835ebe8ea93d63.tar.xz |
Roll back the change which doesn't call LocateProtocol when TPL is TPL_NOTIFY because it may cause certain status code get lost in some rare case.
Signed-off-by: niruiyu
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12801 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c index 4ec3a6c8f3..ce843cc47f 100644 --- a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file
Report Status Code Library for DXE Phase.
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -45,7 +45,6 @@ InternalGetReportStatusCode ( )
{
EFI_STATUS Status;
- EFI_TPL Tpl;
if (mReportStatusCodeLibStatusCodeProtocol != NULL) {
return;
@@ -54,18 +53,10 @@ InternalGetReportStatusCode ( //
// Check gBS just in case ReportStatusCode is called before gBS is initialized.
//
- if ((gBS != NULL) && (gBS->LocateProtocol != NULL) && (gBS->RaiseTPL != NULL) && (gBS->RestoreTPL != NULL)) {
- //
- // Retrieve the current TPL
- //
- Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
- gBS->RestoreTPL (Tpl);
-
- if (Tpl < TPL_NOTIFY) {
- Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**) &mReportStatusCodeLibStatusCodeProtocol);
- if (EFI_ERROR (Status)) {
- mReportStatusCodeLibStatusCodeProtocol = NULL;
- }
+ if (gBS != NULL && gBS->LocateProtocol != NULL) {
+ Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**) &mReportStatusCodeLibStatusCodeProtocol);
+ if (EFI_ERROR (Status)) {
+ mReportStatusCodeLibStatusCodeProtocol = NULL;
}
}
}
@@ -505,10 +496,7 @@ ReportStatusCodeEx ( ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
- if ((gBS == NULL) ||
- (gBS->AllocatePool == NULL) || (gBS->FreePool == NULL) ||
- (gBS->RaiseTPL == NULL) || (gBS->RestoreTPL == NULL)
- ) {
+ if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) {
return EFI_UNSUPPORTED;
}
|