CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: rin Date: Sun Mar 8 06:06:47 UTC 2020 Modified Files: src/sys/arch/sun2/sun2: machdep.c Log Message: Support module(7). To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/sun2/sun2/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/sun2/sun2/machdep.c diff -u src/sys/arch/sun2/sun2/machdep.c:1.81 src/sys/arch/sun2/sun2/machdep.c:1.82 --- src/sys/arch/sun2/sun2/machdep.c:1.81 Sun Mar 8 06:05:05 2020 +++ src/sys/arch/sun2/sun2/machdep.c Sun Mar 8 06:06:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.81 2020/03/08 06:05:05 rin Exp $ */ +/* $NetBSD: machdep.c,v 1.82 2020/03/08 06:06:46 rin Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -149,7 +149,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.81 2020/03/08 06:05:05 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.82 2020/03/08 06:06:46 rin Exp $"); #include "opt_ddb.h" #include "opt_fpu_emulate.h" @@ -172,6 +172,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include #include #include @@ -1167,3 +1168,13 @@ mm_md_kernacc(void *ptr, vm_prot_t prot, return 0; return EFAULT; } + +#ifdef MODULAR +/* + * Push any modules loaded by the bootloader etc. + */ +void +module_init_md(void) +{ +} +#endif
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: rin Date: Sun Mar 8 06:05:05 UTC 2020 Modified Files: src/sys/arch/sun2/sun2: machdep.c Log Message: Sort headers. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/sun2/sun2/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/sun2/sun2/machdep.c diff -u src/sys/arch/sun2/sun2/machdep.c:1.80 src/sys/arch/sun2/sun2/machdep.c:1.81 --- src/sys/arch/sun2/sun2/machdep.c:1.80 Tue Dec 31 13:07:12 2019 +++ src/sys/arch/sun2/sun2/machdep.c Sun Mar 8 06:05:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.80 2019/12/31 13:07:12 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.81 2020/03/08 06:05:05 rin Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -149,67 +149,67 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.80 2019/12/31 13:07:12 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.81 2020/03/08 06:05:05 rin Exp $"); #include "opt_ddb.h" -#include "opt_kgdb.h" #include "opt_fpu_emulate.h" +#include "opt_kgdb.h" #include "opt_modular.h" #include -#include -#include -#include #include -#include #include -#include +#include +#include #include -#include +#include +#include /* for MID_* */ #include +#include +#include +#include +#include +#include +#include #include +#include #include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include /* for MID_* */ -#include -#include #include -#include -#include -#include + #ifdef KGDB #include #endif #include /* XXX: not _extern ... need vm_map_create */ -#include - #include #include -#include +#define _SUN68K_BUS_DMA_PRIVATE +#include +#include #include #include #include +#include #include -#include #include +#include +#include #include #include -#define _SUN68K_BUS_DMA_PRIVATE -#include -#include -#include -#include +#include #if defined(DDB) #include -#include #include +#include #endif #include
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: christos Date: Mon Mar 24 18:50:08 UTC 2014 Modified Files: src/sys/arch/sun2/sun2: locore.s Log Message: avoid local redefinitions To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sun2/sun2/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/sun2/sun2/locore.s diff -u src/sys/arch/sun2/sun2/locore.s:1.24 src/sys/arch/sun2/sun2/locore.s:1.25 --- src/sys/arch/sun2/sun2/locore.s:1.24 Tue Nov 15 05:57:04 2011 +++ src/sys/arch/sun2/sun2/locore.s Mon Mar 24 14:50:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.24 2011/11/15 10:57:04 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.25 2014/03/24 18:50:08 christos Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -400,12 +400,6 @@ Lbrkpt2: * %d0,%d1,%a0,%a1, sr, pc, vo */ -#define INTERRUPT_SAVEREG \ - moveml #0xC0C0,%sp@- - -#define INTERRUPT_RESTORE \ - moveml %sp@+,#0x0303 - /* * This is the common auto-vector interrupt handler, * for which the CPU provides the vector=0x18+level. @@ -419,7 +413,7 @@ Lbrkpt2: GLOBAL(_isr_autovec) INTERRUPT_SAVEREG jbsr _C_LABEL(isr_autovec) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) /* clock: see clock.c */ @@ -431,7 +425,7 @@ GLOBAL(_isr_autovec) GLOBAL(_isr_clock) INTERRUPT_SAVEREG jbsr _C_LABEL(clock_intr) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) | Handler for all vectored interrupts (i.e. VME interrupts) @@ -443,12 +437,9 @@ GLOBAL(_isr_clock) GLOBAL(_isr_vectored) INTERRUPT_SAVEREG jbsr _C_LABEL(isr_vectored) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) -#undef INTERRUPT_SAVEREG -#undef INTERRUPT_RESTORE - /* interrupt counters (needed by vmstat) */ GLOBAL(intrnames) .asciz spur | 0
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: para Date: Tue Jan 31 22:47:08 UTC 2012 Modified Files: src/sys/arch/sun2/sun2: pmap.c Log Message: unbreak the sun2 pmap To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sun2/sun2/pmap.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/sun2/sun2/pmap.c diff -u src/sys/arch/sun2/sun2/pmap.c:1.44 src/sys/arch/sun2/sun2/pmap.c:1.45 --- src/sys/arch/sun2/sun2/pmap.c:1.44 Fri Jun 3 17:03:52 2011 +++ src/sys/arch/sun2/sun2/pmap.c Tue Jan 31 22:47:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.44 2011/06/03 17:03:52 tsutsui Exp $ */ +/* $NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.44 2011/06/03 17:03:52 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $); #include opt_ddb.h #include opt_pmap_debug.h @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.4 #include sys/param.h #include sys/systm.h #include sys/proc.h -#include sys/malloc.h +#include sys/kmem.h #include sys/pool.h #include sys/queue.h #include sys/kcore.h @@ -1820,7 +1820,7 @@ void pmap_user_init(pmap_t pmap) { int i; - pmap-pm_segmap = malloc(sizeof(char)*NUSEG, M_VMPMAP, M_WAITOK); + pmap-pm_segmap = kmem_alloc(sizeof(char)*NUSEG, KM_SLEEP); for (i = 0; i NUSEG; i++) { pmap-pm_segmap[i] = SEGINV; } @@ -1871,7 +1871,7 @@ pmap_release(struct pmap *pmap) #endif context_free(pmap); } - free(pmap-pm_segmap, M_VMPMAP); + kmem_free(pmap-pm_segmap, sizeof(char)*NUSEG); pmap-pm_segmap = NULL; splx(s);
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: tsutsui Date: Tue Jun 14 15:51:36 UTC 2011 Modified Files: src/sys/arch/sun2/sun2: mm_md.c Log Message: Remove duplicated functions that are implemented in machdep.c. XXX: why do only sun2 and sun3 (and sun3x) have separate mm_md.c? To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sun2/sun2/mm_md.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/sun2/sun2/mm_md.c diff -u src/sys/arch/sun2/sun2/mm_md.c:1.2 src/sys/arch/sun2/sun2/mm_md.c:1.3 --- src/sys/arch/sun2/sun2/mm_md.c:1.2 Sun Jun 12 03:35:47 2011 +++ src/sys/arch/sun2/sun2/mm_md.c Tue Jun 14 15:51:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mm_md.c,v 1.2 2011/06/12 03:35:47 rmind Exp $ */ +/* $NetBSD: mm_md.c,v 1.3 2011/06/14 15:51:35 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mm_md.c,v 1.2 2011/06/12 03:35:47 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: mm_md.c,v 1.3 2011/06/14 15:51:35 tsutsui Exp $); #include sys/param.h #include sys/errno.h @@ -91,45 +91,6 @@ #define DEV_LEDS 13 /* minor device 13 is leds */ int -mm_md_physacc(paddr_t pa, vm_prot_t prot) -{ - - /* Allow access only in managed RAM. */ - if (pa avail_start || pa = avail_end) - return EFAULT; - return 0; -} - -bool -mm_md_direct_mapped_phys(paddr_t paddr, vaddr_t *vaddr) -{ - - if (paddr = avail_start) - return false; - *vaddr = paddr; - return true; -} - -/* - * Allow access to the PROM mapping similiar to uvm_kernacc(). - */ -int -mm_md_kernacc(void *ptr, vm_prot_t prot, bool *handled) -{ - - if ((vaddr_t)ptr SUN2_PROM_BASE || (vaddr_t)ptr SUN2_MONEND) { - *handled = false; - return 0; - } - - *handled = true; - /* Read in the PROM itself is OK, write not. */ - if ((prot VM_PROT_WRITE) == 0) - return 0; - return EFAULT; -} - -int mm_md_readwrite(dev_t dev, struct uio *uio) {
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: he Date: Sat Nov 28 21:37:28 UTC 2009 Modified Files: src/sys/arch/sun2/sun2: locore2.c Log Message: Cast a vaddr_t (integral type) to void* before passing to memset. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sun2/sun2/locore2.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/sun2/sun2/locore2.c diff -u src/sys/arch/sun2/sun2/locore2.c:1.23 src/sys/arch/sun2/sun2/locore2.c:1.24 --- src/sys/arch/sun2/sun2/locore2.c:1.23 Fri Nov 27 03:23:14 2009 +++ src/sys/arch/sun2/sun2/locore2.c Sat Nov 28 21:37:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore2.c,v 1.23 2009/11/27 03:23:14 rmind Exp $ */ +/* $NetBSD: locore2.c,v 1.24 2009/11/28 21:37:28 he Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locore2.c,v 1.23 2009/11/27 03:23:14 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: locore2.c,v 1.24 2009/11/28 21:37:28 he Exp $); #include opt_ddb.h #include opt_modular.h @@ -187,7 +187,7 @@ * (The fault handler may reference lwp0 stuff.) */ uvm_lwp_setuarea(lwp0, nextva); - memset(nextva, 0, USPACE); + memset((void *)nextva, 0, USPACE); nextva += USPACE;