CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: jmcneill Date: Mon Jan 7 13:23:46 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm2835_emmc.c Log Message: emmc supports 1k block size, so set SDHC_MAX_BLK_LEN_1024 in host caps To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm2835_emmc.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/broadcom/bcm2835_emmc.c diff -u src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.4 src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.5 --- src/sys/arch/arm/broadcom/bcm2835_emmc.c:1.4 Sun Dec 23 18:26:16 2012 +++ src/sys/arch/arm/broadcom/bcm2835_emmc.c Mon Jan 7 13:23:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_emmc.c,v 1.4 2012/12/23 18:26:16 jakllsch Exp $ */ +/* $NetBSD: bcm2835_emmc.c,v 1.5 2013/01/07 13:23:46 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm2835_emmc.c,v 1.4 2012/12/23 18:26:16 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm2835_emmc.c,v 1.5 2013/01/07 13:23:46 jmcneill Exp $); #include sys/param.h #include sys/systm.h @@ -83,12 +83,16 @@ bcmemmc_attach(device_t parent, device_t int error; sc-sc.sc_dev = self; -// sc-sc.sc_dmat = aaa-amba_dmat; + sc-sc.sc_dmat = aaa-aaa_dmat; sc-sc.sc_flags = 0; -// sc-sc.sc_flags |= SDHC_FLAG_USE_DMA; /* not available (yet) */ sc-sc.sc_flags |= SDHC_FLAG_32BIT_ACCESS; sc-sc.sc_flags |= SDHC_FLAG_HOSTCAPS; - sc-sc.sc_caps = SDHC_VOLTAGE_SUPP_3_3V | SDHC_HIGH_SPEED_SUPP; + sc-sc.sc_caps = SDHC_VOLTAGE_SUPP_3_3V | SDHC_HIGH_SPEED_SUPP | + SDHC_MAX_BLK_LEN_1024; +#if notyet + sc-sc.sc_flags |= SDHC_FLAG_USE_DMA; + sc-sc.sc_caps |= SDHC_DMA_SUPPORT; +#endif sc-sc.sc_host = sc-sc_hosts; sc-sc.sc_clkbase = 5; /* Default to 50MHz */ sc-sc_iot = aaa-aaa_iot;
CVS commit: src/sys/dev
Module Name:src Committed By: prlw1 Date: Mon Jan 7 15:07:41 UTC 2013 Modified Files: src/sys/dev: video.c src/sys/dev/usb: ehci.c usb_mem.c usb_mem.h Log Message: Allow USB memory allocation by multiple segments in scatter/gather lists rather than in a single contiguous block which causes problems with large USB video frames. Based on a patch by Jeremy Morse in the thread http://mail-index.netbsd.org/current-users/2011/01/26/msg015532.html Tested by developing http://code.opencv.org/issues/2360 OK jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/video.c cvs rdiff -u -r1.196 -r1.197 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/usb_mem.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/usb_mem.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/video.c diff -u src/sys/dev/video.c:1.28 src/sys/dev/video.c:1.29 --- src/sys/dev/video.c:1.28 Thu Feb 2 17:21:18 2012 +++ src/sys/dev/video.c Mon Jan 7 15:07:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: video.c,v 1.28 2012/02/02 17:21:18 drochner Exp $ */ +/* $NetBSD: video.c,v 1.29 2013/01/07 15:07:40 prlw1 Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney p...@polycrystal.org @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: video.c,v 1.28 2012/02/02 17:21:18 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: video.c,v 1.29 2013/01/07 15:07:40 prlw1 Exp $); #include video.h #if NVIDEO 0 @@ -1604,7 +1604,8 @@ videoopen(dev_t dev, int flags, int ifmt sc = device_private(device_lookup(video_cd, VIDEOUNIT(dev))); if (sc == NULL) { - DPRINTF((videoopen: failed to get softc\n)); + DPRINTF((videoopen: failed to get softc for unit %d\n, + VIDEOUNIT(dev))); return ENXIO; } Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.196 src/sys/dev/usb/ehci.c:1.197 --- src/sys/dev/usb/ehci.c:1.196 Sat Jan 5 23:34:16 2013 +++ src/sys/dev/usb/ehci.c Mon Jan 7 15:07:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.196 2013/01/05 23:34:16 christos Exp $ */ +/* $NetBSD: ehci.c,v 1.197 2013/01/07 15:07:40 prlw1 Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.196 2013/01/05 23:34:16 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.197 2013/01/07 15:07:40 prlw1 Exp $); #include ohci.h #include uhci.h @@ -1336,12 +1336,18 @@ ehci_allocm(struct usbd_bus *bus, usb_dm struct ehci_softc *sc = bus-hci_private; usbd_status err; - err = usb_allocmem(sc-sc_bus, size, 0, dma); + err = usb_allocmem_flags(sc-sc_bus, size, 0, dma, USBMALLOC_MULTISEG); +#ifdef EHCI_DEBUG + if (err) + printf(ehci_allocm: usb_allocmem_flags()= %s (%d)\n, + usbd_errstr(err), err); +#endif if (err == USBD_NOMEM) err = usb_reserve_allocm(sc-sc_dma_reserve, dma, size); #ifdef EHCI_DEBUG if (err) - printf(ehci_allocm: usb_allocmem()=%d\n, err); + printf(ehci_allocm: usb_reserve_allocm()= %s (%d)\n, + usbd_errstr(err), err); #endif return (err); } @@ -2727,18 +2733,20 @@ ehci_alloc_sqtd_chain(struct ehci_pipe * ehci_soft_qtd_t **sp, ehci_soft_qtd_t **ep) { ehci_soft_qtd_t *next, *cur; - ehci_physaddr_t dataphys, dataphyspage, dataphyslastpage, nextphys; + ehci_physaddr_t nextphys; u_int32_t qtdstatus; int len, curlen, mps; int i, tog; + int pages, pageoffs; + bus_size_t curoffs; + vaddr_t va, va_offs; usb_dma_t *dma = xfer-dmabuf; u_int16_t flags = xfer-flags; + paddr_t a; DPRINTFN(alen4*4096,(ehci_alloc_sqtd_chain: start len=%d\n, alen)); len = alen; - dataphys = DMAADDR(dma, 0); - dataphyslastpage = EHCI_PAGE(dataphys + len - 1); qtdstatus = EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(rd ? EHCI_QTD_PID_IN : EHCI_QTD_PID_OUT) | EHCI_QTD_SET_CERR(3) @@ -2756,28 +2764,18 @@ ehci_alloc_sqtd_chain(struct ehci_pipe * usb_syncmem(dma, 0, alen, rd ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); + curoffs = 0; for (;;) { - dataphyspage = EHCI_PAGE(dataphys); /* The EHCI hardware can handle at most 5 pages. */ - if (dataphyslastpage - dataphyspage - EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE) { + va_offs = (vaddr_t)KERNADDR(dma, curoffs); + va_offs = EHCI_PAGE_OFFSET(va_offs); + if (len-curoffs EHCI_QTD_NBUFFERS*EHCI_PAGE_SIZE - va_offs) { /* we can handle it in this QTD */ - curlen = len; + curlen = len - curoffs; } else { /* must use multiple TDs, fill as much as possible. */ - curlen = EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE - - EHCI_PAGE_OFFSET(dataphys); -#ifdef DIAGNOSTIC - if (curlen len) { -printf(ehci_alloc_sqtd_chain: curlen=0x%x - len=0x%x offs=0x%x\n, curlen, len, - EHCI_PAGE_OFFSET(dataphys)); -printf(lastpage=0x%x page=0x%x phys=0x%x\n, - dataphyslastpage, dataphyspage, - dataphys); -curlen = len; - } -#endif + curlen
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Mon Jan 7 15:14:17 UTC 2013 Modified Files: src/sys/dev/usb: usb.h Log Message: more debug flags. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/dev/usb/usb.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/usb.h diff -u src/sys/dev/usb/usb.h:1.97 src/sys/dev/usb/usb.h:1.98 --- src/sys/dev/usb/usb.h:1.97 Sat Jan 5 18:34:19 2013 +++ src/sys/dev/usb/usb.h Mon Jan 7 10:14:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.97 2013/01/05 23:34:19 christos Exp $ */ +/* $NetBSD: usb.h,v 1.98 2013/01/07 15:14:17 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ /* @@ -58,6 +58,7 @@ MALLOC_DECLARE(M_USBHC); #ifdef USB_DEBUG #define ATU_DEBUG 1 #define AUE_DEBUG 1 +#define AUVITEK_I2C_DEBUG 1 #define AXE_DEBUG 1 #define CUE_DEBUG 1 #define EHCI_DEBUG 1 @@ -67,39 +68,61 @@ MALLOC_DECLARE(M_USBHC); #define OTUS_DEBUG 1 #define RUM_DEBUG 1 #define RUN_DEBUG 1 +#define UARK_DEBUG 1 +#define UATP_DEBUG 1 #define UAUDIO_DEBUG 1 +#define UBERRY_DEBUG 1 +#define UBSA_DEBUG 1 #define UBT_DEBUG 1 +#define UCHCOM_DEBUG 1 #define UCOM_DEBUG 1 #define UCYCOM_DEBUG 1 +#define UDAV_DEBUG 1 +#define UDL_DEBUG 1 #define UDSBR_DEBUG 1 #define UFTDI_DEBUG 1 +#define UGENSA_DEBUG 1 #define UGEN_DEBUG 1 #define UHCI_DEBUG 1 #define UHIDEV_DEBUG 1 #define UHID_DEBUG 1 +#define UHMODEM_DEBUG 1 #define UHSO_DEBUG 1 #define UHUB_DEBUG 1 +#define UIPAD_DEBUG 1 #define UIPAQ_DEBUG 1 #define UIRDA_DEBUG 1 #define UISDATA_DEBUG 1 #define UKBD_DEBUG 1 +#define UKYOPON_DEBUG 1 #define ULPT_DEBUG 1 +#define UMASS_DEBUG 1 #define UMCT_DEBUG 1 +#define UMIDIQUIRK_DEBUG 1 +#define UMIDI_DEBUG 1 #define UMODEM_DEBUG 1 #define UMS_DEBUG 1 +#define UPGT_DEBUG 1 #define UPLCOM_DEBUG 1 #define UPL_DEBUG 1 #define URAL_DEBUG 1 #define URIO_DEBUG 1 #define URL_DEBUG 1 +#define URNDIS_DEBUG 1 #define URTWN_DEBUG 1 #define URTW_DEBUG 1 +#define USB_DEBUG 1 #define USCANNER_DEBUG 1 +#define USLSA_DEBUG 1 #define USSCANNER_DEBUG 1 #define USTIR_DEBUG 1 +#define USTIR_DEBUG_IOCTLS 1 #define UTHUM_DEBUG 1 +#define UTOPPY_DEBUG 1 #define UTS_DEBUG 1 +#define UVIDEO_DEBUG 1 #define UVISOR_DEBUG 1 +#define UVSCOM_DEBUG 1 #define UYUREX_DEBUG 1 #define UZCOM_DEBUG 1 #define ZYD_DEBUG 1
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Mon Jan 7 15:41:57 UTC 2013 Modified Files: src/doc [netbsd-6]: 3RDPARTY src/external/ibm-public/postfix/dist [netbsd-6]: HISTORY makedefs src/external/ibm-public/postfix/dist/src/global [netbsd-6]: dict_ldap.c mail_version.h src/external/ibm-public/postfix/dist/src/oqmgr [netbsd-6]: qmgr_message.c src/external/ibm-public/postfix/dist/src/postscreen [netbsd-6]: postscreen_access.c src/external/ibm-public/postfix/dist/src/util [netbsd-6]: myaddrinfo.c sys_defs.h Log Message: doc/3RDPARTY1.989, 1.991 via patch external/ibm-public/postfix/dist/HISTORYpatch external/ibm-public/postfix/dist/makedefs patch external/ibm-public/postfix/dist/src/global/dict_ldap.c patch external/ibm-public/postfix/dist/src/global/mail_version.h patch external/ibm-public/postfix/dist/src/oqmgr/qmgr_message.c patch external/ibm-public/postfix/dist/src/postscreen/postscreen_access.c patch external/ibm-public/postfix/dist/src/util/myaddrinfo.c patch external/ibm-public/postfix/dist/src/util/sys_defs.hpatch Update Postfix to version 2.8.13. Changes since version 2.8.12: - The postscreen_access_list feature failed to ignore case in the first character of a command (e.g., permit, reject, etc.). Reported by Francis Picabia. (This fix is incorrectly listed in the HISTORY files of earlier releases, and will be removed with a future patch.) - Strip the datalink suffix (e.g., %eth0) from IPv6 addresses returned by the system getaddrinfo() routine. Such suffixes break the default mynetworks value, the Postfix SMTP server's reverse/forward DNS name/address mapping check, and possibly more. - To eliminate the possibility of collisions with connection cache lookup keys, the Postfix LDAP client now computes those lookup keys by joining the number-valued connection properties with ASCII null, just like it already did with the string-valued connection properties. - There was a memory leak during one-time TLS library initialization (introduced with Postfix 2.5). Reported by Coverity. - There was a memory leak in the unused oqmgr(8) program (introduced with Postfix 2.3). Reported by Coverity. [tron, ticket #771] To generate a diff of this commit: cvs rdiff -u -r1.909.2.17 -r1.909.2.18 src/doc/3RDPARTY cvs rdiff -u -r1.1.1.12.2.3 -r1.1.1.12.2.4 \ src/external/ibm-public/postfix/dist/HISTORY cvs rdiff -u -r1.5 -r1.5.2.1 src/external/ibm-public/postfix/dist/makedefs cvs rdiff -u -r1.1.1.3.6.1 -r1.1.1.3.6.2 \ src/external/ibm-public/postfix/dist/src/global/dict_ldap.c cvs rdiff -u -r1.1.1.12.2.3 -r1.1.1.12.2.4 \ src/external/ibm-public/postfix/dist/src/global/mail_version.h cvs rdiff -u -r1.1.1.3 -r1.1.1.3.6.1 \ src/external/ibm-public/postfix/dist/src/oqmgr/qmgr_message.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 \ src/external/ibm-public/postfix/dist/src/postscreen/postscreen_access.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.6.1 \ src/external/ibm-public/postfix/dist/src/util/myaddrinfo.c cvs rdiff -u -r1.3 -r1.3.2.1 \ src/external/ibm-public/postfix/dist/src/util/sys_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.17 src/doc/3RDPARTY:1.909.2.18 --- src/doc/3RDPARTY:1.909.2.17 Tue Nov 20 23:16:36 2012 +++ src/doc/3RDPARTY Mon Jan 7 15:41:55 2013 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.17 2012/11/20 23:16:36 riz Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.18 2013/01/07 15:41:55 riz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -944,8 +944,8 @@ formatting in man pages, disallowing flo and more. Package: Postfix -Version: 2.8.12 -Current Vers: 2.8.12/2.9.4 +Version: 2.8.13 +Current Vers: 2.8.13/2.9.5 Maintainer: Wietse Venema wie...@porcupine.org Archive Site: ftp://postfix.cloud9.net/official/ Home Page: http://www.postfix.org/ Index: src/external/ibm-public/postfix/dist/HISTORY diff -u src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.3 src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.4 --- src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.3 Sun Aug 12 19:25:22 2012 +++ src/external/ibm-public/postfix/dist/HISTORY Mon Jan 7 15:41:55 2013 @@ -16846,3 +16846,33 @@ Apologies for any names omitted. Bugfix (introduced: 2314): AUTH is not allowed after MAIL. Timo Sirainen. File: smtpd/smtpd_sasl_proto.c. + +20121003 + + Bugfix: the postscreen_access_list feature was case-sensitive + in the first character of permit, reject, etc. Reported by + Francis Picabia. File:
CVS commit: [netbsd-6] src/lib/librefuse
Module Name:src Committed By: riz Date: Mon Jan 7 15:54:01 UTC 2013 Modified Files: src/lib/librefuse [netbsd-6]: refuse.c Log Message: Pull up following revision(s) (requested by tron in ticket #772): lib/librefuse/refuse.c: revision 1.96 FUSE seems to allow short writes without errors but PUFFS doesn't. Work around this by returning ENOSPC in case of a short write to avoid protocol errors. This change is based on problem analysis provided by Antti Kantee. This fixes PR lib/45129 by myself. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.2.1 src/lib/librefuse/refuse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librefuse/refuse.c diff -u src/lib/librefuse/refuse.c:1.95 src/lib/librefuse/refuse.c:1.95.2.1 --- src/lib/librefuse/refuse.c:1.95 Thu Nov 24 01:56:22 2011 +++ src/lib/librefuse/refuse.c Mon Jan 7 15:54:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: refuse.c,v 1.95 2011/11/24 01:56:22 manu Exp $ */ +/* $NetBSD: refuse.c,v 1.95.2.1 2013/01/07 15:54:00 riz Exp $ */ /* * Copyright © 2007 Alistair Crooks. All rights reserved. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: refuse.c,v 1.95 2011/11/24 01:56:22 manu Exp $); +__RCSID($NetBSD: refuse.c,v 1.95.2.1 2013/01/07 15:54:00 riz Exp $); #endif /* !lint */ #include sys/types.h @@ -1083,14 +1083,16 @@ puffs_fuse_node_write(struct puffs_userm ret = (*fuse-op.write)(path, (char *)buf, *resid, offset, rn-file_info); - if (ret 0) { + if (ret = 0) { if ((uint64_t)(offset + ret) pn-pn_va.va_size) pn-pn_va.va_size = offset + ret; *resid -= ret; - ret = 0; + ret = (*resid == 0) ? 0 : ENOSPC; + } else { + ret = -ret; } - return -ret; + return ret; }
CVS commit: [netbsd-6] src/sys/arch/arm/arm
Module Name:src Committed By: riz Date: Mon Jan 7 16:42:51 UTC 2013 Modified Files: src/sys/arch/arm/arm [netbsd-6]: cpufunc.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #774): sys/arch/arm/arm/cpufunc.c: revision 1.119 Enable DCache Streaming Switch and Write Allocate. This change improve system performance significantly. To generate a diff of this commit: cvs rdiff -u -r1.104.2.1 -r1.104.2.2 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.104.2.1 src/sys/arch/arm/arm/cpufunc.c:1.104.2.2 --- src/sys/arch/arm/arm/cpufunc.c:1.104.2.1 Thu Aug 9 06:36:44 2012 +++ src/sys/arch/arm/arm/cpufunc.c Mon Jan 7 16:42:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.104.2.1 2012/08/09 06:36:44 jdc Exp $ */ +/* $NetBSD: cpufunc.c,v 1.104.2.2 2013/01/07 16:42:51 riz Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.104.2.1 2012/08/09 06:36:44 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.104.2.2 2013/01/07 16:42:51 riz Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -3352,6 +3352,7 @@ void sheeva_setup(char *args) { int cpuctrl, cpuctrlmask; + uint32_t sheeva_ext; cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE @@ -3369,6 +3370,15 @@ sheeva_setup(char *args) cpuctrl = parse_cpu_options(args, sheeva_options, cpuctrl); + /* Enable DCache Streaming Switch and Write Allocate */ + __asm volatile(mrc p15, 1, %0, c15, c1, 0 + : =r (sheeva_ext)); + + sheeva_ext |= FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN; + + __asm volatile(mcr p15, 1, %0, c15, c1, 0 + :: r (sheeva_ext)); + /* * Sheeva has L2 Cache. Enable/Disable it here. * Really not support yet...
CVS commit: [netbsd-6] src/sys/dev/marvell
Module Name:src Committed By: riz Date: Mon Jan 7 16:45:30 UTC 2013 Modified Files: src/sys/dev/marvell [netbsd-6]: if_mvgbe.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #775): sys/dev/marvell/if_mvgbe.c: revision 1.34 Fix a bug that a multicast filter entry is incorrectly overrode on some cases. To generate a diff of this commit: cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/dev/marvell/if_mvgbe.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/marvell/if_mvgbe.c diff -u src/sys/dev/marvell/if_mvgbe.c:1.16.2.2 src/sys/dev/marvell/if_mvgbe.c:1.16.2.3 --- src/sys/dev/marvell/if_mvgbe.c:1.16.2.2 Sat Jan 5 23:32:27 2013 +++ src/sys/dev/marvell/if_mvgbe.c Mon Jan 7 16:45:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.16.2.2 2013/01/05 23:32:27 riz Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.16.2.3 2013/01/07 16:45:30 riz Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.16.2.2 2013/01/05 23:32:27 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.16.2.3 2013/01/07 16:45:30 riz Exp $); #include sys/param.h #include sys/bus.h @@ -1966,11 +1966,11 @@ mvgbe_filter_setup(struct mvgbe_softc *s /* chip handles some IPv4 multicast specially */ if (memcmp(enm-enm_addrlo, special, 5) == 0) { i = enm-enm_addrlo[5]; - dfsmt[i2] = + dfsmt[i2] |= MVGBE_DF(i3, MVGBE_DF_QUEUE(0) | MVGBE_DF_PASS); } else { i = mvgbe_crc8(enm-enm_addrlo, ETHER_ADDR_LEN); - dfomt[i2] = + dfomt[i2] |= MVGBE_DF(i3, MVGBE_DF_QUEUE(0) | MVGBE_DF_PASS); }
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Mon Jan 7 16:51:08 UTC 2013 Modified Files: src/dist/pf/usr.sbin/ftp-proxy [netbsd-6]: npf.c src/lib/libnpf [netbsd-6]: npf.3 npf.c npf.h src/sys/net/npf [netbsd-6]: npf.h npf_ctl.c src/usr.sbin/npf/npfctl [netbsd-6]: npf.conf.5 npf_build.c npfctl.c Log Message: Pull up following revision(s) (requested by rmind in ticket #776): usr.sbin/npf/npfctl/npf.conf.5: revision 1.26 usr.sbin/npf/npfctl/npfctl.c: revision 1.26 dist/pf/usr.sbin/ftp-proxy/npf.c: revision 1.2 lib/libnpf/npf.c: revision 1.15 sys/net/npf/npf_ctl.c: revision 1.20 lib/libnpf/npf.h: revision 1.12 lib/libnpf/npf.3: revision 1.6 lib/libnpf/npf.3: revision 1.7 usr.sbin/npf/npfctl/npf_build.c: revision 1.17 sys/net/npf/npf.h: revision 1.24 - Add NPF version check in proplist as well, not only ioctl. Bump the version. - Fix a bug in table entry lookup. - Updates/fixes to the man pages. Misc. Remove a superfluous quote and fix a recurring typo. ftp-proxy: disable NPF bits for now; it will be re-done. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/dist/pf/usr.sbin/ftp-proxy/npf.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/lib/libnpf/npf.3 cvs rdiff -u -r1.7.2.7 -r1.7.2.8 src/lib/libnpf/npf.c cvs rdiff -u -r1.6.2.5 -r1.6.2.6 src/lib/libnpf/npf.h cvs rdiff -u -r1.14.2.9 -r1.14.2.10 src/sys/net/npf/npf.h cvs rdiff -u -r1.12.2.6 -r1.12.2.7 src/sys/net/npf/npf_ctl.c cvs rdiff -u -r1.9.2.6 -r1.9.2.7 src/usr.sbin/npf/npfctl/npf.conf.5 cvs rdiff -u -r1.4.2.9 -r1.4.2.10 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.10.2.10 -r1.10.2.11 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/usr.sbin/ftp-proxy/npf.c diff -u src/dist/pf/usr.sbin/ftp-proxy/npf.c:1.1 src/dist/pf/usr.sbin/ftp-proxy/npf.c:1.1.8.1 --- src/dist/pf/usr.sbin/ftp-proxy/npf.c:1.1 Wed Feb 2 02:20:26 2011 +++ src/dist/pf/usr.sbin/ftp-proxy/npf.c Mon Jan 7 16:51:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.1 2011/02/02 02:20:26 rmind Exp $ */ +/* $NetBSD: npf.c,v 1.1.8.1 2013/01/07 16:51:07 riz Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -311,6 +311,7 @@ npf_server_lookup(struct sockaddr *c, st static int npf_do_commit(void) { +#if 0 nl_rule_t *group; fp_ent_t *fpe; pri_t pri; @@ -327,6 +328,10 @@ npf_do_commit(void) npf_update_rule(npf_fd, NPF_FP_RULE_TAG, group); npf_rule_destroy(group); return 0; +#else + errno = ENOTSUP; + return -1; +#endif } static int Index: src/lib/libnpf/npf.3 diff -u src/lib/libnpf/npf.3:1.4.2.1 src/lib/libnpf/npf.3:1.4.2.2 --- src/lib/libnpf/npf.3:1.4.2.1 Thu Jul 5 17:48:44 2012 +++ src/lib/libnpf/npf.3 Mon Jan 7 16:51:08 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: npf.3,v 1.4.2.1 2012/07/05 17:48:44 riz Exp $ +.\ $NetBSD: npf.3,v 1.4.2.2 2013/01/07 16:51:08 riz Exp $ .\ .\ Copyright (c) 2011-2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd July 1, 2012 +.Dd December 23, 2012 .Dt NPF 3 .Os .Sh NAME @@ -77,20 +77,14 @@ .Ft nl_table_t * .Fn npf_table_create u_int id int type .Ft int -.Fn npf_table_add_entry nl_table_t *tl in_addr_t addr in_addr_t mask +.Fn npf_table_add_entry nl_table_t *tl int af \ +in_addr_t addr in_addr_t mask .Ft bool .Fn npf_table_exists_p nl_config_t *ncf u_int tid .Ft int .Fn npf_table_insert nl_config_t *ncf nl_table_t *tl .Ft void .Fn npf_table_destroy nl_table_t *tl -.\ --- -.Ft int -.Fn npf_update_rule int fd const char *rname nl_rule_t *rl -.Ft int -.Fn npf_sessions_send int fd const char *fpath -.Ft int -.Fn npf_sessions_recv int fd const char *fpath .\ - .Sh DESCRIPTION The @@ -236,7 +230,7 @@ is used. Translation address is specified by .Fa addr , and its family by -.Fa fa . +.Fa af . Family must be either .Dv AF_INET for IPv4 or @@ -261,13 +255,20 @@ Table is identified by which should be in the range between 1 and .Dv NPF_MAX_TABLE_ID . .El -.It Fn npf_table_add_entry tl addr mask -Add an entry of IPv4 address and mask, specified by +.It Fn npf_table_add_entry tl af addr mask +Add an entry of IP address and mask, specified by .Fa addr and .Fa mask , to the table specified by .Fa tl . +Family, specified by +.Fa af , +must be either +.Dv AF_INET +for IPv4 or +.Dv AF_INET6 +for IPv6 address. .It Fn npf_table_exists_p ncf name Determine whether table with ID .Fa tid @@ -285,19 +286,6 @@ Routine performs a check for duplicate t Destroy the specified table. .El .\ - -.Ss Session interface -.Bl -tag -width 4n -.It Fn npf_update_rule fd rname rl -.It Fn npf_sessions_send fd fpath -Read the file specified by -.Fa fpath , -and send sessions saved in it to the kernel. -.It Fn npf_sessions_recv
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: riz Date: Mon Jan 7 16:53:19 UTC 2013 Modified Files: src/sys/kern [netbsd-6]: uipc_syscalls.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #778): sys/kern/uipc_syscalls.c: revision 1.157 sys/kern/uipc_syscalls.c: revision 1.158 If an untraced process sleeps in recvmsg/sendmsg, the syscall does not allocate an iov structure for ktrace. When tracing is then enabled and the process wakes up, it crashes the kernel. Undo the last commit which introduced this error path. Avoid the mentioned kmem_alloc assertion by adding a sanity check analog to similar code in sys_generic.c for I/O on file handles instead of sockets. This also causes the syscall to return EMSGSIZE if the msg_iovlen member of the msg structure is less than or equal to 0, as defined in recvmsg(2)/sendmsg(2). The sanity check prevented messages that carry only ancillary data. To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.2 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.154.2.1 src/sys/kern/uipc_syscalls.c:1.154.2.2 --- src/sys/kern/uipc_syscalls.c:1.154.2.1 Fri Jul 20 23:10:06 2012 +++ src/sys/kern/uipc_syscalls.c Mon Jan 7 16:53:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.154.2.1 2012/07/20 23:10:06 riz Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.154.2.2 2013/01/07 16:53:18 riz Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.1 2012/07/20 23:10:06 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.2 2013/01/07 16:53:18 riz Exp $); #include opt_pipe.h @@ -640,10 +640,9 @@ do_sys_sendmsg(struct lwp *l, int s, str *retsize = len - auio.uio_resid; bad: - if (ktrpoint(KTR_GENIO)) { + if (ktriov != NULL) { ktrgeniov(s, UIO_WRITE, ktriov, *retsize, error); - if (ktriov != NULL) - kmem_free(ktriov, iovsz); + kmem_free(ktriov, iovsz); } if (iov != aiov) @@ -897,10 +896,9 @@ do_sys_recvmsg(struct lwp *l, int s, str /* Some data transferred */ error = 0; - if (ktrpoint(KTR_GENIO)) { + if (ktriov != NULL) { ktrgeniov(s, UIO_READ, ktriov, len, error); - if (ktriov != NULL) - kmem_free(ktriov, iovsz); + kmem_free(ktriov, iovsz); } if (error != 0) {
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: riz Date: Mon Jan 7 16:53:36 UTC 2013 Modified Files: src/sys/kern [netbsd-6-0]: uipc_syscalls.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #778): sys/kern/uipc_syscalls.c: revision 1.157 sys/kern/uipc_syscalls.c: revision 1.158 If an untraced process sleeps in recvmsg/sendmsg, the syscall does not allocate an iov structure for ktrace. When tracing is then enabled and the process wakes up, it crashes the kernel. Undo the last commit which introduced this error path. Avoid the mentioned kmem_alloc assertion by adding a sanity check analog to similar code in sys_generic.c for I/O on file handles instead of sockets. This also causes the syscall to return EMSGSIZE if the msg_iovlen member of the msg structure is less than or equal to 0, as defined in recvmsg(2)/sendmsg(2). The sanity check prevented messages that carry only ancillary data. To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.1.4.1 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.154.2.1 src/sys/kern/uipc_syscalls.c:1.154.2.1.4.1 --- src/sys/kern/uipc_syscalls.c:1.154.2.1 Fri Jul 20 23:10:06 2012 +++ src/sys/kern/uipc_syscalls.c Mon Jan 7 16:53:36 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.154.2.1 2012/07/20 23:10:06 riz Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.154.2.1.4.1 2013/01/07 16:53:36 riz Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.1 2012/07/20 23:10:06 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154.2.1.4.1 2013/01/07 16:53:36 riz Exp $); #include opt_pipe.h @@ -640,10 +640,9 @@ do_sys_sendmsg(struct lwp *l, int s, str *retsize = len - auio.uio_resid; bad: - if (ktrpoint(KTR_GENIO)) { + if (ktriov != NULL) { ktrgeniov(s, UIO_WRITE, ktriov, *retsize, error); - if (ktriov != NULL) - kmem_free(ktriov, iovsz); + kmem_free(ktriov, iovsz); } if (iov != aiov) @@ -897,10 +896,9 @@ do_sys_recvmsg(struct lwp *l, int s, str /* Some data transferred */ error = 0; - if (ktrpoint(KTR_GENIO)) { + if (ktriov != NULL) { ktrgeniov(s, UIO_READ, ktriov, len, error); - if (ktriov != NULL) - kmem_free(ktriov, iovsz); + kmem_free(ktriov, iovsz); } if (error != 0) {
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: riz Date: Mon Jan 7 16:54:21 UTC 2013 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.2 Log Message: Ticket 778. To generate a diff of this commit: cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-6.0.2 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.2 diff -u src/doc/CHANGES-6.0.2:1.1.2.3 src/doc/CHANGES-6.0.2:1.1.2.4 --- src/doc/CHANGES-6.0.2:1.1.2.3 Sat Jan 5 23:21:41 2013 +++ src/doc/CHANGES-6.0.2 Mon Jan 7 16:54:20 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.2,v 1.1.2.3 2013/01/05 23:21:41 riz Exp $ +# $NetBSD: CHANGES-6.0.2,v 1.1.2.4 2013/01/07 16:54:20 riz Exp $ A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2 release: @@ -19,3 +19,8 @@ sys/external/bsd/drm/dist/shared-core/i9 Avoid out-of-bounds access. [msaitoh, ticket #762] +sys/kern/uipc_syscalls.c 1.157-1.158 + + Prevent ktrace from being able to crash the kernel. + [mlelstv, ticket #778] +
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Mon Jan 7 16:54:54 UTC 2013 Modified Files: src/sys/kern: kern_resource.c Log Message: fix setrlimit(RLIMIT_STACK) for __MACHINE_STACK_GROWS_UP platforms. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/kern/kern_resource.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_resource.c diff -u src/sys/kern/kern_resource.c:1.171 src/sys/kern/kern_resource.c:1.172 --- src/sys/kern/kern_resource.c:1.171 Fri Dec 21 19:39:48 2012 +++ src/sys/kern/kern_resource.c Mon Jan 7 16:54:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_resource.c,v 1.171 2012/12/21 19:39:48 njoly Exp $ */ +/* $NetBSD: kern_resource.c,v 1.172 2013/01/07 16:54:54 chs Exp $ */ /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_resource.c,v 1.171 2012/12/21 19:39:48 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_resource.c,v 1.172 2013/01/07 16:54:54 chs Exp $); #include sys/param.h #include sys/systm.h @@ -409,20 +409,21 @@ dosetrlimit(struct lwp *l, struct proc * vaddr_t addr; vsize_t size; vm_prot_t prot; + char *base, *tmp; + base = p-p_vmspace-vm_minsaddr; if (limp-rlim_cur alimp-rlim_cur) { prot = VM_PROT_READ | VM_PROT_WRITE; size = limp-rlim_cur - alimp-rlim_cur; -addr = (vaddr_t)p-p_vmspace-vm_minsaddr - -limp-rlim_cur; +tmp = STACK_GROW(base, alimp-rlim_cur); } else { prot = VM_PROT_NONE; size = alimp-rlim_cur - limp-rlim_cur; -addr = (vaddr_t)p-p_vmspace-vm_minsaddr - - alimp-rlim_cur; +tmp = STACK_GROW(base, limp-rlim_cur); } + addr = (vaddr_t)STACK_ALLOC(tmp, size); (void) uvm_map_protect(p-p_vmspace-vm_map, - addr, addr+size, prot, false); + addr, addr + size, prot, false); } break;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Mon Jan 7 16:55:00 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Tickets 771,772,774-776,778. To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-6.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.1 diff -u src/doc/CHANGES-6.1:1.1.2.70 src/doc/CHANGES-6.1:1.1.2.71 --- src/doc/CHANGES-6.1:1.1.2.70 Mon Jan 7 04:16:05 2013 +++ src/doc/CHANGES-6.1 Mon Jan 7 16:54:59 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.70 2013/01/07 04:16:05 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.71 2013/01/07 16:54:59 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -7968,3 +7968,51 @@ usr.sbin/btdevctl/btdevctl.8 1.8 connections without authentication. PR#47286. [plunky, ticket #769] +doc/3RDPARTY 1.989, 1.991 via patch +external/ibm-public/postfix/dist/HISTORY patch +external/ibm-public/postfix/dist/makedefs patch +external/ibm-public/postfix/dist/src/global/dict_ldap.c patch +external/ibm-public/postfix/dist/src/global/mail_version.h patch +external/ibm-public/postfix/dist/src/oqmgr/qmgr_message.c patch +external/ibm-public/postfix/dist/src/postscreen/postscreen_access.c patch +external/ibm-public/postfix/dist/src/util/myaddrinfo.c patch +external/ibm-public/postfix/dist/src/util/sys_defs.h patch + + Update Postfix to version 2.8.13. + [tron, ticket #771] + +lib/librefuse/refuse.c1.96 + + Avoid protocol errors in case of a short write. PR#45129. + [tron, ticket #772] + +sys/arch/arm/arm/cpufunc.c 1.119 + + Enable DCache Streaming Switch and Write Allocate, improving + system performance. + [msaitoh, ticket #774] + +sys/dev/marvell/if_mvgbe.c 1.34 + + Fix a bug that a multicast filter entry is incorrectly overridden + in some cases. + [msaitoh, ticket #775] + +dist/pf/usr.sbin/ftp-proxy/npf.c 1.2 +lib/libnpf/npf.31.6-1.7 +lib/libnpf/npf.c1.15 +lib/libnpf/npf.h1.12 +sys/net/npf/npf.h1.24 +sys/net/npf/npf_ctl.c1.20 +usr.sbin/npf/npfctl/npf.conf.5 1.26 +usr.sbin/npf/npfctl/npf_build.c 1.17 +usr.sbin/npf/npfctl/npfctl.c 1.26 + + Various bug fixes and minor updates to NPF. + [rmind, ticket #776] + +sys/kern/uipc_syscalls.c 1.157-1.158 + + Prevent ktrace from being able to crash the kernel. + [mlelstv, ticket #778] +
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: chs Date: Mon Jan 7 16:57:28 UTC 2013 Modified Files: src/sys/arch/hppa/include: pmap.h vmparam.h Log Message: switch to __USE_TOPDOWN_VM. move the stack to the top of the user address space so that the available free space is more contiguous. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hppa/include/pmap.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/include/vmparam.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/hppa/include/pmap.h diff -u src/sys/arch/hppa/include/pmap.h:1.36 src/sys/arch/hppa/include/pmap.h:1.37 --- src/sys/arch/hppa/include/pmap.h:1.36 Fri Jan 6 20:55:28 2012 +++ src/sys/arch/hppa/include/pmap.h Mon Jan 7 16:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.36 2012/01/06 20:55:28 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.37 2013/01/07 16:57:28 chs Exp $ */ /* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */ @@ -118,13 +118,23 @@ static inline paddr_t hppa_unmap_poolpag * according to the parisc manual aliased va's should be * different by high 12 bits only. */ -#define PMAP_PREFER(o,h,s,td) do { \ - vaddr_t pmap_prefer_hint; \ - pmap_prefer_hint = (*(h) HPPA_PGAMASK) | ((o) HPPA_PGAOFF); \ - if (pmap_prefer_hint *(h)) \ - pmap_prefer_hint += HPPA_PGALIAS; \ - *(h) = pmap_prefer_hint; \ -} while(0) +#define PMAP_PREFER(o,h,s,td) pmap_prefer((o), (h), (td)) + +static inline void +pmap_prefer(vaddr_t fo, vaddr_t *va, int td) +{ + vaddr_t newva; + + newva = (*va HPPA_PGAMASK) | (fo HPPA_PGAOFF); + if (td) { + if (newva *va) + newva -= HPPA_PGALIAS; + } else { + if (newva *va) + newva += HPPA_PGALIAS; + } + *va = newva; +} #define pmap_sid2pid(s) (((s) + 1) 1) #define pmap_resident_count(pmap) ((pmap)-pm_stats.resident_count) Index: src/sys/arch/hppa/include/vmparam.h diff -u src/sys/arch/hppa/include/vmparam.h:1.19 src/sys/arch/hppa/include/vmparam.h:1.20 --- src/sys/arch/hppa/include/vmparam.h:1.19 Tue Nov 16 09:34:24 2010 +++ src/sys/arch/hppa/include/vmparam.h Mon Jan 7 16:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.19 2010/11/16 09:34:24 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.20 2013/01/07 16:57:28 chs Exp $ */ /* $OpenBSD: vmparam.h,v 1.33 2006/06/04 17:21:24 miod Exp $ */ @@ -28,6 +28,8 @@ #ifndef _HPPA_VMPARAM_H_ #define _HPPA_VMPARAM_H_ +#define __USE_TOPDOWN_VM + /* * Machine dependent constants for HP PA */ @@ -43,8 +45,8 @@ /* * USRSTACK is the bottom (start) of the user stack. */ -#define USRSTACK 0x7000 /* Start of user stack */ -#define SYSCALLGATE 0xC000 /* syscall gateway page */ +#define USRSTACK (VM_MAXUSER_ADDRESS - MAXSSIZ) /* Start of user stack */ +#define SYSCALLGATE 0xc000 /* syscall gateway page */ /* * Virtual memory related constants, all in bytes
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Mon Jan 7 16:58:09 UTC 2013 Modified Files: src/sys/arch/sun2/include: pmap.h vmparam.h src/sys/arch/sun2/sun2: pmap.c src/sys/arch/sun3/include: pmap3.h vmparam.h src/sys/arch/sun3/sun3: pmap.c Log Message: switch to __USE_TOPDOWN_VM. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sun2/include/pmap.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun2/include/vmparam.h cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sun2/sun2/pmap.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sun3/include/pmap3.h cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sun3/include/vmparam.h cvs rdiff -u -r1.167 -r1.168 src/sys/arch/sun3/sun3/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun2/include/pmap.h diff -u src/sys/arch/sun2/include/pmap.h:1.24 src/sys/arch/sun2/include/pmap.h:1.25 --- src/sys/arch/sun2/include/pmap.h:1.24 Fri Jun 3 17:03:52 2011 +++ src/sys/arch/sun2/include/pmap.h Mon Jan 7 16:58:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.24 2011/06/03 17:03:52 tsutsui Exp $ */ +/* $NetBSD: pmap.h,v 1.25 2013/01/07 16:58:08 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ int _pmap_fault(struct vm_map *, vaddr_t /* This lets us have some say in choosing VA locations. */ extern void pmap_prefer(vaddr_t, vaddr_t *); -#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap)) +#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap), (td)) /* This needs to be a macro for kern_sysctl.c */ extern segsz_t pmap_resident_pages(pmap_t); Index: src/sys/arch/sun2/include/vmparam.h diff -u src/sys/arch/sun2/include/vmparam.h:1.14 src/sys/arch/sun2/include/vmparam.h:1.15 --- src/sys/arch/sun2/include/vmparam.h:1.14 Sat Nov 6 15:42:49 2010 +++ src/sys/arch/sun2/include/vmparam.h Mon Jan 7 16:58:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.14 2010/11/06 15:42:49 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.15 2013/01/07 16:58:08 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -26,6 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#define __USE_TOPDOWN_VM + /* * Machine dependent constants for Sun2 * Index: src/sys/arch/sun2/sun2/pmap.c diff -u src/sys/arch/sun2/sun2/pmap.c:1.45 src/sys/arch/sun2/sun2/pmap.c:1.46 --- src/sys/arch/sun2/sun2/pmap.c:1.45 Tue Jan 31 22:47:08 2012 +++ src/sys/arch/sun2/sun2/pmap.c Mon Jan 7 16:58:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $ */ +/* $NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $); #include opt_ddb.h #include opt_pmap_debug.h @@ -3683,12 +3683,18 @@ pmap_zero_page(paddr_t pa) * (This will just seg-align mappings.) */ void -pmap_prefer(vaddr_t fo, vaddr_t *va) +pmap_prefer(vaddr_t fo, vaddr_t *va, int td) { long d; d = fo - *va; d = SEGOFSET; + if (d == 0) { + return; + } + if (td) { + *va -= SEGOFSET + 1; + } *va += d; } Index: src/sys/arch/sun3/include/pmap3.h diff -u src/sys/arch/sun3/include/pmap3.h:1.48 src/sys/arch/sun3/include/pmap3.h:1.49 --- src/sys/arch/sun3/include/pmap3.h:1.48 Fri Jun 3 17:03:52 2011 +++ src/sys/arch/sun3/include/pmap3.h Mon Jan 7 16:58:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap3.h,v 1.48 2011/06/03 17:03:52 tsutsui Exp $ */ +/* $NetBSD: pmap3.h,v 1.49 2013/01/07 16:58:09 chs Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -50,8 +50,8 @@ struct pmap { int _pmap_fault(struct vm_map *, vaddr_t, vm_prot_t); /* This lets us have some say in choosing VA locations. */ -extern void pmap_prefer(vaddr_t, vaddr_t *); -#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap)) +extern void pmap_prefer(vaddr_t, vaddr_t *, int); +#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap), (td)) /* This needs to be a macro for kern_sysctl.c */ extern segsz_t pmap_resident_pages(pmap_t); Index: src/sys/arch/sun3/include/vmparam.h diff -u src/sys/arch/sun3/include/vmparam.h:1.36 src/sys/arch/sun3/include/vmparam.h:1.37 --- src/sys/arch/sun3/include/vmparam.h:1.36 Sat Nov 6 15:42:49 2010 +++ src/sys/arch/sun3/include/vmparam.h Mon Jan 7 16:58:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.36 2010/11/06 15:42:49 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.37 2013/01/07 16:58:09 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -29,6 +29,8 @@ #ifndef _SUN3_VMPARAM_H_ #define _SUN3_VMPARAM_H_ 1 +#define __USE_TOPDOWN_VM + /* * We use 8K pages on both the sun3 and sun3x. Override PAGE_* * to be compile-time constants. Index: src/sys/arch/sun3/sun3/pmap.c diff -u
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: chs Date: Mon Jan 7 16:59:18 UTC 2013 Modified Files: src/sys/arch/sparc/include: pmap.h vmparam.h src/sys/arch/sparc/sparc: pmap.c Log Message: switch to __USE_TOPDOWN_VM. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc/include/pmap.h cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sparc/include/vmparam.h cvs rdiff -u -r1.349 -r1.350 src/sys/arch/sparc/sparc/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/include/pmap.h diff -u src/sys/arch/sparc/include/pmap.h:1.90 src/sys/arch/sparc/include/pmap.h:1.91 --- src/sys/arch/sparc/include/pmap.h:1.90 Mon Feb 14 10:22:19 2011 +++ src/sys/arch/sparc/include/pmap.h Mon Jan 7 16:59:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.90 2011/02/14 10:22:19 he Exp $ */ +/* $NetBSD: pmap.h,v 1.91 2013/01/07 16:59:18 chs Exp $ */ /* * Copyright (c) 1996 @@ -240,7 +240,7 @@ int pmap_dumpmmu(int (*)(dev_t, daddr_t, #define pmap_resident_count(pm) ((pm)-pm_stats.resident_count) #define pmap_wired_count(pm) ((pm)-pm_stats.wired_count) -#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap)) +#define PMAP_PREFER(fo, ap, sz, td) pmap_prefer((fo), (ap), (sz), (td)) #define PMAP_EXCLUDE_DECLS /* tells MI pmap.h *not* to include decls */ @@ -249,7 +249,7 @@ int pmap_dumpmmu(int (*)(dev_t, daddr_t, void pmap_activate(struct lwp *); void pmap_deactivate(struct lwp *); void pmap_bootstrap(int nmmu, int nctx, int nregion); -void pmap_prefer(vaddr_t, vaddr_t *); +void pmap_prefer(vaddr_t, vaddr_t *, size_t, int); int pmap_pa_exists(paddr_t); void pmap_unwire(pmap_t, vaddr_t); void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); Index: src/sys/arch/sparc/include/vmparam.h diff -u src/sys/arch/sparc/include/vmparam.h:1.42 src/sys/arch/sparc/include/vmparam.h:1.43 --- src/sys/arch/sparc/include/vmparam.h:1.42 Sun Nov 14 13:33:23 2010 +++ src/sys/arch/sparc/include/vmparam.h Mon Jan 7 16:59:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.42 2010/11/14 13:33:23 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.43 2013/01/07 16:59:18 chs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -43,6 +43,8 @@ #ifndef _SPARC_VMPARAM_H_ #define _SPARC_VMPARAM_H_ +#define __USE_TOPDOWN_VM + /* * Machine dependent constants for SPARC */ Index: src/sys/arch/sparc/sparc/pmap.c diff -u src/sys/arch/sparc/sparc/pmap.c:1.349 src/sys/arch/sparc/sparc/pmap.c:1.350 --- src/sys/arch/sparc/sparc/pmap.c:1.349 Sun Nov 4 00:32:47 2012 +++ src/sys/arch/sparc/sparc/pmap.c Mon Jan 7 16:59:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.350 2013/01/07 16:59:18 chs Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.350 2013/01/07 16:59:18 chs Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -7408,21 +7408,32 @@ kvm_iocache(char *va, int npages) * (This will just seg-align mappings.) */ void -pmap_prefer(vaddr_t foff, vaddr_t *vap) +pmap_prefer(vaddr_t foff, vaddr_t *vap, size_t size, int td) { vaddr_t va = *vap; - long d, m; - - if (VA_INHOLE(va)) - va = MMU_HOLE_END; + long m; m = CACHE_ALIAS_DIST; if (m == 0) /* m=0 = no cache aliasing */ return; - d = foff - va; - d = (m - 1); - *vap = va + d; + if (VA_INHOLE(va)) { + if (td) + va = MMU_HOLE_START - size; + else + va = MMU_HOLE_END; + } + + va = (va ~(m - 1)) | (foff (m - 1)); + + if (td) { + if (va *vap) + va -= m; + } else { + if (va *vap) + va += m; + } + *vap = va; } void
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: chs Date: Mon Jan 7 17:03:06 UTC 2013 Modified Files: src/sys/arch/amd64/include: segments.h Log Message: rearrange the LDT entries so that (32-bit) COMPAT_10 binaries work again. in long mode, call gates use two slots, so the first entry (a call gate) would overlap the second one (the 32-bit user code descriptor). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/segments.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/segments.h diff -u src/sys/arch/amd64/include/segments.h:1.23 src/sys/arch/amd64/include/segments.h:1.24 --- src/sys/arch/amd64/include/segments.h:1.23 Sat Jun 16 20:47:04 2012 +++ src/sys/arch/amd64/include/segments.h Mon Jan 7 17:03:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.23 2012/06/16 20:47:04 dsl Exp $ */ +/* $NetBSD: segments.h,v 1.24 2013/01/07 17:03:06 chs Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -374,12 +374,15 @@ void cpu_fsgs_reload(struct lwp *, int, * Strange order because of syscall/sysret insns */ #define LSYS5CALLS_SEL 0 /* iBCS system call gate */ -#define LUCODE32_SEL 8 /* 32 bit user code descriptor */ -#define LUDATA_SEL 16 /* User data descriptor */ -#define LUCODE_SEL 24 /* User code descriptor */ +/* 8 second half */ #define LSOL26CALLS_SEL 32 /* Solaris 2.6 system call gate */ -#define LUDATA32_SEL 56 /* 32 bit user data descriptor (needed?)*/ +/* 40 second half */ +#define LUCODE32_SEL 48 /* 32 bit user code descriptor */ +#define LUDATA_SEL 56 /* User data descriptor */ +#define LUCODE_SEL 64 /* User code descriptor */ +#define LUDATA32_SEL 72 /* 32 bit user data descriptor (needed?)*/ #define LBSDICALLS_SEL 128 /* BSDI system call gate */ +/* 136 second half */ #define LDT_SIZE 144
CVS commit: [netbsd-6] src/usr.sbin/npf/npfctl
Module Name:src Committed By: riz Date: Mon Jan 7 18:41:38 UTC 2013 Modified Files: src/usr.sbin/npf/npfctl [netbsd-6]: npfctl.c Log Message: Back out part of ticket #777 accidentally committed with ticket #776, to fix the netbsd-6 build. To generate a diff of this commit: cvs rdiff -u -r1.10.2.11 -r1.10.2.12 src/usr.sbin/npf/npfctl/npfctl.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.sbin/npf/npfctl/npfctl.c diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.10.2.11 src/usr.sbin/npf/npfctl/npfctl.c:1.10.2.12 --- src/usr.sbin/npf/npfctl/npfctl.c:1.10.2.11 Mon Jan 7 16:51:07 2013 +++ src/usr.sbin/npf/npfctl/npfctl.c Mon Jan 7 18:41:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npfctl.c,v 1.10.2.11 2013/01/07 16:51:07 riz Exp $ */ +/* $NetBSD: npfctl.c,v 1.10.2.12 2013/01/07 18:41:37 riz Exp $ */ /*- * Copyright (c) 2009-2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: npfctl.c,v 1.10.2.11 2013/01/07 16:51:07 riz Exp $); +__RCSID($NetBSD: npfctl.c,v 1.10.2.12 2013/01/07 18:41:37 riz Exp $); #include sys/ioctl.h #include sys/stat.h @@ -147,10 +147,6 @@ npfctl_print_stats(int fd) { NPF_STAT_NAT_CREATE, NAT entry allocations }, { NPF_STAT_NAT_DESTROY, NAT entry destructions}, - { -1, Network buffers }, - { NPF_STAT_NBUF_NONCONTIG, non-contiguous cases }, - { NPF_STAT_NBUF_CONTIG_FAIL, contig alloc failures }, - { -1, Invalid packet state cases }, { NPF_STAT_INVALID_STATE, cases in total }, { NPF_STAT_INVALID_STATE_TCP1, TCP case I },
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:15:32 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm2835_mbox.c bcm2835_mbox.h files.bcm2835 Log Message: allow for a single board specific device to attach to the mbox driver To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_mbox.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm2835_mbox.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/files.bcm2835 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/broadcom/bcm2835_mbox.c diff -u src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.2 src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.3 --- src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.2 Wed Aug 22 13:19:47 2012 +++ src/sys/arch/arm/broadcom/bcm2835_mbox.c Mon Jan 7 20:15:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_mbox.c,v 1.2 2012/08/22 13:19:47 jakllsch Exp $ */ +/* $NetBSD: bcm2835_mbox.c,v 1.3 2013/01/07 20:15:32 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox.c,v 1.2 2012/08/22 13:19:47 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox.c,v 1.3 2013/01/07 20:15:32 jmcneill Exp $); #include sys/param.h #include sys/systm.h @@ -46,9 +46,11 @@ __KERNEL_RCSID(0, $NetBSD: bcm2835_mbox struct bcm2835mbox_softc { device_t sc_dev; + device_t sc_platdev; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; + bus_dma_tag_t sc_dmat; }; static struct bcm2835mbox_softc *bcm2835mbox_sc; @@ -76,6 +78,7 @@ bcmmbox_attach(device_t parent, device_t { struct bcm2835mbox_softc *sc = device_private(self); struct amba_attach_args *aaa = aux; + struct bcmmbox_attach_args baa; aprint_naive(\n); aprint_normal(: VC mailbox\n); @@ -85,12 +88,16 @@ bcmmbox_attach(device_t parent, device_t sc-sc_dev = self; sc-sc_iot = aaa-aaa_iot; + sc-sc_dmat = aaa-aaa_dmat; if (bus_space_map(aaa-aaa_iot, aaa-aaa_addr, BCM2835_MBOX_SIZE, 0, sc-sc_ioh)) { aprint_error_dev(sc-sc_dev, unable to map device\n); return; } + + baa.baa_dmat = aaa-aaa_dmat; + sc-sc_platdev = config_found_ia(self, bcmmboxbus, baa, NULL); } void @@ -112,3 +119,52 @@ bcmmbox_write(uint8_t chan, uint32_t dat return bcm2835_mbox_write(sc-sc_iot, sc-sc_ioh, chan, data); } + +int +bcmmbox_request(uint8_t chan, void *buf, size_t buflen, uint32_t *pres) +{ + struct bcm2835mbox_softc *sc = bcm2835mbox_sc; + void *dma_buf; + bus_dmamap_t map; + bus_dma_segment_t segs[1]; + int nsegs; + int error; + + KASSERT(sc != NULL); + + error = bus_dmamem_alloc(sc-sc_dmat, buflen, 16, 0, segs, 1, + nsegs, BUS_DMA_WAITOK); + if (error) + return error; + error = bus_dmamem_map(sc-sc_dmat, segs, nsegs, buflen, dma_buf, + BUS_DMA_WAITOK); + if (error) + goto map_failed; + error = bus_dmamap_create(sc-sc_dmat, buflen, 1, buflen, 0, + BUS_DMA_WAITOK, map); + if (error) + goto create_failed; + error = bus_dmamap_load(sc-sc_dmat, map, dma_buf, buflen, NULL, + BUS_DMA_WAITOK); + if (error) + goto load_failed; + + memcpy(dma_buf, buf, buflen); + + bus_dmamap_sync(sc-sc_dmat, map, 0, buflen, BUS_DMASYNC_PREWRITE); + bcmmbox_write(chan, map-dm_segs[0].ds_addr); + bus_dmamap_sync(sc-sc_dmat, map, 0, buflen, BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(sc-sc_dmat, map, 0, buflen, BUS_DMASYNC_PREREAD); + bcmmbox_read(chan, pres); + + memcpy(buf, dma_buf, buflen); + + bus_dmamap_unload(sc-sc_dmat, map); +load_failed: + bus_dmamap_destroy(sc-sc_dmat, map); +create_failed: + bus_dmamem_unmap(sc-sc_dmat, dma_buf, buflen); +map_failed: + bus_dmamem_free(sc-sc_dmat, segs, nsegs); + return error; +} Index: src/sys/arch/arm/broadcom/bcm2835_mbox.h diff -u src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.3 src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.4 --- src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.3 Sat Oct 13 08:42:50 2012 +++ src/sys/arch/arm/broadcom/bcm2835_mbox.h Mon Jan 7 20:15:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_mbox.h,v 1.3 2012/10/13 08:42:50 skrll Exp $ */ +/* $NetBSD: bcm2835_mbox.h,v 1.4 2013/01/07 20:15:32 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -42,4 +42,10 @@ void bcm2835_mbox_write(bus_space_tag_t, void bcmmbox_read(uint8_t, uint32_t *); void bcmmbox_write(uint8_t, uint32_t); +int bcmmbox_request(uint8_t, void *, size_t, uint32_t *); + +struct bcmmbox_attach_args { + bus_dma_tag_t baa_dmat; +}; + #endif /* _BCM2835_MBOX_H_ */ Index: src/sys/arch/arm/broadcom/files.bcm2835 diff -u src/sys/arch/arm/broadcom/files.bcm2835:1.8 src/sys/arch/arm/broadcom/files.bcm2835:1.9 --- src/sys/arch/arm/broadcom/files.bcm2835:1.8 Sat Jan 5 20:31:23 2013 +++ src/sys/arch/arm/broadcom/files.bcm2835 Mon Jan 7 20:15:32 2013 @@ -1,10 +1,12 @@ -# $NetBSD: files.bcm2835,v 1.8 2013/01/05 20:31:23 jakllsch Exp $ +# $NetBSD:
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:18:28 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: vcprop.h Log Message: add some more vcprop definitions -- power, temperature, and voltage related To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/rpi/vcprop.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/evbarm/rpi/vcprop.h diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.2 src/sys/arch/evbarm/rpi/vcprop.h:1.3 --- src/sys/arch/evbarm/rpi/vcprop.h:1.2 Tue Oct 30 20:11:37 2012 +++ src/sys/arch/evbarm/rpi/vcprop.h Mon Jan 7 20:18:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vcprop.h,v 1.2 2012/10/30 20:11:37 skrll Exp $ */ +/* $NetBSD: vcprop.h,v 1.3 2013/01/07 20:18:28 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -48,11 +48,23 @@ struct vcprop_tag { #define VCPROPTAG_GET_VCMEMORY 0x00010006 #define VCPROPTAG_GET_CLOCKS 0x00010007 +#define VCPROPTAG_GET_POWERSTATE 0x00020001 +#define VCPROPTAG_GET_POWERTIMING 0x00020002 +#define VCPROPTAG_SET_POWERSTATE 0x00028001 + #define VCPROPTAG_GET_CLOCKSTATE 0x00030001 #define VCPROPTAG_SET_CLOCKSTATE 0x00038001 #define VCPROPTAG_GET_CLOCKRATE 0x00030002 #define VCPROPTAG_SET_CLOCKRATE 0x00038002 - + +#define VCPROPTAG_GET_VOLTAGE 0x00030003 +#define VCPROPTAG_SET_VOLTAGE 0x00038003 +#define VCPROPTAG_GET_MIN_VOLTAGE 0x00030008 +#define VCPROPTAG_GET_MAX_VOLTAGE 0x00030005 + +#define VCPROPTAG_GET_TEMPERATURE 0x00030006 +#define VCPROPTAG_GET_MAX_TEMPERATURE 0x0003000a + #define VCPROPTAG_GET_CMDLINE 0x00050001 #define VCPROPTAG_GET_DMACHAN 0x00060001 uint32_t vpt_len; @@ -100,7 +112,6 @@ struct vcprop_tag_boardserial { uint64_t sn; }; - #define VCPROP_CLK_EMMC 1 #define VCPROP_CLK_UART 2 #define VCPROP_CLK_ARM 3 @@ -146,6 +157,47 @@ struct vcprop_tag_clockrate { uint32_t rate; }; +#define VCPROP_VOLTAGE_CORE 1 +#define VCPROP_VOLTAGE_SDRAM_C 2 +#define VCPROP_VOLTAGE_SDRAM_P 3 +#define VCPROP_VOLTAGE_SDRAM_I 4 + +struct vcprop_tag_voltage { + struct vcprop_tag tag; + uint32_t id; + uint32_t value; +}; + +#define VCPROP_TEMP_SOC 0 + +struct vcprop_tag_temperature { + struct vcprop_tag tag; + uint32_t id; + uint32_t value; +}; + +#define VCPROP_POWER_SDCARD 0 +#define VCPROP_POWER_UART0 1 +#define VCPROP_POWER_UART1 2 +#define VCPROP_POWER_USB 3 +#define VCPROP_POWER_I2C0 4 +#define VCPROP_POWER_I2C1 5 +#define VCPROP_POWER_I2C2 6 +#define VCPROP_POWER_SPI 7 +#define VCPROP_POWER_CCP2TX 8 + +struct vcprop_tag_powertiming { + struct vcprop_tag tag; + uint32_t id; + uint32_t waitusec; +}; + +struct vcprop_tag_powerstate { + struct vcprop_tag tag; + uint32_t id; + uint32_t state; +}; + struct vcprop_buffer_hdr { uint32_t vpb_len; uint32_t vpb_rcode;
CVS commit: src/sys/arch/evbarm
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:19:33 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: files.rpi Added Files: src/sys/arch/evbarm/rpi: rpi_vcmbox.c Log Message: add support for rpi temperature sensor To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/files.rpi cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/rpi/rpi_vcmbox.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/conf/files.rpi diff -u src/sys/arch/evbarm/conf/files.rpi:1.2 src/sys/arch/evbarm/conf/files.rpi:1.3 --- src/sys/arch/evbarm/conf/files.rpi:1.2 Sat Sep 1 17:15:43 2012 +++ src/sys/arch/evbarm/conf/files.rpi Mon Jan 7 20:19:33 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files.rpi,v 1.2 2012/09/01 17:15:43 skrll Exp $ +# $NetBSD: files.rpi,v 1.3 2013/01/07 20:19:33 jmcneill Exp $ # # Raspberry Pi # @@ -15,3 +15,7 @@ defparam opt_machdep.hBOOT_ARGS # CPU support and integrated peripherals include arch/arm/broadcom/files.bcm2835 +# Raspberry Pi Mailbox interface +device vcmbox: sysmon_envsys +attach vcmbox at bcmmboxbus +file arch/evbarm/rpi/rpi_vcmbox.c vcmbox Added files: Index: src/sys/arch/evbarm/rpi/rpi_vcmbox.c diff -u /dev/null src/sys/arch/evbarm/rpi/rpi_vcmbox.c:1.1 --- /dev/null Mon Jan 7 20:19:33 2013 +++ src/sys/arch/evbarm/rpi/rpi_vcmbox.c Mon Jan 7 20:19:33 2013 @@ -0,0 +1,207 @@ +/* $NetBSD: rpi_vcmbox.c,v 1.1 2013/01/07 20:19:33 jmcneill Exp $ */ + +/*- + * Copyright (c) 2013 Jared D. McNeill jmcne...@invisible.ca + * All rights reserved. + * + * 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. + */ + +/* + * Raspberry Pi VC Mailbox Interface + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: rpi_vcmbox.c,v 1.1 2013/01/07 20:19:33 jmcneill Exp $); + +#include sys/param.h +#include sys/types.h +#include sys/systm.h +#include sys/device.h +#include sys/conf.h +#include sys/bus.h +#include sys/kmem.h + +#include dev/sysmon/sysmonvar.h + +#include arm/broadcom/bcm2835_mbox.h + +#include evbarm/rpi/vcio.h +#include evbarm/rpi/vcprop.h + +struct vcmbox_temp_request { + struct vcprop_buffer_hdr vb_hdr; + struct vcprop_tag_temperature vbt_temp; + struct vcprop_tag end; +} __packed; + +#define VCMBOX_INIT_REQUEST(req) \ + do {\ + memset((req), 0, sizeof((req))); \ + (req).vb_hdr.vpb_len = sizeof((req)); \ + (req).vb_hdr.vpb_rcode = VCPROP_PROCESS_REQUEST; \ + (req).end.vpt_tag = VCPROPTAG_NULL; \ + } while (0) +#define VCMBOX_INIT_TAG(s, t) \ + do {\ + (s).tag.vpt_tag = (t); \ + (s).tag.vpt_rcode = VCPROPTAG_REQUEST; \ + (s).tag.vpt_len = VCPROPTAG_LEN(s); \ + } while (0) + +struct vcmbox_softc { + device_t sc_dev; + + /* temperature sensor */ + struct sysmon_envsys *sc_sme; +#define VCMBOX_SENSOR_TEMP 0 +#define VCMBOX_NSENSORS 1 + envsys_data_t sc_sensor[VCMBOX_NSENSORS]; +}; + +static const char *vcmbox_sensor_name[VCMBOX_NSENSORS] = { + temperature, +}; + +static int vcmbox_sensor_id[VCMBOX_NSENSORS] = { + VCPROP_TEMP_SOC, +}; + +static int vcmbox_match(device_t, cfdata_t, void *); +static void vcmbox_attach(device_t, device_t, void *); + +static void vcmbox_create_sensors(struct vcmbox_softc *); +static int vcmbox_read_temp(struct vcmbox_softc *, uint32_t, int, + uint32_t *); +static void vcmbox_sensor_get_limits(struct sysmon_envsys *, + envsys_data_t *, + sysmon_envsys_lim_t *, uint32_t *); +static void vcmbox_sensor_refresh(struct sysmon_envsys *, + envsys_data_t *); + +CFATTACH_DECL_NEW(vcmbox, sizeof(struct vcmbox_softc), +vcmbox_match, vcmbox_attach, NULL, NULL); + +static int
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:20:22 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: RPI Log Message: add vcmbox driver To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/RPI 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/RPI diff -u src/sys/arch/evbarm/conf/RPI:1.12 src/sys/arch/evbarm/conf/RPI:1.13 --- src/sys/arch/evbarm/conf/RPI:1.12 Wed Dec 19 15:55:12 2012 +++ src/sys/arch/evbarm/conf/RPI Mon Jan 7 20:20:22 2013 @@ -1,5 +1,5 @@ # -# $NetBSD: RPI,v 1.12 2012/12/19 15:55:12 skrll Exp $ +# $NetBSD: RPI,v 1.13 2013/01/07 20:20:22 jmcneill Exp $ # # RPi -- Raspberry Pi # @@ -181,6 +181,7 @@ bcmicu0 at obio? # VC Mailbox bcmmbox0 at obio? +vcmbox0 at bcmmbox0 # PL011 uart plcom0 at obio?
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:42:24 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: pass cmdline.txt boot arguments to kernel To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/rpi/rpi_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/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.19 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.20 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.19 Wed Dec 19 15:49:47 2012 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Mon Jan 7 20:42:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.19 2012/12/19 15:49:47 skrll Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.20 2013/01/07 20:42:24 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.19 2012/12/19 15:49:47 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.20 2013/01/07 20:42:24 jmcneill Exp $); #include opt_evbarm_boardtype.h @@ -362,6 +362,8 @@ initarm(void *arg) md_root_setconf(memory_disk, sizeof memory_disk); #endif + if (vcprop_tag_success_p(vb.vbt_cmdline.tag)) + strlcpy(bootargs, vb.vbt_cmdline.cmdline, sizeof(bootargs)); boot_args = bootargs; parse_mi_bootargs(boot_args);
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 22:32:24 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: rpi_vcmbox.c vcprop.h Log Message: Add support for rpi cpu frequency scaling through machdep.cpu.frequency.* sysctls. The minimum and maximum supported frequencies are based on the arm_freq_min and arm_freq values in config.txt. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/rpi_vcmbox.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/rpi/vcprop.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/evbarm/rpi/rpi_vcmbox.c diff -u src/sys/arch/evbarm/rpi/rpi_vcmbox.c:1.1 src/sys/arch/evbarm/rpi/rpi_vcmbox.c:1.2 --- src/sys/arch/evbarm/rpi/rpi_vcmbox.c:1.1 Mon Jan 7 20:19:33 2013 +++ src/sys/arch/evbarm/rpi/rpi_vcmbox.c Mon Jan 7 22:32:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_vcmbox.c,v 1.1 2013/01/07 20:19:33 jmcneill Exp $ */ +/* $NetBSD: rpi_vcmbox.c,v 1.2 2013/01/07 22:32:24 jmcneill Exp $ */ /*- * Copyright (c) 2013 Jared D. McNeill jmcne...@invisible.ca @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_vcmbox.c,v 1.1 2013/01/07 20:19:33 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_vcmbox.c,v 1.2 2013/01/07 22:32:24 jmcneill Exp $); #include sys/param.h #include sys/types.h @@ -40,6 +40,7 @@ __KERNEL_RCSID(0, $NetBSD: rpi_vcmbox.c #include sys/conf.h #include sys/bus.h #include sys/kmem.h +#include sys/sysctl.h #include dev/sysmon/sysmonvar.h @@ -54,6 +55,15 @@ struct vcmbox_temp_request { struct vcprop_tag end; } __packed; +struct vcmbox_clockrate_request { + struct vcprop_buffer_hdr vb_hdr; + struct vcprop_tag_clockrate vbt_clockrate; + struct vcprop_tag end; +} __packed; + +#define RATE2MHZ(rate) ((rate) / 100) +#define MHZ2RATE(mhz) ((mhz) * 100) + #define VCMBOX_INIT_REQUEST(req) \ do {\ memset((req), 0, sizeof((req))); \ @@ -76,6 +86,15 @@ struct vcmbox_softc { #define VCMBOX_SENSOR_TEMP 0 #define VCMBOX_NSENSORS 1 envsys_data_t sc_sensor[VCMBOX_NSENSORS]; + + /* cpu frequency scaling */ + struct sysctllog *sc_log; + uint32_t sc_cpu_minrate; + uint32_t sc_cpu_maxrate; + int sc_node_target; + int sc_node_current; + int sc_node_min; + int sc_node_max; }; static const char *vcmbox_sensor_name[VCMBOX_NSENSORS] = { @@ -89,9 +108,17 @@ static int vcmbox_sensor_id[VCMBOX_NSENS static int vcmbox_match(device_t, cfdata_t, void *); static void vcmbox_attach(device_t, device_t, void *); -static void vcmbox_create_sensors(struct vcmbox_softc *); static int vcmbox_read_temp(struct vcmbox_softc *, uint32_t, int, uint32_t *); +static int vcmbox_read_clockrate(struct vcmbox_softc *, uint32_t, int, + uint32_t *); +static int vcmbox_write_clockrate(struct vcmbox_softc *, uint32_t, int, + uint32_t); + +static int vcmbox_cpufreq_init(struct vcmbox_softc *); +static int vcmbox_cpufreq_sysctl_helper(SYSCTLFN_PROTO); + +static void vcmbox_create_sensors(struct vcmbox_softc *); static void vcmbox_sensor_get_limits(struct sysmon_envsys *, envsys_data_t *, sysmon_envsys_lim_t *, uint32_t *); @@ -117,6 +144,8 @@ vcmbox_attach(device_t parent, device_t aprint_naive(\n); aprint_normal(\n); + vcmbox_cpufreq_init(sc); + sc-sc_sme = sysmon_envsys_create(); sc-sc_sme-sme_cookie = sc; sc-sc_sme-sme_name = device_xname(sc-sc_dev); @@ -126,28 +155,6 @@ vcmbox_attach(device_t parent, device_t sysmon_envsys_register(sc-sc_sme); } -static void -vcmbox_create_sensors(struct vcmbox_softc *sc) -{ - uint32_t val; - - sc-sc_sensor[VCMBOX_SENSOR_TEMP].sensor = VCMBOX_SENSOR_TEMP; - sc-sc_sensor[VCMBOX_SENSOR_TEMP].units = ENVSYS_STEMP; - sc-sc_sensor[VCMBOX_SENSOR_TEMP].state = ENVSYS_SINVALID; - sc-sc_sensor[VCMBOX_SENSOR_TEMP].flags = ENVSYS_FHAS_ENTROPY; - strlcpy(sc-sc_sensor[VCMBOX_SENSOR_TEMP].desc, - vcmbox_sensor_name[VCMBOX_SENSOR_TEMP], - sizeof(sc-sc_sensor[VCMBOX_SENSOR_TEMP].desc)); - if (vcmbox_read_temp(sc, VCPROPTAG_GET_MAX_TEMPERATURE, - vcmbox_sensor_id[VCMBOX_SENSOR_TEMP], val) == 0) { - sc-sc_sensor[VCMBOX_SENSOR_TEMP].value_max = - val * 1000 + 27315; - sc-sc_sensor[VCMBOX_SENSOR_TEMP].flags |= ENVSYS_FVALID_MAX; - } - sysmon_envsys_sensor_attach(sc-sc_sme, - sc-sc_sensor[VCMBOX_SENSOR_TEMP]); -} - static int vcmbox_read_temp(struct vcmbox_softc *sc, uint32_t tag, int id, uint32_t *val) { @@ -170,6 +177,198 @@ vcmbox_read_temp(struct vcmbox_softc *sc return 0; } +static int +vcmbox_read_clockrate(struct vcmbox_softc *sc, uint32_t tag, int id, +uint32_t *val) +{ + struct vcmbox_clockrate_request vb; + uint32_t res; + int error; + + VCMBOX_INIT_REQUEST(vb); + VCMBOX_INIT_TAG(vb.vbt_clockrate, tag); + vb.vbt_clockrate.id = id; + error = bcmmbox_request(BCMMBOX_CHANARM2VC, vb, sizeof(vb), res); + if (error) + return error; + if
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: dsl Date: Mon Jan 7 23:20:42 UTC 2013 Modified Files: src/usr.sbin/cpuctl/arch: cpuctl_i386.h i386-asm.S i386.c x86_64-asm.S Log Message: Add support for the xsave related data from cpuid 8.n. Reorder the output so that the 'brand' string - which actually identifies the cpu is output first. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/cpuctl/arch/cpuctl_i386.h cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/cpuctl/arch/i386-asm.S cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/cpuctl/arch/i386.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/cpuctl/arch/x86_64-asm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/cpuctl_i386.h diff -u src/usr.sbin/cpuctl/arch/cpuctl_i386.h:1.1 src/usr.sbin/cpuctl/arch/cpuctl_i386.h:1.2 --- src/usr.sbin/cpuctl/arch/cpuctl_i386.h:1.1 Sat Jan 5 15:27:45 2013 +++ src/usr.sbin/cpuctl/arch/cpuctl_i386.h Mon Jan 7 23:20:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuctl_i386.h,v 1.1 2013/01/05 15:27:45 dsl Exp $ */ +/* $NetBSD: cpuctl_i386.h,v 1.2 2013/01/07 23:20:42 dsl Exp $ */ /* Interfaces to code in i386-asm.S */ @@ -6,3 +6,4 @@ void x86_cpuid2(uint32_t, uint32_t, uint32_t *); uint32_t x86_identify(void); +uint32_t x86_xgetbv(void); Index: src/usr.sbin/cpuctl/arch/i386-asm.S diff -u src/usr.sbin/cpuctl/arch/i386-asm.S:1.2 src/usr.sbin/cpuctl/arch/i386-asm.S:1.3 --- src/usr.sbin/cpuctl/arch/i386-asm.S:1.2 Sat Jan 5 15:27:45 2013 +++ src/usr.sbin/cpuctl/arch/i386-asm.S Mon Jan 7 23:20:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: i386-asm.S,v 1.2 2013/01/05 15:27:45 dsl Exp $ */ +/* $NetBSD: i386-asm.S,v 1.3 2013/01/07 23:20:42 dsl Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2006, 2007 The NetBSD Foundation, Inc. @@ -48,6 +48,11 @@ ENTRY(x86_cpuid2) ret END(x86_cpuid2) +ENTRY(x86_xgetbv) + xgetbv + ret +END(x86_xgetbv) + ENTRY(x86_identify) /* Try to toggle alignment check flag; does not exist on 386. */ pushfl Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.37 src/usr.sbin/cpuctl/arch/i386.c:1.38 --- src/usr.sbin/cpuctl/arch/i386.c:1.37 Sun Jan 6 23:17:35 2013 +++ src/usr.sbin/cpuctl/arch/i386.c Mon Jan 7 23:20:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.37 2013/01/06 23:17:35 dsl Exp $ */ +/* $NetBSD: i386.c,v 1.38 2013/01/07 23:20:42 dsl Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: i386.c,v 1.37 2013/01/06 23:17:35 dsl Exp $); +__RCSID($NetBSD: i386.c,v 1.38 2013/01/07 23:20:42 dsl Exp $); #endif /* not lint */ #include sys/types.h @@ -97,12 +97,14 @@ struct cpu_info { uint32_t ci_signature; /* X86 cpuid type */ uint32_t ci_family; /* from ci_signature */ uint32_t ci_model; /* from ci_signature */ - uint32_t ci_feat_val[5]; /* X86 CPUID feature bits + uint32_t ci_feat_val[8]; /* X86 CPUID feature bits * [0] basic features %edx * [1] basic features %ecx * [2] extended features %edx * [3] extended features %ecx * [4] VIA padlock features + * [5] XCR0 bits (d:0 %eax) + * [6] xsave flags (d:1 %eax) */ uint32_t ci_cpu_class; /* CPU class */ uint32_t ci_brand_id; /* Intel brand id */ @@ -113,6 +115,10 @@ struct cpu_info { uint8_t ci_coreid; uint8_t ci_smtid; uint32_t ci_initapicid; + + uint32_t ci_cur_xsave; + uint32_t ci_max_xsave; + struct x86_cache_info ci_cinfo[CAI_COUNT]; void (*ci_info)(struct cpu_info *); }; @@ -204,11 +210,6 @@ static void amd_family5_setup(struct cpu static void powernow_probe(struct cpu_info *); /* - * Info for CTL_HW - */ -static char cpu_model[120]; - -/* * Note: these are just the ones that may not have a cpuid instruction. * We deal with the rest in a different way. */ @@ -999,6 +1000,19 @@ cpu_probe_base_features(struct cpu_info ci-ci_cpu_serial[2] = descs[2]; ci-ci_cpu_serial[1] = descs[3]; } + + if (ci-ci_cpuid_level 0xd) + return; + + /* Get support XRC0 bits */ + x86_cpuid2(0xd, 0, descs); + ci-ci_feat_val[5] = descs[0]; /* Actually 64 bits */ + ci-ci_cur_xsave = descs[1]; + ci-ci_max_xsave = descs[2]; + + /* Additional flags (eg xsaveopt support) */ + x86_cpuid2(0xd, 1, descs); + ci-ci_feat_val[6] = descs[0]; /* Actually 64 bits */ } static void @@ -1159,6 +1173,26 @@ transmeta_cpu_info(struct cpu_info *ci) } } +static void +print_bits(const char *cpuname, const char *hdr, const char *fmt, uint32_t val) +{ + char buf[32 * 16]; + char *bp; + +#define MAX_LINE_LEN 79 /* get from command arg or 'stty cols' ? */ + + if (val == 0 || fmt == NULL) + return; + + snprintb_m(buf, sizeof(buf), fmt, val, + MAX_LINE_LEN - strlen(cpuname) - 2 - strlen(hdr) - 1); + bp = buf; + while (*bp != '\0') { + aprint_verbose(%s: %s %s\n, cpuname, hdr, bp); + bp +=
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Mon Jan 7 23:24:28 UTC 2013 Modified Files: src/sys/dev/pci: radeonfb.c Log Message: add PCI_PRODUCT_ATI_RADEON_RV370_5B63 - confirmed working by Dieter Roelants To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/radeonfb.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/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.73 src/sys/dev/pci/radeonfb.c:1.74 --- src/sys/dev/pci/radeonfb.c:1.73 Tue Jan 1 12:13:28 2013 +++ src/sys/dev/pci/radeonfb.c Mon Jan 7 23:24:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.73 2013/01/01 12:13:28 macallan Exp $ */ +/* $NetBSD: radeonfb.c,v 1.74 2013/01/07 23:24:28 macallan Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.73 2013/01/01 12:13:28 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.74 2013/01/07 23:24:28 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -353,6 +353,7 @@ static struct { { PCI_PRODUCT_ATI_RADEON_RV370_5460, RADEON_RV380, RFB_MOB }, { PCI_PRODUCT_ATI_RADEON_RV370_5464, RADEON_RV380, RFB_MOB }, { PCI_PRODUCT_ATI_RADEON_RV370_5B60, RADEON_RV380, 0 }, + { PCI_PRODUCT_ATI_RADEON_RV370_5B63, RADEON_RV380, 0 }, { PCI_PRODUCT_ATI_RADEON_RV370_5B64, RADEON_RV380, 0 }, { PCI_PRODUCT_ATI_RADEON_RV370_5B65, RADEON_RV380, 0 },
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dsl Date: Mon Jan 7 23:40:53 UTC 2013 Modified Files: src/sys/arch/alpha/include: param.h Log Message: Only include machine/cpu.h if _KERNEL is defined. Fixes alpha userspace build (esp. pstat). NFI why it worked before at all. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/include/param.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/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.41 src/sys/arch/alpha/include/param.h:1.42 --- src/sys/arch/alpha/include/param.h:1.41 Fri Feb 10 17:35:50 2012 +++ src/sys/arch/alpha/include/param.h Mon Jan 7 23:40:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.41 2012/02/10 17:35:50 para Exp $ */ +/* $NetBSD: param.h,v 1.42 2013/01/07 23:40:52 dsl Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -47,7 +47,9 @@ #define MACHINE_ARCH alpha #define MID_MACHINE MID_ALPHA +#ifdef _KERNEL #include machine/cpu.h +#endif #define NBPG (1 ALPHA_PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte off. into pg */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 8 06:47:46 UTC 2013 Modified Files: src/sys/dev/usb: usb.c Log Message: Improve a comment slightly To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/sys/dev/usb/usb.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.138 src/sys/dev/usb/usb.c:1.139 --- src/sys/dev/usb/usb.c:1.138 Sat Jan 5 23:34:19 2013 +++ src/sys/dev/usb/usb.c Tue Jan 8 06:47:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.138 2013/01/05 23:34:19 christos Exp $ */ +/* $NetBSD: usb.c,v 1.139 2013/01/08 06:47:45 skrll Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usb.c,v 1.138 2013/01/05 23:34:19 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: usb.c,v 1.139 2013/01/08 06:47:45 skrll Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -226,8 +226,8 @@ usb_once_init(void) TAILQ_INIT(taskq-tasks); /* - * Since USB tasks are callable from any context, we have to - * make this lock a spinlock. + * Since USB task methods usb_{add,rem}_task are callable + * from any context, we have to make this lock a spinlock. */ mutex_init(taskq-lock, MUTEX_DEFAULT, IPL_USB); cv_init(taskq-cv, usbtsk);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 8 06:50:07 UTC 2013 Modified Files: src/sys/dev/usb: usbdivar.h Log Message: Fix the IPL level of the HC lock in a comment. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/usb/usbdivar.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/usbdivar.h diff -u src/sys/dev/usb/usbdivar.h:1.99 src/sys/dev/usb/usbdivar.h:1.100 --- src/sys/dev/usb/usbdivar.h:1.99 Sat Aug 11 21:54:18 2012 +++ src/sys/dev/usb/usbdivar.h Tue Jan 8 06:50:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdivar.h,v 1.99 2012/08/11 21:54:18 mrg Exp $ */ +/* $NetBSD: usbdivar.h,v 1.100 2013/01/08 06:50:07 skrll Exp $ */ /* * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ /* * Discussion about locking in the USB code: * - * The host controller presents one lock at IPL_SCHED. + * The host controller presents one lock at IPL_SOFTUSB. * * List of hardware interface methods, and whether the lock is held * when each is called by this module:
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Tue Jan 8 07:07:34 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: arm/arm/cpufunc.c rev. 1.119 is only for Sheeva CPU, so modify message a bit. To generate a diff of this commit: cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-6.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.1 diff -u src/doc/CHANGES-6.1:1.1.2.71 src/doc/CHANGES-6.1:1.1.2.72 --- src/doc/CHANGES-6.1:1.1.2.71 Mon Jan 7 16:54:59 2013 +++ src/doc/CHANGES-6.1 Tue Jan 8 07:07:33 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.71 2013/01/07 16:54:59 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.72 2013/01/08 07:07:33 msaitoh Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -7988,8 +7988,8 @@ lib/librefuse/refuse.c1.96 sys/arch/arm/arm/cpufunc.c 1.119 - Enable DCache Streaming Switch and Write Allocate, improving - system performance. + Enable DCache Streaming Switch and Write Allocate for Sheeva CPU, + improving system performance. [msaitoh, ticket #774] sys/dev/marvell/if_mvgbe.c 1.34
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: jmcneill Date: Mon Jan 7 13:23:46 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm2835_emmc.c Log Message: emmc supports 1k block size, so set SDHC_MAX_BLK_LEN_1024 in host caps To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm2835_emmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: prlw1 Date: Mon Jan 7 15:07:41 UTC 2013 Modified Files: src/sys/dev: video.c src/sys/dev/usb: ehci.c usb_mem.c usb_mem.h Log Message: Allow USB memory allocation by multiple segments in scatter/gather lists rather than in a single contiguous block which causes problems with large USB video frames. Based on a patch by Jeremy Morse in the thread http://mail-index.netbsd.org/current-users/2011/01/26/msg015532.html Tested by developing http://code.opencv.org/issues/2360 OK jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/video.c cvs rdiff -u -r1.196 -r1.197 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/usb_mem.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/usb_mem.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Mon Jan 7 15:14:17 UTC 2013 Modified Files: src/sys/dev/usb: usb.h Log Message: more debug flags. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/dev/usb/usb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Mon Jan 7 15:41:57 UTC 2013 Modified Files: src/doc [netbsd-6]: 3RDPARTY src/external/ibm-public/postfix/dist [netbsd-6]: HISTORY makedefs src/external/ibm-public/postfix/dist/src/global [netbsd-6]: dict_ldap.c mail_version.h src/external/ibm-public/postfix/dist/src/oqmgr [netbsd-6]: qmgr_message.c src/external/ibm-public/postfix/dist/src/postscreen [netbsd-6]: postscreen_access.c src/external/ibm-public/postfix/dist/src/util [netbsd-6]: myaddrinfo.c sys_defs.h Log Message: doc/3RDPARTY1.989, 1.991 via patch external/ibm-public/postfix/dist/HISTORYpatch external/ibm-public/postfix/dist/makedefs patch external/ibm-public/postfix/dist/src/global/dict_ldap.c patch external/ibm-public/postfix/dist/src/global/mail_version.h patch external/ibm-public/postfix/dist/src/oqmgr/qmgr_message.c patch external/ibm-public/postfix/dist/src/postscreen/postscreen_access.c patch external/ibm-public/postfix/dist/src/util/myaddrinfo.c patch external/ibm-public/postfix/dist/src/util/sys_defs.hpatch Update Postfix to version 2.8.13. Changes since version 2.8.12: - The postscreen_access_list feature failed to ignore case in the first character of a command (e.g., permit, reject, etc.). Reported by Francis Picabia. (This fix is incorrectly listed in the HISTORY files of earlier releases, and will be removed with a future patch.) - Strip the datalink suffix (e.g., %eth0) from IPv6 addresses returned by the system getaddrinfo() routine. Such suffixes break the default mynetworks value, the Postfix SMTP server's reverse/forward DNS name/address mapping check, and possibly more. - To eliminate the possibility of collisions with connection cache lookup keys, the Postfix LDAP client now computes those lookup keys by joining the number-valued connection properties with ASCII null, just like it already did with the string-valued connection properties. - There was a memory leak during one-time TLS library initialization (introduced with Postfix 2.5). Reported by Coverity. - There was a memory leak in the unused oqmgr(8) program (introduced with Postfix 2.3). Reported by Coverity. [tron, ticket #771] To generate a diff of this commit: cvs rdiff -u -r1.909.2.17 -r1.909.2.18 src/doc/3RDPARTY cvs rdiff -u -r1.1.1.12.2.3 -r1.1.1.12.2.4 \ src/external/ibm-public/postfix/dist/HISTORY cvs rdiff -u -r1.5 -r1.5.2.1 src/external/ibm-public/postfix/dist/makedefs cvs rdiff -u -r1.1.1.3.6.1 -r1.1.1.3.6.2 \ src/external/ibm-public/postfix/dist/src/global/dict_ldap.c cvs rdiff -u -r1.1.1.12.2.3 -r1.1.1.12.2.4 \ src/external/ibm-public/postfix/dist/src/global/mail_version.h cvs rdiff -u -r1.1.1.3 -r1.1.1.3.6.1 \ src/external/ibm-public/postfix/dist/src/oqmgr/qmgr_message.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 \ src/external/ibm-public/postfix/dist/src/postscreen/postscreen_access.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.6.1 \ src/external/ibm-public/postfix/dist/src/util/myaddrinfo.c cvs rdiff -u -r1.3 -r1.3.2.1 \ src/external/ibm-public/postfix/dist/src/util/sys_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/lib/librefuse
Module Name:src Committed By: riz Date: Mon Jan 7 15:54:01 UTC 2013 Modified Files: src/lib/librefuse [netbsd-6]: refuse.c Log Message: Pull up following revision(s) (requested by tron in ticket #772): lib/librefuse/refuse.c: revision 1.96 FUSE seems to allow short writes without errors but PUFFS doesn't. Work around this by returning ENOSPC in case of a short write to avoid protocol errors. This change is based on problem analysis provided by Antti Kantee. This fixes PR lib/45129 by myself. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.2.1 src/lib/librefuse/refuse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/sys/arch/arm/arm
Module Name:src Committed By: riz Date: Mon Jan 7 16:42:51 UTC 2013 Modified Files: src/sys/arch/arm/arm [netbsd-6]: cpufunc.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #774): sys/arch/arm/arm/cpufunc.c: revision 1.119 Enable DCache Streaming Switch and Write Allocate. This change improve system performance significantly. To generate a diff of this commit: cvs rdiff -u -r1.104.2.1 -r1.104.2.2 src/sys/arch/arm/arm/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/sys/dev/marvell
Module Name:src Committed By: riz Date: Mon Jan 7 16:45:30 UTC 2013 Modified Files: src/sys/dev/marvell [netbsd-6]: if_mvgbe.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #775): sys/dev/marvell/if_mvgbe.c: revision 1.34 Fix a bug that a multicast filter entry is incorrectly overrode on some cases. To generate a diff of this commit: cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/dev/marvell/if_mvgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Mon Jan 7 16:51:08 UTC 2013 Modified Files: src/dist/pf/usr.sbin/ftp-proxy [netbsd-6]: npf.c src/lib/libnpf [netbsd-6]: npf.3 npf.c npf.h src/sys/net/npf [netbsd-6]: npf.h npf_ctl.c src/usr.sbin/npf/npfctl [netbsd-6]: npf.conf.5 npf_build.c npfctl.c Log Message: Pull up following revision(s) (requested by rmind in ticket #776): usr.sbin/npf/npfctl/npf.conf.5: revision 1.26 usr.sbin/npf/npfctl/npfctl.c: revision 1.26 dist/pf/usr.sbin/ftp-proxy/npf.c: revision 1.2 lib/libnpf/npf.c: revision 1.15 sys/net/npf/npf_ctl.c: revision 1.20 lib/libnpf/npf.h: revision 1.12 lib/libnpf/npf.3: revision 1.6 lib/libnpf/npf.3: revision 1.7 usr.sbin/npf/npfctl/npf_build.c: revision 1.17 sys/net/npf/npf.h: revision 1.24 - Add NPF version check in proplist as well, not only ioctl. Bump the version. - Fix a bug in table entry lookup. - Updates/fixes to the man pages. Misc. Remove a superfluous quote and fix a recurring typo. ftp-proxy: disable NPF bits for now; it will be re-done. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/dist/pf/usr.sbin/ftp-proxy/npf.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/lib/libnpf/npf.3 cvs rdiff -u -r1.7.2.7 -r1.7.2.8 src/lib/libnpf/npf.c cvs rdiff -u -r1.6.2.5 -r1.6.2.6 src/lib/libnpf/npf.h cvs rdiff -u -r1.14.2.9 -r1.14.2.10 src/sys/net/npf/npf.h cvs rdiff -u -r1.12.2.6 -r1.12.2.7 src/sys/net/npf/npf_ctl.c cvs rdiff -u -r1.9.2.6 -r1.9.2.7 src/usr.sbin/npf/npfctl/npf.conf.5 cvs rdiff -u -r1.4.2.9 -r1.4.2.10 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.10.2.10 -r1.10.2.11 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: riz Date: Mon Jan 7 16:53:19 UTC 2013 Modified Files: src/sys/kern [netbsd-6]: uipc_syscalls.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #778): sys/kern/uipc_syscalls.c: revision 1.157 sys/kern/uipc_syscalls.c: revision 1.158 If an untraced process sleeps in recvmsg/sendmsg, the syscall does not allocate an iov structure for ktrace. When tracing is then enabled and the process wakes up, it crashes the kernel. Undo the last commit which introduced this error path. Avoid the mentioned kmem_alloc assertion by adding a sanity check analog to similar code in sys_generic.c for I/O on file handles instead of sockets. This also causes the syscall to return EMSGSIZE if the msg_iovlen member of the msg structure is less than or equal to 0, as defined in recvmsg(2)/sendmsg(2). The sanity check prevented messages that carry only ancillary data. To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.2 src/sys/kern/uipc_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: riz Date: Mon Jan 7 16:53:36 UTC 2013 Modified Files: src/sys/kern [netbsd-6-0]: uipc_syscalls.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #778): sys/kern/uipc_syscalls.c: revision 1.157 sys/kern/uipc_syscalls.c: revision 1.158 If an untraced process sleeps in recvmsg/sendmsg, the syscall does not allocate an iov structure for ktrace. When tracing is then enabled and the process wakes up, it crashes the kernel. Undo the last commit which introduced this error path. Avoid the mentioned kmem_alloc assertion by adding a sanity check analog to similar code in sys_generic.c for I/O on file handles instead of sockets. This also causes the syscall to return EMSGSIZE if the msg_iovlen member of the msg structure is less than or equal to 0, as defined in recvmsg(2)/sendmsg(2). The sanity check prevented messages that carry only ancillary data. To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.1.4.1 src/sys/kern/uipc_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: riz Date: Mon Jan 7 16:54:21 UTC 2013 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.2 Log Message: Ticket 778. To generate a diff of this commit: cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-6.0.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Mon Jan 7 16:54:54 UTC 2013 Modified Files: src/sys/kern: kern_resource.c Log Message: fix setrlimit(RLIMIT_STACK) for __MACHINE_STACK_GROWS_UP platforms. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/kern/kern_resource.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Mon Jan 7 16:55:00 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Tickets 771,772,774-776,778. To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-6.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: chs Date: Mon Jan 7 16:57:28 UTC 2013 Modified Files: src/sys/arch/hppa/include: pmap.h vmparam.h Log Message: switch to __USE_TOPDOWN_VM. move the stack to the top of the user address space so that the available free space is more contiguous. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hppa/include/pmap.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Mon Jan 7 16:58:09 UTC 2013 Modified Files: src/sys/arch/sun2/include: pmap.h vmparam.h src/sys/arch/sun2/sun2: pmap.c src/sys/arch/sun3/include: pmap3.h vmparam.h src/sys/arch/sun3/sun3: pmap.c Log Message: switch to __USE_TOPDOWN_VM. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sun2/include/pmap.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun2/include/vmparam.h cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sun2/sun2/pmap.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sun3/include/pmap3.h cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sun3/include/vmparam.h cvs rdiff -u -r1.167 -r1.168 src/sys/arch/sun3/sun3/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: chs Date: Mon Jan 7 16:59:18 UTC 2013 Modified Files: src/sys/arch/sparc/include: pmap.h vmparam.h src/sys/arch/sparc/sparc: pmap.c Log Message: switch to __USE_TOPDOWN_VM. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc/include/pmap.h cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sparc/include/vmparam.h cvs rdiff -u -r1.349 -r1.350 src/sys/arch/sparc/sparc/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: chs Date: Mon Jan 7 17:03:06 UTC 2013 Modified Files: src/sys/arch/amd64/include: segments.h Log Message: rearrange the LDT entries so that (32-bit) COMPAT_10 binaries work again. in long mode, call gates use two slots, so the first entry (a call gate) would overlap the second one (the 32-bit user code descriptor). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/segments.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/usr.sbin/npf/npfctl
Module Name:src Committed By: riz Date: Mon Jan 7 18:41:38 UTC 2013 Modified Files: src/usr.sbin/npf/npfctl [netbsd-6]: npfctl.c Log Message: Back out part of ticket #777 accidentally committed with ticket #776, to fix the netbsd-6 build. To generate a diff of this commit: cvs rdiff -u -r1.10.2.11 -r1.10.2.12 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:15:32 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm2835_mbox.c bcm2835_mbox.h files.bcm2835 Log Message: allow for a single board specific device to attach to the mbox driver To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_mbox.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm2835_mbox.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/files.bcm2835 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:18:28 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: vcprop.h Log Message: add some more vcprop definitions -- power, temperature, and voltage related To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/rpi/vcprop.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:19:33 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: files.rpi Added Files: src/sys/arch/evbarm/rpi: rpi_vcmbox.c Log Message: add support for rpi temperature sensor To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/files.rpi cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/rpi/rpi_vcmbox.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:20:22 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: RPI Log Message: add vcmbox driver To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/RPI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 20:42:24 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: pass cmdline.txt boot arguments to kernel To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/rpi/rpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Mon Jan 7 22:32:24 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: rpi_vcmbox.c vcprop.h Log Message: Add support for rpi cpu frequency scaling through machdep.cpu.frequency.* sysctls. The minimum and maximum supported frequencies are based on the arm_freq_min and arm_freq values in config.txt. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/rpi_vcmbox.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/rpi/vcprop.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: dsl Date: Mon Jan 7 23:20:42 UTC 2013 Modified Files: src/usr.sbin/cpuctl/arch: cpuctl_i386.h i386-asm.S i386.c x86_64-asm.S Log Message: Add support for the xsave related data from cpuid 8.n. Reorder the output so that the 'brand' string - which actually identifies the cpu is output first. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/cpuctl/arch/cpuctl_i386.h cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/cpuctl/arch/i386-asm.S cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/cpuctl/arch/i386.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/cpuctl/arch/x86_64-asm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Mon Jan 7 23:21:32 UTC 2013 Modified Files: src/sys/kern: kern_softint.c subr_pserialize.c Log Message: - softint_dispatch: perform pserialize(9) switchpoint when softintr processing finishes (without blocking). Problem reported by hannken@, thanks! - pserialize_read_enter: use splsoftserial(), not splsoftclock(). - pserialize_perform: add xcall(9) barrier as interrupts may be coalesced. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/kern/kern_softint.c cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_pserialize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Mon Jan 7 23:24:28 UTC 2013 Modified Files: src/sys/dev/pci: radeonfb.c Log Message: add PCI_PRODUCT_ATI_RADEON_RV370_5B63 - confirmed working by Dieter Roelants To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/radeonfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dsl Date: Mon Jan 7 23:40:53 UTC 2013 Modified Files: src/sys/arch/alpha/include: param.h Log Message: Only include machine/cpu.h if _KERNEL is defined. Fixes alpha userspace build (esp. pstat). NFI why it worked before at all. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 8 06:47:46 UTC 2013 Modified Files: src/sys/dev/usb: usb.c Log Message: Improve a comment slightly To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/sys/dev/usb/usb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 8 06:50:07 UTC 2013 Modified Files: src/sys/dev/usb: usbdivar.h Log Message: Fix the IPL level of the HC lock in a comment. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/usb/usbdivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Tue Jan 8 07:07:34 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: arm/arm/cpufunc.c rev. 1.119 is only for Sheeva CPU, so modify message a bit. To generate a diff of this commit: cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-6.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.