Skip to content

Commit

Permalink
Tables: Fix an issue that FACS initialization is performed twice.
Browse files Browse the repository at this point in the history
This patch adds a new FACS initialization flag for AcpiTbInitialize().
AcpiEnableSubsystem() might be invoked several times in OS bootup process,
and we don't want FACS initialization to be invoked twice. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jun 18, 2015
1 parent a04dbfa commit 90f5332
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/components/utilities/utxfinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,14 @@ AcpiEnableSubsystem (
* Obtain a permanent mapping for the FACS. This is required for the
* Global Lock and the Firmware Waking Vector
*/
Status = AcpiTbInitializeFacs ();
if (ACPI_FAILURE (Status))
if (!(Flags & ACPI_NO_FACS_INIT))
{
ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
return_ACPI_STATUS (Status);
Status = AcpiTbInitializeFacs ();
if (ACPI_FAILURE (Status))
{
ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
return_ACPI_STATUS (Status);
}
}

#endif /* !ACPI_REDUCED_HARDWARE */
Expand Down
1 change: 1 addition & 0 deletions source/include/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NO_ACPI_ENABLE 0x10
#define ACPI_NO_DEVICE_INIT 0x20
#define ACPI_NO_OBJECT_INIT 0x40
#define ACPI_NO_FACS_INIT 0x80

/*
* Initialization state
Expand Down

0 comments on commit 90f5332

Please sign in to comment.