I found this site, where there is an explanation about Advanced Programmable Interrupt Controller (APIC): APIC - OSDev Wiki. I haven't tried it yet but I think it might be helpful for you.
Have a nice day!
Was the previous suggestion helpful? If you still have questions please let us know so that we may continue to assist you.