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.har...@linaro.org> --- ArmPlatformPkg/Bds/BootMenu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 4094d41..09e1075 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 }, }; -- 1.7.9.5 ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel