mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-03 18:23:34 +00:00
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>
This commit is contained in:
parent
67c7e9af7a
commit
9c54729c77
2 changed files with 12 additions and 1 deletions
|
@ -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 */
|
||||
|
|
|
@ -233,7 +233,8 @@ config EFI_HAVE_RUNTIME_RESET
|
|||
# bool "Reset runtime service is available"
|
||||
bool
|
||||
default y
|
||||
depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || SYSRESET_X86
|
||||
depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \
|
||||
SANDBOX || SYSRESET_X86
|
||||
|
||||
config EFI_GRUB_ARM32_WORKAROUND
|
||||
bool "Workaround for GRUB on 32bit ARM"
|
||||
|
|
Loading…
Add table
Reference in a new issue