CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Thu Aug 13 00:07:15 UTC 2015 Modified Files: src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_kvminit.c Log Message: Make sure the amount of direct mapped memory doesn't cross over into the mappable KVA range. To generate a diff of this commit: cvs rdiff -u -r1.22.2.3 -r1.22.2.4 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32/arm32_kvminit.c diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.3 src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.4 --- src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.3 Mon Mar 24 07:37:39 2014 +++ src/sys/arch/arm/arm32/arm32_kvminit.c Thu Aug 13 00:07:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $ */ +/* $NetBSD: arm32_kvminit.c,v 1.22.2.4 2015/08/13 00:07:15 matt Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.4 2015/08/13 00:07:15 matt Exp $); #include sys/param.h #include sys/device.h @@ -773,6 +773,14 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b } } + // The amount we can direct is limited by the start of the + // virtual part of the kernel address space. Don't overrun + // into it. + if (mapallmem_p cur_pv.pv_va + cur_pv.pv_size kernel_vm_base) { + cur_pv.pv_size = kernel_vm_base - cur_pv.pv_va; + } + + /* * Now we map the final chunk. */
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx
Module Name:src Committed By: matt Date: Fri Jul 17 20:32:27 UTC 2015 Modified Files: src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_machdep.c Log Message: Deal with 1GB of memory. To generate a diff of this commit: cvs rdiff -u -r1.7.4.3 -r1.7.4.4 \ src/sys/arch/evbarm/bcm53xx/bcm53xx_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/bcm53xx/bcm53xx_machdep.c diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.3 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.4 --- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.3 Wed Mar 26 02:15:02 2014 +++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Fri Jul 17 20:32:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $ */ +/* $NetBSD: bcm53xx_machdep.c,v 1.7.4.4 2015/07/17 20:32:27 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #define IDM_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.4 2015/07/17 20:32:27 matt Exp $); #include opt_evbarm_boardtype.h #include opt_broadcom.h @@ -258,6 +258,20 @@ initarm(void *arg) #endif const bool bigmem_p = (memsize PGSHIFT) bp_first256.bp_pages; +#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS + const bool mapallmem_p = true; +#ifndef PMAP_NEED_ALLOC_POOLPAGE + if (memsize KERNEL_VM_BASE - KERNEL_BASE) { + printf(%s: dropping RAM size from %luMB to %uMB\n, + __func__, (unsigned long) (ram_size 20), + (KERNEL_VM_BASE - KERNEL_BASE) 20); + memsize = KERNEL_VM_BASE - KERNEL_BASE; + } +#endif +#else + const bool mapallmem_p = false; +#endif + KASSERT((armreg_pfr1_read() ARM_PFR1_SEC_MASK) != 0); arm32_bootmem_init(KERN_VTOPHYS(KERNEL_BASE), memsize, (paddr_t)KERNEL_BASE_phys); @@ -273,7 +287,8 @@ initarm(void *arg) * abtstack, undstack, kernelstack, msgbufphys will be set to point to * the memory that was allocated for them. */ - arm32_kernel_vm_init(KERNEL_VM_BASE, ARM_VECTORS_HIGH, 0, devmap, true); + arm32_kernel_vm_init(KERNEL_VM_BASE, ARM_VECTORS_HIGH, 0, devmap, + mapallmem_p); cpu_reset_address = bcm53xx_system_reset; /* we've a specific device_register routine */
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Mon Jun 9 21:03:20 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: cpufunc.c Log Message: Fix tpyo. To generate a diff of this commit: cvs rdiff -u -r1.89.10.2 -r1.89.10.3 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.89.10.2 src/sys/arch/arm/arm/cpufunc.c:1.89.10.3 --- src/sys/arch/arm/arm/cpufunc.c:1.89.10.2 Wed Mar 26 02:00:45 2014 +++ src/sys/arch/arm/arm/cpufunc.c Mon Jun 9 21:03:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.89.10.2 2014/03/26 02:00:45 matt Exp $ */ +/* $NetBSD: cpufunc.c,v 1.89.10.3 2014/06/09 21:03:19 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.89.10.2 2014/03/26 02:00:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.89.10.3 2014/06/09 21:03:19 matt Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -3057,7 +3057,7 @@ armv7_setup(char *args) #ifdef __ARMEB__ | CPU_CONTROL_EX_BEND #endif -#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS +#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS | CPU_CONTROL_AFLT_ENABLE #endif | CPU_CONTROL_UNAL_ENABLE;
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Wed Apr 2 17:34:51 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: core_elf32.c src/sys/sys [matt-nb5-mips64]: exec_elf.h Log Message: Support coredumps with = 65535 psections. To generate a diff of this commit: cvs rdiff -u -r1.32.16.2 -r1.32.16.3 src/sys/kern/core_elf32.c cvs rdiff -u -r1.95 -r1.95.14.1 src/sys/sys/exec_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/core_elf32.c diff -u src/sys/kern/core_elf32.c:1.32.16.2 src/sys/kern/core_elf32.c:1.32.16.3 --- src/sys/kern/core_elf32.c:1.32.16.2 Sun Aug 23 03:38:19 2009 +++ src/sys/kern/core_elf32.c Wed Apr 2 17:34:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_elf32.c,v 1.32.16.2 2009/08/23 03:38:19 matt Exp $ */ +/* $NetBSD: core_elf32.c,v 1.32.16.3 2014/04/02 17:34:51 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.32.16.2 2009/08/23 03:38:19 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.32.16.3 2014/04/02 17:34:51 matt Exp $); + +#ifdef _KERNEL_OPT +#include opt_coredump.h +#endif /* If not included by core_elf64.c, ELFSIZE won't be defined. */ #ifndef ELFSIZE @@ -98,7 +102,8 @@ ELFNAMEEND(coredump)(struct lwp *l, void { struct proc *p; Elf_Ehdr ehdr; - Elf_Phdr phdr, *psections; + Elf_Shdr shdr; + Elf_Phdr *psections; struct countsegs_state cs; struct writesegs_state ws; off_t notestart, secstart, offset; @@ -151,14 +156,22 @@ ELFNAMEEND(coredump)(struct lwp *l, void ehdr.e_machine = ELFDEFNNAME(MACHDEP_ID); ehdr.e_version = EV_CURRENT; ehdr.e_entry = 0; - ehdr.e_phoff = sizeof(ehdr); - ehdr.e_shoff = 0; ehdr.e_flags = 0; ehdr.e_ehsize = sizeof(ehdr); ehdr.e_phentsize = sizeof(Elf_Phdr); - ehdr.e_phnum = cs.npsections; - ehdr.e_shentsize = 0; - ehdr.e_shnum = 0; + if (cs.npsections PN_XNUM) { + ehdr.e_phnum = cs.npsections; + ehdr.e_shentsize = 0; + ehdr.e_shnum = 0; + ehdr.e_shoff = 0; + ehdr.e_phoff = sizeof(ehdr); + } else { + ehdr.e_phnum = PN_XNUM; + ehdr.e_shentsize = sizeof(Elf_Shdr); + ehdr.e_shnum = 1; + ehdr.e_shoff = sizeof(ehdr); + ehdr.e_phoff = sizeof(ehdr) + sizeof(shdr); + } ehdr.e_shstrndx = 0; #ifdef ELF_MD_COREDUMP_SETUP @@ -170,9 +183,20 @@ ELFNAMEEND(coredump)(struct lwp *l, void if (error) goto out; - offset = sizeof(ehdr); + /* Write out sections, if needed */ + if (cs.npsections = PN_XNUM) { + memset(shdr, 0, sizeof(shdr)); + shdr.sh_type = SHT_NULL; + shdr.sh_info = cs.npsections; + error = coredump_write(cookie, UIO_SYSSPACE, shdr, + sizeof(shdr)); + if (error) + goto out; + } + + offset = ehdr.e_phoff; - notestart = offset + sizeof(phdr) * cs.npsections; + notestart = offset + sizeof(Elf_Phdr) * cs.npsections; secstart = notestart + notesize; psections = malloc(cs.npsections * sizeof(Elf_Phdr), Index: src/sys/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.95 src/sys/sys/exec_elf.h:1.95.14.1 --- src/sys/sys/exec_elf.h:1.95 Mon Apr 28 20:24:10 2008 +++ src/sys/sys/exec_elf.h Wed Apr 2 17:34:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.95 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: exec_elf.h,v 1.95.14.1 2014/04/02 17:34:51 matt Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -343,6 +343,9 @@ typedef struct { #define PF_MASKOS 0x0ff0 /* Operating system specific values */ #define PF_MASKPROC 0xf000 /* Processor-specific values */ +/* Extended program header index. */ +#define PN_XNUM 0x + /* * Section Headers */
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Mar 27 21:11:11 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: param.h Log Message: #define ALIGNBYTES __ALIGNBYTES To generate a diff of this commit: cvs rdiff -u -r1.12.12.3 -r1.12.12.4 src/sys/arch/arm/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/arm/include/param.h diff -u src/sys/arch/arm/include/param.h:1.12.12.3 src/sys/arch/arm/include/param.h:1.12.12.4 --- src/sys/arch/arm/include/param.h:1.12.12.3 Thu Mar 27 01:04:39 2014 +++ src/sys/arch/arm/include/param.h Thu Mar 27 21:11:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.12.12.3 2014/03/27 01:04:39 matt Exp $ */ +/* $NetBSD: param.h,v 1.12.12.4 2014/03/27 21:11:11 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -148,7 +148,7 @@ #define MID_MACHINE MID_ARM6 /* ARM-specific macro to align a stack pointer (downwards). */ -#define ALIGNBYTES (__ALIGNBYTES + 1) +#define ALIGNBYTES __ALIGNBYTES #define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) (((uintptr_t)(p) % sizeof(t)) == 0) #define STACKALIGNBYTES (8 - 1)
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Thu Mar 27 23:21:36 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S Log Message: Don't = since that isn't BE8 friendly To generate a diff of this commit: cvs rdiff -u -r1.12.2.5 -r1.12.2.6 src/sys/arch/arm/cortex/a9_mpsubr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.5 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.6 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.5 Wed Mar 26 02:13:54 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Thu Mar 27 23:21:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.12.2.5 2014/03/26 02:13:54 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.12.2.6 2014/03/27 23:21:36 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -341,7 +341,7 @@ cortex_init: bl _C_LABEL(armv7_icache_inv_all) @ invalidate i-cache #else adr ip, cortex_init - ldr r0, =armv7_icache_inv_all + ldr r0, .Larmv7_icache_inv_all bfi ip, r0, #0, #28 blx ip #endif @@ -370,7 +370,7 @@ cortex_init: bl _C_LABEL(armv7_dcache_wbinv_all) @ writeback/invalidate d-cache #else adr ip, cortex_init - ldr r0, =armv7_dcache_wbinv_all + ldr r0, .Larmv7_dcache_wbinv_all bfi ip, r0, #0, #28 blx ip #endif @@ -401,7 +401,7 @@ cortex_init: bl _C_LABEL(armv7_icache_inv_all) @ invalidate i-cache #else adr ip, cortex_init - ldr r0, =armv7_icache_inv_all + ldr r0, .Larmv7_icache_inv_all bfi ip, r0, #0, #28 blx ip #endif @@ -432,6 +432,13 @@ cortex_init: #endif bx r10 + +#ifndef KERNEL_BASES_EQUAL +.Larmv7_icache_inv_all: + .word armv7_icache_inv_all +.Larmv7_dcache_wbinv_all: + .word armv7_dcache_wbinv_all +#endif ASEND(a9_start) /*
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Mar 26 22:44:42 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: cdefs.h Log Message: Make the minimal alignment 8 if EABI or ldrd/strd are supported. To generate a diff of this commit: cvs rdiff -u -r1.3.38.1 -r1.3.38.2 src/sys/arch/arm/include/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/cdefs.h diff -u src/sys/arch/arm/include/cdefs.h:1.3.38.1 src/sys/arch/arm/include/cdefs.h:1.3.38.2 --- src/sys/arch/arm/include/cdefs.h:1.3.38.1 Thu Dec 19 01:17:06 2013 +++ src/sys/arch/arm/include/cdefs.h Wed Mar 26 22:44:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.3.38.1 2013/12/19 01:17:06 matt Exp $ */ +/* $NetBSD: cdefs.h,v 1.3.38.2 2014/03/26 22:44:41 matt Exp $ */ #ifndef _ARM_CDEFS_H_ #define _ARM_CDEFS_H_ @@ -40,8 +40,8 @@ #define _ARM_ARCH_DWORD_OK #endif -#ifdef __ARM_EABI__ -#define __ALIGNBYTES (8 - 1) +#if defined(__ARM_EABI__) || defined(_ARM_ARCH_DWORD_OK) +#define __ALIGNBYTES (sizeof(long long) - 1) #else #define __ALIGNBYTES (sizeof(int) - 1) #endif
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Wed Mar 26 23:43:45 UTC 2014 Modified Files: src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_cca.c Log Message: Only 5301X has GPIO via CCA To generate a diff of this commit: cvs rdiff -u -r1.1.16.3 -r1.1.16.4 src/sys/arch/arm/broadcom/bcm53xx_cca.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/bcm53xx_cca.c diff -u src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.3 src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.4 --- src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.3 Wed Mar 26 02:02:29 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_cca.c Wed Mar 26 23:43:45 2014 @@ -43,7 +43,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.3 2014/03/26 02:02:29 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.4 2014/03/26 23:43:45 matt Exp $); #include sys/param.h #include sys/bus.h @@ -177,7 +177,7 @@ bcmcca_mainbus_attach(device_t parent, d aprint_normal_dev(sc-sc_dev, interrupting at irq %d\n, IRQ_CCA); bcmcca_uart_attach(sc); -#if NGPIO 0 +#if NGPIO 0 defined(BCM5301X) bcmcca_gpio_attach(sc); #endif }
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Thu Mar 27 00:28:48 UTC 2014 Modified Files: src/sys/arch/evbarm/conf [matt-nb5-mips64]: std.bcm53xx Log Message: Add ARM_HAS_VBAR To generate a diff of this commit: cvs rdiff -u -r1.13.2.3 -r1.13.2.4 src/sys/arch/evbarm/conf/std.bcm53xx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/std.bcm53xx diff -u src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.3 src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.4 --- src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.3 Sat Feb 15 17:50:02 2014 +++ src/sys/arch/evbarm/conf/std.bcm53xx Thu Mar 27 00:28:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: std.bcm53xx,v 1.13.2.3 2014/02/15 17:50:02 matt Exp $ +# $NetBSD: std.bcm53xx,v 1.13.2.4 2014/03/27 00:28:48 matt Exp $ # # standard NetBSD/evbarm for BCM5301X options @@ -14,6 +14,7 @@ options CORTEX_PMC options _ARM32_NEED_BUS_DMA_BOUNCE options PMAP_NEED_ALLOC_POOLPAGE options __HAVE_FAST_SOFTINTS # should be in types.h +options ARM_HAS_VBAR options __HAVE_CPU_UAREA_ALLOC_IDLELWP options __HAVE_CPU_COUNTER options __HAVE_PCI_CONF_HOOK
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Mar 27 01:04:39 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: param.h Log Message: Make ALIGNBYTES use __ALIGNBYTES To generate a diff of this commit: cvs rdiff -u -r1.12.12.2 -r1.12.12.3 src/sys/arch/arm/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/arm/include/param.h diff -u src/sys/arch/arm/include/param.h:1.12.12.2 src/sys/arch/arm/include/param.h:1.12.12.3 --- src/sys/arch/arm/include/param.h:1.12.12.2 Sat Feb 15 16:30:23 2014 +++ src/sys/arch/arm/include/param.h Thu Mar 27 01:04:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.12.12.2 2014/02/15 16:30:23 matt Exp $ */ +/* $NetBSD: param.h,v 1.12.12.3 2014/03/27 01:04:39 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -148,7 +148,7 @@ #define MID_MACHINE MID_ARM6 /* ARM-specific macro to align a stack pointer (downwards). */ -#define ALIGNBYTES 3 +#define ALIGNBYTES (__ALIGNBYTES + 1) #define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) (((uintptr_t)(p) % sizeof(t)) == 0) #define STACKALIGNBYTES (8 - 1)
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Mar 26 01:15:48 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h Log Message: sync with HEAD To generate a diff of this commit: cvs rdiff -u -r1.41.12.2 -r1.41.12.3 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.41.12.2 src/sys/arch/arm/include/armreg.h:1.41.12.3 --- src/sys/arch/arm/include/armreg.h:1.41.12.2 Mon Mar 24 18:43:40 2014 +++ src/sys/arch/arm/include/armreg.h Wed Mar 26 01:15:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.41.12.2 2014/03/24 18:43:40 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.41.12.3 2014/03/26 01:15:48 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -58,13 +58,24 @@ #define PSR_V_bit (1 28) /* overflow */ #define PSR_Q_bit (1 27) /* saturation */ +#define PSR_IT1_bit (1 26) +#define PSR_IT0_bit (1 25) +#define PSR_J_bit (1 24) /* Jazelle mode */ +#define PSR_GE_bits (15 16) /* SIMD GE bits */ +#define PSR_IT7_bit (1 15) +#define PSR_IT6_bit (1 14) +#define PSR_IT5_bit (1 13) +#define PSR_IT4_bit (1 12) +#define PSR_IT3_bit (1 11) +#define PSR_IT2_bit (1 10) +#define PSR_E_BIT (1 9) /* Endian state */ +#define PSR_A_BIT (1 8) /* Async abort disable */ #define I32_bit (1 7) /* IRQ disable */ #define F32_bit (1 6) /* FIQ disable */ -#define IF32_bits (3 6) /* IRQ/FIQ disable */ +#define IF32_bits (3 6) /* IRQ/FIQ disable */ #define PSR_T_bit (1 5) /* Thumb state */ -#define PSR_J_bit (1 24) /* Java mode */ #define PSR_MODE 0x001f /* mode mask */ #define PSR_USR26_MODE 0x @@ -258,6 +269,11 @@ #define CPU_ID_ARM_88SV584X_V6 0x410fb020 /* Marvell Sheeva 88SV584x v6 Core */ /* CPUID registers */ +#define ARM_ISA3_SYNCHPRIM_MASK 0xf000 +#define ARM_ISA4_SYNCHPRIM_MASK 0x00f0 +#define ARM_ISA3_SYNCHPRIM_LDREX 0x10 // LDREX +#define ARM_ISA3_SYNCHPRIM_LDREXPLUS 0x13 // +CLREX/LDREXB/LDREXH +#define ARM_ISA3_SYNCHPRIM_LDREXD 0x20 // +LDREXD #define ARM_PFR0_THUMBEE_MASK 0xf000 #define ARM_PFR1_GTIMER_MASK 0x000f #define ARM_PFR1_VIRT_MASK 0xf000 @@ -347,6 +363,9 @@ #define CPU_CONTROL_VECRELOC 0x2000 /* V: Vector relocation */ #define CPU_CONTROL_ROUNDROBIN 0x4000 /* RR: Predictable replacement */ #define CPU_CONTROL_V4COMPAT 0x8000 /* L4: ARMv4 compat LDR R15 etc */ +#define CPU_CONTROL_HA_ENABLE 0x0002 /* HA: Hardware Access flag enable */ +#define CPU_CONTROL_WXN_ENABLE 0x0008 /* WXN: Write Execute Never */ +#define CPU_CONTROL_UWXN_ENABLE 0x0010 /* UWXN: User Write eXecute Never */ #define CPU_CONTROL_FI_ENABLE 0x0020 /* FI: Low interrupt latency */ #define CPU_CONTROL_UNAL_ENABLE 0x0040 /* U: unaligned data access */ #define CPU_CONTROL_XP_ENABLE 0x0080 /* XP: extended page table */ @@ -368,6 +387,13 @@ #define CPACR_RESERVED 2 #define CPACR_ALL 3 /* Privileged and User mode access */ +/* ARMv6/ARMv7 Non-Secure Access Control Register (CP15, 0, c1, c1, 2) */ +#define NSACR_SMP 0x0004 /* ACTRL.SMP is writeable (!A8) */ +#define NSACR_L2ERR 0x0002 /* L2ECTRL is writeable (!A8) */ +#define NSACR_ASEDIS 0x8000 /* Deny Advanced SIMD Ext. */ +#define NSACR_D32DIS 0x4000 /* Deny VFP regs 15-31 */ +#define NSACR_CPn(n) (1 (n)) /* NonSecure access allowed */ + /* ARM11x6 Auxiliary Control Register (CP15 register 1, opcode2 1) */ #define ARM11X6_AUXCTL_RS 0x0001 /* return stack */ #define ARM11X6_AUXCTL_DB 0x0002 /* dynamic branch prediction */ @@ -521,7 +547,11 @@ #define FAULT_PERM_S0x0d /* Permission -- Section */ #define FAULT_PERM_P0x0f /* Permission -- Page */ -#define FAULT_IMPRECISE 0x400 /* Imprecise exception (XSCALE) */ +#define FAULT_LPAE 0x0200 /* (SW) used long descriptors */ +#define FAULT_IMPRECISE 0x0400 /* Imprecise exception (XSCALE) */ +#define FAULT_WRITE 0x0800 /* fault was due to write (ARMv6+) */ +#define FAULT_EXT 0x1000 /* fault was due to external abort (ARMv6+) */ +#define FAULT_CM 0x2000 /* fault was due to cache maintenance (ARMv7+) */ /* * Address of the vector page, low and high versions. @@ -542,7 +572,21 @@ #define INSN_SIZE 4 /* Always 4 bytes */ #define INSN_COND_MASK 0xf000 /* Condition mask */ -#define INSN_COND_AL 0xe000 /* Always condition */ +#define INSN_COND_EQ 0 /* Z == 1 */ +#define INSN_COND_NE 1 /* Z == 0 */ +#define INSN_COND_CS 2 /* C == 1 */ +#define INSN_COND_CC 3 /* C == 0 */ +#define INSN_COND_MI 4 /* N == 1 */ +#define INSN_COND_PL 5 /* N == 0 */ +#define INSN_COND_VS 6 /* V == 1 */ +#define INSN_COND_VC 7 /* V == 0 */ +#define INSN_COND_HI 8 /* C == 1 Z == 0 */ +#define INSN_COND_LS 9 /* C == 0 || Z == 1 */ +#define INSN_COND_GE 10 /* N == V */ +#define INSN_COND_LT 11 /* N != V */ +#define INSN_COND_GT 12 /* Z ==
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Wed Mar 26 01:57:04 UTC 2014 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c Log Message: Use ahci_resume To generate a diff of this commit: cvs rdiff -u -r1.12.4.2.4.1 -r1.12.4.2.4.2 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.2 --- src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1 Tue Nov 5 18:32:45 2013 +++ src/sys/dev/pci/ahcisata_pci.c Wed Mar 26 01:57:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $); #include sys/types.h #include sys/malloc.h @@ -211,10 +211,7 @@ ahci_pci_resume(device_t dv PMF_FN_ARGS) int s; s = splbio(); - ahci_reset(sc); - ahci_setup_ports(sc); - ahci_reprobe_drives(sc); - ahci_enable_intrs(sc); + ahci_resume(sc); splx(s); return true;
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Wed Mar 26 01:59:08 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: gic.c Log Message: Let bus_space so the endian conversion if needed To generate a diff of this commit: cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/cortex/gic.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/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.5.2.2 src/sys/arch/arm/cortex/gic.c:1.5.2.3 --- src/sys/arch/arm/cortex/gic.c:1.5.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/cortex/gic.c Wed Mar 26 01:59:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gic.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: gic.c,v 1.5.2.3 2014/03/26 01:59:08 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #define _INTR_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.5.2.3 2014/03/26 01:59:08 matt Exp $); #include sys/param.h #include sys/bus.h @@ -109,28 +109,24 @@ __CTASSERT(NIPL == 8); static inline uint32_t gicc_read(struct armgic_softc *sc, bus_size_t o) { - uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicch, o); - return le32toh(v); + return bus_space_read_4(sc-sc_memt, sc-sc_gicch, o); } static inline void gicc_write(struct armgic_softc *sc, bus_size_t o, uint32_t v) { - v = htole32(v); bus_space_write_4(sc-sc_memt, sc-sc_gicch, o, v); } static inline uint32_t gicd_read(struct armgic_softc *sc, bus_size_t o) { - uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o); - return le32toh(v); + return bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o); } static inline void gicd_write(struct armgic_softc *sc, bus_size_t o, uint32_t v) { - v = htole32(v); bus_space_write_4(sc-sc_memt, sc-sc_gicdh, o, v); }
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Wed Mar 26 02:00:46 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: cpufunc.c Log Message: For armv7, enable BE properly. Make sure UNAL is always set. To generate a diff of this commit: cvs rdiff -u -r1.89.10.1 -r1.89.10.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.89.10.1 src/sys/arch/arm/arm/cpufunc.c:1.89.10.2 --- src/sys/arch/arm/arm/cpufunc.c:1.89.10.1 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/cpufunc.c Wed Mar 26 02:00:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.89.10.1 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: cpufunc.c,v 1.89.10.2 2014/03/26 02:00:45 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.89.10.1 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.89.10.2 2014/03/26 02:00:45 matt Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -3053,20 +3053,15 @@ armv7_setup(char *args) int cpuctrl; cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_IC_ENABLE - | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE ; -#if 0 - int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_BPRD_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE - | CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK; + | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE +#ifdef __ARMEB__ + | CPU_CONTROL_EX_BEND #endif - #ifdef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_UNAL_ENABLE; -#else - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; + | CPU_CONTROL_AFLT_ENABLE #endif + | CPU_CONTROL_UNAL_ENABLE; + const int cpuctrlmask = cpuctrl | CPU_CONTROL_AFLT_ENABLE; cpuctrl = parse_cpu_options(args, armv7_options, cpuctrl); @@ -3080,7 +3075,7 @@ armv7_setup(char *args) /* Set the control register */ curcpu()-ci_ctrl = cpuctrl; - cpu_control(0x, cpuctrl); + cpu_control(cpuctrlmask, cpuctrl); } #endif /* CPU_CORTEX */
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Wed Mar 26 02:01:10 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: arm_machdep.c Log Message: If BE on armv7, set PSR_E_BIT To generate a diff of this commit: cvs rdiff -u -r1.21.8.1 -r1.21.8.2 src/sys/arch/arm/arm/arm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/arm_machdep.c diff -u src/sys/arch/arm/arm/arm_machdep.c:1.21.8.1 src/sys/arch/arm/arm/arm_machdep.c:1.21.8.2 --- src/sys/arch/arm/arm/arm_machdep.c:1.21.8.1 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/arm_machdep.c Wed Mar 26 02:01:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arm_machdep.c,v 1.21.8.1 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: arm_machdep.c,v 1.21.8.2 2014/03/26 02:01:10 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -79,7 +79,7 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: arm_machdep.c,v 1.21.8.1 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: arm_machdep.c,v 1.21.8.2 2014/03/26 02:01:10 matt Exp $); #include sys/exec.h #include sys/proc.h @@ -173,12 +173,20 @@ setregs(struct lwp *l, struct exec_packa tf-tf_svc_lr = 0x; /* Something we can see */ tf-tf_pc = pack-ep_entry; #ifdef __PROG32 +#if defined(__ARMEB__) + /* + * If we are running on ARMv7, we need to set the E bit to force + * programs to start as big endian. + */ + tf-tf_spsr = PSR_USR32_MODE | (CPU_IS_ARMV7_P() ? PSR_E_BIT : 0); +#else tf-tf_spsr = PSR_USR32_MODE; +#endif /* __ARMEB__ */ #ifdef THUMB_CODE if (pack-ep_entry 1) tf-tf_spsr |= PSR_T_bit; #endif -#endif +#endif /* __PROG32 */ l-l_md.md_flags = 0; #ifdef EXEC_AOUT
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Wed Mar 26 02:02:29 UTC 2014 Modified Files: src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_cca.c Log Message: For non-BCM5301X, set frequency to 1/4 of the apb clock. To generate a diff of this commit: cvs rdiff -u -r1.1.16.2 -r1.1.16.3 src/sys/arch/arm/broadcom/bcm53xx_cca.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/bcm53xx_cca.c diff -u src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.2 src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.3 --- src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_cca.c Wed Mar 26 02:02:29 2014 @@ -43,7 +43,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.3 2014/03/26 02:02:29 matt Exp $); #include sys/param.h #include sys/bus.h @@ -279,7 +279,13 @@ com_cca_attach(device_t parent, device_t bus_space_handle_t bsh; sc-sc_dev = self; + +#ifdef BCM5301X sc-sc_frequency = BCM53XX_REF_CLK; +#else + const struct cpu_softc * const cpu = curcpu()-ci_softc; + sc-sc_frequency = cpu-cpu_clk.clk_apb / 4; +#endif sc-sc_type = COM_TYPE_NORMAL; if (com_is_console(ccaaa-ccaaa_bst, addr, bsh) == 0
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Wed Mar 26 02:13:54 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S Log Message: flush the icache after enabling the SCU To generate a diff of this commit: cvs rdiff -u -r1.12.2.4 -r1.12.2.5 src/sys/arch/arm/cortex/a9_mpsubr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.4 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.5 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.4 Mon Mar 24 18:44:13 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Wed Mar 26 02:13:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.12.2.4 2014/03/24 18:44:13 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.12.2.5 2014/03/26 02:13:54 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -397,13 +397,23 @@ cortex_init: isb XPUTC(#50) +#ifdef KERNEL_BASES_EQUAL + bl _C_LABEL(armv7_icache_inv_all) @ invalidate i-cache +#else + adr ip, cortex_init + ldr r0, =armv7_icache_inv_all + bfi ip, r0, #0, #28 + blx ip +#endif + XPUTC(#51) + /* * Step 4a, enable the data cache */ orr r2, r2, #CPU_CONTROL_DC_ENABLE @ set data cache enable mcr p15, 0, r2, c1, c0, 0 @ reenable caches isb - XPUTC(#51) + XPUTC(#52) #endif /*
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx
Module Name:src Committed By: matt Date: Wed Mar 26 02:15:02 UTC 2014 Modified Files: src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_machdep.c Log Message: Use apb/4 for the com freq on !BCM5301X To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 \ src/sys/arch/evbarm/bcm53xx/bcm53xx_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/bcm53xx/bcm53xx_machdep.c diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.3 --- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.2 Sat Feb 15 16:18:37 2014 +++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Wed Mar 26 02:15:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_machdep.c,v 1.7.4.2 2014/02/15 16:18:37 matt Exp $ */ +/* $NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #define IDM_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.2 2014/02/15 16:18:37 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $); #include opt_evbarm_boardtype.h #include opt_broadcom.h @@ -330,14 +330,20 @@ consinit(void) /* * Switch to the reference clock */ +#ifdef BCM5301X + const int comfreq = BCM53XX_REF_CLK; v = bus_space_read_4(bcm53xx_ioreg_bst, bcm53xx_ioreg_bsh, CCA_MISC_BASE + MISC_CORECTL); v = ~CORECTL_UART_CLK_OVERRIDE; bus_space_write_4(bcm53xx_ioreg_bst, bcm53xx_ioreg_bsh, CCA_MISC_BASE + MISC_CORECTL, v); +#else + const struct cpu_softc * const cpu = curcpu()-ci_softc; + const int comfreq = cpu-cpu_clk.clk_apb / 4; +#endif if (comcnattach(bcm53xx_ioreg_bst, comcnaddr, comcnspeed, -BCM53XX_REF_CLK, COM_TYPE_NORMAL, comcnmode)) +comfreq, COM_TYPE_NORMAL, comcnmode)) panic(Serial console can not be initialized.); }
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx
Module Name:src Committed By: matt Date: Wed Mar 26 02:16:05 UTC 2014 Modified Files: src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_start.S Log Message: Use adr/bfi to access kernel variables. To generate a diff of this commit: cvs rdiff -u -r1.10.2.2 -r1.10.2.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_start.S diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.3 --- src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.2 Sat Feb 15 16:18:37 2014 +++ src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S Wed Mar 26 02:16:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_start.S,v 1.10.2.2 2014/02/15 16:18:37 matt Exp $ */ +/* $NetBSD: bcm53xx_start.S,v 1.10.2.3 2014/03/26 02:16:05 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -45,7 +45,7 @@ #define CONADDR 0x18000300 #endif -RCSID($NetBSD: bcm53xx_start.S,v 1.10.2.2 2014/02/15 16:18:37 matt Exp $) +RCSID($NetBSD: bcm53xx_start.S,v 1.10.2.3 2014/03/26 02:16:05 matt Exp $) #undef VERBOSE_INIT_ARM #define VERBOSE_INIT_ARM @@ -74,10 +74,14 @@ _C_LABEL(bcm53xx_start): /* * Save any arguments u-boot passed us. */ - ldr r4, .Luboot_args_pic0 - add r4, r4, pc +#ifdef KERNEL_BASES_EQUAL + ldr r4, .Luboot_args +#else + adr r4, bcm53xx_start + ldr r5, .Luboot_args + bfi r4, r5, #0, #28 +#endif stmia r4, {r0-r3} -.LPIC0: /* * Let's turn on the CCA watchdog in case something goes horribly wrong. @@ -121,15 +125,6 @@ _C_LABEL(bcm53xx_start): XPUTC(#89) - ldr r0, .Luboot_args - ldr r2, [r0] - ldr r1, .Luboot_args_pic1 - add r1, r1, pc - ldr r1, [r1] -.LPIC1: - cmp r1, r2 -1: bne 1b - XPUTC(#90) /* @@ -153,10 +148,6 @@ _C_LABEL(bcm53xx_start): nop /* NOTREACHED */ -.Luboot_args_pic0: - .word uboot_args - .LPIC0 -.Luboot_args_pic1: - .word uboot_args - .LPIC0 .Luboot_args: .word uboot_args .Lstart:
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Wed Mar 26 03:19:32 UTC 2014 Modified Files: src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c bcm53xx_ccb.c Log Message: Allow SRAB to be optional To generate a diff of this commit: cvs rdiff -u -r1.17.2.3 -r1.17.2.4 src/sys/arch/arm/broadcom/bcm53xx_board.c cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/broadcom/bcm53xx_ccb.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/bcm53xx_board.c diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.4 --- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3 Wed Feb 19 23:19:57 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_board.c Wed Mar 26 03:19:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $ */ +/* $NetBSD: bcm53xx_board.c,v 1.17.2.4 2014/03/26 03:19:32 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.4 2014/03/26 03:19:32 matt Exp $); #include sys/param.h #include sys/bus.h @@ -640,6 +640,7 @@ bcm53xx_device_register(device_t self, v } } +#ifdef SRAB_BASE static kmutex_t srab_lock __cacheline_aligned; void @@ -742,3 +743,4 @@ bcm53xx_srab_write_8(u_int pageoffset, u bcm53xx_srab_busywait(bst, bsh); mutex_spin_exit(srab_lock); } +#endif /* SRAB_BASE */ Index: src/sys/arch/arm/broadcom/bcm53xx_ccb.c diff -u src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.2 src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.3 --- src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_ccb.c Wed Mar 26 03:19:32 2014 @@ -34,7 +34,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.5.2.3 2014/03/26 03:19:32 matt Exp $); #include sys/param.h #include sys/bus.h @@ -99,7 +99,9 @@ static const struct bcm_locators bcmccb_ { bcmrng, RNG_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_RNG } }, { bcmtmr, TIMER0_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER0_1, IRQ_TIMER0_2 } }, { bcmtmr, TIMER1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER1_1, IRQ_TIMER1_2 } }, +#ifdef SRAB_BASE { bcmsw, SRAB_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, }, +#endif { bcmcom, UART2_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_UART2 } }, #ifdef BCM5301X { bcmi2c, SMBUS1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_SMBUS1 } },
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Wed Mar 26 03:20:18 UTC 2014 Modified Files: src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_reg.h Log Message: Sync with HEAD. To generate a diff of this commit: cvs rdiff -u -r1.14.2.2 -r1.14.2.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_reg.h diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.2 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.3 --- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_reg.h Wed Mar 26 03:20:18 2014 @@ -45,183 +45,196 @@ * 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_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 +#define BCM53XX_IOREG_PBASE 0x1800 +#define BCM53XX_IOREG_SIZE 0x0020 -#define BCM53XX_ARMCORE_PBASE 0x1900 -#define BCM53XX_ARMCORE_SIZE 0x0010 +#define BCM53XX_ARMCORE_PBASE 0x1900 +#define BCM53XX_ARMCORE_SIZE 0x0010 -#define BCM53XX_NAND_PBASE 0x1c00 -#define BCM53XX_NAND_SIZE 0x0100 +#define BCM53XX_NAND_PBASE 0x1c00 +#define BCM53XX_NAND_SIZE 0x0100 -#define BCM53XX_SPIFLASH_PBASE 0x1d00 -#define BCM53XX_SPIFLASH_SIZE 0x0100 +#define BCM53XX_SPIFLASH_PBASE 0x1d00 +#define BCM53XX_SPIFLASH_SIZE 0x0100 -#define BCM53XX_PCIE1_OWIN_PBASE 0x4000 -#define BCM53XX_PCIE1_OWIN_SIZE 0x0400 -#define BCM53XX_PCIE1_OWIN_MAX 0x0800 +#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_PCIE2_OWIN_PBASE 0x4800 +#define BCM53XX_PCIE2_OWIN_SIZE 0x0400 +#define BCM53XX_PCIE2_OWIN_MAX 0x0800 -#define BCM53XX_IO_SIZE (BCM53XX_IOREG_SIZE \ +#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) +#define BCM53XX_REF_CLK (25*1000*1000) -#define CCA_UART_FREQ BCM53XX_REF_CLK +#define CCA_UART_FREQ BCM53XX_REF_CLK /* Chip Common A */ -#define CCA_MISC_BASE 0x00 -#define CCA_MISC_SIZE 0x001000 -#define CCA_UART0_BASE 0x000300 -#define CCA_UART1_BASE 0x000400 +#define CCA_MISC_BASE 0x00 +#define CCA_MISC_SIZE 0x001000 +#define CCA_UART0_BASE 0x000300 +#define CCA_UART1_BASE 0x000400 /* Chip Common B */ -#define CCB_BASE 0x00 -#define CCB_SIZE 0x03 -#define PWM_BASE 0x002000 -#define MII_BASE 0x003000 -#define RNG_BASE 0x004000 -#define TIMER0_BASE 0x005000 -#define TIMER1_BASE 0x006000 -#define SRAB_BASE 0x007000 +#define CCB_BASE 0x00 +#ifdef BCM5301X +#define CCB_SIZE 0x03 +#define PWM_BASE 0x002000 +#define MII_BASE 0x003000 +#define RNG_BASE 0x004000 +#define TIMER0_BASE 0x005000 +#define TIMER1_BASE 0x006000 +#define SRAB_BASE 0x007000 +#define UART2_BASE 0x008000 +#define SMBUS1_BASE 0x009000 + +#define CRU_BASE 0x00b000 +#define DMU_BASE 0x00c000 +#elif defined(BCM563XX) +#define CCB_SIZE 0x04 +#define GPIO_BASE 0x03 +#define PWM_BASE 0x031000 +#define MII_BASE 0x032000 +#define RNG_BASE 0x033000 +#define TIMER0_BASE 0x034000 +#define TIMER1_BASE 0x035000 +#define UART2_BASE 0x037000 +#define SMBUS0_BASE 0x038000 +#define WDT_BASE 0x039000 +#define PKA_BASE 0x03a000 +#define SMBUS1_BASE 0x03b000 -#define CRU_BASE 0x00b000 -#define DMU_BASE 0x00c000 +#define CRU_BASE 0x03e000 +#define DMU_BASE 0x03f000 +#endif -#define DDR_BASE 0x01 +#define DDR_BASE 0x01 -#define PCIE0_BASE 0x012000 -#define PCIE1_BASE 0x013000 +#define PCIE0_BASE 0x012000 +#define PCIE1_BASE 0x013000 #ifdef BCM5301X -#define UART2_BASE 0x008000 -#define SMBUS1_BASE 0x009000 -#define PCIE2_BASE 0x014000 +#define PCIE2_BASE 0x014000 #define SDIO_BASE 0x02 -#define EHCI_BASE 0x021000 -#define OHCI_BASE 0x022000 -#define GMAC0_BASE 0x024000 -#define GMAC1_BASE 0x025000 -#define GMAC2_BASE 0x026000 -#define GMAC3_BASE 0x027000 -#define NAND_BASE 0x028000 +#define EHCI_BASE 0x021000 +#define OHCI_BASE 0x022000 +#define GMAC0_BASE 0x024000 +#define GMAC1_BASE 0x025000 +#define GMAC2_BASE 0x026000 +#define GMAC3_BASE 0x027000 +#define NAND_BASE 0x028000 #define QSPI_BASE 0x029000 #define I2S_BASE 0x02A000 #define DMAC_BASE
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Mon Mar 24 07:36:48 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: subr_evcnt.c Log Message: Fix infinite recursion. To generate a diff of this commit: cvs rdiff -u -r1.4.94.3 -r1.4.94.4 src/sys/kern/subr_evcnt.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_evcnt.c diff -u src/sys/kern/subr_evcnt.c:1.4.94.3 src/sys/kern/subr_evcnt.c:1.4.94.4 --- src/sys/kern/subr_evcnt.c:1.4.94.3 Sat Feb 15 10:13:24 2014 +++ src/sys/kern/subr_evcnt.c Mon Mar 24 07:36:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $ */ +/* $NetBSD: subr_evcnt.c,v 1.4.94.4 2014/03/24 07:36:48 matt Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.4 2014/03/24 07:36:48 matt Exp $); #include opt_ddb.h @@ -153,7 +153,7 @@ evcnt_attach_dynamic(struct evcnt *ev, i const char *group, const char *name) { memset(ev, 0, sizeof *ev); - evcnt_attach_dynamic(ev, type, parent, group, name); + evcnt_attach_dynamic_nozero(ev, type, parent, group, name); } void
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Mon Mar 24 07:37:39 UTC 2014 Modified Files: src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_kvminit.c Log Message: Make sure kernel starts on a page boundary. To generate a diff of this commit: cvs rdiff -u -r1.22.2.2 -r1.22.2.3 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32/arm32_kvminit.c diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.2 src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.3 --- src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/arm32/arm32_kvminit.c Mon Mar 24 07:37:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_kvminit.c,v 1.22.2.2 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $); #include sys/param.h #include sys/device.h @@ -182,7 +182,7 @@ arm32_bootmem_init(paddr_t memstart, psi /* * Let's record where the kernel lives. */ - bmi-bmi_kernelstart = kernelstart; + bmi-bmi_kernelstart = trunc_page(kernelstart); bmi-bmi_kernelend = KERN_VTOPHYS(bmi, round_page((vaddr_t)_end)); #ifdef VERBOSE_INIT_ARM
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon Mar 24 07:37:14 UTC 2014 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_page.c Log Message: Make sure the hint is initialized to NULL. To generate a diff of this commit: cvs rdiff -u -r1.140.6.3.4.11 -r1.140.6.3.4.12 src/sys/uvm/uvm_page.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_page.c diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.11 src/sys/uvm/uvm_page.c:1.140.6.3.4.12 --- src/sys/uvm/uvm_page.c:1.140.6.3.4.11 Sat Feb 15 10:19:14 2014 +++ src/sys/uvm/uvm_page.c Mon Mar 24 07:37:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.140.6.3.4.12 2014/03/24 07:37:14 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.12 2014/03/24 07:37:14 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -328,6 +328,7 @@ uvm_page_init_freelist(struct pgfreelist for (size_t queue = 0; queue PGFL_NQUEUES; queue++) { LIST_INIT(pgfl-pgfl_queues[free_list][queue]); } + pgfl-pgfl_hint = NULL; pgfl-pgfl_pggroups[free_list] = pggroups[free_list * uvmexp.ncolors + color]; pgfl-pgfl_pggroups[free_list]-pgrp_free_list = free_list;
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Mon Mar 24 16:50:57 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: pmap.h Log Message: Define PMAP_KMPAGE To generate a diff of this commit: cvs rdiff -u -r1.88.10.1 -r1.88.10.2 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.88.10.1 src/sys/arch/arm/include/arm32/pmap.h:1.88.10.2 --- src/sys/arch/arm/include/arm32/pmap.h:1.88.10.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/arm32/pmap.h Mon Mar 24 16:50:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.88.10.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.88.10.2 2014/03/24 16:50:56 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -305,8 +305,8 @@ void pmap_remove_all(struct pmap *); bool pmap_extract(struct pmap *, vaddr_t, paddr_t *); #define PMAP_NEED_PROCWR -#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ -#define PMAP_ENABLE_PMAP_KMPAGE /* enable the PMAP_KMPAGE flag */ +#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ +#define PMAP_KMPAGE 0x0800 /* enable the PMAP_KMPAGE flag */ #if (ARM_MMU_V6 + ARM_MMU_V7) 0 #define PMAP_PREFER(hint, vap, sz, td) pmap_prefer((hint), (vap), (td))
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Mon Mar 24 18:42:50 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: vmparam.h Log Message: Deal with those arms who only need one type of freelist. To generate a diff of this commit: cvs rdiff -u -r1.23.12.1 -r1.23.12.2 src/sys/arch/arm/include/arm32/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/arm/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.1 src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.2 --- src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/arm32/vmparam.h Mon Mar 24 18:42:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.23.12.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.23.12.2 2014/03/24 18:42:50 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -112,8 +112,12 @@ extern vaddr_t virtual_end; (VM_NFREELIST == 1 \ ? VM_PGCOLOR_BUCKET(pg) : (*arm_page_to_pggroup)((pg), (ncolors))) +#ifdef PMAP_NEED_ALLOC_POOLPAGE #define VM_FREELIST_NORMALOK_P(lcv) \ ((lcv) == VM_FREELIST_DEFAULT || (lcv) != arm_poolpage_vmfreelist) +#else +#define VM_FREELIST_NORMALOK_P(lcv) true +#endif struct vm_page; extern size_t (*arm_page_to_pggroup)(struct vm_page *, size_t);
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Mon Mar 24 18:43:40 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h Log Message: merge l2ctrl from head To generate a diff of this commit: cvs rdiff -u -r1.41.12.1 -r1.41.12.2 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.41.12.1 src/sys/arch/arm/include/armreg.h:1.41.12.2 --- src/sys/arch/arm/include/armreg.h:1.41.12.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/armreg.h Mon Mar 24 18:43:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.41.12.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.41.12.2 2014/03/24 18:43:40 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -597,6 +597,10 @@ #define CORTEX_CNTENC_C __BIT(31) /* Disables the cycle counter */ #define CORTEX_CNTOFL_C __BIT(31) /* Cycle counter overflow flag */ +/* Defines for ARM Cortex A7/A15 L2CTRL */ +#define L2CTRL_NUMCPU __BITS(25,24) // numcpus - 1 +#define L2CTRL_ICPRES __BIT(23) // Interrupt Controller is present + /* Translate Table Base Control Register */ #define TTBCR_S_EAE __BIT(31) // Extended Address Extension #define TTBCR_S_PD1 __BIT(5) // Don't use TTBR1 @@ -765,6 +769,8 @@ ARMREG_WRITE_INLINE(tlbimva, p15,0,%0,c ARMREG_WRITE_INLINE(tlbiasid, p15,0,%0,c8,c7,2) /* Invalidate unified TLB by ASID */ ARMREG_WRITE_INLINE(tlbimvaa, p15,0,%0,c8,c7,3) /* Invalidate unified TLB by MVA, all ASID */ /* cp15 c9 registers */ +ARMREG_READ_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */ +ARMREG_WRITE_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */ ARMREG_READ_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */ ARMREG_WRITE_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */ ARMREG_READ_INLINE(pmcntenset, p15,0,%0,c9,c12,1) /* PMC Count Enable Set */
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Mon Mar 24 18:44:44 UTC 2014 Modified Files: src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_boot.c Log Message: Need to deal with proc0paddr. To generate a diff of this commit: cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/arm32/arm32_boot.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/arm32/arm32_boot.c diff -u src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.2 src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.3 --- src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/arm32/arm32_boot.c Mon Mar 24 18:44:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_boot.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: arm32_boot.c,v 1.5.2.3 2014/03/24 18:44:43 matt Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -123,7 +123,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: arm32_boot.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: arm32_boot.c,v 1.5.2.3 2014/03/24 18:44:43 matt Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -165,7 +165,8 @@ initarm_common(vaddr_t kvm_base, vsize_t * this during uvm init. */ //uvm_lwp_setuarea(lwp0, kernelstack.pv_va); - lwp0.l_addr = (void *)kernelstack.pv_va; + extern struct user *proc0paddr; + lwp0.l_addr = proc0paddr = (void *)kernelstack.pv_va; #ifdef VERBOSE_INIT_ARM printf(bootstrap done.\n);
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Mon Mar 24 18:45:16 UTC 2014 Modified Files: src/sys/arch/arm/arm32 [matt-nb5-mips64]: exception.S Log Message: Use the improved undefined method from HEAD To generate a diff of this commit: cvs rdiff -u -r1.16.18.1 -r1.16.18.2 src/sys/arch/arm/arm32/exception.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/exception.S diff -u src/sys/arch/arm/arm32/exception.S:1.16.18.1 src/sys/arch/arm/arm32/exception.S:1.16.18.2 --- src/sys/arch/arm/arm32/exception.S:1.16.18.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/arm32/exception.S Mon Mar 24 18:45:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exception.S,v 1.16.18.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: exception.S,v 1.16.18.2 2014/03/24 18:45:16 matt Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -51,7 +51,7 @@ #include arm/locore.h - RCSID($NetBSD: exception.S,v 1.16.18.1 2014/02/15 16:18:36 matt Exp $) + RCSID($NetBSD: exception.S,v 1.16.18.2 2014/03/24 18:45:16 matt Exp $) .text .align 0 @@ -218,13 +218,11 @@ ASEND(address_exception_entry) * look like direct entry from the vector. */ ASENTRY_NP(undefined_entry) - stmfd sp!, {r0, r1} + str r0, [sp, #-8]! GET_CURCPU(r0) - ldr r1, [sp], #0x0004 - str r1, [r0, #CI_UNDEFSAVE]! - ldr r1, [sp], #0x0004 - str r1, [r0, #0x0004] - ldmia r0, {r0, r1, pc} + ldr r0, [r0, #CI_UNDEFSAVE+8] + str r0, [sp, #4] + pop {r0, pc} ASEND(undefined_entry) /*
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm
Module Name:src Committed By: matt Date: Mon Mar 24 18:46:38 UTC 2014 Modified Files: src/sys/arch/evbarm/conf [matt-nb5-mips64]: Makefile.evbarm.inc Added Files: src/sys/arch/evbarm/conf [matt-nb5-mips64]: CUBIEBOARD CUBIEBOARD_INSTALL files.cubie mk.cubie std.cubie src/sys/arch/evbarm/cubie [matt-nb5-mips64]: cubie_machdep.c cubie_start.S genassym.cf platform.h Log Message: Add cubie from HEAD To generate a diff of this commit: cvs rdiff -u -r0 -r1.10.2.2 src/sys/arch/evbarm/conf/CUBIEBOARD cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/evbarm/conf/CUBIEBOARD_INSTALL \ src/sys/arch/evbarm/conf/files.cubie cvs rdiff -u -r1.19.12.1 -r1.19.12.2 \ src/sys/arch/evbarm/conf/Makefile.evbarm.inc cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/evbarm/conf/mk.cubie \ src/sys/arch/evbarm/conf/std.cubie cvs rdiff -u -r0 -r1.14.2.2 src/sys/arch/evbarm/cubie/cubie_machdep.c cvs rdiff -u -r0 -r1.6.2.2 src/sys/arch/evbarm/cubie/cubie_start.S cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/evbarm/cubie/genassym.cf cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/evbarm/cubie/platform.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/conf/Makefile.evbarm.inc diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.1 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.2 --- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.1 Sat Feb 15 16:18:37 2014 +++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc Mon Mar 24 18:46:38 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.evbarm.inc,v 1.19.12.1 2014/02/15 16:18:37 matt Exp $ +# $NetBSD: Makefile.evbarm.inc,v 1.19.12.2 2014/03/24 18:46:38 matt Exp $ # # If this is a install kernel and the ramdisk image exists in the object @@ -22,6 +22,11 @@ SYSTEM_LD_TAIL_EXTRA+=; \ EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map} +.if defined(KERNEL_BASE_PHYS) defined(KERNEL_BASE_VIRT) \ + ${KERNEL_BASE_PHYS} == ${KERNEL_BASE_VIRT} +CPPFLAGS+=-DKERNEL_BASES_EQUAL +.endif + .if defined(KERNEL_BASE_PHYS) LINKTEXT= KERNLDSCRIPT= ldscript Added files: Index: src/sys/arch/evbarm/conf/CUBIEBOARD diff -u /dev/null src/sys/arch/evbarm/conf/CUBIEBOARD:1.10.2.2 --- /dev/null Mon Mar 24 18:46:38 2014 +++ src/sys/arch/evbarm/conf/CUBIEBOARD Mon Mar 24 18:46:38 2014 @@ -0,0 +1,297 @@ +# +# $NetBSD: CUBIEBOARD,v 1.10.2.2 2014/03/24 18:46:38 matt Exp $ +# +# CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel +# + +include arch/evbarm/conf/std.cubie + +# estimated number of users + +maxusers 32 + +# Standard system options + +options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT +#options NTP # NTP phase/frequency locked loop + +# CPU options + +#options UVMHIST,UVMHIST_PRINT +options CPU_CORTEXA8 +options CPU_CORTEXA7 +options ALLWINNER_A10 +options ALLWINNER_A20 +options PMAPCOUNTERS +options AWIN_CONSOLE_EARLY + +# Architecture options + +# File systems + +file-system FFS # UFS +#file-system LFS # log-structured file system +file-system MFS # memory file system +file-system NFS # Network file system +#file-system ADOSFS # AmigaDOS-compatible file system +#file-system EXT2FS # second extended file system (linux) +#file-system CD9660 # ISO 9660 + Rock Ridge file system +file-system MSDOSFS # MS-DOS file system +#file-system FDESC # /dev/fd +file-system KERNFS # /kern +#file-system NULLFS # loopback file system +file-system PROCFS # /proc +#file-system PUFFS # Userspace file systems (e.g. ntfs-3g sshfs) +#file-system UMAPFS # NULLFS + uid and gid remapping +#file-system UNION # union file system +file-system TMPFS # memory file system +file-system PTYFS # /dev/pts/N support + +# File system options +#options QUOTA # legacy UFS quotas +#options QUOTA2 # new, in-filesystem UFS quotas +#options FFS_EI # FFS Endian Independent support +#options NFSSERVER +options WAPBL # File system journaling support +#options FFS_NO_SNAPSHOT # No FFS snapshot support + +# Networking options + +#options GATEWAY # packet forwarding +options INET # IP + ICMP + TCP + UDP +options INET6 # IPV6 +#options IPSEC # IP security +#options IPSEC_DEBUG # debug for IP security +#options MROUTING # IP multicast routing +#options PIM # Protocol Independent Multicast +#options NETATALK # AppleTalk networking +#options PPP_BSDCOMP # BSD-Compress compression support for PPP +#options PPP_DEFLATE # Deflate compression support for PPP +#options PPP_FILTER # Active filter support for PPP (requires bpf) +#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG + +options NFS_BOOT_BOOTP +options NFS_BOOT_DHCP +#options NFS_BOOT_BOOTSTATIC +#options NFS_BOOTSTATIC_MYIP=\192.168.1.4\ +#options NFS_BOOTSTATIC_GWIP=\192.168.1.1\ +#options NFS_BOOTSTATIC_MASK=\255.255.255.0\ +#options NFS_BOOTSTATIC_SERVADDR=\192.168.1.1\ +#options NFS_BOOTSTATIC_SERVER=\192.168.1.1:/nfs/sdp2430\ + +options
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Mon Mar 24 18:44:13 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S Log Message: Allow A7 to use this. To generate a diff of this commit: cvs rdiff -u -r1.12.2.3 -r1.12.2.4 src/sys/arch/arm/cortex/a9_mpsubr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.3 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.4 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.3 Thu Feb 20 20:36:29 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Mon Mar 24 18:44:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.12.2.3 2014/02/20 20:36:29 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.12.2.4 2014/03/24 18:44:13 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -330,15 +330,23 @@ comlock: #endif /* MULTIPROCESSOR */ #endif /* VERBOSE_INIT_ARM */ -#ifdef CPU_CORTEXA9 a9_start: +cortex_init: mov r10, lr@ save lr cpsid if, #PSR_SVC32_MODE XPUTC(#64) +#ifdef KERNEL_BASES_EQUAL bl _C_LABEL(armv7_icache_inv_all) @ invalidate i-cache +#else + adr ip, cortex_init + ldr r0, =armv7_icache_inv_all + bfi ip, r0, #0, #28 + blx ip +#endif +#ifdef CPU_CORTEXA9 /* * Step 1a, invalidate the all cache tags in all ways on the SCU. */ @@ -352,14 +360,23 @@ a9_start: str r1, [r3, #SCU_INV_ALL_REG] @ write scu invalidate all dsb isb +#endif /* * Step 1b, invalidate the data cache */ XPUTC(#66) +#ifdef KERNEL_BASES_EQUAL bl _C_LABEL(armv7_dcache_wbinv_all) @ writeback/invalidate d-cache +#else + adr ip, cortex_init + ldr r0, =armv7_dcache_wbinv_all + bfi ip, r0, #0, #28 + blx ip +#endif XPUTC(#67) +#ifdef CPU_CORTEXA9 /* * Step 2, disable the data cache */ @@ -387,8 +404,8 @@ a9_start: mcr p15, 0, r2, c1, c0, 0 @ reenable caches isb XPUTC(#51) +#endif -#ifdef MULTIPROCESSOR /* * Step 4b, set ACTLR.SMP=1 (and ACTRL.FX=1) */ @@ -396,6 +413,8 @@ a9_start: orr r0, r0, #CORTEXA9_AUXCTL_SMP @ enable SMP mcr p15, 0, r0, c1, c0, 1 @ write aux ctl isb +#ifdef CPU_CORTEXA9 + mrc p15, 0, r0, c1, c0, 1 @ read aux ctl orr r0, r0, #CORTEXA9_AUXCTL_FW @ enable cache/tlb/coherency mcr p15, 0, r0, c1, c0, 1 @ write aux ctl isb @@ -526,4 +545,3 @@ ASEND(a9_mpstart) .Lbcm53xx_cpu_hatch: .word _C_LABEL(bcm53xx_cpu_hatch) #endif /* MULTIPROCESSOR */ -#endif /* CPU_CORTEXA9 */
CVS commit: [matt-nb5-mips64] src/sys/dev/i2c
Module Name:src Committed By: matt Date: Mon Mar 24 18:48:52 UTC 2014 Modified Files: src/sys/dev/i2c [matt-nb5-mips64]: files.i2c Added Files: src/sys/dev/i2c [matt-nb5-mips64]: gttwsi_core.c gttwsireg.h gttwsivar.h Log Message: Merge mvi2c from HEAD To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.10.1 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/i2c/gttwsi_core.c \ src/sys/dev/i2c/gttwsireg.h src/sys/dev/i2c/gttwsivar.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/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.23 src/sys/dev/i2c/files.i2c:1.23.10.1 --- src/sys/dev/i2c/files.i2c:1.23 Thu Oct 30 12:52:46 2008 +++ src/sys/dev/i2c/files.i2c Mon Mar 24 18:48:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.23 2008/10/30 12:52:46 nakayama Exp $ +# $NetBSD: files.i2c,v 1.23.10.1 2014/03/24 18:48:52 matt Exp $ defflag opt_i2cbus.hI2C_SCAN define i2cbus { } @@ -14,6 +14,12 @@ define i2c_bitbang file dev/i2c/i2c_bitbang.c i2c_bitbang # +# I2C master devices +# +define mvi2c +file dev/i2c/gttwsi_core.c mvi2c + +# # I2C client devices # Added files: Index: src/sys/dev/i2c/gttwsi_core.c diff -u /dev/null src/sys/dev/i2c/gttwsi_core.c:1.1.2.2 --- /dev/null Mon Mar 24 18:48:52 2014 +++ src/sys/dev/i2c/gttwsi_core.c Mon Mar 24 18:48:52 2014 @@ -0,0 +1,353 @@ +/* $NetBSD: gttwsi_core.c,v 1.1.2.2 2014/03/24 18:48:52 matt Exp $ */ +/* + * Copyright (c) 2008 Eiji Kawauchi. + * 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. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Eiji Kawauchi. + * 4. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ +/* + * Copyright (c) 2005 Brocade Communcations, inc. + * All rights reserved. + * + * Written by Matt Thomas for Brocade Communcations, Inc. + * + * 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. + * 3. The name of Brocade Communications, Inc. may not be used to endorse + *or promote products derived from this software without specific prior + *written permission. + * + * THIS SOFTWARE IS PROVIDED BY BROCADE COMMUNICATIONS, INC. ``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 EITHER BROCADE COMMUNICATIONS, INC. 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. + */ +//#define TWSI_DEBUG + +/* + * Marvell Two-Wire Serial Interface (aka I2C)
CVS commit: [matt-nb5-mips64] src/sys/dev/ata
Module Name:src Committed By: matt Date: Mon Mar 24 18:49:53 UTC 2014 Modified Files: src/sys/dev/ata [matt-nb5-mips64]: satafis_subr.c satafisreg.h satafisvar.h Log Message: Merge satafis changes from HEAD for ahcisata To generate a diff of this commit: cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/ata/satafis_subr.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/ata/satafisreg.h cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/ata/satafisvar.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/ata/satafis_subr.c diff -u src/sys/dev/ata/satafis_subr.c:1.5.2.2 src/sys/dev/ata/satafis_subr.c:1.5.2.3 --- src/sys/dev/ata/satafis_subr.c:1.5.2.2 Wed Apr 21 00:27:34 2010 +++ src/sys/dev/ata/satafis_subr.c Mon Mar 24 18:49:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: satafis_subr.c,v 1.5.2.2 2010/04/21 00:27:34 matt Exp $ */ +/* $NetBSD: satafis_subr.c,v 1.5.2.3 2014/03/24 18:49:53 matt Exp $ */ /*- * Copyright (c) 2009 Jonathan A. Kollasch. @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: satafis_subr.c,v 1.5.2.2 2010/04/21 00:27:34 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: satafis_subr.c,v 1.5.2.3 2014/03/24 18:49:53 matt Exp $); #include sys/param.h #include sys/systm.h @@ -69,8 +69,6 @@ __KERNEL_RCSID(0, $NetBSD: satafis_subr #include dev/ata/satafisreg.h #include dev/ata/satafisvar.h -#include dev/ic/wdcreg.h /* for WDCTL_4BIT */ - #include atapibus.h void @@ -79,7 +77,7 @@ satafis_rhd_construct_cmd(struct ata_com memset(fis, 0, RHD_FISLEN); fis[fis_type] = RHD_FISTYPE; - fis[rhd_cdpmp] = 0x80; /* xxx magic */ + fis[rhd_c] = RHD_C; fis[rhd_command] = ata_c-r_command; fis[rhd_features] = ata_c-r_features; fis[rhd_sector] = ata_c-r_sector; @@ -87,9 +85,6 @@ satafis_rhd_construct_cmd(struct ata_com fis[rhd_cyl_hi] = (ata_c-r_cyl 8) 0xff; fis[rhd_dh] = ata_c-r_head 0x0f; fis[rhd_seccnt] = ata_c-r_count; - fis[rhd_control] = WDCTL_4BIT; - - return; } void @@ -103,7 +98,7 @@ satafis_rhd_construct_bio(struct ata_xfe memset(fis, 0, RHD_FISLEN); fis[fis_type] = RHD_FISTYPE; - fis[rhd_cdpmp] = 0x80; /* xxx magic */ + fis[rhd_c] = RHD_C; if (ata_bio-flags ATA_LBA48) { fis[rhd_command] = (ata_bio-flags ATA_READ) ? WDCC_READDMA_EXT : WDCC_WRITEDMA_EXT; @@ -125,8 +120,6 @@ satafis_rhd_construct_bio(struct ata_xfe fis[rhd_seccnt] = nblks 0xff; fis[rhd_seccnt_exp] = (ata_bio-flags ATA_LBA48) ? ((nblks 8) 0xff) : 0; - fis[rhd_control] = WDCTL_4BIT; - return; } #if NATAPIBUS 0 @@ -136,26 +129,30 @@ satafis_rhd_construct_atapi(struct ata_x memset(fis, 0, RHD_FISLEN); fis[fis_type] = RHD_FISTYPE; - fis[rhd_cdpmp] = 0x80; /* xxx magic */ + fis[rhd_c] = RHD_C; fis[rhd_command] = ATAPI_PKT_CMD; fis[rhd_features] = (xfer-c_flags C_DMA) ? ATAPI_PKT_CMD_FTRE_DMA : 0; - fis[rhd_dh] = WDSD_IBM; /* XXX or WDSD_LBA? */ - fis[rhd_control] = WDCTL_4BIT; return; } #endif /* NATAPIBUS */ void -satafis_rdh_parse(struct ata_channel *chp, uint8_t *fis) +satafis_rdh_parse(struct ata_channel *chp, const uint8_t *fis) { -#if 0 - /* siisata doesn't do enough for this to work */ - KASSERT(fis[fis_type] == RDH_FISTYPE); -#endif chp-ch_status = fis[rdh_status]; chp-ch_error = fis[rdh_error]; +} - return; +void +satafis_rdh_cmd_readreg(struct ata_command *ata_c, const uint8_t *fis) +{ + ata_c-r_command = fis[rdh_status]; + ata_c-r_features = fis[rdh_error]; + ata_c-r_error = fis[rdh_error]; + ata_c-r_sector = fis[rdh_sector]; + ata_c-r_cyl = fis[rdh_cyl_hi] 8 | fis[rdh_cyl_lo]; + ata_c-r_head = fis[rdh_dh]; + ata_c-r_count = fis[rdh_seccnt]; } Index: src/sys/dev/ata/satafisreg.h diff -u src/sys/dev/ata/satafisreg.h:1.2.2.2 src/sys/dev/ata/satafisreg.h:1.2.2.3 --- src/sys/dev/ata/satafisreg.h:1.2.2.2 Wed Apr 21 00:27:34 2010 +++ src/sys/dev/ata/satafisreg.h Mon Mar 24 18:49:53 2014 @@ -1,7 +1,7 @@ -/* $NetBSD: satafisreg.h,v 1.2.2.2 2010/04/21 00:27:34 matt Exp $ */ +/* $NetBSD: satafisreg.h,v 1.2.2.3 2014/03/24 18:49:53 matt Exp $ */ -/*- - * Copyright (c) 2009 Jonathan A. Kollasch. +/* + * Copyright (c) 2009, 2010 Jonathan A. Kollasch. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,8 @@ #define RHD_FISTYPE 0x27 #define RHD_FISLEN 20 -#define rhd_cdpmp 1 /* Command bit and PM port */ +#define rhd_c 1 /* Command bit and PM port */ +#define RHD_C 0x80 #define rhd_command 2 /* wd_command */ #define rhd_features 3 /* wd_precomp */ #define rhd_sector 4 /* wd_sector */ @@ -50,17 +51,18 @@ #define RDH_FISTYPE 0x34 #define RDH_FISLEN 20 #define rdh_i 1 +#define RDH_I 0x40 #define rdh_status 2 #define rdh_error 3 #define rdh_sector 4 /* wd_sector */ #define rdh_cyl_lo 5 /* wd_cyl_lo */ #define rdh_cyl_hi 6 /* wd_cyl_hi */ #define rdh_dh 7 /* wd_sdh */ -#define rhd_sector_exp 8 -#define rhd_cyl_lo_exp 9 -#define
CVS commit: [matt-nb5-mips64] src/sys/dev/ic
Module Name:src Committed By: matt Date: Mon Mar 24 18:47:17 UTC 2014 Modified Files: src/sys/dev/ic [matt-nb5-mips64]: ahcisata_core.c ahcisatareg.h ahcisatavar.h Log Message: Merge needed changes from HEAD for cubie To generate a diff of this commit: cvs rdiff -u -r1.18.4.1.4.1 -r1.18.4.1.4.2 src/sys/dev/ic/ahcisata_core.c cvs rdiff -u -r1.4 -r1.4.28.1 src/sys/dev/ic/ahcisatareg.h cvs rdiff -u -r1.4 -r1.4.22.1 src/sys/dev/ic/ahcisatavar.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/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.1 src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.2 --- src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.1 Wed Apr 21 00:27:35 2010 +++ src/sys/dev/ic/ahcisata_core.c Mon Mar 24 18:47:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.18.4.1.4.1 2010/04/21 00:27:35 matt Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.18.4.1.4.2 2014/03/24 18:47:17 matt Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -11,11 +11,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -31,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.18.4.1.4.1 2010/04/21 00:27:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.18.4.1.4.2 2014/03/24 18:47:17 matt Exp $); #include sys/types.h #include sys/malloc.h @@ -44,10 +39,11 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_cor #include uvm/uvm_extern.h -#include dev/ic/wdcreg.h #include dev/ata/atareg.h #include dev/ata/satavar.h #include dev/ata/satareg.h +#include dev/ata/satafisvar.h +#include dev/ata/satafisreg.h #include dev/ic/ahcisatavar.h #include dev/scsipi/scsi_all.h /* for SCSI status */ @@ -58,39 +54,39 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_cor int ahcidebug_mask = 0x0; #endif -void ahci_probe_drive(struct ata_channel *); -void ahci_setup_channel(struct ata_channel *); +static void ahci_probe_drive(struct ata_channel *); +static void ahci_setup_channel(struct ata_channel *); -int ahci_ata_bio(struct ata_drive_datas *, struct ata_bio *); -void ahci_reset_drive(struct ata_drive_datas *, int); -void ahci_reset_channel(struct ata_channel *, int); -int ahci_exec_command(struct ata_drive_datas *, struct ata_command *); -int ahci_ata_addref(struct ata_drive_datas *); -void ahci_ata_delref(struct ata_drive_datas *); -void ahci_killpending(struct ata_drive_datas *); - -void ahci_cmd_start(struct ata_channel *, struct ata_xfer *); -int ahci_cmd_complete(struct ata_channel *, struct ata_xfer *, int); -void ahci_cmd_done(struct ata_channel *, struct ata_xfer *, int); -void ahci_cmd_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ; -void ahci_bio_start(struct ata_channel *, struct ata_xfer *); -int ahci_bio_complete(struct ata_channel *, struct ata_xfer *, int); -void ahci_bio_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ; -void ahci_channel_stop(struct ahci_softc *, struct ata_channel *, int); -void ahci_channel_start(struct ahci_softc *, struct ata_channel *); -void ahci_timeout(void *); -int ahci_dma_setup(struct ata_channel *, int, void *, size_t, int); +static int ahci_ata_bio(struct ata_drive_datas *, struct ata_bio *); +static void ahci_reset_drive(struct ata_drive_datas *, int); +static void ahci_reset_channel(struct ata_channel *, int); +static int ahci_exec_command(struct ata_drive_datas *, struct ata_command *); +static int ahci_ata_addref(struct ata_drive_datas *); +static void ahci_ata_delref(struct ata_drive_datas *); +static void ahci_killpending(struct ata_drive_datas *); + +static void ahci_cmd_start(struct ata_channel *, struct ata_xfer *); +static int ahci_cmd_complete(struct ata_channel *, struct ata_xfer *, int); +static void ahci_cmd_done(struct ata_channel *, struct ata_xfer *, int); +static void ahci_cmd_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ; +static void ahci_bio_start(struct ata_channel *, struct ata_xfer *); +static int ahci_bio_complete(struct ata_channel *, struct ata_xfer *, int); +static void ahci_bio_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ; +static void ahci_channel_stop(struct ahci_softc *, struct ata_channel *, int); +static void ahci_channel_start(struct ahci_softc *, struct
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Mon Mar 24 18:51:45 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: kern_runq.c Log Message: Use the cpu_name in ci_data To generate a diff of this commit: cvs rdiff -u -r1.22.4.3.4.2 -r1.22.4.3.4.3 src/sys/kern/kern_runq.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_runq.c diff -u src/sys/kern/kern_runq.c:1.22.4.3.4.2 src/sys/kern/kern_runq.c:1.22.4.3.4.3 --- src/sys/kern/kern_runq.c:1.22.4.3.4.2 Sat Feb 5 06:00:14 2011 +++ src/sys/kern/kern_runq.c Mon Mar 24 18:51:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_runq.c,v 1.22.4.3.4.2 2011/02/05 06:00:14 cliff Exp $ */ +/* $NetBSD: kern_runq.c,v 1.22.4.3.4.3 2014/03/24 18:51:45 matt Exp $ */ /* * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.22.4.3.4.2 2011/02/05 06:00:14 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.22.4.3.4.3 2014/03/24 18:51:45 matt Exp $); #include opt_multiprocessor.h @@ -145,7 +145,6 @@ sched_cpuattach(struct cpu_info *ci) runqueue_t *ci_rq; void *rq_ptr; u_int i, size; - char *cpuname; if (ci-ci_schedstate.spc_lwplock == NULL) { ci-ci_schedstate.spc_lwplock = @@ -178,17 +177,14 @@ sched_cpuattach(struct cpu_info *ci) ci-ci_schedstate.spc_sched_info = ci_rq; - cpuname = kmem_alloc(8, KM_SLEEP); - snprintf(cpuname, 8, cpu%d, cpu_index(ci)); - evcnt_attach_dynamic(ci_rq-r_ev_pull, EVCNT_TYPE_MISC, NULL, - cpuname, runqueue pull); + ci-ci_data.cpu_name, runqueue pull); evcnt_attach_dynamic(ci_rq-r_ev_push, EVCNT_TYPE_MISC, NULL, - cpuname, runqueue push); + ci-ci_data.cpu_name, runqueue push); evcnt_attach_dynamic(ci_rq-r_ev_stay, EVCNT_TYPE_MISC, NULL, - cpuname, runqueue stay); + ci-ci_data.cpu_name, runqueue stay); evcnt_attach_dynamic(ci_rq-r_ev_localize, EVCNT_TYPE_MISC, NULL, - cpuname, runqueue localize); + ci-ci_data.cpu_name, runqueue localize); } /*
CVS commit: [matt-nb5-mips64] src/sys/conf
Module Name:src Committed By: matt Date: Mon Mar 24 18:50:51 UTC 2014 Modified Files: src/sys/conf [matt-nb5-mips64]: files Log Message: Add sata_fis to ahcisata To generate a diff of this commit: cvs rdiff -u -r1.924.4.1.4.4 -r1.924.4.1.4.5 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.924.4.1.4.4 src/sys/conf/files:1.924.4.1.4.5 --- src/sys/conf/files:1.924.4.1.4.4 Fri Feb 14 18:35:15 2014 +++ src/sys/conf/files Mon Mar 24 18:50:51 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924.4.1.4.4 2014/02/14 18:35:15 matt Exp $ +# $NetBSD: files,v 1.924.4.1.4.5 2014/03/24 18:50:51 matt Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20080610 @@ -930,7 +930,7 @@ file dev/ic/lpt_upc.c lpt_upc # AHCI-compatible SATA controllers define ahcisata_core file dev/ic/ahcisata_core.c ahcisata_core -device ahcisata: ata, ata_dma, ata_udma, sata, ahcisata_core +device ahcisata: ata, ata_dma, ata_udma, sata, sata_fis, ahcisata_core # Silicon Image SteelVine SATA-II controllers define siisata
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Fri Mar 14 21:45:42 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: kern_malloc.c Log Message: Make sure uvm_km_suballoc returned the correctly sized submap. To generate a diff of this commit: cvs rdiff -u -r1.121.10.1 -r1.121.10.2 src/sys/kern/kern_malloc.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_malloc.c diff -u src/sys/kern/kern_malloc.c:1.121.10.1 src/sys/kern/kern_malloc.c:1.121.10.2 --- src/sys/kern/kern_malloc.c:1.121.10.1 Wed Apr 21 00:28:16 2010 +++ src/sys/kern/kern_malloc.c Fri Mar 14 21:45:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_malloc.c,v 1.121.10.1 2010/04/21 00:28:16 matt Exp $ */ +/* $NetBSD: kern_malloc.c,v 1.121.10.2 2014/03/14 21:45:41 matt Exp $ */ /* * Copyright (c) 1987, 1991, 1993 @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.121.10.1 2010/04/21 00:28:16 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.121.10.2 2014/03/14 21:45:41 matt Exp $); #include sys/param.h #include sys/proc.h @@ -918,9 +918,6 @@ kmeminit(void) */ kmeminit_nkmempages(); - kmemusage = (struct kmemusage *) uvm_km_alloc(kernel_map, - (vsize_t)(nkmempages * sizeof(struct kmemusage)), 0, - UVM_KMF_WIRED|UVM_KMF_ZERO); kmb = 0; kmem_map = uvm_km_suballoc(kernel_map, kmb, kml, ((vsize_t)nkmempages PAGE_SHIFT), @@ -928,6 +925,12 @@ kmeminit(void) uvm_km_vacache_init(kmem_map, kvakmem, 0); kmembase = (char *)kmb; kmemlimit = (char *)kml; + + KASSERT(((kmemlimit - kmembase) PAGE_SHIFT) == nkmempages); + + kmemusage = (struct kmemusage *) uvm_km_alloc(kernel_map, + (vsize_t)(nkmempages * sizeof(struct kmemusage)), 0, + UVM_KMF_WIRED|UVM_KMF_ZERO); #ifdef KMEMSTATS for (indx = 0; indx MINBUCKET + 16; indx++) { if (1 indx = PAGE_SIZE)
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Fri Mar 14 22:34:35 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: kern_malloc.c Log Message: Deal with the issue that VM_MAP_INTRSAFE km_suballoc returns more than asked for so the space needs for kmemusage accounting has to needs adjusted as well. To generate a diff of this commit: cvs rdiff -u -r1.121.10.2 -r1.121.10.3 src/sys/kern/kern_malloc.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_malloc.c diff -u src/sys/kern/kern_malloc.c:1.121.10.2 src/sys/kern/kern_malloc.c:1.121.10.3 --- src/sys/kern/kern_malloc.c:1.121.10.2 Fri Mar 14 21:45:41 2014 +++ src/sys/kern/kern_malloc.c Fri Mar 14 22:34:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_malloc.c,v 1.121.10.2 2014/03/14 21:45:41 matt Exp $ */ +/* $NetBSD: kern_malloc.c,v 1.121.10.3 2014/03/14 22:34:35 matt Exp $ */ /* * Copyright (c) 1987, 1991, 1993 @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.121.10.2 2014/03/14 21:45:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.121.10.3 2014/03/14 22:34:35 matt Exp $); #include sys/param.h #include sys/proc.h @@ -926,7 +926,12 @@ kmeminit(void) kmembase = (char *)kmb; kmemlimit = (char *)kml; - KASSERT(((kmemlimit - kmembase) PAGE_SHIFT) == nkmempages); + /* + * Since the suballoc was VM_MAP_INTRSAFE, the allocated size + * may be larger than was we asked for. Recompute nkmempages + * to cover the additional space allocated. + */ + nkmempages = (kmemlimit - kmembase) PAGE_SHIFT; kmemusage = (struct kmemusage *) uvm_km_alloc(kernel_map, (vsize_t)(nkmempages * sizeof(struct kmemusage)), 0,
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 00:59:27 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: elf_machdep.h Log Message: Use right name To generate a diff of this commit: cvs rdiff -u -r1.7.78.2 -r1.7.78.3 src/sys/arch/arm/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 src/sys/arch/arm/include/elf_machdep.h:1.7.78.3 --- src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 Tue Feb 25 00:05:49 2014 +++ src/sys/arch/arm/include/elf_machdep.h Wed Feb 26 00:59:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.7.78.2 2014/02/25 00:05:49 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.7.78.3 2014/02/26 00:59:27 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -146,7 +146,7 @@ #ifdef _KERNEL #ifdef ELFSIZE -#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) +#define ELF_MD_COREDUMP_SETUP ELFNAME2(arm_netbsd,coredump_setup) #endif struct exec_package;
CVS commit: [matt-nb5-mips64] src/sys/arch/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:49 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: core_machdep.c src/sys/arch/arm/include [matt-nb5-mips64]: elf_machdep.h Log Message: Tag BE8 coredumps properly. To generate a diff of this commit: cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/arch/arm/arm/core_machdep.c cvs rdiff -u -r1.7.78.1 -r1.7.78.2 src/sys/arch/arm/include/elf_machdep.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/core_machdep.c diff -u src/sys/arch/arm/arm/core_machdep.c:1.4.2.2 src/sys/arch/arm/arm/core_machdep.c:1.4.2.3 --- src/sys/arch/arm/arm/core_machdep.c:1.4.2.2 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/core_machdep.c Tue Feb 25 00:05:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.4.2.2 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: core_machdep.c,v 1.4.2.3 2014/02/25 00:05:49 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -37,7 +37,10 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.4.2.2 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.4.2.3 2014/02/25 00:05:49 matt Exp $); + +#include opt_execfmt.h +#include opt_compat_netbsd32.h #include sys/core.h #include sys/exec.h @@ -49,6 +52,12 @@ __KERNEL_RCSID(0, $NetBSD: core_machdep #include sys/exec_aout.h /* for MID_* */ +#ifdef EXEC_ELF32 +#include sys/exec_elf.h +#endif + +#include arm/locore.h + #include machine/reg.h @@ -95,3 +104,19 @@ cpu_coredump(struct lwp *l, void *iocook return coredump_write(iocookie, UIO_SYSSPACE, cpustate, sizeof(cpustate)); } + +#ifdef EXEC_ELF32 +void +arm_netbsd_elf32_coredump_setup(struct lwp *l, void *arg) +{ +#if defined(__ARMEB__) + Elf32_Ehdr * const eh = arg; + +if (CPU_IS_ARMV7_P() + || (CPU_IS_ARMV6_P() + (armreg_sctrl_read() CPU_CONTROL_BEND_ENABLE) == 0)) { + eh-e_flags |= EF_ARM_BE8; + } +#endif +} +#endif Index: src/sys/arch/arm/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.7.78.1 src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 --- src/sys/arch/arm/include/elf_machdep.h:1.7.78.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/elf_machdep.h Tue Feb 25 00:05:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.7.78.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.7.78.2 2014/02/25 00:05:49 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -144,4 +144,14 @@ /* Processor specific symbol types */ #define STT_ARM_TFUNC STT_LOPROC +#ifdef _KERNEL +#ifdef ELFSIZE +#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) +#endif + +struct exec_package; + +void arm_netbsd_elf32_coredump_setup(struct lwp *, void *); +#endif + #endif /* _ARM_ELF_MACHDEP_H_ */
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:11 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: cpu_exec.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/sys/arch/arm/arm/cpu_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/cpu_exec.c diff -u src/sys/arch/arm/arm/cpu_exec.c:1.8.2.2 src/sys/arch/arm/arm/cpu_exec.c:1.8.2.3 --- src/sys/arch/arm/arm/cpu_exec.c:1.8.2.2 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/cpu_exec.c Tue Feb 25 00:05:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_exec.c,v 1.8.2.2 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: cpu_exec.c,v 1.8.2.3 2014/02/25 00:05:11 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.8.2.2 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.8.2.3 2014/02/25 00:05:11 matt Exp $); #include opt_compat_netbsd.h #include opt_compat_netbsd32.h @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v #include arm/locore.h -#if EXEC_ELF32 +#ifdef EXEC_ELF32 int arm_netbsd_elf32_probe(struct lwp *l, struct exec_package *epp, void *eh0, char *itp, vaddr_t *start_p)
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Thu Feb 20 20:36:29 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S Log Message: Use right register when setting ttbr To generate a diff of this commit: cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/arch/arm/cortex/a9_mpsubr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.2 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.3 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Thu Feb 20 20:36:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.12.2.2 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.12.2.3 2014/02/20 20:36:29 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -178,7 +178,7 @@ arm_cpuinit: cmp r1, #0 orrlt r10, r10, #0x5b /* MP, cachable (Normal WB) */ orrge r10, r10, #0x1b /* Non-MP, cacheable, normal WB */ - mcr p15, 0, r1, c2, c0, 0 /* Set Translation Table Base */ + mcr p15, 0, r10, c2, c0, 0 /* Set Translation Table Base */ XPUTC(#49) mov r1, #0
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Wed Feb 19 23:18:40 UTC 2014 Modified Files: src/sys/arch/arm/cortex [matt-nb5-mips64]: files.cortex Log Message: arml2cc - needs-flag To generate a diff of this commit: cvs rdiff -u -r1.4.6.2 -r1.4.6.3 src/sys/arch/arm/cortex/files.cortex 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/files.cortex diff -u src/sys/arch/arm/cortex/files.cortex:1.4.6.2 src/sys/arch/arm/cortex/files.cortex:1.4.6.3 --- src/sys/arch/arm/cortex/files.cortex:1.4.6.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/cortex/files.cortex Wed Feb 19 23:18:40 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.cortex,v 1.4.6.2 2014/02/15 16:18:36 matt Exp $ +# $NetBSD: files.cortex,v 1.4.6.3 2014/02/19 23:18:40 matt Exp $ defflag opt_cpu_in_cksum.h NEON_IN_CKSUM @@ -17,7 +17,7 @@ file arch/arm/cortex/gic.c armgic # ARM PL310 L2 Cache Controller(initially on Cortex-A9) device arml2cc attach arml2cc at armperiph -file arch/arm/cortex/pl310.c arml2cc +file arch/arm/cortex/pl310.c arml2cc needs-flag # ARMv7 Generic Timer device armgtmr
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Wed Feb 19 23:19:57 UTC 2014 Modified Files: src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c Log Message: Fix dmaranges for BCM563XX Conditionalize call to arml2cc_init To generate a diff of this commit: cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/sys/arch/arm/broadcom/bcm53xx_board.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/bcm53xx_board.c diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.2 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3 --- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.2 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/broadcom/bcm53xx_board.c Wed Feb 19 23:19:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_board.c,v 1.17.2.2 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,12 +29,13 @@ */ #include opt_broadcom.h +#include arml2cc.h #define _ARM32_BUS_DMA_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.2 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $); #include sys/param.h #include sys/bus.h @@ -83,8 +84,8 @@ struct arm32_dma_range bcm53xx_dma_range .dr_busbase = 0x6000, .dr_len = 0x2000, }, [1] = { - .dr_sysbase = 0xa000, - .dr_busbase = 0xa000, + .dr_sysbase = 0x8000, + .dr_busbase = 0x8000, }, #endif }; @@ -115,8 +116,8 @@ struct arm32_dma_range bcm53xx_coherent_ .dr_len = 0x2000, .dr_flags = _BUS_DMAMAP_COHERENT, }, [1] = { - .dr_sysbase = 0xa000, - .dr_busbase = 0xa000, + .dr_sysbase = 0x8000, + .dr_busbase = 0x8000, }, #endif }; @@ -554,8 +555,10 @@ bcm53xx_bootstrap(vaddr_t iobase) curcpu()-ci_data.cpu_cc_freq = clk-clk_cpu; +#if NARML2CC 0 arml2cc_init(bcm53xx_armcore_bst, bcm53xx_armcore_bsh, ARMCORE_L2C_BASE); +#endif } void
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:12:47 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: kern_cpu.c src/sys/sys [matt-nb5-mips64]: cpu.h cpu_data.h Log Message: Add cpu_softintr_p() Add cpu_name to cpu_data To generate a diff of this commit: cvs rdiff -u -r1.36.4.2 -r1.36.4.2.4.1 src/sys/kern/kern_cpu.c cvs rdiff -u -r1.23.4.3.4.1 -r1.23.4.3.4.2 src/sys/sys/cpu.h cvs rdiff -u -r1.27.16.3 -r1.27.16.4 src/sys/sys/cpu_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_cpu.c diff -u src/sys/kern/kern_cpu.c:1.36.4.2 src/sys/kern/kern_cpu.c:1.36.4.2.4.1 --- src/sys/kern/kern_cpu.c:1.36.4.2 Thu Nov 13 00:04:07 2008 +++ src/sys/kern/kern_cpu.c Sat Feb 15 10:12:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_cpu.c,v 1.36.4.2 2008/11/13 00:04:07 snj Exp $ */ +/* $NetBSD: kern_cpu.c,v 1.36.4.2.4.1 2014/02/15 10:12:47 matt Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.36.4.2 2008/11/13 00:04:07 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.36.4.2.4.1 2014/02/15 10:12:47 matt Exp $); #include sys/param.h #include sys/systm.h @@ -111,6 +111,10 @@ mi_cpu_attach(struct cpu_info *ci) TAILQ_INIT(ci-ci_data.cpu_ld_locks); __cpu_simple_lock_init(ci-ci_data.cpu_ld_lock); + /* This is useful for eg, per-cpu evcnt */ + snprintf(ci-ci_data.cpu_name, sizeof(ci-ci_data.cpu_name), cpu%d, + cpu_index(ci)); + sched_cpuattach(ci); error = create_idle_lwp(ci); @@ -366,3 +370,10 @@ cpu_setstate(struct cpu_info *ci, bool o spc-spc_lastmod = time_second; return 0; } + +bool +cpu_softintr_p(void) +{ + + return (curlwp-l_pflag LP_INTR) != 0; +} Index: src/sys/sys/cpu.h diff -u src/sys/sys/cpu.h:1.23.4.3.4.1 src/sys/sys/cpu.h:1.23.4.3.4.2 --- src/sys/sys/cpu.h:1.23.4.3.4.1 Fri Apr 29 08:20:15 2011 +++ src/sys/sys/cpu.h Sat Feb 15 10:12:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.23.4.3.4.1 2011/04/29 08:20:15 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.23.4.3.4.2 2014/02/15 10:12:47 matt Exp $ */ /*- * Copyright (c) 2007 YAMAMOTO Takashi, @@ -72,6 +72,7 @@ lwp_t *cpu_switchto(lwp_t *, lwp_t *, bo struct cpu_info *cpu_lookup(u_int); int cpu_setstate(struct cpu_info *, bool); bool cpu_intr_p(void); +bool cpu_softintr_p(void); bool cpu_kpreempt_enter(uintptr_t, int); void cpu_kpreempt_exit(uintptr_t); bool cpu_kpreempt_disabled(void); Index: src/sys/sys/cpu_data.h diff -u src/sys/sys/cpu_data.h:1.27.16.3 src/sys/sys/cpu_data.h:1.27.16.4 --- src/sys/sys/cpu_data.h:1.27.16.3 Fri May 20 14:14:51 2011 +++ src/sys/sys/cpu_data.h Sat Feb 15 10:12:47 2014 @@ -90,6 +90,9 @@ struct cpu_data { u_int cpu_nsyscall; /* syscall counter */ u_int cpu_ntrap; /* trap counter */ u_int cpu_nswtch; /* context switch counter */ + u_int cpu_nintr; /* interrupt counter */ + u_int cpu_nsoft; /* soft interrupt counter */ + u_int cpu_nfault; /* pagefault counter */ void *cpu_uvm; /* uvm per-cpu data */ void *cpu_softcpu; /* soft interrupt table */ TAILQ_HEAD(,buf) cpu_biodone; /* finished block xfers */ @@ -100,6 +103,7 @@ struct cpu_data { __cpu_simple_lock_t cpu_ld_lock; /* lockdebug */ uint64_t cpu_cc_freq; /* cycle counter frequency */ int64_t cpu_cc_skew; /* counter skew vs cpu0 */ + char cpu_name[8]; /* eg, cpu4 */ }; /* compat definitions */
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:13:25 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: subr_evcnt.c src/sys/sys [matt-nb5-mips64]: evcnt.h Log Message: Add evcnt_attach_dynamic_nozero To generate a diff of this commit: cvs rdiff -u -r1.4.94.2 -r1.4.94.3 src/sys/kern/subr_evcnt.c cvs rdiff -u -r1.5 -r1.5.28.1 src/sys/sys/evcnt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_evcnt.c diff -u src/sys/kern/subr_evcnt.c:1.4.94.2 src/sys/kern/subr_evcnt.c:1.4.94.3 --- src/sys/kern/subr_evcnt.c:1.4.94.2 Sat Feb 5 06:54:58 2011 +++ src/sys/kern/subr_evcnt.c Sat Feb 15 10:13:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_evcnt.c,v 1.4.94.2 2011/02/05 06:54:58 cliff Exp $ */ +/* $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.2 2011/02/05 06:54:58 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $); #include opt_ddb.h @@ -152,8 +152,15 @@ void evcnt_attach_dynamic(struct evcnt *ev, int type, const struct evcnt *parent, const char *group, const char *name) { - memset(ev, 0, sizeof *ev); + evcnt_attach_dynamic(ev, type, parent, group, name); +} + +void +evcnt_attach_dynamic_nozero(struct evcnt *ev, int type, +const struct evcnt *parent, const char *group, const char *name) +{ + ev-ev_type = type; ev-ev_parent = parent; ev-ev_group = group; Index: src/sys/sys/evcnt.h diff -u src/sys/sys/evcnt.h:1.5 src/sys/sys/evcnt.h:1.5.28.1 --- src/sys/sys/evcnt.h:1.5 Sun Dec 16 20:45:59 2007 +++ src/sys/sys/evcnt.h Sat Feb 15 10:13:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: evcnt.h,v 1.5 2007/12/16 20:45:59 dyoung Exp $ */ +/* $NetBSD: evcnt.h,v 1.5.28.1 2014/02/15 10:13:25 matt Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -131,6 +131,8 @@ void evcnt_init(void); void evcnt_attach_static(struct evcnt *); void evcnt_attach_dynamic(struct evcnt *, int, const struct evcnt *, const char *, const char *); +void evcnt_attach_dynamic_nozero(struct evcnt *, int, const struct evcnt *, + const char *, const char *); void evcnt_detach(struct evcnt *); #ifdef DDB
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:14:10 UTC 2014 Modified Files: src/sys/sys [matt-nb5-mips64]: ucontext.h Log Message: add prototype for cpu_mcontext_validate To generate a diff of this commit: cvs rdiff -u -r1.11.12.1 -r1.11.12.2 src/sys/sys/ucontext.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/ucontext.h diff -u src/sys/sys/ucontext.h:1.11.12.1 src/sys/sys/ucontext.h:1.11.12.2 --- src/sys/sys/ucontext.h:1.11.12.1 Fri Apr 29 08:14:36 2011 +++ src/sys/sys/ucontext.h Sat Feb 15 10:14:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ucontext.h,v 1.11.12.1 2011/04/29 08:14:36 matt Exp $ */ +/* $NetBSD: ucontext.h,v 1.11.12.2 2014/02/15 10:14:10 matt Exp $ */ /*- * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc. @@ -86,6 +86,8 @@ void getucontext_sa(struct lwp *, uconte int setucontext(struct lwp *, const ucontext_t *); void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *); int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int); +int cpu_mcontext_validate(struct lwp *, const mcontext_t *); + #endif /* _KERNEL */ #endif /* !_SYS_UCONTEXT_H_ */
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:14:35 UTC 2014 Modified Files: src/sys/sys [matt-nb5-mips64]: syscallvar.h Log Message: Add sy_invoke inline from HEAD To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.8.1 src/sys/sys/syscallvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/syscallvar.h diff -u src/sys/sys/syscallvar.h:1.2 src/sys/sys/syscallvar.h:1.2.8.1 --- src/sys/sys/syscallvar.h:1.2 Tue Oct 21 12:22:00 2008 +++ src/sys/sys/syscallvar.h Sat Feb 15 10:14:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: syscallvar.h,v 1.2 2008/10/21 12:22:00 ad Exp $ */ +/* $NetBSD: syscallvar.h,v 1.2.8.1 2014/02/15 10:14:35 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -52,4 +52,31 @@ sy_call(const struct sysent *sy, struct return error; } +static inline int +sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap, + register_t *rval, int code) +{ + const bool do_trace = l-l_proc-p_trace_enabled + (sy-sy_flags SYCALL_INDIRECT) == 0; + int error; + + if (__predict_true(!do_trace) || (error = trace_enter(code, uap, + sy-sy_narg)) == 0) { + rval[0] = 0; +#if !defined(__mips__) + /* + * Due to the mips userland code for SYS_break needing v1 to be + * preserved, we can't clear this on mips. + */ + rval[1] = 0; +#endif + error = sy_call(sy, l, uap, rval); + } + + if (__predict_false(do_trace)) { + trace_exit(code, rval, error); + } + return error; +} + #endif /* _SYS_SYSCALLVAR_H_ */
CVS commit: [matt-nb5-mips64] src/sys/dev/sysmon
Module Name:src Committed By: matt Date: Sat Feb 15 10:16:32 UTC 2014 Modified Files: src/sys/dev/sysmon [matt-nb5-mips64]: sysmon_wdog.c sysmonvar.h Log Message: move sysmon_wdog_setmode prototype to sysmonvar.h To generate a diff of this commit: cvs rdiff -u -r1.24.28.1 -r1.24.28.2 src/sys/dev/sysmon/sysmon_wdog.c cvs rdiff -u -r1.27 -r1.27.16.1 src/sys/dev/sysmon/sysmonvar.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/sysmon/sysmon_wdog.c diff -u src/sys/dev/sysmon/sysmon_wdog.c:1.24.28.1 src/sys/dev/sysmon/sysmon_wdog.c:1.24.28.2 --- src/sys/dev/sysmon/sysmon_wdog.c:1.24.28.1 Thu May 13 15:23:56 2010 +++ src/sys/dev/sysmon/sysmon_wdog.c Sat Feb 15 10:16:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_wdog.c,v 1.24.28.1 2010/05/13 15:23:56 cliff Exp $ */ +/* $NetBSD: sysmon_wdog.c,v 1.24.28.2 2014/02/15 10:16:32 matt Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_wdog.c,v 1.24.28.1 2010/05/13 15:23:56 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_wdog.c,v 1.24.28.2 2014/02/15 10:16:32 matt Exp $); #include sys/param.h #include sys/conf.h @@ -67,7 +67,6 @@ static void *sysmon_wdog_sdhook; struct sysmon_wdog *sysmon_wdog_find(const char *); void sysmon_wdog_release(struct sysmon_wdog *); -int sysmon_wdog_setmode(struct sysmon_wdog *, int, u_int); void sysmon_wdog_ktickle(void *); void sysmon_wdog_shutdown(void *); void sysmon_wdog_ref(struct sysmon_wdog *); Index: src/sys/dev/sysmon/sysmonvar.h diff -u src/sys/dev/sysmon/sysmonvar.h:1.27 src/sys/dev/sysmon/sysmonvar.h:1.27.16.1 --- src/sys/dev/sysmon/sysmonvar.h:1.27 Tue Jun 3 15:00:57 2008 +++ src/sys/dev/sysmon/sysmonvar.h Sat Feb 15 10:16:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmonvar.h,v 1.27 2008/06/03 15:00:57 jmcneill Exp $ */ +/* $NetBSD: sysmonvar.h,v 1.27.16.1 2014/02/15 10:16:32 matt Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -150,8 +150,9 @@ int sysmonopen_wdog(dev_t, int, int, str int sysmonclose_wdog(dev_t, int, int, struct lwp *); int sysmonioctl_wdog(dev_t, u_long, void *, int, struct lwp *); -int sysmon_wdog_register(struct sysmon_wdog *); -int sysmon_wdog_unregister(struct sysmon_wdog *); +int sysmon_wdog_setmode(struct sysmon_wdog *, int, u_int); +int sysmon_wdog_register(struct sysmon_wdog *); +int sysmon_wdog_unregister(struct sysmon_wdog *); void sysmon_wdog_init(void);
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Sat Feb 15 10:17:20 UTC 2014 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: pcivar.h Log Message: Add a few OKAY flags from HEAD To generate a diff of this commit: cvs rdiff -u -r1.83.12.1 -r1.83.12.2 src/sys/dev/pci/pcivar.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/pcivar.h diff -u src/sys/dev/pci/pcivar.h:1.83.12.1 src/sys/dev/pci/pcivar.h:1.83.12.2 --- src/sys/dev/pci/pcivar.h:1.83.12.1 Tue Nov 5 18:34:44 2013 +++ src/sys/dev/pci/pcivar.h Sat Feb 15 10:17:20 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pcivar.h,v 1.83.12.1 2013/11/05 18:34:44 matt Exp $ */ +/* $NetBSD: pcivar.h,v 1.83.12.2 2014/02/15 10:17:20 matt Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -123,11 +123,18 @@ struct pci_attach_args { * Flags given in the bus and device attachment args. */ #define PCI_FLAGS_IO_ENABLED 0x01 /* I/O space is enabled */ +#define PCI_FLAGS_IO_OKAY PCI_FLAGS_IO_ENABLED #define PCI_FLAGS_MEM_ENABLED 0x02 /* memory space is enabled */ +#define PCI_FLAGS_MEM_OKAY PCI_FLAGS_MEM_ENABLED #define PCI_FLAGS_MRL_OKAY 0x04 /* Memory Read Line okay */ #define PCI_FLAGS_MRM_OKAY 0x08 /* Memory Read Multiple okay */ #define PCI_FLAGS_MWI_OKAY 0x10 /* Memory Write and Invalidate okay */ +#define PCI_FLAGS_MSI_OKAY 0x20 /* Message Signaled Interrupts + okay */ +#define PCI_FLAGS_MSIX_OKAY 0x40 /* Message Signaled Interrupts + (Extended) okay */ + /* * PCI device 'quirks'.
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Sat Feb 15 10:18:33 UTC 2014 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pmap.h Log Message: Add PMAP_NOCACHE + others. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.10.1 src/sys/uvm/uvm_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/uvm/uvm_pmap.h diff -u src/sys/uvm/uvm_pmap.h:1.23 src/sys/uvm/uvm_pmap.h:1.23.10.1 --- src/sys/uvm/uvm_pmap.h:1.23 Wed Jul 16 14:33:09 2008 +++ src/sys/uvm/uvm_pmap.h Sat Feb 15 10:18:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pmap.h,v 1.23 2008/07/16 14:33:09 matt Exp $ */ +/* $NetBSD: uvm_pmap.h,v 1.23.10.1 2014/02/15 10:18:33 matt Exp $ */ /* * Copyright (c) 1991, 1993 @@ -86,6 +86,9 @@ typedef struct pmap_statistics *pmap_sta #include machine/pmap.h #endif +/* All accesses are uncacheable. No speculative accesses. */ +#define PMAP_NOCACHE 0x0100 /* [BOTH] */ + /* * Flags passed to pmap_enter(). Note the bottom 3 bits are VM_PROT_* * bits, used to indicate the access type that was made (to seed modified @@ -101,6 +104,10 @@ typedef struct pmap_statistics *pmap_sta #define PMAP_KMPAGE 0x /* this is from the kmem allocator */ #endif +#define PMAP_MD_MASK 0xff00 /* [BOTH] Machine-dependent bits */ +#define PMAP_PROT_MASK 0x000f /* [BOTH] VM_PROT_* bit mask */ + + #ifndef PMAP_EXCLUDE_DECLS /* Used in Sparc port to virtualize pmap mod */ #ifdef _KERNEL __BEGIN_DECLS
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Sat Feb 15 10:19:14 UTC 2014 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_page.c uvm_pglist.c Log Message: Adapt to K{,D}ASSERTMSG changes To generate a diff of this commit: cvs rdiff -u -r1.140.6.3.4.10 -r1.140.6.3.4.11 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.42.16.13 -r1.42.16.14 src/sys/uvm/uvm_pglist.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_page.c diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.10 src/sys/uvm/uvm_page.c:1.140.6.3.4.11 --- src/sys/uvm/uvm_page.c:1.140.6.3.4.10 Wed Feb 29 18:03:39 2012 +++ src/sys/uvm/uvm_page.c Sat Feb 15 10:19:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.140.6.3.4.10 2012/02/29 18:03:39 matt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.10 2012/02/29 18:03:39 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -843,7 +843,6 @@ uvm_page_physload(paddr_t start, paddr_t for (lcv = 0, paddr = ptoa(start) ; lcv npages ; lcv++, paddr += PAGE_SIZE) { pgs[lcv].phys_addr = paddr; - pgs[lcv].free_list = free_list; if (atop(paddr) = avail_start atop(paddr) = avail_end) uvm_pagefree(pgs[lcv]); @@ -1176,8 +1175,8 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, /* global, try2 */ if ((pg = LIST_FIRST(gfreeq[try2])) != NULL) { KASSERTMSG(pg-pqflags PQ_FREE, - (%s: pg %p in q %p not free!, - __func__, pg, gfreeq[try2])); + %s: pg %p in q %p not free!, + __func__, pg, gfreeq[try2]); KASSERT(gpgfl-pgfl_pages[try2] 0); ucpu = VM_FREE_PAGE_TO_CPU(pg); #ifndef MULTIPROCESSOR @@ -1205,18 +1204,18 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, u_int i = 0; do { KASSERTMSG(LIST_NEXT(xpg, pageq.list) == LIST_NEXT(xpg, listq.list), - (%s: color %d free_list %d pg %p (%u): next %p/%p, + %s: color %d free_list %d pg %p (%u): next %p/%p, __func__, color, free_list, xpg, i, LIST_NEXT(xpg, pageq.list), - LIST_NEXT(xpg, listq.list))); + LIST_NEXT(xpg, listq.list)); } while (++i 500 (xpg = LIST_NEXT(xpg, pageq.list)) != NULL); } #else KASSERTMSG(LIST_NEXT(pg, pageq.list) == LIST_NEXT(pg, listq.list), - (%s: color %d free_list %d pg %p: next %p/%p, + %s: color %d free_list %d pg %p: next %p/%p, __func__, color, free_list, pg, LIST_NEXT(pg, pageq.list), - LIST_NEXT(pg, listq.list))); + LIST_NEXT(pg, listq.list)); #endif #endif LIST_REMOVE(pg, pageq.list); /* global list */ Index: src/sys/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.42.16.13 src/sys/uvm/uvm_pglist.c:1.42.16.14 --- src/sys/uvm/uvm_pglist.c:1.42.16.13 Wed Feb 29 18:03:40 2012 +++ src/sys/uvm/uvm_pglist.c Sat Feb 15 10:19:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.42.16.13 2012/02/29 18:03:40 matt Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.42.16.14 2014/02/15 10:19:14 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.42.16.13 2012/02/29 18:03:40 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.42.16.14 2014/02/15 10:19:14 matt Exp $); #include sys/param.h #include sys/systm.h @@ -204,22 +204,22 @@ uvm_pglistalloc_c_ps(struct vm_physseg * * Make sure this is a managed physical page. */ KDASSERTMSG(vm_physseg_find(try, cidx) == ps - vm_physmem, - (%s: %s(%#x, cidx) (%d) != ps - vm_physmem (%zd), + %s: %s(%#x, cidx) (%d) != ps - vm_physmem (%zd), __func__, vm_physseg_find, try, - vm_physseg_find(try, cidx), ps - vm_physmem)); + vm_physseg_find(try, cidx), ps - vm_physmem); KDASSERTMSG(cidx == try - ps-start, - (%s: cidx (%#x) != try (%#x) - ps-start (%#PRIxPADDR), - __func__, cidx, try, ps-start)); + %s: cidx (%#x) != try (%#x) - ps-start (%#PRIxPADDR), + __func__, cidx, try, ps-start); KDASSERTMSG(vm_physseg_find(try + num - 1, cidx) == ps - vm_physmem, - (%s: %s(%#x + %#x - 1, cidx) (%d) != ps - vm_physmem (%zd), - __func__, vm_physseg_find, try, num, - vm_physseg_find(try, cidx), ps - vm_physmem)); + %s: %s(%#x + %#x - 1, cidx) (%d) != ps - vm_physmem (%zd), + __func__, vm_physseg_find, try, num, + vm_physseg_find(try, cidx), ps - vm_physmem); KDASSERTMSG(cidx == try - ps-start + num - 1, - (%s: cidx (%#x) != try (%#x) - ps-start (%#PRIxPADDR) + num (%#x) - 1, - __func__, cidx, try, ps-start, num)); + %s: cidx (%#x) != try (%#x) - ps-start (%#PRIxPADDR) + num (%#x) - 1, + __func__, cidx, try, ps-start,
CVS commit: [matt-nb5-mips64] src/sys/arch
Module Name:src Committed By: matt Date: Sat Feb 15 16:18:37 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: arm_machdep.c ast.c bcopyinout.S bcopyinout_xscale.S blockio.S bootconfig.c bus_space_asm_generic.S bus_space_notimpl.S compat_13_machdep.c compat_16_machdep.c copystr.S cpu_in_cksum.S cpufunc.c cpufunc_asm.S cpufunc_asm_arm10.S cpufunc_asm_arm11.S cpufunc_asm_arm1136.S cpufunc_asm_arm3.S cpufunc_asm_arm67.S cpufunc_asm_arm7tdmi.S cpufunc_asm_arm8.S cpufunc_asm_arm9.S cpufunc_asm_armv4.S cpufunc_asm_armv5.S cpufunc_asm_armv5_ec.S cpufunc_asm_armv6.S cpufunc_asm_fa526.S cpufunc_asm_ixp12x0.S cpufunc_asm_sa1.S cpufunc_asm_sa11x0.S cpufunc_asm_xscale.S db_trace.c disassem.c disksubr.c disksubr_acorn.c disksubr_mbr.c fiq.c fiq_subr.S idle_machdep.c linux_syscall.c linux_trap.c lock_cas.S process_machdep.c sig_machdep.c syscall.c undefined.c vectors.S src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm11_pmc.c arm32_machdep.c bcopy_page.S bus_dma.c cpu.c cpuswitch.S db_interface.c db_machdep.c exception.S fault.c genassym.cf intr.c irq_dispatch.S kgdb_machdep.c kobj_machdep.c locore.S mem.c pmap.c setcpsr.S setstack.S spl.S stubs.c sys_machdep.c vm_machdep.c src/sys/arch/arm/conf [matt-nb5-mips64]: Makefile.arm files.arm kern.ldscript.head kern.ldscript.tail majors.arm32 src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h asm.h bootconfig.h bus.h byte_swap.h cpu.h cpuconf.h cpufunc.h elf_machdep.h frame.h lock.h mutex.h param.h pcb.h pci_machdep.h proc.h sysarch.h types.h src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: db_machdep.h frame.h machdep.h pmap.h psl.h pte.h vmparam.h src/sys/arch/arm/mainbus [matt-nb5-mips64]: cpu_mainbus.c mainbus.c mainbus.h mainbus_io.c mainbus_io_asm.S src/sys/arch/arm/pic [matt-nb5-mips64]: files.pic pic.c picvar.h src/sys/arch/evbarm/conf [matt-nb5-mips64]: Makefile.evbarm.inc files.evbarm src/sys/arch/evbarm/include [matt-nb5-mips64]: autoconf.h intr.h vmparam.h Added Files: src/sys/arch/arm/arm [matt-nb5-mips64]: bus_space_a2x.S bus_space_a4x.S core_machdep.c cpu_exec.c cpu_in_cksum_buffer.S cpu_in_cksum_fold.S cpu_in_cksum_v4hdr.S cpufunc_asm_arm11x6.S cpufunc_asm_armv7.S cpufunc_asm_pj4b.S cpufunc_asm_sheeva.S fusu.S src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_boot.c arm32_kvminit.c arm32_reboot.c cortex_pmc.c netbsd32_machdep.c src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c bcm53xx_cca.c bcm53xx_ccb.c bcm53xx_eth.c bcm53xx_i2c.c bcm53xx_idm.c bcm53xx_intr.h bcm53xx_mdio.c bcm53xx_nand.c bcm53xx_pax.c bcm53xx_reg.h bcm53xx_rng.c bcm53xx_sdhc.c bcm53xx_usb.c bcm53xx_var.h bcmgen_space.c files.bcm53xx src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S a9tmr.c a9tmr_intr.h a9tmr_reg.h a9tmr_var.h a9wdt.c armperiph.c cpu_in_cksum_asm_neon.S cpu_in_cksum_neon.c files.cortex gic.c gic_intr.h gic_reg.h gtmr.c gtmr_intr.h gtmr_var.h mpcore_var.h pl310.c pl310_reg.h pl310_var.h scu_reg.h src/sys/arch/arm/include [matt-nb5-mips64]: cpu_counter.h locore.h src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: vmpagemd.h src/sys/arch/arm/pic [matt-nb5-mips64]: pic_splfuncs.c src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_machdep.c bcm53xx_start.S genassym.cf platform.h src/sys/arch/evbarm/conf [matt-nb5-mips64]: BCM5301X BCM5301X_INSTALL BCM56340 BCM56340_INSTALL files.bcm53xx mk.bcm53xx std.bcm53xx std.evbarm src/sys/arch/evbarm/include [matt-nb5-mips64]: cpu_counter.h Removed Files: src/sys/arch/arm/arm [matt-nb5-mips64]: vm_machdep_arm.c src/sys/arch/arm/arm32 [matt-nb5-mips64]: atomic.S fusu.S Log Message: Merge armv7 support from HEAD, specifically support for the BCM5301X and BCM56340 evbarm kernels. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.21.8.1 src/sys/arch/arm/arm/arm_machdep.c cvs rdiff -u -r1.15 -r1.15.8.1 src/sys/arch/arm/arm/ast.c cvs rdiff -u -r1.15 -r1.15.16.1 src/sys/arch/arm/arm/bcopyinout.S cvs rdiff -u -r1.5 -r1.5.16.1 src/sys/arch/arm/arm/bcopyinout_xscale.S \ src/sys/arch/arm/arm/lock_cas.S cvs rdiff -u -r1.5 -r1.5.134.1 src/sys/arch/arm/arm/blockio.S \ src/sys/arch/arm/arm/fiq.c cvs rdiff -u -r1.5 -r1.5.76.1 src/sys/arch/arm/arm/bootconfig.c cvs rdiff -u -r0 -r1.4.2.2 src/sys/arch/arm/arm/bus_space_a2x.S \ src/sys/arch/arm/arm/bus_space_a4x.S src/sys/arch/arm/arm/core_machdep.c \ src/sys/arch/arm/arm/cpufunc_asm_sheeva.S cvs rdiff -u -r1.5
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Sat Feb 15 16:30:24 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: param.h Log Message: Fix typo STACK_ALIGNBYTES - STACKALIGNBYTES To generate a diff of this commit: cvs rdiff -u -r1.12.12.1 -r1.12.12.2 src/sys/arch/arm/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/arm/include/param.h diff -u src/sys/arch/arm/include/param.h:1.12.12.1 src/sys/arch/arm/include/param.h:1.12.12.2 --- src/sys/arch/arm/include/param.h:1.12.12.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/param.h Sat Feb 15 16:30:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.12.12.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: param.h,v 1.12.12.2 2014/02/15 16:30:23 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -151,7 +151,7 @@ #define ALIGNBYTES 3 #define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) (((uintptr_t)(p) % sizeof(t)) == 0) -#define STACK_ALIGNBYTES (8 - 1) +#define STACKALIGNBYTES (8 - 1) #define STACKALIGN(p) ((uintptr_t)(p) ~STACKALIGNBYTES) #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
CVS commit: [matt-nb5-mips64] src/sys/rump/librump/rumpkern
Module Name:src Committed By: matt Date: Sat Feb 15 17:48:09 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern [matt-nb5-mips64]: emul.c Log Message: Add vpanic To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.8.1 src/sys/rump/librump/rumpkern/emul.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/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.53 src/sys/rump/librump/rumpkern/emul.c:1.53.8.1 --- src/sys/rump/librump/rumpkern/emul.c:1.53 Tue Oct 14 10:42:27 2008 +++ src/sys/rump/librump/rumpkern/emul.c Sat Feb 15 17:48:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.53 2008/10/14 10:42:27 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.53.8.1 2014/02/15 17:48:09 matt Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -92,6 +92,16 @@ int domainnamelen; const struct filterops seltrue_filtops; void +vpanic(const char *fmt, va_list ap) +{ + + printf(panic: ); + vprintf(fmt, ap); + printf(\n); + abort(); +} + +void panic(const char *fmt, ...) { va_list ap;
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/include
Module Name:src Committed By: matt Date: Sat Feb 15 17:50:31 UTC 2014 Modified Files: src/sys/arch/evbarm/include [matt-nb5-mips64]: vmparam.h Log Message: Export VM_*FREELIST To generate a diff of this commit: cvs rdiff -u -r1.25.18.2 -r1.25.18.3 src/sys/arch/evbarm/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/evbarm/include/vmparam.h diff -u src/sys/arch/evbarm/include/vmparam.h:1.25.18.2 src/sys/arch/evbarm/include/vmparam.h:1.25.18.3 --- src/sys/arch/evbarm/include/vmparam.h:1.25.18.2 Sat Feb 15 16:18:37 2014 +++ src/sys/arch/evbarm/include/vmparam.h Sat Feb 15 17:50:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.25.18.2 2014/02/15 16:18:37 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.25.18.3 2014/02/15 17:50:31 matt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -64,6 +64,7 @@ /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) +#endif /* _KERNEL || _KMEMUSER */ /* * max number of non-contig chunks of physical RAM you can have @@ -90,6 +91,5 @@ #define VM_FREELIST_DEFAULT 0 #define VM_FREELIST_ISADMA 1 -#endif /* _KERNEL || _KMEMUSER */ #endif /* _EVBARM_VMPARAM_H_ */
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Sat Feb 15 17:50:02 UTC 2014 Modified Files: src/sys/arch/evbarm/conf [matt-nb5-mips64]: std.bcm53xx Log Message: remove __HAVE_ATOMIC64_OPS (it's in types.h now) To generate a diff of this commit: cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/arch/evbarm/conf/std.bcm53xx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/std.bcm53xx diff -u src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.2 src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.3 --- src/sys/arch/evbarm/conf/std.bcm53xx:1.13.2.2 Sat Feb 15 16:18:37 2014 +++ src/sys/arch/evbarm/conf/std.bcm53xx Sat Feb 15 17:50:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: std.bcm53xx,v 1.13.2.2 2014/02/15 16:18:37 matt Exp $ +# $NetBSD: std.bcm53xx,v 1.13.2.3 2014/02/15 17:50:02 matt Exp $ # # standard NetBSD/evbarm for BCM5301X options @@ -16,7 +16,6 @@ options PMAP_NEED_ALLOC_POOLPAGE options __HAVE_FAST_SOFTINTS # should be in types.h options __HAVE_CPU_UAREA_ALLOC_IDLELWP options __HAVE_CPU_COUNTER -options __HAVE_ATOMIC64_OPS options __HAVE_PCI_CONF_HOOK options TPIDRPRW_IS_CURCPU options KERNEL_BASE_EXT=0x8000
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Sat Feb 15 19:09:56 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: sig_machdep.c Log Message: Use STACKALIGNBYTES To generate a diff of this commit: cvs rdiff -u -r1.35.16.1 -r1.35.16.2 src/sys/arch/arm/arm/sig_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/sig_machdep.c diff -u src/sys/arch/arm/arm/sig_machdep.c:1.35.16.1 src/sys/arch/arm/arm/sig_machdep.c:1.35.16.2 --- src/sys/arch/arm/arm/sig_machdep.c:1.35.16.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/arm/sig_machdep.c Sat Feb 15 19:09:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sig_machdep.c,v 1.35.16.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: sig_machdep.c,v 1.35.16.2 2014/02/15 19:09:56 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -44,7 +44,7 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.35.16.1 2014/02/15 16:18:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.35.16.2 2014/02/15 19:09:56 matt Exp $); #include sys/mount.h /* XXX only needed by syscallargs.h */ #include sys/cpu.h @@ -104,7 +104,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c fp--; /* make the stack aligned */ - fp = (struct sigframe_siginfo *)STACK_ALIGN(fp, STACK_ALIGNBYTES); + fp = (struct sigframe_siginfo *)STACK_ALIGN(fp, STACKALIGNBYTES); /* populate the siginfo frame */ frame.sf_si._info = ksi-ksi_info;
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Fri Feb 14 18:31:49 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: vfs_subr.c Log Message: vpanic - vnpanic To generate a diff of this commit: cvs rdiff -u -r1.357.4.4.2.1.2.1 -r1.357.4.4.2.1.2.2 src/sys/kern/vfs_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/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.357.4.4.2.1.2.1 src/sys/kern/vfs_subr.c:1.357.4.4.2.1.2.2 --- src/sys/kern/vfs_subr.c:1.357.4.4.2.1.2.1 Wed Apr 21 00:28:19 2010 +++ src/sys/kern/vfs_subr.c Fri Feb 14 18:31:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.357.4.4.2.1.2.1 2010/04/21 00:28:19 matt Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.357.4.4.2.1.2.2 2014/02/14 18:31:49 matt Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.357.4.4.2.1.2.1 2010/04/21 00:28:19 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.357.4.4.2.1.2.2 2014/02/14 18:31:49 matt Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -191,7 +191,7 @@ static void vrele_thread(void *); static void insmntque(vnode_t *, struct mount *); static int getdevvp(dev_t, vnode_t **, enum vtype); static vnode_t *getcleanvnode(void);; -void vpanic(vnode_t *, const char *); +void vnpanic(vnode_t *, const char *); #ifdef DEBUG void printlockedvnodes(void); @@ -199,14 +199,14 @@ void printlockedvnodes(void); #ifdef DIAGNOSTIC void -vpanic(vnode_t *vp, const char *msg) +vnpanic(vnode_t *vp, const char *msg) { vprint(NULL, vp); panic(%s\n, msg); } #else -#define vpanic(vp, msg) /* nothing */ +#define vnpanic(vp, msg) /* nothing */ #endif void @@ -333,14 +333,14 @@ try_nextlist: * lists. */ if (vp-v_usecount != 0) { - vpanic(vp, free vnode isn't); + vnpanic(vp, free vnode isn't); } if ((vp-v_iflag VI_CLEAN) != 0) { - vpanic(vp, clean vnode on freelist); + vnpanic(vp, clean vnode on freelist); } if (vp-v_freelisthd != listhd) { printf(vnode sez %p, listhd %p\n, vp-v_freelisthd, listhd); - vpanic(vp, list head mismatch); + vnpanic(vp, list head mismatch); } if (!mutex_tryenter(vp-v_interlock)) continue; @@ -411,13 +411,13 @@ try_nextlist: if (vp-v_data != NULL || vp-v_uobj.uo_npages != 0 || !TAILQ_EMPTY(vp-v_uobj.memq)) { - vpanic(vp, cleaned vnode isn't); + vnpanic(vp, cleaned vnode isn't); } if (vp-v_numoutput != 0) { - vpanic(vp, clean vnode has pending I/O's); + vnpanic(vp, clean vnode has pending I/O's); } if ((vp-v_iflag VI_ONWORKLST) != 0) { - vpanic(vp, clean vnode on syncer list); + vnpanic(vp, clean vnode on syncer list); } return vp; @@ -1376,7 +1376,7 @@ vrelel(vnode_t *vp, int flags) if (__predict_false(vp-v_op == dead_vnodeop_p (vp-v_iflag (VI_CLEAN|VI_XLOCK)) == 0)) { - vpanic(vp, dead but not clean); + vnpanic(vp, dead but not clean); } /* @@ -1389,7 +1389,7 @@ vrelel(vnode_t *vp, int flags) return; } if (vp-v_usecount = 0 || vp-v_writecount != 0) { - vpanic(vp, vrelel: bad ref count); + vnpanic(vp, vrelel: bad ref count); } KASSERT((vp-v_iflag VI_XLOCK) == 0); @@ -1421,7 +1421,7 @@ vrelel(vnode_t *vp, int flags) LK_RETRY); if (error != 0) { /* XXX */ -vpanic(vp, vrele: unable to lock %p); +vnpanic(vp, vrele: unable to lock %p); } mutex_enter(vp-v_interlock); /* @@ -1642,7 +1642,7 @@ holdrelel(vnode_t *vp) KASSERT((vp-v_iflag VI_MARKER) == 0); if (vp-v_holdcnt = 0) { - vpanic(vp, holdrelel: holdcnt vp %p); + vnpanic(vp, holdrelel: holdcnt vp %p); } vp-v_holdcnt--; @@ -1891,7 +1891,7 @@ vclean(vnode_t *vp, int flags) /* Disassociate the underlying file system from the vnode. */ if (VOP_RECLAIM(vp)) { - vpanic(vp, vclean: cannot reclaim); + vnpanic(vp, vclean: cannot reclaim); } KASSERT(vp-v_uobj.uo_npages == 0);
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Fri Feb 14 18:35:15 UTC 2014 Modified Files: src/sys/conf [matt-nb5-mips64]: files src/sys/dev/ic [matt-nb5-mips64]: comreg.h Log Message: defparam COM_TOLERANCE To generate a diff of this commit: cvs rdiff -u -r1.924.4.1.4.3 -r1.924.4.1.4.4 src/sys/conf/files cvs rdiff -u -r1.15 -r1.15.18.1 src/sys/dev/ic/comreg.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/conf/files diff -u src/sys/conf/files:1.924.4.1.4.3 src/sys/conf/files:1.924.4.1.4.4 --- src/sys/conf/files:1.924.4.1.4.3 Wed Nov 13 22:39:58 2013 +++ src/sys/conf/files Fri Feb 14 18:35:15 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924.4.1.4.3 2013/11/13 22:39:58 matt Exp $ +# $NetBSD: files,v 1.924.4.1.4.4 2014/02/14 18:35:15 matt Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20080610 @@ -804,6 +804,7 @@ defflag opt_com.h COM_DEBUG # XXX In a perfect world, this would be done with attributes defflag opt_com.h COM_16650 COM_HAYESP COM_PXA2X0 COM_AU1X00 COM_REGMAP +defparam opt_com.h COM_TOLERANCE device com { } : tty file dev/ic/com.c com needs-flag Index: src/sys/dev/ic/comreg.h diff -u src/sys/dev/ic/comreg.h:1.15 src/sys/dev/ic/comreg.h:1.15.18.1 --- src/sys/dev/ic/comreg.h:1.15 Mon Apr 28 22:00:01 2008 +++ src/sys/dev/ic/comreg.h Fri Feb 14 18:35:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: comreg.h,v 1.15 2008/04/28 22:00:01 matt Exp $ */ +/* $NetBSD: comreg.h,v 1.15.18.1 2014/02/14 18:35:15 matt Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -33,8 +33,14 @@ #include dev/ic/ns16550reg.h +#ifdef _KERNEL_OPT +#include opt_com.h +#endif + #define COM_FREQ 1843200 /* 16-bit baud rate divisor */ +#ifndef COM_TOLERANCE #define COM_TOLERANCE 30 /* baud rate tolerance, in 0.1% units */ +#endif /* interrupt enable register */ #define IER_ERXRDY 0x1 /* Enable receiver interrupt */
CVS commit: [matt-nb5-mips64] src/sys/conf
Module Name:src Committed By: matt Date: Fri Feb 14 18:36:14 UTC 2014 Modified Files: src/sys/conf [matt-nb5-mips64]: Makefile.kern.inc Log Message: SYSTEM_DEP?= - SYSTEM_DEP+= Add KERNLDSCRIPT to SYSTEM_DEP To generate a diff of this commit: cvs rdiff -u -r1.118.4.2.4.3 -r1.118.4.2.4.4 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.118.4.2.4.3 src/sys/conf/Makefile.kern.inc:1.118.4.2.4.4 --- src/sys/conf/Makefile.kern.inc:1.118.4.2.4.3 Wed Jan 27 07:28:09 2010 +++ src/sys/conf/Makefile.kern.inc Fri Feb 14 18:36:14 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.118.4.2.4.3 2010/01/27 07:28:09 matt Exp $ +# $NetBSD: Makefile.kern.inc,v 1.118.4.2.4.4 2014/02/14 18:36:14 matt Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -198,7 +198,10 @@ ${_cfile:T:R}.o: ${_cfile} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} -SYSTEM_DEP?= Makefile ${SYSTEM_OBJ:O} .gdbinit +SYSTEM_DEP+= Makefile ${SYSTEM_OBJ:O} .gdbinit +.if defined(KERNLDSCRIPT) +SYSTEM_DEP+= ${KERNLDSCRIPT} +.endif SYSTEM_LD_HEAD?=@rm -f $@ SYSTEM_LD?= @${_MKSHMSG}link ${.CURDIR:T}/${.TARGET}; \ ${_MKSHECHO}\
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Fri Feb 14 18:38:16 UTC 2014 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: mips_softint.c pmap.c pmap_tlb.c vm_machdep.c src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_intr.c rmixl_nand_pci.c src/sys/dev/ic [matt-nb5-mips64]: siisata.c src/sys/kern [matt-nb5-mips64]: subr_prf.c src/sys/lib/libkern [matt-nb5-mips64]: __assert.c libkern.h src/sys/sys [matt-nb5-mips64]: cdefs.h systm.h Log Message: Change KASSERTMSG/KDASSERTMSG to use varadic arguments like HEAD. panic - vpanic, add panic wrapper to vpanic. To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/mips/mips_softint.c cvs rdiff -u -r1.179.16.46 -r1.179.16.47 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/sys/arch/mips/mips/pmap_tlb.c cvs rdiff -u -r1.121.6.1.2.30 -r1.121.6.1.2.31 \ src/sys/arch/mips/mips/vm_machdep.c cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/sys/arch/mips/rmi/rmixl_intr.c cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/rmi/rmixl_nand_pci.c cvs rdiff -u -r1.2.14.2 -r1.2.14.3 src/sys/dev/ic/siisata.c cvs rdiff -u -r1.124.4.1.4.1 -r1.124.4.1.4.2 src/sys/kern/subr_prf.c cvs rdiff -u -r1.11 -r1.11.40.1 src/sys/lib/libkern/__assert.c cvs rdiff -u -r1.82.8.4 -r1.82.8.5 src/sys/lib/libkern/libkern.h cvs rdiff -u -r1.69.10.1 -r1.69.10.2 src/sys/sys/cdefs.h cvs rdiff -u -r1.228.4.2.4.3 -r1.228.4.2.4.4 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/mips_softint.c diff -u src/sys/arch/mips/mips/mips_softint.c:1.1.2.8 src/sys/arch/mips/mips/mips_softint.c:1.1.2.9 --- src/sys/arch/mips/mips/mips_softint.c:1.1.2.8 Fri Apr 29 08:26:29 2011 +++ src/sys/arch/mips/mips/mips_softint.c Fri Feb 14 18:38:15 2014 @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mips_softint.c,v 1.1.2.8 2011/04/29 08:26:29 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mips_softint.c,v 1.1.2.9 2014/02/14 18:38:15 matt Exp $); #include sys/param.h #include sys/cpu.h @@ -103,7 +103,7 @@ softint_trigger(uintptr_t si) softint_fast_dispatch(ci-ci_softlwps[SOFTINT_##level], \ IPL_SOFT##level); \ KASSERT(ci-ci_softlwps[SOFTINT_##level]-l_ctxswtch == 0); \ - KASSERTMSG(ci-ci_cpl == IPL_HIGH, (cpl (%d) != HIGH, ci-ci_cpl)); \ + KASSERTMSG(ci-ci_cpl == IPL_HIGH, cpl (%d) != HIGH, ci-ci_cpl); \ continue; \ } @@ -117,8 +117,8 @@ softint_process(uint32_t ipending) KASSERT((ipending ~MIPS_SOFT_INT_MASK) == 0); KASSERT(ci-ci_cpl == IPL_HIGH); KASSERTMSG(ci-ci_mtx_count == 0, - (%s: cpu%u (%p): ci_mtx_count (%d) != 0, - __func__, cpu_index(ci), ci, ci-ci_mtx_count)); + %s: cpu%u (%p): ci_mtx_count (%d) != 0, + __func__, cpu_index(ci), ci, ci-ci_mtx_count); if (ipending MIPS_SOFT_INT_MASK_0) { /* Index: src/sys/arch/mips/mips/pmap.c diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.46 src/sys/arch/mips/mips/pmap.c:1.179.16.47 --- src/sys/arch/mips/mips/pmap.c:1.179.16.46 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/mips/pmap.c Fri Feb 14 18:38:16 2014 @@ -1446,8 +1446,8 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd #endif const bool good_color = PMAP_PAGE_COLOROK_P(pa, va); KASSERTMSG(good_color, - (%s(%p, %#PRIxVADDR, %#PRIxPADDR, %x, %x): color mismatch\n, - __func__, pmap, va, pa, prot, flags)); + %s(%p, %#PRIxVADDR, %#PRIxPADDR, %x, %x): color mismatch\n, + __func__, pmap, va, pa, prot, flags); if (kernel_pmap_p) { PMAP_COUNT(kernel_mappings); if (!good_color) @@ -1673,8 +1673,8 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v #endif PMAP_COUNT(kenter_pa); KASSERTMSG(!managed || PMAP_PAGE_COLOROK_P(pa, va), - (%s(%#PRIxVADDR, %#PRIxPADDR, %x): color mismatch\n, - __func__, va, pa, prot)); + %s(%#PRIxVADDR, %#PRIxPADDR, %x): color mismatch\n, + __func__, va, pa, prot); if (!PMAP_PAGE_COLOROK_P(pa, va) managed) { PMAP_COUNT(kenter_pa_bad); } Index: src/sys/arch/mips/mips/pmap_tlb.c diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.24 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.25 --- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.24 Mon Jul 9 17:23:37 2012 +++ src/sys/arch/mips/mips/pmap_tlb.c Fri Feb 14 18:38:16 2014 @@ -453,8 +453,8 @@ pmap_tlb_shootdown_process(void) #if 0 KASSERT(cpu_intr_p()); KASSERTMSG(ci-ci_cpl = IPL_SCHED, - (%s: cpl (%d) IPL_SCHED (%d), - __func__, ci-ci_cpl, IPL_SCHED)); + %s: cpl (%d) IPL_SCHED (%d), + __func__, ci-ci_cpl, IPL_SCHED); #endif TLBINFO_LOCK(ti); @@ -862,8 +862,8 @@ pmap_tlb_asid_deactivate(pmap_t pm) const uint32_t cpu_mask = 1 cpu_index(ci); KASSERT(!cpu_intr_p()); KASSERTMSG(pm-pm_onproc cpu_mask, - (%s: pmap %p onproc %#x doesn't include cpu %d (%p), - __func__, pm, pm-pm_onproc, cpu_index(ci), ci)); + %s: pmap %p onproc %#x doesn't include cpu %d
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Sat Feb 15 03:22:27 UTC 2014 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: if_wm.c pcireg.h ppb.c Log Message: sync pcireg.h with HEAD. update if_wm.c and ppb.c accordingly. To generate a diff of this commit: cvs rdiff -u -r1.162.4.3.2.1.2.1 -r1.162.4.3.2.1.2.2 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.57.26.1 -r1.57.26.2 src/sys/dev/pci/pcireg.h cvs rdiff -u -r1.39.18.3 -r1.39.18.4 src/sys/dev/pci/ppb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.1 src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.2 --- src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.1 Wed Apr 21 00:27:41 2010 +++ src/sys/dev/pci/if_wm.c Sat Feb 15 03:22:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.1 2010/04/21 00:27:41 matt Exp $ */ +/* $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.2 2014/02/15 03:22:27 matt Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.1 2010/04/21 00:27:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.2 2014/02/15 03:22:27 matt Exp $); #include bpfilter.h #include rnd.h @@ -1162,25 +1162,25 @@ wm_attach(device_t parent, device_t self * incorrectly. */ pcix_cmd = pci_conf_read(pa-pa_pc, pa-pa_tag, -sc-sc_pcix_offset + PCI_PCIX_CMD); +sc-sc_pcix_offset + PCIX_CMD); pcix_sts = pci_conf_read(pa-pa_pc, pa-pa_tag, -sc-sc_pcix_offset + PCI_PCIX_STATUS); +sc-sc_pcix_offset + PCIX_STATUS); bytecnt = -(pcix_cmd PCI_PCIX_CMD_BYTECNT_MASK) -PCI_PCIX_CMD_BYTECNT_SHIFT; +(pcix_cmd PCIX_CMD_BYTECNT_MASK) +PCIX_CMD_BYTECNT_SHIFT; maxb = -(pcix_sts PCI_PCIX_STATUS_MAXB_MASK) -PCI_PCIX_STATUS_MAXB_SHIFT; +(pcix_sts PCIX_STATUS_MAXB_MASK) +PCIX_STATUS_MAXB_SHIFT; if (bytecnt maxb) { aprint_verbose_dev(sc-sc_dev, resetting PCI-X MMRBC: %d - %d\n, 512 bytecnt, 512 maxb); pcix_cmd = (pcix_cmd - ~PCI_PCIX_CMD_BYTECNT_MASK) | - (maxb PCI_PCIX_CMD_BYTECNT_SHIFT); + ~PCIX_CMD_BYTECNT_MASK) | + (maxb PCIX_CMD_BYTECNT_SHIFT); pci_conf_write(pa-pa_pc, pa-pa_tag, - sc-sc_pcix_offset + PCI_PCIX_CMD, + sc-sc_pcix_offset + PCIX_CMD, pcix_cmd); } } Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.57.26.1 src/sys/dev/pci/pcireg.h:1.57.26.2 --- src/sys/dev/pci/pcireg.h:1.57.26.1 Sat Dec 24 01:27:25 2011 +++ src/sys/dev/pci/pcireg.h Sat Feb 15 03:22:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.57.26.1 2011/12/24 01:27:25 matt Exp $ */ +/* $NetBSD: pcireg.h,v 1.57.26.2 2014/02/15 03:22:27 matt Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -179,6 +179,7 @@ typedef u_int8_t pci_revision_t; #define PCI_SUBCLASS_MASS_STORAGE_ATA 0x05 #define PCI_SUBCLASS_MASS_STORAGE_SATA 0x06 #define PCI_SUBCLASS_MASS_STORAGE_SAS 0x07 +#define PCI_SUBCLASS_MASS_STORAGE_NVM 0x08 #define PCI_SUBCLASS_MASS_STORAGE_MISC 0x80 /* 0x02 network subclasses */ @@ -462,6 +463,7 @@ typedef u_int8_t pci_revision_t; #define PCI_CAP_DEBUGPORT 0x0a #define PCI_CAP_CPCI_RSRCCTL 0x0b #define PCI_CAP_HOTPLUG 0x0c +#define PCI_CAP_SUBVENDOR 0x0d #define PCI_CAP_AGP8 0x0e #define PCI_CAP_SECURE 0x0f #define PCI_CAP_PCIEXPRESS 0x10 @@ -567,128 +569,239 @@ struct pci_msix_table_entry { * as 32-bit values, offset and shifted appropriately. Make sure you perform * the appropriate R/M/W cycles! */ -#define PCI_PCIX_CMD 0x00 -#define PCI_PCIX_CMD_PERR_RECOVER 0x0001 -#define PCI_PCIX_CMD_RELAXED_ORDER 0x0002 -#define PCI_PCIX_CMD_BYTECNT_MASK 0x000c -#define PCI_PCIX_CMD_BYTECNT_SHIFT 18 -#define PCI_PCIX_CMD_BCNT_512 0x -#define PCI_PCIX_CMD_BCNT_1024 0x0004 -#define PCI_PCIX_CMD_BCNT_2048 0x0008 -#define PCI_PCIX_CMD_BCNT_4096 0x000c -#define PCI_PCIX_CMD_SPLTRANS_MASK 0x0070 -#define PCI_PCIX_CMD_SPLTRANS_1 0x -#define PCI_PCIX_CMD_SPLTRANS_2 0x0010 -#define PCI_PCIX_CMD_SPLTRANS_3 0x0020 -#define PCI_PCIX_CMD_SPLTRANS_4 0x0030 -#define PCI_PCIX_CMD_SPLTRANS_8 0x0040 -#define PCI_PCIX_CMD_SPLTRANS_12 0x0050 -#define PCI_PCIX_CMD_SPLTRANS_16 0x0060 -#define PCI_PCIX_CMD_SPLTRANS_32 0x0070 +#define PCIX_CMD 0x00 +#define PCIX_CMD_PERR_RECOVER 0x0001 +#define PCIX_CMD_RELAXED_ORDER 0x0002 +#define PCIX_CMD_BYTECNT_MASK 0x000c +#define PCIX_CMD_BYTECNT_SHIFT 18 +#define PCIX_CMD_BCNT_512 0x +#define PCIX_CMD_BCNT_1024 0x0004 +#define PCIX_CMD_BCNT_2048 0x0008 +#define PCIX_CMD_BCNT_4096 0x000c +#define PCIX_CMD_SPLTRANS_MASK 0x0070 +#define PCIX_CMD_SPLTRANS_1
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Sat Feb 15 03:33:40 UTC 2014 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_sdhc.c src/sys/dev/sdmmc [matt-nb5-mips64]: sdhc.c sdhcvar.h Log Message: HAS_CGM - HAVE_CGM (like current) Add 32BIT_ACCESS To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_sdhc.c cvs rdiff -u -r1.7.2.5 -r1.7.2.6 src/sys/dev/sdmmc/sdhc.c cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/dev/sdmmc/sdhcvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/rmi/rmixl_sdhc.c diff -u src/sys/arch/mips/rmi/rmixl_sdhc.c:1.1.2.1 src/sys/arch/mips/rmi/rmixl_sdhc.c:1.1.2.2 --- src/sys/arch/mips/rmi/rmixl_sdhc.c:1.1.2.1 Sat Dec 24 01:57:54 2011 +++ src/sys/arch/mips/rmi/rmixl_sdhc.c Sat Feb 15 03:33:40 2014 @@ -29,7 +29,7 @@ #include sys/param.h -__KERNEL_RCSID(1, $NetBSD: rmixl_sdhc.c,v 1.1.2.1 2011/12/24 01:57:54 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_sdhc.c,v 1.1.2.2 2014/02/15 03:33:40 matt Exp $); #include sys/device.h #include sys/bus.h @@ -86,7 +86,7 @@ sdhc_xlsdio_attach(device_t parent, devi KASSERT(psc-sc_slots[xa-xa_slot] == NULL); psc-sc_slots[xa-xa_slot] = sc; - sc-sc_flags = SDHC_FLAG_HAS_CGM; + sc-sc_flags = SDHC_FLAG_HAVE_CGM; sc-sc_dev = self; sc-sc_dmat = xa-xa_dmat; sc-sc_host = malloc(1 * sizeof(sc-sc_host[0]), Index: src/sys/dev/sdmmc/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.7.2.5 src/sys/dev/sdmmc/sdhc.c:1.7.2.6 --- src/sys/dev/sdmmc/sdhc.c:1.7.2.5 Tue Nov 5 18:35:35 2013 +++ src/sys/dev/sdmmc/sdhc.c Sat Feb 15 03:33:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.7.2.5 2013/11/05 18:35:35 matt Exp $ */ +/* $NetBSD: sdhc.c,v 1.7.2.6 2014/02/15 03:33:40 matt Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.7.2.5 2013/11/05 18:35:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.7.2.6 2014/02/15 03:33:40 matt Exp $); #include sys/param.h #include sys/device.h @@ -290,7 +290,7 @@ sdhc_host_found(struct sdhc_softc *sc, b hp-maxblklen 1 ? s : )); #if 0 - if (sc-sc_flags SDHC_FLAG_HAS_CGM) { + if (sc-sc_flags SDHC_FLAG_HAVE_CGM) { uint16_t clk = HREAD2(hp, SDHC_CLOCK_CTL); clk |= SDHC_SDCLK_CGM; HWRITE2(hp, SDHC_CLOCK_CTL, clk); @@ -312,7 +312,7 @@ sdhc_host_found(struct sdhc_softc *sc, b saa.saa_sct = sdhc_functions; saa.saa_sch = hp; saa.saa_dmat = hp-dmat; - if (sc-sc_flags SDHC_FLAG_HAS_CGM) { + if (sc-sc_flags SDHC_FLAG_HAVE_CGM) { saa.saa_clkmin = hp-clkbase / 2046; } else { saa.saa_clkmin = hp-clkbase / 256; @@ -573,7 +573,7 @@ sdhc_clock_divisor(struct sdhc_host *hp, { int div; - if (hp-sc-sc_flags SDHC_FLAG_HAS_CGM) { + if (hp-sc-sc_flags SDHC_FLAG_HAVE_CGM) { for (div = hp-clkbase / freq; div = 0x3ff; div++) { if ((hp-clkbase / div) = freq) { *divp = SDHC_SDCLK_CGM Index: src/sys/dev/sdmmc/sdhcvar.h diff -u src/sys/dev/sdmmc/sdhcvar.h:1.4.2.4 src/sys/dev/sdmmc/sdhcvar.h:1.4.2.5 --- src/sys/dev/sdmmc/sdhcvar.h:1.4.2.4 Tue Dec 27 17:12:48 2011 +++ src/sys/dev/sdmmc/sdhcvar.h Sat Feb 15 03:33:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhcvar.h,v 1.4.2.4 2011/12/27 17:12:48 matt Exp $ */ +/* $NetBSD: sdhcvar.h,v 1.4.2.5 2014/02/15 03:33:40 matt Exp $ */ /* $OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $ */ /* @@ -39,7 +39,8 @@ struct sdhc_softc { #define SDHC_FLAG_FORCE_DMA 0x0002 #define SDHC_FLAG_NO_PWR0 0x0004 #define SDHC_FLAG_HAVE_DVS 0x0008 -#define SDHC_FLAG_HAS_CGM 0x0010 +#define SDHC_FLAG_HAVE_CGM 0x0010 +#define SDHC_FLAG_32BIT_ACCESS 0x0020 uint32_t sc_clkbase; };
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Dec 19 01:17:06 UTC 2013 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: cdefs.h Log Message: Pull from HEAD (for post armv6 defines). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.38.1 src/sys/arch/arm/include/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/cdefs.h diff -u src/sys/arch/arm/include/cdefs.h:1.3 src/sys/arch/arm/include/cdefs.h:1.3.38.1 --- src/sys/arch/arm/include/cdefs.h:1.3 Wed Oct 17 19:53:41 2007 +++ src/sys/arch/arm/include/cdefs.h Thu Dec 19 01:17:06 2013 @@ -1,15 +1,31 @@ -/* $NetBSD: cdefs.h,v 1.3 2007/10/17 19:53:41 garbled Exp $ */ +/* $NetBSD: cdefs.h,v 1.3.38.1 2013/12/19 01:17:06 matt Exp $ */ -#ifndef _MACHINE_CDEFS_H_ -#define _MACHINE_CDEFS_H_ +#ifndef _ARM_CDEFS_H_ +#define _ARM_CDEFS_H_ -#if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) +#if defined (__ARM_ARCH_7__) || defined (__ARM_ARCH_7A__) || \ +defined (__ARM_ARCH_7R__) || defined (__ARM_ARCH_7M__) || \ +defined (__ARM_ARCH_7EM__) /* 7R, 7M, 7EM are for non MMU arms */ +#define _ARM_ARCH_7 +#endif + +#if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6T2__) +#define _ARM_ARCH_T2 /* Thumb2 */ +#endif + +#if defined (_ARM_ARCH_T2) || defined (__ARM_ARCH_6__) || \ +defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6K__) || \ +defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) || \ +defined (__ARM_ARCH_6ZM__) #define _ARM_ARCH_6 #endif -#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5__) || \ -defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \ -defined (__ARM_ARCH_5TEJ__) +#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5T__) || \ +defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) +#define _ARM_ARCH_5T +#endif + +#if defined (_ARM_ARCH_6) || defined (_ARM_ARCH_5T) || defined (__ARM_ARCH_5__) #define _ARM_ARCH_5 #endif @@ -17,4 +33,17 @@ #define _ARM_ARCH_4T #endif -#endif /* !_MACHINE_CDEFS_H_ */ +#if defined (_ARM_ARCH_T2) || \ +(!defined (__thumb__) \ + (defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5TE__) || \ + defined (__ARM_ARCH_5TEJ__))) +#define _ARM_ARCH_DWORD_OK +#endif + +#ifdef __ARM_EABI__ +#define __ALIGNBYTES (8 - 1) +#else +#define __ALIGNBYTES (sizeof(int) - 1) +#endif + +#endif /* !_ARM_CDEFS_H_ */
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/include
Module Name:src Committed By: matt Date: Thu Dec 19 01:18:01 UTC 2013 Modified Files: src/sys/arch/evbarm/include [matt-nb5-mips64]: vmparam.h Log Message: compat in libc needs some uvm stuff which needs VM_NFREELIST defined. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.18.1 src/sys/arch/evbarm/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/evbarm/include/vmparam.h diff -u src/sys/arch/evbarm/include/vmparam.h:1.25 src/sys/arch/evbarm/include/vmparam.h:1.25.18.1 --- src/sys/arch/evbarm/include/vmparam.h:1.25 Sun Apr 27 18:58:46 2008 +++ src/sys/arch/evbarm/include/vmparam.h Thu Dec 19 01:18:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.25 2008/04/27 18:58:46 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.25.18.1 2013/12/19 01:18:01 matt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -32,7 +32,7 @@ #ifndef _ARM32_VMPARAM_H_ #define _ARM32_VMPARAM_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || 1 #include arm/arm32/vmparam.h
CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/stand/gzboot
Module Name:src Committed By: matt Date: Thu Dec 19 01:18:44 UTC 2013 Modified Files: src/sys/arch/evbarm/stand/gzboot [matt-nb5-mips64]: Makefile Log Message: Make endian check more generic To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/evbarm/stand/gzboot/Makefile 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/stand/gzboot/Makefile diff -u src/sys/arch/evbarm/stand/gzboot/Makefile:1.9 src/sys/arch/evbarm/stand/gzboot/Makefile:1.9.10.1 --- src/sys/arch/evbarm/stand/gzboot/Makefile:1.9 Thu Oct 30 15:33:42 2008 +++ src/sys/arch/evbarm/stand/gzboot/Makefile Thu Dec 19 01:18:44 2013 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.9 2008/10/30 15:33:42 cliff Exp $ +# $NetBSD: Makefile,v 1.9.10.1 2013/12/19 01:18:44 matt Exp $ -.if ${MACHINE_ARCH} == arm +.if ${MACHINE_ARCH:Marm*eb} == # Little endian platforms SUBDIR= ADI_BRH_flash_0x0014 SUBDIR+= GEMINI_dram_0x0160
CVS commit: [matt-nb5-mips64] src/sys/lkm/arch/arm
Module Name:src Committed By: matt Date: Thu Dec 19 01:19:26 UTC 2013 Modified Files: src/sys/lkm/arch/arm [matt-nb5-mips64]: lkmtramp.awk lkmwrap.awk Log Message: Update to use -Wl and change \. to just . To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.90.1 src/sys/lkm/arch/arm/lkmtramp.awk \ src/sys/lkm/arch/arm/lkmwrap.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lkm/arch/arm/lkmtramp.awk diff -u src/sys/lkm/arch/arm/lkmtramp.awk:1.2 src/sys/lkm/arch/arm/lkmtramp.awk:1.2.90.1 --- src/sys/lkm/arch/arm/lkmtramp.awk:1.2 Sun Dec 11 12:24:46 2005 +++ src/sys/lkm/arch/arm/lkmtramp.awk Thu Dec 19 01:19:26 2013 @@ -1,4 +1,4 @@ -# $NetBSD: lkmtramp.awk,v 1.2 2005/12/11 12:24:46 christos Exp $ +# $NetBSD: lkmtramp.awk,v 1.2.90.1 2013/12/19 01:19:26 matt Exp $ # BEGIN { print #include machine/asm.h @@ -7,7 +7,7 @@ BEGIN { $2 == R_ARM_PC24 { if (x[$3] != ) next; - if ($3 == \.text) + if ($3 == .text) next; print ENTRY(__wrap_$3) print \tldr\tpc,1f Index: src/sys/lkm/arch/arm/lkmwrap.awk diff -u src/sys/lkm/arch/arm/lkmwrap.awk:1.2 src/sys/lkm/arch/arm/lkmwrap.awk:1.2.90.1 --- src/sys/lkm/arch/arm/lkmwrap.awk:1.2 Sun Dec 11 12:24:46 2005 +++ src/sys/lkm/arch/arm/lkmwrap.awk Thu Dec 19 01:19:26 2013 @@ -1,10 +1,10 @@ -# $NetBSD: lkmwrap.awk,v 1.2 2005/12/11 12:24:46 christos Exp $ +# $NetBSD: lkmwrap.awk,v 1.2.90.1 2013/12/19 01:19:26 matt Exp $ $2 == R_ARM_PC24 { if (x[$3] != ) next; - if ($3 == \.text) + if ($3 == .text) next - printf --wrap $3; + printf -Wl,--wrap,$3; x[$3]=.; }
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Thu Dec 19 01:20:41 UTC 2013 Modified Files: src/sys/rump/librump/rumpkern [matt-nb5-mips64]: vm.c src/sys/ufs/lfs [matt-nb5-mips64]: lfs_bio.c Log Message: Adapt to new uvm_estimatepageable arguments To generate a diff of this commit: cvs rdiff -u -r1.41.8.2 -r1.41.8.3 src/sys/rump/librump/rumpkern/vm.c cvs rdiff -u -r1.114 -r1.114.18.1 src/sys/ufs/lfs/lfs_bio.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/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.41.8.2 src/sys/rump/librump/rumpkern/vm.c:1.41.8.3 --- src/sys/rump/librump/rumpkern/vm.c:1.41.8.2 Fri Feb 10 06:00:55 2012 +++ src/sys/rump/librump/rumpkern/vm.c Thu Dec 19 01:20:41 2013 @@ -519,7 +519,8 @@ uvm_page_unbusy(struct vm_page **pgs, in } void -uvm_estimatepageable(u_int *active, u_int *inactive) +uvm_estimatepageable(const struct uvm_pggroup *pg, +u_int *active, u_int *inactive) { /* XXX: guessing game */ Index: src/sys/ufs/lfs/lfs_bio.c diff -u src/sys/ufs/lfs/lfs_bio.c:1.114 src/sys/ufs/lfs/lfs_bio.c:1.114.18.1 --- src/sys/ufs/lfs/lfs_bio.c:1.114 Tue May 6 18:43:45 2008 +++ src/sys/ufs/lfs/lfs_bio.c Thu Dec 19 01:20:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_bio.c,v 1.114 2008/05/06 18:43:45 ad Exp $ */ +/* $NetBSD: lfs_bio.c,v 1.114.18.1 2013/12/19 01:20:41 matt Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lfs_bio.c,v 1.114 2008/05/06 18:43:45 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: lfs_bio.c,v 1.114.18.1 2013/12/19 01:20:41 matt Exp $); #include sys/param.h #include sys/systm.h @@ -842,7 +842,7 @@ lfs_wait_pages(void) { int active, inactive; - uvm_estimatepageable(active, inactive); + uvm_estimatepageable(NULL, active, inactive); return LFS_WAIT_RESOURCE(active + inactive + uvmexp.free, 1); } @@ -851,6 +851,6 @@ lfs_max_pages(void) { int active, inactive; - uvm_estimatepageable(active, inactive); + uvm_estimatepageable(NULL, active, inactive); return LFS_MAX_RESOURCE(active + inactive + uvmexp.free, 1); }
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Thu Dec 19 01:22:02 UTC 2013 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pglist.h Log Message: error out if VM_NFREELIST isn't defined To generate a diff of this commit: cvs rdiff -u -r1.7.16.5 -r1.7.16.6 src/sys/uvm/uvm_pglist.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/uvm/uvm_pglist.h diff -u src/sys/uvm/uvm_pglist.h:1.7.16.5 src/sys/uvm/uvm_pglist.h:1.7.16.6 --- src/sys/uvm/uvm_pglist.h:1.7.16.5 Thu Feb 16 04:20:46 2012 +++ src/sys/uvm/uvm_pglist.h Thu Dec 19 01:22:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.h,v 1.7.16.5 2012/02/16 04:20:46 matt Exp $ */ +/* $NetBSD: uvm_pglist.h,v 1.7.16.6 2013/12/19 01:22:02 matt Exp $ */ /*- * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -34,6 +34,9 @@ #ifndef VM_NFREELIST #include machine/vmparam.h +#ifndef VM_NFREELIST +#error machine/vmparam.h did not define VM_NFREELIST +#endif #endif /*
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Thu Nov 14 17:34:02 UTC 2013 Modified Files: src/sys/kern [matt-nb5-mips64]: subr_prf.c src/sys/sys [matt-nb5-mips64]: device.h systm.h Log Message: more things for xhci To generate a diff of this commit: cvs rdiff -u -r1.124.4.1 -r1.124.4.1.4.1 src/sys/kern/subr_prf.c cvs rdiff -u -r1.112.6.1 -r1.112.6.1.4.1 src/sys/sys/device.h cvs rdiff -u -r1.228.4.2.4.2 -r1.228.4.2.4.3 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_prf.c diff -u src/sys/kern/subr_prf.c:1.124.4.1 src/sys/kern/subr_prf.c:1.124.4.1.4.1 --- src/sys/kern/subr_prf.c:1.124.4.1 Mon Feb 2 19:47:47 2009 +++ src/sys/kern/subr_prf.c Thu Nov 14 17:34:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_prf.c,v 1.124.4.1 2009/02/02 19:47:47 snj Exp $ */ +/* $NetBSD: subr_prf.c,v 1.124.4.1.4.1 2013/11/14 17:34:02 matt Exp $ */ /*- * Copyright (c) 1986, 1988, 1991, 1993 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.124.4.1 2009/02/02 19:47:47 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.124.4.1.4.1 2013/11/14 17:34:02 matt Exp $); #include opt_ddb.h #include opt_ipkdb.h @@ -1086,6 +1086,18 @@ vsnprintf(char *bf, size_t size, const c }\ } +void +device_printf(device_t dev, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + printf(%s: , device_xname(dev)); + vprintf(fmt, ap); + va_end(ap); + return; +} + /* * Guts of kernel printf. Note, we already expect to be in a mutex! */ Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.112.6.1 src/sys/sys/device.h:1.112.6.1.4.1 --- src/sys/sys/device.h:1.112.6.1 Sun Mar 15 19:43:48 2009 +++ src/sys/sys/device.h Thu Nov 14 17:34:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.112.6.1 2009/03/15 19:43:48 snj Exp $ */ +/* $NetBSD: device.h,v 1.112.6.1.4.1 2013/11/14 17:34:02 matt Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -167,6 +167,7 @@ struct device { #define DVF_DRIVER_SUSPENDED 0x0010 /* device driver suspend was called */ #define DVF_BUS_SUSPENDED 0x0020 /* device bus suspend was called */ #define DVF_SELF_SUSPENDED 0x0040 /* device suspended itself */ +#define DVF_DETACH_SHUTDOWN 0x0080 /* device detaches safely at shutdown */ TAILQ_HEAD(devicelist, device); @@ -301,12 +302,12 @@ struct cfattach __CONCAT(name,_ca) = { #define CFATTACH_DECL(name, ddsize, matfn, attfn, detfn, actfn) \ CFATTACH_DECL2(name, ddsize, matfn, attfn, detfn, actfn, NULL, NULL) -#define CFATTACH_DECL2_NEW(name, ddsize, matfn, attfn, detfn, actfn, \ - rescanfn, chdetfn) \ +#define CFATTACH_DECL3_NEW(name, ddsize, matfn, attfn, detfn, actfn, \ + rescanfn, chdetfn, __flags) \ struct cfattach __CONCAT(name,_ca) = { \ .ca_name = ___STRING(name), \ .ca_devsize = ddsize,\ - .ca_flags = DVF_PRIV_ALLOC, \ + .ca_flags = (__flags) | DVF_PRIV_ALLOC, \ .ca_match = matfn,\ .ca_attach = attfn,\ .ca_detach = detfn,\ @@ -314,9 +315,14 @@ struct cfattach __CONCAT(name,_ca) = { .ca_rescan = rescanfn,\ .ca_childdetached = chdetfn,\ } +#define CFATTACH_DECL2_NEW(name, ddsize, matfn, attfn, detfn, actfn, \ + rescanfn, chdetfn) \ + CFATTACH_DECL3_NEW(name, ddsize, matfn, attfn, detfn, actfn, \ + rescanfn, chdetfn, 0) -#define CFATTACH_DECL_NEW(name, ddsize, matfn, attfn, detfn, actfn) \ - CFATTACH_DECL2_NEW(name, ddsize, matfn, attfn, detfn, actfn, NULL, NULL) +#define CFATTACH_DECL_NEW(name, ddsize, matfn, attfn, detfn, actfn) \ + CFATTACH_DECL3_NEW(name, ddsize, matfn, attfn, detfn, actfn, \ + NULL, NULL, 0) /* Flags given to config_detach(), and the ca_detach function. */ #define DETACH_FORCE 0x01 /* force detachment; hardware gone */ Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.228.4.2.4.2 src/sys/sys/systm.h:1.228.4.2.4.3 --- src/sys/sys/systm.h:1.228.4.2.4.2 Sat Aug 22 17:05:21 2009 +++ src/sys/sys/systm.h Thu Nov 14 17:34:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.228.4.2.4.2 2009/08/22 17:05:21 matt Exp $ */ +/* $NetBSD: systm.h,v 1.228.4.2.4.3 2013/11/14 17:34:02 matt Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -185,6 +185,8 @@ void aprint_debug(const char *, ...) __attribute__((__format__(__printf__,1,2))); struct device; +voiddevice_printf(struct device *, const char *fmt, ...) +__attribute__((__format__(__printf__,2,3))); void aprint_normal_dev(struct device *, const char *, ...) __attribute__((__format__(__printf__,2,3)));
CVS commit: [matt-nb5-mips64] src/sys/conf
Module Name:src Committed By: matt Date: Wed Nov 13 22:39:58 UTC 2013 Modified Files: src/sys/conf [matt-nb5-mips64]: files Log Message: Add usb_dma, xhci To generate a diff of this commit: cvs rdiff -u -r1.924.4.1.4.2 -r1.924.4.1.4.3 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.924.4.1.4.2 src/sys/conf/files:1.924.4.1.4.3 --- src/sys/conf/files:1.924.4.1.4.2 Tue Dec 27 17:35:47 2011 +++ src/sys/conf/files Wed Nov 13 22:39:58 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924.4.1.4.2 2011/12/27 17:35:47 matt Exp $ +# $NetBSD: files,v 1.924.4.1.4.3 2013/11/13 22:39:58 matt Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20080610 @@ -1100,19 +1100,28 @@ defparam USB_MEM_RESERVE define usbroothub file dev/usb/usbroothub_subr.c usbroothub -device uhci: usbus, usbroothub +define usb_dma + +# UHCI USB controller +# +device uhci: usbus, usbroothub, usb_dma file dev/usb/uhci.c uhci needs-flag # OHCI USB controller # -device ohci: usbus, usbroothub +device ohci: usbus, usbroothub, usb_dma file dev/usb/ohci.c ohci needs-flag -# EHCI USB controller +# EHCI USB2 controller # -device ehci: usbus, usbroothub +device ehci: usbus, usbroothub, usb_dma file dev/usb/ehci.c ehci needs-flag +# XHCI USB3 controller +# +device xhci: usbus, usbroothub, usb_dma +file dev/usb/xhci.c xhci needs-flag + # SL811HS/T USB controller defflag opt_slhci.h SLHCI_DEBUG SLHCI_TRY_LSVH SLHCI_PROFILE_TRANSFER device slhci: usbus, usbroothub
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Thu Nov 14 01:36:00 UTC 2013 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_gpio_pci.c Log Message: Deal with new interrupt structure. To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/rmi/rmixl_gpio_pci.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/mips/rmi/rmixl_gpio_pci.c diff -u src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.7 src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.8 --- src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.7 Sat Dec 15 03:05:56 2012 +++ src/sys/arch/mips/rmi/rmixl_gpio_pci.c Thu Nov 14 01:36:00 2013 @@ -29,7 +29,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_gpio_pci.c,v 1.1.2.7 2012/12/15 03:05:56 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_gpio_pci.c,v 1.1.2.8 2013/11/14 01:36:00 matt Exp $); #include sys/param.h #include sys/atomic.h @@ -93,11 +93,9 @@ static int (* const xlgpio_intrs[])(void }; struct xlgpio_intrpin { - int (*gip_func)(void *); - void *gip_arg; + struct rmixl_intrhand_common gip_ihc; uint8_t gip_ipl; uint8_t gip_ist; - bool gip_mpsafe; char gip_pin_name[sizeof(pin XX)]; }; @@ -142,7 +140,10 @@ static struct xlgpio_softc xlgpio_sc = { [0 ... 2*PINGROUP-1] = { .gip_ipl = IPL_NONE, .gip_ist = IST_NONE, - .gip_func = xlgpio_stray_intr, + .gip_ihc = { +.ihc_func = xlgpio_stray_intr, +.ihc_disestablish = gpio_intr_disestablish, + }, }, }, .sc_groups = { @@ -260,7 +261,7 @@ xlgpio_pci_attach(device_t parent, devic snprintf(gip-gip_pin_name, sizeof(gip-gip_pin_name), pin %zu, pin); - KASSERT(gip-gip_func == xlgpio_stray_intr); + KASSERT(gip-gip_ihc.ihc_func == xlgpio_stray_intr); } /* @@ -367,8 +368,8 @@ xlgpio_group_intr(struct xlgpio_softc *s struct xlgpio_intrpin * const gip = gg-gg_pins[pin]; KASSERT(gip-gip_ipl == ipl); - const int nrv = rmixl_intr_deliver(gip-gip_func, gip-gip_arg, - gip-gip_mpsafe, evs[pin], ipl); + const int nrv = rmixl_intr_deliver(gip-gip_ihc, + evs[pin], ipl); if (nrv) rv = nrv; sts = PIN_MASK(pin); @@ -469,16 +470,18 @@ gpio_intr_establish(size_t pin, int ipl, return NULL; KASSERT((*inten_p mask) == 0); - KASSERT(gip-gip_func != xlgpio_stray_intr); + KASSERT(gip-gip_ihc.ihc_func != xlgpio_stray_intr); KASSERT(gip-gip_ipl == IPL_NONE); KASSERT(gip-gip_ist == IST_NONE); mutex_enter(sc-sc_intr_lock); gip-gip_ipl = ipl; - gip-gip_func = func; - gip-gip_arg = arg; - gip-gip_mpsafe = mpsafe; + gip-gip_ihc.ihc_func = func; + gip-gip_ihc.ihc_arg = arg; +#ifdef MULTIPROCESSOR + gip-gip_ihc.ihc_mpsafe = mpsafe; +#endif if (ist == IST_EDGE) { atomic_or_32(gg-gg_inttype, mask); @@ -519,7 +522,7 @@ gpio_intr_disestablish(void *v) KASSERT(sc-sc_pins[pin] == gip); KASSERT(pin __arraycount(sc-sc_pins)); - KASSERT(gip-gip_func != xlgpio_stray_intr); + KASSERT(gip-gip_ihc.ihc_func != xlgpio_stray_intr); *inten_p = ~mask; xlgpio_write_4(sc, gg-gg_r_inten[gip-gip_ipl - IPL_VM], *inten_p);
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Tue Nov 5 18:32:45 UTC 2013 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c Log Message: Support a 64-bit BAR for AHCI To generate a diff of this commit: cvs rdiff -u -r1.12.4.2 -r1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.12.4.2 src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1 --- src/sys/dev/pci/ahcisata_pci.c:1.12.4.2 Mon Mar 30 16:49:25 2009 +++ src/sys/dev/pci/ahcisata_pci.c Tue Nov 5 18:32:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.12.4.2 2009/03/30 16:49:25 snj Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2 2009/03/30 16:49:25 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $); #include sys/types.h #include sys/malloc.h @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_pci #include dev/ic/ahcisatavar.h #define AHCI_PCI_QUIRK_FORCE 1 /* force attach */ +#define AHCI_PCI_QUIRK_BAR0 2 static const struct pci_quirkdata ahci_pci_quirks[] = { { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA, @@ -64,6 +65,8 @@ static const struct pci_quirkdata ahci_p AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP73_AHCI_1, AHCI_PCI_QUIRK_FORCE }, + { PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_AHCISATA, + AHCI_PCI_QUIRK_BAR0 }, }; struct ahci_pci_softc { @@ -92,6 +95,7 @@ ahci_pci_match(device_t parent, cfdata_t bus_size_t size; int ret = 0; const struct pci_quirkdata *quirks; + int bar = AHCI_PCI_ABAR; quirks = ahci_pci_lookup_quirkdata(PCI_VENDOR(pa-pa_id), PCI_PRODUCT(pa-pa_id)); @@ -104,10 +108,26 @@ ahci_pci_match(device_t parent, cfdata_t (quirks == NULL || (quirks-quirks AHCI_PCI_QUIRK_FORCE) == 0)) return 0; - if (pci_mapreg_map(pa, AHCI_PCI_ABAR, - PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, - regt, regh, NULL, size) != 0) + /* + * Sometimes people just can't read specs. + */ + if (quirks != NULL (quirks-quirks AHCI_PCI_QUIRK_BAR0)) { + bar = PCI_BAR0; + } + + pcireg_t mem_type = pci_mapreg_type(pa-pa_pc, pa-pa_tag, bar); + if (PCI_MAPREG_TYPE(mem_type) != PCI_MAPREG_TYPE_MEM) { + printf(%s: tag %#lx: unexpected type %#x\n, + __func__, pa-pa_tag, mem_type); + return 0; + } + + if (pci_mapreg_map(pa, bar, mem_type, 0, + regt, regh, NULL, size) != 0) { + printf(%s: tag %#lx: pci_mapreg_map failed\n, + __func__, pa-pa_tag); return 0; + } if ((PCI_SUBCLASS(pa-pa_class) == PCI_SUBCLASS_MASS_STORAGE_SATA PCI_INTERFACE(pa-pa_class) == PCI_INTERFACE_SATA_AHCI) || @@ -130,13 +150,23 @@ ahci_pci_attach(device_t parent, device_ const char *intrstr; pci_intr_handle_t intrhandle; void *ih; + const struct pci_quirkdata *quirks; + int bar = AHCI_PCI_ABAR; sc-sc_atac.atac_dev = self; - if (pci_mapreg_map(pa, AHCI_PCI_ABAR, - PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, + /* + * Sometimes people just can't read specs. + */ + quirks = ahci_pci_lookup_quirkdata(PCI_VENDOR(pa-pa_id), + PCI_PRODUCT(pa-pa_id)); + if (quirks != NULL (quirks-quirks AHCI_PCI_QUIRK_BAR0)) { + bar = PCI_BAR0; + } + + if (pci_mapreg_map(pa, bar, PCI_MAPREG_TYPE_MEM, 0, sc-sc_ahcit, sc-sc_ahcih, NULL, size) != 0) { - aprint_error_dev(self, can't map ahci registers\n); + aprint_error_dev(self, : can't map ahci registers\n); return; } psc-sc_pc = pa-pa_pc;
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Tue Nov 5 18:34:21 UTC 2013 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: pci_subr.c Log Message: Pull in support for pci_aprint_devinfo_fancy To generate a diff of this commit: cvs rdiff -u -r1.75.10.1.4.1 -r1.75.10.1.4.2 src/sys/dev/pci/pci_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/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.75.10.1.4.1 src/sys/dev/pci/pci_subr.c:1.75.10.1.4.2 --- src/sys/dev/pci/pci_subr.c:1.75.10.1.4.1 Mon Dec 26 03:44:49 2011 +++ src/sys/dev/pci/pci_subr.c Tue Nov 5 18:34:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $ */ +/* $NetBSD: pci_subr.c,v 1.75.10.1.4.2 2013/11/05 18:34:21 matt Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1.4.2 2013/11/05 18:34:21 matt Exp $); #ifdef _KERNEL_OPT #include opt_pci.h @@ -421,6 +421,32 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl } } +#ifdef _KERNEL +void +pci_aprint_devinfo_fancy(const struct pci_attach_args *pa, const char *naive, + const char *known, int addrev) +{ + char devinfo[256]; + + if (known) { + aprint_normal(: %s, known); + if (addrev) + aprint_normal( (rev. 0x%02x), + PCI_REVISION(pa-pa_class)); + aprint_normal(\n); + } else { + pci_devinfo(pa-pa_id, pa-pa_class, 0, + devinfo, sizeof(devinfo)); + aprint_normal(: %s (rev. 0x%02x)\n, devinfo, + PCI_REVISION(pa-pa_class)); + } + if (naive) + aprint_naive(: %s\n, naive); + else + aprint_naive(\n); +} +#endif + /* * Print out most of the PCI configuration registers. Typically used * in a device attach routine like this:
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Tue Nov 5 18:34:44 UTC 2013 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: pcivar.h Log Message: Pull in support for pci_aprint_devinfo_fancy To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.83.12.1 src/sys/dev/pci/pcivar.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/pcivar.h diff -u src/sys/dev/pci/pcivar.h:1.83 src/sys/dev/pci/pcivar.h:1.83.12.1 --- src/sys/dev/pci/pcivar.h:1.83 Tue Jul 22 04:52:19 2008 +++ src/sys/dev/pci/pcivar.h Tue Nov 5 18:34:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pcivar.h,v 1.83 2008/07/22 04:52:19 bjs Exp $ */ +/* $NetBSD: pcivar.h,v 1.83.12.1 2013/11/05 18:34:44 matt Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -213,6 +213,10 @@ int pci_get_capability(pci_chipset_tag_t int pci_probe_device(struct pci_softc *, pcitag_t tag, int (*)(struct pci_attach_args *), struct pci_attach_args *); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); +void pci_aprint_devinfo_fancy(const struct pci_attach_args *, + const char *, const char *, int); +#define pci_aprint_devinfo(pap, naive) \ + pci_aprint_devinfo_fancy(pap, naive, NULL, 0); void pci_conf_print(pci_chipset_tag_t, pcitag_t, void (*)(pci_chipset_tag_t, pcitag_t, const pcireg_t *)); const struct pci_quirkdata *
CVS commit: [matt-nb5-mips64] src/sys/dev/sdmmc
Module Name:src Committed By: matt Date: Tue Nov 5 18:35:35 UTC 2013 Modified Files: src/sys/dev/sdmmc [matt-nb5-mips64]: sdhc.c Log Message: turn off debug To generate a diff of this commit: cvs rdiff -u -r1.7.2.4 -r1.7.2.5 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.7.2.4 src/sys/dev/sdmmc/sdhc.c:1.7.2.5 --- src/sys/dev/sdmmc/sdhc.c:1.7.2.4 Tue Dec 27 17:12:47 2011 +++ src/sys/dev/sdmmc/sdhc.c Tue Nov 5 18:35:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.7.2.4 2011/12/27 17:12:47 matt Exp $ */ +/* $NetBSD: sdhc.c,v 1.7.2.5 2013/11/05 18:35:35 matt Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.7.2.4 2011/12/27 17:12:47 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.7.2.5 2013/11/05 18:35:35 matt Exp $); #include sys/param.h #include sys/device.h @@ -41,7 +41,7 @@ __KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.7 #include dev/sdmmc/sdmmcvar.h #ifdef SDHC_DEBUG -int sdhcdebug = 2; +int sdhcdebug = 0; #define DPRINTF(n,s) do { if ((n) = sdhcdebug) printf s; } while (0) void sdhc_dump_regs(struct sdhc_host *); #else
CVS commit: [matt-nb5-mips64] src/sys/dev/pci
Module Name:src Committed By: matt Date: Tue Nov 5 18:37:37 UTC 2013 Modified Files: src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.963.4.1.4.8 -r1.963.4.1.4.9 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.962.4.1.4.8 -r1.962.4.1.4.9 src/sys/dev/pci/pcidevs_data.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/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.963.4.1.4.8 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.9 --- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.8 Tue Nov 5 18:36:18 2013 +++ src/sys/dev/pci/pcidevs.h Tue Nov 5 18:37:24 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.963.4.1.4.8 2013/11/05 18:36:18 matt Exp $ */ +/* $NetBSD: pcidevs.h,v 1.963.4.1.4.9 2013/11/05 18:37:24 matt Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp + * NetBSD: pcidevs,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp */ /* Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.8 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.9 --- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.8 Tue Nov 5 18:36:18 2013 +++ src/sys/dev/pci/pcidevs_data.h Tue Nov 5 18:37:24 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.962.4.1.4.9 2013/11/05 18:37:24 matt Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp + * NetBSD: pcidevs,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp */ /*
CVS commit: [matt-nb5-mips64] src/sys/dev/i2c
Module Name:src Committed By: matt Date: Tue Nov 5 18:40:22 UTC 2013 Modified Files: src/sys/dev/i2c [matt-nb5-mips64]: spdmem.c Log Message: Deal with larger DIMMs To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.8.1 src/sys/dev/i2c/spdmem.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/i2c/spdmem.c diff -u src/sys/dev/i2c/spdmem.c:1.11 src/sys/dev/i2c/spdmem.c:1.11.8.1 --- src/sys/dev/i2c/spdmem.c:1.11 Sun Sep 28 12:59:54 2008 +++ src/sys/dev/i2c/spdmem.c Tue Nov 5 18:40:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: spdmem.c,v 1.11 2008/09/28 12:59:54 pgoyette Exp $ */ +/* $NetBSD: spdmem.c,v 1.11.8.1 2013/11/05 18:40:22 matt Exp $ */ /* * Copyright (c) 2007 Nicolas Joly @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: spdmem.c,v 1.11 2008/09/28 12:59:54 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: spdmem.c,v 1.11.8.1 2013/11/05 18:40:22 matt Exp $); #include sys/param.h #include sys/device.h @@ -227,7 +227,7 @@ spdmem_attach(device_t parent, device_t const char *rambus_rev = Reserved; int num_banks = 0; int per_chip = 0; - int dimm_size, cycle_time, d_clk, p_clk, bits; + unsigned int dimm_size, cycle_time, d_clk, p_clk, bits; int i; unsigned int spd_len, spd_size; unsigned int tAA, tRCD, tRP, tRAS; @@ -420,9 +420,12 @@ spdmem_attach(device_t parent, device_t } if (IS_RAMBUS_TYPE || (num_banks = 8 per_chip = 8 dimm_size 0 - dimm_size = 12)) { + dimm_size = 18)) { dimm_size = (1 dimm_size) * num_banks * per_chip; - aprint_normal(, %dMB, dimm_size); + if (dimm_size = 1024) + aprint_normal(, %uGB, dimm_size / 1024); + else + aprint_normal(, %uMB, dimm_size); if (node != NULL) sysctl_createv(NULL, 0, NULL, NULL, CTLFLAG_IMMEDIATE, @@ -545,7 +548,7 @@ spdmem_attach(device_t parent, device_t p_clk += 50; p_clk -= p_clk % 100; } - aprint_normal(, %dMHz (%s-%d)\n, + aprint_normal(, %uMHz (%s-%u)\n, d_clk, ddr_type_string, p_clk); if (node != NULL) sysctl_createv(NULL, 0, NULL, NULL,
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Nov 5 18:41:57 UTC 2013 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLPEVB Log Message: Add xhci To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/evbmips/conf/XLPEVB 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/evbmips/conf/XLPEVB diff -u src/sys/arch/evbmips/conf/XLPEVB:1.1.2.7 src/sys/arch/evbmips/conf/XLPEVB:1.1.2.8 --- src/sys/arch/evbmips/conf/XLPEVB:1.1.2.7 Fri Feb 10 08:54:18 2012 +++ src/sys/arch/evbmips/conf/XLPEVB Tue Nov 5 18:41:57 2013 @@ -1,8 +1,8 @@ -# $NetBSD: XLPEVB,v 1.1.2.7 2012/02/10 08:54:18 matt Exp $ +# $NetBSD: XLPEVB,v 1.1.2.8 2013/11/05 18:41:57 matt Exp $ include arch/evbmips/conf/std.rmixlp -#ident XLSATX-$Revision: 1.1.2.7 $ +#ident XLSATX-$Revision: 1.1.2.8 $ #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -153,6 +153,7 @@ ukphy* at mii? phy ? # unknown PHY com* at pci? dev ? function ? ehci* at pci? dev ? function ? ohci* at pci? dev ? function ? +xhci* at pci? dev ? function ? xlsdio* at pci? dev ? function ? sdhc* at xlsdio? slot 0 sdmmc* at sdhc? @@ -195,6 +196,7 @@ wd* at atabus? drive ? flags 0x # USB usb* at ohci? usb* at ehci? +usb* at xhci? uhub* at usb? uhub* at uhub? port ? umass* at uhub? port ? configuration ? interface ?
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Tue Nov 5 18:44:02 UTC 2013 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_nand_pci.c Log Message: Start of a nand for xlp3xx/xlp2xx. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_nand_pci.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/mips/rmi/rmixl_nand_pci.c diff -u src/sys/arch/mips/rmi/rmixl_nand_pci.c:1.1.2.2 src/sys/arch/mips/rmi/rmixl_nand_pci.c:1.1.2.3 --- src/sys/arch/mips/rmi/rmixl_nand_pci.c:1.1.2.2 Fri Dec 30 06:48:56 2011 +++ src/sys/arch/mips/rmi/rmixl_nand_pci.c Tue Nov 5 18:44:02 2013 @@ -27,16 +27,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include locators.h + #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_nand_pci.c,v 1.1.2.2 2011/12/30 06:48:56 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_nand_pci.c,v 1.1.2.3 2013/11/05 18:44:02 matt Exp $); #include sys/param.h +#include sys/condvar.h #include sys/device.h +#include sys/mutex.h #include sys/bus.h -#include locators.h - #include dev/pci/pcireg.h #include dev/pci/pcivar.h #include dev/pci/pcidevs.h @@ -51,27 +53,118 @@ __KERNEL_RCSID(1, $NetBSD: rmixl_nand_p static int xlnand_pci_match(device_t, cfdata_t, void *); static void xlnand_pci_attach(device_t, device_t, void *); +static int xlnand_pci_detach(device_t, int); + +static int xlnand_read_page(device_t, size_t, uint8_t *); +static int xlnand_program_page(device_t, size_t, const uint8_t *); + +static void xlnand_select(device_t, bool); +static void xlnand_command(device_t, uint8_t); +static void xlnand_address(device_t, uint8_t); +static void xlnand_busy(device_t); +static void xlnand_read_buf(device_t, void *, size_t); +static void xlnand_write_buf(device_t, const void *, size_t); + +static void xlnand_read_1(device_t, uint8_t *); +static void xlnand_read_2(device_t, uint16_t *); +static void xlnand_write_1(device_t, uint8_t); +static void xlnand_write_2(device_t, uint16_t); + +static int xlnand_intr(void *); + +struct xlnand_chip { + device_t xlch_nanddev; + kcondvar_t xlch_cv_ready; + + uint32_t xlch_cmds; + uint64_t xlch_addrs; + uint32_t xlch_data; + uint32_t xlch_int_mask; + uint8_t xlch_cmdshift; + uint8_t xlch_addrshift; + uint8_t xlch_num; + uint8_t xlch_datalen; + uint8_t xlch_chipnum; + + struct nand_interface xlch_nand_if; + char xlch_wmesg[16]; +}; struct xlnand_softc { - device_t sc_dev; - bus_space_tag_t sc_bst; - bus_space_handle_t sc_bsh; + device_t xlsc_dev; + bus_dma_tag_t xlsc_dmat; + bus_space_tag_t xlsc_bst; + bus_space_handle_t xlsc_bsh; + void *xlsc_ih; + uint8_t xlsc_buswidth; + + kcondvar_t xlsc_cv_available; + struct xlnand_chip *xlsc_active_chip; + + bus_dma_segment_t xlsc_xferseg; + bus_dmamap_t xlsc_xfermap; + void *xlsc_xferbuf; + + struct xlnand_chip xlsc_chips[8]; + + kmutex_t xlsc_intr_lock __aligned(64); + kmutex_t xlsc_wait_lock __aligned(64); +}; + +#define CMDSEQ1(a,b) (((ONFI_ ## b) 8) | RMIXLP_NAND_CMD_ ## a) +#define CMDSEQ2(a,b,c) (((ONFI_ ## c) 16) | CMDSEQ1(a,b)) +#define CMDSEQ3(a,b,c,d) (((ONFI_ ## d) 14) | CMDSEQ2(a,b,c)) + +static const uint32_t xlnand_cmdseqs[] = { + CMDSEQ1(SEQ_0, RESET), + //CMDSEQ1(SEQ_0, SYNCRONOUS_RESET), + CMDSEQ1(SEQ_1, READ_ID), + CMDSEQ1(SEQ_2, READ_UNIQUE_ID), + CMDSEQ1(SEQ_2, READ_PARAMETER_PAGE), + CMDSEQ1(SEQ_2, GET_FEATURES), + CMDSEQ1(SEQ_3, SET_FEATURES), + //CMDSEQ1(SEQ_17, SET_FEATURES2), + CMDSEQ1(SEQ_4, READ_STATUS), + //CMDSEQ1(SEQ_5, SELECT_LUN_WITH_STATUS), + CMDSEQ2(SEQ_6, CHANGE_READ_COLUMN, CHANGE_READ_COLUMN_START), + //CMDSEQ2(SEQ_7, SELECT_CACHE_REGISTER, CHANGE_READ_COLUMN_START), + //CMDSEQ1(SEQ_8, CHANGE_WRITE_COLUMN), + //CMDSEQ1(SEQ_12, CHANGE_ROW_ADDRESS), + CMDSEQ2(SEQ_10, READ, READ_START), + CMDSEQ2(SEQ_10, READ, READ_CACHE_RANDOM), + CMDSEQ1(SEQ_11, READ_CACHE_SEQUENTIAL), + CMDSEQ1(SEQ_11, READ_CACHE_END), + CMDSEQ2(SEQ_12, READ, READ_INTERLEAVED), + //CMDSEQ2(SEQ_15, READ, READ, READ_START), + CMDSEQ2(SEQ_12, PAGE_PROGRAM, PAGE_PROGRAM_START), + CMDSEQ1(SEQ_13, PAGE_PROGRAM), + CMDSEQ2(SEQ_12, PAGE_PROGRAM, PAGE_CACHE_PROGRAM), + CMDSEQ2(SEQ_12, PAGE_PROGRAM, PAGE_PROGRAM_INTERLEAVED), + //CMDSEQ1(SEQ_0, WRITE_PAGE), + //CMDSEQ1(SEQ_0, WRITE_PAGE_CACHE), + //CMDSEQ1(SEQ_0, WRITE_PAGE_INTERLEAVED), + CMDSEQ2(SEQ_10, READ, READ_COPYBACK), + CMDSEQ2(SEQ_9, COPYBACK_PROGRAM, COPYBACK_PROGRAM_START), + CMDSEQ2(SEQ_12, COPYBACK_PROGRAM, COPYBACK_PROGRAM_INTERLEAVED), + CMDSEQ1(SEQ_13, COPYBACK_PROGRAM), + CMDSEQ2(SEQ_14, BLOCK_ERASE, BLOCK_ERASE_START), + CMDSEQ2(SEQ_14, BLOCK_ERASE, BLOCK_ERASE_INTERLEAVED), }; static inline uint32_t -xlnand_read_4(struct xlnand_softc *sc, bus_size_t off) +xlnand_read_4(struct xlnand_softc *xlsc, bus_size_t off) { - return bus_space_read_4(sc-sc_bst, sc-sc_bsh, off); + return bus_space_read_4(xlsc-xlsc_bst, xlsc-xlsc_bsh, off); } static inline void
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Sat Dec 15 03:05:56 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpuregs.h src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmn.c rmixl_gpio_pci.c rmixl_intr.c rmixl_machdep.c rmixlp_pcie.c rmixlreg.h rmixlvar.h Log Message: Add initial support for XLP II (XLP2XX/XLP1XX). To generate a diff of this commit: cvs rdiff -u -r1.74.28.25 -r1.74.28.26 src/sys/arch/mips/include/cpuregs.h cvs rdiff -u -r1.205.4.1.2.1.2.68 -r1.205.4.1.2.1.2.69 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/arch/mips/rmi/rmixl_fmn.c cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixl_gpio_pci.c cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/sys/arch/mips/rmi/rmixl_intr.c cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/mips/rmi/rmixl_machdep.c cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixlp_pcie.c cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/sys/arch/mips/rmi/rmixlreg.h cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/sys/arch/mips/rmi/rmixlvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.74.28.25 src/sys/arch/mips/include/cpuregs.h:1.74.28.26 --- src/sys/arch/mips/include/cpuregs.h:1.74.28.25 Thu Jan 19 08:28:48 2012 +++ src/sys/arch/mips/include/cpuregs.h Sat Dec 15 03:05:55 2012 @@ -911,10 +911,11 @@ #define MIPS_XLR_C4 0x91 /* RMI XLR Production Rev C4 */ /* - * CPU processor IDs for company ID == 12 (RMI) + * CPU processor IDs for company ID == 12 (RMI, NetLogic, Broadcom) */ #define MIPS_XLP8XX 0x10 /* RMI XLP8XX/XLP4XX ISA 64 Rel 2 */ #define MIPS_XLP3XX 0x11 /* RMI XLP3XX ISA 64 Rel 2 */ +#define MIPS_XLP2XX 0x12 /* Broadcom XLP2XX/XLP1XX ISA 64 Rel 2 */ #define MIPS_XLR308B 0x06 /* RMI XLR308-B ISA 64 */ #define MIPS_XLR508B 0x07 /* RMI XLR508-B ISA 64 */ #define MIPS_XLR516B 0x08 /* RMI XLR516-B ISA 64 */ Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.68 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.69 --- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.68 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/mips/mips_machdep.c Sat Dec 15 03:05:55 2012 @@ -630,6 +630,18 @@ static const struct pridtab cputab[] = { CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(1,4)|MIPS_CIDFL_RMI_L2(256KB), XLS104 }, + { MIPS_PRID_CID_RMI, MIPS_XLP2XX, -1, -1, -1, 0, + MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR | + CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR, + MIPS_CP0FL_USE | + MIPS_CP0FL_EBASE | MIPS_CP0FL_USERLOCAL | MIPS_CP0FL_HWRENA | + MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | + MIPS_CP0FL_CONFIG | MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 | + MIPS_CP0FL_CONFIG3 | MIPS_CP0FL_CONFIG6 | MIPS_CP0FL_CONFIG7, + CIDFL_RMI_TYPE_XLP | MIPS_CIDFL_RMI_CPUS(1,4) | + MIPS_CIDFL_RMI_L2(512KB) | MIPS_CIDFL_RMI_L3(2MB), + XLP2XX }, + { MIPS_PRID_CID_RMI, MIPS_XLP3XX, -1, -1, -1, 0, MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR | CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR, Index: src/sys/arch/mips/rmi/rmixl_fmn.c diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.12 src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.13 --- src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.12 Fri Mar 30 01:04:47 2012 +++ src/sys/arch/mips/rmi/rmixl_fmn.c Sat Dec 15 03:05:56 2012 @@ -364,7 +364,7 @@ fmn_init_xlp(fmn_info_t *fmn) si-si_qid_first = 1000; si-si_qid_last = 1019; } else { - KASSERT(RMIXLP_3XX_P); + KASSERT(RMIXLP_3XX_P || RMIXLP_2XX_P); si-si_qid_first = 496; si-si_qid_last = 504; } Index: src/sys/arch/mips/rmi/rmixl_gpio_pci.c diff -u src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.6 src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.7 --- src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.6 Thu Jan 19 17:28:50 2012 +++ src/sys/arch/mips/rmi/rmixl_gpio_pci.c Sat Dec 15 03:05:56 2012 @@ -29,7 +29,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_gpio_pci.c,v 1.1.2.6 2012/01/19 17:28:50 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_gpio_pci.c,v 1.1.2.7 2012/12/15 03:05:56 matt Exp $); #include sys/param.h #include sys/atomic.h @@ -81,6 +81,7 @@ static const uint8_t xlgpio_pincnt_by_va [RMIXLP_3XXL] = RMIXLP_GPIO_3XXL_MAXPINS, [RMIXLP_3XXH] = RMIXLP_GPIO_3XXL_MAXPINS, [RMIXLP_3XXQ] = RMIXLP_GPIO_3XXL_MAXPINS, +[RMIXLP_2XX] = RMIXLP_GPIO_2XXL_MAXPINS, }; @@ -286,7 +287,7 @@ xlgpio_pci_attach(device_t parent, devic /* * These are at different offsets on the 3xx than the 8xx/4xx. */ - if (rcp-rc_xlp_variant = RMIXLP_3XX) { + if (RMIXLP_3XX_P || RMIXLP_2XX_P) { gg-gg_r_intpol = RMIXLP_GPIO_3XX_INTPOL(group); gg-gg_r_inttype =
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Thu Aug 9 19:46:40 UTC 2012 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmn_pci.c Log Message: Deal with unallocated spill area in the fmn. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_fmn_pci.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/mips/rmi/rmixl_fmn_pci.c diff -u src/sys/arch/mips/rmi/rmixl_fmn_pci.c:1.1.2.1 src/sys/arch/mips/rmi/rmixl_fmn_pci.c:1.1.2.2 --- src/sys/arch/mips/rmi/rmixl_fmn_pci.c:1.1.2.1 Thu Jan 19 17:34:18 2012 +++ src/sys/arch/mips/rmi/rmixl_fmn_pci.c Thu Aug 9 19:46:40 2012 @@ -29,7 +29,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_fmn_pci.c,v 1.1.2.1 2012/01/19 17:34:18 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_fmn_pci.c,v 1.1.2.2 2012/08/09 19:46:40 matt Exp $); #include sys/param.h #include sys/device.h @@ -237,10 +237,14 @@ xlfmn_pci_attach(device_t parent, device * allocated to it. */ if (oq_config RMIXLP_FMN_OQ_CONFIG_SE) { - if (((64 * sb + ss) 12) sc-sc_spill_base) -sc-sc_spill_base = (64 * sb + ss) 12; - if (((64 * sb + sl + 1) 12) sc-sc_spill_limit) -sc-sc_spill_limit = (64 * sb + sl + 1) 12; + paddr_t spill_base = (64 * sb + ss) 12; + paddr_t spill_limit = (64 * sb + sl + 1) 12; + if (spill_base spill_limit) { +if (spill_base sc-sc_spill_base) + sc-sc_spill_base = spill_base; +if (spill_limit sc-sc_spill_limit) + sc-sc_spill_limit = spill_limit; + } } if ((oq_config RMIXLP_FMN_OQ_CONFIG_OE) == 0) @@ -297,15 +301,19 @@ xlfmn_pci_attach(device_t parent, device spill area: %s: base=%#PRIxPADDR, limit=%#PRIxPADDR\n, buf, sc-sc_spill_base, sc-sc_spill_limit); - /* - * Let's try to allocate the spill area. - */ - struct pglist mlist; - int error = uvm_pglistalloc(sc-sc_spill_limit - sc-sc_spill_base, - sc-sc_spill_base, sc-sc_spill_limit, 0, 0, mlist, 1, true); - if (error) - aprint_error_dev(sc-sc_dev, - failed to allocate spill area: %d\n, error); + if (sc-sc_spill_base sc-sc_spill_limit) { + /* + * Let's try to allocate the spill area. + */ + struct pglist mlist; + int error = uvm_pglistalloc( + sc-sc_spill_limit - sc-sc_spill_base, + sc-sc_spill_base, sc-sc_spill_limit, + 0, 0, mlist, 1, true); + if (error) + aprint_error_dev(sc-sc_dev, + failed to allocate spill area: %d\n, error); + } aprint_normal_dev(sc-sc_dev, active queues: ); const char *pfx = ;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Wed Aug 8 22:10:21 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: pmap.h src/sys/arch/mips/mips [matt-nb5-mips64]: pmap_segtab.c trap.c Log Message: Fix some LP64 bugs To generate a diff of this commit: cvs rdiff -u -r1.54.26.27 -r1.54.26.28 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/mips/mips/pmap_segtab.c cvs rdiff -u -r1.217.12.45 -r1.217.12.46 src/sys/arch/mips/mips/trap.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/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.54.26.27 src/sys/arch/mips/include/pmap.h:1.54.26.28 --- src/sys/arch/mips/include/pmap.h:1.54.26.27 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/include/pmap.h Wed Aug 8 22:10:21 2012 @@ -113,7 +113,7 @@ union pt_entry; typedef union pmap_segtab { union pmap_segtab * seg_seg[NSEGPG]; - union pt_entry * seg_tab[NPTEPG]; + union pt_entry * seg_tab[NSEGPG]; } pmap_segtab_t; #else /* Index: src/sys/arch/mips/mips/pmap_segtab.c diff -u src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.18 src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.19 --- src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.18 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/mips/pmap_segtab.c Wed Aug 8 22:10:21 2012 @@ -130,6 +130,7 @@ __KERNEL_RCSID(0, pmap_segtab.c,v 1.1.2 #include mips/pte.h CTASSERT(NBPG = sizeof(pmap_segtab_t)); + #define PMAP_PTP_CACHE struct pmap_segtab_info { Index: src/sys/arch/mips/mips/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.217.12.45 src/sys/arch/mips/mips/trap.c:1.217.12.46 --- src/sys/arch/mips/mips/trap.c:1.217.12.45 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/mips/trap.c Wed Aug 8 22:10:21 2012 @@ -378,9 +378,9 @@ trap(uint32_t status, uint32_t cause, va */ struct cpu_info * const ci = curcpu(); if ((va XSEGSHIFT) == 0 - __predict_false(ci-ci_pmap_seg0tab == NULL - ci-ci_pmap_segtab-seg_seg[0] != NULL)) { - ci-ci_pmap_seg0tab = ci-ci_pmap_segtab-seg_seg[0]; + __predict_false(ci-ci_pmap_seg0tab[0] == NULL + ci-ci_pmap_segtab[0]-seg_seg[0] != NULL)) { + ci-ci_pmap_seg0tab[0] = ci-ci_pmap_segtab[0]-seg_seg[0]; kpreempt_enable(); if (type T_USER) { userret(l);
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Sat Aug 4 07:17:06 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: mips_opcode.h src/sys/arch/mips/mips [matt-nb5-mips64]: db_disasm.c Log Message: disasm special2 and special3 opcodes (and ehb and ssnop too). To generate a diff of this commit: cvs rdiff -u -r1.12.96.3 -r1.12.96.4 src/sys/arch/mips/include/mips_opcode.h cvs rdiff -u -r1.19.62.4 -r1.19.62.5 src/sys/arch/mips/mips/db_disasm.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/mips/include/mips_opcode.h diff -u src/sys/arch/mips/include/mips_opcode.h:1.12.96.3 src/sys/arch/mips/include/mips_opcode.h:1.12.96.4 --- src/sys/arch/mips/include/mips_opcode.h:1.12.96.3 Fri Apr 29 08:26:21 2011 +++ src/sys/arch/mips/include/mips_opcode.h Sat Aug 4 07:17:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_opcode.h,v 1.12.96.3 2011/04/29 08:26:21 matt Exp $ */ +/* mips_opcode.h,v 1.12.96.3 2011/04/29 08:26:21 matt Exp */ /*- * Copyright (c) 1992, 1993 @@ -145,9 +145,10 @@ typedef union { #define OP_DADDIU 031 /* MIPS-II, for r4000 port */ #define OP_LDL 032 /* MIPS-II, for r4000 port */ #define OP_LDR 033 /* MIPS-II, for r4000 port */ - -#define OP_SPECIAL2 034 /* QED opcodes */ -#define OP_SPECIAL3 037 /* QED opcodes */ +#define OP_SPECIAL2 034 /* QED/MIPS{32,64}R{1,2} opcodes */ +#define OP_JALX 035 +#define OP_MDMX 036 +#define OP_SPECIAL3 037 /* QED/MIPS{32,64}R{1,2} opcodes */ #define OP_LB 040 #define OP_LH 041 @@ -156,8 +157,6 @@ typedef union { #define OP_LBU 044 #define OP_LHU 045 #define OP_LWR 046 -#define OP_LHU 045 -#define OP_LWR 046 #define OP_LWU 047 /* MIPS-II, for r4000 port */ #define OP_SB 050 @@ -262,13 +261,27 @@ typedef union { #define OP_CLO 041 /* MIPS32/64 */ #define OP_DCLZ 044 /* MIPS32/64 */ #define OP_DCLO 045 /* MIPS32/64 */ +#define OP_SDBBP 077 /* MIPS32/64 */ /* * Values for the 'func' field when 'op' == OP_SPECIAL3. */ +#define OP_EXT 000 /* MIPS32/64 r2 */ +#define OP_DEXTM 001 /* MIPS32/64 r2 */ +#define OP_DEXTU 002 /* MIPS32/64 r2 */ +#define OP_DEXT 003 /* MIPS32/64 r2 */ +#define OP_INS 004 /* MIPS32/64 r2 */ +#define OP_DINSM 004 /* MIPS32/64 r2 */ +#define OP_DINSU 006 /* MIPS32/64 r2 */ +#define OP_DINS 007 /* MIPS32/64 r2 */ +#define OP_BSHFL 040 /* MIPS32/64 r2 */ +#define OP_DBSHFL 044 /* MIPS32/64 r2 */ #define OP_RDHWR 073 /* MIPS32/64 r2 */ - +#define BSHFL_SBH 002 /* MIPS32/64 r2 */ +#define BSHFL_SHD 005 /* MIPS32/64 r2 */ +#define BSHFL_SEB 020 /* MIPS32/64 r2 */ +#define BSHFL_SEH 030 /* MIPS32/64 r2 */ /* * Values for the 'func' field when 'op' == OP_BCOND. */ Index: src/sys/arch/mips/mips/db_disasm.c diff -u src/sys/arch/mips/mips/db_disasm.c:1.19.62.4 src/sys/arch/mips/mips/db_disasm.c:1.19.62.5 --- src/sys/arch/mips/mips/db_disasm.c:1.19.62.4 Thu Feb 16 10:45:17 2012 +++ src/sys/arch/mips/mips/db_disasm.c Sat Aug 4 07:17:05 2012 @@ -56,7 +56,7 @@ static const char * const op_name[64] = /* 0 */ spec, bcond,j, jal, beq, bne, blez, bgtz, /* 8 */ addi, addiu,slti, sltiu,andi, ori, xori, lui, /*16 */ cop0, cop1, cop2, cop3, beql, bnel, blezl,bgtzl, -/*24 */ daddi,daddiu,ldl, ldr, op34, op35, op36, op37, +/*24 */ daddi,daddiu,ldl, ldr, spec2, jalx, mdmx, spec3, /*32 */ lb, lh, lwl, lw, lbu, lhu, lwr, lwu, /*40 */ sb, sh, swl, sw, sdl, sdr, swr, cache, /*48 */ ll, lwc1, lwc2, lwc3, lld, ldc1, ldc2, ld, @@ -74,8 +74,26 @@ static const char * const spec_name[64] /*56 */ dsll,spec71,dsrl,dsra,dsll32,spec75,dsrl32,dsra32 }; -static const char * const spec2_name[4] = { /* QED RM4650, R5000, etc. */ -/* 0 */ mad, madu, mul, spec3 +static const char const spec2_name[64][8] = { /* MIPSxxR{1,2} */ +/* 0 */ mad, madu, mul, sp2?3, msub, msubu, sp2?6, sp2?7, +/* 8 */ sp2?8, sp2?9, sp2?10, sp2?11, sp2?12, sp2?13, sp2?14, sp2?15, +/* 16 */ sp2?16, sp2?17, sp2?18, sp2?19, sp2?20, sp2?21, sp2?22, sp2?23, +/* 24 */ sp2?24, sp2?25, sp2?26, sp2?27, sp2?28, sp2?29, sp2?30, sp2?31, +/* 32 */ clz, clo, sp2?34, sp2?35, dclz, dclo, sp2?38, sp2?39, +/* 40 */ sp2?40, sp2?41, sp2?42, sp2?43, sp2?44, sp2?45, sp2?46, sp2?47, +/* 48 */ sp2?48, sp2?49, sp2?50, sp2?51, sp2?52, sp2?53, sp2?54, sp2?55, +/* 56 */ sp2?56, sp2?57, sp2?58, sp2?59, sp2?60, sp2?61, sp2?62, sdbbp, +}; + +static const char const spec3_name[64][8] = { /* MIPSxxR2 */ +/* 0 */ ext, dextm, dextu, dext, ins, dinsm, dinsu, dins, +/* 8 */ sp3?8, sp3?9, sp3?10, sp3?11, sp3?12, sp3?13, sp3?14, sp3?15, +/* 16 */ sp3?16, sp3?17, sp3?18, sp3?19, sp3?20, sp3?21, sp3?22, sp3?23, +/* 24 */ sp3?24, sp3?25, sp3?26, sp3?27, sp3?28, sp3?29, sp3?30, sp3?31, +/* 32 */ bshfl, sp3?33, sp3?34, sp3?35, dbshfl, sp3?37, sp3?38, sp3?39, +/* 40 */ sp3?40, sp3?41, sp3?42, sp3?43, sp3?44, sp3?45, sp3?46, sp3?47, +/* 48 */ sp3?48, sp3?49, sp3?50, sp3?51, sp3?52, sp3?53, sp3?54, sp3?55, +/* 56 */ sp3?56,
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Sat Aug 4 07:20:32 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h mips_param.h pmap.h pte.h vmparam.h src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c genassym.cf mipsX_subr.S mips_machdep.c pmap.c pmap_segtab.c trap.c vm_machdep.c Log Message: Make MIPS use a multi-level page table for the kernel address space. (just like the user address does). XXX fix mips1 To generate a diff of this commit: cvs rdiff -u -r1.90.16.45 -r1.90.16.46 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.23.78.12 -r1.23.78.13 src/sys/arch/mips/include/mips_param.h cvs rdiff -u -r1.54.26.26 -r1.54.26.27 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.19.18.4 -r1.19.18.5 src/sys/arch/mips/include/pte.h cvs rdiff -u -r1.41.28.27 -r1.41.28.28 src/sys/arch/mips/include/vmparam.h cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/sys/arch/mips/mips/cpu_subr.c cvs rdiff -u -r1.44.12.33 -r1.44.12.34 src/sys/arch/mips/mips/genassym.cf cvs rdiff -u -r1.26.36.1.2.57 -r1.26.36.1.2.58 \ src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.205.4.1.2.1.2.67 -r1.205.4.1.2.1.2.68 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.179.16.45 -r1.179.16.46 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/arch/mips/mips/pmap_segtab.c cvs rdiff -u -r1.217.12.44 -r1.217.12.45 src/sys/arch/mips/mips/trap.c cvs rdiff -u -r1.121.6.1.2.29 -r1.121.6.1.2.30 \ src/sys/arch/mips/mips/vm_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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.45 src/sys/arch/mips/include/cpu.h:1.90.16.46 --- src/sys/arch/mips/include/cpu.h:1.90.16.45 Mon Jul 9 17:23:37 2012 +++ src/sys/arch/mips/include/cpu.h Sat Aug 4 07:20:31 2012 @@ -120,9 +120,9 @@ struct cpu_info { int ci_tlb_slot; /* reserved tlb entry for cpu_info */ u_int ci_pmap_asid_cur; /* current ASID */ struct pmap_tlb_info *ci_tlb_info; /* tlb information for this cpu */ - union pmap_segtab *ci_pmap_seg0tab; + union pmap_segtab *ci_pmap_seg0tab[2]; #ifdef _LP64 - union pmap_segtab *ci_pmap_segtab; + union pmap_segtab *ci_pmap_segtab[2]; #else vaddr_t ci_pmap_srcbase; /* starting VA of ephemeral src space */ vaddr_t ci_pmap_dstbase; /* starting VA of ephemeral dst space */ Index: src/sys/arch/mips/include/mips_param.h diff -u src/sys/arch/mips/include/mips_param.h:1.23.78.12 src/sys/arch/mips/include/mips_param.h:1.23.78.13 --- src/sys/arch/mips/include/mips_param.h:1.23.78.12 Mon Feb 27 16:57:58 2012 +++ src/sys/arch/mips/include/mips_param.h Sat Aug 4 07:20:31 2012 @@ -87,18 +87,24 @@ #define PGSHIFT PAGE_SHIFT /* LOG2(NBPG) */ #define NBPG (1 PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ -#define NPTEPG (NBPG/4) +#define PTPSHIFT (2) +#define PTPLENGTH (PGSHIFT-PTPSHIFT) +#define NPTEPG (1 PTPLENGTH) #define NBSEG (NBPG*NPTEPG) /* bytes/segment */ #define SEGOFSET (NBSEG-1) /* byte offset into segment */ -#define SEGSHIFT (PGSHIFT+(PGSHIFT-2)) /* LOG2(NBSEG) */ +#define SEGSHIFT (PGSHIFT+PTPLENGTH) /* LOG2(NBSEG) */ #ifdef _LP64 -#define NSEGPG (NBPG/8) +#define SEGLENGTH (PGSHIFT-3) #define NBXSEG ((uint64_t)NSEGPG*NBSEG) /* bytes/xsegment */ #define XSEGOFSET (NBXSEG-1) /* byte offset into xsegment */ -#define XSEGSHIFT (SEGSHIFT+(PGSHIFT-3)) /* LOG2(NBXSEG) */ +#define XSEGSHIFT (SEGSHIFT+SEGLENGTH) /* LOG2(NBXSEG) */ +#define XSEGLENGTH (PGSHIFT-3) +#else +#define SEGLENGTH (31-SEGSHIFT) #endif +#define NSEGPG (1 SEGLENGTH) /* * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized Index: src/sys/arch/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.54.26.26 src/sys/arch/mips/include/pmap.h:1.54.26.27 --- src/sys/arch/mips/include/pmap.h:1.54.26.26 Mon Jul 9 17:23:37 2012 +++ src/sys/arch/mips/include/pmap.h Sat Aug 4 07:20:31 2012 @@ -109,17 +109,11 @@ #define mips_trunc_seg(x) ((vaddr_t)(x) ~SEGOFSET) #define mips_round_seg(x) (((vaddr_t)(x) + SEGOFSET) ~SEGOFSET) -#ifdef _LP64 -#define PMAP_SEGTABSIZE NSEGPG -#else -#define PMAP_SEGTABSIZE (1 (31 - SEGSHIFT)) -#endif - union pt_entry; typedef union pmap_segtab { - union pmap_segtab * seg_seg[PMAP_SEGTABSIZE]; - union pt_entry * seg_tab[PMAP_SEGTABSIZE]; + union pmap_segtab * seg_seg[NSEGPG]; + union pt_entry * seg_tab[NPTEPG]; } pmap_segtab_t; #else /* Index: src/sys/arch/mips/include/pte.h diff -u src/sys/arch/mips/include/pte.h:1.19.18.4 src/sys/arch/mips/include/pte.h:1.19.18.5 --- src/sys/arch/mips/include/pte.h:1.19.18.4 Thu Mar 11 08:13:18 2010 +++ src/sys/arch/mips/include/pte.h Sat Aug 4 07:20:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.19.18.4 2010/03/11 08:13:18 matt Exp $ */ +/* pte.h,v 1.19.18.4 2010/03/11 08:13:18 matt Exp */ /*- * Copyright (c) 1997 The
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Mon Jul 9 17:11:32 UTC 2012 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: locore_mips1.S mipsX_subr.S Log Message: Add code to panic if/when a kthread return to lwp_startup. Add a workaround for the XLP which requires a EHB at the start of the interrupt vector. To generate a diff of this commit: cvs rdiff -u -r1.64.26.1.2.15 -r1.64.26.1.2.16 \ src/sys/arch/mips/mips/locore_mips1.S cvs rdiff -u -r1.26.36.1.2.56 -r1.26.36.1.2.57 \ src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/locore_mips1.S diff -u src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.15 src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.16 --- src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.15 Thu Feb 9 20:01:21 2012 +++ src/sys/arch/mips/mips/locore_mips1.S Mon Jul 9 17:11:32 2012 @@ -1511,6 +1511,15 @@ LEAF(MIPSX(lwp_trampoline)) jalr s0 move a0, s1 +#ifdef DIAGNOSTIC + INT_L v0, L_FLAG(MIPS_CURLWP) + and v0, LW_SYSTEM + beqz v0, 1f + nop + PANIC(kthread failed to call kthread_exit!) +1: +#endif + # Return to user (won't happen if a kernel thread) .set noat MIPSX(user_return): Index: src/sys/arch/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.56 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.57 --- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.56 Mon Feb 27 17:04:39 2012 +++ src/sys/arch/mips/mips/mipsX_subr.S Mon Jul 9 17:11:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.56 2012/02/27 17:04:39 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.57 2012/07/09 17:11:32 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -601,8 +601,13 @@ _VECTOR_END(MIPSX(exception)) */ VECTOR(MIPSX(intr), unknown) .set noat +#if (MIPS64R2_RMIXL) 0 + EHB #work around chip bug +#endif mfc0 k1, MIPS_COP_0_STATUS #00: get the status register +#if (MIPS3) 0 nop #01: stall +#endif and k1, k1, MIPS3_SR_KSU_USER #02: test for user mode PTR_LA k0, MIPSX(user_intr) #03: assume user mode bnez k1, 1f#05: yep, do it @@ -2598,6 +2603,14 @@ LEAF(MIPSX(lwp_trampoline)) jalr s0 move a0, s1 +#ifdef DIAGNOSTIC + INT_L v0, L_FLAG(MIPS_CURLWP) + and v0, LW_SYSTEM + beqz v0, 1f + nop + PANIC(kthread failed to call kthread_exit!) +1: +#endif # # Return to user (won't happen if a kernel thread) #
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Mon Jul 9 17:12:39 UTC 2012 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cache_r4k_subr.S Log Message: Add a .set mips32 so that O32 kernels can compile. To generate a diff of this commit: cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/mips/cache_r4k_subr.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/mips/mips/cache_r4k_subr.S diff -u src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.3 src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.4 --- src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.3 Thu Feb 16 10:44:30 2012 +++ src/sys/arch/mips/mips/cache_r4k_subr.S Mon Jul 9 17:12:39 2012 @@ -37,7 +37,7 @@ #include mips/asm.h -RCSID($NetBSD: cache_r4k_subr.S,v 1.1.2.3 2012/02/16 10:44:30 matt Exp $) +RCSID($NetBSD: cache_r4k_subr.S,v 1.1.2.4 2012/07/09 17:12:39 matt Exp $) #include mips/cache_r4k.h @@ -45,6 +45,12 @@ RCSID($NetBSD: cache_r4k_subr.S,v 1.1.2 #error LINE_SHIFT undefined #endif +#ifdef __mips_o32 + .set mips32 +#else + .set mips3 +#endif + #define LINE_SIZE (1 LINE_SHIFT) #ifdef __STDC__
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Mon Jul 9 17:13:06 UTC 2012 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: genassym.cf Log Message: Add L_FLAG / LW_SYSTEM To generate a diff of this commit: cvs rdiff -u -r1.44.12.32 -r1.44.12.33 src/sys/arch/mips/mips/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/genassym.cf diff -u src/sys/arch/mips/mips/genassym.cf:1.44.12.32 src/sys/arch/mips/mips/genassym.cf:1.44.12.33 --- src/sys/arch/mips/mips/genassym.cf:1.44.12.32 Mon Feb 27 17:04:39 2012 +++ src/sys/arch/mips/mips/genassym.cf Mon Jul 9 17:13:06 2012 @@ -109,6 +109,7 @@ define MIPS_XKSEG_START MIPS_XKSEG_START # Important offsets into the lwp and proc structs associated constants define L_CPU offsetof(struct lwp, l_cpu) define L_CTXSWITCH offsetof(struct lwp, l_ctxswtch) +define L_FLAG offsetof(struct lwp, l_flag) define L_PCB offsetof(struct lwp, l_addr) define L_PRIORITY offsetof(struct lwp, l_priority) define L_PRIVATE offsetof(struct lwp, l_private) @@ -120,6 +121,8 @@ define L_MD_UPTE_1 offsetof(struct lwp, define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending) define L_WCHAN offsetof(struct lwp, l_wchan) +define LW_SYSTEM LW_SYSTEM + define P_RASLIST offsetof(struct proc, p_raslist) define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall)
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Mon Jul 9 17:14:47 UTC 2012 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: trap.c Log Message: It's mips_cpu_switchto now. To generate a diff of this commit: cvs rdiff -u -r1.217.12.43 -r1.217.12.44 src/sys/arch/mips/mips/trap.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/mips/mips/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.217.12.43 src/sys/arch/mips/mips/trap.c:1.217.12.44 --- src/sys/arch/mips/mips/trap.c:1.217.12.43 Mon Feb 27 17:04:39 2012 +++ src/sys/arch/mips/mips/trap.c Mon Jul 9 17:14:47 2012 @@ -1195,7 +1195,7 @@ const static struct { void *addr; const #endif /* MIPS64R2_RMIXL */ Name(cpu_idle), - Name(cpu_switchto), + Name(mips_cpu_switchto), {0, 0} };
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Mon Jul 9 17:15:17 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: locore.h Log Message: Add mips_cpu_switchto prototype. To generate a diff of this commit: cvs rdiff -u -r1.78.36.1.2.35 -r1.78.36.1.2.36 \ src/sys/arch/mips/include/locore.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.35 src/sys/arch/mips/include/locore.h:1.78.36.1.2.36 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.35 Tue Feb 14 01:51:11 2012 +++ src/sys/arch/mips/include/locore.h Mon Jul 9 17:15:17 2012 @@ -44,12 +44,15 @@ struct trapframe; void trap(uint32_t, uint32_t, vaddr_t, vaddr_t, struct trapframe *); void ast(void); +struct lwp * + mips_cpu_switchto(struct lwp *, struct lwp *, bool); + /* * Perform a trapsignal, and if cpu_printfataltraps is true, print the trap info * to the console. */ extern bool cpu_printfataltraps; -void cpu_trapsignal(struct lwp *, ksiginfo_t *, struct trapframe *); +void cpu_trapsignal(struct lwp *, ksiginfo_t *, struct trapframe *); void mips_fpu_trap(vaddr_t, struct trapframe *); void mips_fpu_intr(vaddr_t, struct trapframe *);
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Mon Jul 9 17:23:37 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h pmap.h src/sys/arch/mips/mips [matt-nb5-mips64]: pmap.c pmap_segtab.c pmap_tlb.c Log Message: Use a spinlock to protect the segtab queues. Use union pmap_segmap and pmap_segmap_t to track -HEAD. Use KERNEL_PID for the same reason. To generate a diff of this commit: cvs rdiff -u -r1.90.16.44 -r1.90.16.45 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.54.26.25 -r1.54.26.26 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.179.16.44 -r1.179.16.45 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/arch/mips/mips/pmap_segtab.c cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/sys/arch/mips/mips/pmap_tlb.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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.44 src/sys/arch/mips/include/cpu.h:1.90.16.45 --- src/sys/arch/mips/include/cpu.h:1.90.16.44 Mon Feb 27 17:04:39 2012 +++ src/sys/arch/mips/include/cpu.h Mon Jul 9 17:23:37 2012 @@ -120,9 +120,9 @@ struct cpu_info { int ci_tlb_slot; /* reserved tlb entry for cpu_info */ u_int ci_pmap_asid_cur; /* current ASID */ struct pmap_tlb_info *ci_tlb_info; /* tlb information for this cpu */ - union segtab *ci_pmap_seg0tab; + union pmap_segtab *ci_pmap_seg0tab; #ifdef _LP64 - union segtab *ci_pmap_segtab; + union pmap_segtab *ci_pmap_segtab; #else vaddr_t ci_pmap_srcbase; /* starting VA of ephemeral src space */ vaddr_t ci_pmap_dstbase; /* starting VA of ephemeral dst space */ Index: src/sys/arch/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.54.26.25 src/sys/arch/mips/include/pmap.h:1.54.26.26 --- src/sys/arch/mips/include/pmap.h:1.54.26.25 Mon Feb 27 16:57:05 2012 +++ src/sys/arch/mips/include/pmap.h Mon Jul 9 17:23:37 2012 @@ -104,6 +104,8 @@ * dynamically allocated at boot time. */ +#define KERNEL_PID 0 + #define mips_trunc_seg(x) ((vaddr_t)(x) ~SEGOFSET) #define mips_round_seg(x) (((vaddr_t)(x) + SEGOFSET) ~SEGOFSET) @@ -115,17 +117,15 @@ union pt_entry; -union segtab { -#ifdef _LP64 - union segtab *seg_seg[PMAP_SEGTABSIZE]; -#endif - union pt_entry *seg_tab[PMAP_SEGTABSIZE]; -}; +typedef union pmap_segtab { + union pmap_segtab * seg_seg[PMAP_SEGTABSIZE]; + union pt_entry * seg_tab[PMAP_SEGTABSIZE]; +} pmap_segtab_t; #else /* * Modules don't need to know this. */ -union segtab; +typedef union pmap_segtab pmap_segtab_t; #endif /* @@ -155,6 +155,7 @@ void pmap_pte_process(struct pmap *, vad void pmap_segtab_activate(struct pmap *, struct lwp *); void pmap_segtab_init(struct pmap *); void pmap_segtab_destroy(struct pmap *, pte_callback_t, uintptr_t); +extern kmutex_t pmap_segtab_lock; #endif /* _KERNEL */ /* @@ -182,7 +183,7 @@ typedef struct pmap { volatile uint32_t pm_onproc; /* pmap is active on ... */ volatile uint32_t pm_shootdown_pending; #endif - union segtab *pm_segtab; /* pointers to pages of PTEs */ + pmap_segtab_t * pm_segtab; /* pointers to pages of PTEs */ u_int pm_count; /* pmap reference count */ u_int pm_flags; #define PMAP_DEFERRED_ACTIVATE 0x0001 @@ -304,8 +305,10 @@ struct vm_page *mips_pmap_alloc_poolpage #define POOL_VTOPHYS(va) (MIPS_KSEG0_P(va) \ ? MIPS_KSEG0_TO_PHYS(va) \ : MIPS_XKPHYS_TO_PHYS(va)) +#define POOL_PHYSTOV(pa) MIPS_PHYS_TO_XKPHYS_CACHED((paddr_t)(pa)) #else #define POOL_VTOPHYS(va) MIPS_KSEG0_TO_PHYS((vaddr_t)(va)) +#define POOL_PHYSTOV(pa) MIPS_PHYS_TO_KSEG0((paddr_t)(pa)) #endif /* Index: src/sys/arch/mips/mips/pmap.c diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.44 src/sys/arch/mips/mips/pmap.c:1.179.16.45 --- src/sys/arch/mips/mips/pmap.c:1.179.16.44 Mon Feb 27 16:57:06 2012 +++ src/sys/arch/mips/mips/pmap.c Mon Jul 9 17:23:37 2012 @@ -760,6 +760,11 @@ pmap_init(void) #endif /* + * Initialize the segtab lock. + */ + mutex_init(pmap_segtab_lock, MUTEX_DEFAULT, IPL_HIGH); + + /* * Set a low water mark on the pv_entry pool, so that we are * more likely to have these around even in extreme memory * starvation. Index: src/sys/arch/mips/mips/pmap_segtab.c diff -u src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.16 src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.17 --- src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.16 Thu Jul 5 17:28:39 2012 +++ src/sys/arch/mips/mips/pmap_segtab.c Mon Jul 9 17:23:37 2012 @@ -119,13 +119,8 @@ __KERNEL_RCSID(0, pmap_segtab.c,v 1.1.2 #include sys/param.h #include sys/systm.h #include sys/proc.h -#include sys/pool.h #include sys/mutex.h #include sys/atomic.h -#ifdef SYSVSHM -#include sys/shm.h -#endif -#include sys/socketvar.h /* XXX: for sock_loan_thresh */ #include uvm/uvm.h @@ -134,25 +129,29 @@ __KERNEL_RCSID(0, pmap_segtab.c,v 1.1.2 #include mips/locore.h #include mips/pte.h -CTASSERT(NBPG = sizeof(union
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Mon Jul 9 17:27:15 UTC 2012 Modified Files: src/sys/kern [matt-nb5-mips64]: subr_kmem.c Log Message: Add another KASSERT... To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.26.1 src/sys/kern/subr_kmem.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_kmem.c diff -u src/sys/kern/subr_kmem.c:1.19 src/sys/kern/subr_kmem.c:1.19.26.1 --- src/sys/kern/subr_kmem.c:1.19 Sat Feb 9 12:56:20 2008 +++ src/sys/kern/subr_kmem.c Mon Jul 9 17:27:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kmem.c,v 1.19 2008/02/09 12:56:20 yamt Exp $ */ +/* subr_kmem.c,v 1.19 2008/02/09 12:56:20 yamt Exp */ /*- * Copyright (c)2006 YAMAMOTO Takashi, @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_kmem.c,v 1.19 2008/02/09 12:56:20 yamt Exp $); +__KERNEL_RCSID(0, subr_kmem.c,v 1.19 2008/02/09 12:56:20 yamt Exp); #include sys/param.h #include sys/callback.h @@ -209,6 +209,7 @@ kmem_backend_free(vmem_t *dummy, vmem_ad KASSERT(dummy == NULL); KASSERT(addr != 0); KASSERT(size != 0); + KASSERT(addr == trunc_page(addr)); KASSERT(size == round_page(size)); kmem_poison_check((void *)addr, size);
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Thu Jul 5 17:28:39 UTC 2012 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: pmap_segtab.c Log Message: Fix typo (assigned wrong variable). To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/arch/mips/mips/pmap_segtab.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/mips/mips/pmap_segtab.c diff -u src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.15 src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.16 --- src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.15 Mon Feb 27 16:57:06 2012 +++ src/sys/arch/mips/mips/pmap_segtab.c Thu Jul 5 17:28:39 2012 @@ -469,7 +469,7 @@ pmap_pte_reserve(pmap_t pmap, vaddr_t va union segtab *ostp = atomic_cas_ptr(stp_p, NULL, nstp); if (__predict_false(ostp != NULL)) { pmap_segtab_free(nstp); -stp = ostp; +nstp = ostp; } #else *stp_p = nstp;
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Mon Jun 4 18:47:08 UTC 2012 Modified Files: src/sys/kern [matt-nb5-mips64]: kern_sysctl.c Log Message: Each va_start needs a corresponding va_end, even in the error paths... To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.218.8.1 src/sys/kern/kern_sysctl.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_sysctl.c diff -u src/sys/kern/kern_sysctl.c:1.218 src/sys/kern/kern_sysctl.c:1.218.8.1 --- src/sys/kern/kern_sysctl.c:1.218 Thu Oct 23 20:41:14 2008 +++ src/sys/kern/kern_sysctl.c Mon Jun 4 18:47:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp $ */ +/* kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp */ /*- * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp $); +__KERNEL_RCSID(0, kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp); #include opt_defcorename.h #include ksyms.h @@ -1935,19 +1935,26 @@ sysctl_createv(struct sysctllog **log, i */ va_start(ap, newlen); namelen = 0; + error = 0; ni = -1; do { - if (++ni == CTL_MAXNAME) - return (ENAMETOOLONG); + if (++ni == CTL_MAXNAME) { + error = ENAMETOOLONG; + break; + } name[ni] = va_arg(ap, int); /* * sorry, this is not supported from here */ - if (name[ni] == CTL_CREATESYM) - return (EINVAL); + if (name[ni] == CTL_CREATESYM) { + error = EINVAL; + break; + } } while (name[ni] != CTL_EOL name[ni] != CTL_CREATE); - namelen = ni + (name[ni] == CTL_CREATE ? 1 : 0); va_end(ap); + if (error) + return error; + namelen = ni + (name[ni] == CTL_CREATE ? 1 : 0); /* * what's it called
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon May 7 18:30:56 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_map.c Log Message: Use uvm_km_pagefree to free a kmap entry page. To generate a diff of this commit: cvs rdiff -u -r1.263.4.3.4.8 -r1.263.4.3.4.9 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_map.c diff -u src/sys/uvm/uvm_map.c:1.263.4.3.4.8 src/sys/uvm/uvm_map.c:1.263.4.3.4.9 --- src/sys/uvm/uvm_map.c:1.263.4.3.4.8 Wed Feb 29 18:03:39 2012 +++ src/sys/uvm/uvm_map.c Mon May 7 18:30:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.263.4.3.4.8 2012/02/29 18:03:39 matt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.263.4.3.4.9 2012/05/07 18:30:56 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.263.4.3.4.8 2012/02/29 18:03:39 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.263.4.3.4.9 2012/05/07 18:30:56 matt Exp $); #include opt_ddb.h #include opt_uvmhist.h @@ -4782,7 +4782,7 @@ uvm_kmapent_free(struct vm_map_entry *en pmap_update(vm_map_pmap(map)); vm_map_unlock(map); pg = PHYS_TO_VM_PAGE(pa); - uvm_pagefree(pg); + uvm_km_pagefree(pg); UVMMAP_EVCNT_INCR(ukh_free); }
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon May 7 18:31:25 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pdpolicy_clock.c Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.12.16.8 -r1.12.16.9 src/sys/uvm/uvm_pdpolicy_clock.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_pdpolicy_clock.c diff -u src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.8 src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.9 --- src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.8 Fri Apr 27 20:41:09 2012 +++ src/sys/uvm/uvm_pdpolicy_clock.c Mon May 7 18:31:25 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.8 2012/04/27 20:41:09 matt Exp $ */ +/* $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.9 2012/05/07 18:31:25 matt Exp $ */ /* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */ /* @@ -74,7 +74,7 @@ #else /* defined(PDSIM) */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.8 2012/04/27 20:41:09 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.9 2012/05/07 18:31:25 matt Exp $); #include sys/param.h #include sys/proc.h @@ -490,7 +490,7 @@ uvmpdpol_estimatepageable(const struct u *activep += gs-gs_active + gs-gs_radioactive; } if (inactivep) { - *inactivep = gs-gs_inactive; + *inactivep += gs-gs_inactive; } return; }
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon May 7 18:31:55 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pdaemon.c Log Message: Fix free wakeup To generate a diff of this commit: cvs rdiff -u -r1.93.4.2.4.14 -r1.93.4.2.4.15 src/sys/uvm/uvm_pdaemon.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_pdaemon.c diff -u src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.14 src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.15 --- src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.14 Fri Apr 27 20:41:09 2012 +++ src/sys/uvm/uvm_pdaemon.c Mon May 7 18:31:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.14 2012/04/27 20:41:09 matt Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.15 2012/05/07 18:31:55 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.14 2012/04/27 20:41:09 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.15 2012/05/07 18:31:55 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -510,7 +510,7 @@ uvm_pageout(void *arg) } } - if (need_wakeup) { + if (need_wakeup || (!need_free pdinfo-pd_waiters)) { wakeup(uvmexp.free); } KASSERT(!need_free || need_wakeup || !progress);
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon May 7 21:07:35 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_anon.c Log Message: Move call to uvm_anon_dropswap to with #ifdef VMSWAP To generate a diff of this commit: cvs rdiff -u -r1.51.28.2 -r1.51.28.3 src/sys/uvm/uvm_anon.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_anon.c diff -u src/sys/uvm/uvm_anon.c:1.51.28.2 src/sys/uvm/uvm_anon.c:1.51.28.3 --- src/sys/uvm/uvm_anon.c:1.51.28.2 Thu Feb 16 04:20:45 2012 +++ src/sys/uvm/uvm_anon.c Mon May 7 21:07:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.51.28.3 2012/05/07 21:07:34 matt Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.51.28.3 2012/05/07 21:07:34 matt Exp $); #include opt_uvmhist.h @@ -207,13 +207,13 @@ uvm_anfree(struct vm_anon *anon) uvmexp.swpgonly--; mutex_exit(uvm_swap_data_lock); } -#endif /* defined(VMSWAP) */ /* * free any swap resources. */ uvm_anon_dropswap(anon); +#endif /* defined(VMSWAP) */ /* * give a page replacement hint.
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Fri Apr 27 20:41:09 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pdaemon.c uvm_pdpolicy_clock.c Log Message: Don't decrement pgrp_active in radioactive page dequeue since we don't increment it when activated a radioactive page. To generate a diff of this commit: cvs rdiff -u -r1.93.4.2.4.13 -r1.93.4.2.4.14 src/sys/uvm/uvm_pdaemon.c cvs rdiff -u -r1.12.16.7 -r1.12.16.8 src/sys/uvm/uvm_pdpolicy_clock.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_pdaemon.c diff -u src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.13 src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.14 --- src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.13 Tue Apr 17 00:19:30 2012 +++ src/sys/uvm/uvm_pdaemon.c Fri Apr 27 20:41:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.13 2012/04/17 00:19:30 matt Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.14 2012/04/27 20:41:09 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.13 2012/04/17 00:19:30 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.14 2012/04/27 20:41:09 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -405,7 +405,6 @@ uvm_pageout(void *arg) UVMHIST_LOG(pdhist, WOKE UP,0,0,0,0); want_tune = pdinfo-pd_stalled; pdinfo-pd_stalled = false; - progress = false; } else if (TAILQ_FIRST(pdinfo-pd_pendingq) == NULL) { /* * Someone is waiting but no group are pending. @@ -440,6 +439,7 @@ uvm_pageout(void *arg) * system only when entire pool page is empty. */ bool need_wakeup = false; + progress = false; while ((grp = TAILQ_FIRST(pdinfo-pd_pendingq)) != NULL) { KASSERT(grp-pgrp_npages 0); Index: src/sys/uvm/uvm_pdpolicy_clock.c diff -u src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.7 src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.8 --- src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.7 Tue Apr 17 00:12:21 2012 +++ src/sys/uvm/uvm_pdpolicy_clock.c Fri Apr 27 20:41:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.7 2012/04/17 00:12:21 matt Exp $ */ +/* $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.8 2012/04/27 20:41:09 matt Exp $ */ /* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */ /* @@ -74,7 +74,7 @@ #else /* defined(PDSIM) */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.7 2012/04/17 00:12:21 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.8 2012/04/27 20:41:09 matt Exp $); #include sys/param.h #include sys/proc.h @@ -434,7 +434,6 @@ uvmpdpol_pagedequeue(struct vm_page *pg) pg-pqflags = ~PQ_RADIOACTIVE; KASSERT(gs-gs_radioactive 0); gs-gs_radioactive--; - grp-pgrp_active--; } //KDASSERT(gs-gs_radioactive == clock_pglist_count(gs-gs_radioactiveq));