diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2017-05-17 12:19:16 -0700 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:49 +0800 |
commit | 5ac26339f34a468216743ad76e664a94d8e4219e (patch) | |
tree | a35746de513b4b550c5348a87bdde48202091446 /Platform/BroxtonPlatformPkg | |
parent | 7f7bd3ed1471c811007fc23d1559407641daa673 (diff) | |
download | edk2-platforms-5ac26339f34a468216743ad76e664a94d8e4219e.tar.xz |
UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issues
https://bugzilla.tianocore.org/show_bug.cgi?id=565
Fix NASM compatibility issues with XCODE5 tool chain.
The XCODE5 tool chain for X64 builds using PIE (Position
Independent Executable). For most assembly sources using
PIE mode does not cause any issues.
However, if assembly code is copied to a different address
(such as AP startup code in the MpInitLib), then the
X64 assembly source must be implemented to be compatible
with PIE mode that uses RIP relative addressing.
The specific changes in this patch are:
* Use LEA instruction instead of MOV instruction to lookup
the addresses of functions.
* The assembly function RendezvousFunnelProc() is copied
below 1MB so it can be executed as part of the MpInitLib
AP startup sequence. RendezvousFunnelProc() calls the
external function InitializeFloatingPointUnits(). The
absolute address of InitializeFloatingPointUnits() is
added to the MP_CPU_EXCHANGE_INFO structure that is passed
to RendezvousFunnelProc().
Cc: Andrew Fish <afish@apple.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
(cherry picked from commit 3b2928b46987693caaaeefbb7b799d1e1de803c0)
Diffstat (limited to 'Platform/BroxtonPlatformPkg')
0 files changed, 0 insertions, 0 deletions