aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-11-20 14:49:18 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-11-26 21:30:59 +0100
commit7a001e0f3d516d0c626375ca934438596a94702d (patch)
treee9370a5f0c0536ded45e626db8a1b937ee52a1e0 /arch/sandbox
parentcd9a26bfe56344822c75edbc771526099efe63e6 (diff)
downloadu-boot-7a001e0f3d516d0c626375ca934438596a94702d.zip
u-boot-7a001e0f3d516d0c626375ca934438596a94702d.tar.gz
u-boot-7a001e0f3d516d0c626375ca934438596a94702d.tar.bz2
sandbox: poweroff in efi_system_reset()
efi_system_reset() should exit if called with EFI_RESET_SHUTDOWN. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/start.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index a74f5ec..13b0731 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -434,8 +434,10 @@ void __efi_runtime EFIAPI efi_reset_system(
efi_status_t reset_status,
unsigned long data_size, void *reset_data)
{
- os_fd_restore();
- os_relaunch(os_argv);
+ if (reset_type == EFI_RESET_SHUTDOWN)
+ sandbox_exit();
+ else
+ sandbox_reset();
}
void sandbox_reset(void)