2005-04-16 15:20:36 -07:00
|
|
|
/* cif.S: PROM entry/exit assembler trampolines.
|
|
|
|
*
|
2006-02-05 23:27:28 -07:00
|
|
|
* Copyright (C) 1996, 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
|
|
|
|
* Copyright (C) 2005, 2006 David S. Miller <davem@davemloft.net>
|
2005-04-16 15:20:36 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <asm/pstate.h>
|
2006-02-05 23:27:28 -07:00
|
|
|
#include <asm/cpudata.h>
|
|
|
|
#include <asm/thread_info.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
.text
|
2010-08-23 23:10:57 -07:00
|
|
|
.globl prom_cif_direct
|
|
|
|
prom_cif_direct:
|
|
|
|
sethi %hi(p1275buf), %o1
|
|
|
|
or %o1, %lo(p1275buf), %o1
|
|
|
|
ldx [%o1 + 0x0010], %o2 ! prom_cif_stack
|
|
|
|
save %o2, -192, %sp
|
|
|
|
ldx [%i1 + 0x0008], %l2 ! prom_cif_handler
|
2006-02-05 23:27:28 -07:00
|
|
|
mov %g4, %l0
|
|
|
|
mov %g5, %l1
|
|
|
|
mov %g6, %l3
|
2005-04-16 15:20:36 -07:00
|
|
|
call %l2
|
2010-08-23 23:10:57 -07:00
|
|
|
mov %i0, %o0 ! prom_args
|
2006-02-05 23:27:28 -07:00
|
|
|
mov %l0, %g4
|
|
|
|
mov %l1, %g5
|
|
|
|
mov %l3, %g6
|
2005-04-16 15:20:36 -07:00
|
|
|
ret
|
|
|
|
restore
|
|
|
|
|
|
|
|
.globl prom_cif_callback
|
|
|
|
prom_cif_callback:
|
|
|
|
sethi %hi(p1275buf), %o1
|
|
|
|
or %o1, %lo(p1275buf), %o1
|
2006-02-05 23:27:28 -07:00
|
|
|
save %sp, -192, %sp
|
|
|
|
TRAP_LOAD_THREAD_REG(%g6, %g1)
|
|
|
|
LOAD_PER_CPU_BASE(%g5, %g6, %g4, %g3, %o0)
|
|
|
|
ldx [%g6 + TI_TASK], %g4
|
2005-04-16 15:20:36 -07:00
|
|
|
call prom_world
|
2006-02-05 23:27:28 -07:00
|
|
|
mov 0, %o0
|
2005-04-16 15:20:36 -07:00
|
|
|
ldx [%i1 + 0x000], %l2
|
|
|
|
call %l2
|
|
|
|
mov %i0, %o0
|
|
|
|
mov %o0, %l1
|
|
|
|
call prom_world
|
2006-02-05 23:27:28 -07:00
|
|
|
mov 1, %o0
|
2005-04-16 15:20:36 -07:00
|
|
|
ret
|
|
|
|
restore %l1, 0, %o0
|
|
|
|
|