CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Dec 27 16:08:17 UTC 2011 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cache.c Log Message: Use MIPS_*CACHE_VIRTUAL_ALIAS instead of mci-mci_* To generate a diff of this commit: cvs rdiff -u -r1.33.96.9 -r1.33.96.10 src/sys/arch/mips/mips/cache.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/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.33.96.9 src/sys/arch/mips/mips/cache.c:1.33.96.10 --- src/sys/arch/mips/mips/cache.c:1.33.96.9 Tue Dec 27 03:39:40 2011 +++ src/sys/arch/mips/mips/cache.c Tue Dec 27 16:08:17 2011 @@ -1191,10 +1191,10 @@ mips_config_cache_modern(uint32_t cpu_id mci-mci_pdcache_write_through = true; mci-mci_sdcache_write_through = false; KASSERT(PAGE_SIZE = mci-mci_picache_way_size - || mci-mci_icache_virtual_alias); + || MIPS_ICACHE_VIRTUAL_ALIAS); } else { - KASSERT(mci-mci_icache_virtual_alias == 0); - KASSERT(mci-mci_icache_virtual_alias == 0); + KASSERT(MIPS_CACHE_VIRTUAL_ALIAS == 0); + KASSERT(MIPS_ICACHE_VIRTUAL_ALIAS == 0); } #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) 0 } else if (MIPS_PRID_CID(cpu_id) == MIPS_PRID_CID_MTI) {
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Tue Dec 27 16:07:34 UTC 2011 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_pcie.c Log Message: Fix _LP64 compile issue. To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/mips/rmi/rmixl_pcie.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_pcie.c diff -u src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.18 src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.19 --- src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.18 Sat Dec 24 01:57:54 2011 +++ src/sys/arch/mips/rmi/rmixl_pcie.c Tue Dec 27 16:07:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_pcie.c,v 1.1.2.18 2011/12/24 01:57:54 matt Exp $ */ +/* $NetBSD: rmixl_pcie.c,v 1.1.2.19 2011/12/27 16:07:34 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.1.2.18 2011/12/24 01:57:54 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.1.2.19 2011/12/27 16:07:34 matt Exp $); #include opt_pci.h #include pci.h @@ -388,7 +388,7 @@ rmixl_pcie_attach(device_t parent, devic __func__, rcp-rc_pci_ecfg.r_pbase, rcp-rc_pci_ecfg.r_size / 2); - sc-sc_pci_ecfg_memh = rcp-rc_pci_ecfg_memh; + sc-sc_pci_ecfg_memh = rcp-rc_pci_ecfg_el_memh; #else printf(%s: skipping mapping of pci ECFG LE registers (base=%#PRIxBUSADDR size=%#PRIxBUSSIZE)\n,
CVS commit: src/external/bsd/tcpdump/dist
Module Name:src Committed By: christos Date: Tue Dec 27 15:12:45 UTC 2011 Modified Files: src/external/bsd/tcpdump/dist: print-icmp6.c Log Message: PR/45747: Henning Petersen: Fix icmp6 verbose printing. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-icmp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tcpdump/dist/print-icmp6.c diff -u src/external/bsd/tcpdump/dist/print-icmp6.c:1.2 src/external/bsd/tcpdump/dist/print-icmp6.c:1.3 --- src/external/bsd/tcpdump/dist/print-icmp6.c:1.2 Sun Dec 5 00:11:30 2010 +++ src/external/bsd/tcpdump/dist/print-icmp6.c Tue Dec 27 10:12:45 2011 @@ -25,7 +25,7 @@ static const char rcsid[] _U_ = @(#) Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.86 2008-02-05 19:36:13 guy Exp; #else -__RCSID($NetBSD: print-icmp6.c,v 1.2 2010/12/05 05:11:30 christos Exp $); +__RCSID($NetBSD: print-icmp6.c,v 1.3 2011/12/27 15:12:45 christos Exp $); #endif #endif @@ -355,15 +355,20 @@ icmp6_print(netdissect_options *ndo, printf(ICMP6, %s, tok2str(icmp6_type_values,unknown icmp6 type (%u),dp-icmp6_type)); /* display cosmetics: print the packet length for printer that use the vflag now */ -if (vflag (dp-icmp6_type == - ND_ROUTER_SOLICIT || - ND_ROUTER_ADVERT || - ND_NEIGHBOR_ADVERT || - ND_NEIGHBOR_SOLICIT || - ND_REDIRECT || - ICMP6_HADISCOV_REPLY || - ICMP6_MOBILEPREFIX_ADVERT )) -printf(, length %u, length); +if (vflag) + switch (dp-icmp6_type) { + case ND_ROUTER_SOLICIT: + case ND_ROUTER_ADVERT: + case ND_NEIGHBOR_ADVERT: + case ND_NEIGHBOR_SOLICIT: + case ND_REDIRECT: + case ICMP6_HADISCOV_REPLY: + case ICMP6_MOBILEPREFIX_ADVERT: + printf(, length %u, length); + break; + default: + break; + } switch (dp-icmp6_type) { case ICMP6_DST_UNREACH:
CVS commit: [matt-nb5-mips64] src/lib/libkvm
Module Name:src Committed By: matt Date: Tue Dec 27 16:26:25 UTC 2011 Modified Files: src/lib/libkvm [matt-nb5-mips64]: kvm_mips.c Log Message: Deal with non fixed page size on MIPS. To generate a diff of this commit: cvs rdiff -u -r1.18.16.2 -r1.18.16.3 src/lib/libkvm/kvm_mips.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkvm/kvm_mips.c diff -u src/lib/libkvm/kvm_mips.c:1.18.16.2 src/lib/libkvm/kvm_mips.c:1.18.16.3 --- src/lib/libkvm/kvm_mips.c:1.18.16.2 Tue Dec 27 06:58:58 2011 +++ src/lib/libkvm/kvm_mips.c Tue Dec 27 16:26:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kvm_mips.c,v 1.18.16.2 2011/12/27 06:58:58 matt Exp $ */ +/* $NetBSD: kvm_mips.c,v 1.18.16.3 2011/12/27 16:26:25 matt Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -34,7 +34,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: kvm_mips.c,v 1.18.16.2 2011/12/27 06:58:58 matt Exp $); +__RCSID($NetBSD: kvm_mips.c,v 1.18.16.3 2011/12/27 16:26:25 matt Exp $); #endif /* LIBC_SCCS and not lint */ /* @@ -46,6 +46,7 @@ __RCSID($NetBSD: kvm_mips.c,v 1.18.16.2 #include sys/proc.h #include sys/stat.h #include sys/kcore.h +#include sys/bitops.h #include machine/kcore.h #include stdlib.h #include unistd.h @@ -87,13 +88,14 @@ _kvm_initvtop(kd) * Translate a kernel virtual address to a physical address. */ int -_kvm_kvatop(kd, va, pa) +_kvm_kvatop(kd, uva, pa) kvm_t *kd; - u_long va; + u_long uva; u_long *pa; { cpu_kcore_hdr_t *cpu_kh; - u_int page_off; + u_long page_off; + long va = uva; u_int pte; u_long pte_pa; u_long pfn; @@ -263,6 +265,7 @@ int _kvm_mdopen(kd) kvm_t *kd; { +#define PAGE_SHIFT ilog2(kd-nbpg) /* for _LP64 VM_MAXUSER_ADDRESS */ kd-usrstack = USRSTACK; kd-min_uva = VM_MIN_ADDRESS;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Tue Dec 27 16:09:36 UTC 2011 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: mips_param.h pmap.h vmparam.h Log Message: Deal with not defining PAGE_SIZE or PAGE_SHIFT for non-kernel inclusion. To generate a diff of this commit: cvs rdiff -u -r1.23.78.10 -r1.23.78.11 src/sys/arch/mips/include/mips_param.h cvs rdiff -u -r1.54.26.21 -r1.54.26.22 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.41.28.24 -r1.41.28.25 src/sys/arch/mips/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/mips/include/mips_param.h diff -u src/sys/arch/mips/include/mips_param.h:1.23.78.10 src/sys/arch/mips/include/mips_param.h:1.23.78.11 --- src/sys/arch/mips/include/mips_param.h:1.23.78.10 Tue Dec 27 01:56:33 2011 +++ src/sys/arch/mips/include/mips_param.h Tue Dec 27 16:09:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_param.h,v 1.23.78.10 2011/12/27 01:56:33 matt Exp $ */ +/* $NetBSD: mips_param.h,v 1.23.78.11 2011/12/27 16:09:36 matt Exp $ */ #ifdef _KERNEL #include machine/cpu.h @@ -39,7 +39,8 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -#if defined(_KERNEL) !defined(_MODULE) +#if defined(_KERNEL) !defined(_RUMPKERNEL) \ + !defined(_MODULE) !defined(_LKM) #ifdef PAGE_SHIFT #if MIPS_PAGE_SHIFT != PAGE_SHIFT #error MIPS_PAGE_SHIFT != PAGE_SHIFT @@ -49,7 +50,7 @@ #else #define PAGE_SHIFT 12 #endif -#endif /* _KERNEL !_MODULE */ +#endif /* _KERNEL !_RUMPKERNEL !_MODULE !_LKM */ #if PAGE_SHIFT 1 #define UPAGES 1 /* pages of u-area */ Index: src/sys/arch/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.54.26.21 src/sys/arch/mips/include/pmap.h:1.54.26.22 --- src/sys/arch/mips/include/pmap.h:1.54.26.21 Tue Dec 27 01:56:33 2011 +++ src/sys/arch/mips/include/pmap.h Tue Dec 27 16:09:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.54.26.21 2011/12/27 01:56:33 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.54.26.22 2011/12/27 16:09:36 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -81,7 +81,7 @@ #include mips/cpuregs.h /* for KSEG0 below */ //#include mips/pte.h -#if !defined(_MODULE) +#if !defined(_MODULE) !defined(_LKM) /* * The user address space is 2Gb (0x0 - 0x8000). * User programs are laid out in memory as follows: Index: src/sys/arch/mips/include/vmparam.h diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.24 src/sys/arch/mips/include/vmparam.h:1.41.28.25 --- src/sys/arch/mips/include/vmparam.h:1.41.28.24 Tue Dec 27 01:56:33 2011 +++ src/sys/arch/mips/include/vmparam.h Tue Dec 27 16:09:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.41.28.24 2011/12/27 01:56:33 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.41.28.25 2011/12/27 16:09:36 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -54,7 +54,10 @@ * We normally use a 4K page but may use 8K, 16K, or 32K on MIPS systems. * Override PAGE_* definitions to compile-time constants. */ -#if defined(_KERNEL_OPT) defined(_KERNEL) !defined(_MODULE) +#if defined(_RUMPKERNEL) +#define PAGE_SHIFT 12 +#elif defined(_KERNEL_OPT) defined(_KERNEL) \ + !defined(_MODULE) !defined(_LKM) #ifdef MIPS_PAGE_SHIFT #define PAGE_SHIFT MIPS_PAGE_SHIFT #else @@ -165,15 +168,14 @@ * These are negative addresses since MIPS addresses are signed. */ #define VM_MIN_ADDRESS ((vaddr_t)0x) +#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #ifdef _LP64 #define VM_MAXUSER_ADDRESS ((vaddr_t) 1L (4*PGSHIFT-8)) /* 0x0100 */ -#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) 3L 62) /* 0xC000 */ #define VM_MAX_KERNEL_ADDRESS ((vaddr_t) -1L 31) /* 0x8000 */ #else -#define VM_MAXUSER_ADDRESS ((vaddr_t)-0x7fff-1)/* 0x8000 */ -#define VM_MAX_ADDRESS ((vaddr_t)-0x7fff-1)/* 0x8000 */ +#define VM_MAXUSER_ADDRESS ((vaddr_t)0x8000) /* 0x8000 */ #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)-0x4000) /* 0xC000 */ #ifdef ENABLE_MIPS_TX3900 #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)-0x0100) /* 0xFF00 */
CVS commit: [matt-nb5-mips64] src
Module Name:src Committed By: matt Date: Tue Dec 27 16:25:25 UTC 2011 Modified Files: src/bin/ps [matt-nb5-mips64]: nlist.c src/usr.bin/systat [matt-nb5-mips64]: ps.c Log Message: Use UPAGES in preferences to USPACE. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.26.12.1 src/bin/ps/nlist.c cvs rdiff -u -r1.30.18.1 -r1.30.18.1.4.1 src/usr.bin/systat/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/nlist.c diff -u src/bin/ps/nlist.c:1.26 src/bin/ps/nlist.c:1.26.12.1 --- src/bin/ps/nlist.c:1.26 Mon Apr 28 20:22:51 2008 +++ src/bin/ps/nlist.c Tue Dec 27 16:25:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nlist.c,v 1.26 2008/04/28 20:22:51 martin Exp $ */ +/* $NetBSD: nlist.c,v 1.26.12.1 2011/12/27 16:25:25 matt Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = @(#)nlist.c 8.4 (Berkeley) 4/2/94; #else -__RCSID($NetBSD: nlist.c,v 1.26 2008/04/28 20:22:51 martin Exp $); +__RCSID($NetBSD: nlist.c,v 1.26.12.1 2011/12/27 16:25:25 matt Exp $); #endif #endif /* not lint */ @@ -185,7 +185,10 @@ donlist_sysctl(void) mib[1] = VM_USPACE; size = sizeof(uspace); if (sysctl(mib, 2, uspace, size, NULL, 0) == -1) -#ifdef USPACE +#ifdef UPAGES + uspace = UPAGES * getpagesize(); + /* XXX Hopefully reasonable default */ +#elif defined(USPACE) uspace = USPACE; #else uspace = getpagesize(); /* XXX Hopefully reasonable default */ Index: src/usr.bin/systat/ps.c diff -u src/usr.bin/systat/ps.c:1.30.18.1 src/usr.bin/systat/ps.c:1.30.18.1.4.1 --- src/usr.bin/systat/ps.c:1.30.18.1 Wed Apr 1 00:25:23 2009 +++ src/usr.bin/systat/ps.c Tue Dec 27 16:25:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ps.c,v 1.30.18.1 2009/04/01 00:25:23 snj Exp $ */ +/* $NetBSD: ps.c,v 1.30.18.1.4.1 2011/12/27 16:25:25 matt Exp $ */ /*- * Copyright (c) 1999 @@ -45,7 +45,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ps.c,v 1.30.18.1 2009/04/01 00:25:23 snj Exp $); +__RCSID($NetBSD: ps.c,v 1.30.18.1.4.1 2011/12/27 16:25:25 matt Exp $); #endif /* not lint */ #include sys/param.h @@ -306,7 +306,9 @@ pmem2float(struct kinfo_proc2 *kp) /* XXX - I don't like this. */ if ((kp-p_flag L_INMEM) == 0) return (0.0); -#ifdef USPACE +#ifdef UPAGES + szptudot = UPAGES; +#elif defined(USPACE) /* XXX want pmap ptpages, segtab, etc. (per architecture) */ szptudot = USPACE/getpagesize(); #endif
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Tue Dec 27 16:35:14 UTC 2011 Modified Files: src/sys/kern [matt-nb5-mips64]: init_main.c kern_kthread.c src/sys/sys [matt-nb5-mips64]: kthread.h lwp.h Log Message: Backport joinable kthread support (for flash infrastructure). To generate a diff of this commit: cvs rdiff -u -r1.371.2.3.4.1 -r1.371.2.3.4.2 src/sys/kern/init_main.c cvs rdiff -u -r1.24.10.2 -r1.24.10.2.4.1 src/sys/kern/kern_kthread.c cvs rdiff -u -r1.7.10.1 -r1.7.10.1.4.1 src/sys/sys/kthread.h cvs rdiff -u -r1.114.4.1.4.3 -r1.114.4.1.4.4 src/sys/sys/lwp.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/init_main.c diff -u src/sys/kern/init_main.c:1.371.2.3.4.1 src/sys/kern/init_main.c:1.371.2.3.4.2 --- src/sys/kern/init_main.c:1.371.2.3.4.1 Wed Apr 21 00:28:15 2010 +++ src/sys/kern/init_main.c Tue Dec 27 16:35:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.371.2.3.4.1 2010/04/21 00:28:15 matt Exp $ */ +/* $NetBSD: init_main.c,v 1.371.2.3.4.2 2011/12/27 16:35:13 matt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.3.4.1 2010/04/21 00:28:15 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.3.4.2 2011/12/27 16:35:13 matt Exp $); #include opt_ddb.h #include opt_ipsec.h @@ -295,6 +295,7 @@ main(void) kernel_lock_init(); once_init(); mutex_init(cpu_lock, MUTEX_DEFAULT, IPL_NONE); + kthread_sysinit(); uvm_init(); @@ -477,6 +478,11 @@ main(void) shminit(); #endif + vmem_rehash_start(); /* must be before exec_init */ + + /* Initialize exec structures */ + exec_init(1); /* seminit calls exithook_establish() */ + #ifdef SYSVSEM /* Initialize System V style semaphores. */ seminit(); @@ -661,11 +667,6 @@ main(void) uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE)) panic(fork aiodoned); - vmem_rehash_start(); - - /* Initialize exec structures */ - exec_init(1); - /* * Okay, now we can let init(8) exec! It's off to userland! */ Index: src/sys/kern/kern_kthread.c diff -u src/sys/kern/kern_kthread.c:1.24.10.2 src/sys/kern/kern_kthread.c:1.24.10.2.4.1 --- src/sys/kern/kern_kthread.c:1.24.10.2 Mon Feb 2 22:02:24 2009 +++ src/sys/kern/kern_kthread.c Tue Dec 27 16:35:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_kthread.c,v 1.24.10.2 2009/02/02 22:02:24 snj Exp $ */ +/* $NetBSD: kern_kthread.c,v 1.24.10.2.4.1 2011/12/27 16:35:13 matt Exp $ */ /*- * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -31,39 +31,46 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.24.10.2 2009/02/02 22:02:24 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.24.10.2.4.1 2011/12/27 16:35:13 matt Exp $); #include sys/param.h #include sys/systm.h #include sys/kernel.h #include sys/kthread.h -#include sys/proc.h +#include sys/mutex.h #include sys/sched.h #include sys/kmem.h #include uvm/uvm_extern.h - -/* - * note that stdarg.h and the ansi style va_start macro is used for both - * ansi and traditional c complers. - * XXX: this requires that stdarg.h define: va_alist and va_dcl - */ #include machine/stdarg.h +static lwp_t * kthread_jtarget; +static kmutex_t kthread_lock; +static kcondvar_t kthread_cv; + +void +kthread_sysinit(void) +{ + + mutex_init(kthread_lock, MUTEX_DEFAULT, IPL_NONE); + cv_init(kthread_cv, kthrwait); + kthread_jtarget = NULL; +} + /* - * Fork a kernel thread. Any process can request this to be done. + * kthread_create: create a kernel thread, that is, system-only LWP. */ int kthread_create(pri_t pri, int flag, struct cpu_info *ci, - void (*func)(void *), void *arg, - lwp_t **lp, const char *fmt, ...) +void (*func)(void *), void *arg, lwp_t **lp, const char *fmt, ...) { lwp_t *l; vaddr_t uaddr; bool inmem; - int error; + int error, lc; va_list ap; - int lc; + + KASSERT((flag KTHREAD_INTR) == 0 || (flag KTHREAD_MPSAFE) != 0); inmem = uvm_uarea_alloc(uaddr); if (uaddr == 0) @@ -83,7 +90,7 @@ kthread_create(pri_t pri, int flag, stru if (fmt != NULL) { l-l_name = kmem_alloc(MAXCOMLEN, KM_SLEEP); if (l-l_name == NULL) { - lwp_exit(l); + kthread_destroy(l); return ENOMEM; } va_start(ap, fmt); @@ -94,10 +101,6 @@ kthread_create(pri_t pri, int flag, stru /* * Set parameters. */ - if ((flag KTHREAD_INTR) != 0) { - KASSERT((flag KTHREAD_MPSAFE) != 0); - } - if (pri == PRI_NONE) { if ((flag KTHREAD_TS) != 0) { /* Maximum user priority level. */ @@ -118,10 +121,17 @@ kthread_create(pri_t pri, int flag, stru l-l_pflag |= LP_BOUND; l-l_cpu = ci; } - if ((flag KTHREAD_INTR) != 0) + + if ((flag KTHREAD_JOINABLE) != 0) { + KASSERT(lp != NULL); + l-l_pflag |= LP_JOINABLE; + } + if ((flag KTHREAD_INTR) != 0) { l-l_pflag |= LP_INTR; - if ((flag
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Tue Dec 27 16:22:01 UTC 2011 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlp_pcie.c Log Message: Make it compile if PCI_NETBSD_CONFIGURE is not present. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixlp_pcie.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/rmixlp_pcie.c diff -u src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.1 src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.2 --- src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.1 Sat Dec 24 01:57:54 2011 +++ src/sys/arch/mips/rmi/rmixlp_pcie.c Tue Dec 27 16:22:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlp_pcie.c,v 1.1.2.1 2011/12/24 01:57:54 matt Exp $ */ +/* $NetBSD: rmixlp_pcie.c,v 1.1.2.2 2011/12/27 16:22:01 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rmixlp_pcie.c,v 1.1.2.1 2011/12/24 01:57:54 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: rmixlp_pcie.c,v 1.1.2.2 2011/12/27 16:22:01 matt Exp $); #include opt_pci.h #include pci.h @@ -331,6 +331,7 @@ rmixlp_pcie_attach(device_t parent, devi #endif } +#ifdef PCI_NETBSD_CONFIGURE void rmixlp_pcie_bar_alloc(struct rmixl_region *rp, u_long size_mb, u_long align_mb) @@ -355,6 +356,7 @@ rmixlp_pcie_bar_alloc(struct rmixl_regio rp-r_pbase = pbase; rp-r_size = (uint64_t)size_mb 20; } +#endif /* PCI_NETBSD_CONFIGURE */ /* * rmixlp_pcie_lnkcfg_get - lookup the lnkcfg for this XLP
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Dec 27 16:21:25 UTC 2011 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: INSTALL_XLSATX64 Log Message: Don't build unneeded kernel. Try to mdsetimage To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/conf/INSTALL_XLSATX64 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/INSTALL_XLSATX64 diff -u src/sys/arch/evbmips/conf/INSTALL_XLSATX64:1.1.2.1 src/sys/arch/evbmips/conf/INSTALL_XLSATX64:1.1.2.2 --- src/sys/arch/evbmips/conf/INSTALL_XLSATX64:1.1.2.1 Mon Dec 14 07:24:33 2009 +++ src/sys/arch/evbmips/conf/INSTALL_XLSATX64 Tue Dec 27 16:21:25 2011 @@ -1,8 +1,14 @@ -# $NetBSD: INSTALL_XLSATX64,v 1.1.2.1 2009/12/14 07:24:33 cliff Exp $ +# $NetBSD: INSTALL_XLSATX64,v 1.1.2.2 2011/12/27 16:21:25 matt Exp $ include arch/evbmips/conf/XLSATX64 -#ident INSTALL_XLSATX64-$Revision: 1.1.2.1 $ +no config netbsd-wm0 +no config netbsd-sd0a +no config netbsd-msk0 + +makeoptions NEED_MDSETIMAGE=yes + +#ident INSTALL_XLSATX64-$Revision: 1.1.2.2 $ # Enable the hooks used for initializing the root memory-disk. # The ramdisk size must be kept in sync manually with the size of
CVS commit: [matt-nb5-mips64] src/sys/dev/tc
Module Name:src Committed By: matt Date: Tue Dec 27 16:24:01 UTC 2011 Modified Files: src/sys/dev/tc [matt-nb5-mips64]: sticio.h Log Message: Don't use NBPG since it can vary. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/dev/tc/sticio.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/tc/sticio.h diff -u src/sys/dev/tc/sticio.h:1.4 src/sys/dev/tc/sticio.h:1.4.18.1 --- src/sys/dev/tc/sticio.h:1.4 Mon Apr 28 20:23:58 2008 +++ src/sys/dev/tc/sticio.h Tue Dec 27 16:24:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sticio.h,v 1.4 2008/04/28 20:23:58 martin Exp $ */ +/* $NetBSD: sticio.h,v 1.4.18.1 2011/12/27 16:24:01 matt Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ struct stic_xcomm { * whole; the combined size is learnt from stic_xinfo::sxi_buf_size. */ struct stic_xmap { - u_int8_t sxm_stic[NBPG]; /* STIC registers */ + u_int8_t sxm_stic[4096]; /* STIC registers */ u_int8_t sxm_poll[0xc]; /* poll registers */ u_int8_t sxm_xcomm[256 * 1024]; /* X comms area */ };
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Tue Dec 27 16:52:52 UTC 2011 Modified Files: src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi Log Message: undo the pam bump. requested by joerg. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/base/ad.mips64eb cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/base/ad.mips64el cvs rdiff -u -r1.147 -r1.148 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.140 -r1.141 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.609 -r1.610 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/comp/ad.mips64eb \ src/distrib/sets/lists/comp/ad.mips64el cvs rdiff -u -r1.146 -r1.147 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.131 -r1.132 src/distrib/sets/lists/comp/md.sparc64 cvs rdiff -u -r1.202 -r1.203 src/distrib/sets/lists/comp/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/ad.mips64eb diff -u src/distrib/sets/lists/base/ad.mips64eb:1.75 src/distrib/sets/lists/base/ad.mips64eb:1.76 --- src/distrib/sets/lists/base/ad.mips64eb:1.75 Sun Dec 25 18:28:32 2011 +++ src/distrib/sets/lists/base/ad.mips64eb Tue Dec 27 11:52:52 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips64eb,v 1.75 2011/12/25 23:28:32 christos Exp $ +# $NetBSD: ad.mips64eb,v 1.76 2011/12/27 16:52:52 christos Exp $ ./libexec/ld.elf_so-64base-compat-shlib compat,pic ./libexec/ld.elf_so-o32base-sysutil-bin compat,pic ./usr/lib/64 base-compat-lib @@ -179,8 +179,8 @@ ./usr/lib/64/libossaudio.so.1.0 base-compat-shlib compat,pic ./usr/lib/64/libp2k.so.2 base-compat-shlib compat,pic ./usr/lib/64/libp2k.so.2.0 base-compat-shlib compat,pic -./usr/lib/64/libpam.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/libpam.so.4.0 base-compat-shlib compat,pic,pam +./usr/lib/64/libpam.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/libpam.so.3.0 base-compat-shlib compat,pic,pam ./usr/lib/64/libpcap.so.4 base-compat-shlib compat,pic ./usr/lib/64/libpcap.so.4.0 base-compat-shlib compat,pic ./usr/lib/64/libpci.so.2 base-compat-shlib compat,pic @@ -275,28 +275,28 @@ ./usr/lib/64/lua/5.1/gpio.so base-compat-shlib compat,pic ./usr/lib/64/lua/5.1/sqlite.so base-compat-shlib compat,pic ./usr/lib/64/securitybase-compat-shlib -./usr/lib/64/security/pam_afslog.so.4 base-compat-shlib compat,pic,kerberos,pam -./usr/lib/64/security/pam_chroot.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_deny.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_echo.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_exec.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_ftpusers.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_group.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_guest.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_krb5.so.4 base-compat-shlib compat,pic,kerberos,pam -./usr/lib/64/security/pam_ksu.so.4 base-compat-shlib compat,pic,kerberos,pam -./usr/lib/64/security/pam_lastlog.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_login_access.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_nologin.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_permit.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_radius.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_rhosts.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_rootok.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_securetty.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_self.so.4 base-compat-shlib compat,pic,pam -./usr/lib/64/security/pam_skey.so.4 base-compat-shlib compat,pic,skey,pam -./usr/lib/64/security/pam_ssh.so.4 base-compat-shlib compat,pic,crypto,pam -./usr/lib/64/security/pam_unix.so.4 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_afslog.so.3 base-compat-shlib compat,pic,kerberos,pam +./usr/lib/64/security/pam_chroot.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_deny.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_echo.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_exec.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_ftpusers.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_group.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_guest.so.3 base-compat-shlib compat,pic,pam +./usr/lib/64/security/pam_krb5.so.3 base-compat-shlib compat,pic,kerberos,pam +./usr/lib/64/security/pam_ksu.so.3 base-compat-shlib compat,pic,kerberos,pam +./usr/lib/64/security/pam_lastlog.so.3
CVS commit: src
Module Name:src Committed By: christos Date: Tue Dec 27 16:54:51 UTC 2011 Modified Files: src: UPDATING Log Message: mention pam unbump. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.231 src/UPDATING:1.232 --- src/UPDATING:1.231 Fri Nov 25 20:20:25 2011 +++ src/UPDATING Tue Dec 27 11:54:51 2011 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.231 2011/11/26 01:20:25 tls Exp $ +$NetBSD: UPDATING,v 1.232 2011/12/27 16:54:51 christos Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,6 +16,11 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20111227: + If you built between 20111225 and 20111227 you need to remove + /usr/lib/libpam.so.4* and /usr/lib/security/*.so.4, since the + bump has been reverted. + 2025: The rnd pseudodevice has been added to sys/conf/std, which means it should no longer be explicitly listed in kernel
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Dec 27 16:56:17 UTC 2011 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c Log Message: Use mips_ksegx_start (not mips3_ksegx_start). To generate a diff of this commit: cvs rdiff -u -r1.205.4.1.2.1.2.58 -r1.205.4.1.2.1.2.59 \ src/sys/arch/mips/mips/mips_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/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.58 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.59 --- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.58 Tue Dec 27 06:57:34 2011 +++ src/sys/arch/mips/mips/mips_machdep.c Tue Dec 27 16:56:17 2011 @@ -1842,8 +1842,8 @@ cpu_dump(void) */ cpuhdrp-pg_size = PAGE_SIZE; #ifdef ENABLE_MIPS_KSEGX - if (mips3_ksegx_start) { - cpuhdrp-ksegx_pfn = mips3_ksegx_start PAGE_SHIFT; + if (mips_ksegx_start) { + cpuhdrp-ksegx_pfn = mips_ksegx_start PAGE_SHIFT; cpuhdrp-ksegx_va = VM_KSEGX_ADDRESS; cpuhdrp-ksegx_size = VM_KSEGX_SIZE; }
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: reinoud Date: Tue Dec 27 14:55:31 UTC 2011 Modified Files: src/sys/arch/usermode/dev: cpu.c src/sys/arch/usermode/usermode: machdep.c pmap.c vm_machdep.c Log Message: Implement physio() for NetBSD/usermode the right way! To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/usermode/dev/cpu.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/usermode/usermode/machdep.c cvs rdiff -u -r1.82 -r1.83 src/sys/arch/usermode/usermode/pmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/usermode/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/usermode/dev/cpu.c diff -u src/sys/arch/usermode/dev/cpu.c:1.56 src/sys/arch/usermode/dev/cpu.c:1.57 --- src/sys/arch/usermode/dev/cpu.c:1.56 Sat Dec 24 12:23:24 2011 +++ src/sys/arch/usermode/dev/cpu.c Tue Dec 27 14:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.56 2011/12/24 12:23:24 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.57 2011/12/27 14:55:31 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -30,7 +30,7 @@ #include opt_hz.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.56 2011/12/24 12:23:24 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.57 2011/12/27 14:55:31 reinoud Exp $); #include sys/param.h #include sys/conf.h @@ -379,16 +379,25 @@ cpu_initclocks(void) void cpu_startup(void) { + vaddr_t minaddr, maxaddr; size_t stacksize, msgbufsize = 32 * 1024; void *stack_pagefault_ucp; + /* get ourself a message buffer */ um_msgbuf = kmem_zalloc(msgbufsize, KM_SLEEP); if (um_msgbuf == NULL) panic(couldn't allocate msgbuf); initmsgbuf(um_msgbuf, msgbufsize); + /* allocate a submap for physio, 1Mb enough? */ + minaddr = 0; + phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, + 1024 * 1024, 0, false, NULL); + + /* say hi! */ banner(); + /* init lwp0 */ memset(lwp0pcb, 0, sizeof(lwp0pcb)); if (thunk_getcontext(lwp0pcb.pcb_ucp)) panic(getcontext failed); Index: src/sys/arch/usermode/usermode/machdep.c diff -u src/sys/arch/usermode/usermode/machdep.c:1.45 src/sys/arch/usermode/usermode/machdep.c:1.46 --- src/sys/arch/usermode/usermode/machdep.c:1.45 Mon Dec 26 21:22:23 2011 +++ src/sys/arch/usermode/usermode/machdep.c Tue Dec 27 14:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.45 2011/12/26 21:22:23 jmcneill Exp $ */ +/* $NetBSD: machdep.c,v 1.46 2011/12/27 14:55:31 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -38,7 +38,7 @@ #include opt_sdl.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.45 2011/12/26 21:22:23 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.46 2011/12/27 14:55:31 reinoud Exp $); #include sys/types.h #include sys/param.h @@ -62,6 +62,8 @@ char machine[_SYS_NMLN] = ; char machine_arch[_SYS_NMLN] = ; char module_machine_usermode[_SYS_NMLN] = ; +struct vm_map *phys_map = NULL; + static char **saved_argv; char *usermode_root_image_path = NULL; static char usermode_tap_devicebuf[PATH_MAX] = ; Index: src/sys/arch/usermode/usermode/pmap.c diff -u src/sys/arch/usermode/usermode/pmap.c:1.82 src/sys/arch/usermode/usermode/pmap.c:1.83 --- src/sys/arch/usermode/usermode/pmap.c:1.82 Sun Dec 25 21:10:00 2011 +++ src/sys/arch/usermode/usermode/pmap.c Tue Dec 27 14:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.82 2011/12/25 21:10:00 reinoud Exp $ */ +/* $NetBSD: pmap.c,v 1.83 2011/12/27 14:55:31 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.82 2011/12/25 21:10:00 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.83 2011/12/27 14:55:31 reinoud Exp $); #include opt_memsize.h #include opt_kmempages.h @@ -648,9 +648,6 @@ pmap_page_deactivate(struct pv_entry *pv uint32_t map_flags; void *addr; - if (pv-pv_vflags PV_WIRED) - return; - map_flags = THUNK_MAP_FILE | THUNK_MAP_FIXED | THUNK_MAP_SHARED; addr = thunk_mmap((void *) va, PAGE_SIZE, THUNK_PROT_NONE, map_flags, mem_fh, pa); Index: src/sys/arch/usermode/usermode/vm_machdep.c diff -u src/sys/arch/usermode/usermode/vm_machdep.c:1.3 src/sys/arch/usermode/usermode/vm_machdep.c:1.4 --- src/sys/arch/usermode/usermode/vm_machdep.c:1.3 Wed Aug 10 01:32:44 2011 +++ src/sys/arch/usermode/usermode/vm_machdep.c Tue Dec 27 14:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.3 2011/08/10 01:32:44 jmcneill Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.4 2011/12/27 14:55:31 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -27,21 +27,73 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.3 2011/08/10 01:32:44 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.4 2011/12/27 14:55:31 reinoud Exp $); -#include sys/types.h #include
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Dec 27 17:07:15 UTC 2011 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: INSTALL_XLPEVB32 INSTALL_XLPEVB64 Log Message: Fix some tpyos. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/conf/INSTALL_XLPEVB32 \ src/sys/arch/evbmips/conf/INSTALL_XLPEVB64 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/INSTALL_XLPEVB32 diff -u src/sys/arch/evbmips/conf/INSTALL_XLPEVB32:1.1.2.1 src/sys/arch/evbmips/conf/INSTALL_XLPEVB32:1.1.2.2 --- src/sys/arch/evbmips/conf/INSTALL_XLPEVB32:1.1.2.1 Sat Dec 24 01:42:48 2011 +++ src/sys/arch/evbmips/conf/INSTALL_XLPEVB32 Tue Dec 27 17:07:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_XLPEVB32,v 1.1.2.1 2011/12/24 01:42:48 matt Exp $ +# $NetBSD: INSTALL_XLPEVB32,v 1.1.2.2 2011/12/27 17:07:14 matt Exp $ include arch/evbmips/conf/XLPEVB32 @@ -7,7 +7,7 @@ no config netbsd-sd0a makeoptions NEED_MDSETIMAGE=yes -#ident INSTALL_XLSATX32-$Revision: 1.1.2.1 $ +#ident INSTALL_XLPEVB32-$Revision: 1.1.2.2 $ # Enable the hooks used for initializing the root memory-disk. # The ramdisk size must be kept in sync manually with the size of Index: src/sys/arch/evbmips/conf/INSTALL_XLPEVB64 diff -u src/sys/arch/evbmips/conf/INSTALL_XLPEVB64:1.1.2.1 src/sys/arch/evbmips/conf/INSTALL_XLPEVB64:1.1.2.2 --- src/sys/arch/evbmips/conf/INSTALL_XLPEVB64:1.1.2.1 Tue Dec 27 16:20:51 2011 +++ src/sys/arch/evbmips/conf/INSTALL_XLPEVB64 Tue Dec 27 17:07:15 2011 @@ -1,13 +1,13 @@ -# $NetBSD: INSTALL_XLPEVB64,v 1.1.2.1 2011/12/27 16:20:51 matt Exp $ +# $NetBSD: INSTALL_XLPEVB64,v 1.1.2.2 2011/12/27 17:07:15 matt Exp $ -include arch/evbmips/conf/XLSEVB64 +include arch/evbmips/conf/XLPEVB64 no config netbsd-wm0 no config netbsd-sd0a makeoptions NEED_MDSETIMAGE=yes -#ident INSTALL_XLSATX64-$Revision: 1.1.2.1 $ +#ident INSTALL_XLPEVB64-$Revision: 1.1.2.2 $ # Enable the hooks used for initializing the root memory-disk. # The ramdisk size must be kept in sync manually with the size of
CVS commit: [matt-nb5-mips64] src/etc/etc.evbmips
Module Name:src Committed By: matt Date: Tue Dec 27 17:09:16 UTC 2011 Modified Files: src/etc/etc.evbmips [matt-nb5-mips64]: Makefile.inc Log Message: Add {,INSTALL_}XLPEVB{32,64} kernels for mips64 To generate a diff of this commit: cvs rdiff -u -r1.11.26.2 -r1.11.26.3 src/etc/etc.evbmips/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbmips/Makefile.inc diff -u src/etc/etc.evbmips/Makefile.inc:1.11.26.2 src/etc/etc.evbmips/Makefile.inc:1.11.26.3 --- src/etc/etc.evbmips/Makefile.inc:1.11.26.2 Mon Dec 14 12:02:24 2009 +++ src/etc/etc.evbmips/Makefile.inc Tue Dec 27 17:09:15 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11.26.2 2009/12/14 12:02:24 cliff Exp $ +# $NetBSD: Makefile.inc,v 1.11.26.3 2011/12/27 17:09:15 matt Exp $ # # etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets # @@ -13,9 +13,12 @@ KERNEL_SETS= ALCHEMY DBAU1500 DBAU1550 BUILD_KERNELS= INSTALL_OMSAL400 INSTALL_MALTA .elif ${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el -KERNEL_SETS= MALTA32 MALTA64 XLSATX32 XLSATX64 +KERNEL_SETS= MALTA32 MALTA64 +KERNEL_SETS+= XLSATX32 XLSATX64 +KERNEL_SETS+= XLPEVB32 XLPEVB64 BUILD_KERNELS= INSTALL_MALTA32 INSTALL_MALTA64 BUILD_KERNELS+= INSTALL_XLSATX32 INSTALL_XLSATX64 +BUILD_KERNELS+= INSTALL_XLPEVB32 INSTALL_XLPEVB64 .else KERNEL_SETS= ALCHEMY DBAU1500 DBAU1550 MALTA
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pgoyette Date: Tue Dec 27 17:13:10 UTC 2011 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Add the Atffile for libcrypt tests To generate a diff of this commit: cvs rdiff -u -r1.432 -r1.433 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.432 src/distrib/sets/lists/tests/mi:1.433 --- src/distrib/sets/lists/tests/mi:1.432 Tue Dec 27 00:49:16 2011 +++ src/distrib/sets/lists/tests/mi Tue Dec 27 17:13:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.432 2011/12/27 00:49:16 christos Exp $ +# $NetBSD: mi,v 1.433 2011/12/27 17:13:10 pgoyette Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2242,6 +2242,7 @@ ./usr/tests/lib/libc/t_strptime tests-obsolete obsolete ./usr/tests/lib/libc/time tests-lib-tests ./usr/tests/lib/libcrypt tests-lib-tests +./usr/tests/lib/libcrypt/Atffile tests-lib-tests ./usr/tests/lib/libcrypt/t_crypt tests-lib-tests ./usr/tests/lib/libcurses tests-lib-tests ./usr/tests/lib/libcurses/.terminfo.db tests-obsolete obsolete
CVS commit: [matt-nb5-mips64] src/distrib/evbmips/instkernel/instkernel
Module Name:src Committed By: matt Date: Tue Dec 27 17:33:02 UTC 2011 Modified Files: src/distrib/evbmips/instkernel/instkernel [matt-nb5-mips64]: Makefile Log Message: Add INSTALL_XLPEVB{32,64} To generate a diff of this commit: cvs rdiff -u -r1.1.34.2 -r1.1.34.3 \ src/distrib/evbmips/instkernel/instkernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbmips/instkernel/instkernel/Makefile diff -u src/distrib/evbmips/instkernel/instkernel/Makefile:1.1.34.2 src/distrib/evbmips/instkernel/instkernel/Makefile:1.1.34.3 --- src/distrib/evbmips/instkernel/instkernel/Makefile:1.1.34.2 Mon Dec 14 12:03:49 2009 +++ src/distrib/evbmips/instkernel/instkernel/Makefile Tue Dec 27 17:33:02 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.34.2 2009/12/14 12:03:49 cliff Exp $ +# $NetBSD: Makefile,v 1.1.34.3 2011/12/27 17:33:02 matt Exp $ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib @@ -16,6 +16,8 @@ MDSETTARGETS= INSTALL_MALTA32 ${RAMDIS MDSETTARGETS+= INSTALL_MALTA64 ${RAMDISK} - MDSETTARGETS+= INSTALL_XLSATX32 ${RAMDISK} - MDSETTARGETS+= INSTALL_XLSATX64 ${RAMDISK} - +MDSETTARGETS+= INSTALL_XLPEVB32 ${RAMDISK} - +MDSETTARGETS+= INSTALL_XLPEVB64 ${RAMDISK} - .else # Big endian platforms.
CVS commit: [matt-nb5-mips64] src/etc/etc.evbmips
Module Name:src Committed By: matt Date: Tue Dec 27 17:45:32 UTC 2011 Modified Files: src/etc/etc.evbmips [matt-nb5-mips64]: MAKEDEV.conf Log Message: Make 4 flash devices by default. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.26.1 src/etc/etc.evbmips/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbmips/MAKEDEV.conf diff -u src/etc/etc.evbmips/MAKEDEV.conf:1.4 src/etc/etc.evbmips/MAKEDEV.conf:1.4.26.1 --- src/etc/etc.evbmips/MAKEDEV.conf:1.4 Mon Jan 15 23:35:11 2007 +++ src/etc/etc.evbmips/MAKEDEV.conf Tue Dec 27 17:45:32 2011 @@ -1,10 +1,11 @@ -# $NetBSD: MAKEDEV.conf,v 1.4 2007/01/15 23:35:11 hubertf Exp $ +# $NetBSD: MAKEDEV.conf,v 1.4.26.1 2011/12/27 17:45:32 matt Exp $ all_md) makedev wscons sd0 sd1 sd2 sd3 sd4 makedev st0 st1 ch0 cd0 cd1 makedev ss0 ss1 uk0 uk1 makedev ld0 ld1 ld2 ld3 + makedev flash0 flash1 flash2 flash3 makedev tty00 tty01 makedev lpa0 lpt0 audio wd0 wd1 fd0 fd1 makedev satlink0 speaker mlx0
CVS commit: src/sys/arch/usermode/conf
Module Name:src Committed By: jmcneill Date: Tue Dec 27 18:24:41 UTC 2011 Modified Files: src/sys/arch/usermode/conf: GENERIC.common Log Message: add ksyms support To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/usermode/conf/GENERIC.common 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/usermode/conf/GENERIC.common diff -u src/sys/arch/usermode/conf/GENERIC.common:1.5 src/sys/arch/usermode/conf/GENERIC.common:1.6 --- src/sys/arch/usermode/conf/GENERIC.common:1.5 Tue Dec 27 11:48:01 2011 +++ src/sys/arch/usermode/conf/GENERIC.common Tue Dec 27 18:24:41 2011 @@ -1,13 +1,15 @@ -# $NetBSD: GENERIC.common,v 1.5 2011/12/27 11:48:01 jmcneill Exp $ +# $NetBSD: GENERIC.common,v 1.6 2011/12/27 18:24:41 jmcneill Exp $ include arch/usermode/conf/std.usermode options INCLUDE_CONFIG_FILE -#ident GENERIC-$Revision: 1.5 $ +#ident GENERIC-$Revision: 1.6 $ maxusers 32 makeoptions DEBUG=-O1 -g3 +options SYMTAB_SPACE=30 + options RTC_OFFSET=0 options KTRACE #options USERCONF @@ -62,6 +64,7 @@ pseudo-device loop pseudo-device pty pseudo-device bpfilter pseudo-device drvctl +pseudo-device ksyms # Pull in optional local configuration cinclude arch/usermode/conf/GENERIC.local
CVS commit: [matt-nb5-mips64] src
Module Name:src Committed By: matt Date: Tue Dec 27 19:21:00 UTC 2011 Modified Files: src/sys/lib/libkern [matt-nb5-mips64]: Makefile libkern.h Added Files: src/common/lib/libc/string [matt-nb5-mips64]: popcount32.c popcount64.c Log Message: Add popcount32 and popcount64 for flash/nand To generate a diff of this commit: cvs rdiff -u -r0 -r1.4.4.2 src/common/lib/libc/string/popcount32.c cvs rdiff -u -r0 -r1.6.4.2 src/common/lib/libc/string/popcount64.c cvs rdiff -u -r1.89.10.2 -r1.89.10.3 src/sys/lib/libkern/Makefile cvs rdiff -u -r1.82.8.3 -r1.82.8.4 src/sys/lib/libkern/libkern.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/lib/libkern/Makefile diff -u src/sys/lib/libkern/Makefile:1.89.10.2 src/sys/lib/libkern/Makefile:1.89.10.3 --- src/sys/lib/libkern/Makefile:1.89.10.2 Wed Apr 21 00:28:20 2010 +++ src/sys/lib/libkern/Makefile Tue Dec 27 19:21:00 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.89.10.2 2010/04/21 00:28:20 matt Exp $ +# $NetBSD: Makefile,v 1.89.10.3 2011/12/27 19:21:00 matt Exp $ LIB= kern NOPIC= # defined @@ -51,6 +51,7 @@ SRCS+= pmatch.c arc4random.c bcd.c mcoun SRCS+= strsep.c strstr.c strlcpy.c strlcat.c +SRCS+= popcount32.c popcount64.c SRCS+= strtoll.c strtoull.c strtoumax.c SRCS+= xlat_mbr_fstype.c Index: src/sys/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.82.8.3 src/sys/lib/libkern/libkern.h:1.82.8.4 --- src/sys/lib/libkern/libkern.h:1.82.8.3 Fri Apr 29 08:10:38 2011 +++ src/sys/lib/libkern/libkern.h Tue Dec 27 19:21:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.82.8.3 2011/04/29 08:10:38 matt Exp $ */ +/* $NetBSD: libkern.h,v 1.82.8.4 2011/12/27 19:21:00 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -345,4 +345,9 @@ uint32_t crc32(uint32_t, const uint8_t * long long strtoll __P((const char *, char **, int)); unsigned long long strtoull __P((const char *, char **, int)); uintmax_t strtoumax __P((const char *, char **, int)); +unsigned int popcount(unsigned int); +unsigned int popcountl(unsigned long); +unsigned int popcountll(unsigned long long); +unsigned int popcount32(uint32_t); +unsigned int popcount64(uint64_t); #endif /* !_LIB_LIBKERN_LIBKERN_H_ */ Added files: Index: src/common/lib/libc/string/popcount32.c diff -u /dev/null src/common/lib/libc/string/popcount32.c:1.4.4.2 --- /dev/null Tue Dec 27 19:21:00 2011 +++ src/common/lib/libc/string/popcount32.c Tue Dec 27 19:20:59 2011 @@ -0,0 +1,78 @@ +/* $NetBSD: popcount32.c,v 1.4.4.2 2011/12/27 19:20:59 matt Exp $ */ +/*- + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Joerg Sonnenberger. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h +__RCSID($NetBSD: popcount32.c,v 1.4.4.2 2011/12/27 19:20:59 matt Exp $); + +#if !defined(_KERNEL) !defined(_STANDALONE) +#include limits.h +#include stdint.h +#include strings.h +#else +#include lib/libkern/libkern.h +#include machine/limits.h +#endif + +/* + * This a hybrid algorithm for bit counting between parallel counting and + * using multiplication. The idea is to sum up the bits in each Byte, so + * that the final accumulation can be done with a single multiplication. + * If the platform has a slow multiplication instruction, it can be replaced + * by the commented out version below. + */ + +unsigned int +popcount32(uint32_t v) +{ + unsigned int c; + + v = v - ((v 1) 0xU); + v = (v 0xU) + ((v 2) 0xU); + v = (v + (v 4)) 0x0f0f0f0fU; + c = (v * 0x01010101U) 24; +
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Tue Dec 27 19:36:10 UTC 2011 Modified Files: src/lib/libcrypt: bcrypt.c Log Message: Instead of returning : on error, return *0 or *1 which will always result in logged password entries, even if the calling program decides to blindly use them. Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libcrypt/bcrypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/bcrypt.c diff -u src/lib/libcrypt/bcrypt.c:1.11 src/lib/libcrypt/bcrypt.c:1.12 --- src/lib/libcrypt/bcrypt.c:1.11 Mon Dec 26 16:51:53 2011 +++ src/lib/libcrypt/bcrypt.c Tue Dec 27 14:36:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.11 2011/12/26 21:51:53 christos Exp $ */ +/* $NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include sys/cdefs.h -__RCSID($NetBSD: bcrypt.c,v 1.11 2011/12/26 21:51:53 christos Exp $); +__RCSID($NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $); #include stdio.h #include stdlib.h @@ -77,7 +77,6 @@ static void decode_base64(u_int8_t *, u_ char *__bcrypt(const char *, const char *); /* XXX */ static charencrypted[_PASSWORD_LEN]; -static charerror[] = :1; static const u_int8_t Base64Code[] = ./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789; @@ -228,21 +227,20 @@ __bcrypt(key, salt) salt++; if (*salt BCRYPT_VERSION) { - /* How do I handle errors ? Return ':' */ - return error; + goto out; } /* Check for minor versions */ if (salt[1] != '$') { - switch (salt[1]) { - case 'a': - /* 'ab' should not yield the same as 'abab' */ - minor = salt[1]; - salt++; - break; - default: - return error; - } + switch (salt[1]) { + case 'a': + /* 'ab' should not yield the same as 'abab' */ + minor = salt[1]; + salt++; + break; + default: + goto out; + } } else minor = 0; @@ -251,21 +249,21 @@ __bcrypt(key, salt) if (salt[2] != '$') /* Out of sync with passwd entry */ - return error; + goto out; /* Computer power doesn't increase linear, 2^x should be fine */ n = atoi(salt); if (n 31 || n 0) - return error; + goto out; logr = (u_int8_t)n; if ((rounds = (u_int32_t) 1 logr) BCRYPT_MINROUNDS) - return error; + goto out; /* Discard num rounds + $ identifier */ salt += 3; if (strlen(salt) * 3 / 4 BCRYPT_MAXSALT) - return error; + goto out; /* We dont want the base64 salt but the raw data */ decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); @@ -315,6 +313,9 @@ __bcrypt(key, salt) 4 * BCRYPT_BLOCKS - 1); memset(state, 0, sizeof(state)); return encrypted; +out: + /* How do I handle errors ? Return *0 or *1 */ + return __UNCONST(salt[0] == '*' salt[1] == '\0' ? *1 : *0); } static void
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Tue Dec 27 19:57:19 UTC 2011 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_i2c_pci.c Log Message: Add commented out intr establishment. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_i2c_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_i2c_pci.c diff -u src/sys/arch/mips/rmi/rmixl_i2c_pci.c:1.1.2.1 src/sys/arch/mips/rmi/rmixl_i2c_pci.c:1.1.2.2 --- src/sys/arch/mips/rmi/rmixl_i2c_pci.c:1.1.2.1 Sat Dec 24 01:57:54 2011 +++ src/sys/arch/mips/rmi/rmixl_i2c_pci.c Tue Dec 27 19:57:18 2011 @@ -29,7 +29,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_i2c_pci.c,v 1.1.2.1 2011/12/24 01:57:54 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_i2c_pci.c,v 1.1.2.2 2011/12/27 19:57:18 matt Exp $); #include sys/param.h #include sys/device.h @@ -61,6 +61,9 @@ static int xli2c_acquire_bus(void *, in static void xli2c_release_bus(void *, int); static int xli2c_exec(void *, i2c_op_t, i2c_addr_t, const void *, size_t, void *, size_t, int); +#if 0 +static int xli2c_intr(void *); +#endif static int xli2c_wait_for_command(struct xli2c_softc *, uint8_t); static inline uint8_t @@ -156,6 +159,19 @@ xli2c_pci_attach(device_t parent, device /* MMM MAGIC */ xli2c_write_prescale(sc, rmixl_i2c_calc_prescale(1, 10)); +#if 0 + pci_intr_handle_t pcih; + + pci_intr_map(pa, pcih); + + if (pci_intr_establish(pa-pa_pc, pcih, IPL_VM, xli2c_intr, sc) == NULL) { + aprint_error_dev(self, failed to establish interrupt\n); + } else { + const char * const intrstr = pci_intr_string(pa-pa_pc, pcih); + aprint_normal_dev(self, interrupting at %s\n, intrstr); + } +#endif + memset(iba, 0, sizeof(iba)); iba.iba_tag = sc-sc_i2c; config_found_ia(self, i2cbus, iba, iicbus_print); @@ -186,7 +202,7 @@ xli2c_release_bus(void *v, int flags) } #if 0 -int +static int xli2c_intr(void *v) { struct xli2c_softc * const sc = v;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Tue Dec 27 19:58:19 UTC 2011 Modified Files: src/sys/arch/mips/conf [matt-nb5-mips64]: files.rmixl src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlreg.h rmixlvar.h Added Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cfi_xlnor.c rmixl_iobus.c rmixl_iobus_space.c rmixl_iobusvar.h rmixl_nand_iobus.c rmixl_nand_pci.c rmixl_nor_pci.c rmixl_spi_pci.c Log Message: Add NOR/NAND (from HEAD)/SPI attachments. To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/arch/mips/conf/files.rmixl cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c \ src/sys/arch/mips/rmi/rmixl_nand_iobus.c \ src/sys/arch/mips/rmi/rmixl_nand_pci.c \ src/sys/arch/mips/rmi/rmixl_nor_pci.c \ src/sys/arch/mips/rmi/rmixl_spi_pci.c cvs rdiff -u -r0 -r1.3.8.2 src/sys/arch/mips/rmi/rmixl_iobus.c \ src/sys/arch/mips/rmi/rmixl_iobus_space.c cvs rdiff -u -r0 -r1.1.14.2 src/sys/arch/mips/rmi/rmixl_iobusvar.h cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/arch/mips/rmi/rmixlreg.h cvs rdiff -u -r1.1.2.21 -r1.1.2.22 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/conf/files.rmixl diff -u src/sys/arch/mips/conf/files.rmixl:1.1.2.14 src/sys/arch/mips/conf/files.rmixl:1.1.2.15 --- src/sys/arch/mips/conf/files.rmixl:1.1.2.14 Sat Dec 24 01:57:53 2011 +++ src/sys/arch/mips/conf/files.rmixl Tue Dec 27 19:58:18 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.rmixl,v 1.1.2.14 2011/12/24 01:57:53 matt Exp $ +# $NetBSD: files.rmixl,v 1.1.2.15 2011/12/27 19:58:18 matt Exp $ # # Configuration info for RMI XLP, XLR, XLS # @@ -59,6 +59,36 @@ device rmixl_pcix: pcibus attach rmixl_pcix at obio # XLR filearch/mips/rmi/rmixl_pcix.c rmixl_pcix needs-flag +# XLS/XLR Periperal IO Bus to NOR, NAND, and PCMCIA memory controllers +define xliobus { [cs=-1], [addr=-1], [size=-1], [intr=-1] } +device xliobus: xliobus +attach xliobus at obio with xliobus_obio +filearch/mips/rmi/rmixl_iobus_space.c xliobus_obio +filearch/mips/rmi/rmixl_iobus.c xliobus_obio + +# NAND flash controller +device xlnand: nandbus +attach xlnand at xliobus with xlnand_iobus +attach xlnand at pci with xlnand_pci +filearch/mips/rmi/rmixl_nand_iobus.c xlnand_iobus +filearch/mips/rmi/rmixl_nand_pci.c xlnand_pci + +# NOR controller (XLP equiv of xliobus but for NOR only). +device xlnor { [cs=-1] } +attach xlnor at pci with xlnor_pci +file arch/mips/rmi/rmixl_nor_pci.c xlnor_pci + +device cfi: norbus +attach cfi at xliobus with cfi_iobus +attach cfi at xlnor with cfi_xlnor +file arch/mips/rmi/rmixl_cfi_iobus.c cfi_iobus +file arch/mips/rmi/rmixl_cfi_xlnor.c cfi_xlnor + +# PCMCIA controller +device xlpcic: pcmciabus +attach xlpcic at xliobus +filearch/mips/rmi/rmixl_pcic.c xlpcic + # On-chip USB interface define rmixl_usbi { [addr=-1], [size=-1], [intr=-1] } device rmixl_usbi: rmixl_usbi @@ -97,3 +127,8 @@ attach xli2c at obio with xli2c_obio attach xli2c at pci with xli2c_pci file arch/mips/rmi/rmixl_i2c_obio.c xli2c_obio file arch/mips/rmi/rmixl_i2c_pci.c xli2c_pci + +# XL SPI controller +device xlspi: spibus +attach xlspi at pci with xlspi_pci +file arch/mips/rmi/rmixl_spi_pci.c xlspi_pci Index: src/sys/arch/mips/rmi/rmixlreg.h diff -u src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.13 src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.14 --- src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.13 Sat Dec 24 01:57:54 2011 +++ src/sys/arch/mips/rmi/rmixlreg.h Tue Dec 27 19:58:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlreg.h,v 1.1.2.13 2011/12/24 01:57:54 matt Exp $ */ +/* $NetBSD: rmixlreg.h,v 1.1.2.14 2011/12/27 19:58:19 matt Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -392,9 +392,9 @@ #define RMIXL_SBC_DRAM_CHNBD_DTR(n) _RMIXL_OFFSET(0x010 + (n)) /* DRAM Region Channels B,D Address Translation Regs[0-7] */ #define RMIXL_SBC_DRAM_BRIDGE_CFG _RMIXL_OFFSET(0x18) /* SBC DRAM config reg */ +#define RMIXL_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ +#define RMIXL_SBC_FLASH_BAR _RMIXL_OFFSET(0x1a) /* Flash Memory Base Addr reg */ #if defined(MIPS64_XLR) -#define RMIXLR_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ -#define RMIXLR_SBC_FLASH_BAR _RMIXL_OFFSET(0x1a) /* Flash Memory Base Addr reg */ #define RMIXLR_SBC_SRAM_BAR _RMIXL_OFFSET(0x1b) /* SRAM Base Addr reg */ #define RMIXLR_SBC_HTMEM_BAR _RMIXL_OFFSET(0x1c) /* HyperTransport Mem Base Addr reg */ #define RMIXLR_SBC_HTINT_BAR _RMIXL_OFFSET(0x1d) /* HyperTransport Interrupt Base Addr reg */ @@ -408,8 +408,6 @@ #define RMIXLR_SBC_SYS2IO_CREDITS _RMIXL_OFFSET(0x35) /* System Bridge I/O Transaction Credits register */ #endif /* MIPS64_XLR */ #if defined(MIPS64_XLS) -#define RMIXLS_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ -#define
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl
Module Name:src Committed By: matt Date: Tue Dec 27 19:59:24 UTC 2011 Modified Files: src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c Log Message: When filling out the physical extent, make sure to probe NOR base/limit pairs. To generate a diff of this commit: cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/arch/evbmips/rmixl/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/evbmips/rmixl/machdep.c diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.39 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.40 --- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.39 Sat Dec 24 01:44:44 2011 +++ src/sys/arch/evbmips/rmixl/machdep.c Tue Dec 27 19:59:24 2011 @@ -1069,6 +1069,31 @@ rmixlp_physaddr_srio_mem_init(struct ext rmixl_physaddr_add(ext, sriomem, rcp-rc_srio_mem, xbase, xsize); } +static void +rmixlp_physaddr_nor_init(struct extent *ext) +{ + struct rmixl_config * const rcp = rmixl_configuration; + for (size_t i = 0; i RMIXLP_NOR_NCS; i++) { + uint64_t xbase = RMIXLP_NOR_CS_ADDRESS_TO_PA( + rmixlp_read_4(RMIXLP_NOR_PCITAG, + RMIXLP_NOR_CS_BASEADDRESSn(i))); + uint64_t xlimit = RMIXLP_NOR_CS_ADDRESS_TO_PA( + rmixlp_read_4(RMIXLP_NOR_PCITAG, + RMIXLP_NOR_CS_BASELIMITn(i))); + + if (xlimit xbase || xbase == 0) + continue; /* not enabled */ + + uint64_t xsize = RMIXLP_NOR_CS_SIZE(xbase, xlimit); + + DPRINTF(%s: %s %zu: %#PRIx64:%PRIu64 MB\n, __func__, + nor, i, xbase, xsize 20); + + rmixl_physaddr_add(ext, nor, rcp-rc_pci_link_io[i], + xbase, xsize); + } +} + static uint64_t rmixlp_physaddr_dram_init(struct extent *ext) { @@ -1180,6 +1205,7 @@ rmixl_physaddr_init(void) rmixlp_physaddr_pcie_mem_init(ext); rmixlp_physaddr_pcie_io_init(ext); rmixlp_physaddr_srio_mem_init(ext); + rmixlp_physaddr_nor_init(ext); #else memsize = 0; #endif /* MIPS64_XLP */
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Dec 27 20:00:08 UTC 2011 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLPEVB XLSATX Log Message: Add NOR/NAND/SPI devices (NAND only for XLSATX). To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/conf/XLPEVB cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/arch/evbmips/conf/XLSATX 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.1 src/sys/arch/evbmips/conf/XLPEVB:1.1.2.2 --- src/sys/arch/evbmips/conf/XLPEVB:1.1.2.1 Sat Dec 24 01:42:48 2011 +++ src/sys/arch/evbmips/conf/XLPEVB Tue Dec 27 20:00:08 2011 @@ -1,8 +1,8 @@ -# $NetBSD: XLPEVB,v 1.1.2.1 2011/12/24 01:42:48 matt Exp $ +# $NetBSD: XLPEVB,v 1.1.2.2 2011/12/27 20:00:08 matt Exp $ include arch/evbmips/conf/std.rmixlp -#ident XLSATX-$Revision: 1.1.2.1 $ +#ident XLSATX-$Revision: 1.1.2.2 $ #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -167,6 +167,14 @@ iic* at xli2c? spdmem* at iic? addr 0x51 spdmem* at iic? addr 0x52 seeprom* at iic1 addr 0x57 size 2048 +xlnor* at pci? dev ? function ? +cfi* at xlnor? cs ? +nor* at cfi? +flash* at nor? +xlnand* at pci? dev ? function ? +nand* at xlnand? +flash* at nand? +xlspi* at pci? dev ? function ? ahcisata* at pci? dev ? function ? siisata* at pci? dev ? function ? atabus* at ata? Index: src/sys/arch/evbmips/conf/XLSATX diff -u src/sys/arch/evbmips/conf/XLSATX:1.1.2.14 src/sys/arch/evbmips/conf/XLSATX:1.1.2.15 --- src/sys/arch/evbmips/conf/XLSATX:1.1.2.14 Fri Apr 29 09:23:16 2011 +++ src/sys/arch/evbmips/conf/XLSATX Tue Dec 27 20:00:08 2011 @@ -1,8 +1,8 @@ -# $NetBSD: XLSATX,v 1.1.2.14 2011/04/29 09:23:16 matt Exp $ +# $NetBSD: XLSATX,v 1.1.2.15 2011/12/27 20:00:08 matt Exp $ include arch/evbmips/conf/std.rmixl -#ident XLSATX-$Revision: 1.1.2.14 $ +#ident XLSATX-$Revision: 1.1.2.15 $ #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -146,6 +146,11 @@ obio0 at cpunode? com0 at obio0 addr 0x14000 intr 9 com1 at obio0 addr 0x15000 intr 10 options COM_REGMAP +xliobus0 at obio0 addr 0x19000 +xlnand* at xliobus? addr 0x0180 +#xlnand* at xliobus? cs 2 +nand* at xlnand? +flash* at nand? rmixl_pcix0 at obio0 pci* at rmixl_pcix0 rmixl_pcie0 at obio0
CVS commit: src/external/bsd/openpam/dist/lib
Module Name:src Committed By: christos Date: Tue Dec 27 20:29:08 UTC 2011 Modified Files: src/external/bsd/openpam/dist/lib: pam_start.c Log Message: don't allocate variable arrays on the stack for SSP (from joerg) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openpam/dist/lib/pam_start.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/openpam/dist/lib/pam_start.c diff -u src/external/bsd/openpam/dist/lib/pam_start.c:1.2 src/external/bsd/openpam/dist/lib/pam_start.c:1.3 --- src/external/bsd/openpam/dist/lib/pam_start.c:1.2 Sun Dec 25 17:27:56 2011 +++ src/external/bsd/openpam/dist/lib/pam_start.c Tue Dec 27 15:29:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_start.c,v 1.2 2011/12/25 22:27:56 christos Exp $ */ +/* $NetBSD: pam_start.c,v 1.3 2011/12/27 20:29:08 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -50,11 +50,6 @@ #include openpam_impl.h #include openpam_strlcpy.h -#ifdef _SC_HOST_NAME_MAX -#define HOST_NAME_MAX sysconf(_SC_HOST_NAME_MAX) -#else -#define HOST_NAME_MAX 1024 -#endif /* * XSSO 4.2.1 @@ -69,17 +64,28 @@ pam_start(const char *service, const struct pam_conv *pam_conv, pam_handle_t **pamh) { - char hostname[HOST_NAME_MAX + 1]; + char *hostname = NULL; struct pam_handle *ph; int r; + size_t hostname_size; + long h; + +#ifdef _SC_HOST_NAME_MAX + h = sysconf(_SC_HOST_NAME_MAX); +#else + h = -1; +#endif + hostname_size = (h 10 ? 1024 : h) + 1; ENTER(); if ((ph = calloc((size_t)1, sizeof *ph)) == NULL) RETURNC(PAM_BUF_ERR); if ((r = pam_set_item(ph, PAM_SERVICE, service)) != PAM_SUCCESS) goto fail; - if (gethostname(hostname, sizeof hostname) != 0) - strlcpy(hostname, localhost, sizeof hostname); + if ((hostname = malloc(hostname_size)) == NULL) + goto fail; + if (gethostname(hostname, hostname_size) != 0) + strlcpy(hostname, localhost, hostname_size); if ((r = pam_set_item(ph, PAM_HOST, hostname)) != PAM_SUCCESS) goto fail; if ((r = pam_set_item(ph, PAM_USER, user)) != PAM_SUCCESS) @@ -88,10 +94,12 @@ pam_start(const char *service, goto fail; if ((r = openpam_configure(ph, service)) != PAM_SUCCESS) goto fail; + free(hostname); *pamh = ph; openpam_log(PAM_LOG_DEBUG, pam_start(\%s\) succeeded, service); RETURNC(PAM_SUCCESS); fail: + free(hostname); pam_end(ph, r); RETURNC(r); /*NOTREACHED*/
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: jmcneill Date: Tue Dec 27 20:59:24 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: thunk.c Log Message: implement thunk_signal using sigaction so we ensure all of our signal handlers run on the alternate signal stack To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/usermode/usermode/thunk.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/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.54 src/sys/arch/usermode/usermode/thunk.c:1.55 --- src/sys/arch/usermode/usermode/thunk.c:1.54 Mon Dec 26 21:06:42 2011 +++ src/sys/arch/usermode/usermode/thunk.c Tue Dec 27 20:59:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.54 2011/12/26 21:06:42 jmcneill Exp $ */ +/* $NetBSD: thunk.c,v 1.55 2011/12/27 20:59:24 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifdef __NetBSD__ -__RCSID($NetBSD: thunk.c,v 1.54 2011/12/26 21:06:42 jmcneill Exp $); +__RCSID($NetBSD: thunk.c,v 1.55 2011/12/27 20:59:24 jmcneill Exp $); #endif #include sys/types.h @@ -507,7 +507,12 @@ thunk_sigaltstack(const stack_t *ss, sta void thunk_signal(int sig, void (*func)(int)) { - signal(sig, func); + struct sigaction sa; + + sa.sa_flags = SA_RESTART | SA_ONSTACK; + sa.sa_sigaction = (void (*)(int, siginfo_t *, void *))func; + sigemptyset(sa.sa_mask); + sigaction(sig, sa, NULL); } int
CVS commit: src/sys/arch/usermode/dev
Module Name:src Committed By: jmcneill Date: Tue Dec 27 20:59:45 UTC 2011 Modified Files: src/sys/arch/usermode/dev: ttycons.c Log Message: support ^Z To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/usermode/dev/ttycons.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/usermode/dev/ttycons.c diff -u src/sys/arch/usermode/dev/ttycons.c:1.16 src/sys/arch/usermode/dev/ttycons.c:1.17 --- src/sys/arch/usermode/dev/ttycons.c:1.16 Mon Dec 26 12:29:38 2011 +++ src/sys/arch/usermode/dev/ttycons.c Tue Dec 27 20:59:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ttycons.c,v 1.16 2011/12/26 12:29:38 jmcneill Exp $ */ +/* $NetBSD: ttycons.c,v 1.17 2011/12/27 20:59:45 jmcneill Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ttycons.c,v 1.16 2011/12/26 12:29:38 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: ttycons.c,v 1.17 2011/12/27 20:59:45 jmcneill Exp $); #include sys/param.h #include sys/conf.h @@ -53,6 +53,7 @@ struct ttycons_softc { struct tty *sc_tty; void *sc_rd_sih; void *sc_ctrlc_sih; + void *sc_ctrlz_sih; u_char sc_buf[1024]; }; @@ -104,6 +105,8 @@ static void ttycons_softintr(void *); static void ttycons_ctrlc(int); static void ttycons_softctrlc(void *); +static void ttycons_ctrlz(int); +static void ttycons_softctrlz(void *); static int ttycons_match(device_t parent, cfdata_t match, void *opaque) @@ -145,9 +148,14 @@ ttycons_attach(device_t parent, device_t ttycons_softctrlc, sc); if (sc-sc_ctrlc_sih == NULL) panic(couldn't establish ttycons ctrlc handler\n); + sc-sc_ctrlz_sih = softint_establish(SOFTINT_SERIAL, + ttycons_softctrlz, sc); + if (sc-sc_ctrlz_sih == NULL) + panic(couldn't establish ttycons ctrlz handler\n); sigio_intr_establish(ttycons_intr, sc); thunk_signal(SIGINT, ttycons_ctrlc); + thunk_signal(SIGTSTP, ttycons_ctrlz); if (thunk_set_stdin_sigio(true) != 0) panic(couldn't enable stdin async mode); } @@ -399,3 +407,28 @@ ttycons_softctrlc(void *priv) cn_check_magic(t-t_dev, ch, ttycons_cnm_state); t-t_linesw-l_rint(ch, t); } + +static void +ttycons_ctrlz(int sig) +{ + struct ttycons_softc *sc; + + curcpu()-ci_idepth++; + sc = device_lookup_private(ttycons_cd, minor(cn_tab-cn_dev)); + if (sc) { + spl_intr(IPL_SERIAL, softint_schedule, sc-sc_ctrlz_sih); + } + curcpu()-ci_idepth--; + +} + +static void +ttycons_softctrlz(void *priv) +{ + struct ttycons_softc *sc = priv; + struct tty *t = sc-sc_tty; + unsigned char ch = 26; /* SUB */ + + cn_check_magic(t-t_dev, ch, ttycons_cnm_state); + t-t_linesw-l_rint(ch, t); +}
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Tue Dec 27 21:24:25 UTC 2011 Modified Files: src/share/man/man4: bpf.4 Log Message: PR/45750: Alexander Nasonov: Type of k in bpf_insn is bpf(9) is different from sys/net/bpf.h To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/share/man/man4/bpf.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/bpf.4 diff -u src/share/man/man4/bpf.4:1.46 src/share/man/man4/bpf.4:1.47 --- src/share/man/man4/bpf.4:1.46 Tue Jun 8 00:11:06 2010 +++ src/share/man/man4/bpf.4 Tue Dec 27 16:24:25 2011 @@ -1,8 +1,8 @@ -.\ $NetBSD: bpf.4,v 1.46 2010/06/08 04:11:06 jruoho Exp $ +.\ $NetBSD: bpf.4,v 1.47 2011/12/27 21:24:25 christos Exp $ .\ .\ -*- nroff -*- .\ -.\ $NetBSD: bpf.4,v 1.46 2010/06/08 04:11:06 jruoho Exp $ +.\ $NetBSD: bpf.4,v 1.47 2011/12/27 21:24:25 christos Exp $ .\ .\ Copyright (c) 1990, 1991, 1992, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -26,7 +26,7 @@ .\ This document is derived in part from the enet man page (enet.4) .\ distributed with 4.3BSD Unix. .\ -.Dd June 8, 2010 +.Dd December 27, 2011 .Dt BPF 4 .Os .Sh NAME @@ -451,7 +451,7 @@ struct bpf_insn { uint16_t code; u_char jt; u_char jf; - int32_t k; + uint32_t k; }; .Ed .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Dec 27 21:47:04 UTC 2011 Modified Files: src/share/man/man4: bpf.4 Log Message: Remove duplicate RCS Id. New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/share/man/man4/bpf.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/bpf.4 diff -u src/share/man/man4/bpf.4:1.47 src/share/man/man4/bpf.4:1.48 --- src/share/man/man4/bpf.4:1.47 Tue Dec 27 21:24:25 2011 +++ src/share/man/man4/bpf.4 Tue Dec 27 21:47:04 2011 @@ -1,8 +1,6 @@ -.\ $NetBSD: bpf.4,v 1.47 2011/12/27 21:24:25 christos Exp $ -.\ .\ -*- nroff -*- .\ -.\ $NetBSD: bpf.4,v 1.47 2011/12/27 21:24:25 christos Exp $ +.\ $NetBSD: bpf.4,v 1.48 2011/12/27 21:47:04 wiz Exp $ .\ .\ Copyright (c) 1990, 1991, 1992, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -316,7 +314,8 @@ compatibility, the two others follow the .\direction is set, injected Injected outgoing packets are not returned by BPF to avoid -duplication. This flag is initialized to zero by default. +duplication. +This flag is initialized to zero by default. .El .Sh STANDARD IOCTLS .Nm
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Tue Dec 27 22:01:26 UTC 2011 Modified Files: src/lib/libcrypt: bcrypt.c Log Message: we want to check against *0 not *\0 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libcrypt/bcrypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/bcrypt.c diff -u src/lib/libcrypt/bcrypt.c:1.12 src/lib/libcrypt/bcrypt.c:1.13 --- src/lib/libcrypt/bcrypt.c:1.12 Tue Dec 27 14:36:10 2011 +++ src/lib/libcrypt/bcrypt.c Tue Dec 27 17:01:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $ */ +/* $NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include sys/cdefs.h -__RCSID($NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $); +__RCSID($NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $); #include stdio.h #include stdlib.h @@ -315,7 +315,7 @@ __bcrypt(key, salt) return encrypted; out: /* How do I handle errors ? Return *0 or *1 */ - return __UNCONST(salt[0] == '*' salt[1] == '\0' ? *1 : *0); + return __UNCONST(salt[0] == '*' salt[1] == '0' ? *1 : *0); } static void
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl
Module Name:src Committed By: matt Date: Tue Dec 27 22:13:05 UTC 2011 Modified Files: src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c Log Message: Fix cp error. To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/sys/arch/evbmips/rmixl/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/evbmips/rmixl/machdep.c diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.40 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.41 --- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.40 Tue Dec 27 19:59:24 2011 +++ src/sys/arch/evbmips/rmixl/machdep.c Tue Dec 27 22:13:05 2011 @@ -1089,7 +1089,7 @@ rmixlp_physaddr_nor_init(struct extent * DPRINTF(%s: %s %zu: %#PRIx64:%PRIu64 MB\n, __func__, nor, i, xbase, xsize 20); - rmixl_physaddr_add(ext, nor, rcp-rc_pci_link_io[i], + rmixl_physaddr_add(ext, nor, rcp-rc_norflash[i], xbase, xsize); } }
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Tue Dec 27 23:33:41 UTC 2011 Modified Files: src/lib/libcrypt: bcrypt.c Log Message: - go back to returning NULL, we are going to wrap crypt instead. - limit length of key to 253 to prevent truncation. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libcrypt/bcrypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/bcrypt.c diff -u src/lib/libcrypt/bcrypt.c:1.13 src/lib/libcrypt/bcrypt.c:1.14 --- src/lib/libcrypt/bcrypt.c:1.13 Tue Dec 27 17:01:26 2011 +++ src/lib/libcrypt/bcrypt.c Tue Dec 27 18:33:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $ */ +/* $NetBSD: bcrypt.c,v 1.14 2011/12/27 23:33:41 christos Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include sys/cdefs.h -__RCSID($NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $); +__RCSID($NetBSD: bcrypt.c,v 1.14 2011/12/27 23:33:41 christos Exp $); #include stdio.h #include stdlib.h @@ -222,13 +222,13 @@ __bcrypt(key, salt) u_int8_t csalt[BCRYPT_MAXSALT]; u_int32_t cdata[BCRYPT_BLOCKS]; int n; + size_t len; /* Discard $ identifier */ salt++; - if (*salt BCRYPT_VERSION) { - goto out; - } + if (*salt BCRYPT_VERSION) + return NULL; /* Check for minor versions */ if (salt[1] != '$') { @@ -239,7 +239,7 @@ __bcrypt(key, salt) salt++; break; default: - goto out; + return NULL; } } else minor = 0; @@ -249,26 +249,29 @@ __bcrypt(key, salt) if (salt[2] != '$') /* Out of sync with passwd entry */ - goto out; + return NULL; /* Computer power doesn't increase linear, 2^x should be fine */ n = atoi(salt); if (n 31 || n 0) - goto out; + return NULL; logr = (u_int8_t)n; if ((rounds = (u_int32_t) 1 logr) BCRYPT_MINROUNDS) - goto out; + return NULL; /* Discard num rounds + $ identifier */ salt += 3; if (strlen(salt) * 3 / 4 BCRYPT_MAXSALT) - goto out; + return NULL; /* We dont want the base64 salt but the raw data */ decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); salt_len = BCRYPT_MAXSALT; - key_len = strlen(key) + (minor = 'a' ? 1 : 0); + len = strlen(key); + if (len 253) + return NULL; + key_len = (uint8_t)len + (minor = 'a' ? 1 : 0); /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(state); @@ -313,9 +316,6 @@ __bcrypt(key, salt) 4 * BCRYPT_BLOCKS - 1); memset(state, 0, sizeof(state)); return encrypted; -out: - /* How do I handle errors ? Return *0 or *1 */ - return __UNCONST(salt[0] == '*' salt[1] == '0' ? *1 : *0); } static void
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Tue Dec 27 23:34:13 UTC 2011 Modified Files: src/lib/libcrypt: crypt.c Log Message: wrap crypt() to a function that returns *0 and *1 on error. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libcrypt/crypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/crypt.c diff -u src/lib/libcrypt/crypt.c:1.31 src/lib/libcrypt/crypt.c:1.32 --- src/lib/libcrypt/crypt.c:1.31 Mon Dec 26 20:20:45 2011 +++ src/lib/libcrypt/crypt.c Tue Dec 27 18:34:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crypt.c,v 1.31 2011/12/27 01:20:45 christos Exp $ */ +/* $NetBSD: crypt.c,v 1.32 2011/12/27 23:34:13 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93; #else -__RCSID($NetBSD: crypt.c,v 1.31 2011/12/27 01:20:45 christos Exp $); +__RCSID($NetBSD: crypt.c,v 1.32 2011/12/27 23:34:13 christos Exp $); #endif #endif /* not lint */ @@ -486,7 +486,7 @@ ascii_to_bin(char ch) return retval 0x3f; } -#include stdio.h + /* * When we choose to support invalid salts, nevertheless disallow those * containing characters that would violate the passwd file format. @@ -501,8 +501,9 @@ ascii_is_unsafe(char ch) * Return a pointer to static data consisting of the setting * followed by an encryption produced by the key and setting. */ +char *__crypt(const char *, const char *); char * -crypt(const char *key, const char *setting) +__crypt(const char *key, const char *setting) { char *encp; int32_t i; @@ -613,6 +614,15 @@ crypt(const char *key, const char *setti return (cryptresult); } +char * +crypt(const char *key, const char *salt) +{ + char *res = __crypt(key, salt); + if (res) + return res; + /* How do I handle errors ? Return *0 or *1 */ + return __UNCONST(salt[0] == '*' salt[1] == '0' ? *1 : *0); +} /* * The Key Schedule, filled in by des_setkey() or setkey().
CVS commit: src/sys/net
Module Name:src Committed By: dyoung Date: Wed Dec 28 02:14:57 UTC 2011 Modified Files: src/sys/net: if.c Log Message: Fix ifpromisc() regression: if ifpromisc(ifp, 1) is called, do set IFF_PROMISC whether ifp is IFF_UP or not, but do not call ifp-if_ioctl unless ifp is IFF_UP. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.258 src/sys/net/if.c:1.259 --- src/sys/net/if.c:1.258 Sun Nov 27 14:55:57 2011 +++ src/sys/net/if.c Wed Dec 28 02:14:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.258 2011/11/27 14:55:57 jakllsch Exp $ */ +/* $NetBSD: if.c,v 1.259 2011/12/28 02:14:57 dyoung Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if.c,v 1.258 2011/11/27 14:55:57 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: if.c,v 1.259 2011/12/28 02:14:57 dyoung Exp $); #include opt_inet.h @@ -1415,10 +1415,9 @@ int ifpromisc(struct ifnet *ifp, int pswitch) { int pcount, ret; - short flags, nflags; + short nflags; pcount = ifp-if_pcount; - flags = ifp-if_flags; if (pswitch) { /* * Allow the device to be placed into promiscuous @@ -1428,20 +1427,10 @@ ifpromisc(struct ifnet *ifp, int pswitch if (ifp-if_pcount++ != 0) return 0; nflags = ifp-if_flags | IFF_PROMISC; - if ((nflags IFF_UP) == 0) - return 0; } else { if (--ifp-if_pcount 0) return 0; nflags = ifp-if_flags ~IFF_PROMISC; - /* - * If the device is not configured up, we should not need to - * turn off promiscuous mode (device should have turned it - * off when interface went down; and will look at IFF_PROMISC - * again next time interface comes up). - */ - if ((nflags IFF_UP) == 0) - return 0; } ret = if_flags_set(ifp, nflags); /* Restore interface state if not successful. */ @@ -2160,15 +2149,24 @@ if_flags_set(ifnet_t *ifp, const short f if (ifp-if_setflags != NULL) rc = (*ifp-if_setflags)(ifp, flags); else { - short cantflags; + short cantflags, chgdflags; struct ifreq ifr; - memset(ifr, 0, sizeof(ifr)); + chgdflags = ifp-if_flags ^ flags; + cantflags = chgdflags IFF_CANTCHANGE; - cantflags = (ifp-if_flags ^ flags) IFF_CANTCHANGE; if (cantflags != 0) ifp-if_flags ^= cantflags; +/* Traditionally, we do not call if_ioctl after + * setting/clearing only IFF_PROMISC if the interface + * isn't IFF_UP. Uphold that tradition. + */ + if (chgdflags == IFF_PROMISC (ifp-if_flags IFF_UP) == 0) + return 0; + + memset(ifr, 0, sizeof(ifr)); + ifr.ifr_flags = flags ~IFF_CANTCHANGE; rc = (*ifp-if_ioctl)(ifp, SIOCSIFFLAGS, ifr);
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Wed Dec 28 03:12:38 UTC 2011 Modified Files: src/lib/libcrypt: bcrypt.c Log Message: clamp length to 72 (73) characters. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libcrypt/bcrypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/bcrypt.c diff -u src/lib/libcrypt/bcrypt.c:1.14 src/lib/libcrypt/bcrypt.c:1.15 --- src/lib/libcrypt/bcrypt.c:1.14 Tue Dec 27 18:33:41 2011 +++ src/lib/libcrypt/bcrypt.c Tue Dec 27 22:12:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.14 2011/12/27 23:33:41 christos Exp $ */ +/* $NetBSD: bcrypt.c,v 1.15 2011/12/28 03:12:38 christos Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include sys/cdefs.h -__RCSID($NetBSD: bcrypt.c,v 1.14 2011/12/27 23:33:41 christos Exp $); +__RCSID($NetBSD: bcrypt.c,v 1.15 2011/12/28 03:12:38 christos Exp $); #include stdio.h #include stdlib.h @@ -269,9 +269,11 @@ __bcrypt(key, salt) decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); salt_len = BCRYPT_MAXSALT; len = strlen(key); - if (len 253) - return NULL; - key_len = (uint8_t)len + (minor = 'a' ? 1 : 0); + if (len 72) + key_len = 72; + else + key_len = (uint8_t)len; + key_len += minor = 'a' ? 1 : 0; /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(state);
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Wed Dec 28 03:13:09 UTC 2011 Modified Files: src/lib/libcrypt: crypt.c Log Message: make __crypt static To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libcrypt/crypt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/crypt.c diff -u src/lib/libcrypt/crypt.c:1.32 src/lib/libcrypt/crypt.c:1.33 --- src/lib/libcrypt/crypt.c:1.32 Tue Dec 27 18:34:13 2011 +++ src/lib/libcrypt/crypt.c Tue Dec 27 22:13:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crypt.c,v 1.32 2011/12/27 23:34:13 christos Exp $ */ +/* $NetBSD: crypt.c,v 1.33 2011/12/28 03:13:09 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93; #else -__RCSID($NetBSD: crypt.c,v 1.32 2011/12/27 23:34:13 christos Exp $); +__RCSID($NetBSD: crypt.c,v 1.33 2011/12/28 03:13:09 christos Exp $); #endif #endif /* not lint */ @@ -501,8 +501,7 @@ ascii_is_unsafe(char ch) * Return a pointer to static data consisting of the setting * followed by an encryption produced by the key and setting. */ -char *__crypt(const char *, const char *); -char * +static char * __crypt(const char *key, const char *setting) { char *encp;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Wed Dec 28 05:35:06 UTC 2011 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlp_pcie.c Log Message: Cleanup aprint* To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixlp_pcie.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/rmixlp_pcie.c diff -u src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.2 src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.3 --- src/sys/arch/mips/rmi/rmixlp_pcie.c:1.1.2.2 Tue Dec 27 16:22:01 2011 +++ src/sys/arch/mips/rmi/rmixlp_pcie.c Wed Dec 28 05:35:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlp_pcie.c,v 1.1.2.2 2011/12/27 16:22:01 matt Exp $ */ +/* $NetBSD: rmixlp_pcie.c,v 1.1.2.3 2011/12/28 05:35:06 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rmixlp_pcie.c,v 1.1.2.2 2011/12/27 16:22:01 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: rmixlp_pcie.c,v 1.1.2.3 2011/12/28 05:35:06 matt Exp $); #include opt_pci.h #include pci.h @@ -118,7 +118,8 @@ static struct rmixlp_pcie_softc { static int rmixlp_pcie_match(device_t, cfdata_t, void *); static void rmixlp_pcie_attach(device_t, device_t, void *); -static void rmixlp_pcie_bar_alloc(struct rmixl_region *, u_long, u_long); +static void rmixlp_pcie_bar_alloc(struct rmixlp_pcie_softc *, + struct rmixl_region *, u_long, u_long); static void rmixlp_pcie_attach_hook(device_t, device_t, struct pcibus_attach_args *); @@ -219,7 +220,7 @@ rmixlp_pcie_attach(device_t parent, devi */ rmixlp_pcie_lnkcfg_get(sc); - aprint_normal_dev(sc-sc_dev, using link variant %d (system is %d)\n, + aprint_debug_dev(sc-sc_dev, using link variant %d (system is %d)\n, sc-sc_lnkcfg.lnk_variant, rmixl_xlp_variant); for (size_t port = 0; port sc-sc_lnkcfg.lnk_ports; port++) { if (sc-sc_lnkcfg.lnk_lanes[port] == 0) @@ -252,7 +253,7 @@ rmixlp_pcie_attach(device_t parent, devi } } if (0) - rmixlp_pcie_bar_alloc(rcp-rc_pci_mem, 256, 1); + rmixlp_pcie_bar_alloc(sc, rcp-rc_pci_mem, 256, 1); rcp-rc_pci_mem.r_pbase = rmixlp_read_4(RMIXLP_EHCI0_PCITAG, PCI_BAR0) -8; rcp-rc_pci_mem.r_size = 256 20; @@ -280,7 +281,7 @@ rmixlp_pcie_attach(device_t parent, devi rp-r_size = 0; } } - // rmixlp_pcie_bar_alloc(rcp-rc_pci_io, 4, 1); + // rmixlp_pcie_bar_alloc(sc, rcp-rc_pci_io, 4, 1); #endif rmixl_pci_bus_io_init(rcp-rc_pci_iot, rcp); } @@ -333,7 +334,7 @@ rmixlp_pcie_attach(device_t parent, devi #ifdef PCI_NETBSD_CONFIGURE void -rmixlp_pcie_bar_alloc(struct rmixl_region *rp, +rmixlp_pcie_bar_alloc(struct rmixlp_pcie_softc *sc, struct rmixl_region *rp, u_long size_mb, u_long align_mb) { struct rmixl_config * const rcp = rmixl_configuration; @@ -350,7 +351,8 @@ rmixlp_pcie_bar_alloc(struct rmixl_regio const uint64_t pbase = (uint64_t)region_start 20; const uint64_t limit = pbase + ((uint64_t)(size_mb - 1) 20); - printf(%s: pbase=%#PRIx64 limit=%#PRIx64 size=%luMB\n, + aprint_debug_dev(sc-sc_dev, + %s: pbase=%#PRIx64 limit=%#PRIx64 size=%luMB\n, __func__, pbase, limit, size_mb); rp-r_pbase = pbase; @@ -424,94 +426,6 @@ rmixlp_pcie_intcfg(struct rmixlp_pcie_so } #endif -#if 0 -static void -rmixlp_pcie_errata(struct rmixlp_pcie_softc *sc) -{ - const mips_prid_t cpu_id = mips_options.mips_cpu_id; - u_int rev; - u_int lanes; - bool e391 = false; - - /* - * 3.9.1 PCIe Link-0 Registers Reset to Incorrect Values - * check if it allies to this CPU implementation and revision - */ - rev = MIPS_PRID_REV(cpu_id); - switch (MIPS_PRID_IMPL(cpu_id)) { - case MIPS_XLS104: - case MIPS_XLS108: - break; - case MIPS_XLS204: - case MIPS_XLS208: - /* stepping A0 is affected */ - if (rev == 0) - e391 = true; - break; - case MIPS_XLS404LITE: - case MIPS_XLS408LITE: - break; - case MIPS_XLS404: - case MIPS_XLS408: - case MIPS_XLS416: - /* steppings A0 and A1 are affected */ - if ((rev == 0) || (rev == 1)) - e391 = true; - break; - case MIPS_XLS608: - case MIPS_XLS616: - break; - default: - panic(unknown RMI PRID IMPL); -} - - /* - * for XLS we only need to check entry #0 - * this may need to change for later XL family chips - */ - lanes = sc-sc_pcie_lnktab.cfg[0].lanes; - - if ((e391 != false) ((lanes == 2) || (lanes == 4))) { - /* - * attempt work around for errata 3.9.1 - * PCIe Link-0 Registers Reset to Incorrect Values - * the registers are write-once: if the firmware already wrote, - * then our writes are ignored; hope they did it right. - */ - uint32_t queuectrl; - uint32_t bufdepth; -#ifdef DIAGNOSTIC - uint32_t r; -#endif - - aprint_normal(%s: attempt work around for errata 3.9.1, - device_xname(sc-sc_dev)); - if (lanes == 4) { - queuectrl = 0x00018074; - bufdepth = 0x001901D1; - } else { - queuectrl = 0x00018036; -
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Wed Dec 28 05:36:11 UTC 2011 Modified Files: src/sys/arch/mips/conf [matt-nb5-mips64]: files.rmixl src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cfi_xlnor.c rmixl_nor_pci.c rmixlreg.h rmixlvar.h Added Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_flash_eb_space.c rmixl_flash_el_space.c Log Message: Add NOR support for XLP. To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/arch/mips/conf/files.rmixl cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c \ src/sys/arch/mips/rmi/rmixl_nor_pci.c cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_flash_eb_space.c \ src/sys/arch/mips/rmi/rmixl_flash_el_space.c cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/arch/mips/rmi/rmixlreg.h cvs rdiff -u -r1.1.2.22 -r1.1.2.23 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/conf/files.rmixl diff -u src/sys/arch/mips/conf/files.rmixl:1.1.2.15 src/sys/arch/mips/conf/files.rmixl:1.1.2.16 --- src/sys/arch/mips/conf/files.rmixl:1.1.2.15 Tue Dec 27 19:58:18 2011 +++ src/sys/arch/mips/conf/files.rmixl Wed Dec 28 05:36:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.rmixl,v 1.1.2.15 2011/12/27 19:58:18 matt Exp $ +# $NetBSD: files.rmixl,v 1.1.2.16 2011/12/28 05:36:10 matt Exp $ # # Configuration info for RMI XLP, XLR, XLS # @@ -77,6 +77,8 @@ filearch/mips/rmi/rmixl_nand_pci.c device xlnor { [cs=-1] } attach xlnor at pci with xlnor_pci file arch/mips/rmi/rmixl_nor_pci.c xlnor_pci +filearch/mips/rmi/rmixl_flash_eb_space.c xlnor_pci +filearch/mips/rmi/rmixl_flash_el_space.c xlnor_pci device cfi: norbus attach cfi at xliobus with cfi_iobus Index: src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c diff -u src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c:1.1.2.1 src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c:1.1.2.2 --- src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c:1.1.2.1 Tue Dec 27 19:58:19 2011 +++ src/sys/arch/mips/rmi/rmixl_cfi_xlnor.c Wed Dec 28 05:36:11 2011 @@ -27,9 +27,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include opt_flash.h +#include locators.h + #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: rmixl_cfi_xlnor.c,v 1.1.2.1 2011/12/27 19:58:19 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: rmixl_cfi_xlnor.c,v 1.1.2.2 2011/12/28 05:36:11 matt Exp $); #include sys/param.h #include sys/device.h @@ -38,10 +41,11 @@ __KERNEL_RCSID(1, $NetBSD: rmixl_cfi_xl #include dev/nor/nor.h #include dev/nor/cfi.h -#include locators.h +#include mips/rmi/rmixl_iobusvar.h -static int cfi_xlnor_match(device_t, cfdata_t, void *); +static int cfi_xlnor_match(device_t, cfdata_t, void *); static void cfi_xlnor_attach(device_t, device_t, void *); +static int cfi_xlnor_detach(device_t, int); struct cfi_xlnor_softc { device_t sc_dev; @@ -53,16 +57,117 @@ struct cfi_xlnor_softc { }; CFATTACH_DECL_NEW(cfi_xlnor, sizeof(struct cfi_xlnor_softc), -cfi_xlnor_match, cfi_xlnor_attach, 0, 0); +cfi_xlnor_match, cfi_xlnor_attach, cfi_xlnor_detach, 0); static int cfi_xlnor_match(device_t parent, cfdata_t cf, void *aux) { - return 0; + struct rmixl_iobus_attach_args *ia = aux; + bus_size_t tmpsize = CFI_QRY_MIN_MAP_SIZE; + bus_addr_t addr = ia-ia_iobus_addr; + struct cfi cfi; + int rv; + + KASSERT(ia-ia_iobus_bst != NULL); + KASSERT(ia-ia_iobus_addr == 0); + KASSERT(ia-ia_iobus_size = tmpsize); + KASSERT(ia-ia_obio_bst == NULL); + + if (cf-cf_loc[XLIOBUSCF_CS] != ia-ia_cs + cf-cf_loc[XLIOBUSCF_CS] != XLIOBUSCF_CS_DEFAULT) + return 0; + + cfi.cfi_bst = ia-ia_iobus_bst; + int error = bus_space_map(cfi.cfi_bst, addr, tmpsize, 0, cfi.cfi_bsh); + if (error != 0) { + aprint_error(%s: cannot map %#PRIxBUSSIZE at offset %# + PRIxBUSADDR: error %d\n, __func__, tmpsize, addr, error); + return 0; + } + + if (!cfi_probe(cfi)) { + aprint_debug(%s: probe addr %#PRIxBUSADDR, CFI not found\n, + __func__, addr); + rv = 0; + } else { + rv = 1; + } + + bus_space_unmap(cfi.cfi_bst, cfi.cfi_bsh, tmpsize); + + return rv; } static void cfi_xlnor_attach(device_t parent, device_t self, void *aux) { + struct cfi_xlnor_softc *sc = device_private(self); + struct rmixl_iobus_attach_args *ia = aux; + struct cfi_query_data * const qryp = sc-sc_cfi.cfi_qry_data; + const bus_size_t tmpsize = CFI_QRY_MIN_MAP_SIZE; + bool found; + int error; + aprint_normal(\n); + + sc-sc_dev = self; + sc-sc_cfi.cfi_bst = ia-ia_iobus_bst; + sc-sc_addr = ia-ia_iobus_addr; + + KASSERT(ia-ia_iobus_addr == 0); + + /* map enough to identify, remap later when size is known */ + error = bus_space_map(sc-sc_cfi.cfi_bst, sc-sc_addr, tmpsize, + 0, sc-sc_cfi.cfi_bsh); + if (error != 0) { + aprint_error_dev(self, could not map error %d\n, error); + return; + } + + found = cfi_identify(sc-sc_cfi); + + bus_space_unmap(sc-sc_cfi.cfi_bst, sc-sc_cfi.cfi_bsh, tmpsize); + +
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl
Module Name:src Committed By: matt Date: Wed Dec 28 05:36:51 UTC 2011 Modified Files: src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c Log Message: Add commented out AB_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/sys/arch/evbmips/rmixl/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/evbmips/rmixl/machdep.c diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.41 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.42 --- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.41 Tue Dec 27 22:13:05 2011 +++ src/sys/arch/evbmips/rmixl/machdep.c Wed Dec 28 05:36:50 2011 @@ -615,6 +615,7 @@ mach_init(int argc, int32_t *argv, void */ boothowto = RB_AUTOBOOT; // boothowto |= AB_VERBOSE; + // boothowto |= AB_DEBUG; if (!uboot_p) { for (int i = 1; i argc; i++) { for (char *cp = (char *)(intptr_t)argv[i]; *cp; cp++) {
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Dec 28 05:37:26 UTC 2011 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLPEVB Log Message: Only connect to nor on cs 0 for now. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 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.2 src/sys/arch/evbmips/conf/XLPEVB:1.1.2.3 --- src/sys/arch/evbmips/conf/XLPEVB:1.1.2.2 Tue Dec 27 20:00:08 2011 +++ src/sys/arch/evbmips/conf/XLPEVB Wed Dec 28 05:37:26 2011 @@ -1,8 +1,8 @@ -# $NetBSD: XLPEVB,v 1.1.2.2 2011/12/27 20:00:08 matt Exp $ +# $NetBSD: XLPEVB,v 1.1.2.3 2011/12/28 05:37:26 matt Exp $ include arch/evbmips/conf/std.rmixlp -#ident XLSATX-$Revision: 1.1.2.2 $ +#ident XLSATX-$Revision: 1.1.2.3 $ #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -168,7 +168,7 @@ spdmem* at iic? addr 0x51 spdmem* at iic? addr 0x52 seeprom* at iic1 addr 0x57 size 2048 xlnor* at pci? dev ? function ? -cfi* at xlnor? cs ? +cfi* at xlnor? cs 0 nor* at cfi? flash* at nor? xlnand* at pci? dev ? function ?
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Dec 28 05:38:05 UTC 2011 Modified Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLPEVB32 Log Message: Add commented out options for CFI_DEBUG_QRY, CFI_DEBUG_JEDEC To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/conf/XLPEVB32 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/XLPEVB32 diff -u src/sys/arch/evbmips/conf/XLPEVB32:1.1.2.1 src/sys/arch/evbmips/conf/XLPEVB32:1.1.2.2 --- src/sys/arch/evbmips/conf/XLPEVB32:1.1.2.1 Sat Dec 24 01:42:48 2011 +++ src/sys/arch/evbmips/conf/XLPEVB32 Wed Dec 28 05:38:05 2011 @@ -1,7 +1,7 @@ -# $NetBSD: XLPEVB32,v 1.1.2.1 2011/12/24 01:42:48 matt Exp $ +# $NetBSD: XLPEVB32,v 1.1.2.2 2011/12/28 05:38:05 matt Exp $ # -#ident XLSATX32-$Revision: 1.1.2.1 $ +#ident XLSATX32-$Revision: 1.1.2.2 $ include arch/evbmips/conf/XLPEVB @@ -11,6 +11,7 @@ options PCI_NETBSD_CONFIGURE #options PCI_CONFIG_DUMP options PCI_VERBOSE #options SDMMC_DEBUG +#options CFI_DEBUG_QRY, CFI_DEBUG_JEDEC makeoptions LP64=no makeoptions NEED_BINARY=yes