@@ -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 },
};
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> --- ArmPlatformPkg/Bds/BootMenu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)