From 08354c34486947da17a36a605f9a4b000132123f Mon Sep 17 00:00:00 2001 From: Maurice Ma Date: Wed, 12 Oct 2016 18:00:44 -0700 Subject: [PATCH] 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 Cc: Giri P Mudusuru Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma Reviewed-by: Giri P Mudusuru --- IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm index a848dcbc02..ad631943e3 100644 --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm @@ -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) -- 2.39.2