From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>,
"Ni, Ray" <ray.ni@intel.com>, Sami Mujawar <sami.mujawar@arm.com>
Subject: Re: [edk2-devel] [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link error
Date: Fri, 2 Aug 2019 05:28:08 +0000 [thread overview]
Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B81E41F@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190801205541.24792-2-michael.d.kinney@intel.com>
Hi Mike,
Sorry for late update. I missed the v1 version.
I found there is a API named MultU64x64 may fix this issue. Can we use it in SLIT_ELEMENT() macro?
Thanks,
Zhichao
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Michael D Kinney
> Sent: Friday, August 2, 2019 4:56 AM
> To: devel@edk2.groups.io
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ray <ray.ni@intel.com>;
> Gao, Zhichao <zhichao.gao@intel.com>; Sami Mujawar
> <sami.mujawar@arm.com>
> Subject: [edk2-devel] [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link error
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=1970
>
> Update local variable in ParseAcpiSlot() to be UINT32 instead of UINT64 to
> avoid 64-bit multiply operation in the SLIT_ELEMENT() macro.
>
> If LocalityCount is >= MAX_UINT32 and then skip the validation check and
> print an INFO message instead.
>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> .../Parsers/Slit/SlitParser.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> index 1f9dac66ee..6913ad8b31 100644
> ---
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitPars
> +++ er.c
> @@ -57,8 +57,8 @@ ParseAcpiSlit (
> )
> {
> UINT32 Offset;
> - UINT64 Count;
> - UINT64 Index;
> + UINT32 Count;
> + UINT32 Index;
> UINT64 LocalityCount;
> UINT8* LocalityPtr;
> CHAR16 Buffer[80]; // Used for AsciiName param of ParseAcpi @@ -105,6
> +105,11 @@ ParseAcpiSlit (
> }
> }
>
> + if (LocalityCount >= MAX_UINT32) {
> + Print (L"INFO: Skipping validation of System Localities as locality count
> is >= MAX_UINT32\n");
> + return;
> + }
> +
> // Validate
> for (Count = 0; Count < LocalityCount; Count++) {
> for (Index = 0; Index < LocalityCount; Index++) {
> --
> 2.21.0.windows.1
>
>
>
next prev parent reply other threads:[~2019-08-02 5:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 20:55 [Patch v2 0/2] ShellPkg: Fix IA32 build failure in acpiview Michael D Kinney
2019-08-01 20:55 ` [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link error Michael D Kinney
2019-08-02 5:28 ` Gao, Zhichao [this message]
2019-08-02 15:01 ` [edk2-devel] " Michael D Kinney
2019-08-01 20:55 ` [Patch v2 2/2] ShellPkg: Add shell with all commands integrated Michael D Kinney
2019-08-02 5:35 ` [edk2-devel] " Gao, Zhichao
2019-08-02 16:18 ` Carsey, Jaben
2019-08-02 21:00 ` Michael D Kinney
2019-08-01 22:46 ` [Patch v2 0/2] ShellPkg: Fix IA32 build failure in acpiview Carsey, Jaben
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=3CE959C139B4C44DBEA1810E3AA6F9000B81E41F@SHSMSX101.ccr.corp.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