aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-09-06 15:45:48 +0200
committerMarvin Borner2020-09-06 15:45:48 +0200
commit2876d92663be7f1b46d72217e79b9f83d1756fd8 (patch)
tree2b31be5198b8081a032454acb9ef0909ef70a988 /kernel/inc
parenta35b6b09b90da7180e3c1321abb313d581f9530c (diff)
ARGH structs
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/acpi.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/kernel/inc/acpi.h b/kernel/inc/acpi.h
index 2b4c76e..498384e 100644
--- a/kernel/inc/acpi.h
+++ b/kernel/inc/acpi.h
@@ -16,7 +16,7 @@ struct address_structure {
u8 register_bit_width;
u8 register_bit_offset;
u8 reserved;
- u64 address;
+ u32 phys; // Actually u64
};
struct sdt_header {
@@ -68,6 +68,49 @@ struct hpet {
u8 page_protection;
};
+struct hpet_registers {
+ struct {
+ u8 revision;
+ u8 comparator_count : 5;
+ u8 counter_size : 1;
+ u8 reserved : 1;
+ u8 legacy_replacement : 1;
+ u16 pci_vendor_id;
+ u32 tick_period;
+ } features;
+ u64 reserved1;
+ struct {
+ u8 enable : 1;
+ u8 legacy_replacement : 1;
+ u64 reserved : 62;
+ } config;
+ u64 reserved2;
+ struct {
+ u32 status; // For timer #n
+ u32 reserved;
+ } int_status;
+ u8 reserved3[200]; // Why?!
+ u32 counter;
+ u32 counter_high; // 0 due to 64 bit
+ u64 reserved4;
+ struct {
+ u8 reserved1 : 1;
+ u8 type : 1;
+ u8 enable : 1;
+ u8 periodic : 1;
+ u8 periodic_support : 1;
+ u8 size : 1; // 1 if 64 bit
+ u8 set_accumulator : 1;
+ u8 reserved2 : 1;
+ u8 force_32 : 1; // For 64 bit
+ u8 apic_routing : 5;
+ u8 fsb : 1;
+ u8 fsb_support : 1;
+ u16 reserved3;
+ u32 routing_capability;
+ } timer;
+};
+
struct rsdp {
struct sdp_header header;
struct rsdt *rsdt;
@@ -78,5 +121,6 @@ struct fadt *fadt;
struct hpet *hpet;
void acpi_install();
+void hpet_install();
#endif