* [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent @ 2016-10-13 1:03 Maurice Ma 2016-10-13 1:56 ` Mudusuru, Giri P 0 siblings, 1 reply; 3+ messages in thread From: Maurice Ma @ 2016-10-13 1:03 UTC (permalink / raw) To: edk2-devel; +Cc: Maurice Ma, Jiewen Yao, Giri P Mudusuru 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> --- 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 a848dcbc0298..ad631943e32d 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) -- 1.9.5.msysgit.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent 2016-10-13 1:03 [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent Maurice Ma @ 2016-10-13 1:56 ` Mudusuru, Giri P 2016-10-13 4:02 ` Ma, Maurice 0 siblings, 1 reply; 3+ messages in thread From: Mudusuru, Giri P @ 2016-10-13 1:56 UTC (permalink / raw) To: Ma, Maurice, edk2-devel@lists.01.org; +Cc: Yao, Jiewen Thanks for fixing the bug Maurice. Please fix the typo funcitons in the title during checkin Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> > -----Original Message----- > From: Ma, Maurice > Sent: Wednesday, October 12, 2016 6:03 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: [edk2] [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons 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> > --- > 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 a848dcbc0298..ad631943e32d 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) > -- > 1.9.5.msysgit.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent 2016-10-13 1:56 ` Mudusuru, Giri P @ 2016-10-13 4:02 ` Ma, Maurice 0 siblings, 0 replies; 3+ messages in thread From: Ma, Maurice @ 2016-10-13 4:02 UTC (permalink / raw) To: Mudusuru, Giri P; +Cc: Yao, Jiewen, edk2-devel@lists.01.org Hi, Giri, Sure, I'll fix the typo. Thank you for the review! -Maurice -----Original Message----- From: Mudusuru, Giri P Sent: Wednesday, October 12, 2016 6:56 PM To: Ma, Maurice; edk2-devel@lists.01.org Cc: Yao, Jiewen Subject: RE: [edk2] [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent Thanks for fixing the bug Maurice. Please fix the typo funcitons in the title during checkin Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> > -----Original Message----- > From: Ma, Maurice > Sent: Wednesday, October 12, 2016 6:03 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: [edk2] [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons > 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> > --- > 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 a848dcbc0298..ad631943e32d 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) > -- > 1.9.5.msysgit.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-13 4:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-13 1:03 [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent Maurice Ma 2016-10-13 1:56 ` Mudusuru, Giri P 2016-10-13 4:02 ` Ma, Maurice
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox