]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg AcpiTableDxe: Install config table at ACPI data change
authorStar Zeng <star.zeng@intel.com>
Wed, 8 Jul 2015 09:44:46 +0000 (09:44 +0000)
committerlzeng14 <lzeng14@Edk2>
Wed, 8 Jul 2015 09:44:46 +0000 (09:44 +0000)
UEFI spec has clear description below:

Configuration Table Groups
The GUID for a configuration table also defines a corresponding event group GUID with the same value.
If the data represented by a configuration table is changed,
InstallConfigurationTable() should be called.
When InstallConfigurationTable() is called, the corresponding event is signaled.
When this event is signaled,
any components that cache information from the configuration table can optionally update their cached state.
For example, EFI_ACPI_TABLE_GUID defines a configuration table for ACPI data.
When ACPI data is changed, InstallConfigurationTable() is called.
During the execution of InstallConfigurationTable(),
a corresponding event group with EFI_ACPI_TABLE_GUID is signaled,
allowing an application to invalidate any cached ACPI data.

But current implementation only InstallConfigurationTable() at first time ACPI data change.
  if (((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) &&
      !AcpiTableInstance->TablesInstalled1) {
    Status = gBS->InstallConfigurationTable (&gEfiAcpi10TableGuid, AcpiTableInstance->Rsdp1);
    if (EFI_ERROR (Status)) {
      return EFI_ABORTED;
    }

    AcpiTableInstance->TablesInstalled1 = TRUE;
  }

  if (((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) &&
      !AcpiTableInstance->TablesInstalled3) {
    Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, AcpiTableInstance->Rsdp3);
    if (EFI_ERROR (Status)) {
      return EFI_ABORTED;
    }

    AcpiTableInstance->TablesInstalled3= TRUE;
  }

The AcpiTableInstance->TablesInstalled1 and AcpiTableInstance->TablesInstalled3 conditional judgment need to be removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17885 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c

index 646032099588668856caa1f5dcd962398cdd72c6..ebedefb906adfeef66e64205e5a45e7a24b4f9d3 100644 (file)
@@ -114,8 +114,6 @@ typedef struct {
   UINTN                                         NumberOfTableEntries1;  // Number of ACPI 1.0 tables\r
   UINTN                                         NumberOfTableEntries3;  // Number of ACPI 3.0 tables\r
   UINTN                                         CurrentHandle;\r
-  BOOLEAN                                       TablesInstalled1;       // ACPI 1.0 tables published\r
-  BOOLEAN                                       TablesInstalled3;       // ACPI 3.0 tables published\r
   EFI_ACPI_TABLE_PROTOCOL                       AcpiTableProtocol;\r
   EFI_ACPI_SDT_PROTOCOL                         AcpiSdtProtocol;\r
   LIST_ENTRY                                    NotifyList;\r
index 1569de0e4239105d091ed4fa8a5a9c1d119e6903..c6abf1bf0c52f565f4699ba1cf633bbb584e001f 100644 (file)
@@ -159,24 +159,18 @@ PublishTables (
   // Add the RSD_PTR to the system table and store that we have installed the\r
   // tables.\r
   //\r
-  if (((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) &&\r
-      !AcpiTableInstance->TablesInstalled1) {\r
+  if ((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {\r
     Status = gBS->InstallConfigurationTable (&gEfiAcpi10TableGuid, AcpiTableInstance->Rsdp1);\r
     if (EFI_ERROR (Status)) {\r
       return EFI_ABORTED;\r
     }\r
-\r
-    AcpiTableInstance->TablesInstalled1 = TRUE;\r
   }\r
 \r
-  if (((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) &&\r
-      !AcpiTableInstance->TablesInstalled3) {\r
+  if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) {\r
     Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, AcpiTableInstance->Rsdp3);\r
     if (EFI_ERROR (Status)) {\r
       return EFI_ABORTED;\r
     }\r
-\r
-    AcpiTableInstance->TablesInstalled3= TRUE;\r
   }\r
 \r
   return EFI_SUCCESS;\r