#include <acpi/sbst.h>
#include <acpi/ecdt.h>
#include <acpi/facs.h>
+#include <acpi/hpet.h>
enum { ACPI_FOUND = 1, ENO_ACPI = 2 , MADT_FOUND = 3 , ENO_MADT = 4 };
s_sbst sbst;
s_ecdt ecdt;
s_facs facs;
+ s_hpet hpet;
} s_acpi;
int parse_acpi(s_acpi * acpi);
--- /dev/null
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2009-2011 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 HPET_H
+#define HPET_H
+#include <inttypes.h>
+#include <stdbool.h>
+
+#define HPET "HPET"
+
+enum { HPET_TABLE_FOUND = 1 };
+
+typedef struct {
+ uint64_t *address;
+ s_acpi_description_header header;
+ /* What's inside ? */
+ bool valid;
+} s_hpet;
+
+#endif
e->address = address;
memcpy(&e->header, &adh, sizeof(adh));
parse_ecdt(e);
+ } else if (memcmp(adh.signature, HPET, sizeof(HPET) - 1) == 0) {
+ DEBUG_PRINT(("HPET table found\n"));
+ s_hpet *h = &acpi->hpet;
+ /* This structure is valid, let's fill it */
+ h->valid = true;
+ h->address = address;
+ memcpy(&h->header, &adh, sizeof(adh));
}
+
return true;
}