mirror of https://github.com/acidanthera/audk.git
OvmfPkg/QemuFwCfg: introduce FW_CFG_IO_SELECTOR, adapt the package
Introduce the FW_CFG_IO_SELECTOR macro for IO Port 0x510 (the Selector Register), and update all references in OvmfPkg. Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Jordan Justen <jordan.l.justen@intel.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>
This commit is contained in:
parent
5583a8a4ff
commit
21ca2f28e6
|
@ -42,6 +42,12 @@
|
|||
#define FW_CFG_DMA_CTL_SELECT BIT3
|
||||
#define FW_CFG_DMA_CTL_WRITE BIT4
|
||||
|
||||
//
|
||||
// The fw_cfg registers can be found at these IO Ports, on the IO-mapped
|
||||
// platforms (Ia32 and X64).
|
||||
//
|
||||
#define FW_CFG_IO_SELECTOR 0x510
|
||||
|
||||
//
|
||||
// Numerically defined keys.
|
||||
//
|
||||
|
|
|
@ -42,7 +42,7 @@ QemuFwCfgSelectItem (
|
|||
)
|
||||
{
|
||||
DEBUG ((EFI_D_INFO, "Select Item: 0x%x\n", (UINT16)(UINTN) QemuFwCfgItem));
|
||||
IoWrite16 (0x510, (UINT16)(UINTN) QemuFwCfgItem);
|
||||
IoWrite16 (FW_CFG_IO_SELECTOR, (UINT16)(UINTN) QemuFwCfgItem);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ SaveSmiFeatures (
|
|||
S3SaveState, // This
|
||||
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode
|
||||
EfiBootScriptWidthUint16, // Width
|
||||
(UINT64)0x510, // Address
|
||||
(UINT64)FW_CFG_IO_SELECTOR, // Address
|
||||
(UINTN)1, // Count
|
||||
&FeaturesOkItemAsUint16 // Buffer
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue