[PATCH v3 5/8] sandbox: implement reset

Simon Glass sjg at chromium.org
Wed Nov 4 00:03:26 CET 2020


On Tue, 27 Oct 2020 at 13:29, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> 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 at gmx.de>
> ---
> v3:
>         update commit message
> v2:
>         avoid longjmp()
>         add more comments
> ---
>  arch/sandbox/cpu/os.c                     |  6 ++++++
>  arch/sandbox/cpu/start.c                  | 26 +++++++++++++++++++++++
>  arch/sandbox/cpu/state.c                  |  1 +
>  arch/sandbox/include/asm/u-boot-sandbox.h | 10 +++++++++
>  drivers/sysreset/sysreset_sandbox.c       |  3 +++
>  include/os.h                              | 15 +++++++++++++
>  6 files changed, 61 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list