Kernel: Slap a handful more things with UNMAP_AFTER_INIT
This commit is contained in:
parent
4f0be55770
commit
cc0f5917d3
Notes:
sideshowbarker
2024-07-18 22:08:33 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cc0f5917d31
7 changed files with 15 additions and 15 deletions
|
@ -2049,7 +2049,7 @@ void Processor::Processor::halt()
|
|||
halt_this();
|
||||
}
|
||||
|
||||
void Processor::deferred_call_pool_init()
|
||||
UNMAP_AFTER_INIT void Processor::deferred_call_pool_init()
|
||||
{
|
||||
size_t pool_count = sizeof(m_deferred_call_pool) / sizeof(m_deferred_call_pool[0]);
|
||||
for (size_t i = 0; i < pool_count; i++) {
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Kernel {
|
|||
|
||||
static AK::Singleton<NullDevice> s_the;
|
||||
|
||||
void NullDevice::initialize()
|
||||
UNMAP_AFTER_INIT void NullDevice::initialize()
|
||||
{
|
||||
s_the.ensure_instance();
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ void E1000NetworkAdapter::handle_irq(const RegisterState&)
|
|||
out32(REG_INTERRUPT_MASK_SET, INTERRUPT_LSC | INTERRUPT_RXT0 | INTERRUPT_RXO);
|
||||
}
|
||||
|
||||
void E1000NetworkAdapter::detect_eeprom()
|
||||
UNMAP_AFTER_INIT void E1000NetworkAdapter::detect_eeprom()
|
||||
{
|
||||
out32(REG_EEPROM, 0x1);
|
||||
for (int i = 0; i < 999; ++i) {
|
||||
|
@ -276,7 +276,7 @@ void E1000NetworkAdapter::detect_eeprom()
|
|||
m_has_eeprom = false;
|
||||
}
|
||||
|
||||
u32 E1000NetworkAdapter::read_eeprom(u8 address)
|
||||
UNMAP_AFTER_INIT u32 E1000NetworkAdapter::read_eeprom(u8 address)
|
||||
{
|
||||
u16 data = 0;
|
||||
u32 tmp = 0;
|
||||
|
@ -293,7 +293,7 @@ u32 E1000NetworkAdapter::read_eeprom(u8 address)
|
|||
return data;
|
||||
}
|
||||
|
||||
void E1000NetworkAdapter::read_mac_address()
|
||||
UNMAP_AFTER_INIT void E1000NetworkAdapter::read_mac_address()
|
||||
{
|
||||
if (m_has_eeprom) {
|
||||
MACAddress mac {};
|
||||
|
@ -317,7 +317,7 @@ bool E1000NetworkAdapter::link_up()
|
|||
return (in32(REG_STATUS) & STATUS_LU);
|
||||
}
|
||||
|
||||
void E1000NetworkAdapter::initialize_rx_descriptors()
|
||||
UNMAP_AFTER_INIT void E1000NetworkAdapter::initialize_rx_descriptors()
|
||||
{
|
||||
auto* rx_descriptors = (e1000_tx_desc*)m_rx_descriptors_region->vaddr().as_ptr();
|
||||
for (size_t i = 0; i < number_of_rx_descriptors; ++i) {
|
||||
|
@ -338,7 +338,7 @@ void E1000NetworkAdapter::initialize_rx_descriptors()
|
|||
out32(REG_RCTRL, RCTL_EN | RCTL_SBP | RCTL_UPE | RCTL_MPE | RCTL_LBM_NONE | RTCL_RDMTS_HALF | RCTL_BAM | RCTL_SECRC | RCTL_BSIZE_8192);
|
||||
}
|
||||
|
||||
void E1000NetworkAdapter::initialize_tx_descriptors()
|
||||
UNMAP_AFTER_INIT void E1000NetworkAdapter::initialize_tx_descriptors()
|
||||
{
|
||||
auto* tx_descriptors = (e1000_tx_desc*)m_tx_descriptors_region->vaddr().as_ptr();
|
||||
for (size_t i = 0; i < number_of_tx_descriptors; ++i) {
|
||||
|
|
|
@ -282,7 +282,7 @@ void RTL8139NetworkAdapter::reset()
|
|||
out16(REG_ISR, 0xffff);
|
||||
}
|
||||
|
||||
void RTL8139NetworkAdapter::read_mac_address()
|
||||
UNMAP_AFTER_INIT void RTL8139NetworkAdapter::read_mac_address()
|
||||
{
|
||||
MACAddress mac {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace Kernel {
|
|||
#define PCI_Mass_Storage_Class 0x1
|
||||
#define PCI_IDE_Controller_Subclass 0x1
|
||||
|
||||
NonnullOwnPtr<IDEChannel> IDEChannel::create(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
UNMAP_AFTER_INIT NonnullOwnPtr<IDEChannel> IDEChannel::create(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
{
|
||||
return make<IDEChannel>(controller, io_group, type, force_pio);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ RefPtr<StorageDevice> IDEChannel::slave_device() const
|
|||
return m_slave;
|
||||
}
|
||||
|
||||
IDEChannel::IDEChannel(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
UNMAP_AFTER_INIT IDEChannel::IDEChannel(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
: IRQHandler(type == ChannelType::Primary ? PATA_PRIMARY_IRQ : PATA_SECONDARY_IRQ)
|
||||
, m_channel_type(type)
|
||||
, m_io_group(io_group)
|
||||
|
@ -153,7 +153,7 @@ void IDEChannel::clear_pending_interrupts() const
|
|||
m_io_group.io_base().offset(ATA_REG_STATUS).in<u8>();
|
||||
}
|
||||
|
||||
IDEChannel::~IDEChannel()
|
||||
UNMAP_AFTER_INIT IDEChannel::~IDEChannel()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ void IDEChannel::complete_current_request(AsyncDeviceRequest::RequestResult resu
|
|||
});
|
||||
}
|
||||
|
||||
void IDEChannel::initialize(bool force_pio)
|
||||
UNMAP_AFTER_INIT void IDEChannel::initialize(bool force_pio)
|
||||
{
|
||||
m_parent_controller->enable_pin_based_interrupts();
|
||||
|
||||
|
@ -368,7 +368,7 @@ String IDEChannel::channel_type_string() const
|
|||
return "Secondary";
|
||||
}
|
||||
|
||||
void IDEChannel::detect_disks()
|
||||
UNMAP_AFTER_INIT void IDEChannel::detect_disks()
|
||||
{
|
||||
auto channel_string = [](u8 i) -> const char* {
|
||||
if (i == 0)
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Syscall {
|
|||
|
||||
static int handle(RegisterState&, u32 function, u32 arg1, u32 arg2, u32 arg3);
|
||||
|
||||
void initialize()
|
||||
UNMAP_AFTER_INIT void initialize()
|
||||
{
|
||||
register_user_callable_interrupt_handler(syscall_vector, syscall_asm_entry);
|
||||
klog() << "Syscall: int 0x82 handler installed";
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define IRQ_TIMER 0
|
||||
namespace Kernel {
|
||||
|
||||
NonnullRefPtr<PIT> PIT::initialize(Function<void(const RegisterState&)> callback)
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<PIT> PIT::initialize(Function<void(const RegisterState&)> callback)
|
||||
{
|
||||
return adopt(*new PIT(move(callback)));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue