Skip to content

Commit

Permalink
Tables: Fix an issue that ACPI initialization is blocked due to no FACS.
Browse files Browse the repository at this point in the history
This patch fixes an issue that when FACS tables do not exist, ACPI
initialization cannot proceed. ACPICA BZ 1122. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jun 18, 2015
1 parent 90f5332 commit ebd544e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions source/components/tables/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,18 @@ AcpiTbInitializeFacs (
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs32));
(void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_X_FACS,
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs64));
if (!AcpiGbl_Facs32 && !AcpiGbl_Facs64)
{
return (AE_NO_MEMORY);
}

if (AcpiGbl_Use32BitFacsAddresses)
if (AcpiGbl_Facs64 && (!AcpiGbl_Facs32 || !AcpiGbl_Use32BitFacsAddresses))
{
AcpiGbl_FACS = AcpiGbl_Facs32 ? AcpiGbl_Facs32 : AcpiGbl_Facs64;
AcpiGbl_FACS = AcpiGbl_Facs64;
}
else
else if (AcpiGbl_Facs32)
{
AcpiGbl_FACS = AcpiGbl_Facs64 ? AcpiGbl_Facs64 : AcpiGbl_Facs32;
AcpiGbl_FACS = AcpiGbl_Facs32;
}

/* If there is no FACS, just continue. There was already an error msg */

return (AE_OK);
}
#endif /* !ACPI_REDUCED_HARDWARE */
Expand Down

0 comments on commit ebd544e

Please sign in to comment.