mirror of https://github.com/acidanthera/audk.git
8596c14090
Some edk2 modules generate X86 machine code at module execution time by: - compiling "template" code with NASM at module build time, - linking the object code into the module, - and patching the immediate (constant) operands of some instructions when the module is executed. Add a helper function to BaseLib so that the C code performing the patching is easier to read and maintain. The implementation in this patch is taken mainly from Mike Kinney's mailing list messages at <http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F5B895C360@ORSMSX113.amr.corp.intel.com>, <http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F5B898BF66@ORSMSX112.amr.corp.intel.com>. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=866 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> |
||
---|---|---|
.. | ||
AArch64 | ||
Arm | ||
Ebc | ||
Ia32 | ||
Ipf | ||
X64 | ||
ARShiftU64.c | ||
BaseLib.inf | ||
BaseLib.uni | ||
BaseLibInternals.h | ||
BitField.c | ||
CheckSum.c | ||
ChkStkGcc.c | ||
Cpu.c | ||
CpuDeadLoop.c | ||
DivS64x64Remainder.c | ||
DivU64x32.c | ||
DivU64x32Remainder.c | ||
DivU64x64Remainder.c | ||
FilePaths.c | ||
GetPowerOfTwo32.c | ||
GetPowerOfTwo64.c | ||
HighBitSet32.c | ||
HighBitSet64.c | ||
LRotU32.c | ||
LRotU64.c | ||
LShiftU64.c | ||
LinkedList.c | ||
LongJump.c | ||
LowBitSet32.c | ||
LowBitSet64.c | ||
Math64.c | ||
ModU64x32.c | ||
MultS64x64.c | ||
MultU64x32.c | ||
MultU64x64.c | ||
RRotU32.c | ||
RRotU64.c | ||
RShiftU64.c | ||
SafeString.c | ||
SetJump.c | ||
String.c | ||
SwapBytes16.c | ||
SwapBytes32.c | ||
SwapBytes64.c | ||
SwitchStack.c | ||
Unaligned.c | ||
X86DisablePaging32.c | ||
X86DisablePaging64.c | ||
X86EnablePaging32.c | ||
X86EnablePaging64.c | ||
X86FxRestore.c | ||
X86FxSave.c | ||
X86GetInterruptState.c | ||
X86MemoryFence.c | ||
X86Msr.c | ||
X86PatchInstruction.c | ||
X86RdRand.c | ||
X86ReadGdtr.c | ||
X86ReadIdtr.c | ||
X86Thunk.c | ||
X86WriteGdtr.c | ||
X86WriteIdtr.c |