aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib/acpi/acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/gpllib/acpi/acpi.c')
-rw-r--r--com32/gpllib/acpi/acpi.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/com32/gpllib/acpi/acpi.c b/com32/gpllib/acpi/acpi.c
index a87e472f..911fd168 100644
--- a/com32/gpllib/acpi/acpi.c
+++ b/com32/gpllib/acpi/acpi.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 2006 Erwan Velu - All Rights Reserved
+ * Copyright 2009 Erwan Velu - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -36,24 +36,12 @@ void init_acpi(s_acpi * acpi)
memset(acpi, 0, sizeof(s_acpi));
}
-int search_acpi(s_acpi * acpi)
+int parse_acpi(s_acpi * acpi)
{
+ int ret_val;
init_acpi(acpi);
- struct e820entry map[E820MAX];
- struct e820entry nm[E820MAX];
- int count = 0;
- detect_memory_e820(map, E820MAX, &count);
- /* Clean up, adjust and copy the BIOS-supplied E820-map. */
- int nr = sanitize_e820_map(map, nm, count);
- for (int i = 0; i < nr; i++) {
- /* Type is ACPI Reclaim */
- if (nm[i].type == E820_ACPI) {
- acpi->base_address = nm[i].addr;
- acpi->size = nm[i].size;
- acpi->acpi_valid = true;
- return ACPI_FOUND;
- }
- }
- return -ENO_ACPI;
+ /* Let's seach for RSDT table */
+ if ((ret_val = search_rsdp(acpi)) != RSDP_TABLE_FOUND)
+ return ret_val;
}