feat: HWP scaling, C1E, closed-loop thermal governor for Intel CPUs
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user