summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/tbinstal.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/tbinstal.c')
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c61
1 files changed, 26 insertions, 35 deletions
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index 24a0915..7286124 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: 61 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -142,7 +142,8 @@
ACPI_STATUS
AcpiTbMatchSignature (
NATIVE_CHAR *Signature,
- ACPI_TABLE_DESC *TableInfo)
+ ACPI_TABLE_DESC *TableInfo,
+ UINT8 SearchType)
{
NATIVE_UINT i;
@@ -155,6 +156,11 @@ AcpiTbMatchSignature (
*/
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
+ if ((AcpiGbl_AcpiTableData[i].Flags & ACPI_TABLE_TYPE_MASK) != SearchType)
+ {
+ continue;
+ }
+
if (!ACPI_STRNCMP (Signature, AcpiGbl_AcpiTableData[i].Signature,
AcpiGbl_AcpiTableData[i].SigLength))
{
@@ -165,13 +171,18 @@ AcpiTbMatchSignature (
TableInfo->Type = (UINT8) i;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Signature match %4.4s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Table [%4.4s] matched and is a required ACPI table\n",
(char *) AcpiGbl_AcpiTableData[i].Signature));
return_ACPI_STATUS (AE_OK);
}
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Table [%4.4s] is not a required ACPI table - ignored\n",
+ (char *) Signature));
+
return_ACPI_STATUS (AE_TABLE_NOT_SUPPORTED);
}
@@ -180,7 +191,7 @@ AcpiTbMatchSignature (
*
* FUNCTION: AcpiTbInstallTable
*
- * PARAMETERS: TableInfo - Return value from AcpiTbGetTable
+ * PARAMETERS: TableInfo - Return value from AcpiTbGetTableBody
*
* RETURN: Status
*
@@ -199,27 +210,24 @@ AcpiTbInstallTable (
ACPI_FUNCTION_TRACE ("TbInstallTable");
- /*
- * Check the table signature and make sure it is recognized
- * Also checks the header checksum
- */
- Status = AcpiTbRecognizeTable (TableInfo);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
/* Lock tables while installing */
Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES);
if (ACPI_FAILURE (Status))
{
+ ACPI_REPORT_ERROR (("Could not acquire table mutex for [%4.4s], %s\n",
+ TableInfo->Pointer->Signature, AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
}
/* Install the table into the global data structure */
Status = AcpiTbInitTableDescriptor (TableInfo->Type, TableInfo);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_REPORT_ERROR (("Could not install ACPI table [%s], %s\n",
+ TableInfo->Pointer->Signature, AcpiFormatException (Status)));
+ }
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s located at %p\n",
AcpiGbl_AcpiTableData[TableInfo->Type].Name, TableInfo->Pointer));
@@ -233,7 +241,7 @@ AcpiTbInstallTable (
*
* FUNCTION: AcpiTbRecognizeTable
*
- * PARAMETERS: TableInfo - Return value from AcpiTbGetTable
+ * PARAMETERS: TableInfo - Return value from AcpiTbGetTableBody
*
* RETURN: Status
*
@@ -251,7 +259,8 @@ AcpiTbInstallTable (
ACPI_STATUS
AcpiTbRecognizeTable (
- ACPI_TABLE_DESC *TableInfo)
+ ACPI_TABLE_DESC *TableInfo,
+ UINT8 SearchType)
{
ACPI_TABLE_HEADER *TableHeader;
ACPI_STATUS Status;
@@ -276,7 +285,7 @@ AcpiTbRecognizeTable (
* 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);
+ Status = AcpiTbMatchSignature (TableHeader->Signature, TableInfo, SearchType);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -292,24 +301,6 @@ AcpiTbRecognizeTable (
TableInfo->Length = (ACPI_SIZE) 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_CHECKSUM_ABORT)
- if (ACPI_FAILURE (Status))
- {
- /* Ignore the error if configuration says so */
-
- Status = AE_OK;
- }
-#endif
- }
-
return_ACPI_STATUS (Status);
}
OpenPOWER on IntegriCloud