CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: andvar Date: Sun Sep 17 10:14:49 UTC 2023 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: all sunos_exec_aout_makecmds references were removed from machedep back in 1997, as the code was standardized and moved to sunos_exec_aout.c. removing this code from luna68k as well, for whatever reason it was missed. Fixes build with COMPAT_SUNOS enabled for luna68k. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.108 src/sys/arch/luna68k/luna68k/machdep.c:1.109 --- src/sys/arch/luna68k/luna68k/machdep.c:1.108 Sat Oct 9 20:00:41 2021 +++ src/sys/arch/luna68k/luna68k/machdep.c Sun Sep 17 10:14:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.109 2023/09/17 10:14:49 andvar Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2023/09/17 10:14:49 andvar Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -822,14 +822,7 @@ luna68k_abort(const char *cp) int cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp) { - int error = ENOEXEC; -#ifdef COMPAT_SUNOS - extern sunos_exec_aout_makecmds(struct proc *, struct exec_package *); - - if ((error = sunos_exec_aout_makecmds(l->l_proc, epp)) == 0) - return 0; -#endif - return error; + return ENOEXEC; } #ifdef MODULAR
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: andvar Date: Sun Sep 17 10:14:49 UTC 2023 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: all sunos_exec_aout_makecmds references were removed from machedep back in 1997, as the code was standardized and moved to sunos_exec_aout.c. removing this code from luna68k as well, for whatever reason it was missed. Fixes build with COMPAT_SUNOS enabled for luna68k. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Apr 13 11:44:10 UTC 2023 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Fix device name for xpbus at mainbus for LUNA-II, missed on psgpam merge. Fortunately harmless because xpbus_match() doesn't check ma_name in mainbus_attach_args. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/mainbus.c diff -u src/sys/arch/luna68k/luna68k/mainbus.c:1.19 src/sys/arch/luna68k/luna68k/mainbus.c:1.20 --- src/sys/arch/luna68k/luna68k/mainbus.c:1.19 Sun Jan 15 05:08:33 2023 +++ src/sys/arch/luna68k/luna68k/mainbus.c Thu Apr 13 11:44:10 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.19 2023/01/15 05:08:33 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.20 2023/04/13 11:44:10 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.19 2023/01/15 05:08:33 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2023/04/13 11:44:10 tsutsui Exp $"); #include #include @@ -55,7 +55,7 @@ static const struct mainbus_attach_args { "lcd",0x4d00, -1 }, /* Sharp LM16X212 LCD module */ { "le", 0xf100, 3 }, /* Am7990 */ { "sio",0x5100, 6 }, /* uPD7201A */ - { "xp", 0x7100, 1 }, /* HD647180XP */ + { "xpbus", 0x7100, -1 }, /* HD647180XP */ { "fb", 0xc110, -1 }, /* BrookTree RAMDAC */ { "spc",0xe100, 2 }, /* internal MB89352 */ { "spc",0xe140, 2 }, /* external MB89352 */
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Apr 13 11:44:10 UTC 2023 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Fix device name for xpbus at mainbus for LUNA-II, missed on psgpam merge. Fortunately harmless because xpbus_match() doesn't check ma_name in mainbus_attach_args. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: thorpej Date: Sat Dec 19 21:38:31 UTC 2020 Modified Files: src/sys/arch/luna68k/luna68k: isr.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/luna68k/luna68k/isr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/isr.c diff -u src/sys/arch/luna68k/luna68k/isr.c:1.23 src/sys/arch/luna68k/luna68k/isr.c:1.24 --- src/sys/arch/luna68k/luna68k/isr.c:1.23 Sun Nov 10 21:16:29 2019 +++ src/sys/arch/luna68k/luna68k/isr.c Sat Dec 19 21:38:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: isr.c,v 1.23 2019/11/10 21:16:29 chs Exp $ */ +/* $NetBSD: isr.c,v 1.24 2020/12/19 21:38:30 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.23 2019/11/10 21:16:29 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.24 2020/12/19 21:38:30 thorpej Exp $"); /* * Link and dispatch interrupts. @@ -39,7 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.23 #include #include -#include +#include #include #include @@ -82,7 +82,7 @@ isrlink_autovec(int (*func)(void *), voi if ((ipl < 0) || (ipl >= NISRAUTOVEC)) panic("isrlink_autovec: bad ipl %d", ipl); - newisr = malloc(sizeof(struct isr_autovec), M_DEVBUF, M_WAITOK); + newisr = kmem_alloc(sizeof(*newisr), KM_SLEEP); newisr->isr_func = func; newisr->isr_arg = arg; newisr->isr_ipl = ipl;
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: thorpej Date: Sat Dec 19 21:38:31 UTC 2020 Modified Files: src/sys/arch/luna68k/luna68k: isr.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/luna68k/luna68k/isr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: christos Date: Tue Nov 7 14:55:30 UTC 2017 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Don't define ELFSIZE To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: christos Date: Tue Nov 7 14:55:30 UTC 2017 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Don't define ELFSIZE To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.100 src/sys/arch/luna68k/luna68k/machdep.c:1.101 --- src/sys/arch/luna68k/luna68k/machdep.c:1.100 Thu Mar 9 09:05:59 2017 +++ src/sys/arch/luna68k/luna68k/machdep.c Tue Nov 7 09:55:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.100 2017/03/09 14:05:59 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.101 2017/11/07 14:55:30 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2017/03/09 14:05:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2017/11/07 14:55:30 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -68,7 +68,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #endif #include -#define ELFSIZE 32 #include #include
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Sep 3 13:07:46 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Fix spelling in comments. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.61 src/sys/arch/luna68k/luna68k/locore.s:1.62 --- src/sys/arch/luna68k/luna68k/locore.s:1.61 Wed Sep 2 11:33:30 2015 +++ src/sys/arch/luna68k/luna68k/locore.s Thu Sep 3 13:07:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.61 2015/09/02 11:33:30 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.62 2015/09/03 13:07:46 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -927,9 +927,9 @@ GLOBAL(proto040tc) .long 0x8000 | %tc (4KB page) #endif GLOBAL(proto040tt0) | tt0 0x4000.-0x7fff. - .long 0x403fa040 | kernel only, cache inhebit, serialized + .long 0x403fa040 | kernel only, cache inhibit, serialized GLOBAL(proto040tt1) | tt1 0x8000.-0x. - .long 0x807fa040 | kernel only, cache inhebit, serialized + .long 0x807fa040 | kernel only, cache inhibit, serialized nullrp: .long 0x7fff0001 | do-nothing MMU root pointer
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Sep 3 13:07:46 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Fix spelling in comments. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Wed Sep 2 11:33:30 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Make kernels build without options M68030. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Wed Sep 2 11:33:30 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Make kernels build without options M68030. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.60 src/sys/arch/luna68k/luna68k/locore.s:1.61 --- src/sys/arch/luna68k/luna68k/locore.s:1.60 Tue Sep 1 13:46:14 2015 +++ src/sys/arch/luna68k/luna68k/locore.s Wed Sep 2 11:33:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.60 2015/09/01 13:46:14 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.61 2015/09/02 11:33:30 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -187,12 +187,14 @@ Lstart1: jra Lstart2 1: #endif +#if defined(M68030) cmpl #CPU_68030,%a0@ | 68030? jne 1f | no, skip movl #_C_LABEL(busaddrerr2030),%a2@(8) movl #_C_LABEL(busaddrerr2030),%a2@(12) jra Lstart2 1: +#endif /* Config botch; no hope. */ PANIC("Config botch in locore")
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Tue Sep 1 13:46:14 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Allow NetBSD/luna68k kernel work with 8kB/page (PGSHIFT==13) settings. Tested on both LUNA (68030) and LUNA-II (68040). To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.59 src/sys/arch/luna68k/luna68k/locore.s:1.60 --- src/sys/arch/luna68k/luna68k/locore.s:1.59 Sat Mar 22 16:52:07 2014 +++ src/sys/arch/luna68k/luna68k/locore.s Tue Sep 1 13:46:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.59 2014/03/22 16:52:07 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.60 2015/09/01 13:46:14 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -287,7 +287,7 @@ Lmotommu1: RELOC(protott1,%a0) | tt1 range 8000.-. .long 0xf0100c00 | pmove %a0@,mmutt1 pflusha - RELOC(prototc,%a0) | %tc: SRP,CRP,4KB page,A=10bit,B=10bit + RELOC(prototc,%a0) | %tc: SRP,CRP,4KB or 8KB page pmove %a0@,%tc /* * Should be running mapped from this point on @@ -909,13 +909,21 @@ GLOBAL(protocrp) .long 0x8002,0 | prototype CPU root pointer GLOBAL(prototc) +#if PGSHIFT == 13 + .long 0x82d08b00 | %tc (SRP,CRP,8KB page, TIA/TIB=8/11bits) +#else .long 0x82c0aa00 | %tc (SRP,CRP,4KB page, TIA/TIB=10/10bits) +#endif GLOBAL(protott0) | tt0 0x4000.-0x7fff. .long 0x403f8543 | GLOBAL(protott1) | tt1 0x8000.-0x. .long 0x807f8543 | GLOBAL(proto040tc) +#if PGSHIFT == 13 + .long 0xc000 | %tc (8KB page) +#else .long 0x8000 | %tc (4KB page) +#endif GLOBAL(proto040tt0) | tt0 0x4000.-0x7fff. .long 0x403fa040 | kernel only, cache inhebit, serialized GLOBAL(proto040tt1) | tt1 0x8000.-0x.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Tue Sep 1 13:46:14 UTC 2015 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Allow NetBSD/luna68k kernel work with 8kB/page (PGSHIFT==13) settings. Tested on both LUNA (68030) and LUNA-II (68040). To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: christos Date: Mon Mar 24 19:46:24 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: - use cpu_{g,s}etmodel - fix unused To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.97 src/sys/arch/luna68k/luna68k/machdep.c:1.98 --- src/sys/arch/luna68k/luna68k/machdep.c:1.97 Sat Jan 11 11:34:05 2014 +++ src/sys/arch/luna68k/luna68k/machdep.c Mon Mar 24 15:46:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -70,6 +70,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include sys/boot_flag.h #define ELFSIZE 32 #include sys/exec_elf.h +#include sys/cpu.h #include uvm/uvm_extern.h @@ -98,7 +99,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v * Info for CTL_HW */ char machine[] = MACHINE; -char cpu_model[120]; /* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; @@ -360,7 +360,6 @@ identifycpu(void) extern int cputype; const char *model, *fpu; - memset(cpu_model, 0, sizeof(cpu_model)); switch (cputype) { case CPU_68030: model =LUNA-I; @@ -378,8 +377,7 @@ identifycpu(void) fpu = unknown; break; } - snprintf(cpu_model, sizeof(cpu_model), - %s (MC68030 CPU+MMU, %s FPU), model, fpu); + cpu_setmodel(%s (MC68030 CPU+MMU, %s FPU), model, fpu); machtype = LUNA_I; /* 20MHz 68030 */ cpuspeed = 20; @@ -389,7 +387,7 @@ identifycpu(void) #if defined(M68040) case CPU_68040: model =LUNA-II; - snprintf(cpu_model, sizeof(cpu_model), + cpu_setmodel( %s (MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches), model); machtype = LUNA_II; @@ -402,7 +400,7 @@ identifycpu(void) default: panic(unknown CPU type); } - printf(%s\n, cpu_model); + printf(%s\n, cpu_getmodel()); } /* @@ -742,13 +740,9 @@ int *nofault; int badaddr(register void *addr, int nbytes) { - register int i; + int i; label_t faultbuf; -#ifdef lint - i = *addr; if (i) return (0); -#endif - nofault = (int *)faultbuf; if (setjmp((label_t *)nofault)) { nofault = (int *)0; @@ -771,6 +765,7 @@ badaddr(register void *addr, int nbytes) default: panic(badaddr: bad request); } + __USE(i); nofault = (int *)0; return 0; }
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: christos Date: Mon Mar 24 19:46:24 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: - use cpu_{g,s}etmodel - fix unused To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Mar 15 09:30:33 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Use common m68k/busaddrerr.s for bus error and address error handlers. No binary changes on GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.57 src/sys/arch/luna68k/luna68k/locore.s:1.58 --- src/sys/arch/luna68k/luna68k/locore.s:1.57 Sun Mar 9 16:28:43 2014 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Mar 15 09:30:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.57 2014/03/09 16:28:43 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.58 2014/03/15 09:30:33 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -350,172 +350,10 @@ Lenab3: */ #include m68k/m68k/trap_subr.s -#if defined(M68040) || defined(M68060) -ENTRY_NOPROFILE(addrerr4060) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movl %sp@(FR_HW+8),%sp@- - clrl %sp@- | dummy code - movl #T_ADDRERR,%sp@- | mark address error - jra _ASM_LABEL(faultstkadj) | and deal with it -#endif - -#if defined(M68060) -ENTRY_NOPROFILE(buserr60) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movel %sp@(FR_HW+12),%d0 | FSLW - btst #2,%d0 | branch prediction error? - jeq Lnobpe - movc %cacr,%d2 - orl #IC60_CABC,%d2 | clear all branch cache entries - movc %d2,%cacr - movl %d0,%d1 - andl #0x7ffd,%d1 - jeq _ASM_LABEL(faultstkadjnotrap2) -Lnobpe: -| we need to adjust for misaligned addresses - movl %sp@(FR_HW+8),%d1 | grab VA - btst #27,%d0 | check for mis-aligned access - jeq Lberr3 | no, skip - addl #28,%d1 | yes, get into next page - | operand case: 3, - | instruction case: 4+12+12 - andl #PG_FRAME,%d1 | and truncate -Lberr3: - movl %d1,%sp@- - movl %d0,%sp@- | code is FSLW now. - andw #0x1f80,%d0 - jeq Lberr60 | it is a bus error - movl #T_MMUFLT,%sp@- | show that we are an MMU fault - jra _ASM_LABEL(faultstkadj) | and deal with it -Lberr60: - tstl _C_LABEL(nofault) | catch bus error? - jeq Lisberr | no, handle as usual - movl _C_LABEL(nofault),%sp@- | yes, - jbsr _C_LABEL(longjmp) | longjmp(nofault) - /* NOTREACHED */ -#endif -#if defined(M68040) -ENTRY_NOPROFILE(buserr40) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movl %sp@(FR_HW+20),%d1 | get fault address - moveq #0,%d0 - movw %sp@(FR_HW+12),%d0 | get SSW - btst #11,%d0 | check for mis-aligned - jeq Lbe1stpg | no skip - addl #3,%d1 | get into next page - andl #PG_FRAME,%d1 | and truncate -Lbe1stpg: - movl %d1,%sp@- | pass fault address. - movl %d0,%sp@- | pass SSW as code - btst #10,%d0 | test ATC - jeq Lberr40 | it is a bus error - movl #T_MMUFLT,%sp@- | show that we are an MMU fault - jra _ASM_LABEL(faultstkadj) | and deal with it -Lberr40: - tstl _C_LABEL(nofault) | catch bus error? - jeq Lisberr | no, handle as usual - movl _C_LABEL(nofault),%sp@- | yes, - jbsr _C_LABEL(longjmp) | longjmp(nofault) - /* NOTREACHED */ -#endif - -ENTRY_NOPROFILE(busaddrerr2030) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - moveq #0,%d0 - movw %sp@(FR_HW+10),%d0 | grab SSW for fault processing - btst #12,%d0 | RB set? - jeq LbeX0 | no, test RC - bset #14,%d0 | yes, must set FB - movw %d0,%sp@(FR_HW+10) | for hardware too -LbeX0: - btst #13,%d0 | RC set? - jeq LbeX1 | no, skip - bset #15,%d0 | yes, must set FC - movw %d0,%sp@(FR_HW+10) | for hardware too -LbeX1: - btst #8,%d0 | data fault? - jeq Lbe0 | no, check for hard cases - movl %sp@(FR_HW+16),%d1 | fault address is as given in frame - jra Lbe10 | thats it -Lbe0: - btst #4,%sp@(FR_HW+6) | long (type B) stack frame? - jne Lbe4 | yes, go handle - movl %sp@(FR_HW+2),%d1 | no, can use save PC - btst #14,%d0 | FB set? - jeq Lbe3 | no, try FC - addql #4,%d1 | yes, adjust address - jra Lbe10 | done -Lbe3: - btst #15,%d0 | FC set? - jeq Lbe10 | no, done - addql #2,%d1 | yes, adjust address - jra Lbe10 | done -Lbe4: - movl %sp@(FR_HW+36),%d1 | long format, use stage B address - btst #15,%d0 | FC set? - jeq Lbe10 | no, all done - subql #2,%d1 | yes, adjust address -Lbe10: - movl %d1,%sp@- | push fault VA - movl %d0,%sp@- | and padded SSW - movw %sp@(FR_HW+8+6),%d0 | get frame format/vector offset - andw #0x0FFF,%d0 | clear out frame format - cmpw #12,%d0 | address
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Mar 15 09:30:33 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Use common m68k/busaddrerr.s for bus error and address error handlers. No binary changes on GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 11 16:34:05 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Remove tab nits. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.96 src/sys/arch/luna68k/luna68k/machdep.c:1.97 --- src/sys/arch/luna68k/luna68k/machdep.c:1.96 Sat Jan 11 08:07:16 2014 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Jan 11 16:34:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.96 2014/01/11 08:07:16 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.96 2014/01/11 08:07:16 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -202,7 +202,7 @@ luna68k_init(void) /* Valid value is set; no need to parse bootarg. */ return; } - + /* * No valid bootdev value is set. * Assume we are booted by ROM monitor directly using a.out kernel
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 11 16:34:05 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Remove tab nits. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 11 01:43:22 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Use the same address as LUNA to probe LANCE on LUNA-II. It looks the device is mapped at both regions. 4.4BSD/luna68k probes it at 0xf100, but UniOS-Mach for LUNA-II attaches the lance at 0xf000. It is probably because the UniOS needs to map DS1220 NVRAM (mapped at 0xf104 and used to store the MAC address) to the different kernel page, but there is no reason for us to use different addresses. (Note our bootloader already use the same address for both machines.) This change will make (forthcoming) booted device check easier. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/mainbus.c diff -u src/sys/arch/luna68k/luna68k/mainbus.c:1.12 src/sys/arch/luna68k/luna68k/mainbus.c:1.13 --- src/sys/arch/luna68k/luna68k/mainbus.c:1.12 Mon Sep 23 17:11:22 2013 +++ src/sys/arch/luna68k/luna68k/mainbus.c Sat Jan 11 01:43:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.13 2014/01/11 01:43:22 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.13 2014/01/11 01:43:22 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -50,7 +50,7 @@ static const struct mainbus_attach_args static const struct mainbus_attach_args luna2_devs[] = { { clock, 0x4500, -1 }, /* Dallas TimeKeeper */ - { le, 0xf000, 3 }, /* Am7990 */ + { le, 0xf100, 3 }, /* Am7990 */ { sio,0x5100, 6 }, /* uPD7201A */ { fb, 0xc110, -1 }, /* BrookTree RAMDAC */ { spc,0xe100, 2 }, /* internal MB89352 */
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 11 01:43:22 UTC 2014 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Use the same address as LUNA to probe LANCE on LUNA-II. It looks the device is mapped at both regions. 4.4BSD/luna68k probes it at 0xf100, but UniOS-Mach for LUNA-II attaches the lance at 0xf000. It is probably because the UniOS needs to map DS1220 NVRAM (mapped at 0xf104 and used to store the MAC address) to the different kernel page, but there is no reason for us to use different addresses. (Note our bootloader already use the same address for both machines.) This change will make (forthcoming) booted device check easier. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Sep 23 17:02:18 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s mainbus.c vectors.s Log Message: Remove trailing tabs. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/luna68k/mainbus.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/luna68k/luna68k/vectors.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.52 src/sys/arch/luna68k/luna68k/locore.s:1.53 --- src/sys/arch/luna68k/luna68k/locore.s:1.52 Mon Jan 21 15:21:30 2013 +++ src/sys/arch/luna68k/luna68k/locore.s Mon Sep 23 17:02:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.52 2013/01/21 15:21:30 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.53 2013/09/23 17:02:18 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -195,9 +195,9 @@ Lstart1: movl #_C_LABEL(busaddrerr2030),%a2@(12) jra Lstart2 1: - /* Config botch; no hope. */ + /* Config botch; no hope. */ PANIC(Config botch in locore) - + Lstart2: /* initialize source/destination control registers for movs */ moveq #FC_USERD,%d0 | user space @@ -230,7 +230,7 @@ Lstart2: 1: RELOC(esym,%a0) movl %d0,%a0@ - + /* configure kernel and lwp0 VA space so we can get going */ #if NKSYMS || defined(DDB) || defined(LKM) RELOC(esym,%a0) | end of static kernel test/data/syms Index: src/sys/arch/luna68k/luna68k/mainbus.c diff -u src/sys/arch/luna68k/luna68k/mainbus.c:1.10 src/sys/arch/luna68k/luna68k/mainbus.c:1.11 --- src/sys/arch/luna68k/luna68k/mainbus.c:1.10 Sat Nov 12 13:44:26 2011 +++ src/sys/arch/luna68k/luna68k/mainbus.c Mon Sep 23 17:02:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.10 2011/11/12 13:44:26 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.10 2011/11/12 13:44:26 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -81,7 +81,7 @@ mainbus_attach(device_t parent, device_t int i, ndevs; const struct mainbus_attach_args *devs; struct mainbus_attach_args ma; - + if (machtype == LUNA_II) { devs = luna2_devs; ndevs = __arraycount(luna2_devs); Index: src/sys/arch/luna68k/luna68k/vectors.s diff -u src/sys/arch/luna68k/luna68k/vectors.s:1.3 src/sys/arch/luna68k/luna68k/vectors.s:1.4 --- src/sys/arch/luna68k/luna68k/vectors.s:1.3 Sun Dec 11 12:17:52 2005 +++ src/sys/arch/luna68k/luna68k/vectors.s Mon Sep 23 17:02:18 2013 @@ -1,4 +1,4 @@ -| $NetBSD: vectors.s,v 1.3 2005/12/11 12:17:52 christos Exp $ +| $NetBSD: vectors.s,v 1.4 2013/09/23 17:02:18 tsutsui Exp $ | Copyright (c) 1997 Jason R. Thorpe. All rights reserved. | Copyright (c) 1988 University of Utah @@ -95,7 +95,7 @@ GLOBAL(vectab) #ifdef COMPAT_16 VECTOR(trap3) /* 35: compat_16_sigreturn */ #else - VECTOR(illinst) + VECTOR(illinst) #endif VECTOR(illinst) /* 36: TRAP instruction vector */ VECTOR(illinst) /* 37: TRAP instruction vector */
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Sep 23 17:11:22 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Misc cleanup. - use bool instead of int - avoid an assignment as a value with extra parentheses - use aprint_normal(9) for attach message - remove parentheses from return value To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/mainbus.c diff -u src/sys/arch/luna68k/luna68k/mainbus.c:1.11 src/sys/arch/luna68k/luna68k/mainbus.c:1.12 --- src/sys/arch/luna68k/luna68k/mainbus.c:1.11 Mon Sep 23 17:02:18 2013 +++ src/sys/arch/luna68k/luna68k/mainbus.c Mon Sep 23 17:11:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -67,12 +67,13 @@ CFATTACH_DECL_NEW(mainbus, 0, static int mainbus_match(device_t parent, cfdata_t cf, void *args) { - static int mainbus_matched; + static bool mainbus_matched; if (mainbus_matched) - return (0); + return 0; - return ((mainbus_matched = 1)); + mainbus_matched = true; + return 1; } static void @@ -89,7 +90,7 @@ mainbus_attach(device_t parent, device_t devs = luna_devs; ndevs = __arraycount(luna_devs); } - printf(\n); + aprint_normal(\n); for (i = 0; i ndevs; i++) { ma = devs[i]; config_found(self, ma, mainbus_print); @@ -104,5 +105,5 @@ mainbus_print(void *aux, const char *pnp if (pnp) aprint_normal(%s at %s, ma-ma_name, pnp); - return (UNCONF); + return UNCONF; }
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Sep 23 17:02:18 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s mainbus.c vectors.s Log Message: Remove trailing tabs. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/luna68k/mainbus.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/luna68k/luna68k/vectors.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Sep 23 17:11:22 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: mainbus.c Log Message: Misc cleanup. - use bool instead of int - avoid an assignment as a value with extra parentheses - use aprint_normal(9) for attach message - remove parentheses from return value To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/luna68k/luna68k/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 26 15:46:24 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: clock.c machdep.c pmap_bootstrap.c Log Message: Whitespace nits. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/clock.c cvs rdiff -u -r1.94 -r1.95 src/sys/arch/luna68k/luna68k/machdep.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/clock.c diff -u src/sys/arch/luna68k/luna68k/clock.c:1.8 src/sys/arch/luna68k/luna68k/clock.c:1.9 --- src/sys/arch/luna68k/luna68k/clock.c:1.8 Tue Feb 8 20:20:16 2011 +++ src/sys/arch/luna68k/luna68k/clock.c Sat Jan 26 15:46:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.8 2011/02/08 20:20:16 rmind Exp $ */ +/* $NetBSD: clock.c,v 1.9 2013/01/26 15:46:24 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.8 2011/02/08 20:20:16 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.9 2013/01/26 15:46:24 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -79,8 +79,8 @@ cpu_initclocks(void) */ s = splhigh(); /* - * XXX - * I guess it's necessary to program clock source with + * XXX + * I guess it's necessary to program clock source with * approprivate mode/value. * XXX */ Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.94 src/sys/arch/luna68k/luna68k/machdep.c:1.95 --- src/sys/arch/luna68k/luna68k/machdep.c:1.94 Fri Jan 18 18:41:12 2013 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Jan 26 15:46:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.95 2013/01/26 15:46:24 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.95 2013/01/26 15:46:24 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v char machine[] = MACHINE; char cpu_model[120]; -/* Our exported CPU info; we can have only one. */ +/* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; struct vm_map *phys_map = NULL; @@ -477,7 +477,7 @@ cpu_init_kcore_hdr(void) cpu_kcore_hdr_t *h = cpu_kcore_hdr; struct m68k_kcore_hdr *m = h-un._m68k; - memset(cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr)); + memset(cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr)); /* * Initialize the `dispatcher' portion of the header. @@ -552,7 +552,7 @@ cpu_dumpsize(void) int cpu_dump(int (*dump)(dev_t, daddr_t, void *, size_t), daddr_t *blknop) { - int buf[MDHDRSIZE / sizeof(int)]; + int buf[MDHDRSIZE / sizeof(int)]; cpu_kcore_hdr_t *chdr; kcore_seg_t *kseg; int error; @@ -801,7 +801,7 @@ luna68k_abort(const char *cp) /* * cpu_exec_aout_makecmds(): * CPU-dependent a.out format hook for execve(). - * + * * Determine of the given exec package refers to something which we * understand and, if so, set up the vmcmds for it. */ Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.35 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.36 --- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.35 Fri Feb 10 06:28:39 2012 +++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Sat Jan 26 15:46:24 2013 @@ -1,6 +1,6 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.35 2012/02/10 06:28:39 mhitch Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $ */ -/* +/* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.35 2012/02/10 06:28:39 mhitch Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $); #include opt_m68k_arch.h
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jan 26 15:46:24 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: clock.c machdep.c pmap_bootstrap.c Log Message: Whitespace nits. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/clock.c cvs rdiff -u -r1.94 -r1.95 src/sys/arch/luna68k/luna68k/machdep.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jan 21 14:42:24 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Account idepth properly in timer interrupt handler. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.50 src/sys/arch/luna68k/luna68k/locore.s:1.51 --- src/sys/arch/luna68k/luna68k/locore.s:1.50 Fri Jan 18 18:41:12 2013 +++ src/sys/arch/luna68k/luna68k/locore.s Mon Jan 21 14:42:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.50 2013/01/18 18:41:12 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.51 2013/01/21 14:42:24 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -819,6 +819,7 @@ ENTRY_NOPROFILE(intrhand_vectored) #if 1 /* XXX wild timer -- how can I disable/enable the interrupt? */ ENTRY_NOPROFILE(lev5intr) + addql #1,_C_LABEL(idepth) btst #7,0x6300 | check whether system clock beq 1f movb #1,0x6300 | clear the interrupt @@ -832,6 +833,7 @@ ENTRY_NOPROFILE(lev5intr) addql #1,_C_LABEL(intrcnt)+20 INTERRUPT_RESTOREREG 1: + addql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) | all done #endif
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jan 21 15:21:30 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Umm, fix botch in previous. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.51 src/sys/arch/luna68k/luna68k/locore.s:1.52 --- src/sys/arch/luna68k/luna68k/locore.s:1.51 Mon Jan 21 14:42:24 2013 +++ src/sys/arch/luna68k/luna68k/locore.s Mon Jan 21 15:21:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.51 2013/01/21 14:42:24 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.52 2013/01/21 15:21:30 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -833,7 +833,7 @@ ENTRY_NOPROFILE(lev5intr) addql #1,_C_LABEL(intrcnt)+20 INTERRUPT_RESTOREREG 1: - addql #1,_C_LABEL(idepth) + subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) | all done #endif
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jan 21 14:42:24 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Account idepth properly in timer interrupt handler. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jan 21 15:21:30 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Umm, fix botch in previous. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Fri Jan 18 18:41:12 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s machdep.c Log Message: Handle ddb symbol table loaded by the native bootloader properly. - add a function that check if the symbol table is loaded and return the table size (taken from sun3/sun3/locore2.c) - calculate end of symbol table address in locore.s - call ksym_addsyms_elf() with proper args To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.93 -r1.94 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.49 src/sys/arch/luna68k/luna68k/locore.s:1.50 --- src/sys/arch/luna68k/luna68k/locore.s:1.49 Sat Jul 28 17:33:53 2012 +++ src/sys/arch/luna68k/luna68k/locore.s Fri Jan 18 18:41:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.49 2012/07/28 17:33:53 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.50 2013/01/18 18:41:12 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -107,8 +107,6 @@ ASENTRY_NOPROFILE(start) movl %d7,%a0@ | save boothowto RELOC(bootdev,%a0) movl %d6,%a0@ | save bootdev - RELOC(esym,%a0) - movl %d5,%a0@ | save esym #endif RELOC(edata,%a0) | clear out BSS movl #_C_LABEL(end)-4,%d0 | (must be = 256 kB) @@ -117,10 +115,6 @@ ASENTRY_NOPROFILE(start) 1: clrl %a0@+ dbra %d0,1b -#if 1 - RELOC(esym,%a0) - clrl %a0@ | store end of symbol table XXX -#endif RELOC(lowram,%a0) movl %a5,%a0@ | store start of physical memory @@ -219,6 +213,24 @@ Lstart2: RELOC(physmem,%a0) movl %d1,%a0@ | and physmem +/* check if symbol table is loaded and set esym address */ +#if NKSYMS || defined(DDB) || defined(LKM) + RELOC(end,%a0) + pea %a0@ + RELOC(_C_LABEL(symtab_size),%a0) + jbsr %a0@ | symtab_size(end) + addql #4,%sp + tstl %d0 | check if valid symtab is loaded + jeq 1f | no, skip + lea _C_LABEL(end),%a0 | calculate end of symtab address + addl %a0,%d0 +#else + clrl %d0 | no symbol table +#endif +1: + RELOC(esym,%a0) + movl %d0,%a0@ + /* configure kernel and lwp0 VA space so we can get going */ #if NKSYMS || defined(DDB) || defined(LKM) RELOC(esym,%a0) | end of static kernel test/data/syms Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.93 src/sys/arch/luna68k/luna68k/machdep.c:1.94 --- src/sys/arch/luna68k/luna68k/machdep.c:1.93 Fri Aug 10 12:48:14 2012 +++ src/sys/arch/luna68k/luna68k/machdep.c Fri Jan 18 18:41:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -68,6 +68,8 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include sys/kgdb.h #endif #include sys/boot_flag.h +#define ELFSIZE 32 +#include sys/exec_elf.h #include uvm/uvm_extern.h @@ -117,6 +119,12 @@ int cpu_dumpsize(void); int cpu_dump(int (*)(dev_t, daddr_t, void *, size_t), daddr_t *); void cpu_init_kcore_hdr(void); +#if NKSYMS || defined(DDB) || defined(MODULAR) +vsize_t symtab_size(vaddr_t); +#endif +extern char end[]; +extern void *esym; + /* * Machine-independent crash dump header info. */ @@ -225,12 +233,7 @@ consinit(void) } #if NKSYMS || defined(DDB) || defined(MODULAR) - { - extern char end[]; - extern int *esym; - - ksyms_addsyms_elf(*(int *)end, ((int *)end) + 1, esym); - } + ksyms_addsyms_elf((esym != NULL) ? 1 : 0, (void *)end, esym); #endif #ifdef DDB if (boothowto RB_KDB) @@ -238,6 +241,53 @@ consinit(void) #endif } +#if NKSYMS || defined(DDB) || defined(MODULAR) + +/* + * Check and compute size of DDB symbols and strings. + * + * Note this function could be called from locore.s before MMU is turned on + * so we should avoid global variables and function calls. + */ +vsize_t +symtab_size(vaddr_t hdr) +{ + int i; + Elf_Ehdr *ehdr; + Elf_Shdr *shp; + vaddr_t maxsym; + + /* + * Check the ELF headers. + */ + + ehdr = (void *)hdr; + if (ehdr-e_ident[EI_MAG0] != ELFMAG0 || + ehdr-e_ident[EI_MAG1] != ELFMAG1 || + ehdr-e_ident[EI_MAG2] != ELFMAG2 || + ehdr-e_ident[EI_MAG3] != ELFMAG3 || + ehdr-e_ident[EI_CLASS] != ELFCLASS32) { + return 0; + } + + /* + * Find the end of the symbols and strings. + */ + + maxsym = 0; + shp = (Elf_Shdr *)(hdr + ehdr-e_shoff); + for (i = 0; i ehdr-e_shnum; i++) { + if (shp[i].sh_type != SHT_SYMTAB + shp[i].sh_type != SHT_STRTAB) { + continue; + } + maxsym
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Fri Jan 18 18:41:12 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: locore.s machdep.c Log Message: Handle ddb symbol table loaded by the native bootloader properly. - add a function that check if the symbol table is loaded and return the table size (taken from sun3/sun3/locore2.c) - calculate end of symbol table address in locore.s - call ksym_addsyms_elf() with proper args To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.93 -r1.94 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Tue Jan 15 17:23:39 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: disksubr.c Log Message: Make the default disklabel (for disks without label) have saner value. I.e. use d_secperunit for RAW_PART rather than 0x1fff for part a. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/luna68k/luna68k/disksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/disksubr.c diff -u src/sys/arch/luna68k/luna68k/disksubr.c:1.29 src/sys/arch/luna68k/luna68k/disksubr.c:1.30 --- src/sys/arch/luna68k/luna68k/disksubr.c:1.29 Mon Oct 26 19:16:56 2009 +++ src/sys/arch/luna68k/luna68k/disksubr.c Tue Jan 15 17:23:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.29 2009/10/26 19:16:56 cegger Exp $ */ +/* $NetBSD: disksubr.c,v 1.30 2013/01/15 17:23:39 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -103,7 +103,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.29 2009/10/26 19:16:56 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.30 2013/01/15 17:23:39 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -180,14 +180,20 @@ readdisklabel(dev_t dev, void (*strat)(s struct disklabel *dlp; struct sun_disklabel *slp; int error; + int i; /* minimal requirements for archtypal disk label */ if (lp-d_secperunit == 0) lp-d_secperunit = 0x1fff; - lp-d_npartitions = 1; - if (lp-d_partitions[0].p_size == 0) - lp-d_partitions[0].p_size = 0x1fff; - lp-d_partitions[0].p_offset = 0; + if (lp-d_npartitions RAW_PART + 1) + lp-d_npartitions = RAW_PART + 1; + for (i = 0; i RAW_PART; i++) { + lp-d_partitions[i].p_size = 0; + lp-d_partitions[i].p_offset = 0; + } + if (lp-d_partitions[RAW_PART].p_size == 0) + lp-d_partitions[RAW_PART].p_size = lp-d_secperunit; + lp-d_partitions[RAW_PART].p_offset = 0; /* obtain buffer to probe drive with */ bp = geteblk((int)lp-d_secsize);
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Tue Jan 15 17:23:39 UTC 2013 Modified Files: src/sys/arch/luna68k/luna68k: disksubr.c Log Message: Make the default disklabel (for disks without label) have saner value. I.e. use d_secperunit for RAW_PART rather than 0x1fff for part a. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/luna68k/luna68k/disksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Fri Aug 10 12:48:14 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Appease gcc -fno-common: - initialize cn_tab at runtime in pre-main luna68k_init() Tested on LUNA. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.92 src/sys/arch/luna68k/luna68k/machdep.c:1.93 --- src/sys/arch/luna68k/luna68k/machdep.c:1.92 Sat Jul 28 19:08:24 2012 +++ src/sys/arch/luna68k/luna68k/machdep.c Fri Aug 10 12:48:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.92 2012/07/28 19:08:24 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.92 2012/07/28 19:08:24 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -154,6 +154,13 @@ luna68k_init(void) extern paddr_t avail_start, avail_end; + /* initialize cn_tab for early console */ +#if 1 + cn_tab = syscons; +#else + cn_tab = romcons; +#endif + /* * Tell the VM system about available physical memory. The * luna68k only has one segment. @@ -772,12 +779,7 @@ module_init_md(void) } #endif -#if 1 - -struct consdev *cn_tab = syscons; - -#else - +#ifdef notyet /* * romcons is useful until m68k TC register is initialized. */ @@ -793,7 +795,6 @@ struct consdev romcons = { makedev(7, 0), /* XXX */ CN_DEAD, }; -struct consdev *cn_tab = romcons; #define __ ((int **)0x4100) #define GETC() (*(int (*)())__[6])()
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Fri Aug 10 12:48:14 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Appease gcc -fno-common: - initialize cn_tab at runtime in pre-main luna68k_init() Tested on LUNA. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jul 28 17:33:53 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: locore.s machdep.c Log Message: Handle bootarg strings passed from firmware prompt properly on LUNA-II. LUNA-II seems to use a different vector from LUNA to pass bootargs. Now we can specify RB_ASKNAME and RB_SINGLE at boot on LUNA-II. Should be pulled up to netbsd-6. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.90 -r1.91 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.48 src/sys/arch/luna68k/luna68k/locore.s:1.49 --- src/sys/arch/luna68k/luna68k/locore.s:1.48 Mon Jul 23 15:10:17 2012 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Jul 28 17:33:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.48 2012/07/23 15:10:17 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.49 2012/07/28 17:33:53 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -136,13 +136,6 @@ ASENTRY_NOPROFILE(start) RELOC(hwplanemask,%a0) movl %d5,%a0@ | save hwplanemask - movl #0x4100,%a0 | argument of 'x' command on boot - movl %a0@(212),%a0 | (char *)base[53] - RELOC(bootarg,%a1) - movl #63,%d0 -1: movb %a0@+,%a1@+ | copy to bootarg - dbra %d0,1b | upto 63 characters - movl #CACHE_OFF,%d0 movc %d0,%cacr | clear and disable on-chip cache(s) @@ -169,6 +162,23 @@ Lstart0: movl %d2,%a0@ /* + * save argument of 'x' command on boot per machine type + * XXX: assume CPU_68040 is LUNA-II + */ + movl #0x4100,%a0 + cmpl #CPU_68040,%d0 | 68040? + jne 1f | no, assume 68030 LUNA + movl %a0@(8),%a0 | arg at (char *)base[2] on LUNA-II + jra Lstart1 +1: + movl %a0@(212),%a0 | arg at (char *)base[53] on LUNA +Lstart1: + RELOC(bootarg,%a1) + movl #63,%d0 +1: movb %a0@+,%a1@+ | copy to bootarg + dbra %d0,1b | upto 63 characters + + /* * Now that we know what CPU we have, initialize the address error * and bus error handlers in the vector table: * Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.90 src/sys/arch/luna68k/luna68k/machdep.c:1.91 --- src/sys/arch/luna68k/luna68k/machdep.c:1.90 Fri Jul 27 05:36:10 2012 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Jul 28 17:33:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.91 2012/07/28 17:33:53 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.91 2012/07/28 17:33:53 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -183,15 +183,17 @@ luna68k_init(void) boothowto = 0; i = 0; /* - * 'bootarg' has; + * 'bootarg' on LUNA has: * args of x command ENADDR=addr HOST=host SERVER=name * where addr is MAC address of which network loader used (not * necessarily same as one at 0x4101.FFE0), host and name - * are the values of HOST and SERVER environment variables, + * are the values of HOST and SERVER environment variables. + * + * 'bootarg' on LUNA-II has args of x command only. * * NetBSD/luna68k cares only the first argment; any of sda. */ - for (cp = bootarg; *cp != ' '; cp++) { + for (cp = bootarg; *cp != ' ' *cp != 0; cp++) { BOOT_FLAG(*cp, boothowto); if (i++ = sizeof(bootarg)) break;
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Jul 28 17:33:53 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: locore.s machdep.c Log Message: Handle bootarg strings passed from firmware prompt properly on LUNA-II. LUNA-II seems to use a different vector from LUNA to pass bootargs. Now we can specify RB_ASKNAME and RB_SINGLE at boot on LUNA-II. Should be pulled up to netbsd-6. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.90 -r1.91 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jul 23 15:10:17 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Make reboot(2) actually work (don't access %sp after MMU is turned off). Also cleanup spaces and #if 0'ed code. Tested on both LUNA and LUNA-II. Should be pulled up to netbsd-6. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.47 src/sys/arch/luna68k/luna68k/locore.s:1.48 --- src/sys/arch/luna68k/luna68k/locore.s:1.47 Thu Dec 22 15:33:30 2011 +++ src/sys/arch/luna68k/luna68k/locore.s Mon Jul 23 15:10:17 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.47 2011/12/22 15:33:30 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.48 2012/07/23 15:10:17 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1062,7 +1062,9 @@ GLOBAL(doadump) * and return to monitor. */ ENTRY_NOPROFILE(doboot) -movw #PSL_HIGHIPL,%sr | no interrupts + movw #PSL_HIGHIPL,%sr | no interrupts + movl _C_LABEL(boothowto),%d7 | load howto + movl %sp@(4),%d2 | arg #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jeq Lnocache5 | yes, skip @@ -1085,18 +1087,9 @@ Lnocache5: .long 0x4e7b0807 | movc %d0,%srp #endif /* M68040 */ Lbootcommon: - movl _C_LABEL(boothowto),%d0 | load howto - movl %sp@(4),%d2 | arg lea _ASM_LABEL(tmpstk),%sp | physical SP in case of NMI movl #0,%d3 movc %d3,%vbr | monitor %vbr -#if 0 - andl #0,%d0 | mask off - tstl %d0 | - bne Lsboot | sboot? - tstl %d2 - beq Ldoreset -#endif movl #0x4100,%a0 | base = (int **)0x4100. movl %a0@,%d0 | *((int *)base[0])
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Jul 23 15:10:17 UTC 2012 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Make reboot(2) actually work (don't access %sp after MMU is turned off). Also cleanup spaces and #if 0'ed code. Tested on both LUNA and LUNA-II. Should be pulled up to netbsd-6. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 26 04:31:19 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Clear innmihand flag (for recursion check) when the NMI hander is returned so that we can abort kernel multiple times even after continue. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.86 src/sys/arch/luna68k/luna68k/machdep.c:1.87 --- src/sys/arch/luna68k/luna68k/machdep.c:1.86 Tue Nov 15 13:25:44 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Nov 26 04:31:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.86 2011/11/15 13:25:44 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.87 2011/11/26 04:31:19 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.86 2011/11/15 13:25:44 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.87 2011/11/26 04:31:19 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -731,6 +731,8 @@ nmihand(struct frame frame) innmihand = 1; luna68k_abort(ABORT SWITCH); + + innmihand = 0; } /*
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 26 04:32:46 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Use pmap_kenter_pa(9) to map msgbuf memory which is not managed by VM. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.87 src/sys/arch/luna68k/luna68k/machdep.c:1.88 --- src/sys/arch/luna68k/luna68k/machdep.c:1.87 Sat Nov 26 04:31:19 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Nov 26 04:32:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.87 2011/11/26 04:31:19 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.88 2011/11/26 04:32:46 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.87 2011/11/26 04:31:19 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.88 2011/11/26 04:32:46 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -172,9 +172,8 @@ luna68k_init(void) * avail_end was pre-decremented in pmap_bootstrap to compensate. */ for (i = 0; i btoc(MSGBUFSIZE); i++) - pmap_enter(pmap_kernel(), (vaddr_t)msgbufaddr + i * PAGE_SIZE, - avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pmap_kenter_pa((vaddr_t)msgbufaddr + i * PAGE_SIZE, + avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, 0); pmap_update(pmap_kernel()); initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 26 04:31:19 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Clear innmihand flag (for recursion check) when the NMI hander is returned so that we can abort kernel multiple times even after continue. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 26 04:32:46 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Use pmap_kenter_pa(9) to map msgbuf memory which is not managed by VM. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:08:36 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Tweak indent and misc comments to reduce diffs from hp300. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.37 src/sys/arch/luna68k/luna68k/locore.s:1.38 --- src/sys/arch/luna68k/luna68k/locore.s:1.37 Tue Feb 8 20:20:16 2011 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Nov 5 15:08:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.37 2011/02/08 20:20:16 rmind Exp $ */ +/* $NetBSD: locore.s,v 1.38 2011/11/05 15:08:36 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -197,8 +197,8 @@ Lstart0: Lstart2: /* initialize source/destination control registers for movs */ moveq #FC_USERD,%d0 | user space - movc %d0,%sfc | as source - movc %d0,%dfc | and destination of transfers + movc %d0,%sfc | as source + movc %d0,%dfc | and destination of transfers /* initialize memory sizes (for pmap_bootstrap) */ RELOC(memavail,%a0) movl %a0@,%d1 @@ -208,6 +208,7 @@ Lstart2: movl %d1,%a0@ | save as maxmem RELOC(physmem,%a0) movl %d1,%a0@ | and physmem + /* configure kernel and lwp0 VA space so we can get going */ #if NKSYMS || defined(DDB) || defined(LKM) RELOC(esym,%a0) | end of static kernel test/data/syms @@ -288,7 +289,7 @@ Lenab1: addql #4,%sp Lenab2: pflusha| flush entire ATC - cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? + cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jeq Lenab3 | yes, cache already on tstl _C_LABEL(mmutype) jpl Lenab3 | 68851 implies no d-cache @@ -312,9 +313,10 @@ Lenab3: clrl %sp@- | PC - filled in by execve movw #PSL_USER,%sp@- | in user mode clrl %sp@- | stack adjust count and padding - lea %sp@(-64),%sp | construct space for %D0-%D7/%A0-%A7 + lea %sp@(-64),%sp | construct space for D0-D7/A0-A7 lea _C_LABEL(lwp0),%a0 | save pointer to frame movl %sp,%a0@(L_MD_REGS) | in lwp0.l_md.md_regs + jra _C_LABEL(main) | main() PANIC(main() returned) /* NOTREACHED */ @@ -348,7 +350,7 @@ ENTRY_NOPROFILE(buserr60) movl %a0,%sp@(FR_SP) | in the savearea movel %sp@(FR_HW+12),%d0 | FSLW btst #2,%d0 | branch prediction error? - jeq Lnobpe + jeq Lnobpe movc %cacr,%d2 orl #IC60_CABC,%d2 | clear all branch cache entries movc %d2,%cacr @@ -548,29 +550,29 @@ Lfp_unsupp: * after the trap call. */ ENTRY_NOPROFILE(fpfault) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | and save - movl %a0,%sp@(FR_SP) | the user stack pointer - clrl %sp@- | no VA arg - movl _C_LABEL(curpcb),%a0 | current pcb - lea %a0@(PCB_FPCTX),%a0 | address of FP savearea - fsave %a0@ | save state + clrl %sp@- | stack adjust count + moveml #0x,%sp@- | save user registers + movl %usp,%a0 | and save + movl %a0,%sp@(FR_SP) | the user stack pointer + clrl %sp@- | no VA arg + movl _C_LABEL(curpcb),%a0 | current pcb + lea %a0@(PCB_FPCTX),%a0 | address of FP savearea + fsave %a0@ | save state #if defined(M68040) || defined(M68060) /* always null state frame on 68040, 68060 */ cmpl #FPU_68040,_C_LABEL(fputype) jge Lfptnull #endif - tstb %a0@ | null state frame? - jeq Lfptnull | yes, safe - clrw %d0 | no, need to tweak BIU - movb %a0@(1),%d0 | get frame size - bset #3,%a0@(0,%d0:w) | set exc_pend bit of BIU + tstb %a0@ | null state frame? + jeq Lfptnull | yes, safe + clrw %d0 | no, need to tweak BIU + movb %a0@(1),%d0 | get frame size + bset #3,%a0@(0,%d0:w) | set exc_pend bit of BIU Lfptnull: - fmovem %fpsr,%sp@- | push fpsr as code argument - frestore %a0@ | restore state - movl #T_FPERR,%sp@- | push type arg - jra _ASM_LABEL(faultstkadj) | call trap and deal with stack cleanup + fmovem %fpsr,%sp@- | push fpsr as code argument + frestore %a0@ | restore state + movl #T_FPERR,%sp@- | push type arg + jra _ASM_LABEL(faultstkadj) | call trap and deal with stack cleanup /* * Other exceptions only cause four and six word stack frame and require @@ -616,7 +618,7 @@ Ltrap1: */ ENTRY_NOPROFILE(trap12) movl _C_LABEL(curlwp),%a0 - movl %a0@(L_PROC),%sp@- | push curproc pointer + movl %a0@(L_PROC),%sp@- | push current proc pointer movl %d1,%sp@- | push length movl %a1,%sp@- | push addr movl %d0,%sp@- | push command @@ -675,7 +677,7 @@ Lkbrkpt: | Kernel-mode breakpoint or tra | Copy frame to the temporary stack movl %sp,%a0 | %a0=src lea _ASM_LABEL(tmpstk)-96,%a1 | %a1=dst - movl %a1,%sp | sp=new frame + movl %a1,%sp | %sp=new frame moveq #FR_SIZE,%d1 Lbrkpt1: movl %a0@+,%a1@+ @@ -719,13 +721,13 @@ Lbrkpt3: | so push the hardware frame at the current sp | before restoring registers and
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:23:38 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: More tweaks. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.38 src/sys/arch/luna68k/luna68k/locore.s:1.39 --- src/sys/arch/luna68k/luna68k/locore.s:1.38 Sat Nov 5 15:08:36 2011 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Nov 5 15:23:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.38 2011/11/05 15:08:36 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.39 2011/11/05 15:23:38 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,11 +39,11 @@ */ #include opt_compat_netbsd.h +#include opt_compat_sunos.h #include opt_ddb.h #include opt_fpsp.h #include opt_kgdb.h #include opt_lockdebug.h -#include opt_compat_sunos.h #include opt_fpu_emulate.h #include opt_m68k_arch.h @@ -569,7 +569,7 @@ ENTRY_NOPROFILE(fpfault) movb %a0@(1),%d0 | get frame size bset #3,%a0@(0,%d0:w) | set exc_pend bit of BIU Lfptnull: - fmovem %fpsr,%sp@- | push fpsr as code argument + fmovem %fpsr,%sp@- | push %fpsr as code argument frestore %a0@ | restore state movl #T_FPERR,%sp@- | push type arg jra _ASM_LABEL(faultstkadj) | call trap and deal with stack cleanup
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:27:52 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Remove unused getsp(). To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.39 src/sys/arch/luna68k/luna68k/locore.s:1.40 --- src/sys/arch/luna68k/luna68k/locore.s:1.39 Sat Nov 5 15:23:38 2011 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Nov 5 15:27:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.39 2011/11/05 15:23:38 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.40 2011/11/05 15:27:51 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -956,17 +956,6 @@ ENTRY(ecacheon) ENTRY(ecacheoff) rts -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by %A6 (e.g. GCC generated code). - */ -ENTRY(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - rts - ENTRY_NOPROFILE(getsfc) movc %sfc,%d0 rts
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:37:17 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: genassym.cf locore.s Log Message: Replace two magic numbers with macro via assym.h. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/luna68k/genassym.cf cvs rdiff -u -r1.41 -r1.42 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/genassym.cf diff -u src/sys/arch/luna68k/luna68k/genassym.cf:1.19 src/sys/arch/luna68k/luna68k/genassym.cf:1.20 --- src/sys/arch/luna68k/luna68k/genassym.cf:1.19 Fri Jan 14 02:06:27 2011 +++ src/sys/arch/luna68k/luna68k/genassym.cf Sat Nov 5 15:37:17 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.19 2011/01/14 02:06:27 rmind Exp $ +# $NetBSD: genassym.cf,v 1.20 2011/11/05 15:37:17 tsutsui Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -149,6 +149,8 @@ define SPL6 PSL_S | PSL_IPL6 # magic define FC_USERD FC_USERD define FC_SUPERD FC_SUPERD +define DC_FREEZE DC_FREEZE +define CACHE40_ON CACHE40_ON define CACHE_ON CACHE_ON define CACHE_OFF CACHE_OFF define CACHE_CLR CACHE_CLR Index: src/sys/arch/luna68k/luna68k/locore.s diff -u src/sys/arch/luna68k/luna68k/locore.s:1.41 src/sys/arch/luna68k/luna68k/locore.s:1.42 --- src/sys/arch/luna68k/luna68k/locore.s:1.41 Sat Nov 5 15:33:18 2011 +++ src/sys/arch/luna68k/luna68k/locore.s Sat Nov 5 15:37:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.41 2011/11/05 15:33:18 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.42 2011/11/05 15:37:17 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -147,7 +147,7 @@ ASENTRY_NOPROFILE(start) movc %d0,%cacr | clear and disable on-chip cache(s) /* determine our CPU/MMU combo - check for all regardless of kernel config */ - movl #0x200,%d0 | data freeze bit + movl #DC_FREEZE,%d0 | data freeze bit movc %d0,%cacr | only exists on 68030 movc %cacr,%d0 | read it back tstl %d0 | zero? @@ -252,7 +252,7 @@ Lmotommu0: RELOC(proto040tc,%a0) movl %a0@,%d0 .long 0x4e7b0003 | movc %d0,%tc - movl #0x80008000,%d0 + movl #CACHE40_ON,%d0 movc %d0,%cacr | turn on both caches jmp Lenab1 Lmotommu1:
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:08:36 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Tweak indent and misc comments to reduce diffs from hp300. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:23:38 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: More tweaks. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:27:52 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: locore.s Log Message: Remove unused getsp(). To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sat Nov 5 15:37:17 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: genassym.cf locore.s Log Message: Replace two magic numbers with macro via assym.h. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/luna68k/genassym.cf cvs rdiff -u -r1.41 -r1.42 src/sys/arch/luna68k/luna68k/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Oct 17 13:52:11 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: LUNA has 68030+68881, not 68882. XXX: we should have a common fpu_probe() function among all m68k ports. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.82 src/sys/arch/luna68k/luna68k/machdep.c:1.83 --- src/sys/arch/luna68k/luna68k/machdep.c:1.82 Thu Jul 28 09:59:13 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Mon Oct 17 13:52:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.82 2011/07/28 09:59:13 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.83 2011/10/17 13:52:11 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.82 2011/07/28 09:59:13 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.83 2011/10/17 13:52:11 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -289,7 +289,7 @@ identifycpu(void) memset(cpu_model, 0, sizeof(cpu_model)); switch (cputype) { case CPU_68030: - cpu = MC68030 CPU+MMU, MC68882 FPU; + cpu = MC68030 CPU+MMU, MC68881 FPU; machtype = LUNA_I; /* 20MHz 68030 */ cpuspeed = 20;
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Oct 17 14:19:28 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Print LUNA model name (not only CPU/MMU/FPU) on boot as 4.4BSD Lite2 does. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.83 src/sys/arch/luna68k/luna68k/machdep.c:1.84 --- src/sys/arch/luna68k/luna68k/machdep.c:1.83 Mon Oct 17 13:52:11 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Mon Oct 17 14:19:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.83 2011/10/17 13:52:11 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.84 2011/10/17 14:19:28 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.83 2011/10/17 13:52:11 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.84 2011/10/17 14:19:28 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -284,11 +284,12 @@ void identifycpu(void) { extern int cputype; - const char *cpu; + const char *cpu, *model; memset(cpu_model, 0, sizeof(cpu_model)); switch (cputype) { case CPU_68030: + model =LUNA-I; cpu = MC68030 CPU+MMU, MC68881 FPU; machtype = LUNA_I; /* 20MHz 68030 */ @@ -298,6 +299,7 @@ identifycpu(void) break; #if defined(M68040) case CPU_68040: + model =LUNA-II; cpu = MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches; machtype = LUNA_II; /* 25MHz 68040 */ @@ -309,7 +311,7 @@ identifycpu(void) panic(unknown CPU type); } strcpy(cpu_model, cpu); - printf(%s\n, cpu_model); + printf(%s (%s)\n, model, cpu); } /*
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Oct 17 13:52:11 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: LUNA has 68030+68881, not 68882. XXX: we should have a common fpu_probe() function among all m68k ports. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Mon Oct 17 14:19:28 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Print LUNA model name (not only CPU/MMU/FPU) on boot as 4.4BSD Lite2 does. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Jul 28 09:56:34 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: KNF, use ANSI decls, remove an obsolete hack, misc cosmetics etc. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.80 src/sys/arch/luna68k/luna68k/machdep.c:1.81 --- src/sys/arch/luna68k/luna68k/machdep.c:1.80 Sun Jun 12 03:35:43 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Thu Jul 28 09:56:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.80 2011/06/12 03:35:43 rmind Exp $ */ +/* $NetBSD: machdep.c,v 1.81 2011/07/28 09:56:34 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.80 2011/06/12 03:35:43 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.81 2011/07/28 09:56:34 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -151,7 +151,7 @@ * Early initialization, before main() is called. */ void -luna68k_init() +luna68k_init(void) { volatile unsigned char *pio0 = (void *)0x4900; int sw1, i; @@ -182,7 +182,7 @@ pio0[3] = 0xb6; pio0[2] = 1 6; /* enable parity check */ pio0[3] = 0xb6; - sw1 = pio0[0]; /* dipssw1 value */ + sw1 = pio0[0]; /* dip sw1 value */ sw1 ^= 0xff; sysconsole = !(sw1 0x2); /* console selection */ @@ -214,6 +214,7 @@ void consinit(void) { + if (sysconsole == 0) syscnattach(0); else { @@ -268,7 +269,7 @@ * Allocate a submap for physio */ phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, - VM_PHYS_SIZE, 0, false, NULL); + VM_PHYS_SIZE, 0, false, NULL); format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf(avail memory = %s\n, pbuf); @@ -290,14 +291,18 @@ case CPU_68030: cpu = MC68030 CPU+MMU, MC68882 FPU; machtype = LUNA_I; - cpuspeed = 20; delay_divisor = 102; /* 20MHz 68030 */ + /* 20MHz 68030 */ + cpuspeed = 20; + delay_divisor = 102; hz = 60; break; #if defined(M68040) case CPU_68040: cpu = MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches; machtype = LUNA_II; - cpuspeed = 25; delay_divisor = 300; /* 25MHz 68040 */ + /* 25MHz 68040 */ + cpuspeed = 25; + delay_divisor = 300; break; #endif default: @@ -329,8 +334,7 @@ int waittime = -1; void -cpu_reboot(volatile int howto, char *bootstr) - /* howto: XXX to shutup GCC XXX */ +cpu_reboot(int howto, char *bootstr) { struct pcb *pcb = lwp_getpcb(curlwp); extern void doboot(void); @@ -371,13 +375,14 @@ /* Finally, halt/reboot the system. */ if ((howto RB_POWERDOWN) == RB_POWERDOWN) { - u_int8_t *pio = (void *)0x4d00; + uint8_t *pio = (void *)0x4d00; printf(power is going down.\n); DELAY(10); pio[3] = 0x94; pio[2] = 0 4; - for (;;) /* NOP */; + for (;;) + /* NOP */; } if (howto RB_HALT) { printf(System halted. Hit any key to reboot.\n\n); @@ -388,7 +393,8 @@ DELAY(10); doboot(); /*NOTREACHED*/ - while (1) ; + for (;;) + ; } /* @@ -431,7 +437,7 @@ /* * Initialize pointer to kernel segment table. */ - m-sysseg_pa = (u_int32_t)(pmap_kernel()-pm_stpa); + m-sysseg_pa = (uint32_t)(pmap_kernel()-pm_stpa); /* * Initialize relocation value such that: @@ -446,7 +452,7 @@ /* * Define the end of the relocatable range. */ - m-relocend = (u_int32_t)end; + m-relocend = (uint32_t)end; /* * The luna68k has one contiguous memory segment. @@ -474,9 +480,7 @@ * Called by dumpsys() to dump the machine-dependent header. */ int -cpu_dump(dump, blknop) - int (*dump)(dev_t, daddr_t, void *, size_t); - daddr_t *blknop; +cpu_dump(int (*dump)(dev_t, daddr_t, void *, size_t), daddr_t *blknop) { int buf[MDHDRSIZE / sizeof(int)]; cpu_kcore_hdr_t *chdr; @@ -494,13 +498,13 @@ memcpy(chdr, cpu_kcore_hdr, sizeof(cpu_kcore_hdr_t)); error = (*dump)(dumpdev, *blknop, (void *)buf, sizeof(buf)); *blknop += btodb(sizeof(buf)); - return (error); + return error; } /* * These variables are needed by /sbin/savecore */ -u_int32_t dumpmag = 0x8fca0101; /* magic number */ +uint32_t dumpmag = 0x8fca0101; /* magic number */ int dumpsize = 0; /* pages */ long dumplo = 0; /* blocks */ @@ -644,8 +648,9 @@ void straytrap(int pc, u_short evec) { + printf(unexpected trap (vector offset %x) from %x\n, - evec 0xFFF, pc); + evec 0xFFF, pc); } int *nofault; @@ -660,30 +665,30 @@ i = *addr; if (i) return (0); #endif - nofault = (int *) faultbuf; + nofault = (int *)faultbuf; if (setjmp((label_t *)nofault)) { - nofault = (int *) 0; - return(1); + nofault = (int *)0; + return 1; } switch (nbytes) { case 1: - i =
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Jul 28 09:59:13 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Use volatile uint8_t to access 8255 PPI ports. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.81 src/sys/arch/luna68k/luna68k/machdep.c:1.82 --- src/sys/arch/luna68k/luna68k/machdep.c:1.81 Thu Jul 28 09:56:34 2011 +++ src/sys/arch/luna68k/luna68k/machdep.c Thu Jul 28 09:59:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.81 2011/07/28 09:56:34 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.82 2011/07/28 09:59:13 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.81 2011/07/28 09:56:34 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.82 2011/07/28 09:59:13 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -153,7 +153,7 @@ void luna68k_init(void) { - volatile unsigned char *pio0 = (void *)0x4900; + volatile uint8_t *pio0 = (void *)0x4900; int sw1, i; char *cp; extern char bootarg[64]; @@ -375,7 +375,7 @@ /* Finally, halt/reboot the system. */ if ((howto RB_POWERDOWN) == RB_POWERDOWN) { - uint8_t *pio = (void *)0x4d00; + volatile uint8_t *pio = (void *)0x4d00; printf(power is going down.\n); DELAY(10);
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Jul 28 09:56:34 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: KNF, use ANSI decls, remove an obsolete hack, misc cosmetics etc. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Thu Jul 28 09:59:13 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: machdep.c Log Message: Use volatile uint8_t to access 8255 PPI ports. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/luna68k/luna68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sun Jan 2 07:51:02 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: pmap_bootstrap.c Log Message: Fix one more fatal typo. Umm. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.28 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.29 --- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.28 Sun Jun 6 04:50:06 2010 +++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Sun Jan 2 07:51:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.28 2010/06/06 04:50:06 mrg Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.29 2011/01/02 07:51:02 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #include opt_m68k_arch.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.28 2010/06/06 04:50:06 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.29 2011/01/02 07:51:02 tsutsui Exp $); #include sys/param.h @@ -187,7 +187,7 @@ nl1desc = howmany(nl2desc, SG4_LEV2SIZE); ste = (st_entry_t *)kstpa; este = ste[nl1desc]; - protoste = (paddr_t)pte[SG4_LEV1SIZE] | SG_U | SG_RW | SG_V; + protoste = (paddr_t)ste[SG4_LEV1SIZE] | SG_U | SG_RW | SG_V; while (ste este) { *ste++ = protoste; protoste += (SG4_LEV2SIZE * sizeof(st_entry_t));
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Sun Jan 2 07:51:02 UTC 2011 Modified Files: src/sys/arch/luna68k/luna68k: pmap_bootstrap.c Log Message: Fix one more fatal typo. Umm. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/luna68k
Module Name:src Committed By: tsutsui Date: Fri Dec 11 20:00:49 UTC 2009 Modified Files: src/sys/arch/luna68k/luna68k: pmap_bootstrap.c Log Message: Fix (probably fatal) typo on yamt-km merge back on 2005. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.25 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.26 --- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.25 Sun Dec 6 06:41:30 2009 +++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Fri Dec 11 20:00:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.25 2009/12/06 06:41:30 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.26 2009/12/11 20:00:49 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.25 2009/12/06 06:41:30 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.26 2009/12/11 20:00:49 tsutsui Exp $); #include sys/param.h @@ -290,10 +290,10 @@ ste = (st_entry_t *)kstpa; pte = (pt_entry_t *)kptmpa; /* XXX should be (TIA_SIZE * PAGE_SIZE) */ - pte[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] = + ste[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] = kptmpa | SG_RW | SG_V; /* XXX should be (TIA_SIZE * PAGE_SIZE) */ - ste[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] = + pte[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] = kptmpa | PG_RW | PG_CI | PG_V; }