From 482fc90c0a93bdab8473bbd4c8d63732ce888bba Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 6 Feb 2018 22:00:22 +0100 Subject: [PATCH] efi_loader: add missing EFI_RESET_PLATFORM_SPECIFIC EFI_RESET_PLATFORM_SPECIFIC is one of the values that can be used for the EFI service ResetSystem. The missing definition is added. The value has to handled in efi_reset_system(). Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/cpu/armv8/fwcall.c | 1 + arch/arm/mach-bcm283x/reset.c | 1 + include/efi_api.h | 3 ++- lib/efi_loader/efi_runtime.c | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 0e90302d3f..45cbd91d97 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -644,6 +644,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: reset_cpu(0); break; case EFI_RESET_SHUTDOWN: diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c index c220267536..ff0712bf65 100644 --- a/arch/arm/cpu/armv8/fwcall.c +++ b/arch/arm/cpu/armv8/fwcall.c @@ -146,6 +146,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: psci_system_reset(); break; case EFI_RESET_SHUTDOWN: diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c index 5b83fdf43d..aa02d3f9f6 100644 --- a/arch/arm/mach-bcm283x/reset.c +++ b/arch/arm/mach-bcm283x/reset.c @@ -63,6 +63,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: reset_cpu(0); break; case EFI_RESET_SHUTDOWN: diff --git a/include/efi_api.h b/include/efi_api.h index 167c44e3a4..28de93a132 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -180,7 +180,8 @@ struct efi_boot_services { enum efi_reset_type { EFI_RESET_COLD = 0, EFI_RESET_WARM = 1, - EFI_RESET_SHUTDOWN = 2 + EFI_RESET_SHUTDOWN = 2, + EFI_RESET_PLATFORM_SPECIFIC = 3, }; /* EFI Runtime Services table */ diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 9e281728f9..0888316140 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -91,6 +91,7 @@ static void EFIAPI efi_reset_system_boottime( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: do_reset(NULL, 0, 0, NULL); break; case EFI_RESET_SHUTDOWN: -- 2.39.5