1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

Kernel: Replace IRQHandler with the new InterruptHandler class

System components that need an IRQ handling are now inheriting the
InterruptHandler class.

In addition to that, the initialization process of PATAChannel was
changed to fit the changes.
PATAChannel, E1000NetworkAdapter and RTL8139NetworkAdapter are now
inheriting from PCI::Device instead of InterruptHandler directly.
This commit is contained in:
Liav A 2020-01-21 13:23:03 +02:00 committed by Andreas Kling
parent 1ee37245cd
commit 6c72736b26
29 changed files with 193 additions and 169 deletions

View file

@ -101,8 +101,14 @@ extern "C" [[noreturn]] void init()
bool text_debug = KParams::the().has("text_debug");
gdt_init();
idt_init();
setup_acpi();
// Sample test to see if the ACPI parser is working...
kprintf("ACPI: HPET table @ P 0x%x\n", ACPIParser::the().find_table("HPET"));
new VFS;
new DebugLogDevice;
@ -114,8 +120,6 @@ extern "C" [[noreturn]] void init()
RTC::initialize();
PIC::initialize();
gdt_init();
idt_init();
// call global constructors after gtd and itd init
for (ctor_func_t* ctor = &start_ctors; ctor < &end_ctors; ctor++)
@ -136,9 +140,6 @@ extern "C" [[noreturn]] void init()
new VirtualConsole(1);
VirtualConsole::switch_to(0);
// Sample test to see if the ACPI parser is working...
kprintf("ACPI: HPET table @ P 0x%x\n", ACPIParser::the().find_table("HPET"));
PCI::Initializer::the().test_and_initialize(KParams::the().has("nopci_mmio"));
PCI::Initializer::the().dismiss();
@ -171,7 +172,6 @@ extern "C" [[noreturn]] void init()
LoopbackAdapter::the();
auto e1000 = E1000NetworkAdapter::autodetect();
auto rtl8139 = RTL8139NetworkAdapter::autodetect();
Process::initialize();
Thread::initialize();
@ -231,7 +231,7 @@ void init_stage2()
hang();
}
auto pata0 = PATAChannel::create(PATAChannel::ChannelType::Primary, force_pio);
auto pata0 = PATAChannel::autodetect(PATAChannel::ChannelType::Primary, force_pio);
NonnullRefPtr<DiskDevice> root_dev = *pata0->master_device();
root = root.substring(strlen("/dev/hda"), root.length() - strlen("/dev/hda"));