[syslinux:master] ACPI: Adding SLIC support
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Sun Feb 6 14:08:05 PST 2011
Commit-ID: 34c4821049e15b4c2402e908ec4a60f449974ef0
Gitweb: http://syslinux.zytor.com/commit/34c4821049e15b4c2402e908ec4a60f449974ef0
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Mon, 31 Jan 2011 22:21:05 +0100
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Mon, 31 Jan 2011 22:21:05 +0100
ACPI: Adding SLIC support
---
com32/gplinclude/acpi/acpi.h | 3 +++
com32/gplinclude/acpi/{tcpa.h => slic.h} | 10 +++++-----
com32/gpllib/acpi/acpi.c | 8 ++++++++
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 8126809..3884762 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -34,6 +34,7 @@ void dbg_printf(const char *fmt, ...);
#include <acpi/hpet.h>
#include <acpi/tcpa.h>
#include <acpi/mcfg.h>
+#include <acpi/slic.h>
enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
@@ -61,6 +62,7 @@ enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
#define WDAT "WDAT"
#define WDRT "WDRT"
#define WSPT "WSPT"
+#define SLIC "SLIC"
/* This macro are used to extract ACPI structures
* please be careful about the q (interator) naming */
@@ -82,6 +84,7 @@ typedef struct {
s_hpet hpet;
s_tcpa tcpa;
s_mcfg mcfg;
+ s_slic slic;
} s_acpi;
int parse_acpi(s_acpi * acpi);
diff --git a/com32/gplinclude/acpi/tcpa.h b/com32/gplinclude/acpi/slic.h
similarity index 89%
copy from com32/gplinclude/acpi/tcpa.h
copy to com32/gplinclude/acpi/slic.h
index 82b2879..2c7627d 100644
--- a/com32/gplinclude/acpi/tcpa.h
+++ b/com32/gplinclude/acpi/slic.h
@@ -10,20 +10,20 @@
*
* ----------------------------------------------------------------------- */
-#ifndef TCPA_H
-#define TCPA_H
+#ifndef SLIC_H
+#define SLIC_H
#include <inttypes.h>
#include <stdbool.h>
-#define TCPA "TCPA"
+#define SLIC "SLIC"
-enum { TCPA_TABLE_FOUND = 1 };
+enum { SLIC_TABLE_FOUND = 1 };
typedef struct {
uint64_t *address;
s_acpi_description_header header;
/* What's inside ? */
bool valid;
-} s_tcpa;
+} s_slic;
#endif
diff --git a/com32/gpllib/acpi/acpi.c b/com32/gpllib/acpi/acpi.c
index 55c6d1a..7670d16 100644
--- a/com32/gpllib/acpi/acpi.c
+++ b/com32/gpllib/acpi/acpi.c
@@ -221,8 +221,16 @@ bool parse_header(uint64_t *address, s_acpi *acpi) {
m->valid = true;
m->address = address;
memcpy(&m->header, &adh, sizeof(adh));
+ } else if (memcmp(adh.signature, SLIC, sizeof(SLIC) - 1) == 0) {
+ DEBUG_PRINT(("SLIC table found\n"));
+ s_slic *s = &acpi->slic;
+ /* This structure is valid, let's fill it */
+ s->valid = true;
+ s->address = address;
+ memcpy(&s->header, &adh, sizeof(adh));
}
+
return true;
}
More information about the Syslinux-commits
mailing list