From: Maurice Ma <maurice.ma@intel.com>
To: edk2-devel@lists.01.org
Cc: Maurice Ma <maurice.ma@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Giri P Mudusuru <giri.p.mudusuru@intel.com>
Subject: [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent
Date: Wed, 12 Oct 2016 18:03:17 -0700 [thread overview]
Message-ID: <7ea97596e527f44a8d69170d0481c21ff087c565.1476320550.git.maurice.ma@intel.com> (raw)
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
next reply other threads:[~2016-10-13 1:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 1:03 Maurice Ma [this message]
2016-10-13 1:56 ` [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent Mudusuru, Giri P
2016-10-13 4:02 ` Ma, Maurice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ea97596e527f44a8d69170d0481c21ff087c565.1476320550.git.maurice.ma@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox