Fix IO-APIC range size. Add HPET. Take LAPIC base from PCD and fix range size.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- OvmfPkg/PlatformPei/Platform.c | 32 ++++++++++++++------------------ OvmfPkg/PlatformPei/PlatformPei.inf | 2 ++ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index d395bc1..6ea9ae3 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -189,28 +189,24 @@ MemMapInitialization ( ); // - // Add PCI MMIO space available to PCI resource allocations - // - if (TopOfMemory < BASE_2GB) { - AddIoMemoryBaseSizeHob (BASE_2GB, 0xFC000000 - BASE_2GB); - } else { - AddIoMemoryBaseSizeHob (TopOfMemory, 0xFC000000 - TopOfMemory); - } - - // - // Local APIC range - // - AddIoMemoryBaseSizeHob (0xFEC80000, SIZE_512KB); - - // - // I/O APIC range + // Video memory + Legacy BIOS region // - AddIoMemoryBaseSizeHob (0xFEC00000, SIZE_512KB); + AddIoMemoryRangeHob (0x0A0000, BASE_1MB); // - // Video memory + Legacy BIOS region + // address purpose size + // ------------ -------- ------------------------- + // max(top, 2g) PCI MMIO 0xFEC00000 - max(top, 2g) + // 0xFEC00000 IO-APIC 4 KB + // 0xFEC01000 gap 1020 KB + // 0xFED00000 HPET 1 KB + // 0xFED00400 gap 1023 KB + // 0xFEE00000 LAPIC 1 MB // - AddIoMemoryRangeHob (0x0A0000, BASE_1MB); + AddIoMemoryRangeHob (TopOfMemory < BASE_2GB ? BASE_2GB : TopOfMemory, 0xFEC00000); + AddIoMemoryBaseSizeHob (0xFEC00000, SIZE_4KB); + AddIoMemoryBaseSizeHob (0xFED00000, SIZE_1KB); + AddIoMemoryBaseSizeHob (PcdGet32(PcdCpuLocalApicBaseAddress), SIZE_1MB); } diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf index db5ed31..8742008 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -55,6 +55,7 @@ PeiServicesTablePointerLib PeimEntryPoint MtrrLib + PcdLib [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvBase @@ -63,6 +64,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved + gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress [Ppis] gEfiPeiMasterBootModePpiGuid -- 1.7.1 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel