From: lushifex <shifeix.a.lu@intel.com>
To: edk2-devel@lists.01.org
Cc: david.wei@intel.com;
Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Correct Names.
Date: Tue, 19 Sep 2017 19:11:52 -0700 [thread overview]
Message-ID: <1fc115b1-2045-4339-9fd6-9bac06dd9182@SHWDEOPENPSI011.local> (raw)
Correct Boot Option Names.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
.../Include/Library/GenericBdsLib.h | 5 ++-
.../Library/GenericBdsLib/BdsBoot.c | 51 +++++++++++++++++++++-
.../Library/GenericBdsLib/GenericBdsStrings.uni | 8 +++-
3 files changed, 61 insertions(+), 3 deletions(-)
diff --git a/Core/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h b/Core/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
index c338c4d..fa59235 100644
--- a/Core/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
+++ b/Core/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
@@ -4,7 +4,7 @@
2) BDS boot device connect interface.
3) BDS Misc interfaces for mainting boot variable, ouput string.
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -821,6 +821,9 @@ SetupResetReminder (
#define BDS_EFI_MESSAGE_USB_DEVICE_BOOT 0x0305 // Type 03; Sub-Type 05
#define BDS_EFI_MESSAGE_SATA_BOOT 0x0312 // Type 03; Sub-Type 18
#define BDS_EFI_MESSAGE_MAC_BOOT 0x030b // Type 03; Sub-Type 11
+#define BDS_EFI_MESSAGE_NVME_BOOT 0x0317 // Type 03; Sub-Type 17
+#define BDS_EFI_MESSAGE_SD_BOOT 0x031a // Type 03; Sub-Type 1a
+#define BDS_EFI_MESSAGE_EMMC_BOOT 0x031d // Type 03; Sub-Type 1d
#define BDS_EFI_MESSAGE_MISC_BOOT 0x03FF
///
diff --git a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
index ce1dd4a..41611cf 100644
--- a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
@@ -3123,6 +3123,9 @@ BdsLibEnumerateAllBootOption (
UINT16 UsbNumber;
UINT16 MiscNumber;
UINT16 ScsiNumber;
+ UINT16 NvmeNumber;
+ UINT16 SdNumber;
+ UINT16 EmmcNumber;
UINT16 NonBlockNumber;
UINTN NumberBlockIoHandles;
EFI_HANDLE *BlockIoHandles;
@@ -3157,6 +3160,9 @@ BdsLibEnumerateAllBootOption (
UsbNumber = 0;
MiscNumber = 0;
ScsiNumber = 0;
+ NvmeNumber = 0;
+ SdNumber = 0;
+ EmmcNumber = 0;
PlatLang = NULL;
LastLang = NULL;
ZeroMem (Buffer, sizeof (Buffer));
@@ -3299,6 +3305,36 @@ BdsLibEnumerateAllBootOption (
ScsiNumber++;
break;
+ case BDS_EFI_MESSAGE_NVME_BOOT:
+ if (NvmeNumber != 0) {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NVME)), NvmeNumber);
+ } else {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NVME)));
+ }
+ BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionList, Buffer);
+ NvmeNumber++;
+ break;
+
+ case BDS_EFI_MESSAGE_SD_BOOT:
+ if (SdNumber != 0) {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SD)), SdNumber);
+ } else {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SD)));
+ }
+ BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionList, Buffer);
+ SdNumber++;
+ break;
+
+ case BDS_EFI_MESSAGE_EMMC_BOOT:
+ if (EmmcNumber != 0) {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_EMMC)), EmmcNumber);
+ } else {
+ UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_EMMC)));
+ }
+ BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionList, Buffer);
+ EmmcNumber++;
+ break;
+
case BDS_EFI_MESSAGE_MISC_BOOT:
default:
if (MiscNumber != 0) {
@@ -3927,7 +3963,8 @@ BdsGetBootTypeFromDevicePath (
// Get the last device path node
//
LastDeviceNode = NextDevicePathNode (TempDevicePath);
- if (DevicePathSubType(LastDeviceNode) == MSG_DEVICE_LOGICAL_UNIT_DP) {
+ if ((DevicePathSubType(LastDeviceNode) == MSG_DEVICE_LOGICAL_UNIT_DP) ||
+ (DevicePathSubType(LastDeviceNode) == HW_CONTROLLER_DP)) {
//
// if the next node type is Device Logical Unit, which specify the Logical Unit Number (LUN),
// skip it
@@ -3965,6 +4002,18 @@ BdsGetBootTypeFromDevicePath (
BootType = BDS_EFI_MESSAGE_MAC_BOOT;
break;
+ case MSG_NVME_NAMESPACE_DP:
+ BootType = BDS_EFI_MESSAGE_NVME_BOOT;
+ break;
+
+ case MSG_SD_DP:
+ BootType = BDS_EFI_MESSAGE_SD_BOOT;
+ break;
+
+ case MSG_EMMC_DP:
+ BootType = BDS_EFI_MESSAGE_EMMC_BOOT;
+ break;
+
default:
BootType = BDS_EFI_MESSAGE_MISC_BOOT;
break;
diff --git a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
index 5326685..acc0d77 100644
--- a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
+++ b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
@@ -2,7 +2,7 @@
//
// String definitions for Boot Option description.
//
-// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
@@ -30,6 +30,12 @@
#language fr-FR "fr-FR: EFI SCSI Device"
#string STR_DESCRIPTION_MISC #language en-US "EFI Misc Device"
#language fr-FR "fr-FR: EFI Misc Device"
+#string STR_DESCRIPTION_NVME #language en-US "EFI NVM Express"
+ #language fr-FR "fr-FR: EFI NVM Express"
+#string STR_DESCRIPTION_SD #language en-US "EFI SD Card"
+ #language fr-FR "fr-FR: EFI SD Card"
+#string STR_DESCRIPTION_EMMC #language en-US "EFI EMMC Device"
+ #language fr-FR "fr-FR: EFI EMMC Device"
#string STR_DESCRIPTION_NETWORK #language en-US "EFI Network"
#language fr-FR "fr-FR: EFI Network"
#string STR_DESCRIPTION_NON_BLOCK #language en-US "EFI Non-Block Boot Device"
--
2.7.0.windows.1
reply other threads:[~2017-09-20 3:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1fc115b1-2045-4339-9fd6-9bac06dd9182@SHWDEOPENPSI011.local \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox