From 5b31f660c92c7c8b9cfc727cb6802602e64eee0d Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 4 Jul 2017 12:27:24 +0200 Subject: OvmfPkg: widen PcdQ35TsegMbytes to UINT16 Widen PcdQ35TsegMbytes to UINT16, in preparation for setting it dynamically to the QEMU-advertized extended TSEG size (which is 16-bits wide). Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen --- OvmfPkg/PlatformPei/MemDetect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OvmfPkg/PlatformPei') diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index af96a04d19..78a8e0de34 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -348,7 +348,7 @@ PublishPeiMemory ( // // TSEG is chipped from the end of low RAM // - LowerMemorySize -= FixedPcdGet8 (PcdQ35TsegMbytes) * SIZE_1MB; + LowerMemorySize -= FixedPcdGet16 (PcdQ35TsegMbytes) * SIZE_1MB; } // @@ -456,7 +456,7 @@ QemuInitializeRam ( if (FeaturePcdGet (PcdSmmSmramRequire)) { UINT32 TsegSize; - TsegSize = FixedPcdGet8 (PcdQ35TsegMbytes) * SIZE_1MB; + TsegSize = FixedPcdGet16 (PcdQ35TsegMbytes) * SIZE_1MB; AddMemoryRangeHob (BASE_1MB, LowerMemorySize - TsegSize); AddReservedMemoryBaseSizeHob (LowerMemorySize - TsegSize, TsegSize, TRUE); @@ -605,7 +605,7 @@ InitializeRamRegions ( // Make sure the TSEG area that we reported as a reserved memory resource // cannot be used for reserved memory allocations. // - TsegSize = FixedPcdGet8 (PcdQ35TsegMbytes) * SIZE_1MB; + TsegSize = FixedPcdGet16 (PcdQ35TsegMbytes) * SIZE_1MB; BuildMemoryAllocationHob ( GetSystemMemorySizeBelow4gb() - TsegSize, TsegSize, -- cgit v1.2.3