U-Boot - Behaviour of 'go' command

Simon Glass sjg at chromium.org
Wed May 10 16:31:48 CEST 2023


Hi Little,

On Sun, 7 May 2023 at 04:48, Little Tree <littletreetrunk32 at gmail.com> wrote:
>
> I have written a minimal bare-metal Raspberry Pi-3B program (ARM64-
> CortexA53) to switch from EL2 (Exception Level 2) to EL1. U-Boot is used as
> the bootloader. The code is loaded to RAM using the "tftpboot" command. The
> "go" command is used to start the execution of my program. I am not
> expecting to return the control back to U-Boot.
>
> When the code switches to EL1 using "ERET" instruction the RAM (the jump
> location) contains the random data. When I inspect (using JTAG) the RAM
> (again the jump location) just before the ERET I can see the valid program
> there.
>
> May I know the reason for this behavior? Is there a better alternative to
> the "go" command?

It could be that the memory becomes inaccessible, but I don't know
much about this. You can look at the implementation of the 'go'
command in cmd/boot.c but basically it just jumps directly to the code
you give it. I am really not sure why it would suddenly vanish due to
that.

Regards,
SImon


More information about the U-Boot mailing list