]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/Runtime/RuntimeDxe/Ipf/PeHotRelocateEx.h
Deleted CacheFlush as it's in the MDE Cache library
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Ipf / PeHotRelocateEx.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 PeHotRelocateEx.h
15
16 Abstract:
17
18 Fixes Intel Itanium(TM) specific relocation types
19
20
21 Revision History
22
23 --*/
24
25 #ifndef _PEHOTRELOCATE_EX_H_
26 #define _PEHOTRELOCATE_EX_H_
27
28 #define EXT_IMM64(Value, Address, Size, InstPos, ValPos) \
29 Value |= (((UINT64) ((*(Address) >> InstPos) & (((UINT64) 1 << Size) - 1))) << ValPos)
30
31 #define INS_IMM64(Value, Address, Size, InstPos, ValPos) \
32 * (UINT32 *) Address = \
33 (*(UINT32 *) Address &~(((1 << Size) - 1) << InstPos)) | \
34 ((UINT32) ((((UINT64) Value >> ValPos) & (((UINT64) 1 << Size) - 1))) << InstPos)
35
36 #define IMM64_IMM7B_INST_WORD_X 3
37 #define IMM64_IMM7B_SIZE_X 7
38 #define IMM64_IMM7B_INST_WORD_POS_X 4
39 #define IMM64_IMM7B_VAL_POS_X 0
40
41 #define IMM64_IMM9D_INST_WORD_X 3
42 #define IMM64_IMM9D_SIZE_X 9
43 #define IMM64_IMM9D_INST_WORD_POS_X 18
44 #define IMM64_IMM9D_VAL_POS_X 7
45
46 #define IMM64_IMM5C_INST_WORD_X 3
47 #define IMM64_IMM5C_SIZE_X 5
48 #define IMM64_IMM5C_INST_WORD_POS_X 13
49 #define IMM64_IMM5C_VAL_POS_X 16
50
51 #define IMM64_IC_INST_WORD_X 3
52 #define IMM64_IC_SIZE_X 1
53 #define IMM64_IC_INST_WORD_POS_X 12
54 #define IMM64_IC_VAL_POS_X 21
55
56 #define IMM64_IMM41a_INST_WORD_X 1
57 #define IMM64_IMM41a_SIZE_X 10
58 #define IMM64_IMM41a_INST_WORD_POS_X 14
59 #define IMM64_IMM41a_VAL_POS_X 22
60
61 #define IMM64_IMM41b_INST_WORD_X 1
62 #define IMM64_IMM41b_SIZE_X 8
63 #define IMM64_IMM41b_INST_WORD_POS_X 24
64 #define IMM64_IMM41b_VAL_POS_X 32
65
66 #define IMM64_IMM41c_INST_WORD_X 2
67 #define IMM64_IMM41c_SIZE_X 23
68 #define IMM64_IMM41c_INST_WORD_POS_X 0
69 #define IMM64_IMM41c_VAL_POS_X 40
70
71 #define IMM64_SIGN_INST_WORD_X 3
72 #define IMM64_SIGN_SIZE_X 1
73 #define IMM64_SIGN_INST_WORD_POS_X 27
74 #define IMM64_SIGN_VAL_POS_X 63
75
76 #endif