aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-02 16:22:11 +0100
committerSimon Glass <sjg@chromium.org>2020-12-22 20:39:25 -0700
commit9c54729c77c4664474c43b53e545f919e2504e8c (patch)
tree404c64f9b86b849b9a7704f7ea044510ee891234 /arch
parent67c7e9af7aeb34d6794ab9b8ae2ac64ba174c850 (diff)
downloadu-boot-9c54729c77c4664474c43b53e545f919e2504e8c.zip
u-boot-9c54729c77c4664474c43b53e545f919e2504e8c.tar.gz
u-boot-9c54729c77c4664474c43b53e545f919e2504e8c.tar.bz2
sandbox: implement runtime system reset
Implement a reset function that we can call after ExitBootServices(), when all driver model devices are gone. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/cpu/start.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index f6c9854..fe494ae 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <dm/root.h>
+#include <efi_loader.h>
#include <errno.h>
#include <init.h>
#include <os.h>
@@ -406,6 +407,15 @@ void state_show(struct sandbox_state *state)
printf("\n");
}
+void __efi_runtime EFIAPI efi_reset_system(
+ enum efi_reset_type reset_type,
+ efi_status_t reset_status,
+ unsigned long data_size, void *reset_data)
+{
+ os_fd_restore();
+ os_relaunch(os_argv);
+}
+
void sandbox_reset(void)
{
/* Do this here while it still has an effect */