2 ms·
You've gotta do that remapping anyway when you enable the APIC. See: https://wiki.osdev.org/APIC https://wiki.osdev.org/APIC > masking all interrupts and remap
by ModernMech 8y ago
You've gotta do that remapping anyway when you enable the APIC. See: https://wiki.osdev.org/APIC https://wiki.osdev.org/APIC
> masking all interrupts and remapping the IRQs. Masking all interrupts disables them in the PIC. Remapping is what you probably already did when you used the PIC: you want interrupt requests to start at 32 instead of 0 to avoid conflicts with the exceptions. You should then avoid using these interrupt vectors for other purposes. This is necessary because even though you masked all interrupts on the PIC, it could still give out spurious interrupts which will then be misinterpreted from your kernel as exceptions.
- ajross 8y agoTwo different remappings for two different devices. It doesn't matter what you did with the 8259 once you disable it (which is like two IO instructions). Might as well do it all once is my point.
- steveklabnik 8y agoThe point of this series is to learn, so I think going through the legacy system first and then showing the newer one can make sense, it depends entirely on your objectives. This path is what I've seen out of 99% of hobby OS tutorials I've read.