]> git.dujemihanovic.xyz Git - u-boot.git/commit
sandbox: implement reset
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 27 Oct 2020 19:29:25 +0000 (20:29 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 16:11:30 +0000 (09:11 -0700)
commit329dccc0675b97d8a1ab9debfb610165262f35c6
tree6f7b32ab18a4807d7967853ff137aa009cb59f73
parentc0b19f25a1a2ba935333899e5dcbe4429851cb18
sandbox: implement reset

Up to now the sandbox would shutdown upon a cold reset request. Instead it
should be reset.

In our coding we use static variables like LIST_HEAD(efi_obj_list). A reset
can occur at any time, e.g. via an UEFI binary calling the reset service.
The only safe way to return to an initial state is to relaunch the U-Boot
binary.

The reset implementation uses execv() to relaunch U-Boot.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/os.c
arch/sandbox/cpu/start.c
arch/sandbox/cpu/state.c
arch/sandbox/include/asm/u-boot-sandbox.h
drivers/sysreset/sysreset_sandbox.c
include/os.h