Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Currently I am still using the PIC but the PIC only delivers interrupts to the BSP. I would like to ditch the PIC and go with the IO APIC instead since it can send interrupts to any available CPU Core in the system.
I have taken a look at the Intel manuals, OSDev articles, and some of the posts here but can't find a good step-by-step guide.
; Enable the system for Symmetric I/O Mode as per MPS 1.4
mov al, 0x70 ; Select the IMCR register
out 0x22, al
mov al, 0x01 ; Instruct NMIs and 8259 INTs to go through APIC
out 0x23, al
Not much there yet as I still need to figure out what to do with LINT0 and LINT1. Do I need to completely mask the PIC after this? Does the above code need to be run on each CPU Core (I would think not)? Does anyone have experience getting your own OS out of PIC Mode and into Symmetric I/O Mode?
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Haven't got much experience with the IO APIC, but I guess you have to set the redirection table entries. In an ACPI system, ISA IRQ numbers correspond directly to GSI numbers, while in non-ACPI systems, you have to parse the MP table, as I understand it.
This stosd thing you have in your code seems awkward, by the way, when you could just do this: