MdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculation
EndingAddress is calculated incorrectly. Original code calculates it as (StartingAddress + Size). Correct value should be (StartingAddress + Size - 1. Note: Besides the changes made by Samer, Hao also fixed a similar issue in RamDiskImpl.c Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Signed-off-by: Tapan Shah <tapandshah@hpe.com> Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
This commit is contained in:
committed by
Hao Wu
parent
307a55fa01
commit
5eae4ff002
@@ -566,7 +566,7 @@ UpdateMainForm (
|
||||
L" RAM Disk %d: [0x%lx, 0x%lx]\n",
|
||||
Index,
|
||||
PrivateData->StartingAddr,
|
||||
PrivateData->StartingAddr + PrivateData->Size
|
||||
PrivateData->StartingAddr + PrivateData->Size - 1
|
||||
);
|
||||
|
||||
StringId = HiiSetString (ConfigPrivate->HiiHandle, 0, RamDiskStr, NULL);
|
||||
|
Reference in New Issue
Block a user