Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46406
b: refs/heads/master
c: c857303
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Feb 3, 2007
1 parent 3f22e35 commit 518bd99
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 987c21a0b0081d480ec3cd04875509cdc10e15e7
refs/heads/master: c857303ad496e1f52955e95994a67869882e89f9
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/events/evxfevnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ acpi_status acpi_enable(void)

ACPI_FUNCTION_TRACE(acpi_enable);

/* ACPI tables must be present */

if (!acpi_tb_tables_loaded()) {
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}

/* Check current mode */

if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {
ACPI_DEBUG_PRINT((ACPI_DB_INIT,
"System is already in ACPI mode\n"));
Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/acpi/tables/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ static acpi_physical_address
acpi_tb_get_root_table_entry(u8 * table_entry,
acpi_native_uint table_entry_size);

/*******************************************************************************
*
* FUNCTION: acpi_tb_tables_loaded
*
* PARAMETERS: None
*
* RETURN: TRUE if required ACPI tables are loaded
*
* DESCRIPTION: Determine if the minimum required ACPI tables are present
* (FADT, FACS, DSDT)
*
******************************************************************************/

u8 acpi_tb_tables_loaded(void)
{

if (acpi_gbl_root_table_list.count >= 3) {
return (TRUE);
}

return (FALSE);
}

/*******************************************************************************
*
* FUNCTION: acpi_tb_print_table_header
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/acpi/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded);
/*
* tbutils - table manager utilities
*/
u8 acpi_tb_tables_loaded(void);

void
acpi_tb_print_table_header(acpi_physical_address address,
struct acpi_table_header *header);
Expand Down

0 comments on commit 518bd99

Please sign in to comment.