summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2013-05-22 11:24:08 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2013-05-22 11:25:52 +0100
commitecae5d211de99208a68068d9d21e86dac626807e (patch)
tree1d7d568d58adbe4d69f4a9b96cb7d8fea538b81c /ArmPlatformPkg
parent1e688e4ccbeaf9df45922293d43a25cfeb58c3b1 (diff)
ArmPlatformPkg/Bds: Add Reboot and Shutdown options to main menu
Add Reboot and Shutdown options to the main BDS menu so that users can control the platform remotely without having to physically reboot/shutdown the board. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 0f98caa59..2b32e838a 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -614,12 +614,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 },
};