aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-12-01 00:08:15 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:19:00 +0100
commit5db2da81b19f13b183737e119df33c0024c3d1ee (patch)
treeed40c044a2f849cb209b2f851308efef281afdf7 /com32/gplinclude
parent2390a80f8e5c3a70f4ddc44bd53166fbc1f9f62b (diff)
downloadsyslinux-5db2da81b19f13b183737e119df33c0024c3d1ee.tar.gz
syslinux-5db2da81b19f13b183737e119df33c0024c3d1ee.tar.xz
syslinux-5db2da81b19f13b183737e119df33c0024c3d1ee.zip
acpi: more work on the madt structures
Impact: under dev. Fixing madt structure & parsing
Diffstat (limited to 'com32/gplinclude')
-rw-r--r--com32/gplinclude/acpi/acpi.h26
-rw-r--r--com32/gplinclude/acpi/madt.h55
2 files changed, 60 insertions, 21 deletions
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 979c454d..53e5b674 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -14,25 +14,9 @@
#define ACPI_H
#include <inttypes.h>
#include <stdbool.h>
+#include <acpi/madt.h>
-enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT};
-
-#define WORD(x) (uint16_t)(*(const uint16_t *)(x))
-#define DWORD(x) (uint32_t)(*(const uint32_t *)(x))
-#define QWORD(x) (*(const uint64_t *)(x))
-
-typedef struct {
- int8_t signature[4+1];
- int32_t length;
- int8_t revision;
- int8_t checksum;
- int8_t oem_id[6+1];
- int8_t oem_table_id[8+1];
- int32_t oem_revision;
- int8_t creator_id[4+1];
- int32_t creator_revision;
- uint32_t local_apic_address;
-} s_madt;
+enum { ACPI_FOUND, ENO_ACPI, MADT_FOUND, ENO_MADT };
typedef struct {
s_madt madt;
@@ -42,7 +26,7 @@ typedef struct {
bool acpi_valid;
} s_acpi;
-int search_acpi(s_acpi *acpi);
-int search_madt(s_acpi *acpi);
-void print_madt(s_acpi *acpi);
+int search_acpi(s_acpi * acpi);
+int search_madt(s_acpi * acpi);
+void print_madt(s_acpi * acpi);
#endif
diff --git a/com32/gplinclude/acpi/madt.h b/com32/gplinclude/acpi/madt.h
new file mode 100644
index 00000000..30969f29
--- /dev/null
+++ b/com32/gplinclude/acpi/madt.h
@@ -0,0 +1,55 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2006 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 MADT_H
+#define MADT_H
+#include <inttypes.h>
+#include <stdbool.h>
+
+enum {
+ PROCESSOR_LOCAL_APIC = 0,
+ IO_APIC = 1,
+ INTERRUPT_SOURCE_OVERRIDE = 2,
+ NMI = 3,
+ LOCAL_APIC_NMI_STRUCTURE = 4,
+ LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE = 5,
+ IO_SAPIC = 6,
+ LOCAL_SAPIC = 7,
+ PLATEFORM_INTERRUPT_SOURCES = 8
+};
+
+#define MAX_SLP 255
+
+typedef struct {
+ uint8_t length;
+ uint8_t acpi_id;
+ uint8_t apic_id;
+ uint32_t flags;
+} s_processor_local_apic;
+
+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;
+ uint32_t local_apic_address;
+ uint32_t flags;
+ s_processor_local_apic processor_local_apic[MAX_SLP];
+ uint8_t processor_local_apic_count;
+} s_madt;
+
+#endif