summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OvmfPkg/AcpiPlatformDxe/BootScript.c4
-rw-r--r--OvmfPkg/Include/IndustryStandard/QemuFwCfg.h1
-rw-r--r--OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c4
-rw-r--r--OvmfPkg/SmmControl2Dxe/SmiFeatures.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/AcpiPlatformDxe/BootScript.c
index 1ad468e2f8..bff42ad8b9 100644
--- a/OvmfPkg/AcpiPlatformDxe/BootScript.c
+++ b/OvmfPkg/AcpiPlatformDxe/BootScript.c
@@ -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
);
diff --git a/OvmfPkg/Include/IndustryStandard/QemuFwCfg.h b/OvmfPkg/Include/IndustryStandard/QemuFwCfg.h
index 5da6b456fe..8c32f83e8e 100644
--- a/OvmfPkg/Include/IndustryStandard/QemuFwCfg.h
+++ b/OvmfPkg/Include/IndustryStandard/QemuFwCfg.h
@@ -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.
diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
index d79d0a444c..3dd55ba504 100644
--- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
@@ -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.
diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
index 73c29848b3..bd257f15d9 100644
--- a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
+++ b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
@@ -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
);