IntelFsp2Pkg/FspSecCore: Make FSP functions position independent
The current AsmGetFspInfoHeader function in FspHeader.nasm is position dependent code since it uses absolute address. Change to use relative address instead to make it position independent. 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: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
This commit is contained in:
@@ -31,7 +31,7 @@ ASM_PFX(NextInstruction):
|
||||
pop eax
|
||||
sub eax, ASM_PFX(NextInstruction)
|
||||
add eax, ASM_PFX(AsmGetFspInfoHeader)
|
||||
sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
|
||||
sub eax, dword [eax - ASM_PFX(AsmGetFspInfoHeader) + ASM_PFX(FspInfoHeaderRelativeOff)]
|
||||
ret
|
||||
|
||||
global ASM_PFX(AsmGetFspInfoHeaderNoStack)
|
||||
|
Reference in New Issue
Block a user