Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!cbmvax!cbmehq!babylon!rbabel From: rbabel@babylon.UUCP (Ralph Babel) Newsgroups: adsp.sw,comp.sys.amiga.tech Subject: ColdReboot() - The Never Ending Story? Message-ID: <03021.AA03021@babylon.UUCP> Date: 15 Aug 90 04:55:43 GMT Lines: 92 Brief history: The original "ColdReboot()" (new Amiga Hardware Reference Manual, page 219) didn't work on some (IMHO) broken A2000s (Kickstart ROM doesn't reappear at location 0 after RESET). The current version (AmigaMail March/April 1990) jumps directly into Kickstart and therefore doesn't co-operate with boot-ROMs (not to be confused with Autoboot driver ROMs) that show up at location 0 after a software RESET (e.g. it leaves the A1000's WCS write-enabled and does not work with GVP's '030 boot-ROMs - dunno about A2620/A2630). Presumably this bug also prevents the current versions of "MMUKick" and "SetCPU ROMBOOT" from working with boot-ROMs. So what about the following solution? ------------------------ cut here ------------------------ * This is Beer-Ware. If you find this program useful, you * are morally obliged to buy me a drink at the next Amiga * show or devcon. :-) csect "text",0,1,0,4 include "exec/types.i" include "exec/execbase.i" AbsExecBase equ 4 _LVOSupervisor equ -30 _LVOColdReboot equ -726 LIBRARY_VERSION_2_0 equ 36 _ColdReboot movea.l AbsExecBase.w,a6 cmp.w #LIBRARY_VERSION_2_0,LIB_VERSION(a6) blt.b 1$ jmp _LVOColdReboot(a6) 1$ lea 2$(pc),a5 jsr _LVOSupervisor(a6) * * in case our boot-ROM doesn't show up at location 0 ... * * romsize equ $00ffffec * romend equ $01000000 * * $000002: bra.b $000008 * $000004: AbsExecBase * $000008: lea romend+4,a0 * $00000e: suba.l romsize-(romend+4)(a0),a0 * $000012: movea.l (a0),a0 * $000014: subq.l #2,a0 * $000016: jmp (a0) * 2$ lea (2).w,a0 movea.l a0,a1 move.w #$6004,(a1)+ addq.l #4,a1 move.l #$41f90100,(a1)+ move.l #$000491e8,(a1)+ move.l #$ffe82050,(a1)+ move.l #$55884ed0,(a1) btst.b #AFB_68020,AttnFlags+1(a6) beq.b 3$ movec.l cacr,d0 bset.l #3,d0 movec.l d0,cacr 3$ cnop 0,4 reset jmp (a0) end ------------------------ cut here ------------------------ Restrictions: Does not support '040 under pre-2.0; assumes all boot-ROMs have a JMP-$absolute at location 2; and the usual MMU restriction (turn off MMU before rebooting). Maybe Dave has a good idea on how to turn off the MMU without pulling the rug from under your own feet (SetCPU ROMBOOT)? Comments appreciated, Ralph Babel ...!cbmvax!cbmehq!babylon!rbabel