
From: Simon Glass <sjg@chromium.org> At present reset just exits the U-Boot app and returns to the caller. Add support for proper warm and cold resets, with 'hot' reset preserving the current behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> --- lib/efi_client/efi_app.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c index 6b8b53fbb41..88e04f1084b 100644 --- a/lib/efi_client/efi_app.c +++ b/lib/efi_client/efi_app.c @@ -250,7 +250,17 @@ static void efi_exit(void) static int efi_sysreset_request(struct udevice *dev, enum sysreset_t type) { - efi_exit(); + struct efi_priv *priv = efi_get_priv(); + + switch (type) { + case SYSRESET_WARM: + priv->run->reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL); + break; + case SYSRESET_HOT: + default: + efi_exit(); + break; + } return -EINPROGRESS; } -- 2.43.0