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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user