[syslinux:master] ACPI: Adding MCFG support
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Sun Feb 6 14:08:02 PST 2011
Commit-ID: c6e2eb83837b33c226119f971bee949396356701
Gitweb: http://syslinux.zytor.com/commit/c6e2eb83837b33c226119f971bee949396356701
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Mon, 31 Jan 2011 22:14:16 +0100
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Mon, 31 Jan 2011 22:14:16 +0100
ACPI: Adding MCFG support
---
com32/gplinclude/acpi/acpi.h | 2 ++
com32/gplinclude/acpi/{hpet.h => mcfg.h} | 10 +++++-----
com32/gpllib/acpi/acpi.c | 7 +++++++
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 8b9bec4..8126809 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -33,6 +33,7 @@ void dbg_printf(const char *fmt, ...);
#include <acpi/facs.h>
#include <acpi/hpet.h>
#include <acpi/tcpa.h>
+#include <acpi/mcfg.h>
enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
@@ -80,6 +81,7 @@ typedef struct {
s_facs facs;
s_hpet hpet;
s_tcpa tcpa;
+ s_mcfg mcfg;
} s_acpi;
int parse_acpi(s_acpi * acpi);
diff --git a/com32/gplinclude/acpi/hpet.h b/com32/gplinclude/acpi/mcfg.h
similarity index 89%
copy from com32/gplinclude/acpi/hpet.h
copy to com32/gplinclude/acpi/mcfg.h
index 99dea6a..8c67315 100644
--- a/com32/gplinclude/acpi/hpet.h
+++ b/com32/gplinclude/acpi/mcfg.h
@@ -10,20 +10,20 @@
*
* ----------------------------------------------------------------------- */
-#ifndef HPET_H
-#define HPET_H
+#ifndef MCFG_H
+#define MCFG_H
#include <inttypes.h>
#include <stdbool.h>
-#define HPET "HPET"
+#define MCFG "MCFG"
-enum { HPET_TABLE_FOUND = 1 };
+enum { MCFG_TABLE_FOUND = 1 };
typedef struct {
uint64_t *address;
s_acpi_description_header header;
/* What's inside ? */
bool valid;
-} s_hpet;
+} s_mcfg;
#endif
diff --git a/com32/gpllib/acpi/acpi.c b/com32/gpllib/acpi/acpi.c
index ba53239..55c6d1a 100644
--- a/com32/gpllib/acpi/acpi.c
+++ b/com32/gpllib/acpi/acpi.c
@@ -214,6 +214,13 @@ bool parse_header(uint64_t *address, s_acpi *acpi) {
t->valid = true;
t->address = address;
memcpy(&t->header, &adh, sizeof(adh));
+ } else if (memcmp(adh.signature, MCFG, sizeof(MCFG) - 1) == 0) {
+ DEBUG_PRINT(("MCFG table found\n"));
+ s_mcfg *m = &acpi->mcfg;
+ /* This structure is valid, let's fill it */
+ m->valid = true;
+ m->address = address;
+ memcpy(&m->header, &adh, sizeof(adh));
}
More information about the Syslinux-commits
mailing list