WIP
Change-Id: I6e2f63c3de4729defd7927c34c29d69a8203d19a
diff --git a/kernel/lib/acpi_lite/acpi_lite.cpp b/kernel/lib/acpi_lite/acpi_lite.cpp
index 8ae4008..f149862 100644
--- a/kernel/lib/acpi_lite/acpi_lite.cpp
+++ b/kernel/lib/acpi_lite/acpi_lite.cpp
@@ -13,7 +13,6 @@
#define LOCAL_TRACE 1
-
// global state of the acpi lite library
struct acpi_lite_state {
const acpi_rsdp *rsdp;
@@ -217,8 +216,8 @@
return;
}
- printf("root table:\n");
- hexdump(acpi.sdt, acpi.sdt->header.length);
+ //printf("root table:\n");
+ //hexdump(acpi.sdt, acpi.sdt->header.length);
// walk the table list
for (size_t i = 0; i < acpi.num_tables; i++) {
@@ -227,8 +226,9 @@
continue;
}
- printf("table %zu:\n", i);
- hexdump(header, header->length);
+ printf("table %zu: '%c%c%c%c' len %u\n", i, header->sig[0], header->sig[1],
+ header->sig[2], header->sig[3], header->length);
+ //hexdump(header, header->length);
}
}
diff --git a/kernel/platform/pc/acpi.cpp b/kernel/platform/pc/acpi.cpp
index 0f72ff2..8cf93bc 100644
--- a/kernel/platform/pc/acpi.cpp
+++ b/kernel/platform/pc/acpi.cpp
@@ -18,6 +18,7 @@
#include <acpica/acpi.h>
+#if 0
#define ACPI_MAX_INIT_TABLES 32
static ACPI_TABLE_DESC acpi_tables[ACPI_MAX_INIT_TABLES];
static bool acpi_initialized = false;
@@ -75,6 +76,7 @@
*end = records_end;
return ZX_OK;
}
+#endif
/* @brief Enumerate all functioning CPUs and their APIC IDs
*
@@ -102,13 +104,13 @@
[apic_ids, &count, len](const void* _entry, size_t entry_len) {
auto entry = static_cast<const acpi_madt_local_apic_entry*>(_entry);
- LTRACEF("MADT entry %p: processor id %d apic id %d flags %#x\n",
- entry, entry->processor_id, entry->apic_id, entry->flags);
-
if ((entry->flags & ACPI_MADT_FLAG_ENABLED) == 0) {
return;
}
+ LTRACEF("MADT entry %p: processor id %d apic id %d flags %#x\n",
+ entry, entry->processor_id, entry->apic_id, entry->flags);
+
if (apic_ids != NULL && count < len) {
apic_ids[count] = entry->apic_id;
}
@@ -239,9 +241,6 @@
* @return ZX_OK on success.
*/
zx_status_t platform_find_hpet(struct acpi_hpet_descriptor* hpet) {
-
-
-
#if 0
ACPI_TABLE_HEADER* table = NULL;
ACPI_STATUS status = AcpiGetTable((char*)ACPI_SIG_HPET, 1, &table);
@@ -268,7 +267,8 @@
default:
return ZX_ERR_NOT_SUPPORTED;
}
+ return ZX_OK;
#endif
- return ZX_OK;
+ return ZX_ERR_NOT_SUPPORTED;
}