summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/Common/PeCoffLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C/Common/PeCoffLib.h')
-rw-r--r--BaseTools/Source/C/Common/PeCoffLib.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Common/PeCoffLib.h b/BaseTools/Source/C/Common/PeCoffLib.h
index 31c6f0fca1..fe6b29251b 100644
--- a/BaseTools/Source/C/Common/PeCoffLib.h
+++ b/BaseTools/Source/C/Common/PeCoffLib.h
@@ -159,6 +159,7 @@ PeCoffLoaderGetEntryPoint (
**/
UINT16
+EFIAPI
ThumbMovtImmediateAddress (
IN UINT16 *Instruction
);
@@ -171,11 +172,41 @@ ThumbMovtImmediateAddress (
**/
VOID
+EFIAPI
ThumbMovtImmediatePatch (
IN OUT UINT16 *Instruction,
IN UINT16 Address
);
+/**
+ Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
+ return the immediate data encoded in the two` instruction
+
+ @param Instructions Pointer to ARM MOVW/MOVT insturction pair
+
+ @return Immediate address encoded in the instructions
+
+**/
+UINT32
+EFIAPI
+ThumbMovwMovtImmediateAddress (
+ IN UINT16 *Instructions
+ );
+
+/**
+ Update an ARM MOVW/MOVT immediate instruction instruction pair.
+
+ @param Instructions Pointer to ARM MOVW/MOVT instruction pair
+ @param Address New addres to patch into the instructions
+**/
+VOID
+EFIAPI
+ThumbMovwMovtImmediatePatch (
+ IN OUT UINT16 *Instructions,
+ IN UINT32 Address
+ );
+
+
#endif