Re: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically

Mudusuru, Giri P <giri.p.mudusuru@...>

Reviewed-by: Giri P Mudusuru <>

Please update the comments for the opcode to be in line similar to the


-----Original Message-----
From: Yarlagadda, Satya P
Sent: Monday, August 1, 2016 4:42 AM
Cc: Ma, Maurice <>; Yao, Jiewen
<>; Mudusuru, Giri P <>
Subject: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically

we need to locate the FSP Info Header by calculating offset dynamically to
handle the scenario of FSP component is being rebased to different location.

Cc: Maurice Ma <>
Cc: Jiewen Yao <>
Cc: Giri P Mudusuru <>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <>
IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
index 00e953b..7d5fa5e 100644
--- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
+++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
@@ -14,22 +14,22 @@

global ASM_PFX(FspInfoHeaderRelativeOff)
- ;
- ; This value will be pached by the build script
- ;
- DD 0x12345678

global ASM_PFX(AsmGetFspBaseAddress)
- mov eax, ASM_PFX(AsmGetFspInfoHeader)
- sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
+ call ASM_PFX(AsmGetFspInfoHeader)
add eax, 0x1C
mov eax, dword [eax]

global ASM_PFX(AsmGetFspInfoHeader)
- mov eax, ASM_PFX(AsmGetFspInfoHeader)
- sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
+ call ASM_PFX(NextInstruction)
+ pop eax
+ sub eax, ASM_PFX(NextInstruction)
+ add eax, ASM_PFX(AsmGetFspInfoHeader)
+ ;sub eax, 012345678h
+ DB 02Dh
+ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678

Join to automatically receive all group messages.