aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-12-02 13:04:12 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:19:00 +0100
commit1e26ac19c45916b231507f28397d19582e80270b (patch)
tree0fababe070a964dbe5e50de841386b72c1e521ae /com32/gplinclude
parent58540b871674824167937ed16fe32597e7e6f516 (diff)
downloadsyslinux-1e26ac19c45916b231507f28397d19582e80270b.tar.gz
syslinux-1e26ac19c45916b231507f28397d19582e80270b.tar.xz
syslinux-1e26ac19c45916b231507f28397d19582e80270b.zip
acpi: Adding rsdt, cleaning structures
Impact: adding rsdt Adding RSDT
Diffstat (limited to 'com32/gplinclude')
-rw-r--r--com32/gplinclude/acpi/acpi.h5
-rw-r--r--com32/gplinclude/acpi/madt.h11
-rw-r--r--com32/gplinclude/acpi/rsdt.h28
3 files changed, 35 insertions, 9 deletions
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 4a83fbd1..98f10638 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -14,7 +14,9 @@
#define ACPI_H
#include <inttypes.h>
#include <stdbool.h>
+#include <acpi/structs.h>
#include <acpi/rsdp.h>
+#include <acpi/rsdt.h>
#include <acpi/madt.h>
enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
@@ -26,11 +28,14 @@ enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
typedef struct {
s_rsdp rsdp;
+ s_rsdt rsdt;
s_madt madt;
} s_acpi;
int parse_acpi(s_acpi * acpi);
int search_madt(s_acpi * acpi);
int search_rsdp(s_acpi * acpi);
+int parse_rsdt(s_acpi * acpi);
void print_madt(s_acpi * acpi);
+uint8_t *get_acpi_description_header(uint8_t *q, s_acpi_description_header * adh);
#endif
diff --git a/com32/gplinclude/acpi/madt.h b/com32/gplinclude/acpi/madt.h
index cb623a48..324ccd06 100644
--- a/com32/gplinclude/acpi/madt.h
+++ b/com32/gplinclude/acpi/madt.h
@@ -14,6 +14,7 @@
#define MADT_H
#include <inttypes.h>
#include <stdbool.h>
+#include <acpi/acpi.h>
enum {
PROCESSOR_LOCAL_APIC = 0,
@@ -38,15 +39,7 @@ typedef struct {
typedef struct {
uint32_t address;
- 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 header;
uint32_t local_apic_address;
uint32_t flags;
s_processor_local_apic processor_local_apic[MAX_SLP];
diff --git a/com32/gplinclude/acpi/rsdt.h b/com32/gplinclude/acpi/rsdt.h
new file mode 100644
index 00000000..1b6850f1
--- /dev/null
+++ b/com32/gplinclude/acpi/rsdt.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 RSDT_H
+#define RSDT_H
+#include <inttypes.h>
+#include <stdbool.h>
+
+enum { RSDT_TABLE_FOUND };
+
+typedef struct {
+ uint32_t address;
+ s_acpi_description_header header;
+ uint32_t entry[255];
+ uint8_t entry_count;
+ bool valid;
+} s_rsdt;
+
+#endif