summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-18 15:15:52 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-18 15:15:52 +0200
commit0266d8058990a496b935abd76417abcfe4e9cffd (patch)
treedb4ffa8b49575ff2f81b98d3dfc078d87a4eb2f5 /dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
parent163f32fbfbfa2fb0744787769fb3d4865f57d8dd (diff)
dev(sched): Improvements and work in progress fixes.
what? - The main algorithm got improved for real time tasks, and SMP usage. - The SMP usage was present before, I just reintroduced it after realizing that it won't scale well from what I have right now. - Also removed weird implementations quirks from previous sketch. - Such as the core 0 being reserved for the boot core. - Also moved FS init code after IDT initalization. - To avoid weird FS format behavior. - Wrap HPET signature in a macro. next? - Work on the HAL's userspace transition mechanism. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalTimerAMD64.cc')
-rw-r--r--dev/kernel/HALKit/AMD64/HalTimerAMD64.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc b/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
index 79165289..13573880 100644
--- a/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
+++ b/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
@@ -17,6 +17,8 @@
// timer slot 0
+#define kHPETSignature ("HPET")
+
#define kHPETCounterRegValue (0x00)
#define kHPETConfigRegValue (0x20)
#define kHPETCompRegValue (0x24)
@@ -46,7 +48,7 @@ using namespace Kernel;
HardwareTimer::HardwareTimer(UInt64 ms) : fWaitFor(ms) {
auto power = PowerFactoryInterface(kHandoverHeader->f_HardwareTables.f_VendorPtr);
- auto hpet = (Detail::HPET_BLOCK*) power.Find("HPET").Leak().Leak();
+ auto hpet = (Detail::HPET_BLOCK*) power.Find(kHPETSignature).Leak().Leak();
MUST_PASS(hpet);
fDigitalTimer = (UInt8*) hpet->address.Address;