[kernel] Add HPET support, create clock class

Create a clock class which can be queried for current timestamp in
nanoseconds. Also implements a simple HPET class as one possible clock
source.

Tags: time
This commit is contained in:
Justin C. Miller
2020-06-28 17:47:46 -07:00
parent 9b67f87062
commit 6c468a134b
13 changed files with 347 additions and 36 deletions

View File

@@ -188,3 +188,13 @@ struct acpi_mcfg
acpi_mcfg_entry entries[0];
} __attribute__ ((packed));
struct acpi_hpet
{
TABLE_HEADER('HPET');
uint32_t hardware_id;
acpi_gas base_address;
uint8_t index;
uint16_t periodic_min;
uint8_t attributes;
} __attribute__ ((packed));