mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Kernel: Slap UNMAP_AFTER_INIT on a whole bunch of functions
There's no real system here, I just added it to various functions that I don't believe we ever want to call after initialization has finished. With these changes, we're able to unmap 60 KiB of kernel text after init. :^)
This commit is contained in:
parent
32e93c8808
commit
fdf03852c9
22 changed files with 69 additions and 68 deletions
|
@ -36,7 +36,7 @@ namespace Kernel {
|
|||
|
||||
#define APIC_TIMER_MEASURE_CPU_CLOCK
|
||||
|
||||
APICTimer* APICTimer::initialize(u8 interrupt_number, HardwareTimerBase& calibration_source)
|
||||
UNMAP_AFTER_INIT APICTimer* APICTimer::initialize(u8 interrupt_number, HardwareTimerBase& calibration_source)
|
||||
{
|
||||
auto* timer = new APICTimer(interrupt_number, nullptr);
|
||||
if (!timer->calibrate(calibration_source)) {
|
||||
|
@ -46,13 +46,13 @@ APICTimer* APICTimer::initialize(u8 interrupt_number, HardwareTimerBase& calibra
|
|||
return timer;
|
||||
}
|
||||
|
||||
APICTimer::APICTimer(u8 interrupt_number, Function<void(const RegisterState&)> callback)
|
||||
UNMAP_AFTER_INIT APICTimer::APICTimer(u8 interrupt_number, Function<void(const RegisterState&)> callback)
|
||||
: HardwareTimer<GenericInterruptHandler>(interrupt_number, move(callback))
|
||||
{
|
||||
disable_remap();
|
||||
}
|
||||
|
||||
bool APICTimer::calibrate(HardwareTimerBase& calibration_source)
|
||||
UNMAP_AFTER_INIT bool APICTimer::calibrate(HardwareTimerBase& calibration_source)
|
||||
{
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue