mirror of
https://github.com/acpica/acpica/
synced 2025-02-16 05:24:36 +03:00
All external interfaces check for ACPI initialization.
date 2001.05.16.22.01.00; author rmoore1; state Exp;
This commit is contained in:
parent
63435ffd81
commit
1529c9a4a6
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: tbxface - Public interfaces to the ACPI subsystem
|
||||
* ACPI table oriented interfaces
|
||||
* $Revision: 1.32 $
|
||||
* $Revision: 1.38 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* reserved.
|
||||
* Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
*
|
||||
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user