summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
509e6b5)
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>
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
- (UINT64)0x514, // Address\r
+ (UINT64)FW_CFG_IO_DMA_ADDRESS, // Address\r
(UINTN)2, // Count\r
&BigEndianAddressOfAccess // Buffer\r
);\r
(UINTN)2, // Count\r
&BigEndianAddressOfAccess // Buffer\r
);\r
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
- (UINT64)0x514, // Address\r
+ (UINT64)FW_CFG_IO_DMA_ADDRESS, // Address\r
(UINTN)2, // Count\r
&BigEndianAddressOfAccess // Buffer\r
);\r
(UINTN)2, // Count\r
&BigEndianAddressOfAccess // Buffer\r
);\r
//\r
#define FW_CFG_IO_SELECTOR 0x510\r
#define FW_CFG_IO_DATA 0x511\r
//\r
#define FW_CFG_IO_SELECTOR 0x510\r
#define FW_CFG_IO_DATA 0x511\r
+#define FW_CFG_IO_DMA_ADDRESS 0x514\r
\r
//\r
// Numerically defined keys.\r
\r
//\r
// Numerically defined keys.\r
//\r
AccessHigh = (UINT32)RShiftU64 ((UINTN)&Access, 32);\r
AccessLow = (UINT32)(UINTN)&Access;\r
//\r
AccessHigh = (UINT32)RShiftU64 ((UINTN)&Access, 32);\r
AccessLow = (UINT32)(UINTN)&Access;\r
- IoWrite32 (0x514, SwapBytes32 (AccessHigh));\r
- IoWrite32 (0x518, SwapBytes32 (AccessLow));\r
+ IoWrite32 (FW_CFG_IO_DMA_ADDRESS, SwapBytes32 (AccessHigh));\r
+ IoWrite32 (FW_CFG_IO_DMA_ADDRESS + 4, SwapBytes32 (AccessLow));\r
\r
//\r
// Don't look at Access.Control before starting the transfer.\r
\r
//\r
// Don't look at Access.Control before starting the transfer.\r
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
S3SaveState, // This\r
EFI_BOOT_SCRIPT_IO_WRITE_OPCODE, // OpCode\r
EfiBootScriptWidthUint32, // Width\r
- (UINT64)0x514, // Address\r
+ (UINT64)FW_CFG_IO_DMA_ADDRESS, // Address\r
(UINTN)2, // Count\r
&AccessAddress // Buffer\r
);\r
(UINTN)2, // Count\r
&AccessAddress // Buffer\r
);\r