From: "David Wei" <david.y.wei@intel.com>
To: devel@edk2.groups.io
Cc: Hao Wu <hao.a.wu@intel.com>, Liming Gao <liming.gao@intel.com>,
Ankit Sinha <ankit.sinha@intel.com>,
Agyeman Prince <prince.agyeman@intel.com>,
Kubacki Michael A <michael.a.kubacki@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot priority by default
Date: Mon, 16 Sep 2019 15:39:19 -0700 [thread overview]
Message-ID: <c1af69d7a87613aa1fdbde16ac4847dd175aafd4.1568672712.git.david.y.wei@intel.com> (raw)
When running networks of multiple machines, Simics assigns different
disk IDs to each disk created.this change the boot priority and can't
boot from SATA HDD directly.
Clear boot priority in NVRAM can fix this issue.
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Agyeman Prince <prince.agyeman@intel.com>
Cc: Kubacki Michael A <michael.a.kubacki@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: David Wei <david.y.wei@intel.com>
---
.../Library/PlatformBootManagerLib/BdsPlatform.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 953a4a6c15..6644ce124e 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -338,10 +338,18 @@ PlatformBootManagerBeforeConsole (
VOID
)
{
-// EFI_HANDLE Handle;
-// EFI_STATUS Status;
+ EFI_BOOT_MANAGER_LOAD_OPTION *NvBootOptions;
+ UINTN NvBootOptionCount;
+ UINTN Index;
+ EFI_STATUS Status;
+
+ DEBUG((DEBUG_INFO, "PlatformBootManagerBeforeConsole\n"));
+
+ NvBootOptions = EfiBootManagerGetLoadOptions(&NvBootOptionCount, LoadOptionTypeBoot);
+ for (Index = 0; Index < NvBootOptionCount; Index++) {
+ Status = EfiBootManagerDeleteLoadOptionVariable(NvBootOptions[Index].OptionNumber, LoadOptionTypeBoot);
+ }
- DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n"));
InstallDevicePathCallback ();
VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,
--
2.16.2.windows.1
next reply other threads:[~2019-09-16 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 22:39 David Wei [this message]
2019-09-19 4:07 ` [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot priority by default Kubacki, Michael A
2019-09-23 8:24 ` Nate DeSimone
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=c1af69d7a87613aa1fdbde16ac4847dd175aafd4.1568672712.git.david.y.wei@intel.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