summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-02-01 22:00:40 +0100
committerLaszlo Ersek <lersek@redhat.com>2018-04-04 16:43:58 +0200
commit8596c140907ebfeabf62427686280666a4e04893 (patch)
treece6325ddc65b0a8187f738cf304abe315c19bb16 /UefiCpuPkg
parentde4f7f52f2003b854a754e3815f0a0c1c611118f (diff)
downloadedk2-8596c140907ebfeabf62427686280666a4e04893.tar.gz
edk2-8596c140907ebfeabf62427686280666a4e04893.tar.bz2
edk2-8596c140907ebfeabf62427686280666a4e04893.zip
MdePkg/BaseLib: add PatchInstructionX86()
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>
Diffstat (limited to 'UefiCpuPkg')
0 files changed, 0 insertions, 0 deletions