aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-12-02 14:24:17 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:19:01 +0100
commit4558b351e2720d91bd2847afb74a28e19d0d0028 (patch)
tree08b6217fa344bf03800eaeae35f7ed504d68b52b /com32/gplinclude
parent8568d8f61de52309ba471f787800d11c5837aa0b (diff)
downloadsyslinux-4558b351e2720d91bd2847afb74a28e19d0d0028.tar.gz
syslinux-4558b351e2720d91bd2847afb74a28e19d0d0028.tar.xz
syslinux-4558b351e2720d91bd2847afb74a28e19d0d0028.zip
acpi: Adding xsdt
Impact: Adding XSDT Adding XSDT
Diffstat (limited to 'com32/gplinclude')
-rw-r--r--com32/gplinclude/acpi/acpi.h5
-rw-r--r--com32/gplinclude/acpi/structs.h35
-rw-r--r--com32/gplinclude/acpi/xsdt.h28
3 files changed, 67 insertions, 1 deletions
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 98f10638..a8005d1b 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -18,6 +18,7 @@
#include <acpi/rsdp.h>
#include <acpi/rsdt.h>
#include <acpi/madt.h>
+#include <acpi/xsdt.h>
enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
@@ -29,6 +30,7 @@ enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
typedef struct {
s_rsdp rsdp;
s_rsdt rsdt;
+ s_xsdt xsdt;
s_madt madt;
} s_acpi;
@@ -36,6 +38,7 @@ int parse_acpi(s_acpi * acpi);
int search_madt(s_acpi * acpi);
int search_rsdp(s_acpi * acpi);
int parse_rsdt(s_acpi * acpi);
+int parse_xsdt(s_acpi * acpi);
void print_madt(s_acpi * acpi);
-uint8_t *get_acpi_description_header(uint8_t *q, s_acpi_description_header * adh);
+void get_acpi_description_header(uint8_t *q, s_acpi_description_header * adh);
#endif
diff --git a/com32/gplinclude/acpi/structs.h b/com32/gplinclude/acpi/structs.h
new file mode 100644
index 00000000..b5e17728
--- /dev/null
+++ b/com32/gplinclude/acpi/structs.h
@@ -0,0 +1,35 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * 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
+ * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+ * Boston MA 02111-1307, USA; either version 2 of the License, or
+ * (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+#ifndef ACPI_STRUCTS_H
+#define ACPI_STRUCTS_H
+#include <inttypes.h>
+#include <stdbool.h>
+
+/* This value define the real size of the acpi structure
+ * Our is bigger as we manage the \0 of strings
+ * */
+#define ACPI_HEADER_SIZE 36
+
+typedef struct {
+ uint8_t signature[4 + 1];
+ uint32_t length;
+ uint8_t revision;
+ uint8_t checksum;
+ uint8_t oem_id[6 + 1];
+ uint8_t oem_table_id[8 + 1];
+ uint32_t oem_revision;
+ uint8_t creator_id[4 + 1];
+ uint32_t creator_revision;
+} s_acpi_description_header;
+
+#endif
diff --git a/com32/gplinclude/acpi/xsdt.h b/com32/gplinclude/acpi/xsdt.h
new file mode 100644
index 00000000..7a08dbf7
--- /dev/null
+++ b/com32/gplinclude/acpi/xsdt.h
@@ -0,0 +1,28 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * 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
+ * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+ * Boston MA 02111-1307, USA; either version 2 of the License, or
+ * (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+#ifndef XSDT_H
+#define XSDT_H
+#include <inttypes.h>
+#include <stdbool.h>
+
+enum { XSDT_TABLE_FOUND };
+
+typedef struct {
+ uint32_t address;
+ s_acpi_description_header header;
+ uint64_t entry[255];
+ uint8_t entry_count;
+ bool valid;
+} s_xsdt;
+
+#endif