This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: Using RTOS and Linux on the two different A53 cores

Part Number: AM6442

Hello,

Is it possible to use two different operating systems on the two A53 cores: Linux in one core and an RTOS on the other one?

In that case is it possible to change the bootflow to have one of the cores without Linux to handle the initialization of the system and also starting the other cores (without using remoteproc)? In this case I would want to have Linux as an "application" core which can integrate on the entire system, but without being the master of the system.

Thank you

Thomas

  • Hi Thomas,

    In that case is it possible to change the bootflow to have one of the cores without Linux to handle the initialization of the system and also starting the other cores (without using remoteproc)? In this case I would want to have Linux as an "application" core which can integrate on the entire system, but without being the master of the system.

    This is actually already how K3 boots.

    The R5 SPL (running on one of the Cortex-R5F cores, not any of the A cores) already does DDR init, board bring-up, and - via SYSFW/TIFS (Device Manager) - powers on and releases the A53 cluster, the other R5F cores, and the M4F.

    Linux is never the "master" in the K3 boot architecture; it's brought up last, as an application-tier OS sitting on top of R5 SPL → ATF → OP-TEE → U-Boot.

    Refer: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/12_01_00_05_03/exports/docs/linux/Foundational_Components/U-Boot/BG-Bootflow-K3.html

    Note that remoteproc is a Linux runtime concept, used when Linux (post-boot) wants to load/reload/manage firmware on a remote core via the kernel's remoteproc framework. It is not the mechanism SPL uses to bring up cores at boot. That's done through SYSFW/TIFS API calls directly from R5 SPL.

    Is it possible to use two different operating systems on the two A53 cores: Linux in one core and an RTOS on the other one?

    On K3 SoCs, the A53 cluster is architected as a single SMP domain. One Linux kernel image owns both cores.

    There's no TI-supported mechanism to statically partition the A53 cluster into "Linux owns core 0, bare-metal RTOS owns core 1," the way remoteproc lets you cleanly hand an R5F/M4F/C7x to a separate firmware image.

    But you should be able to run an RTOS inmate using Jailhouse (static partitioning hypervisor).

    Please refer: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/12_01_00_05_03/exports/docs/linux/Foundational_Components/Hypervisor/Jailhouse.html

     AM6442: Can another OS operate each A53 core 

    It is not supported out of the box on AM64x yet, but you can try porting it.

    Regards,
    Vinu

  • Hi Vinuchandran,

    Thank you for the reply.

    By using Jailhouse can I have one of the cores running only Linux and the other exclusively Bare metal? The page you linked is from AM62, can I still use the same process to try for the am64x?

    Can I load the application firmware to the various cores (R5s) with a different mechanism (e.g., directly from flash) even if I am using Linux, without ever using remoteproc? What about the configurations of the peripherals that come from the Device tree, can I not configure any peripheral from there and do everything from R5 or the other A53 core running bare metal?

    Regards,

    Thomas

  • Hi Thomas,

    It is not supported out of the box on AM64x yet, but you can try porting it.

    AM62x link is shared, as the Jailhouse currently supports only AM62 devices. But you can try porting it to AM64x. Theoretically a bare metal binary can be run on the other core, as mentioned in the e2e post that I've shared in the first reply.

    Can I load the application firmware to the various cores (R5s) with a different mechanism (e.g., directly from flash) even if I am using Linux, without ever using remoteproc? What about the configurations of the peripherals that come from the Device tree, can I not configure any peripheral from there and do everything from R5 or the other A53 core running bare metal?

    Loading R5F firmware from flash, without ever using remoteproc

    Yes. U-Boot/SPL has its own remote-core init/load/start/stop mechanism that is entirely separate from the Linux kernel's remoteproc framework. This lets you initialize, load, and start R5F firmware directly from flash as part of the boot image, before Linux ever runs.

    If you also omit or disable that R5F's node in the Linux device tree, the Linux k3-r5-remoteproc driver won't even probe it, so Linux has zero interaction with that core for the life of the system - it's booted and owned entirely by SPL/U-Boot.

    Refer: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-RemoteProc.html

    Peripheral configuration without going through the Linux device tree

    Yes. The Linux device tree only tells Linux's own drivers what to probe — it doesn't actually grant access to anything. The real ownership of every peripheral, its pinmux, clocks, power domain, and interrupt routing is assigned by TIFS/System Firmware's resource-management board configuration and firewalls, which bind resources to specific "hosts" (A53/Linux, R5F, etc.) independently of any device tree.

    So to have the R5F own and configure a peripheral entirely on its own: omit that peripheral's node from the Linux DT, and make sure the RM board config (built with the K3 Resource Partitioning tool) assigns ownership of that peripheral — and its pinmux/clock/power-domain/IRQ — to the R5F's host ID rather than the A53 host.

    Once that's done, the R5F firmware does 100% of its own bring-up: pinmux, clocks, power domains, and register-level init, either via direct MMIO where it owns the peripheral outright, or via its own TISCI/sciclient calls to System Firmware for anything gated by the system controller.

    Refer: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/How_to_Guides/Host/K3_Resource_Partitioning_Tool.html

    Regards,
    Vinu

  • Hi Vinu,

    Loading R5F firmware from flash, without ever using remoteproc


    When you say U-Boot/SPL has its own remote-core init/load/start/stop mechanism, are you talking about using the SPL/U-Boot running on A53 to load the firmware for the remote cores or are referring to the SPL of R5s cores directly?

    Can SPL that launches the other cores also be on one R5 core?

    Regards,
    Thomas

  • Hi Thomas,

    Apologies for the delayed response. My reply somehow didn't get posted.

    When you say U-Boot/SPL has its own remote-core init/load/start/stop mechanism, are you talking about using the SPL/U-Boot running on A53 to load the firmware for the remote cores or are referring to the SPL of R5s cores directly?

    That one runs on the A53, not the R5. Per U-Boot's own K3 boot documentation: the first SPL stage (the "wakeup SPL") runs on an R5F core, does DDR init, and hands off to the A53 domain- starting TF-A, then OP-TEE.

    Then a second, separate SPL stage that itself runs on the A53 ("main domain's SPL," sometimes called A53 SPL- tispl.bin). The interactive rproc init/load/start commands I linked run at that later U-Boot-on-A53 prompt, after the R5 has already handed control to the A53. 

    Regards,
    Vinu

  • Thank you for replies!

    Regards,
    Thomas