Lines Matching +full:clear +full:- +full:bit
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 1994-2002 Russell King
22 * __fixup_pv_table - patch the stub instructions with the delta between
36 subs r3, r8, #PAGE_OFFSET @ PHYS_OFFSET - PAGE_OFFSET
61 @ The Thumb-2 versions of the patchable sequences are
63 @ phys-to-virt: movw <reg>, #offset<31:21>
67 @ virt-to-phys (non-LPAE): movw <reg>, #offset<31:21>
71 @ virt-to-phys (LPAE): movw <reg>, #offset<31:21>
77 @ In the non-LPAE case, all patchable instructions are MOVW
79 @ second halfword of the opcode (the 16-bit immediate is encoded
83 @ +-----------+---+-------------+------++---+------+----+------+
85 @ +-----------+---+-------------+------++---+------+----+------+
98 @ +-----------+---+---------------------++---+------+----+------+
101 @ +-----------+---+---------------------++---+------+----+------+
103 moveq r0, #0x200000 @ set bit 21, mov to mvn instruction
113 tst ip, #0x200 @ MOVW has bit 9 set, MVN has it clear
114 bne 0f @ skip to MOVW handling (Z flag is clear)
115 bic ip, #0x20 @ clear bit 5 (MVN -> MOV)
116 orr ip, ip, r0, lsr #16 @ MOV -> MVN if offset < 0
124 and ip, #0xf00 @ clear everything except Rd field
125 orreq ip, r0 @ Z flag set -> MOV/MVN -> patch in high bits
126 orrne ip, r6 @ Z flag clear -> MOVW -> patch in low bits
144 @ phys-to-virt: sub <VA>, <PA>, #offset<31:24>, lsl #24
147 @ virt-to-phys (non-LPAE): add <PA>, <VA>, #offset<31:24>, lsl #24
150 @ virt-to-phys (LPAE): movw <reg>, #offset<31:20>
155 @ In the non-LPAE case, all patchable instructions are ADD or SUB
162 @ +------+-----------------+------+------+-------+
167 @ +------+-----------------+------+------+-------+
175 @ bit 24.
178 @ +------+-----------------+------+------+-------+
180 @ +------+-----------------+------+------+-------+
182 moveq r0, #0x400000 @ set bit 22, mov to mvn instruction
183 mov r3, r6, lsr #16 @ put offset bits 31-16 into r3
184 mov r6, r6, lsr #24 @ put offset bits 31-24 into r6
185 and r3, r3, #0xf0 @ only keep offset bits 23-20 in r3
189 tst ip, #PV_BIT24 @ ADD/SUB have bit 24 clear
192 tst ip, #0xc00000 @ MOVW has bits 23:22 clear
193 bic ip, ip, #0x400000 @ clear bit 22
194 bfc ip, #0, #12 @ clear imm12 field of MOV[W] instruction
195 orreq ip, ip, r6, lsl #4 @ MOVW -> mask in offset bits 31-24
196 orreq ip, ip, r3, lsr #4 @ MOVW -> mask in offset bits 23-20
197 orrne ip, ip, r0 @ MOV -> mask in offset bits 7-0 (or bit 22)
204 orreq ip, ip, r6 ARM_BE8(, lsl #24) @ mask in offset bits 31-24
205 orrne ip, ip, r3 ARM_BE8(, lsl #24) @ mask in offset bits 23-20
219 stmfd sp!, {r4 - r7, lr}
223 ldmfd sp!, {r4 - r7, pc}
232 .size __pv_phys_pfn_offset, . -__pv_phys_pfn_offset
238 .size __pv_offset, . -__pv_offset