From nobody Mon Apr 29 13:08:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505877807434260.6653095510667; Tue, 19 Sep 2017 20:23:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B3FEF21E9460B; Tue, 19 Sep 2017 20:20:20 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9BCEF21E87979 for ; Tue, 19 Sep 2017 20:20:19 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2017 20:23:24 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.2]) by FMSMGA003.fm.intel.com with SMTP; 19 Sep 2017 20:23:23 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,420,1500966000"; d="scan'208";a="902069111" Date: Wen, 20 Sep 2017 11:23:24 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: <1fc115b1-2045-4339-9fd6-9bac06dd9182@SHWDEOPENPSI011.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Correct Names. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: , david.wei@intel.com Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Correct Boot Option Names. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- .../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. =20 -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availabl= e under=20 the terms and conditions of the BSD License that accompanies this distribu= tion. =20 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 =20 /// 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 =3D 0; MiscNumber =3D 0; ScsiNumber =3D 0; + NvmeNumber =3D 0; + SdNumber =3D 0; + EmmcNumber =3D 0; PlatLang =3D NULL; LastLang =3D NULL; ZeroMem (Buffer, sizeof (Buffer)); @@ -3299,6 +3305,36 @@ BdsLibEnumerateAllBootOption ( ScsiNumber++; break; =20 + case BDS_EFI_MESSAGE_NVME_BOOT: + if (NvmeNumber !=3D 0) { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_NVME)), NvmeNumber); + } else { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_NVME))); + } + BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); + NvmeNumber++; + break; + + case BDS_EFI_MESSAGE_SD_BOOT: + if (SdNumber !=3D 0) { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_SD)), SdNumber); + } else { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_SD))); + } + BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); + SdNumber++; + break; + + case BDS_EFI_MESSAGE_EMMC_BOOT: + if (EmmcNumber !=3D 0) { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_EMMC)), EmmcNumber); + } else { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_EMMC))); + } + BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); + EmmcNumber++; + break; + case BDS_EFI_MESSAGE_MISC_BOOT: default: if (MiscNumber !=3D 0) { @@ -3927,7 +3963,8 @@ BdsGetBootTypeFromDevicePath ( // Get the last device path node // LastDeviceNode =3D NextDevicePathNode (TempDevicePath); - if (DevicePathSubType(LastDeviceNode) =3D=3D MSG_DEVICE_LOGICAL_UN= IT_DP) { + if ((DevicePathSubType(LastDeviceNode) =3D=3D MSG_DEVICE_LOGICAL_U= NIT_DP) || + (DevicePathSubType(LastDeviceNode) =3D=3D HW_CONTROLLER_DP)) { // // if the next node type is Device Logical Unit, which specify t= he Logical Unit Number (LUN), // skip it @@ -3965,6 +4002,18 @@ BdsGetBootTypeFromDevicePath ( BootType =3D BDS_EFI_MESSAGE_MAC_BOOT; break; =20 + case MSG_NVME_NAMESPACE_DP: + BootType =3D BDS_EFI_MESSAGE_NVME_BOOT; + break; + + case MSG_SD_DP: + BootType =3D BDS_EFI_MESSAGE_SD_BOOT; + break; + + case MSG_EMMC_DP: + BootType =3D BDS_EFI_MESSAGE_EMMC_BOOT; + break; + default: BootType =3D BDS_EFI_MESSAGE_MISC_BOOT; break; diff --git a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsS= trings.uni b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsS= trings.uni index 5326685..acc0d77 100644 --- a/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.= uni +++ b/Core/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.= uni @@ -2,7 +2,7 @@ // =20 // String definitions for Boot Option description. // =20 -// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
// 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 D= evice" #string STR_DESCRIPTION_MISC #language en-US "EFI Misc Device" #language fr-FR "fr-FR: EFI Misc D= evice" +#string STR_DESCRIPTION_NVME #language en-US "EFI NVM Express" + #language fr-FR "fr-FR: EFI NVM Ex= press" +#string STR_DESCRIPTION_SD #language en-US "EFI SD Card" + #language fr-FR "fr-FR: EFI SD Car= d" +#string STR_DESCRIPTION_EMMC #language en-US "EFI EMMC Device" + #language fr-FR "fr-FR: EFI EMMC D= evice" #string STR_DESCRIPTION_NETWORK #language en-US "EFI Network" #language fr-FR "fr-FR: EFI Networ= k" #string STR_DESCRIPTION_NON_BLOCK #language en-US "EFI Non-Block Boo= t Device" --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel