diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-24 10:38:36 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-24 10:38:36 +0100 |
| commit | 7b4bd3577a31d0f0adc7371840642791ae1567f4 (patch) | |
| tree | 1a8afc973aaa739d0d763315cad2fd376d1cea9c /dev/Mod/HPET | |
ADD: Open version, with important changes kept out.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Mod/HPET')
| -rw-r--r-- | dev/Mod/HPET/.gitkeep | 0 | ||||
| -rw-r--r-- | dev/Mod/HPET/Defines.h | 42 |
2 files changed, 42 insertions, 0 deletions
diff --git a/dev/Mod/HPET/.gitkeep b/dev/Mod/HPET/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/dev/Mod/HPET/.gitkeep diff --git a/dev/Mod/HPET/Defines.h b/dev/Mod/HPET/Defines.h new file mode 100644 index 00000000..79f44794 --- /dev/null +++ b/dev/Mod/HPET/Defines.h @@ -0,0 +1,42 @@ +/* ------------------------------------------- + + Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. + + File: HPET.h + Purpose: HPET builtin. + + Revision History: + +------------------------------------------- */ + +#pragma once + +#include <NewKit/Defines.h> +#include <Mod/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 |
