Page 1 of 1

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

Posted: Wed Sep 18, 2019 7:06 am
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 :)

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

Posted: Wed Sep 18, 2019 11:45 pm
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.

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

Posted: Thu Sep 19, 2019 9:14 am
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