mirror of https://github.com/acidanthera/audk.git
OvmfPkg/QemuFwCfg: introduce FW_CFG_IO_DATA, adapt the package
Introduce the FW_CFG_IO_DATA macro for IO Port 0x511 (the Data 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
21ca2f28e6
commit
509e6b5a03
|
@ -47,6 +47,7 @@
|
|||
// platforms (Ia32 and X64).
|
||||
//
|
||||
#define FW_CFG_IO_SELECTOR 0x510
|
||||
#define FW_CFG_IO_DATA 0x511
|
||||
|
||||
//
|
||||
// Numerically defined keys.
|
||||
|
|
|
@ -135,7 +135,7 @@ InternalQemuFwCfgReadBytes (
|
|||
InternalQemuFwCfgDmaBytes ((UINT32)Size, Buffer, FW_CFG_DMA_CTL_READ);
|
||||
return;
|
||||
}
|
||||
IoReadFifo8 (0x511, Size, Buffer);
|
||||
IoReadFifo8 (FW_CFG_IO_DATA, Size, Buffer);
|
||||
}
|
||||
|
||||
|
||||
|
@ -187,7 +187,7 @@ QemuFwCfgWriteBytes (
|
|||
InternalQemuFwCfgDmaBytes ((UINT32)Size, Buffer, FW_CFG_DMA_CTL_WRITE);
|
||||
return;
|
||||
}
|
||||
IoWriteFifo8 (0x511, Size, Buffer);
|
||||
IoWriteFifo8 (FW_CFG_IO_DATA, Size, Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ QemuFwCfgSkipBytes (
|
|||
//
|
||||
while (Size > 0) {
|
||||
ChunkSize = MIN (Size, sizeof SkipBuffer);
|
||||
IoReadFifo8 (0x511, ChunkSize, SkipBuffer);
|
||||
IoReadFifo8 (FW_CFG_IO_DATA, ChunkSize, SkipBuffer);
|
||||
Size -= ChunkSize;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ SaveSmiFeatures (
|
|||
S3SaveState, // This
|
||||
EFI_BOOT_SCRIPT_IO_POLL_OPCODE, // OpCode
|
||||
EfiBootScriptWidthUint8, // Width
|
||||
(UINT64)(UINTN)0x511, // Address
|
||||
(UINT64)(UINTN)FW_CFG_IO_DATA, // Address
|
||||
&FeaturesOkData, // Data
|
||||
&FeaturesOkMask, // DataMask
|
||||
MAX_UINT64 // Delay
|
||||
|
|
Loading…
Reference in New Issue