use ioapic and 8259a simultaneously

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.
Post Reply
watermirror
Member
Member
Posts: 25
Joined: Tue Nov 05, 2013 4:06 am

use ioapic and 8259a simultaneously

Post by watermirror »

hi.
if it possible to use ioapic and 8259a pic simultaneously?
my bsp initialized the ioapic. but i want one ap use 8259a.
by the way, my bsp and ap run different kernel.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: use ioapic and 8259a simultaneously

Post by Brendan »

Hi,
watermirror wrote:if it possible to use ioapic and 8259a pic simultaneously?
In theory, it is possible to use the IO APIC and PIC chips at the same time. In practice; ACPI's AML doesn't support it and it's something I'd expect to have a "higher than normal" risk of problems (e.g. motherboards that don't work properly); and the advantages (typically none) don't justify the increased complexity or the risk of potential problems.
watermirror wrote:my bsp initialized the ioapic. but i want one ap use 8259a.
I don't think that's possible. The PIC chips were never designed to support multi-CPU and I doubt there's any (reliable) way to get the PIC chip's IRQs routed to any AP.
watermirror wrote:by the way, my bsp and ap run different kernel.
In that case, if a kernel needs the PIC chips (for some unknown and likely dubious reason) then run it on the BSP, and run the kernel that uses the IO APIC on the AP. That would at least solve some of the many problems.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
fluray
Posts: 9
Joined: Thu May 15, 2014 2:04 am

Re: use ioapic and 8259a simultaneously

Post by fluray »

Only bsp can receive 8259a interrupt request, ap will ignore it, ap only accept io apic.
watermirror
Member
Member
Posts: 25
Joined: Tue Nov 05, 2013 4:06 am

Re: use ioapic and 8259a simultaneously

Post by watermirror »

fluray wrote:Only bsp can receive 8259a interrupt request, ap will ignore it, ap only accept io apic.
hi, could you tell me how could this happen?
watermirror
Member
Member
Posts: 25
Joined: Tue Nov 05, 2013 4:06 am

Re: use ioapic and 8259a simultaneously

Post by watermirror »

In that case, if a kernel needs the PIC chips (for some unknown and likely dubious reason) then run it on the BSP, and run the kernel that uses the IO APIC on the AP. That would at least solve some of the many problems.
hi, Brendan
could you tell me what are the problems?
User avatar
fluray
Posts: 9
Joined: Thu May 15, 2014 2:04 am

Re: use ioapic and 8259a simultaneously

Post by fluray »

watermirror wrote:
fluray wrote:Only bsp can receive 8259a interrupt request, ap will ignore it, ap only accept io apic.
hi, could you tell me how could this happen?
As shown in Figure:
Image
It is bad when both open 8259 PIC and IO APIC, 8259 PIC overlapping functions with IO APIC interrupt request will be submitted twice in the BSP.
There are situations :
An interrupt request is sent to the BSP, another interrupt request is sent to AP
May cause conflicts when these interrupt handler shared variables.
...
Post Reply