1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +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:
Andreas Kling 2021-02-19 18:41:50 +01:00
parent 32e93c8808
commit fdf03852c9
22 changed files with 69 additions and 68 deletions

View file

@ -32,12 +32,12 @@
namespace Kernel {
FullDevice::FullDevice()
UNMAP_AFTER_INIT FullDevice::FullDevice()
: CharacterDevice(1, 7)
{
}
FullDevice::~FullDevice()
UNMAP_AFTER_INIT FullDevice::~FullDevice()
{
}

View file

@ -33,7 +33,7 @@ namespace Kernel {
static I8042Controller* s_the;
void I8042Controller::initialize()
UNMAP_AFTER_INIT void I8042Controller::initialize()
{
if (ACPI::Parser::the()->have_8042())
new I8042Controller;
@ -45,7 +45,7 @@ I8042Controller& I8042Controller::the()
return *s_the;
}
I8042Controller::I8042Controller()
UNMAP_AFTER_INIT I8042Controller::I8042Controller()
{
ASSERT(!s_the);
s_the = this;

View file

@ -42,12 +42,12 @@ NullDevice& NullDevice::the()
return *s_the;
}
NullDevice::NullDevice()
UNMAP_AFTER_INIT NullDevice::NullDevice()
: CharacterDevice(1, 3)
{
}
NullDevice::~NullDevice()
UNMAP_AFTER_INIT NullDevice::~NullDevice()
{
}

View file

@ -29,12 +29,12 @@
namespace Kernel {
RandomDevice::RandomDevice()
UNMAP_AFTER_INIT RandomDevice::RandomDevice()
: CharacterDevice(1, 8)
{
}
RandomDevice::~RandomDevice()
UNMAP_AFTER_INIT RandomDevice::~RandomDevice()
{
}

View file

@ -30,12 +30,12 @@
namespace Kernel {
ZeroDevice::ZeroDevice()
UNMAP_AFTER_INIT ZeroDevice::ZeroDevice()
: CharacterDevice(1, 5)
{
}
ZeroDevice::~ZeroDevice()
UNMAP_AFTER_INIT ZeroDevice::~ZeroDevice()
{
}