public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashraf Ali S" <ashraf.ali.s@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Chiu, Chasel" <chasel.chiu@intel.com>
Cc: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] IntelFsp2Pkg: Fix NASM X64 build warnings.
Date: Sat, 18 Mar 2023 13:04:20 +0000	[thread overview]
Message-ID: <DM4PR11MB5280D51A983043F2B12C1299D7829@DM4PR11MB5280.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230317172050.1228-1-chasel.chiu@intel.com>

Hi., Chasel

RAX holds the FsptImageBaseAddress, the AND operation is performed to clear the upper 32bits of RAX registers.
Don't we have to clear the upper 32bit of RAX registers?

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chiu, Chasel
Sent: Friday, March 17, 2023 10:51 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2-devel] [PATCH v2] IntelFsp2Pkg: Fix NASM X64 build warnings.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4377

Fix below warnings generated by NASM X64 build:
/X64/FspHelper.iii:26: warning: signed dword value exceeds bounds
/X64/FspHelper.iii:35: warning: signed dword value exceeds bounds
/X64/FspApiEntryT.iii:320: warning: dword data exceeds bounds

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm | 4 ++--
 IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
index cdebe90fab..56d6abaea6 100644
--- a/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
+++ b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
@@ -317,7 +317,7 @@ Done:
    xor   eax, eax    cmp   edx, 0    jnz   Exit2-   mov   eax, 0800000000000000Eh+   mov   rax, 0800000000000000Eh  Exit2:    jmp   rbp@@ -464,7 +464,7 @@ ParamValid:
   ; Sec Platform Init   ;   CALL_YMM  ASM_PFX(SecPlatformInit)-  cmp       eax, 0+  cmp       rax, 0   jnz       TempRamInitExit    ; Load microcodediff --git a/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm b/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
index 71624a3aad..ec9140b73c 100644
--- a/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
+++ b/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
@@ -23,7 +23,7 @@ ASM_PFX(AsmGetFspInfoHeader):
 global ASM_PFX(FspInfoHeaderRelativeOff) ASM_PFX(FspInfoHeaderRelativeOff):    DD    0x12345678               ; This value must be patched by the build script-   and   rax, 0xffffffff+   mov   eax, eax                 ; equal to and rax, 0xFFFFFFFF    ret  global ASM_PFX(AsmGetFspInfoHeaderNoStack)@@ -32,5 +32,5 @@ ASM_PFX(AsmGetFspInfoHeaderNoStack):
    lea   rcx, [ASM_PFX(FspInfoHeaderRelativeOff)]    mov   ecx, [rcx]    sub   rax, rcx-   and   rax, 0xffffffff+   mov   eax, eax                 ; equal to and rax, 0xFFFFFFFF    jmp   rdi-- 
2.35.0.windows.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101356): https://edk2.groups.io/g/devel/message/101356
Mute This Topic: https://groups.io/mt/97678369/6226280
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ashraf.ali.s@intel.com] -=-=-=-=-=-=



  reply	other threads:[~2023-03-18 13:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 17:20 [PATCH v2] IntelFsp2Pkg: Fix NASM X64 build warnings Chiu, Chasel
2023-03-18 13:04 ` Ashraf Ali S [this message]
2023-03-18 22:07   ` [edk2-devel] " Marvin Häuser
2023-03-19  9:07     ` Ashraf Ali S
2023-03-19  9:36       ` Marvin Häuser
2023-03-19 16:57         ` Ashraf Ali S
2023-03-18 22:06 ` Marvin Häuser
2023-03-20  6:03 ` Ni, Ray
2023-03-20  7:31   ` Pedro Falcato
2023-03-21 23:05     ` Nate DeSimone
2023-03-22  0:17       ` Chiu, Chasel

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=DM4PR11MB5280D51A983043F2B12C1299D7829@DM4PR11MB5280.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