Share memory between Multi-core and Multi-operating systems environment

Hi,

If I understand your problem correctly it’s an SMP system with 4 cores and you would like to run on one of those cores FreeRTOS. Right?

There are various approaches to deal with this and it’s typically non trivial, since your hardware ideally needs to support hardware virtualization. One possible solution is a hypervisor like this[1]. Here[2] is a FreeRTOS cell example. Keep in mind, that you will need to “virtualize” whatever hardware is used by FreeRTOS and remove it via virtualization that from Linux.
This[3] paper might give you some initial ideas how you can communicate between Linux and FreeRTOS in this setup and you might want to ask for further details here[4].

Some people suggested /dev/mem. I would strongly recommend against that and go for a proper driver. Probably this driver already exists - depending on your needs and your hardware.

For a “generic” solution from the Linux point of view have a look at [5] and look out for rpmsg[6] and virtio.

[1] GitHub - siemens/jailhouse: Linux-based partitioning hypervisor
[2] GitHub - siemens/freertos-cell: FreeRTOS for Jailhouse Cells
[3] https://events.static.linuxfound.org/sites/events/files/slides/LinuxConJapan-2016-Jailhouse-IPC.pdf
[4] https://groups.google.com/g/jailhouse-dev/c/LUUjyKDBccc/m/pSLtS5EAAwAJ
[5] Remote Processor Framework — The Linux Kernel documentation
[6] Remote Processor Messaging (rpmsg) Framework — The Linux Kernel documentation