]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Common/RuntimeLib.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / EdkDxeRuntimeDriverLib / Common / RuntimeLib.c
index 6cc2da31b0942897bf7b68062de1651420de30c0..387a6835a682d319970028b6877ad7dbadefaca3 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -29,7 +29,7 @@ Abstract:
 STATIC EFI_EVENT              mEfiVirtualNotifyEvent;\r
 STATIC BOOLEAN                mEfiGoneVirtual         = FALSE;\r
 STATIC BOOLEAN                mEfiAtRuntime           = FALSE;\r
-EFI_RUNTIME_SERVICES          *mRT;\r
+EFI_RUNTIME_SERVICES          *mRTEdkDxeRuntimeDriverLib;\r
 \r
 /**\r
   Set AtRuntime flag as TRUE after ExitBootServices\r
@@ -44,6 +44,11 @@ RuntimeDriverExitBootServices (
   IN VOID             *Context\r
   )\r
 {\r
+  //\r
+  // Clear out BootService globals\r
+  //\r
+  gBS             = NULL;\r
+\r
   mEfiAtRuntime = TRUE;\r
 }\r
 \r
@@ -76,7 +81,7 @@ RuntimeLibVirtualNotifyEvent (
   //\r
   // Update global for Runtime Services Table and IO\r
   //\r
-  EfiConvertPointer (0, (VOID **) &mRT);\r
+  EfiConvertPointer (0, (VOID **) &mRTEdkDxeRuntimeDriverLib);\r
 \r
   mEfiGoneVirtual = TRUE;\r
 }\r
@@ -99,8 +104,8 @@ RuntimeDriverLibConstruct (
   EFI_STATUS  Status;\r
 \r
   ASSERT (SystemTable != NULL);\r
-  mRT = SystemTable->RuntimeServices;\r
-  ASSERT (mRT != NULL);\r
+  mRTEdkDxeRuntimeDriverLib = SystemTable->RuntimeServices;\r
+  ASSERT (mRTEdkDxeRuntimeDriverLib != NULL);\r
   \r
   //\r
   // Register SetVirtualAddressMap () notify function\r