1 /* $NetBSD: ka610.c,v 1.1 2001/05/01 13:17:55 ragge Exp $ */ 2 /* 3 * Copyright (c) 2001 Ludd, University of Lule}, Sweden. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed at Ludd, University of 17 * Lule}, Sweden and its contributors. 18 * 4. The name of the author may not be used to endorse or promote products 19 * derived from this software without specific prior written permission 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 #include <sys/param.h> 34 #include <sys/types.h> 35 #include <sys/device.h> 36 #include <sys/kernel.h> 37 #include <sys/systm.h> 38 39 #include <machine/nexus.h> 40 #include <machine/cpu.h> 41 #include <machine/clock.h> 42 #include <machine/sid.h> 43 44 static void ka610_conf(void); 45 static void ka610_memerr(void); 46 static int ka610_mchk(caddr_t); 47 static void ka610_halt(void); 48 static void ka610_reboot(int); 49 50 /* 51 * Declaration of KA610-specific calls. 52 */ 53 struct cpu_dep ka610_calls = { 54 NULL, 55 ka610_mchk, 56 ka610_memerr, 57 ka610_conf, 58 generic_clkread, 59 generic_clkwrite, 60 1, /* ~VUPS */ 61 2, /* SCB pages */ 62 ka610_halt, 63 ka610_reboot, 64 NULL, 65 NULL, 66 CPU_RAISEIPL, 67 }; 68 69 70 void 71 ka610_conf() 72 { 73 printf("cpu0: KA610, HW rev %d, ucode rev %d\n", 74 vax_cpudata & 0xff, (vax_cpudata >> 8) & 0xff); 75 } 76 77 void 78 ka610_memerr() 79 { 80 printf("Memory err!\n"); 81 } 82 83 int 84 ka610_mchk(caddr_t addr) 85 { 86 panic("Machine check"); 87 return 0; 88 } 89 90 static void 91 ka610_halt() 92 { 93 asm("halt"); 94 } 95 96 static void 97 ka610_reboot(int arg) 98 { 99 asm("halt"); 100 } 101 102