diff options
author | Maurice Ma <maurice.ma@intel.com> | 2016-10-12 18:00:44 -0700 |
---|---|---|
committer | Maurice Ma <maurice.ma@intel.com> | 2016-10-12 20:57:45 -0700 |
commit | 08354c34486947da17a36a605f9a4b000132123f (patch) | |
tree | 638f743206188a5914780e2219e111019c3c8051 /IntelFsp2Pkg/FspSecCore | |
parent | 75351daf3e92c86b3d1669ba0e6d95a6e9a270a3 (diff) | |
download | edk2-08354c34486947da17a36a605f9a4b000132123f.zip edk2-08354c34486947da17a36a605f9a4b000132123f.tar.gz edk2-08354c34486947da17a36a605f9a4b000132123f.tar.bz2 |
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>
Diffstat (limited to 'IntelFsp2Pkg/FspSecCore')
-rw-r--r-- | IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm index a848dcb..ad63194 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)
|