From d126ebf73370fbc64913aa6ff19db56a39f625b2 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 15 May 2025 18:42:59 +0200 Subject: feat(kernel): pushing the fixes regarding the scheduler, and working on making the LAPIC work correctly. Signed-off-by: Amlal El Mahrouss --- dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc') diff --git a/dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc b/dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc index 66f27c24..2fc18e2f 100644 --- a/dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc +++ b/dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc @@ -16,6 +16,11 @@ */ namespace Kernel::HAL { +Void hal_get_msr(UInt32 msr, UInt32* lo, UInt32* hi) noexcept { + if (!lo || !hi) return; + asm volatile("rdmsr" : "=a"(*lo), "=d"(*hi) : "c"(msr)); +} + Void hal_set_msr(UInt32 msr, UInt32 lo, UInt32 hi) noexcept { asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr)); } -- cgit v1.2.3