mirror_edk2/OvmfPkg/Include/IndustryStandard
Laszlo Ersek ba1d245f1d OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
* Introduce the PIIX4_PAM* and MCH_PAM* macros under
  "OvmfPkg/Include/IndustryStandard". These macros capture the PAM
  register offsets (in PCI config space) on the respective Memory
  Controller B/D/F, from the respective data sheets.

* Under IndustryStandard, introduce the PMC_REGISTER_PIIX4() macro for
  PIIX4. (For Q35, we already have DRAMC_REGISTER_Q35().) In both cases,
  the B/D/F is 0/0/0.

* Under CsmSupportLib, replace the "PAMRegOffset" field (UINT8) in the
  PAM_REGISTER_VALUE structure with "PAMRegPciLibAddress" (UINTN). The new
  field contains the return value of the PCI_LIB_ADDRESS() macro.

* Under CsmSupportLib, replace the "mRegisterValues440" elements as
  follows:

    REG_PAMx_OFFSET_440, ReadEnableData, WriteEnableData
    -->
    PMC_REGISTER_PIIX4 (PIIX4_PAMx), ReadEnableData, WriteEnableData

* Under CsmSupportLib, replace the "mRegisterValuesQ35" elements as
  follows:

    REG_PAMx_OFFSET_Q35, ReadEnableData, WriteEnableData
    -->
    DRAMC_REGISTER_Q35 (MCH_PAMx), ReadEnableData, WriteEnableData

* Under CsmSupportLib, update the register address calculations as follows
  (for all of PciOr8(), PciAnd8() and PciRead8()):

    PCI_LIB_ADDRESS (
      PAM_PCI_BUS,
      PAM_PCI_DEV,
      PAM_PCI_FUNC,
      mRegisterValues[Index].PAMRegOffset
      )
    -->
    mRegisterValues[Index].PAMRegPciLibAddress

* Under CsmSupportLib, remove the PAM_PCI_* and REG_PAM*_OFFSET_* macros.

Technically speaking, these changes could be split into three patches
(IndustryStandard macro additions, CsmSupportLib code updates,
CsmSupportLib macro removals). However, the patch is not big, and in this
case it is actually helpful to present the code movement / refactoring in
one step, for easier verification.

Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Ref: https://bugs.launchpad.net/qemu/+bug/1715700
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-09-20 20:24:26 +02:00
..
Xen OvmfPkg: Fix typing errors in header files 2016-09-13 14:14:31 +02:00
E820.h OvmfPkg: introduce E820.h 2013-12-08 01:35:44 +00:00
I440FxPiix4.h OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard 2017-09-20 20:24:26 +02:00
LegacyVgaBios.h OvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL) 2014-05-20 16:33:00 +00:00
LinuxBzimage.h OvmfPkg: Fix typing errors in header files 2016-09-13 14:14:31 +02:00
Q35MchIch9.h OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard 2017-09-20 20:24:26 +02:00
QemuFwCfg.h OvmfPkg/QemuFwCfg: introduce FW_CFG_IO_DMA_ADDRESS, adapt the package 2017-02-22 03:35:49 +01:00
Virtio10.h OvmfPkg/Virtio10: define VIRTIO_F_IOMMU_PLATFORM feature bit 2017-08-25 16:19:48 +02:00
Virtio10Net.h OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec 2016-04-06 19:21:39 +02:00
Virtio095.h OvmfPkg: IndustryStandard: factor out Virtio095.h 2016-04-06 19:21:16 +02:00
Virtio095Net.h OvmfPkg: IndustryStandard: factor out Virtio095Net.h 2016-04-06 19:21:26 +02:00
Virtio.h OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec 2016-04-06 19:21:39 +02:00
VirtioBlk.h OvmfPkg: IndustryStandard/VirtioBlk: introduce topology-related definitions 2013-12-18 19:57:28 +00:00
VirtioGpu.h OvmfPkg/IndustryStandard: add type definitions for the virtio GPU device 2016-09-01 22:54:53 +02:00
VirtioNet.h OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec 2016-04-06 19:21:39 +02:00
VirtioScsi.h OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL 2013-12-11 16:58:22 +00:00
VmwareSvga.h OvmfPkg: VMWare SVGA display device register definitions 2017-04-07 12:22:30 +02:00