]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: switch IA32, IA32X64, X64 to the fw_cfg-only ACPI platform driver
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 May 2021 20:14:06 +0000 (22:14 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 4 Jun 2021 16:01:50 +0000 (16:01 +0000)
Switch the historical OvmfPkg* platforms from the AcpiPlatformDxe driver
to the QemuFwCfgAcpiPlatformDxe driver. (The latter is used by the
ArmVirtQemu* platforms as well.)

The change effectively replaces the following call tree:

  InstallAcpiTables                [AcpiPlatform.c]

    XenDetected                    [XenPlatformLib] *
    InstallXenTables               [Xen.c]          *
      GetXenAcpiRsdp               [Xen.c]          *

    InstallQemuFwCfgTables         [QemuFwCfgAcpi.c]
      ...

    InstallOvmfFvTables            [AcpiPlatform.c] *
      QemuDetected                 [Qemu.c]         *
      LocateFvInstanceWithTables   [AcpiPlatform.c] *
        QemuInstallAcpiTable       [Qemu.c]         *
          QemuInstallAcpiMadtTable [Qemu.c]         *
            CountBits16            [Qemu.c]         *
          QemuInstallAcpiSsdtTable [Qemu.c]         *
            GetSuspendStates       [Qemu.c]         *
            PopulateFwData         [Qemu.c]         *

with the one below:

  InstallAcpiTables        [QemuFwCfgAcpiPlatform.c]
    InstallQemuFwCfgTables [QemuFwCfgAcpi.c]
      ...

eliminating the sub-trees highlighted with "*".

There are two consequences:

(1) Xen compatibility is removed from the ACPI platform driver of the
   historical OvmfPkg* platforms.

(2) The ACPI tables that are statically built into OVMF (via
    "OvmfPkg/AcpiTables/AcpiTables.inf") are never installed. In
    particular, OVMF's own runtime preparation of the MADT and SSDT is
    eliminated.

Because of (2), remove the "OvmfPkg/AcpiTables/AcpiTables.inf" module as
well -- and then the ACPITABLE build rule too.

Note that (2) only removes effectively dead code; the QEMU ACPI
linker-loader has taken priority since QEMU 1.7.1 (2014). References:

- https://wiki.qemu.org/Planning/1.7
- https://wiki.qemu.org/Features/ACPITableGeneration
- edk2 commit 96bbdbc85693 ("OvmfPkg: AcpiPlatformDxe: download ACPI
                            tables from QEMU", 2014-03-31)
- edk2 commit 387536e472aa ("OvmfPkg: AcpiPlatformDxe: implement QEMU's
                            full ACPI table loader interface", 2014-09-22)

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210526201446.12554-4-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32.fdf
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgIa32X64.fdf
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfPkgX64.fdf

index 472cdd4d8a46aa806c87515f63dd201b86b82681..4b7e1c731ef501304150b2df615ec02201e134ad 100644 (file)
   # ACPI Support\r
   #\r
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-  OvmfPkg/AcpiTables/AcpiTables.inf\r
+  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
index eb7f04a28257037544ab60e6ee88361cbd4d4a3f..04b41445ca34f751a812ea3664228c20a71b2f78 100644 (file)
@@ -280,8 +280,7 @@ INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
 INF  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-INF  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-INF  RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf\r
+INF  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
@@ -487,12 +486,6 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
   }\r
 \r
-[Rule.Common.USER_DEFINED.ACPITABLE]\r
-  FILE FREEFORM = $(NAMED_GUID) {\r
-    RAW ACPI               |.acpi\r
-    RAW ASL                |.aml\r
-  }\r
-\r
 [Rule.Common.USER_DEFINED.CSM]\r
   FILE FREEFORM = $(NAMED_GUID) {\r
     RAW BIN                |.bin\r
index af7d66455fb507e6c57e9ddc3f2b9e6265989660..1d1dea4b19cd328ff9de36e6fb0349bde8a2115d 100644 (file)
   # ACPI Support\r
   #\r
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-  OvmfPkg/AcpiTables/AcpiTables.inf\r
+  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
index f10108d7ee6242f53cbe24e8a7a8b94308d56325..02fd8f0c413e05cc11ceb9357eb7747afd90d4f1 100644 (file)
@@ -281,8 +281,7 @@ INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
 INF  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-INF  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-INF  RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf\r
+INF  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
@@ -490,12 +489,6 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
   }\r
 \r
-[Rule.Common.USER_DEFINED.ACPITABLE]\r
-  FILE FREEFORM = $(NAMED_GUID) {\r
-    RAW ACPI               |.acpi\r
-    RAW ASL                |.aml\r
-  }\r
-\r
 [Rule.Common.USER_DEFINED.CSM]\r
   FILE FREEFORM = $(NAMED_GUID) {\r
     RAW BIN                |.bin\r
index fc236cecfdf078a3a79db12e25c61acc62649ab9..d71edd6b227277b65142f5ce5287426ebb2a7b47 100644 (file)
   # ACPI Support\r
   #\r
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-  OvmfPkg/AcpiTables/AcpiTables.inf\r
+  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
index eb19a9e415025fe2f04f4f2092069c90806cf1fa..5fa8c08958081b50ce062d6fff6c5b735ecf1f38 100644 (file)
@@ -293,8 +293,7 @@ INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
 INF  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-INF  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
-INF  RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf\r
+INF  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
@@ -502,12 +501,6 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
   }\r
 \r
-[Rule.Common.USER_DEFINED.ACPITABLE]\r
-  FILE FREEFORM = $(NAMED_GUID) {\r
-    RAW ACPI               |.acpi\r
-    RAW ASL                |.aml\r
-  }\r
-\r
 [Rule.Common.USER_DEFINED.CSM]\r
   FILE FREEFORM = $(NAMED_GUID) {\r
     RAW BIN                |.bin\r