diff options
author | Mike Smith <msmith@FreeBSD.org> | 2001-05-29 19:52:40 +0000 |
---|---|---|
committer | Mike Smith <msmith@FreeBSD.org> | 2001-05-29 19:52:40 +0000 |
commit | 0065eb1222e3ccb5cbb7c512ccb611a0e3ed7b54 (patch) | |
tree | a1bc1b7537f2d89240bd2e92ac027e82c5efeb6c /sys/contrib/dev/acpica/tbxface.c | |
parent | a9a41ca37c81d67c4527087c329367f8133b826c (diff) | |
download | src-0065eb1222e3ccb5cbb7c512ccb611a0e3ed7b54.tar.gz src-0065eb1222e3ccb5cbb7c512ccb611a0e3ed7b54.zip |
Import the 20010518 Intel ACPI CA release. Note that Intel's directory layout
keeps changing, so to reduce repository thrash everything has been moved into
a single directory. (repo copy involved)
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=77424
Diffstat (limited to 'sys/contrib/dev/acpica/tbxface.c')
-rw-r--r-- | sys/contrib/dev/acpica/tbxface.c | 62 |
1 files changed, 53 insertions, 9 deletions
diff --git a/sys/contrib/dev/acpica/tbxface.c b/sys/contrib/dev/acpica/tbxface.c index d2bc9cb489c8..4accd25bfff7 100644 --- a/sys/contrib/dev/acpica/tbxface.c +++ b/sys/contrib/dev/acpica/tbxface.c @@ -2,7 +2,7 @@ * * Module Name: tbxface - Public interfaces to the ACPI subsystem * ACPI table oriented interfaces - * $Revision: 34 $ + * $Revision: 38 $ * *****************************************************************************/ @@ -123,7 +123,7 @@ #include "actables.h" -#define _COMPONENT TABLE_MANAGER +#define _COMPONENT ACPI_TABLES MODULE_NAME ("tbxface") @@ -144,20 +144,28 @@ ACPI_STATUS AcpiLoadTables ( ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress) { - ACPI_STATUS Status = AE_OK; + ACPI_STATUS Status; UINT32 NumberOfTables = 0; FUNCTION_TRACE ("AcpiLoadTables"); + /* Ensure that ACPI has been initialized */ + + ACPI_IS_INITIALIZATION_COMPLETE (Status); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + /* Map and validate the RSDP */ Status = AcpiTbVerifyRsdp (RsdpPhysicalAddress); if (ACPI_FAILURE (Status)) { REPORT_ERROR (("AcpiLoadTables: RSDP Failed validation: %s\n", - AcpiCmFormatException (Status))); + AcpiUtFormatException (Status))); goto ErrorExit; } @@ -167,7 +175,7 @@ AcpiLoadTables ( if (ACPI_FAILURE (Status)) { REPORT_ERROR (("AcpiLoadTables: Could not load RSDT: %s\n", - AcpiCmFormatException (Status))); + AcpiUtFormatException (Status))); goto ErrorExit; } @@ -177,11 +185,11 @@ AcpiLoadTables ( if (ACPI_FAILURE (Status)) { REPORT_ERROR (("AcpiLoadTables: Error getting required tables (DSDT/FADT/FACS): %s\n", - AcpiCmFormatException (Status))); + AcpiUtFormatException (Status))); goto ErrorExit; } - DEBUG_PRINT (ACPI_OK, ("ACPI Tables successfully loaded\n")); + DEBUG_PRINTP (ACPI_OK, ("ACPI Tables successfully loaded\n")); /* Load the namespace from the tables */ @@ -190,7 +198,7 @@ AcpiLoadTables ( if (ACPI_FAILURE (Status)) { REPORT_ERROR (("AcpiLoadTables: Could not load namespace: %s\n", - AcpiCmFormatException (Status))); + AcpiUtFormatException (Status))); goto ErrorExit; } @@ -199,7 +207,7 @@ AcpiLoadTables ( ErrorExit: REPORT_ERROR (("AcpiLoadTables: Could not load tables: %s\n", - AcpiCmFormatException (Status))); + AcpiUtFormatException (Status))); return_ACPI_STATUS (Status); } @@ -233,6 +241,15 @@ AcpiLoadTable ( FUNCTION_TRACE ("AcpiLoadTable"); + + /* Ensure that ACPI has been initialized */ + + ACPI_IS_INITIALIZATION_COMPLETE (Status); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + if (!TablePtr) { return_ACPI_STATUS (AE_BAD_PARAMETER); @@ -289,11 +306,20 @@ AcpiUnloadTable ( ACPI_TABLE_TYPE TableType) { ACPI_TABLE_DESC *ListHead; + ACPI_STATUS Status; FUNCTION_TRACE ("AcpiUnloadTable"); + /* Ensure that ACPI has been initialized */ + + ACPI_IS_INITIALIZATION_COMPLETE (Status); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + /* Parameter validation */ if (TableType > ACPI_TABLE_MAX) @@ -362,6 +388,15 @@ AcpiGetTableHeader ( FUNCTION_TRACE ("AcpiGetTableHeader"); + + /* Ensure that ACPI has been initialized */ + + ACPI_IS_INITIALIZATION_COMPLETE (Status); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + if ((Instance == 0) || (TableType == ACPI_TABLE_RSDP) || (!OutTableHeader)) @@ -444,6 +479,15 @@ AcpiGetTable ( FUNCTION_TRACE ("AcpiGetTable"); + + /* Ensure that ACPI has been initialized */ + + ACPI_IS_INITIALIZATION_COMPLETE (Status); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + /* * If we have a buffer, we must have a length too */ |