diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2023-01-25 18:10:49 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-01-26 08:59:29 +0000 |
commit | f25ee547634375b7f2dfa09209942fd03d00c76f (patch) | |
tree | 28e5dc06eeafe83a8277c78738c64bb0e7e8e3e6 /OvmfPkg/Library/PlatformInitLib | |
parent | 37d3eb026a766b2405daae47e02094c2ec248646 (diff) | |
download | edk2-f25ee547634375b7f2dfa09209942fd03d00c76f.zip edk2-f25ee547634375b7f2dfa09209942fd03d00c76f.tar.gz edk2-f25ee547634375b7f2dfa09209942fd03d00c76f.tar.bz2 |
OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
BuildResourceDescriptorHob() expects the third parameter be the Length,
not the End address.
Fixes: 328076cfdf45 ("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>
Diffstat (limited to 'OvmfPkg/Library/PlatformInitLib')
-rw-r--r-- | OvmfPkg/Library/PlatformInitLib/MemDetect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index 5aeeeff..38cece9 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -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:
|