I had a great time enabling kolibri on my relatively new laptop.
First I tried kolibri.efi from the latest
autobuild. It booted but no devices worked except mouse and keyboard.
Then I prepared DEVICES.DAT file using
devman by
Serge and put the file to /DRIVERS/ directory. It booted but even mouse and keyboard didn't work.
It turned out that my laptop has two I/O APICs, what kolibri didn't expect. While parsing MADT table kolibri put the base address of the first I/O APIC to a variable, and then overwrote the variable with the base address of the second I/O APIC. Thus the first one was never set up properly.
Another issue was that kolibri didn't expect more than 24 interrupts. My laptop has two I/O APICs: one for 24 interrupts and another for 32, i.e. 56 total. It was not enough to just replace 24 with 56 in the corresponding macro because the active interrupt was indicated using a bitmask set/reset via bts/btr instructions, and 56 bits don't fit a single dword. I replaced bts/btr with functions.
It is interesting that our int 0x40 has the same vector as IRQ0x20 at the moment. In theory, I/O APIC can be programmed to map IRQs 0-0x1f to vectors IRQ+0x20, and IRQs 0x20+ to vectors IRQ+0x21. I didn't implement this, good luck.
I committed support for more than one I/O APIC and more than 24 interrupts in
r7733. For PIC mode nothing should change.
PCIDEV program has been updated accordingly.
Unfortunately, neither ethernet nor sound cards work for me. However sata disks do work in native mode using
ahci driver.