CVS commit: src/sys/arch/xen
Module Name:src Committed By: cherry Date: Sun Nov 25 08:39:36 UTC 2012 Modified Files: src/sys/arch/xen/include: hypervisor.h src/sys/arch/xen/x86: hypervisor_machdep.c src/sys/arch/xen/xen: evtchn.c Log Message: Make hypervisor_set_ipending() and its consumers cpu unaware. This syncs syntax with semantics To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/xen/include/hypervisor.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/xen/x86/hypervisor_machdep.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/xen/xen/evtchn.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/xen/include/hypervisor.h diff -u src/sys/arch/xen/include/hypervisor.h:1.38 src/sys/arch/xen/include/hypervisor.h:1.39 --- src/sys/arch/xen/include/hypervisor.h:1.38 Fri Feb 17 18:42:19 2012 +++ src/sys/arch/xen/include/hypervisor.h Sun Nov 25 08:39:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.h,v 1.38 2012/02/17 18:42:19 bouyer Exp $ */ +/* $NetBSD: hypervisor.h,v 1.39 2012/11/25 08:39:35 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -142,8 +142,7 @@ void hypervisor_unmask_event(unsigned in void hypervisor_mask_event(unsigned int); void hypervisor_clear_event(unsigned int); void hypervisor_enable_ipl(unsigned int); -void hypervisor_set_ipending(struct cpu_info *, - uint32_t, int, int); +void hypervisor_set_ipending(uint32_t, int, int); void hypervisor_machdep_attach(void); void hypervisor_machdep_resume(void); Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.22 src/sys/arch/xen/x86/hypervisor_machdep.c:1.23 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.22 Sat Nov 10 16:28:06 2012 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Sun Nov 25 08:39:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.22 2012/11/10 16:28:06 cherry Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.23 2012/11/25 08:39:36 cherry Exp $ */ /* * @@ -54,7 +54,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.22 2012/11/10 16:28:06 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.23 2012/11/25 08:39:36 cherry Exp $); #include sys/param.h #include sys/systm.h @@ -87,11 +87,11 @@ static void update_p2m_frame_list_list(v // #define EARLY_DEBUG_EVENT /* callback function type */ -typedef void (*iterate_func_t)(struct cpu_info *, unsigned int, - unsigned int, unsigned int, void *); +typedef void (*iterate_func_t)(unsigned int, unsigned int, + unsigned int, void *); static inline void -evt_iterate_bits(struct cpu_info *ci, volatile unsigned long *pendingl1, +evt_iterate_bits(volatile unsigned long *pendingl1, volatile unsigned long *pendingl2, volatile unsigned long *mask, iterate_func_t iterate_pending, void *iterate_args) @@ -109,7 +109,7 @@ evt_iterate_bits(struct cpu_info *ci, vo l1 = ~(1UL l1i); l2 = pendingl2[l1i] (mask != NULL ? ~mask[l1i] : -1UL); - l2 = ci-ci_evtmask[l1i]; + l2 = curcpu()-ci_evtmask[l1i]; if (mask != NULL) xen_atomic_setbits_l(mask[l1i], l2); xen_atomic_clearbits_l(pendingl2[l1i], l2); @@ -120,7 +120,7 @@ evt_iterate_bits(struct cpu_info *ci, vo port = (l1i LONG_SHIFT) + l2i; - iterate_pending(ci, port, l1i, l2i, iterate_args); + iterate_pending(port, l1i, l2i, iterate_args); } } } @@ -131,20 +131,18 @@ evt_iterate_bits(struct cpu_info *ci, vo */ static inline void -evt_set_pending(struct cpu_info *ci, unsigned int port, unsigned int l1i, +evt_set_pending(unsigned int port, unsigned int l1i, unsigned int l2i, void *args) { KASSERT(args != NULL); - KASSERT(ci != NULL); int *ret = args; if (evtsource[port]) { - hypervisor_set_ipending(evtsource[port]-ev_cpu, - evtsource[port]-ev_imask, l1i, l2i); + hypervisor_set_ipending(evtsource[port]-ev_imask, l1i, l2i); evtsource[port]-ev_evcnt.ev_count++; - if (*ret == 0 ci-ci_ilevel + if (*ret == 0 curcpu()-ci_ilevel evtsource[port]-ev_maxlevel) *ret = 1; } @@ -193,7 +191,7 @@ stipending(void) vci-evtchn_upcall_pending = 0; - evt_iterate_bits(ci, vci-evtchn_pending_sel, + evt_iterate_bits(vci-evtchn_pending_sel, s-evtchn_pending, s-evtchn_mask, evt_set_pending, ret); @@ -214,12 +212,12 @@ stipending(void) /* Iterate through pending events and call the event handler */ static inline void -evt_do_hypervisor_callback(struct cpu_info *ci, unsigned int port, - unsigned int l1i, unsigned int l2i, void *args) +evt_do_hypervisor_callback(unsigned int port, unsigned int l1i, + unsigned int l2i, void *args) { KASSERT(args != NULL); - KASSERT(ci == curcpu()); + struct cpu_info *ci = curcpu(); struct intrframe *regs = args; #ifdef PORT_DEBUG @@ -273,7 +271,7 @@ do_hypervisor_callback(struct intrframe while (vci-evtchn_upcall_pending) {
CVS commit: src/sys/net
Module Name:src Committed By: mbalmer Date: Sun Nov 25 09:06:43 UTC 2012 Modified Files: src/sys/net: if_ppp.c Log Message: Don't check mp for NULL twice. From Michael W. Bomardieri m...@il.net via tech-...@netbsd.org. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/net/if_ppp.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/net/if_ppp.c diff -u src/sys/net/if_ppp.c:1.137 src/sys/net/if_ppp.c:1.138 --- src/sys/net/if_ppp.c:1.137 Thu Oct 11 20:05:50 2012 +++ src/sys/net/if_ppp.c Sun Nov 25 09:06:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $ */ +/* $NetBSD: if_ppp.c,v 1.138 2012/11/25 09:06:43 mbalmer Exp $ */ /* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */ /* @@ -102,7 +102,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ppp.c,v 1.138 2012/11/25 09:06:43 mbalmer Exp $); #include ppp.h @@ -1266,7 +1266,7 @@ ppp_ccp(struct ppp_softc *sc, struct mbu mp = m-m_next; if (mp == NULL) return; - dp = (mp != NULL)? mtod(mp, u_char *): NULL; + dp = mtod(mp, u_char *); } else { mp = m; dp = mtod(mp, u_char *) + PPP_HDRLEN;
CVS commit: [netbsd-6-0] src/distrib
Module Name:src Committed By: jdc Date: Sun Nov 25 10:10:04 UTC 2012 Modified Files: src/distrib/emips/miniroot [netbsd-6-0]: Makefile.inc src/distrib/hp300/miniroot [netbsd-6-0]: Makefile.inc src/distrib/hpcarm/miniroot [netbsd-6-0]: Makefile.inc src/distrib/hpcmips/miniroot [netbsd-6-0]: Makefile.inc src/distrib/hpcsh/miniroot [netbsd-6-0]: Makefile.inc src/distrib/mvme68k/miniroot [netbsd-6-0]: Makefile.inc src/distrib/pmax/miniroot [netbsd-6-0]: Makefile.inc src/distrib/vax/miniroot [netbsd-6-0]: Makefile.inc Log Message: Pull up revisions: src/distrib/emips/miniroot/Makefile.inc revision 1.3 src/distrib/hp300/miniroot/Makefile.inc revision 1.13 src/distrib/hpcarm/miniroot/Makefile.inc revision 1.7 src/distrib/hpcmips/miniroot/Makefile.inc revision 1.20 src/distrib/hpcsh/miniroot/Makefile.inc revision 1.8 src/distrib/mvme68k/miniroot/Makefile.inc revision 1.13 src/distrib/pmax/miniroot/Makefile.inc revision 1.24 src/distrib/vax/miniroot/Makefile.inc revision 1.23 (requested by tsutsui in ticket #650). Fix PR install/47123 (sysinst fails with openpty() failed on many ports): Add ipty to MAKEDEVTARGETS in miniroot/Makefile.inc since MAKEDEV all no longer creates /dev/pty* device nodes and miniroot doesn't mount ptyfs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.10.1 src/distrib/emips/miniroot/Makefile.inc cvs rdiff -u -r1.12 -r1.12.14.1 src/distrib/hp300/miniroot/Makefile.inc cvs rdiff -u -r1.6 -r1.6.14.1 src/distrib/hpcarm/miniroot/Makefile.inc cvs rdiff -u -r1.19 -r1.19.14.1 src/distrib/hpcmips/miniroot/Makefile.inc cvs rdiff -u -r1.7 -r1.7.14.1 src/distrib/hpcsh/miniroot/Makefile.inc cvs rdiff -u -r1.12 -r1.12.14.1 src/distrib/mvme68k/miniroot/Makefile.inc cvs rdiff -u -r1.23 -r1.23.14.1 src/distrib/pmax/miniroot/Makefile.inc cvs rdiff -u -r1.20.8.2 -r1.20.8.2.4.1 src/distrib/vax/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/miniroot/Makefile.inc diff -u src/distrib/emips/miniroot/Makefile.inc:1.2 src/distrib/emips/miniroot/Makefile.inc:1.2.10.1 --- src/distrib/emips/miniroot/Makefile.inc:1.2 Wed Jun 15 14:47:43 2011 +++ src/distrib/emips/miniroot/Makefile.inc Sun Nov 25 10:10:02 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/06/15 14:47:43 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.2.10.1 2012/11/25 10:10:02 jdc Exp $ DBG= -Os IMAGESIZE= 32m MAKEFS_FLAGS= -f 15 IMAGEENDIAN= be -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hp300/miniroot/Makefile.inc diff -u src/distrib/hp300/miniroot/Makefile.inc:1.12 src/distrib/hp300/miniroot/Makefile.inc:1.12.14.1 --- src/distrib/hp300/miniroot/Makefile.inc:1.12 Thu Feb 11 09:06:48 2010 +++ src/distrib/hp300/miniroot/Makefile.inc Sun Nov 25 10:10:03 2012 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.12 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.12.14.1 2012/11/25 10:10:03 jdc Exp $ IMAGESIZE= 7m IMAGEENDIAN= be -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty MAKEFS_FLAGS= -o density=4k IMAGEDEPENDS+= ${ARCHDIR}/dot.profile ${ARCHDIR}/install.md \ ${KERNOBJDIR}/INSTALL/netbsd Index: src/distrib/hpcarm/miniroot/Makefile.inc diff -u src/distrib/hpcarm/miniroot/Makefile.inc:1.6 src/distrib/hpcarm/miniroot/Makefile.inc:1.6.14.1 --- src/distrib/hpcarm/miniroot/Makefile.inc:1.6 Thu Feb 11 09:06:48 2010 +++ src/distrib/hpcarm/miniroot/Makefile.inc Sun Nov 25 10:10:03 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.6 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.6.14.1 2012/11/25 10:10:03 jdc Exp $ DBG= -Os IMAGESIZE= 4352k MAKEFS_FLAGS= -o density=2k IMAGEENDIAN= le -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hpcmips/miniroot/Makefile.inc diff -u src/distrib/hpcmips/miniroot/Makefile.inc:1.19 src/distrib/hpcmips/miniroot/Makefile.inc:1.19.14.1 --- src/distrib/hpcmips/miniroot/Makefile.inc:1.19 Thu Feb 11 09:06:48 2010 +++ src/distrib/hpcmips/miniroot/Makefile.inc Sun Nov 25 10:10:03 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.19 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.19.14.1 2012/11/25 10:10:03 jdc Exp $ DBG= -Os IMAGESIZE= 4352k MAKEFS_FLAGS= -o density=2k IMAGEENDIAN= le -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hpcsh/miniroot/Makefile.inc diff -u src/distrib/hpcsh/miniroot/Makefile.inc:1.7 src/distrib/hpcsh/miniroot/Makefile.inc:1.7.14.1 ---
CVS commit: [netbsd-6-0] src/distrib/utils/sysinst
Module Name:src Committed By: jdc Date: Sun Nov 25 10:12:14 UTC 2012 Modified Files: src/distrib/utils/sysinst [netbsd-6-0]: disks.c Log Message: Pull up revision 1.127 (requested by tsutsui in ticket #706). Don't show a disk which is mounted as root partition in the Available disks list during sysinst procedure to prevent users from shooting their foot in case of installation using install-image on a USB stick. Per suggestion in PR/47195. To generate a diff of this commit: cvs rdiff -u -r1.123.2.2 -r1.123.2.2.4.1 src/distrib/utils/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/disks.c diff -u src/distrib/utils/sysinst/disks.c:1.123.2.2 src/distrib/utils/sysinst/disks.c:1.123.2.2.4.1 --- src/distrib/utils/sysinst/disks.c:1.123.2.2 Thu Jul 5 17:29:15 2012 +++ src/distrib/utils/sysinst/disks.c Sun Nov 25 10:12:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.123.2.2 2012/07/05 17:29:15 riz Exp $ */ +/* $NetBSD: disks.c,v 1.123.2.2.4.1 2012/11/25 10:12:14 jdc Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -377,6 +377,14 @@ get_disks(struct disk_desc *dd) break; continue; } + + /* + * Exclude a disk mounted as root partition, + * in case of install-image on a USB memstick. + */ + if (is_active_rootpart(dd-dd_name, 0)) +continue; + dd-dd_cyl = l.d_ncylinders; dd-dd_head = l.d_ntracks; dd-dd_sec = l.d_nsectors;
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: jdc Date: Sun Nov 25 10:13:52 UTC 2012 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.1 Log Message: Tickets 650, 706. To generate a diff of this commit: cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-6.0.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.1 diff -u src/doc/CHANGES-6.0.1:1.1.2.22 src/doc/CHANGES-6.0.1:1.1.2.23 --- src/doc/CHANGES-6.0.1:1.1.2.22 Sat Nov 24 21:47:35 2012 +++ src/doc/CHANGES-6.0.1 Sun Nov 25 10:13:52 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.1,v 1.1.2.22 2012/11/24 21:47:35 jdc Exp $ +# $NetBSD: CHANGES-6.0.1,v 1.1.2.23 2012/11/25 10:13:52 jdc Exp $ A complete list of changes from the NetBSD 6.0 release to the NetBSD 6.0.1 release: @@ -203,3 +203,31 @@ tests/lib/libc/sys/t_kevent.c1.2-1.5 Add a test for adding an event to an unsupported fd. [christos, ticket #716] +distrib/emips/miniroot/Makefile.inc 1.3 +distrib/hp300/miniroot/Makefile.inc 1.13 +distrib/hpcarm/miniroot/Makefile.inc 1.7 +distrib/hpcmips/miniroot/Makefile.inc 1.20 +distrib/hpcsh/miniroot/Makefile.inc 1.8 +distrib/mvme68k/miniroot/Makefile.inc 1.13 +distrib/pmax/miniroot/Makefile.inc 1.24 +distrib/vax/miniroot/Makefile.inc 1.23 + + Add ipty to MAKEDEVTARGETS in miniroot/Makefile.inc since + MAKEDEV all no longer creates /dev/pty* device nodes and miniroot + doesn't mount ptyfs. Fix PR install/47123. + [tsutsui, ticket #650] + +distrib/utils/sysinst/disks.c 1.127 + Don't show a disk which is mounted as root partition in the + Available disks list during sysinst procedure to prevent + users from shooting their foot in case of installation using + install-image on a USB stick. PR#47195. + [tsutsui, ticket #706] + +distrib/utils/sysinst/disks.c 1.127 + Don't show a disk which is mounted as root partition in the + Available disks list during sysinst procedure to prevent + users from shooting their foot in case of installation using + install-image on a USB stick. PR#47195. + [tsutsui, ticket #706] +
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sun Nov 25 15:29:25 UTC 2012 Modified Files: src/sys/dev: rndpseudo.c Log Message: move context struct to a header for the benefit of fstat. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/rndpseudo.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/dev/rndpseudo.c diff -u src/sys/dev/rndpseudo.c:1.10 src/sys/dev/rndpseudo.c:1.11 --- src/sys/dev/rndpseudo.c:1.10 Sat May 19 12:00:41 2012 +++ src/sys/dev/rndpseudo.c Sun Nov 25 10:29:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rndpseudo.c,v 1.10 2012/05/19 16:00:41 tls Exp $ */ +/* $NetBSD: rndpseudo.c,v 1.11 2012/11/25 15:29:24 christos Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rndpseudo.c,v 1.10 2012/05/19 16:00:41 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: rndpseudo.c,v 1.11 2012/11/25 15:29:24 christos Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -102,16 +102,6 @@ static pool_cache_t rp_cpc; cprng_strong_t **rp_cpurngs; /* - * A context. cprng plus a smidge. - */ -typedef struct { - cprng_strong_t *cprng; - int hard; - int bytesonkey; - kmutex_t interlock; -} rp_ctx_t; - -/* * Our random pool. This is defined here rather than using the general * purpose one defined in rndpool.c. *
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Sun Nov 25 15:29:45 UTC 2012 Modified Files: src/sys/sys: cprng.h Log Message: add an snprintb format. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/cprng.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cprng.h diff -u src/sys/sys/cprng.h:1.5 src/sys/sys/cprng.h:1.6 --- src/sys/sys/cprng.h:1.5 Mon Apr 16 22:50:39 2012 +++ src/sys/sys/cprng.h Sun Nov 25 10:29:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cprng.h,v 1.5 2012/04/17 02:50:39 tls Exp $ */ +/* $NetBSD: cprng.h,v 1.6 2012/11/25 15:29:45 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -92,6 +92,10 @@ typedef struct _cprng_strong { #define CPRNG_INIT_ANY 0x0001 #define CPRNG_REKEY_ANY 0x0002 #define CPRNG_USE_CV 0x0004 +#define CPRNG_FMT \177\020\ +b\0INIT_ANY\0\ +b\1REKEY_ANY\0\ +b\2USE_CV\0 cprng_strong_t *cprng_strong_create(const char *const, int, int);
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Sun Nov 25 15:29:56 UTC 2012 Modified Files: src/sys/sys: rnd.h Log Message: add the context struct To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/sys/rnd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/rnd.h diff -u src/sys/sys/rnd.h:1.33 src/sys/sys/rnd.h:1.34 --- src/sys/sys/rnd.h:1.33 Wed Sep 5 14:57:33 2012 +++ src/sys/sys/rnd.h Sun Nov 25 10:29:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.33 2012/09/05 18:57:33 tls Exp $ */ +/* $NetBSD: rnd.h,v 1.34 2012/11/25 15:29:55 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -239,4 +239,16 @@ typedef struct { #define RNDADDDATA _IOW('R', 105, rnddata_t) /* add data to the pool */ #define RNDGETPOOLSTAT _IOR('R', 106, rndpoolstat_t) /* get statistics */ +#ifdef _KERNEL +/* + * A context. cprng plus a smidge. + */ +typedef struct { + struct _cprng_strong *cprng; + int hard; + int bytesonkey; + kmutex_t interlock; +} rp_ctx_t; +#endif + #endif /* !_SYS_RND_H_ */
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: christos Date: Sun Nov 25 15:30:29 UTC 2012 Modified Files: src/usr.bin/fstat: misc.c Log Message: support printing rnd descriptor info To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fstat/misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/misc.c diff -u src/usr.bin/fstat/misc.c:1.10 src/usr.bin/fstat/misc.c:1.11 --- src/usr.bin/fstat/misc.c:1.10 Sat Nov 24 20:05:49 2012 +++ src/usr.bin/fstat/misc.c Sun Nov 25 10:30:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.10 2012/11/25 01:05:49 christos Exp $ */ +/* $NetBSD: misc.c,v 1.11 2012/11/25 15:30:28 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: misc.c,v 1.10 2012/11/25 01:05:49 christos Exp $); +__RCSID($NetBSD: misc.c,v 1.11 2012/11/25 15:30:28 christos Exp $); #define _KMEMUSER #include stdbool.h @@ -50,6 +50,10 @@ __RCSID($NetBSD: misc.c,v 1.10 2012/11/ #include sys/file.h #define copyout_t int #include sys/ksem.h +#define _LIB_LIBKERN_LIBKERN_H_ +#define mutex_enter(a) +#define mutex_exit(a) +#include sys/cprng.h #undef _KERNEL #include sys/vnode.h #include sys/mount.h @@ -57,6 +61,7 @@ __RCSID($NetBSD: misc.c,v 1.10 2012/11/ #include net/bpfdesc.h #include err.h +#include util.h #include string.h #include kvm.h #include fstat.h @@ -96,7 +101,9 @@ static struct nlist nl[] = { { .n_name = vnops }, #define NL_XENEVT 16 { .n_name = xenevt_fileops }, -#define NL_MAX 17 +#define NL_RND 17 +{ .n_name = rnd_fileops }, +#define NL_MAX 18 { .n_name = NULL } }; @@ -189,6 +196,35 @@ p_kqueue(struct file *f) return 0; } +static int +p_rnd(struct file *f) +{ + rp_ctx_t rp; + + if (!KVM_READ(f-f_data, rp, sizeof(rp))) { + dprintf(can't read rnd at %p for pid %d, f-f_data, Pid); + return 0; + } + (void)printf(* rnd ); + if (rp.hard) + printf(bytesonkey=%d, , rp.bytesonkey); + if (rp.cprng) { + cprng_strong_t cprng; + if (!KVM_READ(rp.cprng, cprng, sizeof(cprng))) { + dprintf(can't read rnd cprng at %p for pid %d, + rp.cprng, Pid); + } else { + char buf[128]; + snprintb(buf, sizeof(buf), CPRNG_FMT, cprng.flags); + (void)printf(name=%s, serial=%d%s, flags=%s\n, + cprng.name, cprng.entropy_serial, + cprng.reseed_pending ? , reseed : , buf); + return 0; + } + } + printf(\n); + return 0; +} int pmisc(struct file *f, const char *name) { @@ -222,6 +258,8 @@ pmisc(struct file *f, const char *name) return p_kqueue(f); case NL_SEM: return p_sem(f); + case NL_RND: + return p_rnd(f); case NL_TAP: printf(* tap %lu\n, (unsigned long)(intptr_t)f-f_data); return 0; @@ -229,7 +267,7 @@ pmisc(struct file *f, const char *name) printf(* crypto %p\n, f-f_data); return 0; case NL_MAX: - printf(* %s %p\n, name, f-f_data); + printf(* %s ops=%p %p\n, name, f-f_ops, f-f_data); return 0; default: printf(* %s %p\n, nl[i].n_name, f-f_data);
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: rkujawa Date: Sun Nov 25 19:15:44 UTC 2012 Modified Files: src/sys/arch/amiga/dev: zbus.c Log Message: Use constants, not magic values. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/arch/amiga/dev/zbus.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/amiga/dev/zbus.c diff -u src/sys/arch/amiga/dev/zbus.c:1.69 src/sys/arch/amiga/dev/zbus.c:1.70 --- src/sys/arch/amiga/dev/zbus.c:1.69 Sat Oct 27 17:17:32 2012 +++ src/sys/arch/amiga/dev/zbus.c Sun Nov 25 19:15:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: zbus.c,v 1.69 2012/10/27 17:17:32 chs Exp $ */ +/* $NetBSD: zbus.c,v 1.70 2012/11/25 19:15:43 rkujawa Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.69 2012/10/27 17:17:32 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.70 2012/11/25 19:15:43 rkujawa Exp $); #include sys/param.h #include sys/device.h @@ -330,8 +330,9 @@ zbusattach(device_t parent, device_t sel * check if it's a Zorro II or III board and not linked into * MemList (i.e. not a memory board) */ - if ((cdp-rom.type 0xe0) != 0xc0 - (cdp-rom.type 0xe0) != 0x80) + if ((cdp-rom.type (ERT_TYPEMASK | ERTF_MEMLIST)) != + ERT_ZORROII (cdp-rom.type (ERT_TYPEMASK | + ERTF_MEMLIST)) != ERT_ZORROIII) continue; /* er_Type != Zorro I/O */ za.pa = cdp-addr;
CVS commit: src/sbin/fsck_ext2fs
Module Name:src Committed By: jakllsch Date: Sun Nov 25 19:36:23 UTC 2012 Modified Files: src/sbin/fsck_ext2fs: dir.c Log Message: e2di_nblock is (assuming the huge_file feature is not active) stored in DEV_BSIZE units, not fs block size units. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sbin/fsck_ext2fs/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ext2fs/dir.c diff -u src/sbin/fsck_ext2fs/dir.c:1.23 src/sbin/fsck_ext2fs/dir.c:1.24 --- src/sbin/fsck_ext2fs/dir.c:1.23 Mon Oct 19 18:41:07 2009 +++ src/sbin/fsck_ext2fs/dir.c Sun Nov 25 19:36:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.23 2009/10/19 18:41:07 bouyer Exp $ */ +/* $NetBSD: dir.c,v 1.24 2012/11/25 19:36:23 jakllsch Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -58,7 +58,7 @@ #if 0 static char sccsid[] = @(#)dir.c 8.5 (Berkeley) 12/8/94; #else -__RCSID($NetBSD: dir.c,v 1.23 2009/10/19 18:41:07 bouyer Exp $); +__RCSID($NetBSD: dir.c,v 1.24 2012/11/25 19:36:23 jakllsch Exp $); #endif #endif /* not lint */ @@ -569,7 +569,8 @@ expanddir(struct ext2fs_dinode *dp, char dp-e2di_blocks[lastbn + 1] = dp-e2di_blocks[lastbn]; dp-e2di_blocks[lastbn] = h2fs32(newblk); inossize(dp, inosize(dp) + sblock.e2fs_bsize); - dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) + 1); + dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) + + btodb(sblock.e2fs_bsize)); bp = getdirblk(fs2h32(dp-e2di_blocks[lastbn + 1]), sblock.e2fs_bsize); if (bp-b_errs) @@ -603,7 +604,8 @@ bad: dp-e2di_blocks[lastbn] = dp-e2di_blocks[lastbn + 1]; dp-e2di_blocks[lastbn + 1] = 0; inossize(dp, inosize(dp) - sblock.e2fs_bsize); - dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) - 1); + dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) - + btodb(sblock.e2fs_bsize)); freeblk(newblk); return (0); }
CVS commit: src/sbin/fsck_ext2fs
Module Name:src Committed By: jakllsch Date: Sun Nov 25 19:42:14 UTC 2012 Modified Files: src/sbin/fsck_ext2fs: dir.c extern.h inode.c pass1.c Log Message: Catch up to the kernel with respect to Ext2 huge_file feature. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/fsck_ext2fs/dir.c cvs rdiff -u -r1.7 -r1.8 src/sbin/fsck_ext2fs/extern.h cvs rdiff -u -r1.31 -r1.32 src/sbin/fsck_ext2fs/inode.c cvs rdiff -u -r1.21 -r1.22 src/sbin/fsck_ext2fs/pass1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ext2fs/dir.c diff -u src/sbin/fsck_ext2fs/dir.c:1.24 src/sbin/fsck_ext2fs/dir.c:1.25 --- src/sbin/fsck_ext2fs/dir.c:1.24 Sun Nov 25 19:36:23 2012 +++ src/sbin/fsck_ext2fs/dir.c Sun Nov 25 19:42:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.24 2012/11/25 19:36:23 jakllsch Exp $ */ +/* $NetBSD: dir.c,v 1.25 2012/11/25 19:42:14 jakllsch Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -58,7 +58,7 @@ #if 0 static char sccsid[] = @(#)dir.c 8.5 (Berkeley) 12/8/94; #else -__RCSID($NetBSD: dir.c,v 1.24 2012/11/25 19:36:23 jakllsch Exp $); +__RCSID($NetBSD: dir.c,v 1.25 2012/11/25 19:42:14 jakllsch Exp $); #endif #endif /* not lint */ @@ -569,8 +569,7 @@ expanddir(struct ext2fs_dinode *dp, char dp-e2di_blocks[lastbn + 1] = dp-e2di_blocks[lastbn]; dp-e2di_blocks[lastbn] = h2fs32(newblk); inossize(dp, inosize(dp) + sblock.e2fs_bsize); - dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) + - btodb(sblock.e2fs_bsize)); + inosnblock(dp, inonblock(dp) + btodb(sblock.e2fs_bsize)); bp = getdirblk(fs2h32(dp-e2di_blocks[lastbn + 1]), sblock.e2fs_bsize); if (bp-b_errs) @@ -604,8 +603,7 @@ bad: dp-e2di_blocks[lastbn] = dp-e2di_blocks[lastbn + 1]; dp-e2di_blocks[lastbn + 1] = 0; inossize(dp, inosize(dp) - sblock.e2fs_bsize); - dp-e2di_nblock = h2fs32(fs2h32(dp-e2di_nblock) - - btodb(sblock.e2fs_bsize)); + inosnblock(dp, inonblock(dp) - btodb(sblock.e2fs_bsize)); freeblk(newblk); return (0); } Index: src/sbin/fsck_ext2fs/extern.h diff -u src/sbin/fsck_ext2fs/extern.h:1.7 src/sbin/fsck_ext2fs/extern.h:1.8 --- src/sbin/fsck_ext2fs/extern.h:1.7 Thu Jun 9 19:57:50 2011 +++ src/sbin/fsck_ext2fs/extern.h Sun Nov 25 19:42:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.7 2011/06/09 19:57:50 christos Exp $ */ +/* $NetBSD: extern.h,v 1.8 2012/11/25 19:42:14 jakllsch Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. @@ -71,3 +71,5 @@ int reply(const char *); void resetinodebuf(void); int setup(const char *); struct ext2fs_dinode * getnextinode(ino_t); +uint64_t inonblock(struct ext2fs_dinode *); +void inosnblock(struct ext2fs_dinode *, uint64_t); Index: src/sbin/fsck_ext2fs/inode.c diff -u src/sbin/fsck_ext2fs/inode.c:1.31 src/sbin/fsck_ext2fs/inode.c:1.32 --- src/sbin/fsck_ext2fs/inode.c:1.31 Thu Feb 4 23:55:42 2010 +++ src/sbin/fsck_ext2fs/inode.c Sun Nov 25 19:42:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: inode.c,v 1.31 2010/02/04 23:55:42 christos Exp $ */ +/* $NetBSD: inode.c,v 1.32 2012/11/25 19:42:14 jakllsch Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -58,7 +58,7 @@ #if 0 static char sccsid[] = @(#)inode.c 8.5 (Berkeley) 2/8/95; #else -__RCSID($NetBSD: inode.c,v 1.31 2010/02/04 23:55:42 christos Exp $); +__RCSID($NetBSD: inode.c,v 1.32 2012/11/25 19:42:14 jakllsch Exp $); #endif #endif /* not lint */ @@ -97,6 +97,8 @@ static int iblock(struct inodesc *, long static int setlarge(void); +static int sethuge(void); + static int setlarge(void) { @@ -115,6 +117,24 @@ setlarge(void) return 1; } +static int +sethuge(void) +{ + if (sblock.e2fs.e2fs_rev E2FS_REV1) { + pfatal(HUGE FILES UNSUPPORTED ON REVISION 0 FILESYSTEMS); + return 0; + } + if (!(sblock.e2fs.e2fs_features_rocompat EXT2F_ROCOMPAT_HUGE_FILE)) { + if (preen) + pwarn(SETTING HUGE FILE FEATURE\n); + else if (!reply(SET HUGE FILE FEATURE)) + return 0; + sblock.e2fs.e2fs_features_rocompat |= EXT2F_ROCOMPAT_HUGE_FILE; + sbdirty(); + } + return 1; +} + u_int64_t inosize(struct ext2fs_dinode *dp) { @@ -707,7 +727,7 @@ allocino(ino_t request, int type) dp-e2di_mtime = dp-e2di_ctime = dp-e2di_atime; dp-e2di_dtime = 0; inossize(dp, sblock.e2fs_bsize); - dp-e2di_nblock = h2fs32(btodb(sblock.e2fs_bsize)); + inosnblock(dp, btodb(sblock.e2fs_bsize)); n_files++; inodirty(); typemap[ino] = E2IFTODT(type); @@ -734,3 +754,59 @@ freeino(ino_t ino) statemap[ino] = USTATE; n_files--; } + +uint64_t +inonblock(struct ext2fs_dinode *dp) +{ + uint64_t nblock; + + /* XXX check for EXT2_HUGE_FILE without EXT2F_ROCOMPAT_HUGE_FILE? */ + + nblock = fs2h32(dp-e2di_nblock); + + if ((sblock.e2fs.e2fs_features_rocompat EXT2F_ROCOMPAT_HUGE_FILE)) { + nblock |= (uint64_t)fs2h16(dp-e2di_nblock_high) 32; + if (fs2h32(dp-e2di_flags) EXT2_HUGE_FILE) { + nblock = fsbtodb(sblock, nblock); + } + } + + return nblock; +} + +void +inosnblock(struct ext2fs_dinode *dp,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Sun Nov 25 19:50:34 UTC 2012 Modified Files: src/sys/dev/pci: if_wpi.c Log Message: Rework firmware reference counting and error messages in wpi(4). . Clarify the shared firmware abstraction in wpi_cached_firmware and its new sibling wpi_release_firmware. . Fix typo in wpa_cache_firmware error branch leading to free NULL. . Fix leak in wpi_load_firmware error branch. . Sprinkle some kasserts to executably document invariants. . A little KNF here and there. Based on a patch from dh in PR kern/44144. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_wpi.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/dev/pci/if_wpi.c diff -u src/sys/dev/pci/if_wpi.c:1.53 src/sys/dev/pci/if_wpi.c:1.54 --- src/sys/dev/pci/if_wpi.c:1.53 Sat Aug 4 03:52:46 2012 +++ src/sys/dev/pci/if_wpi.c Sun Nov 25 19:50:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wpi.c,v 1.53 2012/08/04 03:52:46 riastradh Exp $*/ +/* $NetBSD: if_wpi.c,v 1.54 2012/11/25 19:50:34 riastradh Exp $*/ /*- * Copyright (c) 2006, 2007 @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.53 2012/08/04 03:52:46 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.54 2012/11/25 19:50:34 riastradh Exp $); /* * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. @@ -91,6 +91,7 @@ static const struct ieee80211_rateset wp static const struct ieee80211_rateset wpi_rateset_11g = { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; +static const char wpi_firmware_name[] = iwlwifi-3945.ucode; static once_t wpi_firmware_init; static kmutex_t wpi_firmware_mutex; static size_t wpi_firmware_users; @@ -131,6 +132,8 @@ static void wpi_mem_write_region_4(struc const uint32_t *, int); static int wpi_read_prom_data(struct wpi_softc *, uint32_t, void *, int); static int wpi_load_microcode(struct wpi_softc *, const uint8_t *, int); +static int wpi_cache_firmware(struct wpi_softc *); +static void wpi_release_firmware(void); static int wpi_load_firmware(struct wpi_softc *); static void wpi_calib_timeout(void *); static void wpi_iter_func(void *, struct ieee80211_node *); @@ -197,6 +200,7 @@ wpi_match(device_t parent, cfdata_t matc static int wpi_attach_once(void) { + mutex_init(wpi_firmware_mutex, MUTEX_DEFAULT, IPL_NONE); return 0; } @@ -416,10 +420,8 @@ wpi_detach(device_t self, int flags __un bus_space_unmap(sc-sc_st, sc-sc_sh, sc-sc_sz); if (sc-fw_used) { - mutex_enter(wpi_firmware_mutex); - if (--wpi_firmware_users == 0) - firmware_free(wpi_firmware_image, wpi_firmware_size); - mutex_exit(wpi_firmware_mutex); + sc-fw_used = false; + wpi_release_firmware(); } return 0; @@ -1133,21 +1135,32 @@ wpi_load_microcode(struct wpi_softc *sc, static int wpi_cache_firmware(struct wpi_softc *sc) { + const char *const fwname = wpi_firmware_name; firmware_handle_t fw; int error; - if (sc-fw_used) - return 0; + /* sc is used here only to report error messages. */ mutex_enter(wpi_firmware_mutex); + + if (wpi_firmware_users == SIZE_MAX) { + mutex_exit(wpi_firmware_mutex); + return ENFILE; /* Too many of something in the system... */ + } if (wpi_firmware_users++) { + KASSERT(wpi_firmware_image != NULL); + KASSERT(wpi_firmware_size 0); mutex_exit(wpi_firmware_mutex); - return 0; + return 0; /* Already good to go. */ } + KASSERT(wpi_firmware_image == NULL); + KASSERT(wpi_firmware_size == 0); + /* load firmware image from disk */ - if ((error = firmware_open(if_wpi,iwlwifi-3945.ucode, fw)) != 0) { - aprint_error_dev(sc-sc_dev, could not read firmware file\n); + if ((error = firmware_open(if_wpi, fwname, fw)) != 0) { + aprint_error_dev(sc-sc_dev, + could not open firmware file %s: %d\n, fwname, error); goto fail0; } @@ -1157,48 +1170,76 @@ wpi_cache_firmware(struct wpi_softc *sc) WPI_FW_MAIN_TEXT_MAXSZ + WPI_FW_MAIN_DATA_MAXSZ + WPI_FW_INIT_TEXT_MAXSZ + WPI_FW_INIT_DATA_MAXSZ + WPI_FW_BOOT_TEXT_MAXSZ) { - aprint_error_dev(sc-sc_dev, invalid firmware file\n); + aprint_error_dev(sc-sc_dev, + firmware file %s too large: %zu bytes\n, + fwname, wpi_firmware_size); error = EFBIG; goto fail1; } if (wpi_firmware_size sizeof (struct wpi_firmware_hdr)) { aprint_error_dev(sc-sc_dev, - truncated firmware header: %zu bytes\n, - wpi_firmware_size); + firmware file %s too small: %zu bytes\n, + fwname, wpi_firmware_size); error = EINVAL; - goto fail2; + goto fail1; } wpi_firmware_image = firmware_malloc(wpi_firmware_size); if (wpi_firmware_image == NULL) { - aprint_error_dev(sc-sc_dev, not enough memory to stock firmware\n); + aprint_error_dev(sc-sc_dev, + not enough memory for firmware file %s\n, fwname); error = ENOMEM; goto fail1; } - if ((error
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: christos Date: Sun Nov 25 19:52:05 UTC 2012 Modified Files: src/sys/arch/amiga/dev: zbus.c Log Message: readability fix. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amiga/dev/zbus.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/amiga/dev/zbus.c diff -u src/sys/arch/amiga/dev/zbus.c:1.70 src/sys/arch/amiga/dev/zbus.c:1.71 --- src/sys/arch/amiga/dev/zbus.c:1.70 Sun Nov 25 14:15:43 2012 +++ src/sys/arch/amiga/dev/zbus.c Sun Nov 25 14:52:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: zbus.c,v 1.70 2012/11/25 19:15:43 rkujawa Exp $ */ +/* $NetBSD: zbus.c,v 1.71 2012/11/25 19:52:05 christos Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.70 2012/11/25 19:15:43 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.71 2012/11/25 19:52:05 christos Exp $); #include sys/param.h #include sys/device.h @@ -330,10 +330,13 @@ zbusattach(device_t parent, device_t sel * check if it's a Zorro II or III board and not linked into * MemList (i.e. not a memory board) */ - if ((cdp-rom.type (ERT_TYPEMASK | ERTF_MEMLIST)) != - ERT_ZORROII (cdp-rom.type (ERT_TYPEMASK | - ERTF_MEMLIST)) != ERT_ZORROIII) - continue; /* er_Type != Zorro I/O */ + switch (cdp-rom.type (ERT_TYPEMASK | ERTF_MEMLIST)) { + case ERT_ZORROII: + case ERT_ZORROIII: + break; + default: + continue; + } za.pa = cdp-addr; za.size = cdp-size;
CVS commit: othersrc/external/bsd/mat
Module Name:othersrc Committed By: agc Date: Sun Nov 25 20:20:36 UTC 2012 Modified Files: othersrc/external/bsd/mat/dist: mat.c mat.h othersrc/external/bsd/mat/libmat: shlib_version Log Message: Use mmap(2) to write files, where possible. Fallback to write(2) when not possible. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/mat/dist/mat.c \ othersrc/external/bsd/mat/dist/mat.h cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/mat/libmat/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/mat/dist/mat.c diff -u othersrc/external/bsd/mat/dist/mat.c:1.5 othersrc/external/bsd/mat/dist/mat.c:1.6 --- othersrc/external/bsd/mat/dist/mat.c:1.5 Sun Aug 12 01:42:24 2012 +++ othersrc/external/bsd/mat/dist/mat.c Sun Nov 25 20:20:36 2012 @@ -180,9 +180,44 @@ fillmeta(matent_t *ent, const char *f, s ent-meta.flags = st-st_flags; } +/* write to file */ +static int +memwrite(FILE *fp, uint64_t off, const void *p, size_t size) +{ + char *mapped; + + mapped = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fileno(fp), (off_t)off); + if (mapped == MAP_FAILED) { + if (write(fileno(fp), p, size) != (ssize_t)size) { + fprintf(stderr, short write %zu chars\n, size); + return 0; + } + } else { + lseek(fileno(fp), (off_t)(off + size - 1), SEEK_SET); + if (write(fileno(fp), , 1) != 1) { + fprintf(stderr, short write % PRIu64 chars\n, size); + return 0; + } + memcpy(mapped, p, size); + munmap(mapped, size); + } + return 1; +} + +/* write to mat archive */ +static int +archive_write(mat_t *mat, const void *p, size_t size) +{ + if (memwrite(mat-fp, mat-off, p, size)) { + mat-off += size; + return 1; + } + return 0; +} + /* write the entry's meta information to the archive */ static int -writemeta(int fd, matent_t *ent) +writemeta(mat_t *mat, matent_t *ent) { matent_t lent; @@ -199,7 +234,7 @@ writemeta(int fd, matent_t *ent) lent.meta.flags = local_htobe32(ent-meta.flags); lent.meta.linklen = local_htobe32(ent-meta.linklen); lent.meta.type = ent-meta.type; - return write(fd, lent, sizeof(lent.meta)) == sizeof(lent.meta); + return archive_write(mat, lent, sizeof(lent.meta)) == sizeof(lent.meta); } /* read the entry's meta information from the archive */ @@ -420,7 +455,10 @@ extract_file(mat_t *mat, extract_t *arch (void) fprintf(stderr, can't create '%s'\n, name); return 0; } - write(fileno(fp), archive-s[archive-off], ent-meta.size); + if (!memwrite(fp, 0, archive-s[archive-off], ent-meta.size)) { + fprintf(stderr, short write % PRIu64 chars\n, ent-meta.size); + return 0; + } tv[0].tv_sec = ent-meta.atime; tv[0].tv_usec = 0; tv[1].tv_sec = ent-meta.mtime; @@ -548,8 +586,8 @@ write_meta_info(mat_t *mat, matent_t *en (int)strlen(f[matches[0].rm_eo]), f[matches[0].rm_eo]) + 1; f = newpath; } - writemeta(fileno(mat-fp), ent); - write(fileno(mat-fp), f, ent-meta.namelen); + writemeta(mat, ent); + archive_write(mat, f, ent-meta.namelen); return 1; } @@ -629,13 +667,13 @@ mat_add(mat_t *mat, const char *f) return 0; } write_meta_info(mat, ent, f); - write(fileno(mat-fp), mapped, (size_t)st.st_size); + archive_write(mat, mapped, (size_t)st.st_size); digest_update(ent.digest, mapped, (size_t)st.st_size); if (ent.meta.nlink 1 original) { /* multi-linked, and we're the primary */ (void) memcpy(mat-links[primary].digest, ent.digest, sizeof(ent.digest)); } - write(fileno(mat-fp), ent.digest, sizeof(ent.digest)); + archive_write(mat, ent.digest, sizeof(ent.digest)); munmap(mapped, (size_t)st.st_size); (void) fclose(fp); break; @@ -643,10 +681,10 @@ mat_add(mat_t *mat, const char *f) /* store hardlink to primary */ ent.meta.linklen = mat-links[primary].namelen; write_meta_info(mat, ent, f); - write(fileno(mat-fp), mat-links[primary].name, (size_t)ent.meta.linklen); + archive_write(mat, mat-links[primary].name, (size_t)ent.meta.linklen); /* get digest from primary */ (void) memcpy(ent.digest, mat-links[primary].digest, sizeof(ent.digest)); - write(fileno(mat-fp), ent.digest, sizeof(ent.digest)); + archive_write(mat, ent.digest, sizeof(ent.digest)); break; case 'l': if ((cc = readlink(f, newpath, sizeof(newpath))) 0) { @@ -656,9 +694,9 @@ mat_add(mat_t *mat, const char *f) newpath[cc] = 0x0; ent.meta.linklen = (uint32_t)(cc + 1); write_meta_info(mat, ent, f); - write(fileno(mat-fp), newpath, (size_t)ent.meta.linklen); + archive_write(mat, newpath, (size_t)ent.meta.linklen); digest_update(ent.digest, (uint8_t *)newpath, (size_t)ent.meta.linklen); - write(fileno(mat-fp), ent.digest, sizeof(ent.digest)); + archive_write(mat, ent.digest, sizeof(ent.digest)); break; case 'b': case 'c': @@ -965,7 +1003,7 @@ mat_init(mat_t *mat, const char *f, cons mat-archive = st.st_ino; (void)
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: pgoyette Date: Sun Nov 25 20:40:30 UTC 2012 Modified Files: src/sys/arch/arm/include: lock.h Log Message: For consistency, define the _KERNEL version of __swp() using a non-volatile type, similar to how it is defined in non-KERNEL Fixes the 'build.sh release' for evbarm-{eb,el} To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/lock.h 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/arm/include/lock.h diff -u src/sys/arch/arm/include/lock.h:1.21 src/sys/arch/arm/include/lock.h:1.22 --- src/sys/arch/arm/include/lock.h:1.21 Fri Aug 31 17:29:08 2012 +++ src/sys/arch/arm/include/lock.h Sun Nov 25 20:40:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.21 2012/08/31 17:29:08 matt Exp $ */ +/* $NetBSD: lock.h,v 1.22 2012/11/25 20:40:30 pgoyette Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ __cpu_simple_lock_set(__cpu_simple_lock_ #endif #if defined(_KERNEL) -static __inline __cpu_simple_lock_t +static __inline unsigned char __swp(__cpu_simple_lock_t __val, volatile __cpu_simple_lock_t *__ptr) { #ifdef _ARM_ARCH_6
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: cherry Date: Sun Nov 25 20:56:33 UTC 2012 Modified Files: src/sys/arch/xen/xen: evtchn.c Log Message: Do not escalate the local spl while taking the interrupt handler list lock. Re-entrance is protected against within the events handler framework by toggling interrupts/events, so we don't need (and cannot use) the spl framework in that path. The other consumers (interrupt registration/removal code) are not spl sensitive wrt this lock. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/xen/xen/evtchn.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/xen/xen/evtchn.c diff -u src/sys/arch/xen/xen/evtchn.c:1.64 src/sys/arch/xen/xen/evtchn.c:1.65 --- src/sys/arch/xen/xen/evtchn.c:1.64 Sun Nov 25 08:39:36 2012 +++ src/sys/arch/xen/xen/evtchn.c Sun Nov 25 20:56:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.c,v 1.64 2012/11/25 08:39:36 cherry Exp $ */ +/* $NetBSD: evtchn.c,v 1.65 2012/11/25 20:56:33 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -54,7 +54,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: evtchn.c,v 1.64 2012/11/25 08:39:36 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: evtchn.c,v 1.65 2012/11/25 20:56:33 cherry Exp $); #include opt_xen.h #include isa.h @@ -694,7 +694,7 @@ event_set_handler(int evtch, int (*func) * is more explicitly implemented. */ evts-ev_cpu = ci; - mutex_init(evtlock[evtch], MUTEX_DEFAULT, IPL_HIGH); + mutex_init(evtlock[evtch], MUTEX_DEFAULT, IPL_NONE); evtsource[evtch] = evts; if (evname) strncpy(evts-ev_evname, evname,
CVS commit: src
Module Name:src Committed By: alnsn Date: Sun Nov 25 21:55:51 UTC 2012 Modified Files: src/distrib/sets/lists/comp: ad.mips md.emips md.ews4800mips md.hpcmips md.mipsco md.newsmips md.sbmips md.sgimips src/sys/arch/emips/include: Makefile src/sys/arch/evbmips/include: sljitarch.h src/sys/arch/ews4800mips/include: Makefile src/sys/arch/hpcmips/include: Makefile src/sys/arch/mips/include: Makefile src/sys/arch/mipsco/include: Makefile src/sys/arch/newsmips/include: Makefile src/sys/arch/sbmips/include: Makefile src/sys/arch/sgimips/include: Makefile Added Files: src/sys/arch/emips/include: sljitarch.h src/sys/arch/ews4800mips/include: sljitarch.h src/sys/arch/hpcmips/include: sljitarch.h src/sys/arch/mips/include: sljitarch.h src/sys/arch/mipsco/include: sljitarch.h src/sys/arch/newsmips/include: sljitarch.h src/sys/arch/sbmips/include: sljitarch.h src/sys/arch/sgimips/include: sljitarch.h Log Message: Add sljitarch.h to all mips machines. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/comp/md.emips cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/comp/md.ews4800mips cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/comp/md.hpcmips \ src/distrib/sets/lists/comp/md.newsmips cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/comp/md.mipsco cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/comp/md.sbmips cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/comp/md.sgimips cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/emips/include/sljitarch.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/include/sljitarch.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ews4800mips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/ews4800mips/include/sljitarch.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hpcmips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/hpcmips/include/sljitarch.h cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/include/sljitarch.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mipsco/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/mipsco/include/sljitarch.h cvs rdiff -u -r1.34 -r1.35 src/sys/arch/newsmips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/newsmips/include/sljitarch.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sbmips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/sbmips/include/sljitarch.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/include/sljitarch.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/ad.mips diff -u src/distrib/sets/lists/comp/ad.mips:1.38 src/distrib/sets/lists/comp/ad.mips:1.39 --- src/distrib/sets/lists/comp/ad.mips:1.38 Sun Jul 17 20:54:30 2011 +++ src/distrib/sets/lists/comp/ad.mips Sun Nov 25 21:55:50 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.38 2011/07/17 20:54:30 joerg Exp $ +# $NetBSD: ad.mips,v 1.39 2012/11/25 21:55:50 alnsn Exp $ ./usr/bin/elf2aoutcomp-obsolete obsolete ./usr/bin/elf2ecoffcomp-sysutil-bin ./usr/include/gcc-4.5/loongson.h comp-c-include gcccmds,gcc=45 @@ -54,6 +54,7 @@ ./usr/include/mips/rwlock.h comp-c-include ./usr/include/mips/setjmp.h comp-c-include ./usr/include/mips/signal.h comp-c-include +./usr/include/mips/sljitarch.h comp-c-include ./usr/include/mips/stdarg.h comp-obsolete obsolete ./usr/include/mips/sysarch.h comp-c-include ./usr/include/mips/trap.h comp-c-include Index: src/distrib/sets/lists/comp/md.emips diff -u src/distrib/sets/lists/comp/md.emips:1.2 src/distrib/sets/lists/comp/md.emips:1.3 --- src/distrib/sets/lists/comp/md.emips:1.2 Sun Jul 17 20:54:31 2011 +++ src/distrib/sets/lists/comp/md.emips Sun Nov 25 21:55:50 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.emips,v 1.2 2011/07/17 20:54:31 joerg Exp $ +# $NetBSD: md.emips,v 1.3 2012/11/25 21:55:50 alnsn Exp $ # ./usr/include/ieeefp.hcomp-c-include ./usr/include/emipscomp-c-include @@ -49,6 +49,7 @@ ./usr/include/emips/rwlock.h comp-c-include ./usr/include/emips/setjmp.h comp-c-include ./usr/include/emips/signal.h comp-c-include +./usr/include/emips/sljitarch.h comp-c-include ./usr/include/emips/stdarg.h comp-obsolete obsolete ./usr/include/emips/trap.h comp-c-include ./usr/include/emips/types.h comp-c-include Index: src/distrib/sets/lists/comp/md.ews4800mips diff -u src/distrib/sets/lists/comp/md.ews4800mips:1.5 src/distrib/sets/lists/comp/md.ews4800mips:1.6 --- src/distrib/sets/lists/comp/md.ews4800mips:1.5 Sun Jul 17 20:54:31 2011 +++ src/distrib/sets/lists/comp/md.ews4800mips Sun Nov 25 21:55:50 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.ews4800mips,v 1.5 2011/07/17
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Sun Nov 25 22:22:40 UTC 2012 Modified Files: src/sys/dev/usb: if_axe.c if_axereg.h Log Message: PR/47245: Toby Karyadi: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100 C1 To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_axereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axe.c diff -u src/sys/dev/usb/if_axe.c:1.57 src/sys/dev/usb/if_axe.c:1.58 --- src/sys/dev/usb/if_axe.c:1.57 Fri Aug 24 05:01:23 2012 +++ src/sys/dev/usb/if_axe.c Sun Nov 25 17:22:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axe.c,v 1.57 2012/08/24 09:01:23 msaitoh Exp $ */ +/* $NetBSD: if_axe.c,v 1.58 2012/11/25 22:22:39 christos Exp $ */ /* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */ /* @@ -89,7 +89,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_axe.c,v 1.57 2012/08/24 09:01:23 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_axe.c,v 1.58 2012/11/25 22:22:39 christos Exp $); #if defined(_KERNEL_OPT) #include opt_inet.h @@ -145,6 +145,7 @@ static const struct axe_type axe_devs[] { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172}, 0 }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772A}, AX772 }, + { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B}, AX772 | AX772B }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 }, { { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC210T}, 0 }, { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D5055 }, AX178 }, @@ -918,12 +919,14 @@ axe_rxeof(usbd_xfer_handle xfer, usbd_pr total_len -= sizeof(hdr); buf += sizeof(hdr); - if ((hdr.len ^ hdr.ilen) != 0x) { + if (((le16toh(hdr.len) AXE_RH1M_RXLEN_MASK) ^ + (le16toh(hdr.ilen) AXE_RH1M_RXLEN_MASK)) != + AXE_RH1M_RXLEN_MASK) { ifp-if_ierrors++; goto done; } - rxlen = le16toh(hdr.len); + rxlen = le16toh(hdr.len AXE_RH1M_RXLEN_MASK); if (total_len rxlen) { pktlen = total_len; total_len = 0; @@ -1241,7 +1244,9 @@ axe_init(struct ifnet *ifp) /* Enable receiver, set RX mode */ rxmode = AXE_RXCMD_BROADCAST | AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE; - if (sc-axe_flags AX178 || sc-axe_flags AX772) { + if (sc-axe_flags AX772B) + rxmode |= AXE_772B_RXCMD_RH1M; + else if (sc-axe_flags AX178 || sc-axe_flags AX772) { if (sc-axe_udev-speed == USB_SPEED_HIGH) { /* Largest possible USB buffer size for AX88178 */ rxmode |= AXE_178_RXCMD_MFB; Index: src/sys/dev/usb/if_axereg.h diff -u src/sys/dev/usb/if_axereg.h:1.14 src/sys/dev/usb/if_axereg.h:1.15 --- src/sys/dev/usb/if_axereg.h:1.14 Thu Feb 2 14:43:07 2012 +++ src/sys/dev/usb/if_axereg.h Sun Nov 25 17:22:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axereg.h,v 1.14 2012/02/02 19:43:07 tls Exp $ */ +/* $NetBSD: if_axereg.h,v 1.15 2012/11/25 22:22:39 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 @@ -134,6 +134,12 @@ #define AXE_NOPHY0xE0 #define AXE_INTPHY0x10 +#define AXE_772B_RXCMD_RH1M 0x0100 +#define AXE_772B_RXCMD_RH2M 0x0200 +#define AXE_772B_RXCMD_RH3M 0x0400 + +#define AXE_RH1M_RXLEN_MASK 0x07ff + #define AXE_TIMEOUT 1000 #define AXE_172_BUFSZ 1536 @@ -167,6 +173,7 @@ struct axe_type { uint16_t axe_flags; #define AX178 0x0001 /* AX88178 */ #define AX772 0x0002 /* AX88772 */ +#define AX772B 0x0004 /* AX88772B */ #define AXE_ANY_PHY 0x1000 /* Chip lies about valid phys */ #define AXE_MII 0x2000 /* Chip-specific MII handling */ };
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: alnsn Date: Sun Nov 25 23:04:51 UTC 2012 Modified Files: src/sys/arch/mips/include: sljitarch.h Log Message: EVPMIPS - MIPS in include guard. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/include/sljitarch.h 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/mips/include/sljitarch.h diff -u src/sys/arch/mips/include/sljitarch.h:1.1 src/sys/arch/mips/include/sljitarch.h:1.2 --- src/sys/arch/mips/include/sljitarch.h:1.1 Sun Nov 25 21:55:51 2012 +++ src/sys/arch/mips/include/sljitarch.h Sun Nov 25 23:04:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sljitarch.h,v 1.1 2012/11/25 21:55:51 alnsn Exp $ */ +/* $NetBSD: sljitarch.h,v 1.2 2012/11/25 23:04:51 alnsn Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVBMIPS_SLJITARCH_H -#define EVBMIPS_SLJITARCH_H +#ifndef MIPS_SLJITARCH_H +#define MIPS_SLJITARCH_H #ifndef _LP64 #define SLJIT_CONFIG_MIPS_32 1
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Sun Nov 25 23:33:56 UTC 2012 Modified Files: src/sys/arch/amiga/amiga: amiga_init.c src/sys/arch/amiga/conf: files.amiga src/sys/arch/amiga/dev: zbus.c Added Files: src/sys/arch/amiga/dev: z3rambd.c Log Message: Add z3rambd driver, it allows using Zorro III RAM boards as block devices. This makes sense in machines equipped with RAM on accelerator boards, where difference between accelerator RAM and Zorro III RAM is significant. Hacks were needed in amiga_init.c and zbus.c, but they are only enabled if this driver is present in kernel. Otherwise user will get the usual behaviour. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/arch/amiga/amiga/amiga_init.c cvs rdiff -u -r1.165 -r1.166 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/z3rambd.c cvs rdiff -u -r1.71 -r1.72 src/sys/arch/amiga/dev/zbus.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/amiga/amiga/amiga_init.c diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.127 src/sys/arch/amiga/amiga/amiga_init.c:1.128 --- src/sys/arch/amiga/amiga/amiga_init.c:1.127 Mon Jul 9 19:23:45 2012 +++ src/sys/arch/amiga/amiga/amiga_init.c Sun Nov 25 23:33:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: amiga_init.c,v 1.127 2012/07/09 19:23:45 rkujawa Exp $ */ +/* $NetBSD: amiga_init.c,v 1.128 2012/11/25 23:33:55 rkujawa Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -35,10 +35,11 @@ #include opt_p5ppc68kboard.h #include opt_devreload.h #include opt_m68k_arch.h +#include z3rambd.h #include ser.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.127 2012/07/09 19:23:45 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.128 2012/11/25 23:33:55 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -335,7 +336,10 @@ start_c(int id, u_int fphystart, u_int f if (cd-rom.manid == 8512 (cd-rom.prodid == 100 || cd-rom.prodid == 110)) RELOC(ZBUSAVAIL, u_int) += m68k_round_page(0x140); - +#if NZ3RAMBD 0 + if ( (cd-rom.manid == 3643) (cd-rom.prodid == 32) ) + { } else +#endif if (bd_type != ERT_ZORROIII (bd_type != ERT_ZORROII || isztwopa(cd-addr))) continue; /* It's not Z2 or Z3 I/O board */ Index: src/sys/arch/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.165 src/sys/arch/amiga/conf/files.amiga:1.166 --- src/sys/arch/amiga/conf/files.amiga:1.165 Mon Nov 19 23:43:08 2012 +++ src/sys/arch/amiga/conf/files.amiga Sun Nov 25 23:33:56 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.165 2012/11/19 23:43:08 rkujawa Exp $ +# $NetBSD: files.amiga,v 1.166 2012/11/25 23:33:56 rkujawa Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -551,6 +551,10 @@ file arch/amiga/pci/emmem.c emmem include dev/i2o/files.i2o include dev/pci/files.pci +device z3rambd: altmemdev +attach z3rambd at zbus +file arch/amiga/dev/z3rambd.c z3rambd needs-flag + include arch/amiga/clockport/files.clockport include arch/amiga/conf/majors.amiga Index: src/sys/arch/amiga/dev/zbus.c diff -u src/sys/arch/amiga/dev/zbus.c:1.71 src/sys/arch/amiga/dev/zbus.c:1.72 --- src/sys/arch/amiga/dev/zbus.c:1.71 Sun Nov 25 19:52:05 2012 +++ src/sys/arch/amiga/dev/zbus.c Sun Nov 25 23:33:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: zbus.c,v 1.71 2012/11/25 19:52:05 christos Exp $ */ +/* $NetBSD: zbus.c,v 1.72 2012/11/25 23:33:56 rkujawa Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.71 2012/11/25 19:52:05 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.72 2012/11/25 23:33:56 rkujawa Exp $); #include sys/param.h #include sys/device.h @@ -44,6 +44,8 @@ __KERNEL_RCSID(0, $NetBSD: zbus.c,v 1.7 #include amiga/amiga/device.h #include amiga/dev/zbusvar.h +#include z3rambd.h + struct aconfdata { const char *name; int manid; @@ -326,6 +328,11 @@ zbusattach(device_t parent, device_t sel if (amiga_realconfig == 0 pcp = epcp) continue; +#if NZ3RAMBD 0 + if ((cdp-rom.manid == 3643) (cdp-rom.prodid == 32)) + { } + else +#endif /* NZ3RAMBD */ /* * check if it's a Zorro II or III board and not linked into * MemList (i.e. not a memory board) Added files: Index: src/sys/arch/amiga/dev/z3rambd.c diff -u /dev/null src/sys/arch/amiga/dev/z3rambd.c:1.1 --- /dev/null Sun Nov 25 23:33:56 2012 +++ src/sys/arch/amiga/dev/z3rambd.c Sun Nov 25 23:33:56 2012 @@ -0,0 +1,174 @@ +/* $NetBSD: z3rambd.c,v 1.1 2012/11/25 23:33:56 rkujawa Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * Redistribution and use in source and binary forms, with or
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Sun Nov 25 23:36:37 UTC 2012 Modified Files: src/sys/arch/amiga/conf: GENERIC Log Message: Add z3rambd, commented out. To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/sys/arch/amiga/conf/GENERIC 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/amiga/conf/GENERIC diff -u src/sys/arch/amiga/conf/GENERIC:1.292 src/sys/arch/amiga/conf/GENERIC:1.293 --- src/sys/arch/amiga/conf/GENERIC:1.292 Wed Nov 21 22:35:19 2012 +++ src/sys/arch/amiga/conf/GENERIC Sun Nov 25 23:36:37 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.292 2012/11/21 22:35:19 rkujawa Exp $ +# $NetBSD: GENERIC,v 1.293 2012/11/25 23:36:37 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.292 $ +#ident GENERIC-$Revision: 1.293 $ maxusers 8 @@ -272,6 +272,9 @@ optionsKFONT_CONS_ISO8859_1 #options FONT_VT220L8x10 #options FONT_VT220ISO8x16 +#z3rambd* at zbus0 # Zorro III RAM block devices +#altmem* at z3rambd? + p5bus0 at zbus0 # Phase5 CSPPC/BPPC internal bus grfcc0 at mainbus0 # custom chips
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Sun Nov 25 23:37:10 UTC 2012 Modified Files: src/sys/arch/amiga/conf: GENERIC.in Log Message: Argh, commited wrong file. Add z3rambd. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amiga/conf/GENERIC.in 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/amiga/conf/GENERIC.in diff -u src/sys/arch/amiga/conf/GENERIC.in:1.106 src/sys/arch/amiga/conf/GENERIC.in:1.107 --- src/sys/arch/amiga/conf/GENERIC.in:1.106 Wed Nov 21 22:33:50 2012 +++ src/sys/arch/amiga/conf/GENERIC.in Sun Nov 25 23:37:10 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.in,v 1.106 2012/11/21 22:33:50 rkujawa Exp $ +# $NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $ # ## # GENERIC machine description file @@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.106 $ +#ident GENERIC-$Revision: 1.107 $ m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl makeoptions COPTS=-Os @@ -330,6 +330,9 @@ m4_ifdef(`AMIGA_CONFIGURATION', `m4_dnl ')m4_dnl m4_ifdef(`AMIGA_CONFIGURATION', `m4_dnl +#z3rambd* at zbus0 # Zorro III RAM block devices +#altmem* at z3rambd? + p5bus0 at zbus0 # Phase5 CSPPC/BPPC internal bus grfcc0 at mainbus0 # custom chips
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Sun Nov 25 23:37:28 UTC 2012 Modified Files: src/sys/arch/amiga/conf: DRACO GENERIC INSTALL Log Message: Regen configs. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.293 -r1.294 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.112 -r1.113 src/sys/arch/amiga/conf/INSTALL 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/amiga/conf/DRACO diff -u src/sys/arch/amiga/conf/DRACO:1.161 src/sys/arch/amiga/conf/DRACO:1.162 --- src/sys/arch/amiga/conf/DRACO:1.161 Wed Nov 21 22:35:19 2012 +++ src/sys/arch/amiga/conf/DRACO Sun Nov 25 23:37:28 2012 @@ -1,9 +1,9 @@ -# $NetBSD: DRACO,v 1.161 2012/11/21 22:35:19 rkujawa Exp $ +# $NetBSD: DRACO,v 1.162 2012/11/25 23:37:28 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. # -# Created from: # NetBSD: GENERIC.in,v 1.106 2012/11/21 22:33:50 rkujawa Exp $ +# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $ # ## # GENERIC machine description file @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.161 $ +#ident GENERIC-$Revision: 1.162 $ maxusers 8 Index: src/sys/arch/amiga/conf/GENERIC diff -u src/sys/arch/amiga/conf/GENERIC:1.293 src/sys/arch/amiga/conf/GENERIC:1.294 --- src/sys/arch/amiga/conf/GENERIC:1.293 Sun Nov 25 23:36:37 2012 +++ src/sys/arch/amiga/conf/GENERIC Sun Nov 25 23:37:28 2012 @@ -1,9 +1,9 @@ -# $NetBSD: GENERIC,v 1.293 2012/11/25 23:36:37 rkujawa Exp $ +# $NetBSD: GENERIC,v 1.294 2012/11/25 23:37:28 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. # -# Created from: # NetBSD: GENERIC.in,v 1.106 2012/11/21 22:33:50 rkujawa Exp $ +# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $ # ## # GENERIC machine description file @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.293 $ +#ident GENERIC-$Revision: 1.294 $ maxusers 8 Index: src/sys/arch/amiga/conf/INSTALL diff -u src/sys/arch/amiga/conf/INSTALL:1.112 src/sys/arch/amiga/conf/INSTALL:1.113 --- src/sys/arch/amiga/conf/INSTALL:1.112 Wed Nov 21 22:35:19 2012 +++ src/sys/arch/amiga/conf/INSTALL Sun Nov 25 23:37:28 2012 @@ -1,9 +1,9 @@ -# $NetBSD: INSTALL,v 1.112 2012/11/21 22:35:19 rkujawa Exp $ +# $NetBSD: INSTALL,v 1.113 2012/11/25 23:37:28 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. # -# Created from: # NetBSD: GENERIC.in,v 1.106 2012/11/21 22:33:50 rkujawa Exp $ +# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $ # ## # GENERIC machine description file @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.112 $ +#ident GENERIC-$Revision: 1.113 $ makeoptions COPTS=-Os @@ -226,6 +226,9 @@ optionsKFONT_CONS_ISO8859_1 #options FONT_VT220L8x10 #options FONT_VT220ISO8x16 +#z3rambd* at zbus0 # Zorro III RAM block devices +#altmem* at z3rambd? + p5bus0 at zbus0 # Phase5 CSPPC/BPPC internal bus grfcc0 at mainbus0 # custom chips
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Mon Nov 26 00:23:53 UTC 2012 Modified Files: src/doc: CHANGES Log Message: Note z3rambd(4). To generate a diff of this commit: cvs rdiff -u -r1.1760 -r1.1761 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1760 src/doc/CHANGES:1.1761 --- src/doc/CHANGES:1.1760 Mon Nov 19 22:57:45 2012 +++ src/doc/CHANGES Mon Nov 26 00:23:53 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1760 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1761 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -143,3 +143,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: amiga: A2000-style RTCs are now driven by the msm6242b(4) driver. [rkujawa 20121114] xsurf(4): Add X-Surf IDE controller support. [rkujawa 20121119] + z3rambd(4): Add driver for Zorro III RAM boards as block devices. + [rkujawa 20121126]
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Mon Nov 26 00:36:01 UTC 2012 Modified Files: src/share/man/man4/man4.amiga: Makefile clockport.4 Added Files: src/share/man/man4/man4.amiga: z3rambd.4 Log Message: Add man page for newly added z3rambd(4) driver. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.amiga/clockport.4 cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/z3rambd.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/Makefile diff -u src/share/man/man4/man4.amiga/Makefile:1.26 src/share/man/man4/man4.amiga/Makefile:1.27 --- src/share/man/man4/man4.amiga/Makefile:1.26 Mon Jun 4 20:16:57 2012 +++ src/share/man/man4/man4.amiga/Makefile Mon Nov 26 00:36:01 2012 @@ -1,11 +1,11 @@ # from: @(#)Makefile 8.2 (Berkeley) 2/16/94 -# $NetBSD: Makefile,v 1.26 2012/06/04 20:16:57 rkujawa Exp $ +# $NetBSD: Makefile,v 1.27 2012/11/26 00:36:01 rkujawa Exp $ MAN= a1k2cp.4 afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 \ bah.4 bppcsc.4 clockport.4 cv3dpb.4 ed.4 efa.4 empb.4 es.4 fdc.4 grf.4 \ grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \ gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mppb.4 p5membar.4 p5pb.4 \ - qn.4 ser.4 wesc.4 xsurf.4 zssc.4 + qn.4 ser.4 wesc.4 xsurf.4 z3rambd.4 zssc.4 MLINKS= mem.4 kmem.4 MANSUBDIR=/amiga Index: src/share/man/man4/man4.amiga/clockport.4 diff -u src/share/man/man4/man4.amiga/clockport.4:1.4 src/share/man/man4/man4.amiga/clockport.4:1.5 --- src/share/man/man4/man4.amiga/clockport.4:1.4 Wed May 16 08:08:39 2012 +++ src/share/man/man4/man4.amiga/clockport.4 Mon Nov 26 00:36:01 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: clockport.4,v 1.4 2012/05/16 08:08:39 wiz Exp $ +.\ $NetBSD: clockport.4,v 1.5 2012/11/26 00:36:01 rkujawa Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -46,7 +46,15 @@ includes the following clockport drivers .Bl -tag -offset indent .It Xr com 4 Individual Computers SilverSurfer 16C550-based serial port. +.It Xr flipper 4 +Individual Computers Delfina Flipper / Delfina 1200. .El +.Sh CODE REFERENCES +The +.Nm +interface is implemented within the the +.Pa sys/arch/amiga/clockport +directory. .Sh SEE ALSO .Xr a1k2cp 4 .\ .Xr gencp 4 Added files: Index: src/share/man/man4/man4.amiga/z3rambd.4 diff -u /dev/null src/share/man/man4/man4.amiga/z3rambd.4:1.1 --- /dev/null Mon Nov 26 00:36:01 2012 +++ src/share/man/man4/man4.amiga/z3rambd.4 Mon Nov 26 00:36:01 2012 @@ -0,0 +1,80 @@ +.\ $NetBSD: z3rambd.4,v 1.1 2012/11/26 00:36:01 rkujawa Exp $ +.\ +.\ Copyright (c) 2012 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Radoslaw Kujawa. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\ POSSIBILITY OF SUCH DAMAGE. +.\ +.Dd November 26, 2012 +.Dt Z3RAMBD 4 amiga +.Os +.Sh NAME +.Nm z3rambd +.Nd Zorro III RAM block device driver +.Sh SYNOPSIS +.Cd z3rambd* at zbus0 +.Cd altmem* at z3rambd? +.Sh DESCRIPTION +The +.Nm +driver provides support using Zorro III RAM boards as block devices (e.g. for +swap). +.Sh HARDWARE +The +.Nm +driver supports the following hardware: +.Bl -tag -offset indent +.It AmigaKit ZorRAM +.El +.Sh SEE ALSO +.Xr altmem 4 , +.Xr boot 8 +.Sh HISTORY +The +.Nm +device first appeared in +.Nx 7.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Radoslaw Kujawa +.Aq radoslaw.kuj...@gmail.com . +.Sh CAVEATS +Currently it is up to user to ensure that given memory board is not used by +the kernel as
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Mon Nov 26 00:38:15 UTC 2012 Modified Files: src/share/man/man4/man4.amiga: clockport.4 Log Message: Last commit to this file was accidental, Flipper is not really supported yet. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/man4.amiga/clockport.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/clockport.4 diff -u src/share/man/man4/man4.amiga/clockport.4:1.5 src/share/man/man4/man4.amiga/clockport.4:1.6 --- src/share/man/man4/man4.amiga/clockport.4:1.5 Mon Nov 26 00:36:01 2012 +++ src/share/man/man4/man4.amiga/clockport.4 Mon Nov 26 00:38:15 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: clockport.4,v 1.5 2012/11/26 00:36:01 rkujawa Exp $ +.\ $NetBSD: clockport.4,v 1.6 2012/11/26 00:38:15 rkujawa Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -46,8 +46,8 @@ includes the following clockport drivers .Bl -tag -offset indent .It Xr com 4 Individual Computers SilverSurfer 16C550-based serial port. -.It Xr flipper 4 -Individual Computers Delfina Flipper / Delfina 1200. +.\ .It Xr flipper 4 +.\ Individual Computers Delfina Flipper / Delfina 1200. .El .Sh CODE REFERENCES The
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Mon Nov 26 00:41:49 UTC 2012 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add z3rambd(4) man page to distribution list. To generate a diff of this commit: cvs rdiff -u -r1.1407 -r1.1408 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1407 src/distrib/sets/lists/man/mi:1.1408 --- src/distrib/sets/lists/man/mi:1.1407 Thu Nov 15 19:49:11 2012 +++ src/distrib/sets/lists/man/mi Mon Nov 26 00:41:48 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1407 2012/11/15 19:49:11 jkunz Exp $ +# $NetBSD: mi,v 1.1408 2012/11/26 00:41:48 rkujawa Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -768,6 +768,7 @@ ./usr/share/man/cat4/amiga/ser.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/wesc.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/xsurf.0 man-sys-catman .cat +./usr/share/man/cat4/amiga/z3rambd.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/zssc.0 man-sys-catman .cat ./usr/share/man/cat4/amr.0 man-sys-catman .cat ./usr/share/man/cat4/ams.0 man-sys-catman .cat @@ -3725,6 +3726,7 @@ ./usr/share/man/html4/amiga/ser.html man-sys-htmlman html ./usr/share/man/html4/amiga/wesc.html man-sys-htmlman html ./usr/share/man/html4/amiga/xsurf.html man-sys-htmlman html +./usr/share/man/html4/amiga/z3rambd.html man-sys-htmlman html ./usr/share/man/html4/amiga/zssc.html man-sys-htmlman html ./usr/share/man/html4/amr.html man-sys-htmlman html ./usr/share/man/html4/ams.html man-sys-htmlman html @@ -6376,6 +6378,7 @@ ./usr/share/man/man4/amiga/ser.4 man-sys-man .man ./usr/share/man/man4/amiga/wesc.4 man-sys-man .man ./usr/share/man/man4/amiga/xsurf.4 man-sys-man .man +./usr/share/man/man4/amiga/z3rambd.4 man-sys-man .man ./usr/share/man/man4/amiga/zssc.4 man-sys-man .man ./usr/share/man/man4/amr.4 man-sys-man .man ./usr/share/man/man4/ams.4 man-sys-man .man
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Mon Nov 26 03:01:29 UTC 2012 Modified Files: src/sys/dev/pci: ichsmb.c Log Message: Match the Intel 7 Series SMBus Controller in ichsmb(4). Tested on a Thinkpad W530. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ichsmb.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/dev/pci/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.27 src/sys/dev/pci/ichsmb.c:1.28 --- src/sys/dev/pci/ichsmb.c:1.27 Tue Feb 14 15:08:07 2012 +++ src/sys/dev/pci/ichsmb.c Mon Nov 26 03:01:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.27 2012/02/14 15:08:07 pgoyette Exp $ */ +/* $NetBSD: ichsmb.c,v 1.28 2012/11/26 03:01:28 riastradh Exp $ */ /* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ichsmb.c,v 1.27 2012/02/14 15:08:07 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: ichsmb.c,v 1.28 2012/11/26 03:01:28 riastradh Exp $); #include sys/param.h #include sys/device.h @@ -108,6 +108,7 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_82801JI_SMB: case PCI_PRODUCT_INTEL_3400_SMB: case PCI_PRODUCT_INTEL_6SERIES_SMB: + case PCI_PRODUCT_INTEL_7SERIES_SMB: return 1; } }
CVS commit: othersrc/external/bsd/mat/dist
Module Name:othersrc Committed By: agc Date: Mon Nov 26 05:49:06 UTC 2012 Modified Files: othersrc/external/bsd/mat/dist: frontends.c mat.c Log Message: act on feedback from fuzz tests: check arguments to exported functions on entry to those functions To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/mat/dist/frontends.c cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/mat/dist/mat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/mat/dist/frontends.c diff -u othersrc/external/bsd/mat/dist/frontends.c:1.5 othersrc/external/bsd/mat/dist/frontends.c:1.6 --- othersrc/external/bsd/mat/dist/frontends.c:1.5 Wed Aug 3 01:09:58 2011 +++ othersrc/external/bsd/mat/dist/frontends.c Mon Nov 26 05:49:05 2012 @@ -163,6 +163,10 @@ mat_tar(int argc, char **argv) int ok; int i; + if (argc 0 || argv == NULL || argv[0] == NULL || argv[1] == NULL) { + fprintf(stderr, mat_tar: bad args\n); + return 0; + } (void) memset(mat, 0x0, sizeof(mat)); action = NULL; f = NULL; @@ -299,6 +303,10 @@ mat_vtar(char *arg, ...) char *s; int argc; + if (arg == NULL) { + fprintf(stderr, mat_vtar: bad args\n); + return 0; + } argv[0] = arg; va_start(args, arg); for (argc = 1 ; (s = va_arg(args, char *)) != NULL argc MAT_ARGC_MAX ; argc++) { @@ -325,6 +333,10 @@ mat_pax(int argc, char **argv) int ok; int i; + if (argv == NULL) { + fprintf(stderr, mat_pax: bad args\n); + return 0; + } (void) memset(mat, 0x0, sizeof(mat)); dir = NULL; metalog = NULL; @@ -439,6 +451,10 @@ mat_vpax(char *arg, ...) char *s; int argc; + if (arg == NULL) { + fprintf(stderr, mat_vpax: bad args\n); + return 0; + } argv[0] = arg; va_start(args, arg); for (argc = 1 ; (s = va_arg(args, char *)) != NULL argc MAT_ARGC_MAX ; argc++) { Index: othersrc/external/bsd/mat/dist/mat.c diff -u othersrc/external/bsd/mat/dist/mat.c:1.6 othersrc/external/bsd/mat/dist/mat.c:1.7 --- othersrc/external/bsd/mat/dist/mat.c:1.6 Sun Nov 25 20:20:36 2012 +++ othersrc/external/bsd/mat/dist/mat.c Mon Nov 26 05:49:05 2012 @@ -610,6 +610,10 @@ mat_add(mat_t *mat, const char *f) int original; int primary; + if (mat == NULL || f == NULL) { + (void) fprintf(stderr, mat_add: bad args\n); + return 0; + } (void) memset(ent, 0x0, sizeof(ent)); if (*f == '/') { (void) snprintf(dotpath, sizeof(dotpath), .%s, f); @@ -747,6 +751,10 @@ mat_list(mat_t *mat, const char *pat, FI int list; int cc; + if (mat == NULL || fp == NULL) { + (void) fprintf(stderr, mat_list: bad args\n); + return 0; + } if (!mat_verify(mat)) { return 0; } @@ -931,6 +939,10 @@ mat_extract(mat_t *mat, const char *pat) matent_t ent; char *name; + if (mat == NULL) { + (void) fprintf(stderr, mat_extract: bad args\n); + return 0; + } if (!mat_verify(mat)) { return 0; } @@ -991,6 +1003,10 @@ mat_init(mat_t *mat, const char *f, cons struct stat st; matheader_t header; + if (mat == NULL || mode == NULL) { + (void) fprintf(stderr, mat_init: bad args\n); + return 0; + } mat-recursing = 1; /* default behavior */ if (strcmp(mat-action = mode, create) == 0) { if (f == NULL || strcmp(f, -) == 0) { @@ -1026,6 +1042,10 @@ mat_init(mat_t *mat, const char *f, cons int mat_end(mat_t *mat) { + if (mat == NULL) { + (void) fprintf(stderr, mat_init: bad args\n); + return 0; + } if (mat-mapped) { munmap(mat-mapped, mat-size); } @@ -1054,6 +1074,10 @@ mat_audit(mat_t *mat, const char *pat, F int cc; int ok; + if (mat == NULL) { + (void) fprintf(stderr, mat_init: bad args\n); + return 0; + } if (!mat_verify(mat)) { return 0; }