public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gary Lin" <glin@suse.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Zailiang Sun <zailiang.sun@intel.com>,
	Yi Qian <yi.qian@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [edk2-platforms] [PATCH v2 1/6] Vlv2TbltDevicePkg: Adjust the device priority
Date: Tue, 30 Jul 2019 08:16:08 +0000	[thread overview]
Message-ID: <20190730081518.16349-2-glin@suse.com> (raw)
In-Reply-To: <20190730081518.16349-1-glin@suse.com>

In BootOptionPriority(), the higher number implies the lower boot
priority. This commit lowers the priority of network booting and raises
the priority of the local devices. Besides, SD and EMMC are also added
to BootOptionPriority() since Minnowboard comes with a SD card slot.

v2:
  Also match MSG_URI_DP to sort HTTP Boot options

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c | 29 ++++++++++----------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
index 84aa097d58..195b3f3097 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
@@ -499,11 +499,10 @@ BootOptionType (
   Returns the priority number.
   OptionType                 EFI
   ------------------------------------
-  PXE                         2
-  DVD                         4
-  USB                         6
-  NVME                        7
-  HDD                         8
+  HDD                         2
+  USB                         4
+  SATA/NVME/SD                6
+  PXE/HTTP                    8
   EFI Shell                   9
   Others                      100
 
@@ -518,21 +517,23 @@ BootOptionPriority (
     // EFI boot options
     //
     switch (BootOptionType (BootOption->FilePath)) {
-    case MSG_MAC_ADDR_DP:
-    case MSG_VLAN_DP:
-    case MSG_IPv4_DP:
-    case MSG_IPv6_DP:
-      return 2;
+    case MSG_USB_DP:
+      return 4;
 
     case MSG_SATA_DP:
     case MSG_ATAPI_DP:
     case MSG_UFS_DP:
     case MSG_NVME_NAMESPACE_DP:
-      return 4;
-
-    case MSG_USB_DP:
+    case MSG_SD_DP:
+    case MSG_EMMC_DP:
       return 6;
 
+    case MSG_MAC_ADDR_DP:
+    case MSG_VLAN_DP:
+    case MSG_IPv4_DP:
+    case MSG_IPv6_DP:
+    case MSG_URI_DP:
+      return 8;
     }
     if (StrCmp (BootOption->Description, INTERNAL_UEFI_SHELL_NAME) == 0) {
       if (PcdGetBool (PcdBootToShellOnly)) {
@@ -541,7 +542,7 @@ BootOptionPriority (
       return 9;
     }
     if (StrCmp (BootOption->Description, UEFI_HARD_DRIVE_NAME) == 0) {
-      return 8;
+      return 2;
     }
     return 100;
 }
-- 
2.22.0


  reply	other threads:[~2019-07-30  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  8:16 [edk2-platforms] [PATCH v2 0/6] Fix the boot order, SMBIOS, and capsule GUIDs of Minnowboard Gary Lin
2019-07-30  8:16 ` Gary Lin [this message]
2019-07-30  8:16 ` [edk2-platforms] [PATCH v2 2/6] Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp Gary Lin
2019-07-30  8:16 ` [edk2-platforms] [PATCH v2 3/6] Vlv2TbltDevicePkg: Only sort boot options when necessary Gary Lin
2019-07-30  8:16 ` [edk2-platforms] [PATCH v2 4/6] Vlv2TbltDevicePkg: Clean up the unused variables and function Gary Lin
2019-07-30  8:16 ` [edk2-platforms] [PATCH v2 5/6] Vlv2TbltDevicePkg: Add the missing SMBIOS bits Gary Lin
2019-07-30  8:16 ` [edk2-platforms] [PATCH v2 6/6] Vlv2TbltDevicePkg: Convert the device GUIDs of capsules to lowercase Gary Lin
2019-08-08  7:26 ` [edk2-platforms] [PATCH v2 0/6] Fix the boot order, SMBIOS, and capsule GUIDs of Minnowboard Michael D Kinney
2019-08-08  8:08   ` [edk2-devel] " Gary Lin
2019-08-08 15:03     ` Michael D Kinney
2019-08-09 19:15       ` Michael D Kinney

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=20190730081518.16349-2-glin@suse.com \
    --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