summaryrefslogtreecommitdiff
path: root/OvmfPkg/PlatformPei
AgeCommit message (Collapse)Author
2012-09-12OvmfPkg: key PMBA setup in Platform PEI off of PMREGMISC/PMIOSE, not Xenjljusten
This matches the logic in AcpiTimerLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13723 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-12OvmfPkg: enable PIIX4 IO space in the PEI phasejljusten
I. There are at least three locations in OvmfPkg that manipulate the PMBA and related PIIX4 registers. 1. MiscInitialization() [OvmfPkg/PlatformPei/Platform.c] module type: PEIM -- Pre-EFI Initialization Module (a) currently sets the PMBA only: 00.01.3 / 0x40 bits [15:6] 2. AcpiTimerLibConstructor() [OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c] module type: BASE -- probably callable anywhere after PEI (a) sets the PMBA if needed: 00.01.3 / 0x40 bits [15:6] (b) sets PCICMD/IOSE if needed: 00.01.3 / 0x04 bit 0 (c) sets PMREGMISC/PMIOSE: 00.01.3 / 0x80 bit 0 3. AcpiInitialization() [OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c] module type: DXE_DRIVER -- Driver eXecution Environment (a) sets SCI_EN, which depends on correct PMBA setting from earlier ( The relative order of #1 and #3 is dictated minimally by their module types. Said relative order can be verified with the boot log: 27 Loading PEIM at 0x00000822320 EntryPoint=0x00000822580 PlatformPei.efi 28 Platform PEIM Loaded 1259 PlatformBdsInit 1270 PlatformBdsPolicyBehavior Line 28 is printed by InitializePlatform() [OvmfPkg/PlatformPei/Platform.c] which is the entry point of that module. The other two lines are printed by the corresponding functions in "OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c". ) Currently #2 (AcpiTimerLibConstructor()) is called in a random spot (whenever it gets loaded from the firmware image) and masks the insufficient setup in #1. We shouldn't depend on that, PEI should finish with IO space being fully accessibe. In addition, PEI should program the same PMBA value as AcpiTimerLib. II. The PEI change notwithstanding, AcpiTimerLib should stay defensive and ensure proper PM configuration for itself (either by confirming or by doing). III. Considering a possible cleanup/unification of #2 and #3: timer functions relying on AcpiTimerLibConstructor(), - MicroSecondDelay() - NanoSecondDelay() - GetPerformanceCounter() - GetPerformanceCounterProperties() - GetTimeInNanoSecond() may be called before #3 is reached (in Boot Device Selection phase), so we should not move the initialization from #2 to #3. (Again, AcpiTimerLib should contain its own setup.) We should also not move #3 to an earlier phase -- SCI_EN is premature unless we're about to boot real soon ("enable generation of SCI upon assertion of PWRBTN_STS, LID_STS, THRM_STS, or GPI_STS bits"). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13722 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-12OvmfPkg: fix the mask for accessing the PIIX4 PMBA [15:6] bitfieldjljusten
The Index Register Base Address bitfield is selected by the binary mask 00000000 00000000 11111111 11000000, 0xFFC0; fix the typo. Reported-by: Gleb Natapov <gleb@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13720 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-27OvmfPkg/PlatformPei: Shrink memory range for PCI MMIO allocationjljusten
Including the range of [0xFC000000, 0xFD000000) for PCI MMIO allocation created a conflict for Xen's HVM loader. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13682 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-31OvmfPkg: clean up memory mapjljusten
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 <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13572 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-31OvmfPkg/PlatformPei: Remove MtrrLib ASSERTsjljusten
QEMU doesn't support MTRR emulation in some cases, and therefore the MtrrLib calls may return an error. In that case, we should silently ignore the error. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12618 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-31OvmfPkg: Remove variables that are set, but not usedjljusten
GCC 4.6 generates a warning when a variable is set, but never used. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12615 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-28Set MTRR registers.vanjeff
Signed-off-by: vanjeff Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12589 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-25Fix build crash while using MSFT to build OVMF, also fix some build warning ↵gikidy
report for PCD type issues. Signed-off-by: gikidy Reviewed-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12202 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-05OvmfPkg/PlatformPei: Add Xen supportjljusten
* Make PlatformPei aware of Xen * Fix assigned PIO and MMIO ranges to be compatible with Xen * Reserve Xen HVM address range * Publish XenInfo HOB * Don't program PIIX4 PMBA for Xen Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Reviewed-by: gavinguan Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12091 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-22OvmfPkg/PlatformPei: Fix issue with 'RELEASE' tag buildjljusten
When building in release mode on OVMF, the ASSERT_EFI_ERROR macro is empty. So, to set the BootMode, in a release build, it must be outside of ASSERT_EFI_ERROR. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11413 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-22OvmfPkg/PlatformPei: Set BootMode, install MasterBootMode PPIjljusten
MdeModulePkg/Core/DxeIplPeim is now dependent on gEfiPeiMasterBootModePpiGuid in order to run. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11412 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-21OvmfPkg: Add support for memory above 4GBjljusten
When QEMU has more than 3.5GB of RAM, it will map the additional memory above 4GB. This change will make that RAM accessible to OVMF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11266 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-21OvmfPkg: Add DEBUG messages to dump the contents of CMOSjljusten
The contents of CMOS on boot can describe some aspects of the system configuration. For example, the size of memory available to qemu/kvm. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11264 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-13OvmfPkg/PlatformPei: Set PM base address OVMFjljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11250 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-13OVMF: Support greater than 2GB of memoryjljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10928 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-16Update OVMF Platform PEI to declare IO and MMIO resources.mdkinney
Update default memory type information to reduce EFI Memory Map fragmentation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10657 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-28Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10439 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-231. Correct File header to ## @filelgao4
2. Remove unnecessary .common] postfix on section. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10051 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-30Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF ↵mdkinney
sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays. Do some minor clean ups to INF files git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9870 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-04OVMF: Update OVMF FD/FV build to minimize ROM sizejljusten
* Only SEC is uncompressed now * The MAIN FV with PEI & DXE can easily shrink and grow as needed * The final output will now be OVMF.Fv rather than OVMF.fd * The final output size will be a multiple of 64kb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9672 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-26OVMF: Convert from EmuVariableRuntimeDxe to VariableRuntimeDxe.jljusten
OVMF utilizes EmuVariableFvbRuntimeDxe to provide an emulated variable firmware volume block device for non-volatile variables. This allows the VariableRuntimeDxe and FaultTolerantWriteDxe to function without a real non-volatile backing store. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9317 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-07OVMF: Add support for more persistent NV variables which can survive a ↵jljusten
system reboot. Make use of EMU Variable driver's PcdEmuVariableNvStoreReserved to allow NV variables to persist a VM system reset. The contents of the NV variables will still be lost when the VM is shut down, but they appear to persist when the efi shell reset command is run. (Tested with QEMU 0.10.0.) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9241 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-23Make 0xa0000 - 0xb0000 I/O memory.jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8630 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-27Add initial version of Open Virtual Machine Firmware (OVMF) platform.jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8398 6f19259b-4bc3-4df7-8a09-765794883524