mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 15:14:02 +02:00
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
@ -471,7 +471,8 @@ BdsMemoryMapSupport (
|
|||||||
IN EFI_DEVICE_PATH *RemainingDevicePath
|
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
|
EFI_STATUS
|
||||||
@ -488,9 +489,12 @@ BdsMemoryMapLoadImage (
|
|||||||
MEMMAP_DEVICE_PATH* MemMapPathDevicePath;
|
MEMMAP_DEVICE_PATH* MemMapPathDevicePath;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
|
|
||||||
ASSERT (IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP));
|
if (IS_DEVICE_PATH_NODE(RemainingDevicePath,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP)) {
|
||||||
|
|
||||||
MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)RemainingDevicePath;
|
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;
|
Size = MemMapPathDevicePath->EndingAddress - MemMapPathDevicePath->StartingAddress;
|
||||||
if (Size == 0) {
|
if (Size == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user