From: "JamesWang [王家明]" <JamesWang@ami.com>
To: "Oram, Isaac W" <isaac.w.oram@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH v2 1/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
Date: Fri, 16 Sep 2022 06:21:22 +0000 [thread overview]
Message-ID: <PH0PR10MB575683272B300BFF6A6AC5C7BF489@PH0PR10MB5756.namprd10.prod.outlook.com> (raw)
In-Reply-To: <SA1PR11MB5801A321FDCBD68E811C9EDBD0489@SA1PR11MB5801.namprd11.prod.outlook.com>
Isaac,
Thank you for the review and help for this commit. Yes my git version is old and I will update it to the latest one. Also I have set the config for CRLF like you told me.
Thanks!
-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Friday, September 16, 2022 8:09 AM
To: devel@edk2.groups.io; Oram, Isaac W <isaac.w.oram@intel.com>; JamesWang [王家明] <JamesWang@ami.com>
Cc: Dong, Eric <eric.dong@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v2 1/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
Pushed as 76fc44fecb..801d003703
Note I fixed two nearby comments and my editor cleaned up trailing whitespace automatically.
- // [F2]/[F7]
+ // [F2]
And
- // Register F7 only when the mBootMenuOptionNumber is valid
+ // Register [F7] only when the mBootMenuOptionNumber is valid
Regards,
Isaac
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Isaac Oram
Sent: Thursday, September 15, 2022 5:06 PM
To: JamesWang [王家明] <JamesWang@ami.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH v2 1/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
James,
I cannot apply the patch. I can fix it up to push though, so I don't need you to resolve. But for a bigger patch, I would need help resolving.
I note that you have special characters in your name. I doubt that matters, but I would probably try to keep it normal 8 bit ASCII. I think that the script many maintainers use will lose those characters in favor of "?".
I note that you are using an old version of git. Also probably not the issue.
I note that you seem to have LF line endings and I have CRLF when I generate and send patches. Maybe try configuring:
git config --global am.keepcr true
git config --global core.autocrlf false
These are my notes on config. I am not sure if they are relevant still. Especially the second one. I don't seem to have that set anymore. Setting keepcr false caused an error applying patch for me.
Regards,
Isaac
-----Original Message-----
From: JamesWang [王家明] <JamesWang@ami.com>
Sent: Tuesday, September 13, 2022 2:36 AM
To: devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [PATCH v2 1/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
Check if mBootMenuOptionNumber is valid or not before calling RegisterBootOptionHotkey to avoid overwriting Boot0000
Cc: Eric Dong <eric.dong@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: James Wang <jameswang@ami.com>
---
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
index 6e3c21f4f052..34c971f3780b 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOpt
+++ ion.c
@@ -461,12 +461,17 @@ RegisterStaticHotkey (
RegisterBootOptionHotkey ((UINT16) mSetupOptionNumber, &F2.Key, TRUE);
}
- F7.Key.ScanCode = SCAN_F7;
- F7.Key.UnicodeChar = CHAR_NULL;
- F7.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;
- F7.KeyState.KeyToggleState = 0;
- mBootMenuBoot = !EnterSetup;
- RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7.Key, mBootMenuBoot);
+ //
+ // Register F7 only when the mBootMenuOptionNumber is valid // if
+ (mBootMenuOptionNumber != LoadOptionNumberUnassigned) {
+ F7.Key.ScanCode = SCAN_F7;
+ F7.Key.UnicodeChar = CHAR_NULL;
+ F7.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;
+ F7.KeyState.KeyToggleState = 0;
+ mBootMenuBoot = !EnterSetup;
+ RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7.Key,
+ mBootMenuBoot); }
}
--
2.13.2.windows.1
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
prev parent reply other threads:[~2022-09-16 6:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 9:36 [PATCH v2 0/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000 JamesWang [王家明]
2022-09-13 9:36 ` [PATCH v2 1/1] " JamesWang [王家明]
2022-09-14 3:03 ` [edk2-devel] " Benjamin Doron
2022-09-16 0:05 ` Isaac Oram
[not found] ` <17152E7C7C5C0A9D.29000@groups.io>
2022-09-16 0:08 ` [edk2-devel] " Isaac Oram
2022-09-16 6:21 ` JamesWang [王家明] [this message]
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=PH0PR10MB575683272B300BFF6A6AC5C7BF489@PH0PR10MB5756.namprd10.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