[U-Boot] [PATCH v2 1/1] efi_loader: add missing EFI_RESET_PLATFORM_SPECIFIC
Heinrich Schuchardt
xypron.glpk at gmx.de
Tue Feb 6 21:00:22 UTC 2018
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 <xypron.glpk at gmx.de>
---
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 70a6070935..ba4c4bbbc9 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 b62cb8a51e..88ca165773 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 3ba650e57e..abab3a8b3a 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 efe2ba4814..d7c2c1e430 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -80,6 +80,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.11.0
More information about the U-Boot
mailing list