
From: Simon Glass <sjg@chromium.org> Add support for reset -c flag to explicitly request cold reset. This provides symmetry with -w (warm) and -u (firmware UI) flags. For EFI apps, this performs EFI_RESET_COLD which does a full system reboot without going to firmware setup interface. Signed-off-by: Simon Glass <sjg@chromium.org> --- doc/usage/cmd/reset.rst | 2 +- lib/efi_client/efi_app.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/usage/cmd/reset.rst b/doc/usage/cmd/reset.rst index 190f3281d78..d3923c3e8a9 100644 --- a/doc/usage/cmd/reset.rst +++ b/doc/usage/cmd/reset.rst @@ -11,7 +11,7 @@ Synopsis :: - reset [-w] [-u] + reset [-c] [-w] [-u] Description ----------- diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c index 1afccc8c8c7..25fc2e9cade 100644 --- a/lib/efi_client/efi_app.c +++ b/lib/efi_client/efi_app.c @@ -254,6 +254,10 @@ static int efi_sysreset_request(struct udevice *dev, enum sysreset_t type) struct efi_priv *priv = efi_get_priv(); switch (type) { + case SYSRESET_COLD: + /* Perform a cold reset */ + priv->run->reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); + break; case SYSRESET_TO_FIRMWARE_UI: { efi_status_t ret; u64 osind; -- 2.43.0