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
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
//\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
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
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