audk/MdePkg/Include
Laszlo Ersek 8596c14090 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>
2018-04-04 16:43:58 +02:00
..
AArch64 MdePkg: Disable some Level 4 warnings for VS2017/ARM64 2018-03-19 17:05:34 +08:00
Arm MdePkg: Disable some Level 4 warnings for VS2017/ARM 2018-02-07 09:49:20 +08:00
Ebc MdePkg/BaseSafeIntLib: Add SafeIntLib class and instance 2018-01-25 09:42:20 -08:00
Guid MdePkg MemoryOverwriteControl.h: Correct typo 'bi' to 'bit' 2017-12-19 09:34:47 +08:00
Ia32 MdePkg/BaseSafeIntLib: Add SafeIntLib class and instance 2018-01-25 09:42:20 -08:00
IndustryStandard MdePkg/Tls1.h: Add TLS record header length and max payload length. 2018-03-22 08:24:45 +08:00
Ipf MdePkg/BaseSafeIntLib: Add SafeIntLib class and instance 2018-01-25 09:42:20 -08:00
Library MdePkg/BaseLib: add PatchInstructionX86() 2018-04-04 16:43:58 +02:00
Pi MdePkg/Include: Add management mode FV file type and depex. 2018-02-09 14:41:03 +08:00
Ppi MdePkg: Add definition for SecHobData PPI 2017-08-04 08:56:05 +08:00
Protocol MdePkg/SimpleTextInEx.h: Fix comments alignment 2018-02-01 14:03:45 +08:00
Uefi MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined 2018-02-23 14:22:44 +00:00
X64 MdePkg/BaseSafeIntLib: Add SafeIntLib class and instance 2018-01-25 09:42:20 -08:00
Base.h MdePkg/Include: Add VA list support for VS2017/ARM64 2018-03-19 17:05:42 +08:00
PiDxe.h Update the copyright notice format 2010-04-23 15:46:20 +00:00
PiMm.h MdePkg: Add new definitions for Management Mode. 2017-08-29 09:37:36 +08:00
PiPei.h Update the copyright notice format 2010-04-23 15:46:20 +00:00
PiSmm.h MdePkg: Follow UEFI 2.7 spec to deprecate SMM Communication ACPI Table 2017-07-27 14:08:09 +08:00
Uefi.h Update the copyright notice format 2010-04-23 15:46:20 +00:00