mirror of https://github.com/acidanthera/audk.git
OvmfPkg/QemuFwCfg: introduce FW_CFG_IO_DMA_ADDRESS, adapt the package
Introduce the FW_CFG_IO_DMA_ADDRESS macro for IO Ports 0x514 and 0x518 (most significant and least significant halves of the DMA Address Register, respectively), 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
509e6b5a03
commit
ed1a2d42d5
|
@ -317,7 +317,7 @@ TransferS3ContextToBootScript (
|
|||
S3SaveState, // This
|
||||
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode
|
||||
EfiBootScriptWidthUint32, // Width
|
||||
(UINT64)0x514, // Address
|
||||
(UINT64)FW_CFG_IO_DMA_ADDRESS, // Address
|
||||
(UINTN)2, // Count
|
||||
&BigEndianAddressOfAccess // Buffer
|
||||
);
|
||||
|
@ -376,7 +376,7 @@ TransferS3ContextToBootScript (
|
|||
S3SaveState, // This
|
||||
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode
|
||||
EfiBootScriptWidthUint32, // Width
|
||||
(UINT64)0x514, // Address
|
||||
(UINT64)FW_CFG_IO_DMA_ADDRESS, // Address
|
||||
(UINTN)2, // Count
|
||||
&BigEndianAddressOfAccess // Buffer
|
||||
);
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
//
|
||||
#define FW_CFG_IO_SELECTOR 0x510
|
||||
#define FW_CFG_IO_DATA 0x511
|
||||
#define FW_CFG_IO_DMA_ADDRESS 0x514
|
||||
|
||||
//
|
||||
// Numerically defined keys.
|
||||
|
|
|
@ -94,8 +94,8 @@ InternalQemuFwCfgDmaBytes (
|
|||
//
|
||||
AccessHigh = (UINT32)RShiftU64 ((UINTN)&Access, 32);
|
||||
AccessLow = (UINT32)(UINTN)&Access;
|
||||
IoWrite32 (0x514, SwapBytes32 (AccessHigh));
|
||||
IoWrite32 (0x518, SwapBytes32 (AccessLow));
|
||||
IoWrite32 (FW_CFG_IO_DMA_ADDRESS, SwapBytes32 (AccessHigh));
|
||||
IoWrite32 (FW_CFG_IO_DMA_ADDRESS + 4, SwapBytes32 (AccessLow));
|
||||
|
||||
//
|
||||
// Don't look at Access.Control before starting the transfer.
|
||||
|
|
|
@ -240,7 +240,7 @@ SaveSmiFeatures (
|
|||
S3SaveState, // This
|
||||
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode
|
||||
EfiBootScriptWidthUint32, // Width
|
||||
(UINT64)0x514, // Address
|
||||
(UINT64)FW_CFG_IO_DMA_ADDRESS, // Address
|
||||
(UINTN)2, // Count
|
||||
&AccessAddress // Buffer
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue