import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / m68k / hp300 / reboot.S
1 /*
2  *  linux/arch/m68k/hp300/reboot.S
3  *
4  *  Copyright (C) 1998 Philip Blundell <philb@gnu.org>
5  *
6  *  Do the dirty work of rebooting the machine.  Basically we need to undo all the
7  *  good stuff that head.S did when we started up.  The caches and MMU must be
8  *  disabled and then we jump back to the PROM.  This is a bit gruesome but we put
9  *  a brave face on it.
10  */
11
12 /* XXX Doesn't work yet.  Not sure why and can't be bothered to fix it at the moment. */
13
14         .globl  hp300_reset
15 hp300_reset:
16         .chip   68030
17         oriw    #0x0700,%sr                     /* cli() */
18         movel   hp300_phys_ram_base, %d1
19         movel   #0, %d0
20         movec   %d0, %vbr                       /* reset vector table */
21         lea     zero, %a0
22         lea     1f, %a1
23         add     %d1, %a0
24         add     %d1, %a1
25         pmove   %tc, %a0@
26         bclr    #7, %a0@
27         pmove   %a0@, %tc                       /* goodbye MMU */
28         jmp     %a1@
29 1:      movel   #0x808, %d0
30         movec   %d0, %cacr                      /* cache off */
31         moveb   #0, 0x1ffff
32         movel   #0x1a4, %a0
33         jmp     %a0@
34
35 zero:   .quad   0