[syslinux:master] ACPI: Adding TCPA support

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Sun Feb 6 14:07:55 PST 2011


Commit-ID:  b55c988dcca34d43ffba87adb604925a91f20496
Gitweb:     http://syslinux.zytor.com/commit/b55c988dcca34d43ffba87adb604925a91f20496
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Mon, 31 Jan 2011 22:01:26 +0100
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Mon, 31 Jan 2011 22:02:30 +0100

ACPI: Adding TCPA support



---
 com32/gplinclude/acpi/acpi.h             |    2 ++
 com32/gplinclude/acpi/{hpet.h => tcpa.h} |    8 ++++----
 com32/gpllib/acpi/acpi.c                 |    8 ++++++++
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/com32/gplinclude/acpi/acpi.h b/com32/gplinclude/acpi/acpi.h
index 490fbca..8b9bec4 100644
--- a/com32/gplinclude/acpi/acpi.h
+++ b/com32/gplinclude/acpi/acpi.h
@@ -32,6 +32,7 @@ void dbg_printf(const char *fmt, ...);
 #include <acpi/ecdt.h>
 #include <acpi/facs.h>
 #include <acpi/hpet.h>
+#include <acpi/tcpa.h>
 
 enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
 
@@ -78,6 +79,7 @@ typedef struct {
     s_ecdt ecdt;
     s_facs facs;
     s_hpet hpet;
+    s_tcpa tcpa;
 } s_acpi;
 
 int parse_acpi(s_acpi * acpi);
diff --git a/com32/gplinclude/acpi/hpet.h b/com32/gplinclude/acpi/tcpa.h
similarity index 91%
copy from com32/gplinclude/acpi/hpet.h
copy to com32/gplinclude/acpi/tcpa.h
index 99dea6a..a7ec376 100644
--- a/com32/gplinclude/acpi/hpet.h
+++ b/com32/gplinclude/acpi/tcpa.h
@@ -10,20 +10,20 @@
  *
  * ----------------------------------------------------------------------- */
 
-#ifndef HPET_H
-#define HPET_H
+#ifndef TCPA_H
+#define TCPA_H
 #include <inttypes.h>
 #include <stdbool.h>
 
 #define HPET "HPET"
 
-enum { HPET_TABLE_FOUND = 1 };
+enum { TCPA_TABLE_FOUND = 1 };
 
 typedef struct {
     uint64_t *address;
     s_acpi_description_header header;
     /* What's inside ? */
     bool valid;
-} s_hpet;
+} s_tcpa;
 
 #endif
diff --git a/com32/gpllib/acpi/acpi.c b/com32/gpllib/acpi/acpi.c
index 68af84a..ba53239 100644
--- a/com32/gpllib/acpi/acpi.c
+++ b/com32/gpllib/acpi/acpi.c
@@ -207,7 +207,15 @@ bool parse_header(uint64_t *address, s_acpi *acpi) {
 		h->valid = true;
 		h->address = address;
 		memcpy(&h->header, &adh, sizeof(adh));
+	    } else if (memcmp(adh.signature, TCPA, sizeof(TCPA) - 1) == 0) {
+		DEBUG_PRINT(("TCPA table found\n"));
+		s_tcpa *t = &acpi->tcpa;
+		/* This structure is valid, let's fill it */
+		t->valid = true;
+		t->address = address;
+		memcpy(&t->header, &adh, sizeof(adh));
 	    }
 
+
 	    return true;
 }



More information about the Syslinux-commits mailing list