[U-Boot] Use of the go command

Hello,
i use the go command from the hush shell to execute a function from environment. That function has been initially compiled in U-Boot and was first called in board_late_init().
I call the function by using go #address
on my Arm Cortex A-7 machine the do_go_exec becomes: e1a03000 mov r3, r0 e1a00001 mov r0, r1 e1a01002 mov r1, r2 e12fff13 bx r3
so instruction set is exchanged. This seems to work the function returns and returns back to the hush-shell. My question is now: Is it safe to use the go command to execute U-boot functions or do I miss something here? Does the exchange of the instruction set have some influence on the further execution of U-boot.?
Mit freundlichen Grüßen / Best regards
i.A. Gregor Herburger Entwicklung Software Delling Tel. +49 8153 9308-809, Fax +49 8153 9308-7809 gregor.herburger@tq-group.com
TQ-Systems GmbH Mühlstraße 2, Gut Delling, 82229 Seefeld Amtsgericht München, HRB 105018 Sitz der Gesellschaft: Seefeld Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider www.tq-group.com

Dear Gregor,
In message 42665f37f2da4296b1c923f92ac30661@tq-group.com you wrote:
i use the go command from the hush shell to execute a function from environment. That function has been initially compiled in U-Boot and was first called in board_late_init().
Urg...
I call the function by using go #address
Go is supposed to be used with standalone programs only.
My question is now: Is it safe to use the go command to execute U-boot functions or do I miss something here?
You are invoking undefined behaviour.
Best regards,
Wolfgang Denk
participants (2)
-
Herburger, Gregor
-
Wolfgang Denk