MdeModulePkg/DxeCapsuleLibFmp: Fix crash with VirtualAddressMap omitted
If the SetVirtualAddressMap() is not called, mIsVirtualAddrConverted is FALSE and the kernel crash occurs in IsNestedFmpCapsule() when executing gBS->LocateProtocol () in the else case. To serve the omitted SetVirtualAddressMap() call, we could just check mEsrtTable presence instead of relying on mIsVirtualAddrConverted. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
|
||||
extern EFI_SYSTEM_RESOURCE_TABLE *mEsrtTable;
|
||||
extern BOOLEAN mIsVirtualAddrConverted;
|
||||
EFI_EVENT mDxeRuntimeCapsuleLibVirtualAddressChangeEvent = NULL;
|
||||
EFI_EVENT mDxeRuntimeCapsuleLibReadyToBootEvent = NULL;
|
||||
|
||||
@@ -40,7 +39,6 @@ DxeCapsuleLibVirtualAddressChangeEvent (
|
||||
)
|
||||
{
|
||||
gRT->ConvertPointer (EFI_OPTIONAL_PTR, (VOID **)&mEsrtTable);
|
||||
mIsVirtualAddrConverted = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user