bao-ipc Linux driver integration and Shared Memory on i.MX8M Plus #355
Replies: 1 comment 1 reply
I gues it essentially depends on the kernel version you are using. I believe the latest patch version can be found at the bao-linux-drivers repository linux-v6.15 brach. @joaopeixoto13 can you confirm? Otherwise, where can @Rivanfirdausa find the driver for the latest kernel?
Correct, Bao's IPC interrupts are injected via purely virtual interrupts, meaning they are synthesized by the hypervisor with no corresponding physical interrupt. However, if you do have free mailboxes in your platform, you are free to assign each to each VM as devices, along with the corresponding interrupts. However, I am not this will result in much lower latencies as in Arm's GIC, all interrupts (event if they are real physical interrupts) must be handled by the hypervisor and injected in the VM throgh GICV. You can check our study that compares each one in this paper.
I'd agree that that is likely a more performant way of accessing the shared memory region. The current Bao IPC driver is only there to provide user-friendly interface to access IPC, it is not optimized for this latency-sensitive use-cases. For sure every approach is acceptable, especially if it performs better. PS: I'd love for you to answer you previous discussion #339 , I got quite curious about that use case. |
Uh oh!
There was an error while loading. Please reload this page.
First of all, thank you for the incredible work on the Bao Hypervisor.
I am currently developing a Mixed-Criticality System for a Software-Defined Vehicle (SDV) using Bao Hypervisor on the Toradex Verdin i.MX8M Plus platform. My configuration runs two guests:
The Context:
I ran into a hardware constraint regarding USB passthrough. My Touchscreen and Steering Wheel controller are physically routed through the same onboard USB Hub, which connects to a single USB Host Controller (0x38200000). Because of Bao's strict static partitioning, I cannot pass the steering wheel to VM 2 without also pulling the touchscreen away from VM 1.
To resolve this, I decided to leave the USB controller in VM 1, read the steering input via evtest in VM 1, and forward the data to VM 2 using Shared Memory. I have already defined the bao,ipcshmem node in my device trees.
My Questions:
Linux Driver Source: Where is the most recommended/stable repository or patchset to get the bao-ipc.ko Linux driver source code for Yocto/AGL integration? I noticed recent efforts to upstream the Bao IPC driver to the Linux mainline, but I am unsure which specific branch or patch version is best suited for the i.MX8M Plus right now.
Interrupt Routing: For IPC on the i.MX8M Plus, does Bao's bao-ipc rely solely on injected virtual interrupts (via ARM GIC), or do I need to explicitly assign and configure the NXP hardware Messaging Unit (MU) for the IPC to work between the two Linux VMs?
Low-Latency Alternative: Given that VM 2 requires extreme low latency for real-time steering control, would you recommend sticking to the official bao-ipc driver, or is using a userspace raw memory map (e.g., mmap via /dev/mem directly to the shared physical address 0xFD000000) an acceptable and faster approach within the Bao ecosystem?
Thank you in advance for your time and guidance!
All reactions