OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()

BuildResourceDescriptorHob() expects the third parameter be the Length,
not the End address.

Fixes: 328076cfdf ("OvmfPkg/PlatformInitLib: Add PlatformAddHobCB")
Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Gerd Hoffmann 2023-01-25 18:10:49 +01:00 committed by mergify[bot]
parent 37d3eb026a
commit f25ee54763
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ PlatformAddHobCB (
break;
case EfiAcpiAddressRangeReserved:
BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End);
BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End - Base);
DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End));
break;
default: