aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-09-06 13:15:14 +0200
committerMarvin Borner2020-09-06 13:15:14 +0200
commitc2d88b639c759e06444c1bf0efdd96e243d3a6c2 (patch)
tree72d933526dab390fcc0c1125e15ecf6b223b893b /kernel/inc
parentc0608f199fc711aa82867f80059dfeebf38b4a25 (diff)
Started ACPI driver
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/acpi.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel/inc/acpi.h b/kernel/inc/acpi.h
new file mode 100644
index 0000000..f620d55
--- /dev/null
+++ b/kernel/inc/acpi.h
@@ -0,0 +1,42 @@
+// MIT License, Copyright (c) 2020 Marvin Borner
+
+#ifndef ACPI_H
+#define ACPI_H
+
+#include <def.h>
+
+#define RSDP_MAGIC "RSD PTR "
+#define RSDT_MAGIC "RSDT"
+
+struct sdt_header {
+ char signature[4];
+ u32 length;
+ u8 revision;
+ u8 checksum;
+ char oem_id[6];
+ char oem_table_id[8];
+ u32 oem_revision;
+ u32 creator_id;
+ u32 creator_revision;
+};
+
+struct sdp_header {
+ char signature[8];
+ u8 checksum;
+ char oem_id[6];
+ u8 revision;
+};
+
+struct rsdt {
+ struct sdt_header header;
+ u32 sdt_pointer[];
+};
+
+struct rsdp {
+ struct sdp_header header;
+ struct rsdt *rsdt;
+};
+
+void acpi_install();
+
+#endif