audk/OvmfPkg/Library
mdkinney d3a24ff551 When SOURCE_DEBUG_ENABLE is set, a TimerLib is linked into the SEC Phase to support the Debug Agent and the TimerLib is mapped into read-only ROM/FLASH.
The TimerLib in the OvmfPkg uses a global variable called mPmba and depends on that global being updated.  This works for modules loaded into memory, but not  XIP modules in ROM/FLASH.

This patch removes the mPmba global variable and instead reads the PIIX4 Power Management Base Address from PCI configuration space when it is needed.  This patch also simplifies the initialization logic in the constructor and introduces #defines to eliminate hard coded values in the function implementations.  According to the PIIX4 documentation, the IO Space enable bit in the PCI Command Register does not have to be set for the Power Management Base Address to be decoded, so that one op has been removed from the constructor.

I have tested this patch with QEMU and verified that the UDK Debugger us functional when SOURCE_DEBUG_ENABLE is set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

I also tested it with RHEL-6.3 guest boot/shutdown, Fedora 18 Alpha XFCE
guest boot/shutdown, and Windows 8 Consumer Preview guest
boot/reboot/shutdown. (RHEL-6.3 host.) I didn't notice any adverse effects.

Tested-by: Laszlo Ersek <lersek@redhat.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13783 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-04 20:58:21 +00:00
..
AcpiTimerLib When SOURCE_DEBUG_ENABLE is set, a TimerLib is linked into the SEC Phase to support the Debug Agent and the TimerLib is mapped into read-only ROM/FLASH. 2012-10-04 20:58:21 +00:00
EmuVariableFvbLib OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
NvVarsFileLib OvmfPkg NvVarsFileLib: Leverage SerializeVariablesLib 2011-01-30 19:50:08 +00:00
PlatformBdsLib VS2005 and DDK3790 tool chain tags require typecasts to BOOLEAN to compile. 2012-10-03 20:22:17 +00:00
PlatformDebugLibIoPort OvmfPkg: add support for debug console on port 0x402 2012-07-26 16:36:39 +00:00
PlatformFvbLibNull OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
PlatformSecureLib OvmfPkg: Add custom mode setup if the Secure Boot build option is specified. 2012-04-04 17:35:06 +00:00
QemuFwCfgLib OvmfPkg: introduce QemuFwCfgFindFile () 2012-07-23 17:10:29 +00:00
ResetSystemLib OvmfPkg ResetSystemLib: Fix build issue with VS2005 2011-01-27 01:08:52 +00:00
SerializeVariablesLib OvmfPkg: Remove variables that are set, but not used 2011-10-31 15:57:12 +00:00