if DownloadAndInstallTables EarlyTablesOnly is TRUE: Publish FACS and FACP tables else Publish all tables othere than FACS and FACP
We immediately call DownloadAndInstallTables with EarlyTablesOnly set to TRUE, and then FALSE in this patch, so all of the tables will still be published at the driver entry point. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> --- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 55 ++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c index 15e1bc2..b3be65d 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -468,9 +468,18 @@ Process2ndPassCmdAddPointer ( Facs->Length <= Blob2Remaining && Facs->Signature == EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) { - DEBUG ((EFI_D_VERBOSE, "found \"%-4.4a\" size 0x%x; installing\n", + DEBUG ((EFI_D_VERBOSE, "found \"%-4.4a\" size 0x%x; ", (CONST CHAR8 *)&Facs->Signature, Facs->Length)); TableSize = Facs->Length; + if (!EarlyTablesOnly) { + // + // The early tables were already installed. + // + DEBUG ((EFI_D_VERBOSE, "already installed\n")); + return EFI_SUCCESS; + } else { + DEBUG ((EFI_D_VERBOSE, "installing\n")); + } } } @@ -492,15 +501,41 @@ Process2ndPassCmdAddPointer ( (CONST CHAR8 *)&Header->Signature, Header->Length)); TableSize = Header->Length; - // - // Skip RSDT and XSDT because those are handled by - // EFI_ACPI_TABLE_PROTOCOL automatically. - if (Header->Signature == - EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE || - Header->Signature == - EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) { + switch (Header->Signature) { + case EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE: + case EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE: + // + // Skip RSDT and XSDT because those are handled by + // EFI_ACPI_TABLE_PROTOCOL automatically. + // DEBUG ((EFI_D_VERBOSE, "skipping\n")); return EFI_SUCCESS; + case EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE: + // + // Skip RSDT and XSDT because those are handled by + // EFI_ACPI_TABLE_PROTOCOL automatically. + // + if (!EarlyTablesOnly) { + // + // The early tables were already installed. + // + DEBUG ((EFI_D_VERBOSE, "already installed\n")); + return EFI_SUCCESS; + } + break; + default: + // + // This table is in the set of tables that we install later. + // + if (EarlyTablesOnly) { + // + // We are only installing the early tables at this point, so skip + // installing this table for now. + // + DEBUG ((EFI_D_VERBOSE, "skipping for now\n")); + return EFI_SUCCESS; + } + break; } } @@ -736,6 +771,10 @@ InstallQemuFwCfgTables ( if (EFI_ERROR (Status)) { return Status; } + Status = DownloadAndInstallTables (AcpiProtocol, FALSE); + if (EFI_ERROR (Status)) { + return Status; + } return Status; } -- 2.1.4 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel