aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/acpi/acpi.c4
-rw-r--r--src/kernel/acpi/acpi.h22
2 files changed, 18 insertions, 8 deletions
diff --git a/src/kernel/acpi/acpi.c b/src/kernel/acpi/acpi.c
index bb4bdac..893b28e 100644
--- a/src/kernel/acpi/acpi.c
+++ b/src/kernel/acpi/acpi.c
@@ -156,7 +156,9 @@ int acpi_install() {
} // Else: DSDT invalid
}
if (memcmp((unsigned int *) *ptr, "HPET", 4) == 0) {
- serial_write("WHOA - found HPET!!!\n");
+ hpet = (struct HPET *) *ptr;
+ serial_write(hpet->signature);
+ serial_write_hex((int) hpet->base_address);
}
ptr++;
} // Else: no valid FADT present
diff --git a/src/kernel/acpi/acpi.h b/src/kernel/acpi/acpi.h
index f4dd049..31b4841 100644
--- a/src/kernel/acpi/acpi.h
+++ b/src/kernel/acpi/acpi.h
@@ -18,16 +18,16 @@ void reboot();
void acpi_poweroff();
struct RSDPtr {
- char Signature[8];
- char CheckSum;
- char OemID[6];
- char Revision;
+ char signature[8];
+ char checksum;
+ char oem_id[6];
+ char revision;
uint32_t *rsdt_address;
};
struct FADT {
- char Signature[4];
- uint32_t Length;
+ char signature[4];
+ uint32_t length;
char unneded1[40 - 8];
uint32_t *DSDT;
char unneded2[48 - 44];
@@ -43,6 +43,14 @@ struct FADT {
char century;
};
-extern struct FADT *fadt;
+struct HPET {
+ char signature[4];
+ char unneeded[36];
+ char base_address[12];
+};
+
+struct FADT *fadt;
+
+struct HPET *hpet;
#endif