diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-09 10:55:26 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-09 10:55:26 +0000 |
commit | aa863d357aa830c8068b4539975fe17eb4359d48 (patch) | |
tree | 9256a0a11c488eece3188958367b32985a535193 /ArmPkg/Library/BdsLib | |
parent | 4aa2417061f832009b92aac786ed7307ce088503 (diff) | |
download | edk2-platforms-aa863d357aa830c8068b4539975fe17eb4359d48.tar.xz |
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
Diffstat (limited to 'ArmPkg/Library/BdsLib')
-rw-r--r-- | ArmPkg/Library/BdsLib/BdsFilePath.c | 12 |
1 files changed, 8 insertions, 4 deletions
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) { |