]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c
Update RuntimeLib.
[mirror_edk2.git] / EdkModulePkg / Library / EdkUefiRuntimeLib / Common / RuntimeLib.c
index d80a71cda204f40a1543ee759821d8d2604ee245..12f06e1324159e97301c19e83064962916cc108d 100644 (file)
@@ -13,10 +13,6 @@ Module Name:
 \r
     RuntimeLib.c\r
 \r
-Abstract:\r
-\r
-  Light weight lib to support Tiano drivers.\r
-\r
 --*/\r
 \r
 #include <RuntimeLibInternal.h>\r
@@ -24,13 +20,15 @@ Abstract:
 //\r
 // Driver Lib Module Globals\r
 //\r
-STATIC EFI_EVENT            mRuntimeNotifyEvent;\r
-STATIC EFI_EVENT            mEfiVirtualNotifyEvent;\r
-STATIC BOOLEAN              mEfiGoneVirtual         = FALSE;\r
-STATIC BOOLEAN              mEfiAtRuntime           = FALSE;\r
 \r
-EFI_RUNTIME_SERVICES        *mRT                    = NULL;\r
+STATIC EFI_EVENT              mRuntimeNotifyEvent;\r
+STATIC EFI_EVENT              mEfiVirtualNotifyEvent;\r
+STATIC BOOLEAN                mEfiGoneVirtual         = FALSE;\r
+STATIC BOOLEAN                mEfiAtRuntime           = FALSE;\r
 \r
+EFI_RUNTIME_SERVICES          *mRT;\r
+\r
+STATIC\r
 VOID\r
 EFIAPI\r
 RuntimeDriverExitBootServices (\r
@@ -65,6 +63,11 @@ Returns:
     ChildNotifyEventHandler (Event, NULL);\r
   }\r
 \r
+  //\r
+  // Clear out BootService globals\r
+  //\r
+  gBS             = NULL;\r
+\r
   mEfiAtRuntime = TRUE;\r
 }\r
 \r
@@ -108,13 +111,8 @@ Returns:
   //\r
   // Update global for Runtime Services Table and IO\r
   //\r
-  EfiConvertInternalPointer ((VOID **) &mRT);\r
+  EfiConvertPointer (0, (VOID **) &mRT);\r
 \r
-  //\r
-  // Clear out BootService globals\r
-  //\r
-  gBS             = NULL;\r
-  gST             = NULL;\r
   mEfiGoneVirtual = TRUE;\r
 }\r
 \r
@@ -219,6 +217,7 @@ Returns:
 }\r
 \r
 BOOLEAN\r
+EFIAPI\r
 EfiAtRuntime (\r
   VOID\r
   )\r
@@ -239,6 +238,7 @@ Returns:
 }\r
 \r
 BOOLEAN\r
+EFIAPI\r
 EfiGoneVirtual (\r
   VOID\r
   )\r