mirror of https://github.com/acidanthera/audk.git
ArmPkg/BdsLib: Fix MemMap Device Path node support
The previous version was only checking if the Remaining Device Path node was a MemMap DevicePath node. This fix also checks if the Root DevicePath node is a MemMap DevicePath node. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12315 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4aa2417061
commit
aa863d357a
ArmPkg/Library/BdsLib
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue