summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/tbutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/tbutils.c')
-rw-r--r--sys/contrib/dev/acpica/tbutils.c97
1 files changed, 5 insertions, 92 deletions
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index 8ccbd2b..72df10a 100644
--- a/sys/contrib/dev/acpica/tbutils.c
+++ b/sys/contrib/dev/acpica/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 54 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -218,7 +218,8 @@ AcpiTbValidateTableHeader (
"Table signature at %p [%p] has invalid characters\n",
TableHeader, &Signature));
- ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n", (char *) &Signature));
+ ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n",
+ (char *) &Signature));
ACPI_DUMP_BUFFER (TableHeader, sizeof (ACPI_TABLE_HEADER));
return (AE_BAD_SIGNATURE);
}
@@ -231,7 +232,8 @@ AcpiTbValidateTableHeader (
"Invalid length in table header %p name %4.4s\n",
TableHeader, (char *) &Signature));
- ACPI_REPORT_WARNING (("Invalid table header length (0x%X) found\n", TableHeader->Length));
+ ACPI_REPORT_WARNING (("Invalid table header length (0x%X) found\n",
+ TableHeader->Length));
ACPI_DUMP_BUFFER (TableHeader, sizeof (ACPI_TABLE_HEADER));
return (AE_BAD_HEADER);
}
@@ -242,95 +244,6 @@ AcpiTbValidateTableHeader (
/*******************************************************************************
*
- * FUNCTION: AcpiTbMapAcpiTable
- *
- * PARAMETERS: PhysicalAddress - Physical address of table to map
- * *Size - Size of the table. If zero, the size
- * from the table header is used.
- * Actual size is returned here.
- * **LogicalAddress - Logical address of mapped table
- *
- * RETURN: Logical address of the mapped table.
- *
- * DESCRIPTION: Maps the physical address of table into a logical address
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiTbMapAcpiTable (
- ACPI_PHYSICAL_ADDRESS PhysicalAddress,
- ACPI_SIZE *Size,
- ACPI_TABLE_HEADER **LogicalAddress)
-{
- ACPI_TABLE_HEADER *Table;
- ACPI_SIZE TableSize = *Size;
- ACPI_STATUS Status = AE_OK;
-
-
- ACPI_FUNCTION_NAME ("TbMapAcpiTable");
-
-
- /* If size is zero, look at the table header to get the actual size */
-
- if ((*Size) == 0)
- {
- /* Get the table header so we can extract the table length */
-
- Status = AcpiOsMapMemory (PhysicalAddress, sizeof (ACPI_TABLE_HEADER),
- (void **) &Table);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- /* Extract the full table length before we delete the mapping */
-
- TableSize = (ACPI_SIZE) Table->Length;
-
-#if 0
-/* We don't want to validate the header here. */
- /*
- * Validate the header and delete the mapping.
- * We will create a mapping for the full table below.
- */
- Status = AcpiTbValidateTableHeader (Table);
-#endif
-
- /* Always unmap the memory for the header */
-
- AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
-
-#if 0
- /* Exit if header invalid */
-
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-#endif
- }
-
- /* Map the physical memory for the correct length */
-
- Status = AcpiOsMapMemory (PhysicalAddress, TableSize,
- (void **) &Table);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Mapped memory for ACPI table, length=%d(%X) at %p\n",
- TableSize, TableSize, Table));
-
- *Size = TableSize;
- *LogicalAddress = Table;
- return (Status);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiTbVerifyTableChecksum
*
* PARAMETERS: *TableHeader - ACPI table to verify
OpenPOWER on IntegriCloud