Hi all,

I was trying to understand how the go command is expected to work when
used to load custom OSes. My use case requires getting a proprietary OS
to boot using the go command on a TI K3 platform. The OS expects caches
to be flushed and the mmu to be disabled before we jump to it.

The go command (do_go func in cmd/boot.c) calls the do_go_exec function
underneath which does not seem to have a consistent implementation
across various architectures.

In RISC-V the implementation (arch/riscv/lib/boot.c:10) calls
cleanup_before_linux before jumping to the loaded binary. This behaviour
would enable the direct use of the go command for booting a custom OS
(like in my use case). Though no such generic implementation exists for
ARM64.

I was wondering why we have the call to cleanup_before_linux for RISCV
and not ARM64?

Also, is booting a custom OS using the go command a supported use-case?
If yes, it might be better to rename the function to be more generic
like cleanup_before_os from *_linux and call it for each invocation of
the go command.

Regards,
Anshul

Reply via email to