diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-29 21:38:33 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-29 21:38:33 -0500 |
| commit | b456c928fecf78157270b052e441a427f06afdda (patch) | |
| tree | 2dbea485a392789fc67aa590f8a7afb9f263be3c /src/modules/HPET/Config.h | |
| parent | bb303088aa2ed0693e19e93158155dd85783ce76 (diff) | |
feat: kernel: Introduce Vet.h, better Ref.h, and more improved containers for better kernel code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/modules/HPET/Config.h')
| -rw-r--r-- | src/modules/HPET/Config.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/modules/HPET/Config.h b/src/modules/HPET/Config.h new file mode 100644 index 00000000..9d1d9155 --- /dev/null +++ b/src/modules/HPET/Config.h @@ -0,0 +1,39 @@ +/* ======================================== + + Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. + + File: HPET.h + Purpose: HPET builtin. + + Revision History: + +======================================== */ + +#pragma once + +#include <NeKit/Config.h> +#include <modules/ACPI/ACPI.h> + +namespace Kernel { +struct PACKED HPETAddressStructure final { + Kernel::UInt8 AddressSpaceId; // 0 - system memory, 1 - system I/O + Kernel::UInt8 RegisterBitWidth; + Kernel::UInt8 RegisterBitOffset; + Kernel::UInt8 Reserved; + Kernel::UInt64 Address; +}; + +struct PACKED HPETHeader final : public SDT { + Kernel::UInt8 HardwareRevId; + Kernel::UInt8 ComparatorCount : 5; + Kernel::UInt8 CounterSize : 1; + Kernel::UInt8 Reserved : 1; + Kernel::UInt8 LegacyReplacement : 1; + Kernel::UInt16 PciVendorId; + HPETAddressStructure Address; + Kernel::UInt8 HpetNumber; + Kernel::UInt16 MinimumTick; + Kernel::UInt8 PageProtection; +}; + +} // namespace Kernel |
