diff options
author | Sunil V L <sunilvl@ventanamicro.com> | 2023-02-22 10:36:59 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-02-23 05:02:15 +0000 |
commit | bc82574de476fbb485dee36650ab22865892d0d4 (patch) | |
tree | 3a8dd3f28eb3f4c306f553a82a90eb85cf1c918a | |
parent | 2c5961cccff1164ac7d0e34baa606d1ba1abcf43 (diff) | |
download | edk2-bc82574de476fbb485dee36650ab22865892d0d4.tar.gz edk2-bc82574de476fbb485dee36650ab22865892d0d4.tar.bz2 edk2-bc82574de476fbb485dee36650ab22865892d0d4.zip |
OvmfPkg/RiscVVirt: Fix SCT memory allocation test case failure
Fix the UEFI memory range calculation by including the correct
stack memory range. Without this fix, SCT hangs in MemoryAllocation
test cases which call AllocateAddress().
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Andrei Warkentin <andrei.warkentin@intel.com>
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com>
-rw-r--r-- | OvmfPkg/RiscVVirt/Sec/SecMain.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OvmfPkg/RiscVVirt/Sec/SecMain.c b/OvmfPkg/RiscVVirt/Sec/SecMain.c index 054e49ef0c..73b9b21a67 100644 --- a/OvmfPkg/RiscVVirt/Sec/SecMain.c +++ b/OvmfPkg/RiscVVirt/Sec/SecMain.c @@ -71,8 +71,9 @@ SecStartup ( FirmwareContext.FlattenedDeviceTree = (UINT64)DeviceTreeAddress;
SetFirmwareContextPointer (&FirmwareContext);
- StackBase = (UINT64)FixedPcdGet32 (PcdOvmfSecPeiTempRamBase);
- UefiMemoryBase = StackBase + FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) - SIZE_32MB;
+ StackBase = (UINT64)FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) +
+ FixedPcdGet32 (PcdOvmfSecPeiTempRamSize);
+ UefiMemoryBase = StackBase - SIZE_32MB;
// Declare the PI/UEFI memory region
HobList = HobConstructor (
|