24 IN UINT16 *Instruction
32 Movt = (*Instruction << 16) | (*(Instruction + 1));
39 Address = (UINT16)(Movt & 0x000000ff);
40 Address |= (UINT16)((Movt >> 4) & 0x0000f700);
41 Address |= (((Movt & BIT26) != 0) ? BIT11 : 0);
53 IN OUT UINT16 *Instruction,
60 Patch = ((Address >> 12) & 0x000f);
61 Patch |= (((Address & BIT11) != 0) ? BIT10 : 0);
63 *(Instruction) = (*Instruction & ~0x040f) | Patch;
66 Patch = Address & 0x000000ff;
67 Patch |= ((Address << 4) & 0x00007000);
70 *Instruction = (*Instruction & ~0x70ff) | Patch;
84 IN UINT16 *Instructions
104 IN OUT UINT16 *Instructions,
134 IN OUT CHAR8 **FixupData,
141 Fixup16 = (UINT16 *)Fixup;
143 switch ((*Reloc) >> 12) {
144 case EFI_IMAGE_REL_BASED_ARM_MOV32T:
148 if (*FixupData !=
NULL) {
151 CopyMem (*FixupData, Fixup16,
sizeof (UINT64));
152 *FixupData = *FixupData +
sizeof (UINT64);
157 case EFI_IMAGE_REL_BASED_ARM_MOV32A:
183 if ((Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || (Machine == IMAGE_FILE_MACHINE_EBC)) {
207 IN OUT CHAR8 **FixupData,
214 Fixup16 = (UINT16 *)Fixup;
216 switch ((*Reloc) >> 12) {
217 case EFI_IMAGE_REL_BASED_ARM_MOV32T:
224 *FixupData = *FixupData +
sizeof (UINT64);
227 case EFI_IMAGE_REL_BASED_ARM_MOV32A:
231 DEBUG ((DEBUG_ERROR,
"PeHotRelocateEx:unknown fixed type\n"));
VOID ThumbMovwMovtImmediatePatch(IN OUT UINT16 *Instructions, IN UINT32 Address)
UINT32 ThumbMovwMovtImmediateAddress(IN UINT16 *Instructions)
VOID ThumbMovtImmediatePatch(IN OUT UINT16 *Instruction, IN UINT16 Address)
UINT16 ThumbMovtImmediateAddress(IN UINT16 *Instruction)
RETURN_STATUS PeHotRelocateImageEx(IN UINT16 *Reloc, IN OUT CHAR8 *Fixup, IN OUT CHAR8 **FixupData, IN UINT64 Adjust)
RETURN_STATUS PeCoffLoaderRelocateImageEx(IN UINT16 *Reloc, IN OUT CHAR8 *Fixup, IN OUT CHAR8 **FixupData, IN UINT64 Adjust)
BOOLEAN PeCoffLoaderImageFormatSupported(IN UINT16 Machine)
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define RETURN_UNSUPPORTED
#define ALIGN_POINTER(Pointer, Alignment)
#define DEBUG(Expression)