Reputation: 519
I try to model a multicore CPU with a service core using QEMU. eg. A 3-core CPU where Linux runs on 2 cores, and an RTOS runs on the 3rd core. The communication should be based on shared memory.
Currently I'm able to boot each OS separately.
Upvotes: 4
Views: 234
Reputation: 364220
The Linux kernel has an isolcpus
option to not schedule tasks there or have that core handle interrupts, but I don't think you could boot a normal OS that expects to own all the memory and talk directly to hardware; it would have to know which areas of memory Linux made available for it to use. I think isolcpus
normally lets you run user-space processes without interference, e.g. for microbenchmarking.
Perhaps you could boot Linux and the RTOS in separate VMs, with hardware virtualization, with a hypervisor that sets up a region of shared memory between them.
Or possibly just running the RTOS as a VM guest with Linux as the host hypervisor, but that might defeat the real-time guarantees, IDK.
(All of these problems are the same whether you're on bare metal or QEMU, although QEMU might be able to act as a hypervisor for two guests.)
Upvotes: 4