Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 /*-
2 * Copyright (C) 2009-2011 Nathan Whitehorn
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
47 .llong 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */
53 .llong 0 /* RTAS entry point */
63 * Open Firmware Real-mode Entry Point. This is a huge pain.
69 stdu %r1,-208(%r1)
74 * at most 32 bits wide: lr, cr, r2, r13-r31, the old MSR. These
111 addi %r7,%r7,OFWSTKSZ-40
131 * use the 32-bit ABI stack frame format. The pointer to the current
140 std %r8,32(%r1) /* Save high 32-bits of the kernel's PC */
157 addi %r5, %r5, (2f-1b)
181 addi %r8,%r8,2f-1b
183 rfid /* Turn on MMU, exceptions, and 64-bit mode */
186 /* Sign-extend the return value from OF */
189 /* Restore all the non-volatile registers */
220 * RTAS 32-bit Entry Point. Similar to the OF one, but simpler (no separate
229 stdu %r1,-208(%r1)
232 * We need to save the following, because RTAS's register save/
234 * at most 32 bits wide: lr, cr, r2, r13-r31, the old MSR. These
263 /* Read RTAS entry and reg save area pointers */
271 * Set the MSR to the RTAS value. This has the side effect of disabling
286 * Set up RTAS register save area, so that we can get back all of
287 * our 64-bit pointers. Save our stack pointer, the TOC, and the MSR.
288 * Put this in r1, since RTAS is obliged to save it. Kernel globals
293 std %r7,0(%r1) /* Save 64-bit stack pointer */
310 addi %r5, %r5, (2f-1b)
317 /* Finally, branch to RTAS */
324 * are running in 32-bit mode at this point, so it doesn't matter if r1
325 * has become sign-extended.
333 * Get back to the right PC. We need to atomically re-enable
334 * exceptions, 64-bit mode, and the MMU. One thing that has likely
335 * happened is that, if we were running in the high-memory direct
336 * map, we no longer are as a result of LR truncation in RTAS.
337 * Fix this by copying the high-order bits of the LR at function
346 addi %r8,%r8,2f-1b
348 rfid /* Turn on MMU, exceptions, and 64-bit mode */
351 /* Sign-extend the return value from RTAS */
354 /* Restore all the non-volatile registers */