Skip to content

Commit 90f5332

Browse files
author
Lv Zheng
committed
Tables: Fix an issue that FACS initialization is performed twice.
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 <[email protected]>
1 parent a04dbfa commit 90f5332

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

source/components/utilities/utxfinit.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,14 @@ AcpiEnableSubsystem (
266266
* Obtain a permanent mapping for the FACS. This is required for the
267267
* Global Lock and the Firmware Waking Vector
268268
*/
269-
Status = AcpiTbInitializeFacs ();
270-
if (ACPI_FAILURE (Status))
269+
if (!(Flags & ACPI_NO_FACS_INIT))
271270
{
272-
ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
273-
return_ACPI_STATUS (Status);
271+
Status = AcpiTbInitializeFacs ();
272+
if (ACPI_FAILURE (Status))
273+
{
274+
ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
275+
return_ACPI_STATUS (Status);
276+
}
274277
}
275278

276279
#endif /* !ACPI_REDUCED_HARDWARE */

source/include/actypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ typedef UINT64 ACPI_INTEGER;
654654
#define ACPI_NO_ACPI_ENABLE 0x10
655655
#define ACPI_NO_DEVICE_INIT 0x20
656656
#define ACPI_NO_OBJECT_INIT 0x40
657+
#define ACPI_NO_FACS_INIT 0x80
657658

658659
/*
659660
* Initialization state

0 commit comments

Comments
 (0)