Fail AcpiEnable if ACPI tables not loaded.

AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477
This commit is contained in:
rmoore1 2006-11-09 19:56:10 +00:00
parent 8e7f513ef6
commit 2ca4a3664d
3 changed files with 43 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
* $Revision: 1.90 $
* $Revision: 1.91 $
*
*****************************************************************************/
@ -147,6 +147,15 @@ AcpiEnable (
ACPI_FUNCTION_TRACE (AcpiEnable);
/* ACPI tables must be present */
if (!AcpiTbTablesLoaded ())
{
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
}
/* Check current mode */
if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in ACPI mode\n"));

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - table utilities
* $Revision: 1.86 $
* $Revision: 1.87 $
*
*****************************************************************************/
@ -130,6 +130,33 @@ AcpiTbGetRootTableEntry (
ACPI_NATIVE_UINT TableEntrySize);
/*******************************************************************************
*
* FUNCTION: AcpiTbTablesLoaded
*
* PARAMETERS: None
*
* RETURN: TRUE if required ACPI tables are loaded
*
* DESCRIPTION: Determine if the minimum required ACPI tables are present
* (FADT, FACS, DSDT)
*
******************************************************************************/
BOOLEAN
AcpiTbTablesLoaded (
void)
{
if (AcpiGbl_RootTableList.Count >= 3)
{
return (TRUE);
}
return (FALSE);
}
/*******************************************************************************
*
* FUNCTION: AcpiTbPrintTableHeader

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
* $Revision: 1.62 $
* $Revision: 1.63 $
*
*****************************************************************************/
@ -209,6 +209,10 @@ AcpiTbSetTableLoadedFlag (
/*
* tbutils - table manager utilities
*/
BOOLEAN
AcpiTbTablesLoaded (
void);
void
AcpiTbPrintTableHeader(
ACPI_PHYSICAL_ADDRESS Address,