efi: app: Support proper reset options

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>
This commit is contained in:
Simon Glass
2025-08-29 14:09:24 -06:00
parent 9fdab58b86
commit 1ad04a7895

View File

@@ -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;
}