diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c index d80a71cda2..12f06e1324 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c @@ -13,10 +13,6 @@ Module Name: RuntimeLib.c -Abstract: - - Light weight lib to support Tiano drivers. - --*/ #include @@ -24,13 +20,15 @@ Abstract: // // Driver Lib Module Globals // -STATIC EFI_EVENT mRuntimeNotifyEvent; -STATIC EFI_EVENT mEfiVirtualNotifyEvent; -STATIC BOOLEAN mEfiGoneVirtual = FALSE; -STATIC BOOLEAN mEfiAtRuntime = FALSE; -EFI_RUNTIME_SERVICES *mRT = NULL; +STATIC EFI_EVENT mRuntimeNotifyEvent; +STATIC EFI_EVENT mEfiVirtualNotifyEvent; +STATIC BOOLEAN mEfiGoneVirtual = FALSE; +STATIC BOOLEAN mEfiAtRuntime = FALSE; +EFI_RUNTIME_SERVICES *mRT; + +STATIC VOID EFIAPI RuntimeDriverExitBootServices ( @@ -65,6 +63,11 @@ Returns: ChildNotifyEventHandler (Event, NULL); } + // + // Clear out BootService globals + // + gBS = NULL; + mEfiAtRuntime = TRUE; } @@ -108,13 +111,8 @@ Returns: // // Update global for Runtime Services Table and IO // - EfiConvertInternalPointer ((VOID **) &mRT); + EfiConvertPointer (0, (VOID **) &mRT); - // - // Clear out BootService globals - // - gBS = NULL; - gST = NULL; mEfiGoneVirtual = TRUE; } @@ -219,6 +217,7 @@ Returns: } BOOLEAN +EFIAPI EfiAtRuntime ( VOID ) @@ -239,6 +238,7 @@ Returns: } BOOLEAN +EFIAPI EfiGoneVirtual ( VOID ) diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeService.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeService.c index 971dcdbf89..69c980b159 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeService.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeService.c @@ -13,15 +13,12 @@ Module Name: RuntimeService.c -Abstract: - - Light weight lib to support Tiano drivers. - --*/ #include VOID +EFIAPI EfiResetSystem ( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, @@ -56,6 +53,7 @@ Returns: // runtime service in the EFI system table. // EFI_STATUS +EFIAPI EfiGetTime ( OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities @@ -83,6 +81,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetTime ( IN EFI_TIME *Time ) @@ -106,6 +105,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetWakeupTime ( OUT BOOLEAN *Enabled, OUT BOOLEAN *Pending, @@ -133,6 +133,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetWakeupTime ( IN BOOLEAN Enable, IN EFI_TIME *Time @@ -162,6 +163,7 @@ Returns: EFI_STATUS +EFIAPI EfiGetVariable ( IN CHAR16 *VariableName, IN EFI_GUID * VendorGuid, @@ -196,6 +198,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, @@ -228,6 +231,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetVariable ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, @@ -260,6 +264,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetNextHighMonotonicCount ( OUT UINT32 *HighCount ) @@ -283,6 +288,7 @@ Returns: } EFI_STATUS +EFIAPI EfiConvertPointer ( IN UINTN DebugDisposition, IN OUT VOID *Address @@ -309,30 +315,7 @@ Returns: } EFI_STATUS -EfiConvertInternalPointer ( - IN OUT VOID *Address - ) -/*++ - -Routine Description: - - Call EfiConvertPointer() to convert internal pointer. - -Arguments: - - Address - A pointer to a pointer that is to be fixed to be the value needed - for the new virtual address mappings being applied. - -Returns: - - Status code - ---*/ -{ - return EfiConvertPointer (0x0, Address); -} - -EFI_STATUS +EFIAPI EfiConvertList ( IN UINTN DebugDisposition, IN OUT LIST_ENTRY *ListHead @@ -421,6 +404,7 @@ EfiSetVirtualAddressMap ( EFI_STATUS +EFIAPI EfiUpdateCapsule ( IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, @@ -439,6 +423,7 @@ EfiUpdateCapsule ( } EFI_STATUS +EFIAPI EfiQueryCapsuleCapabilities ( IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, @@ -460,6 +445,7 @@ EfiQueryCapsuleCapabilities ( EFI_STATUS +EFIAPI EfiQueryVariableInfo ( IN UINT32 Attributes, OUT UINT64 *MaximumVariableStorageSize, diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c index d0f0d6012b..6399f67213 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c @@ -13,10 +13,6 @@ Module Name: RuntimeLib.c -Abstract: - - Light weight lib to support Tiano drivers. - --*/ #include @@ -26,13 +22,12 @@ Abstract: // Driver Lib Module Globals // -STATIC EFI_EVENT mRuntimeNotifyEvent; -STATIC EFI_EVENT mEfiVirtualNotifyEvent; - -STATIC EFI_PLABEL mPlabel; +STATIC EFI_EVENT mRuntimeNotifyEvent; +STATIC EFI_EVENT mEfiVirtualNotifyEvent; +STATIC EFI_PLABEL mPlabel; STATIC EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService; -EFI_RUNTIME_SERVICES *mRT = NULL; +EFI_RUNTIME_SERVICES *mRT; STATIC VOID @@ -66,6 +61,11 @@ Returns: ChildNotifyEventHandler = _gDriverExitBootServicesEvent[Index]; ChildNotifyEventHandler (Event, NULL); } + + // + // Clear out BootService globals + // + gBS = NULL; } STATIC @@ -107,13 +107,6 @@ Returns: mRT->ConvertPointer (EFI_IPF_GP_POINTER, (VOID **) &mPlabel.GP); SetEsalVirtualEntryPoint (mPlabel.EntryPoint, mPlabel.GP); - - // - // Clear out BootService globals - // - gBS = NULL; - gST = NULL; - mRT = NULL; } EFI_STATUS @@ -236,6 +229,7 @@ Returns: } BOOLEAN +EFIAPI EfiAtRuntime ( VOID ) @@ -261,6 +255,7 @@ Returns: } BOOLEAN +EFIAPI EfiGoneVirtual ( VOID ) @@ -284,3 +279,4 @@ Returns: return (BOOLEAN) (ReturnReg.r9 == 1); } + diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c index bc7a31841b..2e8794068a 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c @@ -13,15 +13,12 @@ Module Name: RuntimeService.c -Abstract: - - Light weight lib to support Tiano drivers. - --*/ #include VOID +EFIAPI EfiResetSystem ( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, @@ -69,6 +66,7 @@ Returns: // runtime service in the EFI system table. // EFI_STATUS +EFIAPI EfiGetTime ( OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities @@ -100,6 +98,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetTime ( IN EFI_TIME *Time ) @@ -128,6 +127,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetWakeupTime ( OUT BOOLEAN *Enabled, OUT BOOLEAN *Pending, @@ -160,6 +160,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetWakeupTime ( IN BOOLEAN Enable, IN EFI_TIME *Time @@ -191,6 +192,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetVariable ( IN CHAR16 *VariableName, IN EFI_GUID * VendorGuid, @@ -239,6 +241,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, @@ -285,6 +288,7 @@ Returns: } EFI_STATUS +EFIAPI EfiSetVariable ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, @@ -331,6 +335,7 @@ Returns: } EFI_STATUS +EFIAPI EfiGetNextHighMonotonicCount ( OUT UINT32 *HighCount ) @@ -359,6 +364,7 @@ Returns: } EFI_STATUS +EFIAPI EfiConvertPointer ( IN UINTN DebugDisposition, IN OUT VOID *Address @@ -385,6 +391,7 @@ Returns: } EFI_STATUS +EFIAPI EfiConvertList ( IN UINTN DebugDisposition, IN OUT LIST_ENTRY *ListHead @@ -483,6 +490,7 @@ EfiSetVirtualAddressMap ( EFI_STATUS +EFIAPI EfiUpdateCapsule ( IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, @@ -493,6 +501,7 @@ EfiUpdateCapsule ( } EFI_STATUS +EFIAPI EfiQueryCapsuleCapabilities ( IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, @@ -505,6 +514,7 @@ EfiQueryCapsuleCapabilities ( EFI_STATUS +EFIAPI EfiQueryVariableInfo ( IN UINT32 Attributes, OUT UINT64 *MaximumVariableStorageSize, diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/RuntimeLibInternal.h b/EdkModulePkg/Library/EdkUefiRuntimeLib/RuntimeLibInternal.h index 82494fd7a0..223ad40f9d 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/RuntimeLibInternal.h +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/RuntimeLibInternal.h @@ -20,11 +20,6 @@ Abstract: #ifndef __RUNTIMELIBINTERNAL_H__ #define __RUNTIMELIBINTERNAL_H__ -EFI_STATUS -EfiConvertInternalPointer ( - IN OUT VOID *Address - ); - extern EFI_RUNTIME_SERVICES *mRT; #endif //__RUNTIMELIBINTERNAL_H__