diff options
author | Anderw Fish <afish@apple.com> | 2014-09-09 06:50:51 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-09 06:50:51 +0000 |
commit | 07da1ac8c46425cb401cc5f356ab77b9cc1c334d (patch) | |
tree | ebe576744f54efd059fd6b1bd2bafcc294f6c97a /UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c | |
parent | 19ee4a904982cfacdcb8c578c5d421162fa9488d (diff) | |
download | edk2-platforms-07da1ac8c46425cb401cc5f356ab77b9cc1c334d.tar.xz |
UefiCpuPkg: CpuExceptionHandlerLib: Make self modifying code work with Xcode
CpuExceptionHandlerLib has code that contains absolute relocations, not supported by
Xcode for X64, and it then copies this code to an alternate location in memory. It is
very hard to write IP relative self-modifiying code. I had to update AsmVectorNumFixup()
to also patch in the absolute addressess after the code was copied.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16068 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c')
-rw-r--r-- | UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c index c38f0e10dd..6739a2cc3c 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c @@ -119,7 +119,7 @@ InitializeCpuInterruptHandlers ( (VOID *) TemplateMap.ExceptionStart,
TemplateMap.ExceptionStubHeaderSize
);
- AsmVectorNumFixup ((VOID *) InterruptEntry, (UINT8) Index);
+ AsmVectorNumFixup ((VOID *) InterruptEntry, (UINT8) Index, (VOID *) TemplateMap.ExceptionStart);
InterruptEntry += TemplateMap.ExceptionStubHeaderSize;
}
|