x86 SMP 2 core cpu, dedicate each core to a specific process

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
thassan1977
Posts: 2
Joined: Wed Aug 08, 2012 10:57 am

x86 SMP 2 core cpu, dedicate each core to a specific process

Post by thassan1977 »

Hello every one.

I'm new at the forum.

I am building an OS from scratch on a SBC card with 2 network cards.
I was able to boot the BSP and execute trampoline code to wake up the other core (AP),

I need to know if it's possible to dedicate core 1 to monitor and respond
solely to network card 1 (rx, tx, pull status...etc),
and core 2 to care only for network card 2.

best regards for all OS developers :)
User avatar
zity
Member
Member
Posts: 99
Joined: Mon Jul 13, 2009 5:52 am
Location: Denmark

Re: x86 SMP 2 core cpu, dedicate each core to a specific pro

Post by zity »

This will probably depend a little bit on the SBC board, but I don't see why not.

If you can route all interrupts from card 1 to the BSP and all interrupts from card 2 to the AP, then you are good to go. Alternatively, your interrupt handler can notify the thread on each core about any information from the cards.
thassan1977
Posts: 2
Joined: Wed Aug 08, 2012 10:57 am

Re: x86 SMP 2 core cpu, dedicate each core to a specific pro

Post by thassan1977 »

thanks zity,

please correct me if I'm wrong:

my network cards are PCIe cards,
as I recall those cards don't have direct interrupt line
to the cpu, instead they use MSI to communicate an interrupt,
by enabling and using MSI from "PCI implementation pci.c" we can write apic id
to the message register in order to select the right core that
will respond to the interrupt, right?


best regards
Post Reply