diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-15 18:42:59 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-15 18:42:59 +0200 |
| commit | d126ebf73370fbc64913aa6ff19db56a39f625b2 (patch) | |
| tree | db66ede0635b1a6a5f13b8f7e161b68ed631226b /dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc | |
| parent | 6a30f42d5dcd0f944262147b2806db6c14fe7ffc (diff) | |
feat(kernel): pushing the fixes regarding the scheduler, and working on
making the LAPIC work correctly.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalProcessorAMD64.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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)); } |
