feat: HWP scaling, C1E, closed-loop thermal governor for Intel CPUs

This commit is contained in:
2026-07-05 10:51:11 +02:00
parent daa17a325f
commit 70702a21b0
19 changed files with 903 additions and 9 deletions
+6
View File
@@ -33,6 +33,7 @@
#include <Graphics/Framebuffer.hpp>
#include <Hal/MSR.hpp>
#include <Hal/Cpu.hpp>
#include <Hal/CpuPower.hpp>
#include <Fs/Boot.hpp>
#include <Sched/Scheduler.hpp>
#include <Ipc/Ipc.hpp>
@@ -148,6 +149,11 @@ extern "C" void kmain() {
// ISR stubs use SWAPGS which requires GS base to point to CpuData.
Smp::InitBsp();
// Enable hardware P-state scaling and the thermal governor.
// Needs GS base (per-CPU data) set up, and must run before the
// APs boot so they inherit the shared policy in ApEntry.
Hal::CpuPower::InitializeBsp();
// Now safe to enable interrupts (SWAPGS-aware ISR stubs are installed)
asm volatile("sti");