aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/acpi/acpi.h
diff options
context:
space:
mode:
Diffstat (limited to 'com32/gplinclude/acpi/acpi.h')
-rw-r--r--com32/gplinclude/acpi/acpi.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 53e5b674..4a83fbd1 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 2006 Erwan Velu - All Rights Reserved
+ * Copyright 2009 Erwan Velu - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,19 +14,23 @@
#define ACPI_H
#include <inttypes.h>
#include <stdbool.h>
+#include <acpi/rsdp.h>
#include <acpi/madt.h>
enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
+/* This macro are used to extract ACPI structures
+ * please be careful about the q (interator) naming */
+#define cp_struct(dest) memcpy(dest,q,sizeof(*dest)); q+=sizeof(*dest)
+#define cp_str_struct(dest) memcpy(dest,q,sizeof(dest)-1); dest[sizeof(dest)-1]=0;q+=sizeof(dest)-1
+
typedef struct {
+ s_rsdp rsdp;
s_madt madt;
- uint64_t base_address;
- uint64_t size;
- bool madt_valid;
- bool acpi_valid;
} s_acpi;
-int search_acpi(s_acpi * acpi);
+int parse_acpi(s_acpi * acpi);
int search_madt(s_acpi * acpi);
+int search_rsdp(s_acpi * acpi);
void print_madt(s_acpi * acpi);
#endif