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 3/6] Vlv2TbltDevicePkg: Only sort boot options when necessary
Date: Tue, 30 Jul 2019 08:16:14 +0000 [thread overview]
Message-ID: <20190730081518.16349-4-glin@suse.com> (raw)
In-Reply-To: <20190730081518.16349-1-glin@suse.com>
* PlatformBootManagerAfterConsole() always sorted the boot options at
the end, and this would invalidate the BootOrder created by the user.
Besides, the current implementation would sort the boot options twice,
and this is not efficient. We should just sort the boot options once
at the end of the function only for the very first boot.
* Update the string in IsNeedSortBootOption() to match the description
of BootManagerMenuApp.
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/BdsPlatform.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
index 7fbbf281c6..a5423013a5 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
@@ -1299,7 +1299,7 @@ IsNeedSortBootOption (
//
if ((BootOptionCount > 1) &&
(((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"Enter Setup"))) == 0) ||
- ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLen (L"BootManagerMenuApp"))) == 0))) {
+ ((StrnCmp (BootOptions->Description, L"Boot Device List", StrLen (L"Boot Device List"))) == 0))) {
return TRUE;
}
@@ -1374,9 +1374,6 @@ PlatformBootManagerAfterConsole (
//
EfiBootManagerRefreshAllBootOption ();
- if (IsNeedSortBootOption()) {
- EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOption);
- }
//
// PXE boot option may appear after boot option enumeration
//
@@ -1400,7 +1397,9 @@ PlatformBootManagerAfterConsole (
Print (L"Press F7 for BootMenu!\n");
EfiBootManagerRefreshAllBootOption ();
- EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOption);
+ if (IsNeedSortBootOption()) {
+ EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOption);
+ }
}
/**
--
2.22.0
next prev parent reply other threads:[~2019-07-30 8:19 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 ` [edk2-platforms] [PATCH v2 1/6] Vlv2TbltDevicePkg: Adjust the device priority Gary Lin
2019-07-30 8:16 ` [edk2-platforms] [PATCH v2 2/6] Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp Gary Lin
2019-07-30 8:16 ` Gary Lin [this message]
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-4-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