* [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready
@ 2016-08-18 5:20 Satya Yarlagadda
2016-08-19 23:20 ` Mudusuru, Giri P
2016-08-22 8:19 ` Yao, Jiewen
0 siblings, 2 replies; 3+ messages in thread
From: Satya Yarlagadda @ 2016-08-18 5:20 UTC (permalink / raw)
To: edk2-devel; +Cc: Maurice Ma, Jiewen Yao, Giri P Mudusuru
we need to locate the FSP Info Header before the stack is initialized to
access the cfg region for any UPD. Hence adding the
AsmGetFspInfoHeaderNoStack function to support it.
Note: This function is there in IntelFspPkg but got removed in IntelFsp2Pkg
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
---
IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
index 43eac97..a848dcb 100644
--- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
+++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
@@ -14,6 +14,8 @@
SECTION .text
global ASM_PFX(FspInfoHeaderRelativeOff)
+ASM_PFX(FspInfoHeaderRelativeOff):
+ DD 0x12345678 ; This value must be patched by the build script
global ASM_PFX(AsmGetFspBaseAddress)
ASM_PFX(AsmGetFspBaseAddress):
@@ -29,6 +31,11 @@ ASM_PFX(NextInstruction):
pop eax
sub eax, ASM_PFX(NextInstruction)
add eax, ASM_PFX(AsmGetFspInfoHeader)
- DB 02Dh ; opcode of sub eax, imm32
-ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 ; sub eax, FspInfoHeaderRelativeOff
+ sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
ret
+
+global ASM_PFX(AsmGetFspInfoHeaderNoStack)
+ASM_PFX(AsmGetFspInfoHeaderNoStack):
+ mov eax, ASM_PFX(AsmGetFspInfoHeader)
+ sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
+ jmp edi
--
2.9.2.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready
2016-08-18 5:20 [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready Satya Yarlagadda
@ 2016-08-19 23:20 ` Mudusuru, Giri P
2016-08-22 8:19 ` Yao, Jiewen
1 sibling, 0 replies; 3+ messages in thread
From: Mudusuru, Giri P @ 2016-08-19 23:20 UTC (permalink / raw)
To: Yarlagadda, Satya P, edk2-devel@lists.01.org; +Cc: Ma, Maurice, Yao, Jiewen
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
> -----Original Message-----
> From: Yarlagadda, Satya P
> Sent: Wednesday, August 17, 2016 10:21 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Mudusuru, Giri P <giri.p.mudusuru@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack
> is ready
>
> we need to locate the FSP Info Header before the stack is initialized to
> access the cfg region for any UPD. Hence adding the
> AsmGetFspInfoHeaderNoStack function to support it.
>
> Note: This function is there in IntelFspPkg but got removed in IntelFsp2Pkg
>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
> ---
> IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> index 43eac97..a848dcb 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> @@ -14,6 +14,8 @@
> SECTION .text
>
> global ASM_PFX(FspInfoHeaderRelativeOff)
> +ASM_PFX(FspInfoHeaderRelativeOff):
> + DD 0x12345678 ; This value must be patched by the build script
>
> global ASM_PFX(AsmGetFspBaseAddress)
> ASM_PFX(AsmGetFspBaseAddress):
> @@ -29,6 +31,11 @@ ASM_PFX(NextInstruction):
> pop eax
> sub eax, ASM_PFX(NextInstruction)
> add eax, ASM_PFX(AsmGetFspInfoHeader)
> - DB 02Dh ; opcode of sub eax, imm32
> -ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 ; sub eax,
> FspInfoHeaderRelativeOff
> + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> ret
> +
> +global ASM_PFX(AsmGetFspInfoHeaderNoStack)
> +ASM_PFX(AsmGetFspInfoHeaderNoStack):
> + mov eax, ASM_PFX(AsmGetFspInfoHeader)
> + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> + jmp edi
> --
> 2.9.2.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready
2016-08-18 5:20 [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready Satya Yarlagadda
2016-08-19 23:20 ` Mudusuru, Giri P
@ 2016-08-22 8:19 ` Yao, Jiewen
1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2016-08-22 8:19 UTC (permalink / raw)
To: Yarlagadda, Satya P, edk2-devel@lists.01.org
Reviewed-by: Jiewen.yao@intel.com
> -----Original Message-----
> From: Yarlagadda, Satya P
> Sent: Thursday, August 18, 2016 1:21 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Mudusuru, Giri P <giri.p.mudusuru@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before
> stack is ready
>
> we need to locate the FSP Info Header before the stack is initialized to
> access the cfg region for any UPD. Hence adding the
> AsmGetFspInfoHeaderNoStack function to support it.
>
> Note: This function is there in IntelFspPkg but got removed in IntelFsp2Pkg
>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
> ---
> IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> index 43eac97..a848dcb 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> @@ -14,6 +14,8 @@
> SECTION .text
>
> global ASM_PFX(FspInfoHeaderRelativeOff)
> +ASM_PFX(FspInfoHeaderRelativeOff):
> + DD 0x12345678 ; This value must be patched by
> the build script
>
> global ASM_PFX(AsmGetFspBaseAddress)
> ASM_PFX(AsmGetFspBaseAddress):
> @@ -29,6 +31,11 @@ ASM_PFX(NextInstruction):
> pop eax
> sub eax, ASM_PFX(NextInstruction)
> add eax, ASM_PFX(AsmGetFspInfoHeader)
> - DB 02Dh ;
> opcode of sub eax, imm32
> -ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 ; sub
> eax, FspInfoHeaderRelativeOff
> + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> ret
> +
> +global ASM_PFX(AsmGetFspInfoHeaderNoStack)
> +ASM_PFX(AsmGetFspInfoHeaderNoStack):
> + mov eax, ASM_PFX(AsmGetFspInfoHeader)
> + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> + jmp edi
> --
> 2.9.2.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-22 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 5:20 [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready Satya Yarlagadda
2016-08-19 23:20 ` Mudusuru, Giri P
2016-08-22 8:19 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox