2 | copy binary image and execute
4 | written by Yasha (ITOH Yasufumi)
7 | $NetBSD: trampoline.S,v 1.1 1998/09/01 19:55:33 itohy Exp $
9 #include <machine/asm.h>
10 #include "trampoline.h"
12 | arg+0 bsr trampoline
13 | +4 %a3+0 temporary stack address
14 | +8 %a3+4 processor type
15 | +12 %a3+8 struct execkern_arg
18 ENTRY_NOPROFILE(trampoline)
19 oriw #0x0700,%sr | keep out interrupts
22 moveal %a3@+,%sp | set temporary stack
24 movel %a3@+,%d2 | MPU type
34 .long 0x4E7B0003 | movec %d0,%tc
35 .long 0x4E7B0004 | movec %d0,%itt0
36 .long 0x4E7B0005 | movec %d0,%itt1
37 .long 0x4E7B0006 | movec %d0,%dtt0
38 .long 0x4E7B0007 | movec %d0,%dtt1
39 .long 0x4E7B0806 | movec %d0,%urp
40 .long 0x4E7B0807 | movec %d0,%srp
45 .long 0xF0174000 | pmove %sp@,%tc
47 bnes Lmmu020 | 68851 has no tt regs
48 .long 0xF0170800 | pmove %sp@,%tt0
49 .long 0xF0170C00 | pmove %sp@,%tt1
51 movel #0x7fff0001,%sp@- | null root pointer
52 .long 0xF0174C00 | pmove %sp@,%crp
53 .long 0xF0174800 | pmove %sp@,%srp
57 | minimize supervisor protection
60 | reset VBR (for compatibility)
62 .long 0x4E7B9801 | movec %a1,%vbr
64 | then transfer and exec kernel
66 #define XK_NO_C_INTERFACE /* pass arg with %a3 */
67 #include "../common/execkern.S"
69 GLOBAL(end_trampoline)