public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build
@ 2022-02-13 16:26 Ashraf Ali S
  2022-02-14  8:27 ` [edk2-devel] " Ni, Ray
  0 siblings, 1 reply; 3+ messages in thread
From: Ashraf Ali S @ 2022-02-13 16:26 UTC (permalink / raw)
  To: devel
  Cc: Ashraf Ali S, Chasel Chiu, Nate DeSimone, Star Zeng, Kuo Ted,
	Duggapu Chinni B, Rangasai V Chaganty, Digant H Solanki,
	Sangeetha V

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

Move FspDebug to the root of BaseFspDebugLibSerialPort since the current
nasm support for both IA32 and X64 Build, remove IA32 from INF file.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Kuo Ted <ted.kuo@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Digant H Solanki <digant.h.solanki@intel.com>
Cc: Sangeetha V <sangeetha.v@intel.com>

Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
---
 .../BaseFspDebugLibSerialPort.inf             |  8 ++-
 .../{Ia32 => }/FspDebug.nasm                  | 50 +++++++++----------
 2 files changed, 28 insertions(+), 30 deletions(-)
 rename IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/{Ia32 => }/FspDebug.nasm (86%)

diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
index 14b1899e6c..0024edf2dc 100644
--- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
+++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
@@ -1,7 +1,7 @@
 ## @file
 #  Instance of BaseFspDebugLib
 #
-#  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -16,14 +16,12 @@
   LIBRARY_CLASS                  = DebugLib
 
 #
-#  VALID_ARCHITECTURES           = IA32
+#  VALID_ARCHITECTURES           = IA32 X64
 #
 
 [Sources]
   DebugLib.c
-
-[Sources.Ia32]
-  Ia32/FspDebug.nasm
+  FspDebug.nasm
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
similarity index 86%
rename from IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
rename to IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
index 997e375c8c..ffacaa239d 100644
--- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
+++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
@@ -1,25 +1,25 @@
-;------------------------------------------------------------------------------
-;
-; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-; SPDX-License-Identifier: BSD-2-Clause-Patent
-;
-; Abstract:
-;
-;   FSP Debug functions
-;
-;------------------------------------------------------------------------------
-
-    SECTION .text
-
-;------------------------------------------------------------------------------
-; UINT32 *
-; EFIAPI
-; GetStackFramePointer (
-;   VOID
-;   );
-;------------------------------------------------------------------------------
-global ASM_PFX(GetStackFramePointer)
-ASM_PFX(GetStackFramePointer):
-    mov     eax, ebp
-    ret
-
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+; Abstract:
+;
+;   FSP Debug functions
+;
+;------------------------------------------------------------------------------
+
+    SECTION .text
+
+;------------------------------------------------------------------------------
+; UINT32 *
+; EFIAPI
+; GetStackFramePointer (
+;   VOID
+;   );
+;------------------------------------------------------------------------------
+global ASM_PFX(GetStackFramePointer)
+ASM_PFX(GetStackFramePointer):
+    mov     eax, ebp
+    ret
+
-- 
2.30.2.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build
  2022-02-13 16:26 [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build Ashraf Ali S
@ 2022-02-14  8:27 ` Ni, Ray
  2022-02-22  4:33   ` Chiu, Chasel
  0 siblings, 1 reply; 3+ messages in thread
From: Ni, Ray @ 2022-02-14  8:27 UTC (permalink / raw)
  To: devel@edk2.groups.io, S, Ashraf Ali
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Zeng, Star, Kuo, Ted,
	Duggapu, Chinni B, Chaganty, Rangasai V, Solanki, Digant H,
	V, Sangeetha

Ashraf,
GetStackFramePointer() only returns the lower 32 bits of RBP. Is that expected?


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ashraf Ali S
Sent: Monday, February 14, 2022 12:27 AM
To: devel@edk2.groups.io
Cc: S, Ashraf Ali <ashraf.ali.s@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>; Kuo, Ted <ted.kuo@intel.com>; Duggapu, Chinni B <chinni.b.duggapu@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Solanki, Digant H <digant.h.solanki@intel.com>; V, Sangeetha <sangeetha.v@intel.com>
Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build

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

Move FspDebug to the root of BaseFspDebugLibSerialPort since the current
nasm support for both IA32 and X64 Build, remove IA32 from INF file.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Kuo Ted <ted.kuo@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Digant H Solanki <digant.h.solanki@intel.com>
Cc: Sangeetha V <sangeetha.v@intel.com>

Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
---
 .../BaseFspDebugLibSerialPort.inf             |  8 ++-
 .../{Ia32 => }/FspDebug.nasm                  | 50 +++++++++----------
 2 files changed, 28 insertions(+), 30 deletions(-)
 rename IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/{Ia32 => }/FspDebug.nasm (86%)

diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
index 14b1899e6c..0024edf2dc 100644
--- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
+++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
@@ -1,7 +1,7 @@
 ## @file
 #  Instance of BaseFspDebugLib
 #
-#  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -16,14 +16,12 @@
   LIBRARY_CLASS                  = DebugLib
 
 #
-#  VALID_ARCHITECTURES           = IA32
+#  VALID_ARCHITECTURES           = IA32 X64
 #
 
 [Sources]
   DebugLib.c
-
-[Sources.Ia32]
-  Ia32/FspDebug.nasm
+  FspDebug.nasm
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
similarity index 86%
rename from IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
rename to IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
index 997e375c8c..ffacaa239d 100644
--- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
+++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
@@ -1,25 +1,25 @@
-;------------------------------------------------------------------------------
-;
-; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-; SPDX-License-Identifier: BSD-2-Clause-Patent
-;
-; Abstract:
-;
-;   FSP Debug functions
-;
-;------------------------------------------------------------------------------
-
-    SECTION .text
-
-;------------------------------------------------------------------------------
-; UINT32 *
-; EFIAPI
-; GetStackFramePointer (
-;   VOID
-;   );
-;------------------------------------------------------------------------------
-global ASM_PFX(GetStackFramePointer)
-ASM_PFX(GetStackFramePointer):
-    mov     eax, ebp
-    ret
-
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+; Abstract:
+;
+;   FSP Debug functions
+;
+;------------------------------------------------------------------------------
+
+    SECTION .text
+
+;------------------------------------------------------------------------------
+; UINT32 *
+; EFIAPI
+; GetStackFramePointer (
+;   VOID
+;   );
+;------------------------------------------------------------------------------
+global ASM_PFX(GetStackFramePointer)
+ASM_PFX(GetStackFramePointer):
+    mov     eax, ebp
+    ret
+
-- 
2.30.2.windows.1







^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build
  2022-02-14  8:27 ` [edk2-devel] " Ni, Ray
@ 2022-02-22  4:33   ` Chiu, Chasel
  0 siblings, 0 replies; 3+ messages in thread
From: Chiu, Chasel @ 2022-02-22  4:33 UTC (permalink / raw)
  To: Ni, Ray, devel@edk2.groups.io, S, Ashraf Ali
  Cc: Desimone, Nathaniel L, Zeng, Star, Kuo, Ted, Duggapu, Chinni B,
	Chaganty, Rangasai V, Solanki, Digant H, V, Sangeetha


Thanks Ray!
@S, Ashraf Ali I think we need to return 64bit pointer in 64bit build, please help to verify and confirm.

Thanks,
Chasel


> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Monday, February 14, 2022 4:27 PM
> To: devel@edk2.groups.io; S, Ashraf Ali <ashraf.ali.s@intel.com>
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>; Kuo, Ted
> <ted.kuo@intel.com>; Duggapu, Chinni B <chinni.b.duggapu@intel.com>;
> Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Solanki, Digant H
> <digant.h.solanki@intel.com>; V, Sangeetha <sangeetha.v@intel.com>
> Subject: RE: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort
> Support for X64 Build
> 
> Ashraf,
> GetStackFramePointer() only returns the lower 32 bits of RBP. Is that expected?
> 
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ashraf Ali S
> Sent: Monday, February 14, 2022 12:27 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali <ashraf.ali.s@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star
> <star.zeng@intel.com>; Kuo, Ted <ted.kuo@intel.com>; Duggapu, Chinni B
> <chinni.b.duggapu@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>; Solanki, Digant H
> <digant.h.solanki@intel.com>; V, Sangeetha <sangeetha.v@intel.com>
> Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support
> for X64 Build
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3833
> 
> Move FspDebug to the root of BaseFspDebugLibSerialPort since the current
> nasm support for both IA32 and X64 Build, remove IA32 from INF file.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Kuo Ted <ted.kuo@intel.com>
> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Digant H Solanki <digant.h.solanki@intel.com>
> Cc: Sangeetha V <sangeetha.v@intel.com>
> 
> Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
> ---
>  .../BaseFspDebugLibSerialPort.inf             |  8 ++-
>  .../{Ia32 => }/FspDebug.nasm                  | 50 +++++++++----------
>  2 files changed, 28 insertions(+), 30 deletions(-)  rename
> IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/{Ia32 => }/FspDebug.nasm
> (86%)
> 
> diff --git
> a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> index 14b1899e6c..0024edf2dc 100644
> ---
> a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> +++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSeri
> +++ alPort.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Instance of BaseFspDebugLib
>  #
> -#  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2014 - 2022, Intel Corporation. All rights
> +reserved.<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -16,14 +16,12 @@
>    LIBRARY_CLASS                  = DebugLib
> 
>  #
> -#  VALID_ARCHITECTURES           = IA32
> +#  VALID_ARCHITECTURES           = IA32 X64
>  #
> 
>  [Sources]
>    DebugLib.c
> -
> -[Sources.Ia32]
> -  Ia32/FspDebug.nasm
> +  FspDebug.nasm
> 
>  [Packages]
>    MdePkg/MdePkg.dec
> diff --git
> a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
> similarity index 86%
> rename from
> IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
> rename to IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
> index 997e375c8c..ffacaa239d 100644
> --- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.nasm
> +++ b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/FspDebug.nasm
> @@ -1,25 +1,25 @@
> -;------------------------------------------------------------------------------
> -;
> -; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> -; SPDX-License-
> Identifier: BSD-2-Clause-Patent -; -; Abstract:
> -;
> -;   FSP Debug functions
> -;
> -;------------------------------------------------------------------------------
> -
> -    SECTION .text
> -
> -;------------------------------------------------------------------------------
> -; UINT32 *
> -; EFIAPI
> -; GetStackFramePointer (
> -;   VOID
> -;   );
> -;------------------------------------------------------------------------------
> -global ASM_PFX(GetStackFramePointer)
> -ASM_PFX(GetStackFramePointer):
> -    mov     eax, ebp
> -    ret
> -
> +;----------------------------------------------------------------------
> +--------
> +;
> +; Copyright (c) 2016 - 2022, Intel Corporation. All rights
> +reserved.<BR> ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ;
> +Abstract:
> +;
> +;   FSP Debug functions
> +;
> +;----------------------------------------------------------------------
> +--------
> +
> +    SECTION .text
> +
> +;----------------------------------------------------------------------
> +--------
> +; UINT32 *
> +; EFIAPI
> +; GetStackFramePointer (
> +;   VOID
> +;   );
> +;----------------------------------------------------------------------
> +--------
> +global ASM_PFX(GetStackFramePointer)
> +ASM_PFX(GetStackFramePointer):
> +    mov     eax, ebp
> +    ret
> +
> --
> 2.30.2.windows.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-22  4:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-13 16:26 [PATCH] IntelFsp2Pkg: BaseFspDebugLibSerialPort Support for X64 Build Ashraf Ali S
2022-02-14  8:27 ` [edk2-devel] " Ni, Ray
2022-02-22  4:33   ` Chiu, Chasel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox