public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Isaac Oram" <isaac.w.oram@intel.com>
To: "JamesWang [王家明]" <JamesWang@ami.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
	"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH v2 1/1] BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
Date: Fri, 16 Sep 2022 00:05:42 +0000	[thread overview]
Message-ID: <SA1PR11MB580115512A6CFA440881173DD0489@SA1PR11MB5801.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220913093457.14644-2-jameswang@ami.com>

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.

  parent reply	other threads:[~2022-09-16  0:05 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 [this message]
     [not found]   ` <17152E7C7C5C0A9D.29000@groups.io>
2022-09-16  0:08     ` Isaac Oram
2022-09-16  6:21       ` JamesWang [王家明]

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=SA1PR11MB580115512A6CFA440881173DD0489@SA1PR11MB5801.namprd11.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