CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Apr 26 09:03:12 UTC 2015 Modified Files: src/sys/dev/pci [netbsd-5]: if_wm.c Log Message: Apply patch, requested by msaitoh in ticket #1961: sys/dev/pci/if_wm.c:(patch) Fix a bug (in the backport for #1850) that passed the wrong pointer as the first argument of bpf_mtap() on 82575 and newer chip. To generate a diff of this commit: cvs rdiff -u -r1.162.4.19 -r1.162.4.20 src/sys/dev/pci/if_wm.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_wm.c diff -u src/sys/dev/pci/if_wm.c:1.162.4.19 src/sys/dev/pci/if_wm.c:1.162.4.20 --- src/sys/dev/pci/if_wm.c:1.162.4.19 Sat Sep 7 17:10:18 2013 +++ src/sys/dev/pci/if_wm.c Sun Apr 26 09:03:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.162.4.19 2013/09/07 17:10:18 bouyer Exp $ */ +/* $NetBSD: if_wm.c,v 1.162.4.20 2015/04/26 09:03:12 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.19 2013/09/07 17:10:18 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.20 2015/04/26 09:03:12 martin Exp $); #include bpfilter.h #include rnd.h @@ -3304,7 +3304,7 @@ wm_nq_start(struct ifnet *ifp) #if NBPFILTER 0 /* Pass the packet to any BPF listeners. */ if (ifp-if_bpf) - bpf_mtap(ifp, m0); + bpf_mtap(ifp-if_bpf, m0); #endif }
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: maxv Date: Sun Apr 26 06:19:36 UTC 2015 Modified Files: src/sys/ufs/ffs: ffs_vfsops.c Log Message: ffs_superblock_validate(): check the size of cylinder groups. To generate a diff of this commit: cvs rdiff -u -r1.329 -r1.330 src/sys/ufs/ffs/ffs_vfsops.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/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.329 src/sys/ufs/ffs/ffs_vfsops.c:1.330 --- src/sys/ufs/ffs/ffs_vfsops.c:1.329 Wed Apr 22 07:27:09 2015 +++ src/sys/ufs/ffs/ffs_vfsops.c Sun Apr 26 06:19:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.329 2015/04/22 07:27:09 maxv Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.330 2015/04/26 06:19:36 maxv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.329 2015/04/22 07:27:09 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.330 2015/04/26 06:19:36 maxv Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -899,7 +899,7 @@ static int ffs_superblock_validate(struct fs *fs) { int32_t i, fs_bshift = 0, fs_fshift = 0, fs_fragshift = 0, fs_frag; - int32_t fs_inopb; + int32_t fs_inopb, fs_cgsize; /* Check the superblock size */ if (fs-fs_sbsize SBLOCKSIZE || fs-fs_sbsize sizeof(struct fs)) @@ -980,6 +980,11 @@ ffs_superblock_validate(struct fs *fs) if (fs-fs_frag != fs_frag) return 0; + /* Check the size of cylinder groups */ + fs_cgsize = ffs_fragroundup(fs, CGSIZE(fs)); + if (fs-fs_cgsize != fs_cgsize) + return 0; + return 1; }
CVS commit: src/libexec/utmp_update
Module Name:src Committed By: mlelstv Date: Sun Apr 26 08:56:19 UTC 2015 Modified Files: src/libexec/utmp_update: utmp_update.c Log Message: Use verrx with a va_list. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/libexec/utmp_update/utmp_update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/utmp_update/utmp_update.c diff -u src/libexec/utmp_update/utmp_update.c:1.12 src/libexec/utmp_update/utmp_update.c:1.13 --- src/libexec/utmp_update/utmp_update.c:1.12 Sun Apr 26 08:03:05 2015 +++ src/libexec/utmp_update/utmp_update.c Sun Apr 26 08:56:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: utmp_update.c,v 1.12 2015/04/26 08:03:05 mlelstv Exp $ */ +/* $NetBSD: utmp_update.c,v 1.13 2015/04/26 08:56:19 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: utmp_update.c,v 1.12 2015/04/26 08:03:05 mlelstv Exp $); +__RCSID($NetBSD: utmp_update.c,v 1.13 2015/04/26 08:56:19 mlelstv Exp $); #include sys/types.h #include sys/param.h @@ -65,7 +65,7 @@ logerr(int e, const char *fmt, ...) va_copy(eap, sap); vsyslog(LOG_ERR, fmt, sap); va_end(sap); - errx(1, fmt, eap); + verrx(1, fmt, eap); va_end(eap); }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: martin Date: Sun Apr 26 09:04:32 UTC 2015 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Ticket #1961 To generate a diff of this commit: cvs rdiff -u -r1.1.2.112 -r1.1.2.113 src/doc/CHANGES-5.3 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-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.112 src/doc/CHANGES-5.3:1.1.2.113 --- src/doc/CHANGES-5.3:1.1.2.112 Fri Apr 24 05:48:35 2015 +++ src/doc/CHANGES-5.3 Sun Apr 26 09:04:32 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.112 2015/04/24 05:48:35 msaitoh Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.113 2015/04/26 09:04:32 martin Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -3840,3 +3840,9 @@ sys/kern/sys_select.cpatch exceeded, then return EINVAL instead of silently truncating the list. Addresses PR/17507. [prlw1, ticket #1957] + +sys/dev/pci/if_wm.c:patch + Fix a bug (in the backport for #1850) that passed the wrong + pointer as the first argument of bpf_mtap() on 82575 and newer chips. + [msaitoh, #1961] +
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sun Apr 26 09:16:06 UTC 2015 Modified Files: src/sys/kern: kern_veriexec.c Log Message: If we already have an entry for the file being loaded, return EEXIST, don't silently skip it. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/kern/kern_veriexec.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/kern/kern_veriexec.c diff -u src/sys/kern/kern_veriexec.c:1.5 src/sys/kern/kern_veriexec.c:1.6 --- src/sys/kern/kern_veriexec.c:1.5 Sat Apr 25 19:10:29 2015 +++ src/sys/kern/kern_veriexec.c Sun Apr 26 09:16:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_veriexec.c,v 1.5 2015/04/25 19:10:29 maxv Exp $ */ +/* $NetBSD: kern_veriexec.c,v 1.6 2015/04/26 09:16:06 maxv Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.5 2015/04/25 19:10:29 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.6 2015/04/26 09:16:06 maxv Exp $); #include opt_veriexec.h @@ -1195,7 +1195,7 @@ int veriexec_file_add(struct lwp *l, prop_dictionary_t dict) { struct veriexec_table_entry *vte; - struct veriexec_file_entry *vfe = NULL, *hh; + struct veriexec_file_entry *vfe = NULL; struct vnode *vp; const char *file, *fp_type; int error; @@ -1242,30 +1242,9 @@ veriexec_file_add(struct lwp *l, prop_di rw_enter(veriexec_op_lock, RW_WRITER); - /* - * See if we already have an entry for this file. If we do, then - * let the user know and silently pretend to succeed. - */ - hh = veriexec_get(vp); - if (hh != NULL) { - bool fp_mismatch; - - if (strcmp(vfe-ops-type, fp_type) || - memcmp(hh-fp, vfe-fp, hh-ops-hash_len)) - fp_mismatch = true; - else - fp_mismatch = false; - - if ((veriexec_verbose = 1) || fp_mismatch) { - log(LOG_NOTICE, Veriexec: Duplicate entry for `%s' - ignored. (%s fingerprint)\n, file, - fp_mismatch ? different : same); - } - - veriexec_file_free(vfe); - - /* XXX Should this be EEXIST if fp_mismatch is true? */ - error = 0; + if (veriexec_get(vp)) { + /* We already have an entry for this file. */ + error = EEXIST; goto unlock_out; }
CVS commit: src/sbin/veriexecctl
Module Name:src Committed By: maxv Date: Sun Apr 26 09:20:10 UTC 2015 Modified Files: src/sbin/veriexecctl: veriexecctl.c Log Message: Be a bit more verbose if the kernel rejects a file To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sbin/veriexecctl/veriexecctl.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/veriexecctl/veriexecctl.c diff -u src/sbin/veriexecctl/veriexecctl.c:1.37 src/sbin/veriexecctl/veriexecctl.c:1.38 --- src/sbin/veriexecctl/veriexecctl.c:1.37 Sun Jul 27 04:23:44 2014 +++ src/sbin/veriexecctl/veriexecctl.c Sun Apr 26 09:20:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecctl.c,v 1.37 2014/07/27 04:23:44 dholland Exp $ */ +/* $NetBSD: veriexecctl.c,v 1.38 2015/04/26 09:20:09 maxv Exp $ */ /*- * Copyright 2005 Elad Efrat e...@netbsd.org @@ -248,10 +248,11 @@ main(int argc, char **argv) err(1, Cannot open `%s', file); yyin = fdopen(lfd, r); - yyparse(); + fclose(yyin); - (void)fclose(yyin); + if (error != EXIT_SUCCESS) + errx(1, Cannot load '%s', file); } else if (argc == 2 strcasecmp(argv[0], delete) == 0) { prop_dictionary_t dp; struct stat sb;
CVS commit: src/distrib/sets
Module Name:src Committed By: martin Date: Sun Apr 26 09:21:36 UTC 2015 Modified Files: src/distrib/sets: maketars Log Message: Add a new arg to override the value of the setlistdir variable (that is: where the mtree spec files are created) To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/maketars 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/maketars diff -u src/distrib/sets/maketars:1.80 src/distrib/sets/maketars:1.81 --- src/distrib/sets/maketars:1.80 Thu Feb 7 16:27:41 2013 +++ src/distrib/sets/maketars Sun Apr 26 09:21:36 2015 @@ -1,10 +1,11 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.80 2013/02/07 16:27:41 christos Exp $ +# $NetBSD: maketars,v 1.81 2015/04/26 09:21:36 martin Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] -# [-M metalog] [-N etcdir] [-d destdir] [-t tardir] [setname ...] +# [-M metalog] [-N etcdir] [-F setlistsdir] [-d destdir] +# [-t tardir] [setname ...] # # The default sets are base comp debug etc games man misc tests text # The X sets are xbase xcomp xdebug xetc xfont xserver @@ -26,6 +27,7 @@ dest=${DESTDIR} metalog= installdir= etcdir= +setlistdir= setfilesonly=false quiet=false skipkeys=time,md5,sha1,sha384,sha512,rmd160,cksum @@ -33,8 +35,9 @@ skipkeys=time,md5,sha1,sha384,sha512,rmd usage() { cat 12 USAGE -Usage: ${prog} [-L base,x,ext] [-b] [-x] [-y] [-i idir] [-a arch] [-m machine] [-s setsdir] [-S] - [-M metalog] [-N etcdir] [-d dest] [-t targetdir] [setname ...] +Usage: ${prog} [-L base,x,ext] [-b] [-x] [-y] [-i idir] [-a arch] [-m machine] + [-s setsdir] [-S] [-M metalog] [-N etcdir] [-F setlistdir] + [-d dest] [-t targetdir] [setname ...] -L base,x,ext Make specified lists -b Make both netbsd and x11 lists -x Only make x11 lists @@ -46,6 +49,7 @@ Usage: ${prog} [-L base,x,ext] [-b] [-x] -m machine Set machine (e.g, amiga, i386, macppc) [${MACHINE}] -q Quiet operation -s setsdir Directory to find sets [${setsdir}] + -F setlistdir output directory for generated set lists [${dest}/etc/mtree/] -S Exit after creating set files ${dest}/etc/mtree/set.* -M metalog metalog file -N etcdir etc dir for metalog use [${dest}/etc] @@ -62,7 +66,7 @@ msg() } # handle args -while getopts L:bxyi:a:m:qs:SM:N:d:t: ch; do +while getopts L:bxyi:a:m:qs:F:SM:N:d:t: ch; do case ${ch} in L) save_IFS=${IFS} @@ -102,6 +106,9 @@ while getopts L:bxyi:a:m:qs:SM:N:d:t: ch s) setsdir=${OPTARG} ;; + F) + setlistdir=${OPTARG} + ;; S) setfilesonly=true ;; @@ -144,7 +151,7 @@ fi SDIR=$(${MKTEMP} -d /tmp/${prog}.XX) TMPFILES= -setlistdir=${dest}/etc/mtree +: ${setlistdir:=${dest}/etc/mtree} cleanup() {
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun Apr 26 16:48:00 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_hdaudio.c Log Message: print HDA instead of SATA at attach To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_hdaudio.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/arm/nvidia/tegra_hdaudio.c diff -u src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.1 src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.2 --- src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_hdaudio.c Sun Apr 26 16:48:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_hdaudio.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_hdaudio.c,v 1.2 2015/04/26 16:48:00 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_hdaudio.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_hdaudio.c,v 1.2 2015/04/26 16:48:00 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -80,7 +80,7 @@ tegra_hdaudio_attach(device_t parent, de sc-sc.sc_dmat = tio-tio_dmat; aprint_naive(\n); - aprint_normal(: SATA\n); + aprint_normal(: HDA\n); sc-sc_ih = intr_establish(loc-loc_intr, IPL_AUDIO, IST_LEVEL, tegra_hdaudio_intr, sc);
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Sun Apr 26 15:15:20 UTC 2015 Modified Files: src/sys/arch/acorn32/mainbus: fd.c src/sys/arch/amiga/dev: fd.c src/sys/arch/arc/jazz: fd.c src/sys/arch/atari/dev: fd.c hdfd.c src/sys/arch/dreamcast/dev: gdrom.c src/sys/arch/dreamcast/dev/maple: mmemcard.c src/sys/arch/emips/ebus: ace_ebus.c flash_ebus.c src/sys/arch/mac68k/obio: iwm_fd.c src/sys/arch/sparc/dev: fd.c src/sys/arch/sparc64/dev: fdc.c src/sys/arch/sun3/dev: fd.c xd.c xy.c src/sys/arch/x68k/dev: bmd.c fd.c src/sys/dev: md.c vnd.c src/sys/dev/altmem: altmem.c src/sys/dev/ata: wd.c src/sys/dev/isa: fd.c mcd.c src/sys/dev/mca: ed_mca.c src/sys/dev/mscp: mscp_disk.c src/sys/dev/ofw: ofdisk.c src/sys/dev/qbus: rf.c rl.c src/sys/dev/raidframe: rf_netbsdkintf.c src/sys/dev/scsipi: cd.c sd.c src/sys/dev/spi: spiflash.c src/sys/dev/vme: xd.c xy.c Log Message: Use C99-style initializers for struct dkdriver. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/acorn32/mainbus/fd.c cvs rdiff -u -r1.95 -r1.96 src/sys/arch/amiga/dev/fd.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arc/jazz/fd.c cvs rdiff -u -r1.83 -r1.84 src/sys/arch/atari/dev/fd.c cvs rdiff -u -r1.80 -r1.81 src/sys/arch/atari/dev/hdfd.c cvs rdiff -u -r1.40 -r1.41 src/sys/arch/dreamcast/dev/gdrom.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/dreamcast/dev/maple/mmemcard.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/emips/ebus/ace_ebus.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/emips/ebus/flash_ebus.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mac68k/obio/iwm_fd.c cvs rdiff -u -r1.156 -r1.157 src/sys/arch/sparc/dev/fd.c cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sparc64/dev/fdc.c cvs rdiff -u -r1.79 -r1.80 src/sys/arch/sun3/dev/fd.c cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/dev/xd.c cvs rdiff -u -r1.77 -r1.78 src/sys/arch/sun3/dev/xy.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x68k/dev/bmd.c cvs rdiff -u -r1.116 -r1.117 src/sys/arch/x68k/dev/fd.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/md.c cvs rdiff -u -r1.242 -r1.243 src/sys/dev/vnd.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/altmem/altmem.c cvs rdiff -u -r1.419 -r1.420 src/sys/dev/ata/wd.c cvs rdiff -u -r1.108 -r1.109 src/sys/dev/isa/fd.c cvs rdiff -u -r1.114 -r1.115 src/sys/dev/isa/mcd.c cvs rdiff -u -r1.63 -r1.64 src/sys/dev/mca/ed_mca.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/mscp/mscp_disk.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ofw/ofdisk.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/qbus/rf.c cvs rdiff -u -r1.49 -r1.50 src/sys/dev/qbus/rl.c cvs rdiff -u -r1.322 -r1.323 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.329 -r1.330 src/sys/dev/scsipi/cd.c cvs rdiff -u -r1.315 -r1.316 src/sys/dev/scsipi/sd.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/spi/spiflash.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/vme/xd.c cvs rdiff -u -r1.98 -r1.99 src/sys/dev/vme/xy.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/acorn32/mainbus/fd.c diff -u src/sys/arch/acorn32/mainbus/fd.c:1.57 src/sys/arch/acorn32/mainbus/fd.c:1.58 --- src/sys/arch/acorn32/mainbus/fd.c:1.57 Fri Jan 2 19:42:05 2015 +++ src/sys/arch/acorn32/mainbus/fd.c Sun Apr 26 15:15:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.57 2015/01/02 19:42:05 christos Exp $ */ +/* $NetBSD: fd.c,v 1.58 2015/04/26 15:15:19 mlelstv Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.57 2015/01/02 19:42:05 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.58 2015/04/26 15:15:19 mlelstv Exp $); #include opt_ddb.h @@ -296,7 +296,9 @@ void fdgetdisklabel(struct fd_softc *); int fd_get_parms(struct fd_softc *); void fdstart(struct fd_softc *); -struct dkdriver fddkdriver = { fdstrategy }; +struct dkdriver fddkdriver = { + .d_strategy = fdstrategy +}; struct fd_type *fd_nvtotype(const char *, int, int); void fd_set_motor(struct fdc_softc *fdc, int reset); Index: src/sys/arch/amiga/dev/fd.c diff -u src/sys/arch/amiga/dev/fd.c:1.95 src/sys/arch/amiga/dev/fd.c:1.96 --- src/sys/arch/amiga/dev/fd.c:1.95 Fri Jan 2 19:42:05 2015 +++ src/sys/arch/amiga/dev/fd.c Sun Apr 26 15:15:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.95 2015/01/02 19:42:05 christos Exp $ */ +/* $NetBSD: fd.c,v 1.96 2015/04/26 15:15:19 mlelstv Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.95 2015/01/02 19:42:05 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.96 2015/04/26 15:15:19 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -279,7 +279,9 @@ const struct cdevsw fd_cdevsw = { .d_flag = D_DISK }; -struct dkdriver fddkdriver = { fdstrategy }; +struct dkdriver
CVS commit: src/sys
Module Name:src Committed By: rtr Date: Sun Apr 26 16:45:51 UTC 2015 Modified Files: src/sys/netinet: in_pcb.c src/sys/netinet6: in6_pcb.c Log Message: return EINVAL if sin{,6}_len != sizeof(sockaddr_in{,6}) respectively in in{,6}_pcbconnect(). checking just m-m_len isn't enough because there are various places that assume sa_len has been properly populated. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/netinet/in_pcb.c cvs rdiff -u -r1.136 -r1.137 src/sys/netinet6/in6_pcb.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/netinet/in_pcb.c diff -u src/sys/netinet/in_pcb.c:1.157 src/sys/netinet/in_pcb.c:1.158 --- src/sys/netinet/in_pcb.c:1.157 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet/in_pcb.c Sun Apr 26 16:45:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.157 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: in_pcb.c,v 1.158 2015/04/26 16:45:51 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -93,7 +93,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in_pcb.c,v 1.157 2015/04/24 22:32:37 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: in_pcb.c,v 1.158 2015/04/26 16:45:51 rtr Exp $); #include opt_inet.h #include opt_ipsec.h @@ -461,6 +461,8 @@ in_pcbconnect(void *v, struct mbuf *nam, if (nam-m_len != sizeof (*sin)) return (EINVAL); + if (sin-sin_len != sizeof (*sin)) + return (EINVAL); if (sin-sin_family != AF_INET) return (EAFNOSUPPORT); if (sin-sin_port == 0) Index: src/sys/netinet6/in6_pcb.c diff -u src/sys/netinet6/in6_pcb.c:1.136 src/sys/netinet6/in6_pcb.c:1.137 --- src/sys/netinet6/in6_pcb.c:1.136 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet6/in6_pcb.c Sun Apr 26 16:45:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.136 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.137 2015/04/26 16:45:50 rtr Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.136 2015/04/24 22:32:37 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.137 2015/04/26 16:45:50 rtr Exp $); #include opt_inet.h #include opt_ipsec.h @@ -446,6 +446,8 @@ in6_pcbconnect(void *v, struct mbuf *nam if (nam-m_len != sizeof(*sin6)) return (EINVAL); + if (sin6-sin6_len != sizeof(*sin6)) + return (EINVAL); if (sin6-sin6_family != AF_INET6) return (EAFNOSUPPORT); if (sin6-sin6_port == 0)
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Sun Apr 26 16:22:57 UTC 2015 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: isb between TTBCR write and TLBIALL To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/cortex/a9_mpsubr.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/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.32 src/sys/arch/arm/cortex/a9_mpsubr.S:1.33 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.32 Mon Apr 20 23:12:56 2015 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Sun Apr 26 16:22:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.32 2015/04/20 23:12:56 jmcneill Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.33 2015/04/26 16:22:57 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -207,6 +207,8 @@ arm_cpuinit: #endif mcr p15, 0, r1, c2, c0, 2 // TTBCR write + isb + #if !defined(CPU_CORTEXA5) XPUTC(#'I') mov r1, #0
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Apr 26 16:11:57 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: mk.tegra Log Message: KERNEL_BASE_{PHYS,VIRT} are already defined in std.tegra To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.tegra 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/evbarm/conf/mk.tegra diff -u src/sys/arch/evbarm/conf/mk.tegra:1.1 src/sys/arch/evbarm/conf/mk.tegra:1.2 --- src/sys/arch/evbarm/conf/mk.tegra:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/evbarm/conf/mk.tegra Sun Apr 26 16:11:57 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mk.tegra,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ +# $NetBSD: mk.tegra,v 1.2 2015/04/26 16:11:57 jmcneill Exp $ CPPFLAGS+= -mcpu=cortex-a15 -mfpu=neon SYSTEM_FIRST_OBJ= tegra_start.o @@ -14,9 +14,6 @@ MKUBOOTIMAGEARGS+= -n NetBSD/$(BOARDTYP MKUBOOTIMAGEARGS_NONE= ${MKUBOOTIMAGEARGS} -C none MKUBOOTIMAGEARGS_GZ= ${MKUBOOTIMAGEARGS} -C gz -KERNEL_BASE_PHYS=0x8100 -KERNEL_BASE_VIRT=0x8100 - SYSTEM_LD_TAIL_EXTRA+=; \ echo ${OBJCOPY} -S -O binary $@ $@.bin; \ ${OBJCOPY} -S -O binary $@ $@.bin; \
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun Apr 26 16:41:05 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_ahcisata.c Log Message: fix bus space handle for ahcisata To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_ahcisata.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/arm/nvidia/tegra_ahcisata.c diff -u src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.1 src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.2 --- src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_ahcisata.c Sun Apr 26 16:41:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_ahcisata.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_ahcisata.c,v 1.2 2015/04/26 16:41:04 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_ahcisata.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_ahcisata.c,v 1.2 2015/04/26 16:41:04 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -70,8 +70,9 @@ tegra_ahcisata_attach(device_t parent, d sc-sc.sc_atac.atac_dev = self; sc-sc.sc_dmat = tio-tio_dmat; sc-sc.sc_ahcit = tio-tio_bst; + sc-sc.sc_ahcis = loc-loc_size; bus_space_subregion(tio-tio_bst, tio-tio_bsh, - loc-loc_offset, loc-loc_size, sc-sc.sc_ahcis); + loc-loc_offset, loc-loc_size, sc-sc.sc_ahcih); sc-sc.sc_ahci_ports = 1; aprint_naive(\n);
CVS commit: src/libexec/utmp_update
Module Name:src Committed By: mlelstv Date: Sun Apr 26 08:03:05 UTC 2015 Modified Files: src/libexec/utmp_update: utmp_update.c Log Message: size output buffer for strunvis to include the trailing NUL character. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/libexec/utmp_update/utmp_update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/utmp_update/utmp_update.c diff -u src/libexec/utmp_update/utmp_update.c:1.11 src/libexec/utmp_update/utmp_update.c:1.12 --- src/libexec/utmp_update/utmp_update.c:1.11 Sat Sep 17 14:25:43 2011 +++ src/libexec/utmp_update/utmp_update.c Sun Apr 26 08:03:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: utmp_update.c,v 1.11 2011/09/17 14:25:43 christos Exp $ */ +/* $NetBSD: utmp_update.c,v 1.12 2015/04/26 08:03:05 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: utmp_update.c,v 1.11 2011/09/17 14:25:43 christos Exp $); +__RCSID($NetBSD: utmp_update.c,v 1.12 2015/04/26 08:03:05 mlelstv Exp $); #include sys/types.h #include sys/param.h @@ -99,8 +99,8 @@ main(int argc, char *argv[]) if (len sizeof(*utx) * 4 + 1 || len sizeof(*utx)) logerr(0, Bad argument size %zu, len); - if ((utx = malloc(len)) == NULL) - logerr(errno, Can't allocate %zu, len); + if ((utx = malloc(len+1)) == NULL) + logerr(errno, Can't allocate %zu, len+1); res = strunvis((char *)utx, argv[1]); if (res != (int)sizeof(*utx))
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sun Apr 26 16:24:01 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_reg.h src/sys/arch/evbarm/tegra: tegra_machdep.c Log Message: add AHB_A2 to devmap, print SCTLR value in initarm To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_reg.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/tegra/tegra_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/arm/nvidia/tegra_reg.h diff -u src/sys/arch/arm/nvidia/tegra_reg.h:1.1 src/sys/arch/arm/nvidia/tegra_reg.h:1.2 --- src/sys/arch/arm/nvidia/tegra_reg.h:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_reg.h Sun Apr 26 16:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_reg.h,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_reg.h,v 1.2 2015/04/26 16:24:01 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -42,8 +42,9 @@ #define TEGRA_AHB_A2_BASE 0x7c00 #define TEGRA_AHB_A2_SIZE 0x0200 -#define TEGRA_HOST1X_VBASE 0xfd00 -#define TEGRA_APB_VBASE 0xfe00 +#define TEGRA_HOST1X_VBASE 0xfb00 +#define TEGRA_APB_VBASE 0xfc00 +#define TEGRA_AHB_A2_VBASE 0xfd00 #define TEGRA_REF_FREQ 1200 #define TEGRA_UART_FREQ TEGRA_REF_FREQ Index: src/sys/arch/evbarm/tegra/tegra_machdep.c diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.3 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.4 --- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.3 Sun Mar 29 22:27:04 2015 +++ src/sys/arch/evbarm/tegra/tegra_machdep.c Sun Apr 26 16:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_machdep.c,v 1.3 2015/03/29 22:27:04 jmcneill Exp $ */ +/* $NetBSD: tegra_machdep.c,v 1.4 2015/04/26 16:24:01 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.3 2015/03/29 22:27:04 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.4 2015/04/26 16:24:01 jmcneill Exp $); #include opt_tegra.h #include opt_machdep.h @@ -122,6 +122,13 @@ static const struct pmap_devmap devmap[] .pd_prot = VM_PROT_READ|VM_PROT_WRITE, .pd_cache = PTE_NOCACHE }, + { + .pd_va = _A(TEGRA_AHB_A2_VBASE), + .pd_pa = _A(TEGRA_AHB_A2_BASE), + .pd_size = _S(TEGRA_AHB_A2_SIZE), + .pd_prot = VM_PROT_READ|VM_PROT_WRITE, + .pd_cache = PTE_NOCACHE + }, {0} }; @@ -154,11 +161,28 @@ tegra_putstr(const char *s) tegra_putchar(*p); } } + +static void +tegra_printn(u_int n, int base) +{ + char *p, buf[(sizeof(u_int) * NBBY / 3) + 1 + 2 /* ALT + SIGN */]; + + p = buf; + do { + *p++ = hexdigits[n % base]; + } while (n /= base); + + do { + tegra_putchar(*--p); + } while (p buf); +} #define DPRINTF(...) printf(__VA_ARGS__) #define DPRINT(x) tegra_putstr(x) +#define DPRINTN(x,b) tegra_printn((x), (b)) #else #define DPRINTF(...) #define DPRINT(x) +#define DPRINTN(x,b) #endif /* @@ -180,6 +204,10 @@ initarm(void *arg) psize_t ram_size = 0; DPRINT(initarm:); + DPRINT( sctlr0x); + DPRINTN(armreg_sctlr_read(), 16); + DPRINT(); + DPRINT( devmap); pmap_devmap_register(devmap);
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:55:28 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Update ticket 1958. To generate a diff of this commit: cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-5.1.6 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-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.25 src/doc/CHANGES-5.1.6:1.1.2.26 --- src/doc/CHANGES-5.1.6:1.1.2.25 Fri Apr 24 05:49:18 2015 +++ src/doc/CHANGES-5.1.6 Sun Apr 26 12:55:28 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.25 2015/04/24 05:49:18 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.26 2015/04/26 12:55:28 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2584,7 +2584,10 @@ crypto/dist/openssl/dist/ssl/s2_srvr.c 1 X509_to_X509_REQ NULL pointer deref (CVE-2015-0288) [spz, ticket #1954] -sys/arch/sparc/stand/ofwboot/Locore.c 1.14 +sys/arch/sparc/include/openfirm.h 1.7 +sys/arch/sparc/stand/ofwboot/Locore.c 1.11, 1.14 +sys/arch/sparc/stand/ofwboot/loadfile_machdep.c 1.7 +sys/arch/sparc/stand/ofwboot/openfirm.h 1.4 Fix kernel loading failures from partitions started from over first 4GB of disks on sparc64.
CVS commit: [netbsd-5-2] src/sys/arch/sparc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:52:12 UTC 2015 Modified Files: src/sys/arch/sparc/include [netbsd-5-2]: openfirm.h src/sys/arch/sparc/stand/ofwboot [netbsd-5-2]: Locore.c loadfile_machdep.c openfirm.h Log Message: Pullup another commit for ticket #1958 requested by martin: sys/arch/sparc/include/openfirm.h 1.7 sys/arch/sparc/stand/ofwboot/Locore.c 1.11 sys/arch/sparc/stand/ofwboot/loadfile_machdep.c 1.7 sys/arch/sparc/stand/ofwboot/openfirm.h 1.4 Make ofwboot can handle over 4GB physical memory by using OpenFirmware calls properly, and some cosmetic changes. Idea from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.96.1 src/sys/arch/sparc/include/openfirm.h cvs rdiff -u -r1.10.44.1 -r1.10.44.2 \ src/sys/arch/sparc/stand/ofwboot/Locore.c cvs rdiff -u -r1.6 -r1.6.18.1 \ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.3 -r1.3.86.1 src/sys/arch/sparc/stand/ofwboot/openfirm.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/sparc/include/openfirm.h diff -u src/sys/arch/sparc/include/openfirm.h:1.6 src/sys/arch/sparc/include/openfirm.h:1.6.96.1 --- src/sys/arch/sparc/include/openfirm.h:1.6 Sat Mar 4 02:56:21 2006 +++ src/sys/arch/sparc/include/openfirm.h Sun Apr 26 12:52:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.h,v 1.6 2006/03/04 02:56:21 uwe Exp $ */ +/* $NetBSD: openfirm.h,v 1.6.96.1 2015/04/26 12:52:12 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -49,6 +49,9 @@ typedef uint64_t cell_t; #define HDL2CELL(x) (cell_t)(u_int)(int)(x) #define ADR2CELL(x) (cell_t)(u_int)(int)(x) #endif +#define HDQ2CELL_HI(x) (cell_t)(0) +#define HDQ2CELL_LO(x) (cell_t)(x) +#define CELL2HDQ(hi,lo) (lo) #else /* SUN4U */ /* All cells are 4 byte slots */ typedef uint32_t cell_t; Index: src/sys/arch/sparc/stand/ofwboot/Locore.c diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.44.1 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.44.2 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.44.1 Fri Apr 17 10:51:15 2015 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sun Apr 26 12:52:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.10.44.1 2015/04/17 10:51:15 msaitoh Exp $ */ +/* $NetBSD: Locore.c,v 1.10.44.2 2015/04/26 12:52:12 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -36,15 +36,6 @@ #include machine/cpu.h -vaddr_t OF_claim_virt(vaddr_t, int); -vaddr_t OF_alloc_virt(int, int); -int OF_free_virt(vaddr_t, int); -int OF_unmap_virt(vaddr_t, int); -vaddr_t OF_map_phys(paddr_t, off_t, vaddr_t, int); -paddr_t OF_alloc_phys(int, int); -paddr_t OF_claim_phys(paddr_t, int); -int OF_free_phys(paddr_t, int); - extern int openfirmware(void *); @@ -450,9 +441,9 @@ OF_claim_virt(vaddr_t vaddr, int len) args.align = 0; args.len = len; args.vaddr = ADR2CELL(vaddr); - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - return args.retaddr; /* Kluge till we go 64-bit */ + return (vaddr_t)args.retaddr; } /* @@ -486,13 +477,13 @@ OF_alloc_virt(int len, int align) args.nargs = 4; args.nreturns = 2; args.method = ADR2CELL(claim); - args.ihandle = mmuh; + args.ihandle = HDL2CELL(mmuh); args.align = align; args.len = len; args.retaddr = ADR2CELL(retaddr); - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - return (vaddr_t)args.retaddr; /* Kluge till we go 64-bit */ + return (vaddr_t)args.retaddr; } /* @@ -601,8 +592,8 @@ OF_map_phys(paddr_t paddr, off_t size, v args.mode = mode; args.size = size; args.vaddr = ADR2CELL(vaddr); - args.paddr_hi = ADR2CELL(paddr32); - args.paddr_lo = ADR2CELL(paddr); + args.paddr_hi = HDQ2CELL_HI(paddr); + args.paddr_lo = HDQ2CELL_LO(paddr); if (openfirmware(args) == -1) return -1; @@ -620,7 +611,6 @@ OF_map_phys(paddr_t paddr, off_t size, v paddr_t OF_alloc_phys(int len, int align) { - paddr_t paddr; struct { cell_t name; cell_t nargs; @@ -647,10 +637,9 @@ OF_alloc_phys(int len, int align) args.ihandle = HDL2CELL(memh); args.align = align; args.len = len; - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - paddr = (paddr_t)(args.phys_hi32)|((unsigned int)(args.phys_lo)); - return paddr; /* Kluge till we go 64-bit */ + return (paddr_t)CELL2HDQ(args.phys_hi, args.phys_lo); } /* @@ -661,7 +650,6 @@ OF_alloc_phys(int len, int align) paddr_t OF_claim_phys(paddr_t phys, int len) { - paddr_t paddr; struct { cell_t name; cell_t nargs; @@ -691,12 +679,11 @@ OF_claim_phys(paddr_t phys, int len) args.ihandle = HDL2CELL(memh); args.align = 0; args.len = len; - args.phys_hi = HDL2CELL(phys32); - args.phys_lo = HDL2CELL(phys); - if(openfirmware(args) != 0) + args.phys_hi = HDQ2CELL_HI(phys); + args.phys_lo = HDQ2CELL_LO(phys); + if
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:53:34 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Update ticket 1958. To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-5.2.4 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-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.26 src/doc/CHANGES-5.2.4:1.1.2.27 --- src/doc/CHANGES-5.2.4:1.1.2.26 Fri Apr 24 05:48:57 2015 +++ src/doc/CHANGES-5.2.4 Sun Apr 26 12:53:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.26 2015/04/24 05:48:57 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.27 2015/04/26 12:53:34 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2584,7 +2584,10 @@ crypto/dist/openssl/dist/ssl/s2_srvr.c 1 X509_to_X509_REQ NULL pointer deref (CVE-2015-0288) [spz, ticket #1954] -sys/arch/sparc/stand/ofwboot/Locore.c 1.14 +sys/arch/sparc/include/openfirm.h 1.7 +sys/arch/sparc/stand/ofwboot/Locore.c 1.11, 1.14 +sys/arch/sparc/stand/ofwboot/loadfile_machdep.c 1.7 +sys/arch/sparc/stand/ofwboot/openfirm.h 1.4 Fix kernel loading failures from partitions started from over first 4GB of disks on sparc64.
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Sun Apr 26 09:38:01 UTC 2015 Modified Files: src/sys/dev: verified_exec.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/verified_exec.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/verified_exec.c diff -u src/sys/dev/verified_exec.c:1.69 src/sys/dev/verified_exec.c:1.70 --- src/sys/dev/verified_exec.c:1.69 Fri Jul 25 08:10:35 2014 +++ src/sys/dev/verified_exec.c Sun Apr 26 09:38:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: verified_exec.c,v 1.69 2014/07/25 08:10:35 dholland Exp $ */ +/* $NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: verified_exec.c,v 1.69 2014/07/25 08:10:35 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $); #include sys/param.h #include sys/errno.h @@ -60,7 +60,7 @@ static dev_type_close(veriexecclose); static dev_type_ioctl(veriexecioctl); struct veriexec_softc { -DEVPORT_DEVICE veriexec_dev; + DEVPORT_DEVICE veriexec_dev; }; #if defined(__FreeBSD__) @@ -69,11 +69,11 @@ struct veriexec_softc { #endif const struct cdevsw veriexec_cdevsw = { -.d_open = veriexecopen, + .d_open = veriexecopen, .d_close = veriexecclose, .d_read = noread, .d_write = nowrite, -.d_ioctl = veriexecioctl, + .d_ioctl = veriexecioctl, #ifdef __NetBSD__ .d_stop = nostop, .d_tty = notty, @@ -82,16 +82,16 @@ const struct cdevsw veriexec_cdevsw = { .d_mmap = nommap, .d_discard = nodiscard, #if defined(__NetBSD__) - .d_kqfilter = nokqfilter, - .d_flag = D_OTHER, + .d_kqfilter = nokqfilter, + .d_flag = D_OTHER, #elif defined(__FreeBSD__) - nostrategy, - veriexec, - CDEV_MAJOR, - nodump, - nopsize, - 0, /* flags */ - BDEV_MAJOR + nostrategy, + veriexec, + CDEV_MAJOR, + nodump, + nopsize, + 0, /* flags */ + BDEV_MAJOR #endif };
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Sun Apr 26 09:45:40 UTC 2015 Modified Files: src/sys/dev: verified_exec.c Log Message: Not to add even more confusion in an already overcomplicated subsystem, remove the FreeBSD code. This code is likely to be outdated, and Veriexec is in all cases not available on FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/verified_exec.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/verified_exec.c diff -u src/sys/dev/verified_exec.c:1.70 src/sys/dev/verified_exec.c:1.71 --- src/sys/dev/verified_exec.c:1.70 Sun Apr 26 09:38:01 2015 +++ src/sys/dev/verified_exec.c Sun Apr 26 09:45:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $ */ +/* $NetBSD: verified_exec.c,v 1.71 2015/04/26 09:45:40 maxv Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: verified_exec.c,v 1.71 2015/04/26 09:45:40 maxv Exp $); #include sys/param.h #include sys/errno.h @@ -42,15 +42,9 @@ __KERNEL_RCSID(0, $NetBSD: verified_exe #include sys/syslog.h #include sys/proc.h -#ifdef __FreeBSD__ -#include sys/kernel.h -#include sys/device_port.h -#include sys/ioccom.h -#else #include sys/ioctl.h #include sys/device.h #define DEVPORT_DEVICE struct device -#endif #include prop/proplib.h @@ -63,36 +57,19 @@ struct veriexec_softc { DEVPORT_DEVICE veriexec_dev; }; -#if defined(__FreeBSD__) -# define CDEV_MAJOR 216 -# define BDEV_MAJOR -1 -#endif - const struct cdevsw veriexec_cdevsw = { .d_open = veriexecopen, .d_close = veriexecclose, .d_read = noread, .d_write = nowrite, .d_ioctl = veriexecioctl, -#ifdef __NetBSD__ .d_stop = nostop, .d_tty = notty, -#endif .d_poll = nopoll, .d_mmap = nommap, .d_discard = nodiscard, -#if defined(__NetBSD__) .d_kqfilter = nokqfilter, .d_flag = D_OTHER, -#elif defined(__FreeBSD__) - nostrategy, - veriexec, - CDEV_MAJOR, - nodump, - nopsize, - 0, /* flags */ - BDEV_MAJOR -#endif }; /* count of number of times device is open (we really only allow one open) */ @@ -291,14 +268,3 @@ veriexecioctl(dev_t dev, u_long cmd, voi return (error); } -#if defined(__FreeBSD__) -static void -veriexec_drvinit(void *unused) -{ - make_dev(verifiedexec_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - veriexec); - verifiedexecattach(0, 0, 0); -} - -SYSINIT(veriexec, SI_SUB_PSEUDO, SI_ORDER_ANY, veriexec_drvinit, NULL); -#endif
CVS commit: [netbsd-5-1] src/sys/arch/sparc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:54:38 UTC 2015 Modified Files: src/sys/arch/sparc/include [netbsd-5-1]: openfirm.h src/sys/arch/sparc/stand/ofwboot [netbsd-5-1]: Locore.c loadfile_machdep.c openfirm.h Log Message: Pullup another commit for ticket #1958 requested by martin: sys/arch/sparc/include/openfirm.h 1.7 sys/arch/sparc/stand/ofwboot/Locore.c 1.11 sys/arch/sparc/stand/ofwboot/loadfile_machdep.c 1.7 sys/arch/sparc/stand/ofwboot/openfirm.h 1.4 Make ofwboot can handle over 4GB physical memory by using OpenFirmware calls properly, and some cosmetic changes. Idea from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.92.1 src/sys/arch/sparc/include/openfirm.h cvs rdiff -u -r1.10.40.1 -r1.10.40.2 \ src/sys/arch/sparc/stand/ofwboot/Locore.c cvs rdiff -u -r1.6 -r1.6.14.1 \ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.3 -r1.3.82.1 src/sys/arch/sparc/stand/ofwboot/openfirm.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/sparc/include/openfirm.h diff -u src/sys/arch/sparc/include/openfirm.h:1.6 src/sys/arch/sparc/include/openfirm.h:1.6.92.1 --- src/sys/arch/sparc/include/openfirm.h:1.6 Sat Mar 4 02:56:21 2006 +++ src/sys/arch/sparc/include/openfirm.h Sun Apr 26 12:54:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.h,v 1.6 2006/03/04 02:56:21 uwe Exp $ */ +/* $NetBSD: openfirm.h,v 1.6.92.1 2015/04/26 12:54:38 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -49,6 +49,9 @@ typedef uint64_t cell_t; #define HDL2CELL(x) (cell_t)(u_int)(int)(x) #define ADR2CELL(x) (cell_t)(u_int)(int)(x) #endif +#define HDQ2CELL_HI(x) (cell_t)(0) +#define HDQ2CELL_LO(x) (cell_t)(x) +#define CELL2HDQ(hi,lo) (lo) #else /* SUN4U */ /* All cells are 4 byte slots */ typedef uint32_t cell_t; Index: src/sys/arch/sparc/stand/ofwboot/Locore.c diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.40.1 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.40.2 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.40.1 Fri Apr 17 10:51:28 2015 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sun Apr 26 12:54:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.10.40.1 2015/04/17 10:51:28 msaitoh Exp $ */ +/* $NetBSD: Locore.c,v 1.10.40.2 2015/04/26 12:54:38 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -36,15 +36,6 @@ #include machine/cpu.h -vaddr_t OF_claim_virt(vaddr_t, int); -vaddr_t OF_alloc_virt(int, int); -int OF_free_virt(vaddr_t, int); -int OF_unmap_virt(vaddr_t, int); -vaddr_t OF_map_phys(paddr_t, off_t, vaddr_t, int); -paddr_t OF_alloc_phys(int, int); -paddr_t OF_claim_phys(paddr_t, int); -int OF_free_phys(paddr_t, int); - extern int openfirmware(void *); @@ -450,9 +441,9 @@ OF_claim_virt(vaddr_t vaddr, int len) args.align = 0; args.len = len; args.vaddr = ADR2CELL(vaddr); - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - return args.retaddr; /* Kluge till we go 64-bit */ + return (vaddr_t)args.retaddr; } /* @@ -486,13 +477,13 @@ OF_alloc_virt(int len, int align) args.nargs = 4; args.nreturns = 2; args.method = ADR2CELL(claim); - args.ihandle = mmuh; + args.ihandle = HDL2CELL(mmuh); args.align = align; args.len = len; args.retaddr = ADR2CELL(retaddr); - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - return (vaddr_t)args.retaddr; /* Kluge till we go 64-bit */ + return (vaddr_t)args.retaddr; } /* @@ -601,8 +592,8 @@ OF_map_phys(paddr_t paddr, off_t size, v args.mode = mode; args.size = size; args.vaddr = ADR2CELL(vaddr); - args.paddr_hi = ADR2CELL(paddr32); - args.paddr_lo = ADR2CELL(paddr); + args.paddr_hi = HDQ2CELL_HI(paddr); + args.paddr_lo = HDQ2CELL_LO(paddr); if (openfirmware(args) == -1) return -1; @@ -620,7 +611,6 @@ OF_map_phys(paddr_t paddr, off_t size, v paddr_t OF_alloc_phys(int len, int align) { - paddr_t paddr; struct { cell_t name; cell_t nargs; @@ -647,10 +637,9 @@ OF_alloc_phys(int len, int align) args.ihandle = HDL2CELL(memh); args.align = align; args.len = len; - if(openfirmware(args) != 0) + if (openfirmware(args) != 0) return -1LL; - paddr = (paddr_t)(args.phys_hi32)|((unsigned int)(args.phys_lo)); - return paddr; /* Kluge till we go 64-bit */ + return (paddr_t)CELL2HDQ(args.phys_hi, args.phys_lo); } /* @@ -661,7 +650,6 @@ OF_alloc_phys(int len, int align) paddr_t OF_claim_phys(paddr_t phys, int len) { - paddr_t paddr; struct { cell_t name; cell_t nargs; @@ -691,12 +679,11 @@ OF_claim_phys(paddr_t phys, int len) args.ihandle = HDL2CELL(memh); args.align = 0; args.len = len; - args.phys_hi = HDL2CELL(phys32); - args.phys_lo = HDL2CELL(phys); - if(openfirmware(args) != 0) + args.phys_hi = HDQ2CELL_HI(phys); + args.phys_lo = HDQ2CELL_LO(phys); + if
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: christos Date: Sun Apr 26 12:44:08 UTC 2015 Modified Files: src/sys/arch/amd64/include: frame_regs.h Log Message: PR/49859: Kamil Rytarowski: Invalid path to amd64nbsd-tdep.c in a comment To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/include/frame_regs.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/amd64/include/frame_regs.h diff -u src/sys/arch/amd64/include/frame_regs.h:1.5 src/sys/arch/amd64/include/frame_regs.h:1.6 --- src/sys/arch/amd64/include/frame_regs.h:1.5 Wed Nov 26 23:41:55 2014 +++ src/sys/arch/amd64/include/frame_regs.h Sun Apr 26 08:44:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: frame_regs.h,v 1.5 2014/11/27 04:41:55 uebayasi Exp $ */ +/* $NetBSD: frame_regs.h,v 1.6 2015/04/26 12:44:08 christos Exp $ */ #ifndef _AMD64_FRAME_REGS_H_ #define _AMD64_FRAME_REGS_H_ @@ -11,8 +11,8 @@ * has been changed to improve syscall efficiency. * * Notes: - * 1) gdb (src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c) has a lookup table that - *assumes the __greg_t ordering. + * 1) gdb (src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c) has a lookup + *table that assumes the __greg_t ordering. * 2) src/lib/libc/arch/x86_64/gen/makecontext.c assumes that the first *6 entries in the __greg_t array match the registers used to pass *function arguments.
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sun Apr 26 22:04:28 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: soc_tegra124.c tegra_pmc.c tegra_pmcreg.h tegra_reg.h tegra_soc.c tegra_var.h src/sys/arch/evbarm/tegra: tegra_machdep.c tegra_start.S Log Message: add Tegra124 MP support To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/soc_tegra124.c \ src/sys/arch/arm/nvidia/tegra_pmcreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_pmc.c \ src/sys/arch/arm/nvidia/tegra_reg.h src/sys/arch/arm/nvidia/tegra_soc.c \ src/sys/arch/arm/nvidia/tegra_var.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/tegra/tegra_machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/tegra/tegra_start.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/arm/nvidia/soc_tegra124.c diff -u src/sys/arch/arm/nvidia/soc_tegra124.c:1.1 src/sys/arch/arm/nvidia/soc_tegra124.c:1.2 --- src/sys/arch/arm/nvidia/soc_tegra124.c:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/soc_tegra124.c Sun Apr 26 22:04:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: soc_tegra124.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: soc_tegra124.c,v 1.2 2015/04/26 22:04:28 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -30,7 +30,7 @@ #include opt_multiprocessor.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: soc_tegra124.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: soc_tegra124.c,v 1.2 2015/04/26 22:04:28 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -42,16 +42,38 @@ __KERNEL_RCSID(0, $NetBSD: soc_tegra124 #include arm/cpufunc.h #include arm/nvidia/tegra_reg.h +#include arm/nvidia/tegra_pmcreg.h #include arm/nvidia/tegra_var.h +#define EVP_RESET_VECTOR_0_REG 0x100 + void tegra124_mpinit(void) { #if defined(MULTIPROCESSOR) extern void cortex_mpstart(void); + bus_space_tag_t bst = armv7_generic_bs_tag; + bus_space_handle_t bsh; + u_int i; + + bus_space_subregion(bst, tegra_ppsb_bsh, + TEGRA_EVP_OFFSET, TEGRA_EVP_SIZE, bsh); arm_cpu_max = 1 + __SHIFTOUT(armreg_l2ctrl_read(), L2CTRL_NUMCPU); + KASSERT(arm_cpu_max == 4); - /* TODO */ + bus_space_write_4(bst, bsh, EVP_RESET_VECTOR_0_REG, (uint32_t)cortex_mpstart); + bus_space_barrier(bst, bsh, EVP_RESET_VECTOR_0_REG, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + + tegra_pmc_power(PMC_PARTID_CPU1, true); + tegra_pmc_power(PMC_PARTID_CPU2, true); + tegra_pmc_power(PMC_PARTID_CPU3, true); + + for (i = 0x1000; i 0; i--) { + __asm __volatile(dmb ::: memory); + if (arm_cpu_hatched == 0xe) + break; + } #endif } Index: src/sys/arch/arm/nvidia/tegra_pmcreg.h diff -u src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.1 src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.2 --- src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_pmcreg.h Sun Apr 26 22:04:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_pmcreg.h,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_pmcreg.h,v 1.2 2015/04/26 22:04:28 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -53,4 +53,36 @@ #define PMC_CNTRL_0_RTC_CLK_DIS __BIT(1) #define PMC_CNTRL_0_KBC_CLK_DIS __BIT(0) +#define PMC_PWRGATE_TOGGLE_0_REG 0x30 + +#define PMC_PWRGATE_TOGGLE_0_START __BIT(8) +#define PMC_PWRGATE_TOGGLE_0_PARTID __BITS(4,0) + +#define PMC_PWRGATE_STATUS_0_REG 0x38 + +#define PMC_PARTID_IRAM 24 +#define PMC_PARTID_VIC 23 +#define PMC_PARTID_XUSBC 22 +#define PMC_PARTID_XUSBB 21 +#define PMC_PARTID_XUSBA 20 +#define PMC_PARTID_DISB 19 +#define PMC_PARTID_DIS 18 +#define PMC_PARTID_SOR 17 +#define PMC_PARTID_C1NC 16 +#define PMC_PARTID_C0NC 15 +#define PMC_PARTID_CE0 14 +#define PMC_PARTID_A9LP 12 +#define PMC_PARTID_CPU3 11 +#define PMC_PARTID_CPU2 10 +#define PMC_PARTID_CPU1 9 +#define PMC_PARTID_SAX 8 +#define PMC_PARTID_HEG 7 +#define PMC_PARTID_MPE 6 +#define PMC_PARTID_L2C 5 +#define PMC_PARTID_VDE 4 +#define PMC_PARTID_PCX 3 +#define PMC_PARTID_VE 2 +#define PMC_PARTID_TD 1 +#define PMC_PARTID_CPU0 0 + #endif /* _ARM_TEGRA_PMCREG_H */ Index: src/sys/arch/arm/nvidia/tegra_pmc.c diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.2 src/sys/arch/arm/nvidia/tegra_pmc.c:1.3 --- src/sys/arch/arm/nvidia/tegra_pmc.c:1.2 Sun Mar 29 22:27:04 2015 +++ src/sys/arch/arm/nvidia/tegra_pmc.c Sun Apr 26 22:04:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_pmc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $ */ +/* $NetBSD: tegra_pmc.c,v 1.3 2015/04/26 22:04:28 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.3
CVS commit: src/sys/arch/evbarm/tegra
Module Name:src Committed By: jmcneill Date: Mon Apr 27 00:33:46 UTC 2015 Modified Files: src/sys/arch/evbarm/tegra: tegra_machdep.c Log Message: remove unnecessary debug print To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/tegra/tegra_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/evbarm/tegra/tegra_machdep.c diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.6 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.7 --- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.6 Sun Apr 26 22:04:28 2015 +++ src/sys/arch/evbarm/tegra/tegra_machdep.c Mon Apr 27 00:33:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_machdep.c,v 1.6 2015/04/26 22:04:28 jmcneill Exp $ */ +/* $NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.6 2015/04/26 22:04:28 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $); #include opt_tegra.h #include opt_machdep.h @@ -222,10 +222,6 @@ initarm(void *arg) psize_t ram_size = 0; DPRINT(initarm:); - DPRINT( sctlr0x); - DPRINTN(armreg_sctlr_read(), 16); - DPRINT(); - DPRINT( mpstart0x); DPRINTN((uint32_t)cortex_mpstart, 16); DPRINT();
CVS commit: src/sys
Module Name:src Committed By: rtr Date: Sun Apr 26 21:40:49 UTC 2015 Modified Files: src/sys/kern: uipc_usrreq.c src/sys/net: link_proto.c rtsock.c src/sys/netatalk: ddp_usrreq.c src/sys/netbt: hci_socket.c l2cap_socket.c rfcomm_socket.c sco_socket.c src/sys/netinet: dccp_usrreq.c raw_ip.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6: dccp6_usrreq.c raw_ip6.c udp6_usrreq.c src/sys/netipsec: keysock.c src/sys/netmpls: mpls_proto.c src/sys/netnatm: natm.c src/sys/rump/net/lib/libsockin: sockin.c src/sys/sys: param.h protosw.h Log Message: remove pr_generic from struct pr_usrreqs and all implementations of pr_generic in protocols. bump to 7.99.13 approved by rmind@ To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/kern/uipc_usrreq.c cvs rdiff -u -r1.26 -r1.27 src/sys/net/link_proto.c cvs rdiff -u -r1.169 -r1.170 src/sys/net/rtsock.c cvs rdiff -u -r1.66 -r1.67 src/sys/netatalk/ddp_usrreq.c cvs rdiff -u -r1.42 -r1.43 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.33 -r1.34 src/sys/netbt/l2cap_socket.c cvs rdiff -u -r1.35 -r1.36 src/sys/netbt/rfcomm_socket.c \ src/sys/netbt/sco_socket.c cvs rdiff -u -r1.3 -r1.4 src/sys/netinet/dccp_usrreq.c cvs rdiff -u -r1.149 -r1.150 src/sys/netinet/raw_ip.c cvs rdiff -u -r1.206 -r1.207 src/sys/netinet/tcp_usrreq.c cvs rdiff -u -r1.219 -r1.220 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.4 -r1.5 src/sys/netinet6/dccp6_usrreq.c cvs rdiff -u -r1.138 -r1.139 src/sys/netinet6/raw_ip6.c cvs rdiff -u -r1.118 -r1.119 src/sys/netinet6/udp6_usrreq.c cvs rdiff -u -r1.46 -r1.47 src/sys/netipsec/keysock.c cvs rdiff -u -r1.26 -r1.27 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.47 -r1.48 src/sys/netnatm/natm.c cvs rdiff -u -r1.60 -r1.61 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r1.474 -r1.475 src/sys/sys/param.h cvs rdiff -u -r1.62 -r1.63 src/sys/sys/protosw.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/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.177 src/sys/kern/uipc_usrreq.c:1.178 --- src/sys/kern/uipc_usrreq.c:1.177 Fri Apr 24 22:32:37 2015 +++ src/sys/kern/uipc_usrreq.c Sun Apr 26 21:40:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.177 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.178 2015/04/26 21:40:48 rtr Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.177 2015/04/24 22:32:37 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.178 2015/04/26 21:40:48 rtr Exp $); #include sys/param.h #include sys/systm.h @@ -547,41 +547,6 @@ unp_sendoob(struct socket *so, struct mb return EOPNOTSUPP; } -static int -unp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, -struct mbuf *control, struct lwp *l) -{ - - KASSERT(req != PRU_ATTACH); - KASSERT(req != PRU_DETACH); - KASSERT(req != PRU_ACCEPT); - KASSERT(req != PRU_BIND); - KASSERT(req != PRU_LISTEN); - KASSERT(req != PRU_CONNECT); - KASSERT(req != PRU_CONNECT2); - KASSERT(req != PRU_DISCONNECT); - KASSERT(req != PRU_SHUTDOWN); - KASSERT(req != PRU_ABORT); - KASSERT(req != PRU_CONTROL); - KASSERT(req != PRU_SENSE); - KASSERT(req != PRU_PEERADDR); - KASSERT(req != PRU_SOCKADDR); - KASSERT(req != PRU_RCVD); - KASSERT(req != PRU_RCVOOB); - KASSERT(req != PRU_SEND); - KASSERT(req != PRU_SENDOOB); - KASSERT(req != PRU_PURGEIF); - - KASSERT(solocked(so)); - - if (sotounpcb(so) == NULL) - return EINVAL; - - panic(piusrreq); - - return 0; -} - /* * Unix domain socket option processing. */ @@ -1997,5 +1962,4 @@ const struct pr_usrreqs unp_usrreqs = { .pr_recvoob = unp_recvoob, .pr_send = unp_send, .pr_sendoob = unp_sendoob, - .pr_generic = unp_usrreq, }; Index: src/sys/net/link_proto.c diff -u src/sys/net/link_proto.c:1.26 src/sys/net/link_proto.c:1.27 --- src/sys/net/link_proto.c:1.26 Fri Apr 24 22:32:37 2015 +++ src/sys/net/link_proto.c Sun Apr 26 21:40:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: link_proto.c,v 1.26 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: link_proto.c,v 1.27 2015/04/26 21:40:48 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: link_proto.c,v 1.26 2015/04/24 22:32:37 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: link_proto.c,v 1.27 2015/04/26 21:40:48 rtr Exp $); #include sys/param.h #include sys/socket.h @@ -68,8 +68,6 @@ static int link_send(struct socket *, st struct mbuf *, struct lwp *); static int link_sendoob(struct socket *, struct mbuf *, struct mbuf *); static int link_purgeif(struct socket *, struct ifnet *); -static int link_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, -struct mbuf *, struct lwp *); static void link_init(void); /* @@ -98,7 +96,6 @@ static
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Apr 26 18:03:48 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: std.tegra Log Message: arg 2GB causing usb issues, re-add __HAVE_MM_DIRECT_MAPPED_PHYS for now To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/std.tegra 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/evbarm/conf/std.tegra diff -u src/sys/arch/evbarm/conf/std.tegra:1.2 src/sys/arch/evbarm/conf/std.tegra:1.3 --- src/sys/arch/evbarm/conf/std.tegra:1.2 Sun Apr 26 17:41:33 2015 +++ src/sys/arch/evbarm/conf/std.tegra Sun Apr 26 18:03:48 2015 @@ -1,4 +1,4 @@ -# $NetBSD: std.tegra,v 1.2 2015/04/26 17:41:33 jmcneill Exp $ +# $NetBSD: std.tegra,v 1.3 2015/04/26 18:03:48 jmcneill Exp $ # machine evbarm arm @@ -12,7 +12,7 @@ options __HAVE_CPU_COUNTER options CORTEX_PMC options __HAVE_FAST_SOFTINTS # should be in types.h options ARM_HAS_VBAR -#options __HAVE_MM_MD_DIRECT_MAPPED_PHYS +options __HAVE_MM_MD_DIRECT_MAPPED_PHYS #options PMAP_NEED_ALLOC_POOLPAGE options TPIDRPRW_IS_CURCPU options KERNEL_BASE_EXT=0x8000
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Apr 26 21:37:22 UTC 2015 Modified Files: src/distrib/sets: mkvars.mk src/distrib/sets/lists/base: mi src/etc/mtree: NetBSD.dist.base src/share/mk: bsd.README bsd.own.mk src/sys/dev/microcode/radeon: Makefile Log Message: two changes to radeon drm firmware: - only install it by default on x86, set new MKRADEONFIRMWARE variable - install in /libdata, so that separate /usr systems work (this still doesn't solve PR#49811, which possibly could be handled by having them being a kernel module loaded by /boot.) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.1101 -r1.1102 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.143 -r1.144 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.340 -r1.341 src/share/mk/bsd.README cvs rdiff -u -r1.846 -r1.847 src/share/mk/bsd.own.mk cvs rdiff -u -r1.2 -r1.3 src/sys/dev/microcode/radeon/Makefile 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/mkvars.mk diff -u src/distrib/sets/mkvars.mk:1.16 src/distrib/sets/mkvars.mk:1.17 --- src/distrib/sets/mkvars.mk:1.16 Sun Mar 1 07:46:04 2015 +++ src/distrib/sets/mkvars.mk Sun Apr 26 21:37:22 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mkvars.mk,v 1.16 2015/03/01 07:46:04 mrg Exp $ +# $NetBSD: mkvars.mk,v 1.17 2015/04/26 21:37:22 mrg Exp $ MKEXTRAVARS= \ MACHINE \ @@ -22,6 +22,7 @@ MKEXTRAVARS= \ MKXORG \ MKXORG_SERVER \ MKX11RADEONKMS \ + MKRADEONFIRMWARE \ X11FLAVOR \ USE_INET6 \ USE_KERBEROS \ Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1101 src/distrib/sets/lists/base/mi:1.1102 --- src/distrib/sets/lists/base/mi:1.1101 Tue Apr 21 22:41:32 2015 +++ src/distrib/sets/lists/base/mi Sun Apr 26 21:37:22 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1101 2015/04/21 22:41:32 christos Exp $ +# $NetBSD: mi,v 1.1102 2015/04/26 21:37:22 mrg Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -213,6 +213,161 @@ ./libdata/firmware/if_wpi/README.iwlwifi-3945-ucode base-firmware-root ./libdata/firmware/if_wpi/ipw3945.ucode base-obsolete obsolete ./libdata/firmware/if_wpi/iwlwifi-3945.ucode base-firmware-root +./libdata/firmware/radeon base-firmware-usr +./libdata/firmware/radeon/ARUBA_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/ARUBA_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/ARUBA_rlc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BARTS_mc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BARTS_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BARTS_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BARTS_smc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_ce.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_mc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_mc2.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_mec.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_rlc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_sdma.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_smc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_uvd.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BONAIRE_vce.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/BTC_rlc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAICOS_mc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAICOS_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAICOS_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAICOS_smc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAYMAN_mc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAYMAN_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAYMAN_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAYMAN_rlc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CAYMAN_smc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CEDAR_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CEDAR_pfp.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CEDAR_rlc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CEDAR_smc.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CYPRESS_me.bin base-firmware-usr radeonfirmware +./libdata/firmware/radeon/CYPRESS_pfp.bin base-firmware-usr radeonfirmware
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: mrg Date: Sun Apr 26 18:49:39 UTC 2015 Modified Files: src/sys/arch/amd64/include: frame_regs.h Log Message: remove any pathname for gdb's amd64nbsd-tdep.c, so it doesn't really matter where it lives. PR#49859. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/include/frame_regs.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/amd64/include/frame_regs.h diff -u src/sys/arch/amd64/include/frame_regs.h:1.6 src/sys/arch/amd64/include/frame_regs.h:1.7 --- src/sys/arch/amd64/include/frame_regs.h:1.6 Sun Apr 26 12:44:08 2015 +++ src/sys/arch/amd64/include/frame_regs.h Sun Apr 26 18:49:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: frame_regs.h,v 1.6 2015/04/26 12:44:08 christos Exp $ */ +/* $NetBSD: frame_regs.h,v 1.7 2015/04/26 18:49:39 mrg Exp $ */ #ifndef _AMD64_FRAME_REGS_H_ #define _AMD64_FRAME_REGS_H_ @@ -11,8 +11,8 @@ * has been changed to improve syscall efficiency. * * Notes: - * 1) gdb (src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c) has a lookup - *table that assumes the __greg_t ordering. + * 1) gdb (amd64nbsd-tdep.c) has a lookup table that assumes the __greg_t + *ordering. * 2) src/lib/libc/arch/x86_64/gen/makecontext.c assumes that the first *6 entries in the __greg_t array match the registers used to pass *function arguments.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Apr 26 17:41:34 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: std.tegra Log Message: disable __HAVE_MM_MD_DIRECT_MAPPED_PHYS so we can use all 2GB To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/std.tegra 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/evbarm/conf/std.tegra diff -u src/sys/arch/evbarm/conf/std.tegra:1.1 src/sys/arch/evbarm/conf/std.tegra:1.2 --- src/sys/arch/evbarm/conf/std.tegra:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/evbarm/conf/std.tegra Sun Apr 26 17:41:33 2015 @@ -1,4 +1,4 @@ -# $NetBSD: std.tegra,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ +# $NetBSD: std.tegra,v 1.2 2015/04/26 17:41:33 jmcneill Exp $ # machine evbarm arm @@ -12,7 +12,8 @@ options __HAVE_CPU_COUNTER options CORTEX_PMC options __HAVE_FAST_SOFTINTS # should be in types.h options ARM_HAS_VBAR -options __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#options __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#options PMAP_NEED_ALLOC_POOLPAGE options TPIDRPRW_IS_CURCPU options KERNEL_BASE_EXT=0x8000 options FPU_VFP
CVS commit: src/sys/arch/evbarm/tegra
Module Name:src Committed By: jmcneill Date: Sun Apr 26 17:40:59 UTC 2015 Modified Files: src/sys/arch/evbarm/tegra: tegra_machdep.c Log Message: handle PMAP_NEED_ALLOC_POOLPAGE To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/tegra/tegra_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/evbarm/tegra/tegra_machdep.c diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.4 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.5 --- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.4 Sun Apr 26 16:24:01 2015 +++ src/sys/arch/evbarm/tegra/tegra_machdep.c Sun Apr 26 17:40:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_machdep.c,v 1.4 2015/04/26 16:24:01 jmcneill Exp $ */ +/* $NetBSD: tegra_machdep.c,v 1.5 2015/04/26 17:40:59 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.4 2015/04/26 16:24:01 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.5 2015/04/26 17:40:59 jmcneill Exp $); #include opt_tegra.h #include opt_machdep.h @@ -135,6 +135,15 @@ static const struct pmap_devmap devmap[] #undef _A #undef _S +#ifdef PMAP_NEED_ALLOC_POOLPAGE +static struct boot_physmem bp_highgig = { + .bp_start = TEGRA_EXTMEM_BASE / NBPG, + .bp_pages = (KERNEL_VM_BASE - KERNEL_BASE) / NBPG, + .bp_freelist = VM_FREELIST_ISADMA, + .bp_flags = 0 +}; +#endif + #ifdef VERBOSE_INIT_ARM static void tegra_putchar(char c) @@ -245,6 +254,8 @@ initarm(void *arg) ram_size = tegra_mc_memsize(); #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS + const bool mapallmem_p = true; +#ifndef PMAP_NEED_ALLOC_POOLPAGE if (ram_size KERNEL_VM_BASE - KERNEL_BASE) { printf(%s: dropping RAM size from %luMB to %uMB\n, __func__, (unsigned long) (ram_size 20), @@ -252,6 +263,9 @@ initarm(void *arg) ram_size = KERNEL_VM_BASE - KERNEL_BASE; } #endif +#else + const bool mapallmem_p = false; +#endif /* * If MEMSIZE specified less than what we really have, limit ourselves @@ -270,12 +284,6 @@ initarm(void *arg) bootconfig.dram[0].address = TEGRA_EXTMEM_BASE; /* DDR PHY addr */ bootconfig.dram[0].pages = ram_size / PAGE_SIZE; -#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS - const bool mapallmem_p = true; - KASSERT(ram_size = KERNEL_VM_BASE - KERNEL_BASE); -#else - const bool mapallmem_p = false; -#endif KASSERT((armreg_pfr1_read() ARM_PFR1_SEC_MASK) != 0); arm32_bootmem_init(bootconfig.dram[0].address, ram_size, @@ -298,6 +306,15 @@ initarm(void *arg) evbarm_device_register = tegra_device_register; +#ifdef PMAP_NEED_ALLOC_POOLPAGE + if (atop(ram_size) bp_highgig.bp_pages) { + bp_highgig.bp_start += atop(ram_size) - bp_highgig.bp_pages; + arm_poolpage_vmfreelist = bp_highgig.bp_freelist; + return initarm_common(KERNEL_VM_BASE, KERNEL_VM_SIZE, + bp_highgig, 1); + } +#endif + return initarm_common(KERNEL_VM_BASE, KERNEL_VM_SIZE, NULL, 0); }
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun Apr 26 17:14:24 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_ehci.c Log Message: ehci registers start at +0x100 from USB base address To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_ehci.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/arm/nvidia/tegra_ehci.c diff -u src/sys/arch/arm/nvidia/tegra_ehci.c:1.1 src/sys/arch/arm/nvidia/tegra_ehci.c:1.2 --- src/sys/arch/arm/nvidia/tegra_ehci.c:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_ehci.c Sun Apr 26 17:14:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_ehci.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -47,6 +47,8 @@ __KERNEL_RCSID(0, $NetBSD: tegra_ehci.c #include arm/nvidia/tegra_var.h +#define TEGRA_EHCI_REG_OFFSET 0x100 + static int tegra_ehci_match(device_t, cfdata_t, void *); static void tegra_ehci_attach(device_t, device_t, void *); @@ -83,7 +85,8 @@ tegra_ehci_attach(device_t parent, devic sc-sc.sc_size = loc-loc_size; sc-sc.iot = tio-tio_bst; bus_space_subregion(tio-tio_bst, tio-tio_bsh, - loc-loc_offset, loc-loc_size, sc-sc.ioh); + loc-loc_offset + TEGRA_EHCI_REG_OFFSET, + loc-loc_size - TEGRA_EHCI_REG_OFFSET, sc-sc.ioh); aprint_naive(\n); aprint_normal(: USB%d\n, loc-loc_port + 1);
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Mon Apr 27 02:59:44 UTC 2015 Modified Files: src/sys/netinet: dccp_usrreq.c tcp_input.c tcp_output.c tcp_subr.c src/sys/netinet6: in6_pcb.c in6_pcb.h in6_src.c udp6_output.c Log Message: Introduce in6_selecthlim_rt to consolidate an idiom for rt-rt_ifp It consolidates a scattered routine: (rt = rtcache_validate(in6p-in6p_route)) != NULL ? rt-rt_ifp : NULL To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/netinet/dccp_usrreq.c cvs rdiff -u -r1.337 -r1.338 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.180 -r1.181 src/sys/netinet/tcp_output.c cvs rdiff -u -r1.259 -r1.260 src/sys/netinet/tcp_subr.c cvs rdiff -u -r1.137 -r1.138 src/sys/netinet6/in6_pcb.c cvs rdiff -u -r1.43 -r1.44 src/sys/netinet6/in6_pcb.h cvs rdiff -u -r1.56 -r1.57 src/sys/netinet6/in6_src.c cvs rdiff -u -r1.47 -r1.48 src/sys/netinet6/udp6_output.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/netinet/dccp_usrreq.c diff -u src/sys/netinet/dccp_usrreq.c:1.4 src/sys/netinet/dccp_usrreq.c:1.5 --- src/sys/netinet/dccp_usrreq.c:1.4 Sun Apr 26 21:40:49 2015 +++ src/sys/netinet/dccp_usrreq.c Mon Apr 27 02:59:44 2015 @@ -1,5 +1,5 @@ /* $KAME: dccp_usrreq.c,v 1.67 2005/11/03 16:05:04 nishida Exp $ */ -/* $NetBSD: dccp_usrreq.c,v 1.4 2015/04/26 21:40:49 rtr Exp $ */ +/* $NetBSD: dccp_usrreq.c,v 1.5 2015/04/27 02:59:44 ozaki-r Exp $ */ /* * Copyright (c) 2003 Joacim Häggmark, Magnus Erixzon, Nils-Erik Mattsson @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dccp_usrreq.c,v 1.4 2015/04/26 21:40:49 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: dccp_usrreq.c,v 1.5 2015/04/27 02:59:44 ozaki-r Exp $); #include opt_inet.h #include opt_dccp.h @@ -91,7 +91,6 @@ __KERNEL_RCSID(0, $NetBSD: dccp_usrreq. #include sys/queue.h #include net/if.h -#include net/route.h #include netinet/in.h #include netinet/in_systm.h @@ -2308,9 +2307,6 @@ dccp_newdccpcb(int family, void *aux) struct inpcb *inp; struct in6pcb *in6p; struct dccpcb *dp; -#ifdef INET6 - struct rtentry *rt; -#endif DCCP_DEBUG((LOG_INFO, Creating a new dccpcb!\n)); @@ -2362,8 +2358,7 @@ dccp_newdccpcb(int family, void *aux) case PF_INET6: in6p = (struct in6pcb *)aux; dp-d_in6pcb = in6p; - rt = rtcache_validate(in6p-in6p_route); - in6p-in6p_ip6.ip6_hlim = in6_selecthlim(in6p, (rt != NULL) ? rt-rt_ifp : NULL); + in6p-in6p_ip6.ip6_hlim = in6_selecthlim_rt(in6p); in6p-in6p_ppcb = dp; break; } Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.337 src/sys/netinet/tcp_input.c:1.338 --- src/sys/netinet/tcp_input.c:1.337 Sat Mar 14 02:08:16 2015 +++ src/sys/netinet/tcp_input.c Mon Apr 27 02:59:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.337 2015/03/14 02:08:16 rtr Exp $ */ +/* $NetBSD: tcp_input.c,v 1.338 2015/04/27 02:59:44 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +148,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.337 2015/03/14 02:08:16 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.338 2015/04/27 02:59:44 ozaki-r Exp $); #include opt_inet.h #include opt_ipsec.h @@ -174,7 +174,6 @@ __KERNEL_RCSID(0, $NetBSD: tcp_input.c, #include sys/cprng.h #include net/if.h -#include net/route.h #include net/if_types.h #include netinet/in.h @@ -4797,8 +4796,7 @@ syn_cache_respond(struct syn_cache *sc, #ifdef INET6 case AF_INET6: ip6-ip6_hlim = in6_selecthlim(NULL, -(rt = rtcache_validate(ro)) != NULL ? rt-rt_ifp -: NULL); + (rt = rtcache_validate(ro)) != NULL ? rt-rt_ifp : NULL); error = ip6_output(m, NULL /*XXX*/, ro, 0, NULL, so, NULL); break; Index: src/sys/netinet/tcp_output.c diff -u src/sys/netinet/tcp_output.c:1.180 src/sys/netinet/tcp_output.c:1.181 --- src/sys/netinet/tcp_output.c:1.180 Sat Feb 14 12:57:53 2015 +++ src/sys/netinet/tcp_output.c Mon Apr 27 02:59:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.180 2015/02/14 12:57:53 he Exp $ */ +/* $NetBSD: tcp_output.c,v 1.181 2015/04/27 02:59:44 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.180 2015/02/14 12:57:53 he Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.181 2015/04/27 02:59:44 ozaki-r Exp $); #include opt_inet.h #include opt_ipsec.h @@ -1579,9 +1579,7 @@ timer: * setsockopt. Also, desired default hop limit might * be changed via Neighbor Discovery. */ - ip6-ip6_hlim = in6_selecthlim(tp-t_in6pcb, -(rt = rtcache_validate(ro)) != NULL ? rt-rt_ifp -: NULL); + ip6-ip6_hlim = in6_selecthlim_rt(tp-t_in6pcb); } ip6-ip6_flow |= htonl(ecn_tos 20); /* ip6-ip6_flow = ??? (from template) */