Home | History | Annotate | Line # | Download | only in ppcboot
ppcstart.c revision 1.1
      1 /* $NetBSD: ppcstart.c,v 1.1 1999/11/28 22:10:48 is Exp $ */
      2 
      3 /*
      4  * Copyright 1999 Ignatios Souvatzis. All rights reserved.
      5  */
      6 
      7 /*
      8  * Startit for Phase5 PPC boards.
      9  */
     10 
     11 #include <sys/types.h>
     12 #include "libstubs.h"
     13 
     14 #include "kickstart68.c"
     15 
     16 void
     17 startit(kp, ksize, entry, fmem, fmemsz, cmemsz,
     18 	    boothowto, esym, cpuid, eclock, amiga_flags, I_flag,
     19 	    bootpartoff, history)
     20 
     21 	u_long kp, ksize, entry, fmem, fmemsz, cmemsz,
     22 		boothowto, esym, cpuid, eclock, amiga_flags, I_flag,
     23 		bootpartoff, history;
     24 {
     25 	int i;
     26 
     27 #define ONESEC
     28 /* #define ONESEC for (i=0; i<1000000; i++) */
     29 
     30 	ONESEC *(volatile u_int16_t *)0xdff180 = 0x0f0;
     31 	*(volatile u_int8_t *)0xf60000 = 0x10;
     32 	ONESEC *(volatile u_int16_t *)0xdff180 = 0xf80;
     33 
     34 	memcpy((caddr_t)0xfff00100, kickstart, kicksize);
     35 	*(volatile u_int32_t *)0xfff000f4 = fmem;
     36 	*(volatile u_int32_t *)0xfff000f8 = kp;
     37 	*(volatile u_int32_t *)0xfff000fc = ksize;
     38 	ONESEC *(volatile u_int16_t *)0xdff180 = 0xf00;
     39 	*(volatile u_int8_t *)0xf60000 = 0x90;
     40 	*(volatile u_int8_t *)0xf60000 = 0x08;
     41 	/* NOTREACHED */
     42 	while (1) {
     43 		*(volatile u_int16_t *)0xdff180 = 0x0f0;
     44 		*(volatile u_int16_t *)0xdff180 = 0x00f;
     45 	}
     46 }
     47