Skip to content

Commit

Permalink
Detect FACS even for reduced hardware platforms
Browse files Browse the repository at this point in the history
The FACS is optional even on hardware reduced platforms, and may exist
for the purpose of communicating the hardware_signature field to provoke
a clean reboot instead of a resume from hibernation.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
  • Loading branch information
dwmw2 committed Mar 12, 2024
1 parent 1113c20 commit 44fc328
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
29 changes: 12 additions & 17 deletions source/components/tables/tbfadt.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,24 +489,19 @@ AcpiTbParseFadt (
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_DsdtIndex);

/* If Hardware Reduced flag is set, there is no FACS */

if (!AcpiGbl_ReducedHardware)
if (AcpiGbl_FADT.Facs)
{
if (AcpiGbl_FADT.Facs)
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_XFacsIndex);
}
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_XFacsIndex);
}
}

Expand Down
10 changes: 1 addition & 9 deletions source/components/tables/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,7 @@ AcpiTbInitializeFacs (
{
ACPI_TABLE_FACS *Facs;


/* If Hardware Reduced flag is set, there is no FACS */

if (AcpiGbl_ReducedHardware)
{
AcpiGbl_FACS = NULL;
return (AE_OK);
}
else if (AcpiGbl_FADT.XFacs &&
if (AcpiGbl_FADT.XFacs &&
(!AcpiGbl_FADT.Facs || !AcpiGbl_Use32BitFacsAddresses))
{
(void) AcpiGetTableByIndex (AcpiGbl_XFacsIndex,
Expand Down

0 comments on commit 44fc328

Please sign in to comment.