summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/tbinstal.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-06-30 17:50:46 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-06-30 17:50:46 +0000
commit6b92cff93be2b7ae83deb340b753b02444cdcacd (patch)
treea30a26908f5dc9678327cc04b639b945340f97c7 /sys/contrib/dev/acpica/tbinstal.c
parent918310234a7ff346da92f4f10b72dac878b415f2 (diff)
downloadFreeBSD-src-6b92cff93be2b7ae83deb340b753b02444cdcacd.zip
FreeBSD-src-6b92cff93be2b7ae83deb340b753b02444cdcacd.tar.gz
Vendor import of the Intel ACPI CA 200200404 drop.
Diffstat (limited to 'sys/contrib/dev/acpica/tbinstal.c')
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c50
1 files changed, 29 insertions, 21 deletions
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index 7198a0c..819c6ce 100644
--- a/sys/contrib/dev/acpica/tbinstal.c
+++ b/sys/contrib/dev/acpica/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 55 $
+ * $Revision: 57 $
*
*****************************************************************************/
@@ -276,31 +276,39 @@ AcpiTbRecognizeTable (
* We only "recognize" a limited number of ACPI tables -- namely, the
* ones that are used by the subsystem (DSDT, FADT, etc.)
*
- * An AE_NOT_FOUND means that the table was not recognized.
+ * An AE_TABLE_NOT_SUPPORTED means that the table was not recognized.
* This can be any one of many valid ACPI tables, it just isn't one of
* the tables that is consumed by the core subsystem
*/
Status = AcpiTbMatchSignature (TableHeader->Signature, TableInfo);
- if (ACPI_SUCCESS (Status))
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiTbValidateTableHeader (TableHeader);
+ if (ACPI_FAILURE (Status))
{
- /* Return the table type and length via the info struct */
+ return_ACPI_STATUS (Status);
+ }
- TableInfo->Length = TableHeader->Length;
+ /* Return the table type and length via the info struct */
- /*
- * Validate checksum for _most_ tables,
- * even the ones whose signature we don't recognize
- */
- if (TableInfo->Type != ACPI_TABLE_FACS)
+ TableInfo->Length = TableHeader->Length;
+
+ /*
+ * Validate checksum for _most_ tables,
+ * even the ones whose signature we don't recognize
+ */
+ if (TableInfo->Type != ACPI_TABLE_FACS)
+ {
+ Status = AcpiTbVerifyTableChecksum (TableHeader);
+ if (ACPI_FAILURE (Status) &&
+ (!ACPI_CHECKSUM_ABORT))
{
- Status = AcpiTbVerifyTableChecksum (TableHeader);
- if (ACPI_FAILURE (Status) &&
- (!ACPI_CHECKSUM_ABORT))
- {
- /* Ignore the error if configuration says so */
+ /* Ignore the error if configuration says so */
- Status = AE_OK;
- }
+ Status = AE_OK;
}
}
@@ -484,10 +492,6 @@ AcpiTbDeleteAcpiTable (
return;
}
- /* Free the table */
-
- AcpiTbFreeAcpiTablesOfType (&AcpiGbl_AcpiTables[Type]);
-
/* Clear the appropriate "typed" global table pointer */
switch (Type)
@@ -518,6 +522,10 @@ AcpiTbDeleteAcpiTable (
break;
}
+ /* Free the table */
+
+ AcpiTbFreeAcpiTablesOfType (&AcpiGbl_AcpiTables[Type]);
+
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_VOID;
}
OpenPOWER on IntegriCloud