diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-24 07:00:59 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-24 07:00:59 +0000 |
commit | ce7a12fba0e5139536307f7ec8dcf89002e1fb64 (patch) | |
tree | 21955aaa167ac623cc902cc5e36bb54790076cd2 /EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib | |
parent | 5385a579693ec4b4876b9c6fd8cd472e49ed5fd6 (diff) | |
download | edk2-platforms-ce7a12fba0e5139536307f7ec8dcf89002e1fb64.tar.xz |
Revert back the change. For now, ECP only support build mode with EFI_SPECIFICATION_VERSION = 0x00020000 and PI_SPECIFICATION_VERSION = 0x00000009.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5959 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c index 4c071f2dbe..a8145cd28a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c @@ -23,7 +23,9 @@ Abstract: #include EFI_GUID_DEFINITION (StatusCodeDataTypeId)
#include EFI_ARCH_PROTOCOL_DEFINITION (StatusCode)
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
STATIC EFI_STATUS_CODE_PROTOCOL *gStatusCode = NULL;
+#endif
EFI_STATUS
EfiLibReportStatusCode (
@@ -56,37 +58,34 @@ Returns: --*/
{
EFI_STATUS Status;
-
- Status = EFI_UNSUPPORTED;
- if (gRT->Hdr.Revision >= 0x00020000) {
- if (gStatusCode == NULL) {
- if (gBS == NULL) {
- return EFI_UNSUPPORTED;
- }
- Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);
- if (EFI_ERROR (Status) || gStatusCode == NULL) {
- return EFI_UNSUPPORTED;
- }
- }
- Status = gStatusCode->ReportStatusCode (Type, Value, Instance, CallerId, Data);
- } else {
- if (gRT == NULL) {
- return EFI_UNSUPPORTED;
- }
- //
- // Check whether EFI_RUNTIME_SERVICES has Tiano Extension
- //
- Status = EFI_UNSUPPORTED;
-#if (EFI_SPECIFICATION_VERSION < 0x00020000)
- if (gRT->Hdr.Revision == EFI_SPECIFICATION_VERSION &&
- gRT->Hdr.HeaderSize == sizeof (EFI_RUNTIME_SERVICES) &&
- gRT->ReportStatusCode != NULL) {
- Status = gRT->ReportStatusCode (Type, Value, Instance, CallerId, Data);
-#endif
- }
- }
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ if (gStatusCode == NULL) {
+ if (gBS == NULL) {
+ return EFI_UNSUPPORTED;
+ }
+ Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);
+ if (EFI_ERROR (Status) || gStatusCode == NULL) {
+ return EFI_UNSUPPORTED;
+ }
+ }
+ Status = gStatusCode->ReportStatusCode (Type, Value, Instance, CallerId, Data);
return Status;
+#else
+ if (gRT == NULL) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Check whether EFI_RUNTIME_SERVICES has Tiano Extension
+ //
+ Status = EFI_UNSUPPORTED;
+ if (gRT->Hdr.Revision == EFI_SPECIFICATION_VERSION &&
+ gRT->Hdr.HeaderSize == sizeof (EFI_RUNTIME_SERVICES) &&
+ gRT->ReportStatusCode != NULL) {
+ Status = gRT->ReportStatusCode (Type, Value, Instance, CallerId, Data);
+ }
+ return Status;
+#endif
}
EFI_STATUS
|