CVS commit: src/sys/uvm
Module Name:src Committed By: para Date: Fri Sep 7 06:45:05 UTC 2012 Modified Files: src/sys/uvm: uvm_km.c Log Message: call pmap_growkernel once after the kmem_arena is created to make the pmap cover it's address space assert on the growth in uvm_km_kmem_alloc for the 3rd uvm_map_entry uvm_map_prepare will grow the kernel, but we might call into uvm_km_kmem_alloc through imports to the kmem_meta_arena earlier while here guard uvm_km_va_starved_p from kmem_arena not yet created thanks for tracking this down to everyone involved To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/uvm/uvm_km.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/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.134 src/sys/uvm/uvm_km.c:1.135 --- src/sys/uvm/uvm_km.c:1.134 Tue Sep 4 13:37:41 2012 +++ src/sys/uvm/uvm_km.c Fri Sep 7 06:45:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.134 2012/09/04 13:37:41 matt Exp $ */ +/* $NetBSD: uvm_km.c,v 1.135 2012/09/07 06:45:04 para Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -152,7 +152,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.134 2012/09/04 13:37:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.135 2012/09/07 06:45:04 para Exp $); #include opt_uvmhist.h @@ -202,7 +202,7 @@ int nkmempages = 0; vaddr_t kmembase; vsize_t kmemsize; -vmem_t *kmem_arena; +vmem_t *kmem_arena = NULL; vmem_t *kmem_va_arena; /* @@ -329,6 +329,18 @@ uvm_km_bootstrap(vaddr_t start, vaddr_t kmem_arena = vmem_create(kmem, kmembase, kmemsize, PAGE_SIZE, NULL, NULL, NULL, 0, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM); +#ifdef PMAP_GROWKERNEL + /* + * kmem_arena VA allocations happen independently of uvm_map. + * grow kernel to accommodate the kmem_arena. + */ + if (uvm_maxkaddr kmembase + kmemsize) { + uvm_maxkaddr = pmap_growkernel(kmembase + kmemsize); + KASSERTMSG(uvm_maxkaddr = kmembase + kmemsize, + %#PRIxVADDR %#PRIxVADDR %#PRIxVSIZE, + uvm_maxkaddr, kmembase, kmemsize); + } +#endif vmem_init(kmem_arena); @@ -782,18 +794,12 @@ again: #ifdef PMAP_GROWKERNEL /* - * These VA allocations happen independently of uvm_map so if this allocation - * extends beyond the current limit, then allocate more resources for it. - * This can only happen while the kmem_map is the only map entry in the - * kernel_map because as soon as another map entry is created, uvm_map_prepare - * will set uvm_maxkaddr to an address beyond the kmem_map. - */ - if (uvm_maxkaddr va + size) { - uvm_maxkaddr = pmap_growkernel(va + size); - KASSERTMSG(uvm_maxkaddr = va + size, - %#PRIxVADDR %#PRIxPTR %#zx, - uvm_maxkaddr, va, size); - } + * These VA allocations happen independently of uvm_map + * so this allocation must not extend beyond the current limit. + */ + KASSERTMSG(uvm_maxkaddr = va + size, + %#PRIxVADDR %#PRIxPTR %#zx, + uvm_maxkaddr, va, size); #endif loopva = va; @@ -864,6 +870,9 @@ uvm_km_va_starved_p(void) vmem_size_t total; vmem_size_t free; + if (kmem_arena == NULL) + return false; + total = vmem_size(kmem_arena, VMEM_ALLOC|VMEM_FREE); free = vmem_size(kmem_arena, VMEM_FREE);
CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Fri Sep 7 07:07:15 UTC 2012 Modified Files: src/share/man/man7: release.7 Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man7/release.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/release.7 diff -u src/share/man/man7/release.7:1.33 src/share/man/man7/release.7:1.34 --- src/share/man/man7/release.7:1.33 Thu Sep 6 22:17:46 2012 +++ src/share/man/man7/release.7 Fri Sep 7 07:07:15 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: release.7,v 1.33 2012/09/06 22:17:46 riz Exp $ +.\ $NetBSD: release.7,v 1.34 2012/09/07 07:07:15 wiz Exp $ .\ .\ Copyright (c) 1997, 2000, 2005 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 Septemeber 6, 2012 +.Dd September 6, 2012 .Dt RELEASE 7 .Os .Sh NAME
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: wiz Date: Fri Sep 7 11:28:47 UTC 2012 Modified Files: src/usr.sbin/makemandb: apropos.c Log Message: Fix usage, from Abhinav Upadhyay er.abhinav.upadh...@gmail.com. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/makemandb/apropos.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/makemandb/apropos.c diff -u src/usr.sbin/makemandb/apropos.c:1.6 src/usr.sbin/makemandb/apropos.c:1.7 --- src/usr.sbin/makemandb/apropos.c:1.6 Sun Apr 15 15:56:52 2012 +++ src/usr.sbin/makemandb/apropos.c Fri Sep 7 11:28:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos.c,v 1.6 2012/04/15 15:56:52 wiz Exp $ */ +/* $NetBSD: apropos.c,v 1.7 2012/09/07 11:28:46 wiz Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com * All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: apropos.c,v 1.6 2012/04/15 15:56:52 wiz Exp $); +__RCSID($NetBSD: apropos.c,v 1.7 2012/09/07 11:28:46 wiz Exp $); #include err.h #include search.h @@ -277,7 +277,7 @@ static void usage(void) { fprintf(stderr, - Usage: %s [-n Number of records] [-p] [-123456789] [-S machine] query\n, + Usage: %s [-n Number of records] [-123456789Ccp] [-S machine] query\n, getprogname()); exit(1); }
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: wiz Date: Fri Sep 7 11:29:05 UTC 2012 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: Use emalloc in one more place, like the rest of the code does. From Abhinav Upadhyay er.abhinav.upadh...@gmail.com. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makemandb/makemandb.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/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.13 src/usr.sbin/makemandb/makemandb.c:1.14 --- src/usr.sbin/makemandb/makemandb.c:1.13 Wed Aug 29 20:33:01 2012 +++ src/usr.sbin/makemandb/makemandb.c Fri Sep 7 11:29:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.13 2012/08/29 20:33:01 wiz Exp $ */ +/* $NetBSD: makemandb.c,v 1.14 2012/09/07 11:29:04 wiz Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com * Copyright (c) 2011 Kristaps Dzonsons krist...@bsd.lv @@ -17,7 +17,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: makemandb.c,v 1.13 2012/08/29 20:33:01 wiz Exp $); +__RCSID($NetBSD: makemandb.c,v 1.14 2012/09/07 11:29:04 wiz Exp $); #include sys/stat.h #include sys/types.h @@ -361,7 +361,7 @@ main(int argc, char *argv[]) if (manconf) { char *arg; size_t command_len = shquote(manconf, NULL, 0) + 1; - arg = malloc(command_len ); + arg = emalloc(command_len); shquote(manconf, arg, command_len); easprintf(command, man -p -C %s, arg); free(arg);
CVS commit: src/sys/arch/arm
Module Name:src Committed By: matt Date: Fri Sep 7 11:49:00 UTC 2012 Modified Files: src/sys/arch/arm/arm: cpufunc.c cpufunc_asm_arm9.S cpufunc_asm_armv5.S cpufunc_asm_armv5_ec.S cpufunc_asm_sheeva.S src/sys/arch/arm/arm32: cpu.c fault.c genassym.cf src/sys/arch/arm/cortex: pl310.c pl310_reg.h src/sys/arch/arm/include: armreg.h cpu.h cpufunc.h src/sys/arch/arm/include/arm32: pmap.h Added Files: src/sys/arch/arm/cortex: pl310_var.h Log Message: Switch cortex_a9 back to need_ptesync = 1 Add code to disable the L2 cache on cortex-a9 (for now). Add evcnt for all the fault types. Move cache info in a structure and have one for the pcache and one for scache. Probe L1/L2 caches properly for ARMv7 To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/arm/arm/cpufunc.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/cpufunc_asm_arm9.S cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/cpufunc_asm_armv5.S cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/cpufunc_asm_armv5_ec.S cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm/cpufunc_asm_sheeva.S cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arm/arm32/cpu.c cvs rdiff -u -r1.84 -r1.85 src/sys/arch/arm/arm32/fault.c cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/arm32/genassym.cf cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/pl310.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/pl310_reg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/cortex/pl310_var.h cvs rdiff -u -r1.63 -r1.64 src/sys/arch/arm/include/armreg.h cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arm/include/cpu.h cvs rdiff -u -r1.57 -r1.58 src/sys/arch/arm/include/cpufunc.h cvs rdiff -u -r1.109 -r1.110 src/sys/arch/arm/include/arm32/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.114 src/sys/arch/arm/arm/cpufunc.c:1.115 --- src/sys/arch/arm/arm/cpufunc.c:1.114 Fri Sep 7 04:39:14 2012 +++ src/sys/arch/arm/arm/cpufunc.c Fri Sep 7 11:48:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.114 2012/09/07 04:39:14 matt Exp $ */ +/* $NetBSD: cpufunc.c,v 1.115 2012/09/07 11:48:59 matt 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.114 2012/09/07 04:39:14 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.115 2012/09/07 11:48:59 matt Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -92,23 +92,14 @@ struct arm_pmc_funcs *arm_pmc; #endif /* PRIMARY CACHE VARIABLES */ -int arm_picache_size; -int arm_picache_line_size; -int arm_picache_ways; - -int arm_pdcache_size; /* and unified */ -int arm_pdcache_line_size; -int arm_pdcache_ways; #if (ARM_MMU_V6 + ARM_MMU_V7) != 0 -int arm_cache_prefer_mask; +u_int arm_cache_prefer_mask; #endif +struct arm_cache_info arm_pcache; +struct arm_cache_info arm_scache; - -int arm_pcache_type; -int arm_pcache_unified; - -int arm_dcache_align; -int arm_dcache_align_mask; +u_int arm_dcache_align; +u_int arm_dcache_align_mask; /* 1 == use cpu_sleep(), 0 == don't */ int cpu_do_powersave; @@ -1355,6 +1346,43 @@ get_cachesize_cp15(int cssr) } #endif +#if (ARM_MMU_V6 + ARM_MMU_V7) 0 +static void +get_cacheinfo_clidr(struct arm_cache_info *info, u_int level, u_int clidr) +{ + u_int csid; + u_int nsets; + + if (clidr 6) { + csid = get_cachesize_cp15(level 1); /* select L1 dcache values */ + nsets = CPU_CSID_NUMSETS(csid) + 1; + info-dcache_ways = CPU_CSID_ASSOC(csid) + 1; + info-dcache_line_size = 1U (CPU_CSID_LEN(csid) + 4); + info-dcache_size = info-dcache_line_size * info-dcache_ways * nsets; + + if (level == 0) { + arm_dcache_log2_assoc = CPU_CSID_ASSOC(csid) + 1; + arm_dcache_log2_linesize = CPU_CSID_LEN(csid) + 4; + arm_dcache_log2_nsets = 31 - __builtin_clz(nsets); + } + } + + info-cache_unified = (clidr == 4); + + if (clidr 1) { + csid = get_cachesize_cp15((level 1)|CPU_CSSR_InD); /* select L1 icache values */ + nsets = CPU_CSID_NUMSETS(csid) + 1; + info-icache_ways = CPU_CSID_ASSOC(csid) + 1; + info-icache_line_size = 1U (CPU_CSID_LEN(csid) + 4); + info-icache_size = info-icache_line_size * info-icache_ways * nsets; + } else { + info-icache_ways = info-dcache_ways; + info-icache_line_size = info-dcache_line_size; + info-icache_size = info-dcache_size; + } +} +#endif /* (ARM_MMU_V6 + ARM_MMU_V7) 0 */ + static void get_cachetype_cp15(void) { @@ -1376,57 +1404,43 @@ get_cachetype_cp15(void) #if (ARM_MMU_V6 + ARM_MMU_V7) 0 if (CPU_CT_FORMAT(ctype) == 4) { - u_int csid0, csid1; - - isize = 1U (CPU_CT4_ILINE(ctype) + 2); - dsize = 1U (CPU_CT4_DLINE(ctype) + 2); + u_int clidr = armreg_clidr_read(); - csid0 = get_cachesize_cp15(CPU_CSSR_L1); /* select L1 dcache values */ - arm_pdcache_ways = CPU_CSID_ASSOC(csid0) + 1; - arm_pdcache_line_size = dsize; -
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Fri Sep 7 11:52:30 UTC 2012 Modified Files: src/sys/arch/arm/broadcom: bcm53xx_board.c bcm53xx_reg.h Log Message: Include the PCI outbound windows in the BCM53XX IO space. Call arml2cc_init from bcm53xx_bootstrap to fill in arm_cache info. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm53xx_board.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm53xx_board.c diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.2 --- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.1 Sat Sep 1 00:04:44 2012 +++ src/sys/arch/arm/broadcom/bcm53xx_board.c Fri Sep 7 11:52:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_board.c,v 1.1 2012/09/01 00:04:44 matt Exp $ */ +/* $NetBSD: bcm53xx_board.c,v 1.2 2012/09/07 11:52:30 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.1 2012/09/01 00:04:44 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.2 2012/09/07 11:52:30 matt Exp $); #include sys/param.h #include sys/bus.h @@ -49,6 +49,7 @@ __KERNEL_RCSID(1, $NetBSD: bcm53xx_boar #define ARMCORE_PRIVATE #include arm/cortex/a9tmr_var.h +#include arm/cortex/pl310_var.h #include arm/mainbus/mainbus.h #include arm/broadcom/bcm53xx_reg.h @@ -63,23 +64,20 @@ static struct cpu_softc cpu_softc; static struct bcm53xx_clock_info clk_info; struct arm32_bus_dma_tag bcm53xx_dma_tag = { - 0, - 0, - NULL, /* _cookie */ - _bus_dmamap_create, - _bus_dmamap_destroy, - _bus_dmamap_load, - _bus_dmamap_load_mbuf, - _bus_dmamap_load_uio, - _bus_dmamap_load_raw, - _bus_dmamap_unload, - _bus_dmamap_sync, - NULL, /* sync_post */ - _bus_dmamem_alloc, - _bus_dmamem_free, - _bus_dmamem_map, - _bus_dmamem_unmap, - _bus_dmamem_mmap + ._dmamap_create = _bus_dmamap_create, + ._dmamap_destroy = _bus_dmamap_destroy, + ._dmamap_load = _bus_dmamap_load, + ._dmamap_load_mbuf = _bus_dmamap_load_mbuf, + ._dmamap_load_uio = _bus_dmamap_load_uio, + ._dmamap_load_raw = _bus_dmamap_load_raw, + ._dmamap_unload = _bus_dmamap_unload, + ._dmamap_sync_pre = _bus_dmamap_sync, + ._dmamap_sync_post = NULL, + ._dmamem_alloc = _bus_dmamem_alloc, + ._dmamem_free = _bus_dmamem_free, + ._dmamem_map = _bus_dmamem_map, + ._dmamem_unmap = _bus_dmamem_unmap, + ._dmamem_mmap = _bus_dmamem_mmap }; #ifdef BCM53XX_CONSOLE_EARLY @@ -490,6 +488,8 @@ bcm53xx_bootstrap(vaddr_t iobase) bcs.bcs_armcore_clk_pllarmb, bcs.bcs_armcore_clk_policy); curcpu()-ci_data.cpu_cc_freq = clk-clk_cpu; + + arml2cc_init(bcm53xx_armcore_bst, bcm53xx_armcore_bsh, ARMCORE_L2C_BASE); } #ifdef MULTIPROCESSOR Index: src/sys/arch/arm/broadcom/bcm53xx_reg.h diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.2 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.3 --- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.2 Wed Sep 5 00:22:41 2012 +++ src/sys/arch/arm/broadcom/bcm53xx_reg.h Fri Sep 7 11:52:30 2012 @@ -45,6 +45,10 @@ * 0x_..0x_043f 1088B Internal SKU ROM Region * 0x_1000..0x_1fff 4KB Enumeration ROM Register Region */ +#define BCM53XX_PCIE0_OWIN_PBASE 0x0800 +#define BCM53XX_PCIE0_OWIN_SIZE 0x0400 +#define BCM53XX_PCIE0_OWIN_MAX 0x0800 + #define BCM53XX_IOREG_PBASE 0x1800 #define BCM53XX_IOREG_SIZE 0x0020 @@ -57,7 +61,19 @@ #define BCM53XX_SPIFLASH_PBASE 0x1d00 #define BCM53XX_SPIFLASH_SIZE 0x0100 -#define BCM53XX_IO_SIZE (BCM53XX_IOREG_SIZE + BCM53XX_ARMCORE_SIZE) +#define BCM53XX_PCIE1_OWIN_PBASE 0x4000 +#define BCM53XX_PCIE1_OWIN_SIZE 0x0400 +#define BCM53XX_PCIE1_OWIN_MAX 0x0800 + +#define BCM53XX_PCIE2_OWIN_PBASE 0x4800 +#define BCM53XX_PCIE2_OWIN_SIZE 0x0400 +#define BCM53XX_PCIE2_OWIN_MAX 0x0800 + +#define BCM53XX_IO_SIZE (BCM53XX_IOREG_SIZE \ + + BCM53XX_ARMCORE_SIZE \ + + BCM53XX_PCIE0_OWIN_SIZE \ + + BCM53XX_PCIE1_OWIN_SIZE \ + + BCM53XX_PCIE2_OWIN_SIZE) #define BCM53XX_REF_CLK (25*1000*1000) @@ -437,11 +453,15 @@ #define PCIE_OARR_0 0xd20 #define PCIE_OARR_1 0xd28 +#define PCIE_OARR_ADDR __BITS(31,26) + #define PCIE_OMAP_0_LOWER 0xd40 #define PCIE_OMAP_0_UPPER 0xd44 #define PCIE_OMAP_1_LOWER 0xd48 #define PCIE_OMAP_1_UPPER 0xd4c +#define PCIE_OMAP_ADDRL __BITS(31,26) + #define PCIE_FUNC1_IARR_1_SIZE 0xd58 #define PCIE_FUNC1_IARR_2_SIZE 0xd5c @@ -517,6 +537,7 @@ #endif /* PCIE_PRIVATE */ #define ARMCORE_SCU_BASE 0x2 /* CBAR is 1902 */ +#define ARMCORE_L2C_BASE 0x22000 #ifdef ARMCORE_PRIVATE
CVS commit: src/sys/arch/evbarm/bcm53xx
Module Name:src Committed By: matt Date: Fri Sep 7 11:53:50 UTC 2012 Modified Files: src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c bcm53xx_start.S genassym.cf platform.h Log Message: Include PCI outbound windows in the kernel IO region. Make sure these start on a SuperSection boundary. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c \ src/sys/arch/evbarm/bcm53xx/genassym.cf \ src/sys/arch/evbarm/bcm53xx/platform.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.1 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.2 --- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.1 Sat Sep 1 00:15:11 2012 +++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Fri Sep 7 11:53:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_machdep.c,v 1.1 2012/09/01 00:15:11 matt Exp $ */ +/* $NetBSD: bcm53xx_machdep.c,v 1.2 2012/09/07 11:53:49 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -33,12 +33,13 @@ #define IDM_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.1 2012/09/01 00:15:11 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.2 2012/09/07 11:53:49 matt Exp $); #include opt_evbarm_boardtype.h #include opt_broadcom.h #include opt_kgdb.h #include com.h +#include pci.h #include bcmrng_ccb.h #include sys/param.h @@ -130,19 +131,42 @@ int comcnmode = CONMODE | CLOCAL; static const struct pmap_devmap devmap[] = { { - KERNEL_IO_VBASE, + KERNEL_IO_IOREG_VBASE, BCM53XX_IOREG_PBASE, /* 0x1800 */ BCM53XX_IOREG_SIZE, /* 2MB */ VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { - KERNEL_IO_VBASE + BCM53XX_IOREG_SIZE, + KERNEL_IO_ARMCORE_VBASE, BCM53XX_ARMCORE_PBASE, /* 0x1900 */ - BCM53XX_ARMCORE_SIZE, /* 16MB */ + BCM53XX_ARMCORE_SIZE, /* 1MB */ VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, +#if NPCI 0 + { + KERNEL_IO_PCIE0_OWIN_VBASE, + BCM53XX_PCIE0_OWIN_PBASE, /* 0x0800 */ + BCM53XX_PCIE0_OWIN_SIZE, /* 4MB */ + VM_PROT_READ|VM_PROT_WRITE, + PTE_NOCACHE, + }, + { + KERNEL_IO_PCIE1_OWIN_VBASE, + BCM53XX_PCIE1_OWIN_PBASE, /* 0x4000 */ + BCM53XX_PCIE1_OWIN_SIZE, /* 4MB */ + VM_PROT_READ|VM_PROT_WRITE, + PTE_NOCACHE, + }, + { + KERNEL_IO_PCIE2_OWIN_VBASE, + BCM53XX_PCIE2_OWIN_PBASE, /* 0x4800 */ + BCM53XX_PCIE2_OWIN_SIZE, /* 4MB */ + VM_PROT_READ|VM_PROT_WRITE, + PTE_NOCACHE, + }, +#endif /* NPCI 0 */ { 0, 0, 0, 0, 0 } }; @@ -162,7 +186,7 @@ u_int initarm(void *arg) { pmap_devmap_register(devmap); - bcm53xx_bootstrap(KERNEL_IO_VBASE); + bcm53xx_bootstrap(KERNEL_IO_IOREG_VBASE); #ifdef MULTIPROCESSOR uint32_t scu_cfg = bus_space_read_4(bcm53xx_armcore_bst, bcm53xx_armcore_bsh, Index: src/sys/arch/evbarm/bcm53xx/genassym.cf diff -u src/sys/arch/evbarm/bcm53xx/genassym.cf:1.1 src/sys/arch/evbarm/bcm53xx/genassym.cf:1.2 --- src/sys/arch/evbarm/bcm53xx/genassym.cf:1.1 Sat Sep 1 00:15:11 2012 +++ src/sys/arch/evbarm/bcm53xx/genassym.cf Fri Sep 7 11:53:50 2012 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.1 2012/09/01 00:15:11 matt Exp $ +# $NetBSD: genassym.cf,v 1.2 2012/09/07 11:53:50 matt Exp $ #- # Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -38,8 +38,8 @@ define BCM53XX_IOREG_PBASE BCM53XX_IOREG define BCM53XX_IOREG_SIZE BCM53XX_IOREG_SIZE define BCM53XX_ARMCORE_PBASE BCM53XX_ARMCORE_PBASE define BCM53XX_ARMCORE_SIZE BCM53XX_ARMCORE_SIZE -define KERNEL_IO_VBASE KERNEL_IO_VBASE -define KERNEL_IO_VSIZE KERNEL_IO_VSIZE +define KERNEL_IO_IOREG_VBASE KERNEL_IO_IOREG_VBASE +define KERNEL_IO_ARMCORE_VBASE KERNEL_IO_ARMCORE_VBASE define LSR_TXRDY LSR_TXRDY define LSR_TSRE LSR_TSRE Index: src/sys/arch/evbarm/bcm53xx/platform.h diff -u src/sys/arch/evbarm/bcm53xx/platform.h:1.1 src/sys/arch/evbarm/bcm53xx/platform.h:1.2 --- src/sys/arch/evbarm/bcm53xx/platform.h:1.1 Sat Sep 1 00:15:11 2012 +++ src/sys/arch/evbarm/bcm53xx/platform.h Fri Sep 7 11:53:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: platform.h,v 1.1 2012/09/01 00:15:11 matt Exp $ */ +/* $NetBSD: platform.h,v 1.2 2012/09/07 11:53:50 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -39,7 +39,11 @@ * Kernel VM space: KERNEL_VM_BASE to 0xc000. Leave 1MB unused. */ #define KERNEL_VM_BASE (KERNEL_BASE + 0x4000) -#define KERNEL_VM_TOP (0xfff0 - KERNEL_IO_VSIZE) +#if BCM53XX_IO_SIZE = L1_SS_SIZE +#define KERNEL_VM_TOP ((0xfff0 - BCM53XX_IO_SIZE) -L1_SS_SIZE) +#else +#define KERNEL_VM_TOP (0xfff0 - BCM53XX_IO_SIZE) +#endif #define KERNEL_VM_SIZE (KERNEL_VM_TOP - KERNEL_VM_BASE) /* @@ -47,8 +51,14 @@ * address space, so we can't map 1:1 VA:PA. So shove them just after the * top of the kernel VM. */
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Fri Sep 7 15:43:22 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: Correct the ticket number for ticket 538. From Robert Elz. To generate a diff of this commit: cvs rdiff -u -r1.1.2.198 -r1.1.2.199 src/doc/CHANGES-6.0 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 diff -u src/doc/CHANGES-6.0:1.1.2.198 src/doc/CHANGES-6.0:1.1.2.199 --- src/doc/CHANGES-6.0:1.1.2.198 Mon Sep 3 19:27:21 2012 +++ src/doc/CHANGES-6.0 Fri Sep 7 15:43:22 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.198 2012/09/03 19:27:21 riz Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.199 2012/09/07 15:43:22 riz Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -8496,7 +8496,7 @@ sys/netipsec/key.cpatch sys/netipsec/key.hpatch Prevent a panic with FAST_IPSEC. - [msaitoh, ticket #537] + [msaitoh, ticket #538] sys/arch/amd64/amd64/machdep.c 1.190 via patch
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: matt Date: Fri Sep 7 17:11:43 UTC 2012 Modified Files: src/sys/arch/arm/xscale: pxa2x0_dmac.c Log Message: Forgot to commit this. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/xscale/pxa2x0_dmac.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/xscale/pxa2x0_dmac.c diff -u src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.10 src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.11 --- src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.10 Sun Jan 29 09:08:04 2012 +++ src/sys/arch/arm/xscale/pxa2x0_dmac.c Fri Sep 7 17:11:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_dmac.c,v 1.10 2012/01/29 09:08:04 tsutsui Exp $ */ +/* $NetBSD: pxa2x0_dmac.c,v 1.11 2012/09/07 17:11:43 matt Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -462,20 +462,20 @@ dmac_dmover_attach(struct pxadmac_softc * small buffers here, since we set up the DMAC source * descriptor with 'ds_addr_hold' set to true. */ - if (bus_dmamem_alloc(sc-sc_dmat, -arm_pdcache_line_size, arm_pdcache_line_size, 0, + if (bus_dmamem_alloc(sc-sc_dmat, arm_pcache.dcache_line_size, +arm_pcache.dcache_line_size, 0, ds-ds_zero_seg, 1, dummy, BUS_DMA_NOWAIT) || - bus_dmamem_alloc(sc-sc_dmat, -arm_pdcache_line_size, arm_pdcache_line_size, 0, + bus_dmamem_alloc(sc-sc_dmat, arm_pcache.dcache_line_size, +arm_pcache.dcache_line_size, 0, ds-ds_fill_seg, 1, dummy, BUS_DMA_NOWAIT)) { panic(dmac_dmover_attach: bus_dmamem_alloc failed); } if (bus_dmamem_map(sc-sc_dmat, ds-ds_zero_seg, 1, -arm_pdcache_line_size, ds-ds_zero_va, +arm_pcache.dcache_line_size, ds-ds_zero_va, BUS_DMA_NOWAIT) || bus_dmamem_map(sc-sc_dmat, ds-ds_fill_seg, 1, -arm_pdcache_line_size, ds-ds_fill_va, +arm_pcache.dcache_line_size, ds-ds_fill_va, BUS_DMA_NOWAIT)) { panic(dmac_dmover_attach: bus_dmamem_map failed); } @@ -483,7 +483,7 @@ dmac_dmover_attach(struct pxadmac_softc /* * Make sure the zero-fill source buffer really is zero filled */ - memset(ds-ds_zero_va, 0, arm_pdcache_line_size); + memset(ds-ds_zero_va, 0, arm_pcache.dcache_line_size); } dmover_backend_register(sc-sc_dmover.dd_backend); @@ -590,7 +590,7 @@ dmac_dmover_run(struct dmover_backend *d * Simply load up the pre-zeroed source buffer */ if (bus_dmamap_load(sc-sc_dmat, ds-ds_src_dmap, - ds-ds_zero_va, arm_pdcache_line_size, NULL, + ds-ds_zero_va, arm_pcache.dcache_line_size, NULL, BUS_DMA_NOWAIT | BUS_DMA_STREAMING | BUS_DMA_READ)) goto error; @@ -607,10 +607,10 @@ dmac_dmover_run(struct dmover_backend *d * burst size (which is hardcoded to 8 for dmover). */ memset(ds-ds_fill_va, dreq-dreq_immediate[0], - arm_pdcache_line_size); + arm_pcache.dcache_line_size); if (bus_dmamap_load(sc-sc_dmat, ds-ds_src_dmap, - ds-ds_fill_va, arm_pdcache_line_size, NULL, + ds-ds_fill_va, arm_pcache.dcache_line_size, NULL, BUS_DMA_NOWAIT | BUS_DMA_STREAMING | BUS_DMA_READ)) goto error;
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: martin Date: Fri Sep 7 20:27:12 UTC 2012 Modified Files: src/tests/lib/libc/sys: t_mlock.c Log Message: Deal with architectures defining VM_MIN_ADDRESS 0. Add additional error code tests using a pointer one page past current brk. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_mlock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_mlock.c diff -u src/tests/lib/libc/sys/t_mlock.c:1.2 src/tests/lib/libc/sys/t_mlock.c:1.3 --- src/tests/lib/libc/sys/t_mlock.c:1.2 Sat Apr 21 01:15:13 2012 +++ src/tests/lib/libc/sys/t_mlock.c Fri Sep 7 20:27:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mlock.c,v 1.2 2012/04/21 01:15:13 jruoho Exp $ */ +/* $NetBSD: t_mlock.c,v 1.3 2012/09/07 20:27:12 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,14 +29,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: t_mlock.c,v 1.2 2012/04/21 01:15:13 jruoho Exp $); +__RCSID($NetBSD: t_mlock.c,v 1.3 2012/09/07 20:27:12 martin Exp $); #include sys/mman.h #include sys/resource.h #include sys/wait.h +#define _KMEMUSER +#include machine/vmparam.h #include errno.h #include atf-c.h +#include stdint.h #include stdio.h #include stdlib.h #include unistd.h @@ -77,24 +80,42 @@ ATF_TC_HEAD(mlock_err, tc) ATF_TC_BODY(mlock_err, tc) { + void *invalid_ptr; + int null_errno = ENOMEM; /* error expected for NULL */ + + if ((uintptr_t)VM_MIN_ADDRESS 0) + null_errno = EINVAL; /* NULL is not inside user VM */ errno = 0; - ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1); + ATF_REQUIRE_ERRNO(null_errno, mlock(NULL, page) == -1); errno = 0; - ATF_REQUIRE_ERRNO(ENOMEM, mlock((char *)0, page) == -1); + ATF_REQUIRE_ERRNO(null_errno, mlock((char *)0, page) == -1); errno = 0; ATF_REQUIRE_ERRNO(EINVAL, mlock((char *)-1, page) == -1); errno = 0; - ATF_REQUIRE_ERRNO(ENOMEM, munlock(NULL, page) == -1); + ATF_REQUIRE_ERRNO(null_errno, munlock(NULL, page) == -1); errno = 0; - ATF_REQUIRE_ERRNO(ENOMEM, munlock((char *)0, page) == -1); + ATF_REQUIRE_ERRNO(null_errno, munlock((char *)0, page) == -1); errno = 0; ATF_REQUIRE_ERRNO(EINVAL, munlock((char *)-1, page) == -1); + + /* + * Try to create a pointer to an unmapped page - first after current + * brk will likely do. + */ + invalid_ptr = (void*)(((uintptr_t)sbrk(0)+page) ~(page-1)); + printf(testing with (hopefully) invalid pointer %p\n, invalid_ptr); + + errno = 0; + ATF_REQUIRE_ERRNO(ENOMEM, mlock(invalid_ptr, page) == -1); + + errno = 0; + ATF_REQUIRE_ERRNO(ENOMEM, munlock(invalid_ptr, page) == -1); } ATF_TC(mlock_limits);
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Sep 7 21:04:43 UTC 2012 Modified Files: src/share/misc: make.country Log Message: - Fix broken links (ISO web site reorganized). Script now works again. - Use a few more variables so that it will be easier to change the next time ISO shuffles the deck. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/misc/make.country Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/make.country diff -u src/share/misc/make.country:1.1 src/share/misc/make.country:1.2 --- src/share/misc/make.country:1.1 Tue Dec 15 03:38:58 2009 +++ src/share/misc/make.country Fri Sep 7 21:04:43 2012 @@ -10,8 +10,7 @@ cat _EOF # NameTABAlpha-2-codeTABAlpha-3-codeTABNumeric-3-codeTABFIPS # # Further information can be found at the ISO 3166 Maintenance Agency -# (ISO 3166/MA) web site, -# http://www.iso.org/iso/en/prods-services/iso3166ma/index.html. +# (ISO 3166/MA) web site, http://www.iso.org/iso/country_codes. # # FIPS 10-4 codes compiled from several sources, including # http://www.statoids.com/wab.html @@ -25,15 +24,17 @@ cat _EOF _EOF } -I1=http://www.statoids.com/wab.html +I1=wab.html +U1=http://www.statoids.com/$I1 O1=/tmp/wab.$$ -I2=http://www.iso.org/iso/list-en1-semic-3.txt +I2=country_names_and_code_elements_txt +U2=http://www.iso.org/iso/$I2 O2=/tmp/list.$$ -trap rm -f wab.html list-en1-semic-3.txt $O1 $O2 0 1 2 3 15 -ftp $I1 -ftp $I2 +trap rm -f $I1 $I2 $O1 $O2 0 1 2 3 15 +ftp $U1 +ftp $U2 -grep 'tr class=[oe]' wab.html | +grep 'tr class=[oe]' $I1 | sed -e 's,tr class=.td,,g' \ -e 's,\nbsp;,,g' \ -e 's,code,,g' \ @@ -47,7 +48,7 @@ awk -F'\t' '{ printf(%s\t%s\t%s\t%s\t%s grep -v href= | sort $O1 -grep ';[A-Z][A-Z]' list-en1-semic-3.txt | +grep ';[A-Z][A-Z]' $I2 | tr -d '\015' | awk -F ';' '{ print $2 }' | sort $O2
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Sep 7 21:08:03 UTC 2012 Modified Files: src/share/misc: country Log Message: Regenerate to handle changes since 2009-12-14 (Newsletters VI-7 thru VI-13) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/misc/country Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/country diff -u src/share/misc/country:1.15 src/share/misc/country:1.16 --- src/share/misc/country:1.15 Tue Dec 15 03:39:19 2009 +++ src/share/misc/country Fri Sep 7 21:08:03 2012 @@ -1,4 +1,4 @@ -# $NetBSD: country,v 1.15 2009/12/15 03:39:19 christos Exp $ +# $NetBSD: country,v 1.16 2012/09/07 21:08:03 ginsbach Exp $ # # ISO 3166-1 Country Codes # @@ -6,8 +6,7 @@ # NameTABAlpha-2-codeTABAlpha-3-codeTABNumeric-3-codeTABFIPS # # Further information can be found at the ISO 3166 Maintenance Agency -# (ISO 3166/MA) web site, -# http://www.iso.org/iso/en/prods-services/iso3166ma/index.html. +# (ISO 3166/MA) web site, http://www.iso.org/iso/country_codes. # # FIPS 10-4 codes compiled from several sources, including # http://www.statoids.com/wab.html @@ -16,7 +15,7 @@ # blank entry in the column. FIPS 10-4 codes without a corresponding # ISO 3166-1 entity are excluded. # -# This list is up-to-date as of 2009-12-14 +# This list is up-to-date as of 2012-09-07 # Aaland AX ALA 248 Afghanistan AF AFG 004 AF @@ -45,6 +44,7 @@ Benin BJ BEN 204 BN Bermuda BM BMU 060 BD Bhutan BT BTN 064 BT Bolivia BO BOL 068 BL +Bonaire, Sint Eustatius and Saba BQ BES 535 NL Bosnia and Herzegovina BA BIH 070 BK Botswana BW BWA 072 BC Bouvet Island BV BVT 074 BV @@ -74,6 +74,7 @@ Costa Rica CR CRI 188 CS Cote d'Ivoire CI CIV 384 IV Croatia HR HRV 191 HR Cuba CU CUB 192 CU +CuraƧao CW CUW 531 UC Cyprus CY CYP 196 CY Czech Republic CZ CZE 203 EZ Denmark DK DNK 208 DA @@ -172,7 +173,6 @@ Namibia NA NAM 516 WA Nauru NR NRU 520 NR Nepal NP NPL 524 NP Netherlands NL NLD 528 NL -Netherlands Antilles AN ANT 530 NT New Caledonia NC NCL 540 NC New Zealand NZ NZL 554 NZ Nicaragua NI NIC 558 NU @@ -216,15 +216,17 @@ Serbia RS SRB 688 RI KV Seychelles SC SYC 690 SE Sierra Leone SL SLE 694 SL Singapore SG SGP 702 SN +Sint Maarten SX SXM 534 NN Slovakia SK SVK 703 LO Slovenia SI SVN 705 SI Solomon Islands SB SLB 090 BP Somalia SO SOM 706 SO South Africa ZA ZAF 710 SF South Georgia and South Sandwich Islands GS SGS 239 SX +South Sudan SS SSD 728 OD Spain ES ESP 724 SP Sri Lanka LK LKA 144 CE -Sudan SD SDN 736 SU +Sudan SD SDN 729 SU Suriname SR SUR 740 NS Svalbard and Jan Mayen Islands SJ SJM 744 SV JN Swaziland SZ SWZ 748 WZ
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Fri Sep 7 21:18:59 UTC 2012 Modified Files: src/sys/arch/arm/cortex: pl310.c Log Message: Don't disable the L2C is it isn't enabled. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/cortex/pl310.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/cortex/pl310.c diff -u src/sys/arch/arm/cortex/pl310.c:1.3 src/sys/arch/arm/cortex/pl310.c:1.4 --- src/sys/arch/arm/cortex/pl310.c:1.3 Fri Sep 7 11:49:00 2012 +++ src/sys/arch/arm/cortex/pl310.c Fri Sep 7 21:18:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pl310.c,v 1.3 2012/09/07 11:49:00 matt Exp $ */ +/* $NetBSD: pl310.c,v 1.4 2012/09/07 21:18:58 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pl310.c,v 1.3 2012/09/07 11:49:00 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pl310.c,v 1.4 2012/09/07 21:18:58 matt Exp $); #include sys/param.h #include sys/bus.h @@ -134,13 +134,19 @@ arml2cc_attach(device_t parent, device_t } } + const bool enabled_p = arml2cc_read_4(sc, L2C_CTL) != 0; + aprint_naive(\n); aprint_normal(: ARM PL310%s L2 Cache Controller%s\n, - revstr, arml2cc_read_4(sc, L2C_CTL) ? : (disabled)); + revstr, enabled_p ? : (disabled)); + + if (enabled_p) { + arml2cc_disable(sc); + aprint_normal_dev(self, cache %s\n, + arml2cc_read_4(sc, L2C_CTL) ? enabled : disabled); + } - arml2cc_disable(sc); - aprint_normal_dev(self, cache %s\n, - arml2cc_read_4(sc, L2C_CTL) ? enabled : disabled); + KASSERT(arm_pcache.dcache_line_size == arm_scache.dcache_line_size); } void @@ -191,3 +197,37 @@ arml2cc_init(bus_space_tag_t bst, bus_sp info-icache_size = i_waysize * info-icache_ways; } } + +#if 0 +static void +arml2cc_dcache_wb_range(vaddr_t va, vsize_t len) +{ + const size_t line_size = arm_pcache.dcache_line_size; + const size_t line_mask = line_size - 1; + size_t off = va line_mask; + size_t page_len = 0; + paddr_t pa = 0; + if (off) { + len += off; + va -= off; + } + for (const vaddr_t endva = va + roundup2(len, line_size); + va endva; + va += line_size) { + armreg_dccmvac(va); /* this may fault */ + __asm __volatile(dsb); + if (page_len == 0) { + armreg_ats1cpr_write(va); + pa = armreg_par_read(); + const psize = __predict_false(pa 1) ? L1_SS_SIZE : L2_S_SIZE; + pa = -psize; + endpa = pa + psize; + page_len = (va (psize - 1); + } + size_t set = va + arml2cc_write_4(sc, L2C_CLEAN_PA, pa); + + va += line_size; + } +} +#endif
CVS commit: [netbsd-6] src
Module Name:src Committed By: bouyer Date: Fri Sep 7 22:13:38 UTC 2012 Modified Files: src/doc [netbsd-6]: README.files src/share/man/man7 [netbsd-6]: release.7 Log Message: Pull up following revision(s) (requested by riz in ticket #548): doc/README.files: revision 1.5 share/man/man7/release.7: revision 1.33 share/man/man7/release.7: revision 1.34 Update release(7) for the recent iso - images change. Fix typo. The iso directory never made it into this file, but now that iso is images, document it here for the edification of folks browsing the download directories. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.20.1 src/doc/README.files cvs rdiff -u -r1.32 -r1.32.2.1 src/share/man/man7/release.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/README.files diff -u src/doc/README.files:1.4 src/doc/README.files:1.4.20.1 --- src/doc/README.files:1.4 Fri Dec 14 21:15:52 2007 +++ src/doc/README.files Fri Sep 7 22:13:38 2012 @@ -1,4 +1,4 @@ -# $NetBSD: README.files,v 1.4 2007/12/14 21:15:52 pavel Exp $ +# $NetBSD: README.files,v 1.4.20.1 2012/09/07 22:13:38 bouyer Exp $ What's in this directory: @@ -10,6 +10,8 @@ LAST_MINUTE Last minute changes and note README.files This file. +images/ Bootable images, including ISOs and USB disk images. + patches/ Post-release binary code patches. shared/ Binary sets shared between multiple ports. Index: src/share/man/man7/release.7 diff -u src/share/man/man7/release.7:1.32 src/share/man/man7/release.7:1.32.2.1 --- src/share/man/man7/release.7:1.32 Sat Jan 14 22:56:31 2012 +++ src/share/man/man7/release.7 Fri Sep 7 22:13:38 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: release.7,v 1.32 2012/01/14 22:56:31 jmcneill Exp $ +.\ $NetBSD: release.7,v 1.32.2.1 2012/09/07 22:13:38 bouyer Exp $ .\ .\ Copyright (c) 1997, 2000, 2005 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 January 14, 2012 +.Dd September 6, 2012 .Dt RELEASE 7 .Os .Sh NAME @@ -122,19 +122,11 @@ The root of the release hierarchy should files and subdirectories: .Pp .Bl -tag -width \*[Lt]machine\*[Gt] -.It Sy iso/ -CDROM images in ISO 9660 format, usually created with -.Dq ./build.sh ... iso-image ... -after a -.Dq ./build.sh -x ... release ... -in -.Pa src -or created with -.Dq ./build.sh ... iso-image-source ... -after a -.Dq ./build.sh -x ... release sourcesets ... -in -.Pa src . +.It Sy images/ +Image files intended for use in installing +.Nx . +There are different types of images for different platforms, and sometimes +multiple different image types for a single platform. .Pp Images in this directory, unlike images in the .Sm off @@ -143,10 +135,10 @@ Images in this directory, unlike images .Aq Em rel .Sy / .Aq Em machine -.Sy /installation/cdrom/ +.Sy /installation/\\*/ .Xc .Sm on -directory, contain file systems that +directories, contain file systems that have an internal layout that corresponds to a complete release for a given machine type. If built with @@ -155,10 +147,31 @@ then it will also contain a .Dq source directory. These images are usually bootable. -.Bl -tag -width NetBSD-\*[Lt]rel\*[Gt]-\*[Lt]machine_arch\*[Gt].iso +.Bl -tag -width NetBSD-\*[Lt]rel\*[Gt]-\*[Lt]machine\*[Gt].iso .It Sy MD5 .It Sy SHA512 .It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy .iso +CDROM images in ISO 9660 format, usually created with +.Dq ./build.sh ... iso-image ... +after a +.Dq ./build.sh -x ... release ... +in +.Pa src +or created with +.Dq ./build.sh ... iso-image-source ... +after a +.Dq ./build.sh -x ... release sourcesets ... +in +.Pa src . +.It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy -install.img.gz +Bootable installation images intended to be written to any drive which +appears as an +.Xr sd 4 +type, such as USB flash disks. +These images are created with +.Dq ./build.sh ... install-image +in +.Pa src . .El . .It Sy shared/
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Fri Sep 7 22:14:54 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: Ticket 548 To generate a diff of this commit: cvs rdiff -u -r1.1.2.199 -r1.1.2.200 src/doc/CHANGES-6.0 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 diff -u src/doc/CHANGES-6.0:1.1.2.199 src/doc/CHANGES-6.0:1.1.2.200 --- src/doc/CHANGES-6.0:1.1.2.199 Fri Sep 7 15:43:22 2012 +++ src/doc/CHANGES-6.0 Fri Sep 7 22:14:53 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.199 2012/09/07 15:43:22 riz Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.200 2012/09/07 22:14:53 bouyer Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -8508,3 +8508,9 @@ external/gpl3/gcc/dist/gcc/builtins.c 1 Fix gcc on STRICT_ALIGNMENT arches. PR#46865. [martin, ticket #540] +doc/README.files1.5 +share/man/man7/release.7 1.33, 1.34 + + Update documentation regarding bootable images. + [riz, ticket #548] +
CVS commit: [netbsd-6] src/sys/uvm
Module Name:src Committed By: riz Date: Fri Sep 7 22:17:35 UTC 2012 Modified Files: src/sys/uvm [netbsd-6]: uvm_km.c uvm_map.c Log Message: Pull up following revision(s) (requested by para in ticket #547): sys/uvm/uvm_map.c: revision 1.320 sys/uvm/uvm_map.c: revision 1.321 sys/uvm/uvm_map.c: revision 1.322 sys/uvm/uvm_km.c: revision 1.130 sys/uvm/uvm_km.c: revision 1.131 sys/uvm/uvm_km.c: revision 1.132 sys/uvm/uvm_km.c: revision 1.133 sys/uvm/uvm_km.c: revision 1.134 sys/uvm/uvm_km.c: revision 1.135 sys/uvm/uvm_km.c: revision 1.129 Fix a bug where the kernel was never grown to accomodate the kmem VA space since that happens before the kernel_map is set. Don't try grow the entire kmem space but just do as needed in uvm_km_kmem_alloc Shut up gcc printf warning. Cleanup comment. Change panic to KASSERTMSG. Use kernel_map-misc_lock to make sure we don't call pmap_growkernel concurrently and possibly mess up uvm_maxkaddr. Switch to a spin lock (uvm_kentry_lock) which, fortunately, was sitting there unused. Remove locking since it isn't needed. As soon as the 2nd uvm_map_entry in kernel_map is created, uvm_map_prepare will call pmap_growkernel and the pmap_growkernel call in uvm_km_mem_alloc will never be called again. call pmap_growkernel once after the kmem_arena is created to make the pmap cover it's address space assert on the growth in uvm_km_kmem_alloc for the 3rd uvm_map_entry uvm_map_prepare will grow the kernel, but we might call into uvm_km_kmem_alloc through imports to the kmem_meta_arena earlier while here guard uvm_km_va_starved_p from kmem_arena not yet created thanks for tracking this down to everyone involved To generate a diff of this commit: cvs rdiff -u -r1.120.2.2 -r1.120.2.3 src/sys/uvm/uvm_km.c cvs rdiff -u -r1.313.2.3 -r1.313.2.4 src/sys/uvm/uvm_map.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/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.120.2.2 src/sys/uvm/uvm_km.c:1.120.2.3 --- src/sys/uvm/uvm_km.c:1.120.2.2 Sat Mar 17 17:29:34 2012 +++ src/sys/uvm/uvm_km.c Fri Sep 7 22:17:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.120.2.2 2012/03/17 17:29:34 bouyer Exp $ */ +/* $NetBSD: uvm_km.c,v 1.120.2.3 2012/09/07 22:17:34 riz Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -120,7 +120,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.120.2.2 2012/03/17 17:29:34 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.120.2.3 2012/09/07 22:17:34 riz Exp $); #include opt_uvmhist.h @@ -170,7 +170,7 @@ int nkmempages = 0; vaddr_t kmembase; vsize_t kmemsize; -vmem_t *kmem_arena; +vmem_t *kmem_arena = NULL; vmem_t *kmem_va_arena; /* @@ -297,6 +297,18 @@ uvm_km_bootstrap(vaddr_t start, vaddr_t kmem_arena = vmem_create(kmem, kmembase, kmemsize, PAGE_SIZE, NULL, NULL, NULL, 0, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM); +#ifdef PMAP_GROWKERNEL + /* + * kmem_arena VA allocations happen independently of uvm_map. + * grow kernel to accommodate the kmem_arena. + */ + if (uvm_maxkaddr kmembase + kmemsize) { + uvm_maxkaddr = pmap_growkernel(kmembase + kmemsize); + KASSERTMSG(uvm_maxkaddr = kmembase + kmemsize, + %#PRIxVADDR %#PRIxVADDR %#PRIxVSIZE, + uvm_maxkaddr, kmembase, kmemsize); + } +#endif vmem_init(kmem_arena); @@ -747,6 +759,16 @@ again: if (rc != 0) return rc; +#ifdef PMAP_GROWKERNEL + /* + * These VA allocations happen independently of uvm_map + * so this allocation must not extend beyond the current limit. + */ + KASSERTMSG(uvm_maxkaddr = va + size, + %#PRIxVADDR %#PRIxPTR %#zx, + uvm_maxkaddr, va, size); +#endif + loopva = va; loopsize = size; @@ -811,6 +833,9 @@ uvm_km_va_starved_p(void) vmem_size_t total; vmem_size_t free; + if (kmem_arena == NULL) + return false; + total = vmem_size(kmem_arena, VMEM_ALLOC|VMEM_FREE); free = vmem_size(kmem_arena, VMEM_FREE); Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.313.2.3 src/sys/uvm/uvm_map.c:1.313.2.4 --- src/sys/uvm/uvm_map.c:1.313.2.3 Sat Aug 18 22:03:24 2012 +++ src/sys/uvm/uvm_map.c Fri Sep 7 22:17:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.313.2.3 2012/08/18 22:03:24 riz Exp $ */ +/* $NetBSD: uvm_map.c,v 1.313.2.4 2012/09/07 22:17:34 riz Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.313.2.3 2012/08/18 22:03:24 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.313.2.4 2012/09/07 22:17:34 riz Exp $); #include opt_ddb.h #include opt_uvmhist.h
CVS commit: [netbsd-6] src
Module Name:src Committed By: bouyer Date: Fri Sep 7 22:19:28 UTC 2012 Modified Files: src [netbsd-6]: UPDATING Log Message: Pull up following revision(s) (requested by dholland in ticket #549): src/UPDATING: revision 1.238 via patch Add note about cleaning required by last month's openssl update. Closes PR 46816. To generate a diff of this commit: cvs rdiff -u -r1.234.2.1 -r1.234.2.2 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.234.2.1 src/UPDATING:1.234.2.2 --- src/UPDATING:1.234.2.1 Thu Feb 16 19:56:43 2012 +++ src/UPDATING Fri Sep 7 22:19:27 2012 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.234.2.1 2012/02/16 19:56:43 riz Exp $ +$NetBSD: UPDATING,v 1.234.2.2 2012/09/07 22:19:27 bouyer Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,6 +16,12 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20120813: + The update of openssl requires cleaning both the openssl build + directory and DESTDIR; update builds done without taking these + steps may fail, or if not, have been observed to cause + third-party software to link incorrectly. + 20120216: Default for MKCATPAGES changed to NO. Update builds will fail unless DESTDIR is cleaned manually. If you built between 20120207
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Fri Sep 7 22:20:19 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: TIcket 547. To generate a diff of this commit: cvs rdiff -u -r1.1.2.200 -r1.1.2.201 src/doc/CHANGES-6.0 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 diff -u src/doc/CHANGES-6.0:1.1.2.200 src/doc/CHANGES-6.0:1.1.2.201 --- src/doc/CHANGES-6.0:1.1.2.200 Fri Sep 7 22:14:53 2012 +++ src/doc/CHANGES-6.0 Fri Sep 7 22:20:19 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.200 2012/09/07 22:14:53 bouyer Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.201 2012/09/07 22:20:19 riz Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -8508,6 +8508,13 @@ external/gpl3/gcc/dist/gcc/builtins.c 1 Fix gcc on STRICT_ALIGNMENT arches. PR#46865. [martin, ticket #540] +sys/uvm/uvm_km.c1.129-1.135 +sys/uvm/uvm_map.c1.320-1.322 + + Fix a pmap_growkernel issue which caused some systems to reset + very early in the boot sequence. PR#46885. + [para, ticket #547] + doc/README.files1.5 share/man/man7/release.7 1.33, 1.34
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Fri Sep 7 22:21:57 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: ticket 549 To generate a diff of this commit: cvs rdiff -u -r1.1.2.201 -r1.1.2.202 src/doc/CHANGES-6.0 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 diff -u src/doc/CHANGES-6.0:1.1.2.201 src/doc/CHANGES-6.0:1.1.2.202 --- src/doc/CHANGES-6.0:1.1.2.201 Fri Sep 7 22:20:19 2012 +++ src/doc/CHANGES-6.0 Fri Sep 7 22:21:56 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.201 2012/09/07 22:20:19 riz Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.202 2012/09/07 22:21:56 bouyer Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -8521,3 +8521,8 @@ share/man/man7/release.7 1.33, 1.34 Update documentation regarding bootable images. [riz, ticket #548] +UPDATING 1.238 via patch + Add note about cleaning required by last month's openssl update. + Closes PR 46816. + [dholland, ticket #549] +
CVS commit: src/sys
Module Name:src Committed By: msaitoh Date: Sat Sep 8 02:58:13 UTC 2012 Modified Files: src/sys/kern: subr_cprng.c src/sys/netinet: tcp_subr.c Log Message: Fix a bug that kmem_alloc() is called from the interrupt context. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/kern/subr_cprng.c cvs rdiff -u -r1.247 -r1.248 src/sys/netinet/tcp_subr.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.11 src/sys/kern/subr_cprng.c:1.12 --- src/sys/kern/subr_cprng.c:1.11 Fri Sep 7 02:42:13 2012 +++ src/sys/kern/subr_cprng.c Sat Sep 8 02:58:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.12 2012/09/08 02:58:13 msaitoh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include sys/cprng.h -__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.12 2012/09/08 02:58:13 msaitoh Exp $); void cprng_init(void) @@ -284,7 +284,8 @@ rekeyany: * If the generator has just been keyed, perform * the statistical RNG test. */ - if (__predict_false(c-drbg.reseed_counter == 1)) { + if (__predict_false(c-drbg.reseed_counter == 1) + (flags FASYNC) == 0) { rngtest_t *rt = kmem_alloc(sizeof(*rt), KM_NOSLEEP); if (rt) { Index: src/sys/netinet/tcp_subr.c diff -u src/sys/netinet/tcp_subr.c:1.247 src/sys/netinet/tcp_subr.c:1.248 --- src/sys/netinet/tcp_subr.c:1.247 Thu Mar 22 20:34:39 2012 +++ src/sys/netinet/tcp_subr.c Sat Sep 8 02:58:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_subr.c,v 1.247 2012/03/22 20:34:39 drochner Exp $ */ +/* $NetBSD: tcp_subr.c,v 1.248 2012/09/08 02:58:13 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_subr.c,v 1.247 2012/03/22 20:34:39 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_subr.c,v 1.248 2012/09/08 02:58:13 msaitoh Exp $); #include opt_inet.h #include opt_ipsec.h @@ -2214,7 +2214,7 @@ tcp_new_iss1(void *laddr, void *faddr, u */ if (tcp_iss_gotten_secret == false) { cprng_strong(kern_cprng, - tcp_iss_secret, sizeof(tcp_iss_secret), 0); + tcp_iss_secret, sizeof(tcp_iss_secret), FASYNC); tcp_iss_gotten_secret = true; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: matt Date: Sat Sep 8 05:02:42 UTC 2012 Modified Files: src/sys/dev/pci: pciconf.h Log Message: Fix comment To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/pciconf.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/pci/pciconf.h diff -u src/sys/dev/pci/pciconf.h:1.11 src/sys/dev/pci/pciconf.h:1.12 --- src/sys/dev/pci/pciconf.h:1.11 Fri Feb 10 20:52:57 2006 +++ src/sys/dev/pci/pciconf.h Sat Sep 8 05:02:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pciconf.h,v 1.11 2006/02/10 20:52:57 gdamore Exp $ */ +/* $NetBSD: pciconf.h,v 1.12 2012/09/08 05:02:41 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -44,7 +44,7 @@ int pci_configure_bus(pci_chipset_tag_t, struct extent *, struct extent *, int, int); /* Defined in machdep code. Returns the interrupt line to set */ -/* args: chipset_tag, bus, dev, ipin, ptr to interrupt line */ +/* args: chipset_tag, bus, dev, ipin, swiz, ptr to interrupt line */ #ifndef pci_conf_interrupt void pci_conf_interrupt(pci_chipset_tag_t, int, int, int, int, int *); #endif