Re: [edk2] [PATCH] CorebootPayloadPkg: Add "Down" key to Boot Manager Menu

2016-10-26 Thread Ma, Maurice
Reviewed-by: Maurice Ma <maurice...@intel.com>


-Original Message-
From: Dong, Guo 
Sent: Wednesday, October 26, 2016 5:45 PM
To: edk2-devel@lists.01.org
Cc: Ma, Maurice; Agyeman, Prince; Dong, Guo
Subject: [edk2] [PATCH] CorebootPayloadPkg: Add "Down" key to Boot Manager Menu

Also add Down key to Boot Manager Menu since some serial terminals don't 
support F2 key.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Dong <guo.d...@intel.com>
Reviewed-by: Maurice Ma <maurice...@intel.com>
---
 .../Library/PlatformBootManagerLib/PlatformBootManager.c| 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c 
b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index a31384a..c16a6b3 100644
--- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana
+++ ger.c
@@ -181,6 +181,7 @@ PlatformBootManagerBeforeConsole (  {
   EFI_INPUT_KEYEnter;
   EFI_INPUT_KEYF2;
+  EFI_INPUT_KEYDown;
   EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
 
   PlatformConsoleInit ();
@@ -201,6 +202,14 @@ PlatformBootManagerBeforeConsole (
   EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 
0, , NULL);
 
   //
+  // Also add Down key to Boot Manager Menu since some serial terminals don't 
support F2 key.
+  //
+  Down.ScanCode= SCAN_DOWN;
+  Down.UnicodeChar = CHAR_NULL;
+  EfiBootManagerGetBootManagerMenu ();  
+ EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) 
+ BootOption.OptionNumber, 0, , NULL);
+
+  //
   // Register UEFI Shell
   //
   PlatformRegisterFvBootOption (PcdGetPtr (PcdShellFile), L"UEFI Shell", 
LOAD_OPTION_ACTIVE); @@ -239,8 +248,8 @@ PlatformBootManagerAfterConsole (
 
   Print (
 L"\n"
-L"F2  to enter Boot Manager Menu.\n"
-L"ENTER   to boot directly.\n"
+L"F2 or Down  to enter Boot Manager Menu.\n"
+L"ENTER   to boot directly.\n"
 L"\n"
   );
 
--
2.7.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] CorebootPayloadPkg: Add "Down" key to Boot Manager Menu

2016-10-26 Thread gdong1
Also add Down key to Boot Manager Menu since some serial
terminals don't support F2 key.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Dong 
Reviewed-by: Maurice Ma 
---
 .../Library/PlatformBootManagerLib/PlatformBootManager.c| 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c 
b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index a31384a..c16a6b3 100644
--- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -181,6 +181,7 @@ PlatformBootManagerBeforeConsole (
 {
   EFI_INPUT_KEYEnter;
   EFI_INPUT_KEYF2;
+  EFI_INPUT_KEYDown;
   EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
 
   PlatformConsoleInit ();
@@ -201,6 +202,14 @@ PlatformBootManagerBeforeConsole (
   EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 
0, , NULL);
 
   //
+  // Also add Down key to Boot Manager Menu since some serial terminals don't 
support F2 key.
+  //
+  Down.ScanCode= SCAN_DOWN;
+  Down.UnicodeChar = CHAR_NULL;
+  EfiBootManagerGetBootManagerMenu ();
+  EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 
0, , NULL);
+
+  //
   // Register UEFI Shell
   //
   PlatformRegisterFvBootOption (PcdGetPtr (PcdShellFile), L"UEFI Shell", 
LOAD_OPTION_ACTIVE);
@@ -239,8 +248,8 @@ PlatformBootManagerAfterConsole (
 
   Print (
 L"\n"
-L"F2  to enter Boot Manager Menu.\n"
-L"ENTER   to boot directly.\n"
+L"F2 or Down  to enter Boot Manager Menu.\n"
+L"ENTER   to boot directly.\n"
 L"\n"
   );
 
-- 
2.7.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel