aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/head.S
diff options
context:
space:
mode:
authorGrant Grundler <grundler@parisc-linux.org>2005-10-21 22:40:07 -0400
committerKyle McMartin <kyle@parisc-linux.org>2005-10-21 22:40:07 -0400
commit896a375623c3643a3f189353e7d4828c48a7fdf8 (patch)
treebb79535f843110f9b2b199890157fcabb0504b43 /arch/parisc/kernel/head.S
parentb2c1fe81df7471de9f7e2918877ac04ec9cde35f (diff)
[PARISC] Make sure use of RFI conforms to PA 2.0 and 1.1 arch docs
2.6.12-rc4-pa3 : first pass at making sure use of RFI conforms to PA 2.0 arch pages F-4 and F-5, PA 1.1 Arch page 3-19 and 3-20. The discussion revolves around all the rules for clearing PSW Q-bit. The hard part is meeting all the rules for "relied upon translation". .align directive is used to guarantee the critical sequence ends more than 8 instructions (32 bytes) from the end of page. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/kernel/head.S')
-rw-r--r--arch/parisc/kernel/head.S47
1 files changed, 9 insertions, 38 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index 28405edf8448..2b8738576ec2 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -224,8 +224,6 @@ stext_pdc_ret:
224 mtctl %r0,%cr12 224 mtctl %r0,%cr12
225 mtctl %r0,%cr13 225 mtctl %r0,%cr13
226 226
227 /* Prepare to RFI! Man all the cannons! */
228
229 /* Initialize the global data pointer */ 227 /* Initialize the global data pointer */
230 loadgp 228 loadgp
231 229
@@ -254,46 +252,16 @@ $is_pa20:
254$install_iva: 252$install_iva:
255 mtctl %r10,%cr14 253 mtctl %r10,%cr14
256 254
257#ifdef __LP64__ 255 b aligned_rfi /* Prepare to RFI! Man all the cannons! */
258 b aligned_rfi
259 nop 256 nop
260 257
261 .align 256 258 .align 128
262aligned_rfi: 259aligned_rfi:
263 ssm 0,0 260 pcxt_ssm_bug
264 nop /* 1 */
265 nop /* 2 */
266 nop /* 3 */
267 nop /* 4 */
268 nop /* 5 */
269 nop /* 6 */
270 nop /* 7 */
271 nop /* 8 */
272#endif
273
274#ifdef __LP64__ /* move to psw.h? */
275#define PSW_BITS PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R
276#else
277#define PSW_BITS PSW_SM_Q
278#endif
279
280$rfi:
281 /* turn off troublesome PSW bits */
282 rsm PSW_BITS,%r0
283 261
284 /* kernel PSW: 262 rsm PSW_SM_QUIET,%r0 /* off troublesome PSW bits */
285 * - no interruptions except HPMC and TOC (which are handled by PDC) 263 /* Don't need NOPs, have 8 compliant insn before rfi */
286 * - Q bit set (IODC / PDC interruptions)
287 * - big-endian
288 * - virtually mapped
289 */
290 load32 KERNEL_PSW,%r10
291 mtctl %r10,%ipsw
292 264
293 /* Set the space pointers for the post-RFI world
294 ** Clear the two-level IIA Space Queue, effectively setting
295 ** Kernel space.
296 */
297 mtctl %r0,%cr17 /* Clear IIASQ tail */ 265 mtctl %r0,%cr17 /* Clear IIASQ tail */
298 mtctl %r0,%cr17 /* Clear IIASQ head */ 266 mtctl %r0,%cr17 /* Clear IIASQ head */
299 267
@@ -301,8 +269,11 @@ $rfi:
301 mtctl %r11,%cr18 /* IIAOQ head */ 269 mtctl %r11,%cr18 /* IIAOQ head */
302 ldo 4(%r11),%r11 270 ldo 4(%r11),%r11
303 mtctl %r11,%cr18 /* IIAOQ tail */ 271 mtctl %r11,%cr18 /* IIAOQ tail */
272
273 load32 KERNEL_PSW,%r10
274 mtctl %r10,%ipsw
304 275
305 /* Jump to hyperspace */ 276 /* Jump through hyperspace to Virt Mode */
306 rfi 277 rfi
307 nop 278 nop
308 279