]> err.no Git - linux-2.6/blobdiff - drivers/acpi/tables/tbutils.c
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
[linux-2.6] / drivers / acpi / tables / tbutils.c
index 54e53e619e6b9fe3c2666e0cda8d20c76af308e1..1da64b4518c0b390fab3a4a65625ca92b75cf32b 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,6 +52,29 @@ static acpi_physical_address
 acpi_tb_get_root_table_entry(u8 * table_entry,
                             acpi_native_uint table_entry_size);
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_tables_loaded
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      TRUE if required ACPI tables are loaded
+ *
+ * DESCRIPTION: Determine if the minimum required ACPI tables are present
+ *              (FADT, FACS, DSDT)
+ *
+ ******************************************************************************/
+
+u8 acpi_tb_tables_loaded(void)
+{
+
+       if (acpi_gbl_root_table_list.count >= 3) {
+               return (TRUE);
+       }
+
+       return (FALSE);
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_print_table_header
@@ -74,15 +97,15 @@ acpi_tb_print_table_header(acpi_physical_address address,
 
                /* FACS only has signature and length fields of common table header */
 
-               ACPI_INFO((AE_INFO, "%4.4s @ 0x%p/0x%04X",
-                          header->signature, ACPI_CAST_PTR(void, address),
+               ACPI_INFO((AE_INFO, "%4.4s %08lX, %04X",
+                          header->signature, (unsigned long)address,
                           header->length));
        } else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) {
 
                /* RSDP has no common fields */
 
-               ACPI_INFO((AE_INFO, "RSDP @ 0x%p/0x%04X (v%3.3d %6.6s)",
-                          ACPI_CAST_PTR(void, address),
+               ACPI_INFO((AE_INFO, "RSDP %08lX, %04X (r%d %6.6s)",
+                          (unsigned long)address,
                           (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
                            revision >
                            0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
@@ -95,8 +118,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
                /* Standard ACPI table with full common header */
 
                ACPI_INFO((AE_INFO,
-                          "%4.4s @ 0x%p/0x%04X (v%3.3d %6.6s %8.8s 0x%08X %4.4s 0x%08X)",
-                          header->signature, ACPI_CAST_PTR(void, address),
+                          "%4.4s %08lX, %04X (r%d %6.6s %8.8s %8X %4.4s %8X)",
+                          header->signature, (unsigned long)address,
                           header->length, header->revision, header->oem_id,
                           header->oem_table_id, header->oem_revision,
                           header->asl_compiler_id,
@@ -280,7 +303,7 @@ acpi_tb_get_root_table_entry(u8 * table_entry,
 #if ACPI_MACHINE_WIDTH == 32
                if (address64 > ACPI_UINT32_MAX) {
 
-                       /* Will truncate 64-bit address to 32 bits */
+                       /* Will truncate 64-bit address to 32 bits, issue warning */
 
                        ACPI_WARNING((AE_INFO,
                                      "64-bit Physical Address in XSDT is too large (%8.8X%8.8X), truncating",
@@ -462,49 +485,3 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
 
        return_ACPI_STATUS(AE_OK);
 }
-
-/******************************************************************************
- *
- * FUNCTION:    acpi_tb_map
- *
- * PARAMETERS:  Address             - Address to be mapped
- *              Length              - Length to be mapped
- *              Flags               - Logical or physical addressing mode
- *
- * RETURN:      Pointer to mapped region
- *
- * DESCRIPTION: Maps memory according to flag
- *
- *****************************************************************************/
-
-void *acpi_tb_map(acpi_physical_address address, u32 length, u32 flags)
-{
-
-       if (flags == ACPI_TABLE_ORIGIN_MAPPED) {
-               return (acpi_os_map_memory(address, length));
-       } else {
-               return (ACPI_CAST_PTR(void, address));
-       }
-}
-
-/******************************************************************************
- *
- * FUNCTION:    acpi_tb_unmap
- *
- * PARAMETERS:  Pointer             - To mapped region
- *              Length              - Length to be unmapped
- *              Flags               - Logical or physical addressing mode
- *
- * RETURN:      None
- *
- * DESCRIPTION: Unmaps memory according to flag
- *
- *****************************************************************************/
-
-void acpi_tb_unmap(void *pointer, u32 length, u32 flags)
-{
-
-       if (flags == ACPI_TABLE_ORIGIN_MAPPED) {
-               acpi_os_unmap_memory(pointer, length);
-       }
-}