[syslinux:master] ACPI: Adding BOOT support
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Sun Feb 6 14:08:08 PST 2011
Commit-ID: d27025ba52145c1b4119a8d5920137ffb35bc5f4
Gitweb: http://syslinux.zytor.com/commit/d27025ba52145c1b4119a8d5920137ffb35bc5f4
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Mon, 31 Jan 2011 22:28:45 +0100
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Mon, 31 Jan 2011 22:28:45 +0100
ACPI: Adding BOOT support
---
com32/gplinclude/acpi/acpi.h | 2 ++
com32/gplinclude/acpi/{tcpa.h => boot.h} | 10 +++++-----
com32/gpllib/acpi/acpi.c | 11 ++++++++---
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 3884762..94589f3 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -35,6 +35,7 @@ void dbg_printf(const char *fmt, ...);
#include <acpi/tcpa.h>
#include <acpi/mcfg.h>
#include <acpi/slic.h>
+#include <acpi/boot.h>
enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
@@ -85,6 +86,7 @@ typedef struct {
s_tcpa tcpa;
s_mcfg mcfg;
s_slic slic;
+ s_boot boot;
} s_acpi;
int parse_acpi(s_acpi * acpi);
diff --git a/com32/gplinclude/acpi/tcpa.h b/com32/gplinclude/acpi/boot.h
similarity index 89%
copy from com32/gplinclude/acpi/tcpa.h
copy to com32/gplinclude/acpi/boot.h
index 82b2879..a79c0d0 100644
--- a/com32/gplinclude/acpi/tcpa.h
+++ b/com32/gplinclude/acpi/boot.h
@@ -10,20 +10,20 @@
*
* ----------------------------------------------------------------------- */
-#ifndef TCPA_H
-#define TCPA_H
+#ifndef BOOT_H
+#define BOOT_H
#include <inttypes.h>
#include <stdbool.h>
-#define TCPA "TCPA"
+#define BOOT "BOOT"
-enum { TCPA_TABLE_FOUND = 1 };
+enum { BOOT_TABLE_FOUND = 1 };
typedef struct {
uint64_t *address;
s_acpi_description_header header;
/* What's inside ? */
bool valid;
-} s_tcpa;
+} s_boot;
#endif
diff --git a/com32/gpllib/acpi/acpi.c b/com32/gpllib/acpi/acpi.c
index 7670d16..8e5ee29 100644
--- a/com32/gpllib/acpi/acpi.c
+++ b/com32/gpllib/acpi/acpi.c
@@ -228,9 +228,14 @@ bool parse_header(uint64_t *address, s_acpi *acpi) {
s->valid = true;
s->address = address;
memcpy(&s->header, &adh, sizeof(adh));
+ } else if (memcmp(adh.signature, BOOT, sizeof(BOOT) - 1) == 0) {
+ DEBUG_PRINT(("BOOT table found\n"));
+ s_boot *b = &acpi->boot;
+ /* This structure is valid, let's fill it */
+ b->valid = true;
+ b->address = address;
+ memcpy(&b->header, &adh, sizeof(adh));
}
-
-
-
+
return true;
}
More information about the Syslinux-commits
mailing list