summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2013-05-23 16:12:24 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2013-05-23 16:12:24 +0100
commit7a7e2ccf801e9025296645edb6ed4b2d20229ebc (patch)
tree08e1f97d5aaa1746ac63a4a8920b1999bc8e1479 /ArmPlatformPkg
parent5e1464553e7f232e6951340c6105ffbfce92852a (diff)
parentecae5d211de99208a68068d9d21e86dac626807e (diff)
Merge branch 'linaro-topic-menu' into linaro-tracking-2013.05
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c9
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c20
2 files changed, 25 insertions, 4 deletions
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
index f85831755..d2ec52cad 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -49,12 +49,13 @@ LibResetSystem (
case EfiResetWarm:
// Map a warm reset into a cold reset
case EfiResetCold:
- case EfiResetShutdown:
// Send the REBOOT function to the platform microcontroller
ArmPlatformSysConfigSet (SYS_CFG_REBOOT, 0);
-
- // We should never be here
- while(1);
+ break;
+ case EfiResetShutdown:
+ // Send the SHUTDOWN function to the platform microcontroller
+ ArmPlatformSysConfigSet (SYS_CFG_SHUTDOWN, 0);
+ break;
}
ASSERT(FALSE);
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 2280e8c3c..94ec9f66d 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -696,12 +696,32 @@ BootShell (
return Status;
}
+EFI_STATUS
+Reboot (
+ IN LIST_ENTRY *BootOptionsList
+ )
+{
+ gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
+ return EFI_UNSUPPORTED;
+}
+
+EFI_STATUS
+Shutdown (
+ IN LIST_ENTRY *BootOptionsList
+ )
+{
+ gRT->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
+ return EFI_UNSUPPORTED;
+}
+
struct BOOT_MAIN_ENTRY {
CONST CHAR16* Description;
EFI_STATUS (*Callback) (IN LIST_ENTRY *BootOptionsList);
} BootMainEntries[] = {
{ L"Boot Manager", BootMenuManager },
{ L"Shell", BootShell },
+ { L"Reboot", Reboot },
+ { L"Shutdown", Shutdown },
};