From: "Wang, Sunny (HPS SW)" <sunnywang@hpe.com>
To: Ruiyu Ni <ruiyu.ni@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Jie Lin <jie.lin@intel.com>,
"Haskell, Darrell" <darrell.haskell@hpe.com>,
"Shifflett, Joseph" <joseph.shifflett@hpe.com>,
"Wang, Sunny (HPS SW)" <sunnywang@hpe.com>
Subject: Re: [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery####
Date: Wed, 16 Nov 2016 09:05:21 +0000 [thread overview]
Message-ID: <CS1PR84MB0295219311B6A51168F3AEAEA8BE0@CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20161115100425.299856-3-ruiyu.ni@intel.com>
Looks good to me.
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Just have a suggestion below.
For the change below, it is related to Driver#### rather than PlatformRecovery####. Could you add more comment for this Driver#### related change into your log? It's fine to not update your patch. You can directly update it when you check in your code change.
+
+ if (!EFI_ERROR (LoadOptions[Index].Status) &&
+ (LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT)
+ != 0) {
ReconnectAll = TRUE;
}
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Tuesday, November 15, 2016 6:04 PM
To: edk2-devel@lists.01.org
Cc: Jie Lin <jie.lin@intel.com>
Subject: [edk2] [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery####
The implementation doesn't check the LoadOptions[Index].Status but only depends on the Status returned from EfiBootManagerProcessLoadOption(), which results only the first PlatformRecovery#### runs.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jie Lin <jie.lin@intel.com>
---
MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 72adc51..48e5351 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -443,17 +443,25 @@ ProcessLoadOptions (
LoadOptionType = LoadOptions[Index].OptionType;
}
ASSERT (LoadOptionType == LoadOptions[Index].OptionType);
+ ASSERT (LoadOptionType != LoadOptionTypeBoot);
Status = EfiBootManagerProcessLoadOption (&LoadOptions[Index]);
+ //
+ // Status indicates whether the load option is loaded and executed
+ // LoadOptions[Index].Status is what the load option returns
+ //
if (!EFI_ERROR (Status)) {
- if (LoadOptionType == LoadOptionTypePlatformRecovery) {
- //
- // Stop processing if any entry is successful
- //
+ //
+ // Stop processing if any PlatformRecovery#### returns success.
+ //
+ if ((LoadOptions[Index].Status == EFI_SUCCESS) &&
+ (LoadOptionType == LoadOptionTypePlatformRecovery)) {
break;
}
- if ((LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT) != 0) {
+
+ if (!EFI_ERROR (LoadOptions[Index].Status) &&
+ (LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT)
+ != 0) {
ReconnectAll = TRUE;
}
}
--
2.9.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2016-11-16 9:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 10:04 [PATCH 0/3] Fix 2 bugs relating to PlatformRecovery Ruiyu Ni
2016-11-15 10:04 ` [PATCH 1/3] MdeModulePkg/UefiBootManagerLib: Refine the debug message Ruiyu Ni
2016-11-16 9:03 ` Wang, Sunny (HPS SW)
2016-11-15 10:04 ` [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery#### Ruiyu Ni
2016-11-16 9:05 ` Wang, Sunny (HPS SW) [this message]
2016-11-15 10:04 ` [PATCH 3/3] MdeModulePkg/BdsDxe: Avoid overwriting PlatformRecovery#### Ruiyu Ni
2016-11-16 9:08 ` Wang, Sunny (HPS SW)
2016-11-16 10:16 ` Ni, Ruiyu
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=CS1PR84MB0295219311B6A51168F3AEAEA8BE0@CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.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