X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPkg%2FLibrary%2FBdsLib%2FBdsFilePath.c;h=ac1fb0eaf2875983f1e3f3c4c4e848e623c92910;hb=639a76d1912f8eb07e26b1a8f2393b682be65f2c;hp=9136941edec7b5e2a8c9016104e53cd2fab0100d;hpb=2755d844f9ccc57108b49d5f91f38085de01760a;p=mirror_edk2.git diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c index 9136941ede..ac1fb0eaf2 100644 --- a/ArmPkg/Library/BdsLib/BdsFilePath.c +++ b/ArmPkg/Library/BdsLib/BdsFilePath.c @@ -471,7 +471,8 @@ BdsMemoryMapSupport ( IN EFI_DEVICE_PATH *RemainingDevicePath ) { - return IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP); + return IS_DEVICE_PATH_NODE(DevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP) || + IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP); } EFI_STATUS @@ -488,9 +489,12 @@ BdsMemoryMapLoadImage ( MEMMAP_DEVICE_PATH* MemMapPathDevicePath; UINTN Size; - ASSERT (IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP)); - - MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)RemainingDevicePath; + if (IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP)) { + MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)RemainingDevicePath; + } else { + ASSERT (IS_DEVICE_PATH_NODE(DevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP)); + MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)DevicePath; + } Size = MemMapPathDevicePath->EndingAddress - MemMapPathDevicePath->StartingAddress; if (Size == 0) {