Extend the IRQ scheme to allow allocation of all available interrupt vectors.
irq: scheme by:
- keeping the legacy IRQs (0-15) the same: they are opened without
O_CREAT, but not listed.
- adding the "extended IRQs" (16-224), by adding a "reserved vectors" bitmap to the IDT. Some vectors still won't be allocatable, notably IRQ 96 (vector 0x80 for software interrupts) and IPIs. These are opened with
O_CREAT, and when opened, they reserve that vector so that it won't be listed again. These are all reserved during IDT initialization. Note that the IRQ numbers here are simply the IDT vector number, minus 32 (the CPU exceptions).
- implementing directory listing, which lists the IRQs that are not reserved.
- adding the
bspfile, which fetches the APIC ID of the bootstrap processor. While this doesn't enable MSI/MSI-X on its own, it allows drivers like
xhcidto map the MSI-X vectors, and then set the APIC ID and allocated interrupt vector.
I also got the APIC timer working, but I'll include that in another MR when the correct frequencies are calibrated etc.