CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:03:16 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Style. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.89 src/sys/arch/hppa/hppa/pmap.c:1.90 --- src/sys/arch/hppa/hppa/pmap.c:1.89 Fri Jan 6 07:59:07 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:03:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.89 2012/01/06 07:59:07 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.90 2012/01/06 08:03:16 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.89 2012/01/06 07:59:07 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.90 2012/01/06 08:03:16 skrll Exp $); #include opt_cputype.h @@ -595,11 +595,13 @@ pmap_pv_remove(struct vm_page *pg, pmap_ KASSERT(pmap == pmap_kernel() || uvm_page_locked_p(pg)); for (pv = *(pve = md-pvh_list); - pv; pv = *(pve = (*pve)-pv_next)) + pv; pv = *(pve = (*pve)-pv_next)) { if (pv-pv_pmap == pmap (pv-pv_va PV_VAMASK) == va) { *pve = pv-pv_next; break; } + } + return (pv); }
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:32:08 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Simplify code a little. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.90 src/sys/arch/hppa/hppa/pmap.c:1.91 --- src/sys/arch/hppa/hppa/pmap.c:1.90 Fri Jan 6 08:03:16 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:32:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.90 2012/01/06 08:03:16 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.91 2012/01/06 08:32:08 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.90 2012/01/06 08:03:16 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.91 2012/01/06 08:32:08 skrll Exp $); #include opt_cputype.h @@ -1698,6 +1698,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v { volatile pt_entry_t *pde; pt_entry_t pte, opte; + struct vm_page *pg; #ifdef PMAPDEBUG int opmapdebug = pmapdebug; @@ -1727,28 +1728,23 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v if (opte) pmap_pte_flush(pmap_kernel(), va, opte); - if (pmap_initialized) { - struct vm_page *pg; + + pg = pmap_initialized ? PHYS_TO_VM_PAGE(PTE_PAGE(pte)) : NULL; + if (pg != NULL) { + KASSERT(pa HPPA_IOBEGIN); - pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte)); - if (pg != NULL) { - KASSERT(pa HPPA_IOBEGIN); + struct pv_entry *pve; - struct pv_entry *pve; - - pve = pmap_pv_alloc(); - if (!pve) -panic(%s: no pv entries available, -__func__); - DPRINTF(PDB_FOLLOW|PDB_ENTER, - (%s(%lx, %lx, %x) TLB_KENTER\n, __func__, - va, pa, pte)); + pve = pmap_pv_alloc(); + if (!pve) + panic(%s: no pv entries available, __func__); + DPRINTF(PDB_FOLLOW|PDB_ENTER, (%s(%lx, %lx, %x) TLB_KENTER\n, + _func__, va, pa, pte)); - if (pmap_check_alias(pg, va, pte)) -pmap_page_remove(pg); - pmap_pv_enter(pg, pve, pmap_kernel(), va, NULL, - PV_KENTER); - } + if (pmap_check_alias(pg, va, pte)) + pmap_page_remove(pg); + + pmap_pv_enter(pg, pve, pmap_kernel(), va, NULL, PV_KENTER); } pmap_pte_set(pde, va, pte); @@ -1815,7 +1811,9 @@ pmap_kremove(vaddr_t va, vsize_t size) pmap_pte_flush(pmap, va, pte); pmap_pte_set(pde, va, 0); - if (pmap_initialized (pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte { + + pg = pmap_initialized ? PHYS_TO_VM_PAGE(PTE_PAGE(pte)) : NULL; + if (pg != NULL) { pve = pmap_pv_remove(pg, pmap, va); if (pve != NULL)
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:33:26 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Group the prototypes. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.91 src/sys/arch/hppa/hppa/pmap.c:1.92 --- src/sys/arch/hppa/hppa/pmap.c:1.91 Fri Jan 6 08:32:08 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:33:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.91 2012/01/06 08:32:08 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.92 2012/01/06 08:33:26 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.91 2012/01/06 08:32:08 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.92 2012/01/06 08:33:26 skrll Exp $); #include opt_cputype.h @@ -208,11 +208,12 @@ static inline struct pv_entry *pmap_pv_r vaddr_t); static inline void pmap_flush_page(struct vm_page *, bool); - -void pmap_copy_page(paddr_t, paddr_t); +static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); static void pmap_page_physload(paddr_t, paddr_t); +void pmap_copy_page(paddr_t, paddr_t); + #ifdef USE_HPT static inline struct hpt_entry *pmap_hash(pmap_t, vaddr_t); static inline uint32_t pmap_vtag(pmap_t, vaddr_t); @@ -227,8 +228,6 @@ void pmap_dump_table(pa_space_t, vaddr_t void pmap_dump_pv(paddr_t); #endif -static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); - #define IS_IOPAGE_P(pa) ((pa) = HPPA_IOBEGIN) /* un-invert PVF_REF */
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:36:10 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Whitespace. hi perry. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.92 src/sys/arch/hppa/hppa/pmap.c:1.93 --- src/sys/arch/hppa/hppa/pmap.c:1.92 Fri Jan 6 08:33:26 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:36:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.92 2012/01/06 08:33:26 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.93 2012/01/06 08:36:10 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.92 2012/01/06 08:33:26 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.93 2012/01/06 08:36:10 skrll Exp $); #include opt_cputype.h @@ -904,7 +904,7 @@ pmap_bootstrap(vaddr_t vstart) btlb_entry_size[btlb_j] = size; btlb_entry_vm_prot[btlb_j] = VM_PROT_READ | VM_PROT_WRITE; - + /* Move on. */ addr = btlb_entry_start[btlb_j] + btlb_entry_size[btlb_j]; @@ -1727,7 +1727,6 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v if (opte) pmap_pte_flush(pmap_kernel(), va, opte); - pg = pmap_initialized ? PHYS_TO_VM_PAGE(PTE_PAGE(pte)) : NULL; if (pg != NULL) { KASSERT(pa HPPA_IOBEGIN); @@ -1844,7 +1843,7 @@ pmap_hptdump(void) char buf[128]; snprintb(buf, sizeof(buf), TLB_BITS, hpt-hpt_tlbprot); - + db_printf(hpt@%p: %x{%sv=%x:%x},%s,%x\n, hpt, *(int *)hpt, (hpt-hpt_valid?ok,:), hpt-hpt_space, hpt-hpt_vpn 9,
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:38:11 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: More whitespace. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.93 src/sys/arch/hppa/hppa/pmap.c:1.94 --- src/sys/arch/hppa/hppa/pmap.c:1.93 Fri Jan 6 08:36:10 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:38:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.93 2012/01/06 08:36:10 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.94 2012/01/06 08:38:11 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.93 2012/01/06 08:36:10 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.94 2012/01/06 08:38:11 skrll Exp $); #include opt_cputype.h @@ -945,9 +945,9 @@ pmap_bootstrap(vaddr_t vstart) availphysmem = 0; - pmap_page_physload(resvmem, atop(ksrx)); - pmap_page_physload(atop(kero), atop(ksrw)); - pmap_page_physload(atop(kerw), physmem); + pmap_page_physload(resvmem, atop(ksrx)); + pmap_page_physload(atop(kero), atop(ksrw)); + pmap_page_physload(atop(kerw), physmem); mutex_init(pmaps_lock, MUTEX_DEFAULT, IPL_NONE); @@ -1113,7 +1113,7 @@ pmap_destroy(pmap_t pmap) KASSERT(pg != pmap-pm_pdir_pg); pa = VM_PAGE_TO_PHYS(pg); - + DPRINTF(PDB_FOLLOW, (%s(%p): stray ptp 0x%lx w/ %d ents:, __func__, pmap, pa, pg-wire_count - 1)); @@ -1381,7 +1381,7 @@ pmap_write_protect(pmap_t pmap, vaddr_t VM_PAGE_TO_MD(pg); md-pvh_attrs |= pmap_pvh_attrs(pte); } - + pmap_pte_flush(pmap, sva, pte); pte = ~PTE_PROT(TLB_AR_MASK); pte |= pteprot; @@ -1809,7 +1809,7 @@ pmap_kremove(vaddr_t va, vsize_t size) pmap_pte_flush(pmap, va, pte); pmap_pte_set(pde, va, 0); - + pg = pmap_initialized ? PHYS_TO_VM_PAGE(PTE_PAGE(pte)) : NULL; if (pg != NULL) { pve = pmap_pv_remove(pg, pmap, va);
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:48:43 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Add a KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.94 src/sys/arch/hppa/hppa/pmap.c:1.95 --- src/sys/arch/hppa/hppa/pmap.c:1.94 Fri Jan 6 08:38:11 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:48:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.94 2012/01/06 08:38:11 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.95 2012/01/06 08:48:43 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.94 2012/01/06 08:38:11 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.95 2012/01/06 08:48:43 skrll Exp $); #include opt_cputype.h @@ -1487,6 +1487,7 @@ pmap_changebit(struct vm_page *pg, u_int DPRINTF(PDB_FOLLOW|PDB_BITS, (%s(%p, %x, %x)\n, __func__, pg, set, clear)); + KASSERT((set clear) == 0); KASSERT((set ~(PVF_REF|PVF_UNCACHEABLE)) == 0); KASSERT((clear ~(PVF_MOD|PVF_WRITE|PVF_UNCACHEABLE)) == 0);
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 08:54:05 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Wrap a long line. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.95 src/sys/arch/hppa/hppa/pmap.c:1.96 --- src/sys/arch/hppa/hppa/pmap.c:1.95 Fri Jan 6 08:48:43 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 08:54:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.95 2012/01/06 08:48:43 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.96 2012/01/06 08:54:05 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.95 2012/01/06 08:48:43 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.96 2012/01/06 08:54:05 skrll Exp $); #include opt_cputype.h @@ -1317,7 +1317,8 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va if (pmap_initialized (pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte { -struct vm_page_md * const md = VM_PAGE_TO_MD(pg); +struct vm_page_md * const md = +VM_PAGE_TO_MD(pg); pve = pmap_pv_remove(pg, pmap, sva); md-pvh_attrs |= pmap_pvh_attrs(pte);
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 09:09:25 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: kobj_machdep.c Log Message: Flush the d-cache and i-cache to make sure the text area of the module is dealt with properly. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/kobj_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/hppa/hppa/kobj_machdep.c diff -u src/sys/arch/hppa/hppa/kobj_machdep.c:1.6 src/sys/arch/hppa/hppa/kobj_machdep.c:1.7 --- src/sys/arch/hppa/hppa/kobj_machdep.c:1.6 Tue Dec 13 12:55:50 2011 +++ src/sys/arch/hppa/hppa/kobj_machdep.c Fri Jan 6 09:09:25 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.6 2011/12/13 12:55:50 skrll Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.7 2012/01/06 09:09:25 skrll Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.6 2011/12/13 12:55:50 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.7 2012/01/06 09:09:25 skrll Exp $); #define ELFSIZE ARCH_ELFSIZE @@ -215,8 +215,10 @@ int kobj_machdep(kobj_t ko, void *base, size_t size, bool load) { - if (load) + if (load) { fdcache(HPPA_SID_KERNEL, (vaddr_t)base, size); + ficache(HPPA_SID_KERNEL, (vaddr_t)base, size); + } return 0; }
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Fri Jan 6 09:11:45 UTC 2012 Modified Files: src/sys/arch/hppa/include: pmap.h Log Message: No need to flush the icache/itlb for pool pages as they're never marked executable. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hppa/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/pmap.h diff -u src/sys/arch/hppa/include/pmap.h:1.33 src/sys/arch/hppa/include/pmap.h:1.34 --- src/sys/arch/hppa/include/pmap.h:1.33 Fri Dec 23 16:35:00 2011 +++ src/sys/arch/hppa/include/pmap.h Fri Jan 6 09:11:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.33 2011/12/23 16:35:00 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.34 2012/01/06 09:11:45 skrll Exp $ */ /* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */ @@ -104,9 +104,7 @@ static inline paddr_t hppa_unmap_poolpag #if defined(HP8000_CPU) || defined(HP8200_CPU) || \ defined(HP8500_CPU) || defined(HP8600_CPU) - ficache(HPPA_SID_KERNEL, va, PAGE_SIZE); pdtlb(HPPA_SID_KERNEL, va); - pitlb(HPPA_SID_KERNEL, va); #endif return (paddr_t)va;
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Fri Jan 6 09:12:25 UTC 2012 Modified Files: src/sys/arch/hppa/include: pmap.h Log Message: Comment fix. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hppa/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/pmap.h diff -u src/sys/arch/hppa/include/pmap.h:1.34 src/sys/arch/hppa/include/pmap.h:1.35 --- src/sys/arch/hppa/include/pmap.h:1.34 Fri Jan 6 09:11:45 2012 +++ src/sys/arch/hppa/include/pmap.h Fri Jan 6 09:12:25 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.34 2012/01/06 09:11:45 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.35 2012/01/06 09:12:25 skrll Exp $ */ /* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */ @@ -200,7 +200,7 @@ pmap_protect(struct pmap *pmap, vaddr_t struct pv_entry; struct vm_page_md { - struct pv_entry *pvh_list; /* head of list (locked by pvh_lock) */ + struct pv_entry *pvh_list; /* head of list */ u_int pvh_attrs; /* to preserve ref/mod */ };
CVS commit: src/sys/common/pmap/tlb
Module Name:src Committed By: skrll Date: Fri Jan 6 09:41:18 UTC 2012 Modified Files: src/sys/common/pmap/tlb: pmap.c Log Message: Log the icache sync only if it's done. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/common/pmap/tlb/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/common/pmap/tlb/pmap.c diff -u src/sys/common/pmap/tlb/pmap.c:1.10 src/sys/common/pmap/tlb/pmap.c:1.11 --- src/sys/common/pmap/tlb/pmap.c:1.10 Tue Sep 27 01:02:37 2011 +++ src/sys/common/pmap/tlb/pmap.c Fri Jan 6 09:41:17 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.10 2011/09/27 01:02:37 jym Exp $ */ +/* $NetBSD: pmap.c,v 1.11 2012/01/06 09:41:17 skrll Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.10 2011/09/27 01:02:37 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.11 2012/01/06 09:41:17 skrll Exp $); /* * Manages physical address maps. @@ -792,11 +792,11 @@ pmap_pte_protect(pmap_t pmap, vaddr_t sv pmap_md_vca_clean(pg, sva, PMAP_WBINV); if (VM_PAGEMD_EXECPAGE_P(mdpg)) { KASSERT(mdpg-mdpg_first.pv_pmap != NULL); -UVMHIST_LOG(pmapexechist, -pg %p (pa %#PRIxPADDR): %s, -pg, VM_PAGE_TO_PHYS(pg), -syncicached performed, 0); if (pte_cached_p(pt_entry)) { + UVMHIST_LOG(pmapexechist, + pg %p (pa %#PRIxPADDR): %s, + pg, VM_PAGE_TO_PHYS(pg), + syncicached performed, 0); pmap_page_syncicache(pg); PMAP_COUNT(exec_synced_protect); }
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: skrll Date: Fri Jan 6 10:38:57 UTC 2012 Modified Files: src/libexec/ld.elf_so: reloc.c src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c rtld_start.S Log Message: Implement lazy binding on hppa. rump_server needs it!?!?! Mostly from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/libexec/ld.elf_so/reloc.c cvs rdiff -u -r1.41 -r1.42 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c cvs rdiff -u -r1.11 -r1.12 src/libexec/ld.elf_so/arch/hppa/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/reloc.c diff -u src/libexec/ld.elf_so/reloc.c:1.105 src/libexec/ld.elf_so/reloc.c:1.106 --- src/libexec/ld.elf_so/reloc.c:1.105 Fri Dec 2 09:06:49 2011 +++ src/libexec/ld.elf_so/reloc.c Fri Jan 6 10:38:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $ */ +/* $NetBSD: reloc.c,v 1.106 2012/01/06 10:38:56 skrll Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -39,7 +39,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $); +__RCSID($NetBSD: reloc.c,v 1.106 2012/01/06 10:38:56 skrll Exp $); #endif /* not lint */ #include err.h @@ -195,9 +195,6 @@ _rtld_relocate_objects(Obj_Entry *first, dbg((doing lazy PLT binding)); if (_rtld_relocate_plt_lazy(obj) 0) ok = 0; -#if defined(__hppa__) - bind_now = 1; -#endif if (obj-z_now || bind_now) { dbg((doing immediate PLT binding)); if (_rtld_relocate_plt_objects(obj) 0) Index: src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c diff -u src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.41 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.42 --- src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.41 Sun Dec 4 16:53:08 2011 +++ src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Fri Jan 6 10:38:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hppa_reloc.c,v 1.41 2011/12/04 16:53:08 skrll Exp $ */ +/* $NetBSD: hppa_reloc.c,v 1.42 2012/01/06 10:38:57 skrll Exp $ */ /*- * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: hppa_reloc.c,v 1.41 2011/12/04 16:53:08 skrll Exp $); +__RCSID($NetBSD: hppa_reloc.c,v 1.42 2012/01/06 10:38:57 skrll Exp $); #endif /* not lint */ #include stdlib.h @@ -82,6 +82,30 @@ store_ptr(void *where, Elf_Addr val) (void)memcpy(where, val, sizeof(val)); } +static __inline void +fdc(void *addr) +{ + __asm volatile(fdc %%r0(%%sr0, %0) : : r (addr)); +} + +static __inline void +fic(void *addr) +{ + __asm volatile(fic %%r0(%%sr0,%0) : : r (addr)); +} + +static __inline void +sync(void) +{ + __asm volatile(sync : : : memory); +} + +#define PLT_STUB_MAGIC1 0x00c0ffee +#define PLT_STUB_MAGIC2 0xdeadbeef + +#define PLT_STUB_INSN1 0x0e801081 /* ldw 0(%r20), %r1 */ +#define PLT_STUB_INSN2 0xe820c000 /* bv %r0(%r1) */ + /* * In the runtime architecture (ABI), PLABEL function pointers are * distinguished from normal function pointers by having the next-least- @@ -355,7 +379,34 @@ _rtld_function_descriptor_function(const void _rtld_setup_pltgot(const Obj_Entry *obj) { - __rtld_setup_hppa_pltgot(obj, obj-pltgot); + Elf_Word *got = obj-pltgot; + + assert(got[-2] == PLT_STUB_MAGIC1); + assert(got[-1] == PLT_STUB_MAGIC2); + + __rtld_setup_hppa_pltgot(obj, got); + + fdc(got[-2]); + fdc(got[-1]); + fdc(got[1]); + sync(); + fic(got[-2]); + fic(got[-1]); + fic(got[1]); + sync(); + + /* + * libc makes use of %t1 (%r22) to pass errno values to __cerror. Fixup + * the PLT stub to not use %r22. + */ + got[-7] = PLT_STUB_INSN1; + got[-6] = PLT_STUB_INSN2; + fdc(got[-7]); + fdc(got[-6]); + sync(); + fic(got[-7]); + fic(got[-6]); + sync(); } int Index: src/libexec/ld.elf_so/arch/hppa/rtld_start.S diff -u src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.11 src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.12 --- src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.11 Fri Sep 30 03:05:43 2011 +++ src/libexec/ld.elf_so/arch/hppa/rtld_start.S Fri Jan 6 10:38:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.11 2011/09/30 03:05:43 mrg Exp $ */ +/* $NetBSD: rtld_start.S,v 1.12 2012/01/06 10:38:57 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -181,6 +181,7 @@ ENTRY(_rtld_bind_start,HPPA_FRAME_SIZE) /* 0(%r3) is filled with the saved %r3 above */ stw %ret0, 4(%r3) stw %ret1, 8(%r3) + stw %t1, 12(%r3) /* %r22 */ /* * The linker PLT stub loads %r20 with (GOT - 8) for the object that @@ -220,6 +221,7 @@ ENTRY(_rtld_bind_start,HPPA_FRAME_SIZE) ldw HPPA_FRAME_ARG(3)(%r3), %arg3 ldw 4(%r3), %ret0 ldw 8(%r3), %ret1 + ldw 12(%r3), %t1 /* %r22 */ /* End stack calling convention. */ ldo HPPA_FRAME_SIZE(%r3), %sp
CVS commit: src/sys/arch/usermode/include
Module Name:src Committed By: reinoud Date: Fri Jan 6 12:53:07 UTC 2012 Modified Files: src/sys/arch/usermode/include: vmparam.h Log Message: Bump pager map default size since KVM is not that tight anymore To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/usermode/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/usermode/include/vmparam.h diff -u src/sys/arch/usermode/include/vmparam.h:1.13 src/sys/arch/usermode/include/vmparam.h:1.14 --- src/sys/arch/usermode/include/vmparam.h:1.13 Tue Jan 3 21:28:50 2012 +++ src/sys/arch/usermode/include/vmparam.h Fri Jan 6 12:53:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.13 2012/01/03 21:28:50 reinoud Exp $ */ +/* $NetBSD: vmparam.h,v 1.14 2012/01/06 12:53:07 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -52,7 +52,7 @@ extern paddr_t kmem_user_start, kmem_use #define USRSTACK VM_MAXUSER_ADDRESS /* override the default pager_map size, there is little KVA */ -#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024) +#define PAGER_MAP_DEFAULT_SIZE (8 * 1024 * 1024) #if defined(__i386__) #define PAGE_SHIFT 12
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: reinoud Date: Fri Jan 6 12:54:59 UTC 2012 Modified Files: src/sys/arch/usermode/dev: cpu.c src/sys/arch/usermode/include: pcb.h Log Message: Cleanup stack allocation and freeing. This means the memory leak on lwp destruction ought to be solved. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/usermode/dev/cpu.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/include/pcb.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/usermode/dev/cpu.c diff -u src/sys/arch/usermode/dev/cpu.c:1.61 src/sys/arch/usermode/dev/cpu.c:1.62 --- src/sys/arch/usermode/dev/cpu.c:1.61 Wed Jan 4 15:18:57 2012 +++ src/sys/arch/usermode/dev/cpu.c Fri Jan 6 12:54:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.61 2012/01/04 15:18:57 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.62 2012/01/06 12:54:59 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.61 2012/01/04 15:18:57 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.62 2012/01/06 12:54:59 reinoud Exp $); #include sys/param.h #include sys/conf.h @@ -278,22 +278,23 @@ cpu_lwp_free2(struct lwp *l) if (pcb == NULL) return; - if (pcb-pcb_needfree) { -#if 0 - free(pcb-pcb_ucp.uc_stack.ss_sp, M_TEMP); + if (pcb-pcb_stack_userland) { + free(pcb-pcb_stack_userland, M_TEMP); + pcb-pcb_stack_userland = NULL; pcb-pcb_ucp.uc_stack.ss_sp = NULL; pcb-pcb_ucp.uc_stack.ss_size = 0; -#endif + } - free(pcb-pcb_syscall_ucp.uc_stack.ss_sp, M_TEMP); + if (pcb-pcb_stack_syscall) { + free(pcb-pcb_stack_syscall, M_TEMP); pcb-pcb_syscall_ucp.uc_stack.ss_sp = NULL; pcb-pcb_syscall_ucp.uc_stack.ss_size = 0; + } - free(pcb-pcb_pagefault_ucp.uc_stack.ss_sp, M_TEMP); + if (pcb-pcb_stack_pagefault) { + free(pcb-pcb_stack_pagefault, M_TEMP); pcb-pcb_pagefault_ucp.uc_stack.ss_sp = NULL; pcb-pcb_pagefault_ucp.uc_stack.ss_size = 0; - - pcb-pcb_needfree = false; } } @@ -317,7 +318,6 @@ cpu_lwp_fork(struct lwp *l1, struct lwp { struct pcb *pcb1 = lwp_getpcb(l1); struct pcb *pcb2 = lwp_getpcb(l2); - void *stack_ucp, *stack_syscall_ucp, *stack_pagefault_ucp; #ifdef CPU_DEBUG thunk_printf_debug(cpu_lwp_fork [%s/%p] - [%s/%p] stack=%p stacksize=%d\n, @@ -333,21 +333,20 @@ cpu_lwp_fork(struct lwp *l1, struct lwp memcpy(pcb2, pcb1, sizeof(struct pcb)); stacksize = 2*PAGE_SIZE; - stack_ucp = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); - stack_syscall_ucp = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); - stack_pagefault_ucp = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); - pcb2-pcb_needfree = true; - - KASSERT(stack_ucp); - KASSERT(stack_syscall_ucp); - KASSERT(stack_pagefault_ucp); + pcb2-pcb_stack_userland = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); + pcb2-pcb_stack_syscall = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); + pcb2-pcb_stack_pagefault = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); + + KASSERT(pcb2-pcb_stack_userland); + KASSERT(pcb2-pcb_stack_syscall); + KASSERT(pcb2-pcb_stack_pagefault); if (thunk_getcontext(pcb2-pcb_ucp)) panic(getcontext failed); /* set up the ucontext for the userland switch */ /* XXX BUG TODO when is this stack space freed? */ - pcb2-pcb_ucp.uc_stack.ss_sp = stack_ucp; + pcb2-pcb_ucp.uc_stack.ss_sp = pcb2-pcb_stack_userland; pcb2-pcb_ucp.uc_stack.ss_size = stacksize; pcb2-pcb_ucp.uc_flags = _UC_STACK | _UC_CPU; pcb2-pcb_ucp.uc_link = pcb2-pcb_userret_ucp; @@ -356,7 +355,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 3, pcb2-pcb_ucp, func, arg); /* set up the ucontext for the syscall */ - pcb2-pcb_syscall_ucp.uc_stack.ss_sp = stack_syscall_ucp; + pcb2-pcb_syscall_ucp.uc_stack.ss_sp = pcb2-pcb_stack_syscall; pcb2-pcb_syscall_ucp.uc_stack.ss_size = stacksize; pcb2-pcb_syscall_ucp.uc_flags = _UC_STACK | _UC_CPU; pcb2-pcb_syscall_ucp.uc_link = pcb2-pcb_userret_ucp; @@ -364,7 +363,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 0, NULL, NULL, NULL); /* set up the ucontext for the pagefault */ - pcb2-pcb_pagefault_ucp.uc_stack.ss_sp = stack_pagefault_ucp; + pcb2-pcb_pagefault_ucp.uc_stack.ss_sp = pcb2-pcb_stack_pagefault; pcb2-pcb_pagefault_ucp.uc_stack.ss_size = stacksize; pcb2-pcb_pagefault_ucp.uc_flags = _UC_STACK | _UC_CPU; pcb2-pcb_pagefault_ucp.uc_link = pcb2-pcb_trapret_ucp; @@ -385,7 +384,6 @@ 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); @@ -415,9 +413,9 @@ cpu_startup(void) /* set up the ucontext for the pagefault */ stacksize = 2*PAGE_SIZE; - stack_pagefault_ucp = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO); + lwp0pcb.pcb_stack_pagefault = malloc(stacksize,
CVS commit: src/sys/arch/usermode/modules/syscallemu
Module Name:src Committed By: jmcneill Date: Fri Jan 6 13:16:20 UTC 2012 Modified Files: src/sys/arch/usermode/modules/syscallemu: Makefile Added Files: src/sys/arch/usermode/modules/syscallemu: syscallemu_x86.c Removed Files: src/sys/arch/usermode/modules/syscallemu: syscallemu_i386.c Log Message: i386 and x86_64 versions of this code are the same, rename to syscallemu_x86.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/modules/syscallemu/Makefile cvs rdiff -u -r1.1 -r0 \ src/sys/arch/usermode/modules/syscallemu/syscallemu_i386.c cvs rdiff -u -r0 -r1.1 \ src/sys/arch/usermode/modules/syscallemu/syscallemu_x86.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/modules/syscallemu/Makefile diff -u src/sys/arch/usermode/modules/syscallemu/Makefile:1.1 src/sys/arch/usermode/modules/syscallemu/Makefile:1.2 --- src/sys/arch/usermode/modules/syscallemu/Makefile:1.1 Thu Jan 5 13:26:51 2012 +++ src/sys/arch/usermode/modules/syscallemu/Makefile Fri Jan 6 13:16:20 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/01/05 13:26:51 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2012/01/06 13:16:20 jmcneill Exp $ NETBSDSRCDIR?= ../../../../.. @@ -11,6 +11,10 @@ M?= ${S}/modules KMOD= syscallemu SRCS= syscallemu.c -SRCS+= syscallemu_${MACHINE_ARCH}.c +.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64 +SRCS+= syscallemu_x86.c +.else +.error ${MACHINE_ARCH} not implemented +.endif .include bsd.kmodule.mk Added files: Index: src/sys/arch/usermode/modules/syscallemu/syscallemu_x86.c diff -u /dev/null src/sys/arch/usermode/modules/syscallemu/syscallemu_x86.c:1.1 --- /dev/null Fri Jan 6 13:16:20 2012 +++ src/sys/arch/usermode/modules/syscallemu/syscallemu_x86.c Fri Jan 6 13:16:20 2012 @@ -0,0 +1,107 @@ +/* $NetBSD: syscallemu_x86.c,v 1.1 2012/01/06 13:16:20 jmcneill Exp $ */ + +/*- + * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org + * Copyright (c) 2012 Jared D. McNeill jmcne...@invisible.ca + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: syscallemu_x86.c,v 1.1 2012/01/06 13:16:20 jmcneill Exp $); + +#include sys/param.h +#include sys/proc.h +#include sys/systm.h + +#include machine/userret.h + +#include syscallemu.h + +/* + * If syscallemu specific data is present for the process, verify that the + * caller is allowed to execute system calls. If not, deliver a SIGILL to + * the process. When syscallemu specific data is not present, simply defer + * to the original syscall handler. + */ +static void +x86_syscall_emu(struct trapframe *frame) +{ + void (*md_syscall)(struct trapframe *) = NULL; + struct syscallemu_data *sce; + register_t rip_call; + struct proc *p; + ksiginfo_t ksi; + lwp_t *l; + + l = curlwp; + p = l-l_proc; + + rip_call = X86_TF_RIP(frame) - frame-tf_err; + + /* Determine if we need to emulate the system call */ + sce = syscallemu_getsce(p); + if (sce) { + if ((rip_call = sce-sce_user_start + rip_call sce-sce_user_end) || + (rip_call + frame-tf_err = sce-sce_user_start + rip_call + frame-tf_err sce-sce_user_end)) { + md_syscall = NULL; + } else { + md_syscall = sce-sce_md_syscall; + } + } else { + md_syscall = p-p_md.md_syscall; + } + + if (md_syscall == NULL) { + /* If emulating, deliver SIGILL to process */ + X86_TF_RIP(frame) = rip_call; + KSI_INIT_TRAP(ksi); + ksi.ksi_signo = SIGILL; + ksi.ksi_code = ILL_ILLTRP; + ksi.ksi_addr = (void *)X86_TF_RIP(frame); + ksi.ksi_trap = 0; + trapsignal(l, ksi); +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jan 6 13:59:50 UTC 2012 Modified Files: src/sys/dev/pci: r128fbreg.h Log Message: Forgot to commit this along with r128fb.c. Again. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/r128fbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/r128fbreg.h diff -u src/sys/dev/pci/r128fbreg.h:1.4 src/sys/dev/pci/r128fbreg.h:1.5 --- src/sys/dev/pci/r128fbreg.h:1.4 Wed Dec 28 09:27:18 2011 +++ src/sys/dev/pci/r128fbreg.h Fri Jan 6 13:59:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: r128fbreg.h,v 1.4 2011/12/28 09:27:18 macallan Exp $ */ +/* $NetBSD: r128fbreg.h,v 1.5 2012/01/06 13:59:50 macallan Exp $ */ /* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, @@ -313,6 +313,12 @@ # define R128_CRTC_DBL_SCAN_EN (1 0) # define R128_CRTC_INTERLACE_EN (1 1) # define R128_CRTC_CSYNC_EN (1 4) +# define R128_CRTC_PIX_WIDTH (7 8) +# define R128_CRTC_COLOR_8BIT (2 8) +# define R128_CRTC_COLOR_15BIT (3 8) +# define R128_CRTC_COLOR_16BIT (4 8) +# define R128_CRTC_COLOR_24BIT (5 8) +# define R128_CRTC_COLOR_32BIT (6 8) # define R128_CRTC_CUR_EN (1 16) # define R128_CRTC_CUR_MODE_MASK(7 17) # define R128_CRTC_ICON_EN (1 20)
CVS commit: src/lib/libpam/modules/pam_ssh
Module Name:src Committed By: drochner Date: Fri Jan 6 14:04:02 UTC 2012 Modified Files: src/lib/libpam/modules/pam_ssh: pam_ssh.c Log Message: pull in from FreeBSD rev.1.41: Narrow the use of user credentials. (call pam_get_authtok() with caller's rights rather than user's) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libpam/modules/pam_ssh/pam_ssh.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/libpam/modules/pam_ssh/pam_ssh.c diff -u src/lib/libpam/modules/pam_ssh/pam_ssh.c:1.21 src/lib/libpam/modules/pam_ssh/pam_ssh.c:1.22 --- src/lib/libpam/modules/pam_ssh/pam_ssh.c:1.21 Tue Jan 3 19:02:55 2012 +++ src/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Jan 6 14:04:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_ssh.c,v 1.21 2012/01/03 19:02:55 christos Exp $ */ +/* $NetBSD: pam_ssh.c,v 1.22 2012/01/06 14:04:02 drochner Exp $ */ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. @@ -38,7 +38,7 @@ #ifdef __FreeBSD__ __FBSDID($FreeBSD: src/lib/libpam/modules/pam_ssh/pam_ssh.c,v 1.40 2004/02/10 10:13:21 des Exp $); #else -__RCSID($NetBSD: pam_ssh.c,v 1.21 2012/01/03 19:02:55 christos Exp $); +__RCSID($NetBSD: pam_ssh.c,v 1.22 2012/01/06 14:04:02 drochner Exp $); #endif #include sys/param.h @@ -184,11 +184,6 @@ pam_sm_authenticate(pam_handle_t *pamh, if (pwd-pw_dir == NULL) return (PAM_AUTH_ERR); - /* switch to user credentials */ - pam_err = openpam_borrow_cred(pamh, pwd); - if (pam_err != PAM_SUCCESS) - return (pam_err); - nkeys = 0; pass = (pam_get_item(pamh, PAM_AUTHTOK, item) == PAM_SUCCESS item != NULL); @@ -196,10 +191,13 @@ pam_sm_authenticate(pam_handle_t *pamh, /* get passphrase */ pam_err = pam_get_authtok(pamh, PAM_AUTHTOK, passphrase, pam_ssh_prompt); - if (pam_err != PAM_SUCCESS) { - openpam_restore_cred(pamh); + if (pam_err != PAM_SUCCESS) + return (pam_err); + + /* switch to user credentials */ + pam_err = openpam_borrow_cred(pamh, pwd); + if (pam_err != PAM_SUCCESS) return (pam_err); - } /* try to load keys from all keyfiles we know of */ for (kfn = pam_ssh_keyfiles; *kfn != NULL; ++kfn) { @@ -210,6 +208,9 @@ pam_sm_authenticate(pam_handle_t *pamh, } } + /* switch back to arbitrator credentials */ + openpam_restore_cred(pamh); + /* * If we tried an old token and didn't get anything, and * try_first_pass was specified, try again after prompting the @@ -222,9 +223,6 @@ pam_sm_authenticate(pam_handle_t *pamh, goto load_keys; } - /* switch back to arbitrator credentials before returning */ - openpam_restore_cred(pamh); - /* no keys? */ if (nkeys == 0) return (PAM_AUTH_ERR);
CVS commit: src/usr.bin/systat
Module Name:src Committed By: drochner Date: Fri Jan 6 14:08:09 UTC 2012 Modified Files: src/usr.bin/systat: Makefile cmdtab.c extern.h systat.1 Removed Files: src/usr.bin/systat: ipsec.c Log Message: kill ipsec support which hasn't been working for a long time (neither for KAME nor for FAST_IPSEC) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.bin/systat/Makefile cvs rdiff -u -r1.23 -r1.24 src/usr.bin/systat/cmdtab.c cvs rdiff -u -r1.41 -r1.42 src/usr.bin/systat/extern.h cvs rdiff -u -r1.10 -r0 src/usr.bin/systat/ipsec.c cvs rdiff -u -r1.40 -r1.41 src/usr.bin/systat/systat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/Makefile diff -u src/usr.bin/systat/Makefile:1.36 src/usr.bin/systat/Makefile:1.37 --- src/usr.bin/systat/Makefile:1.36 Sat Feb 6 23:45:26 2010 +++ src/usr.bin/systat/Makefile Fri Jan 6 14:08:08 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2010/02/06 23:45:26 he Exp $ +# $NetBSD: Makefile,v 1.37 2012/01/06 14:08:08 drochner Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -22,9 +22,6 @@ BINMODE=2555 LINKS= ${BINDIR}/systat ${BINDIR}/sysstat MLINKS+=systat.1 sysstat.1 -CPPFLAGS+=-DIPSEC -SRCS+= ipsec.c - .if (${USE_INET6} != no) CPPFLAGS+=-DINET6 SRCS+= ip6.c Index: src/usr.bin/systat/cmdtab.c diff -u src/usr.bin/systat/cmdtab.c:1.23 src/usr.bin/systat/cmdtab.c:1.24 --- src/usr.bin/systat/cmdtab.c:1.23 Sun Feb 18 17:00:08 2007 +++ src/usr.bin/systat/cmdtab.c Fri Jan 6 14:08:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cmdtab.c,v 1.23 2007/02/18 17:00:08 dsl Exp $ */ +/* $NetBSD: cmdtab.c,v 1.24 2012/01/06 14:08:08 drochner Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)cmdtab.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: cmdtab.c,v 1.23 2007/02/18 17:00:08 dsl Exp $); +__RCSID($NetBSD: cmdtab.c,v 1.24 2012/01/06 14:08:08 drochner Exp $); #endif /* not lint */ #include systat.h @@ -100,16 +100,6 @@ struct command ip6_commands[] = { }; #endif -#ifdef IPSEC -struct command ipsec_commands[] = { - { boot, ipsec_boot, show total stats since boot}, - { run, ipsec_run, show running total stats}, - { time, ipsec_time, show stats for each sample time}, - { zero, ipsec_zero, re-zero running totals}, - { .c_name = NULL } -}; -#endif - struct command netstat_commands[] = { { all, netstat_all, include server sockets}, { display, netstat_display, show specified hosts or ports}, @@ -186,11 +176,6 @@ struct mode modes[] = { initip6, openip6, closeip6, ip6_commands, CF_LOADAV }, #endif -#ifdef IPSEC - { ipsec, showipsec, fetchipsec, labelipsec, - initipsec, openipsec, closeipsec, ipsec_commands, - CF_LOADAV }, -#endif { iostat, showiostat, fetchiostat, labeliostat, initiostat, openiostat, closeiostat, iostat_commands, CF_LOADAV }, Index: src/usr.bin/systat/extern.h diff -u src/usr.bin/systat/extern.h:1.41 src/usr.bin/systat/extern.h:1.42 --- src/usr.bin/systat/extern.h:1.41 Tue Sep 6 18:31:44 2011 +++ src/usr.bin/systat/extern.h Fri Jan 6 14:08:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.41 2011/09/06 18:31:44 joerg Exp $ */ +/* $NetBSD: extern.h,v 1.42 2012/01/06 14:08:08 drochner Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -221,16 +221,3 @@ void ip6_run(char *); void ip6_time(char *); void ip6_zero(char *); #endif - -#ifdef IPSEC -void closeipsec(WINDOW *); -void fetchipsec(void); -int initipsec(void); -void labelipsec(void); -WINDOW *openipsec(void); -void showipsec(void); -void ipsec_boot(char *); -void ipsec_run(char *); -void ipsec_time(char *); -void ipsec_zero(char *); -#endif Index: src/usr.bin/systat/systat.1 diff -u src/usr.bin/systat/systat.1:1.40 src/usr.bin/systat/systat.1:1.41 --- src/usr.bin/systat/systat.1:1.40 Wed Oct 21 22:18:37 2009 +++ src/usr.bin/systat/systat.1 Fri Jan 6 14:08:08 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: systat.1,v 1.40 2009/10/21 22:18:37 wiz Exp $ +.\ $NetBSD: systat.1,v 1.41 2012/01/06 14:08:08 drochner Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)systat.1 8.2 (Berkeley) 12/30/93 .\ -.Dd October 22, 2009 +.Dd January 5, 2012 .Dt SYSTAT 1 .Os .Sh NAME @@ -120,7 +120,6 @@ argument expects to be one of: .Ic inet.tcp , .Ic inet.tcpsyn , .Ic inet6.ip6 , -.Ic ipsec , .Ic iostat , .Ic mbufs , .Ic netstat , @@ -239,8 +238,6 @@ Display statistics about the ``syncache''. .It Ic inet6.ip6 Display IPv6 statistics. -.It Ic ipsec -Display IPsec statistics for both IPv4 and v6. .It Ic iostat Display, in the lower window, statistics about processor use and disk throughput. @@ -520,7 +517,6 @@ with the ones specified. The following commands are specific to the .Ic inet.* , .Ic inet6.* , -.Ic ipsec , .Ic syscall and .Ic vmstat
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: jmcneill Date: Fri Jan 6 14:11:55 UTC 2012 Modified Files: src/sys/arch/usermode/dev: ld_thunkbus.c src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: support disk images = 2GB To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/usermode/dev/ld_thunkbus.c cvs rdiff -u -r1.56 -r1.57 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.74 -r1.75 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/dev/ld_thunkbus.c diff -u src/sys/arch/usermode/dev/ld_thunkbus.c:1.25 src/sys/arch/usermode/dev/ld_thunkbus.c:1.26 --- src/sys/arch/usermode/dev/ld_thunkbus.c:1.25 Tue Jan 3 12:05:01 2012 +++ src/sys/arch/usermode/dev/ld_thunkbus.c Fri Jan 6 14:11:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_thunkbus.c,v 1.25 2012/01/03 12:05:01 reinoud Exp $ */ +/* $NetBSD: ld_thunkbus.c,v 1.26 2012/01/06 14:11:55 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ld_thunkbus.c,v 1.25 2012/01/03 12:05:01 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: ld_thunkbus.c,v 1.26 2012/01/06 14:11:55 jmcneill Exp $); #include sys/param.h #include sys/proc.h @@ -90,7 +90,8 @@ ld_thunkbus_attach(device_t parent, devi struct ld_softc *ld = sc-sc_ld; struct thunkbus_attach_args *taa = opaque; const char *path = taa-u.diskimage.path; - ssize_t size, blksize; + ssize_t blksize; + off_t size; ld-sc_dv = self; Index: src/sys/arch/usermode/include/thunk.h diff -u src/sys/arch/usermode/include/thunk.h:1.56 src/sys/arch/usermode/include/thunk.h:1.57 --- src/sys/arch/usermode/include/thunk.h:1.56 Thu Jan 5 12:12:58 2012 +++ src/sys/arch/usermode/include/thunk.h Fri Jan 6 14:11:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.h,v 1.56 2012/01/05 12:12:58 jmcneill Exp $ */ +/* $NetBSD: thunk.h,v 1.57 2012/01/06 14:11:55 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca @@ -107,7 +107,7 @@ void thunk_putchar(int); int thunk_execv(const char *, char * const []); int thunk_open(const char *, int, mode_t); -int thunk_fstat_getsize(int, ssize_t *, ssize_t *); +int thunk_fstat_getsize(int, off_t *, ssize_t *); ssize_t thunk_pread(int, void *, size_t, off_t); ssize_t thunk_pwrite(int, const void *, size_t, off_t); ssize_t thunk_read(int, void *, size_t); Index: src/sys/arch/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.74 src/sys/arch/usermode/usermode/thunk.c:1.75 --- src/sys/arch/usermode/usermode/thunk.c:1.74 Thu Jan 5 12:12:58 2012 +++ src/sys/arch/usermode/usermode/thunk.c Fri Jan 6 14:11:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.74 2012/01/05 12:12:58 jmcneill Exp $ */ +/* $NetBSD: thunk.c,v 1.75 2012/01/06 14:11:55 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.74 2012/01/05 12:12:58 jmcneill Exp $); +__RCSID($NetBSD: thunk.c,v 1.75 2012/01/06 14:11:55 jmcneill Exp $); #endif #include sys/types.h @@ -461,7 +461,7 @@ thunk_open(const char *path, int flags, } int -thunk_fstat_getsize(int fd, ssize_t *size, ssize_t *blksize) +thunk_fstat_getsize(int fd, off_t *size, ssize_t *blksize) { struct stat st; int error;
CVS commit: src
Module Name:src Committed By: drochner Date: Fri Jan 6 14:17:12 UTC 2012 Modified Files: src/distrib/sets/lists/comp: mi src/sys/netinet6: Makefile ipsec.h src/sys/netipsec: Makefile ipsec.h src/sys/netkey: Makefile keysock.h src/usr.bin/netstat: fast_ipsec.c Log Message: more IPSEC header cleanup: don't install unneeded headers to userland, and remove some differences berween KAME and FAST_IPSEC To generate a diff of this commit: cvs rdiff -u -r1.1722 -r1.1723 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.7 -r1.8 src/sys/netinet6/Makefile cvs rdiff -u -r1.52 -r1.53 src/sys/netinet6/ipsec.h cvs rdiff -u -r1.4 -r1.5 src/sys/netipsec/Makefile cvs rdiff -u -r1.30 -r1.31 src/sys/netipsec/ipsec.h cvs rdiff -u -r1.4 -r1.5 src/sys/netkey/Makefile cvs rdiff -u -r1.15 -r1.16 src/sys/netkey/keysock.h cvs rdiff -u -r1.17 -r1.18 src/usr.bin/netstat/fast_ipsec.c 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1722 src/distrib/sets/lists/comp/mi:1.1723 --- src/distrib/sets/lists/comp/mi:1.1722 Wed Jan 4 16:25:14 2012 +++ src/distrib/sets/lists/comp/mi Fri Jan 6 14:17:10 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1722 2012/01/04 16:25:14 yamt Exp $ +# $NetBSD: mi,v 1.1723 2012/01/06 14:17:10 drochner Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1938,8 +1938,8 @@ ./usr/include/netinet/tcpip.h comp-c-include ./usr/include/netinet/udp.h comp-c-include ./usr/include/netinet/udp_var.h comp-c-include -./usr/include/netinet6/ah.h comp-c-include -./usr/include/netinet6/esp.h comp-c-include +./usr/include/netinet6/ah.h comp-obsolete obsolete +./usr/include/netinet6/esp.h comp-obsolete obsolete ./usr/include/netinet6/icmp6.h comp-obsolete obsolete ./usr/include/netinet6/in6.h comp-c-include ./usr/include/netinet6/in6_gif.h comp-c-include @@ -1950,7 +1950,7 @@ ./usr/include/netinet6/ip6_mroute.h comp-c-include ./usr/include/netinet6/ip6_var.h comp-c-include ./usr/include/netinet6/ip6protosw.h comp-c-include -./usr/include/netinet6/ipcomp.h comp-c-include +./usr/include/netinet6/ipcomp.h comp-obsolete obsolete ./usr/include/netinet6/ipsec.h comp-c-include ./usr/include/netinet6/mld6_var.h comp-c-include ./usr/include/netinet6/nd6.h comp-c-include @@ -1965,7 +1965,8 @@ ./usr/include/netipsec/ipip_var.h comp-c-include ./usr/include/netipsec/ipsec.h comp-c-include ./usr/include/netipsec/ipsec_var.h comp-c-include -./usr/include/netipsec/keydb.h comp-c-include +./usr/include/netipsec/keydb.h comp-obsolete obsolete +./usr/include/netipsec/keysock.h comp-c-include ./usr/include/netisdn/i4b_cause.h comp-c-include ./usr/include/netisdn/i4b_debug.h comp-c-include ./usr/include/netisdn/i4b_ioctl.h comp-c-include @@ -2002,10 +2003,10 @@ ./usr/include/netiso/tp_user.h comp-c-include ./usr/include/netiso/tp_var.h comp-c-include ./usr/include/netiso/tuba_table.h comp-obsolete obsolete -./usr/include/netkey/key.h comp-c-include -./usr/include/netkey/key_debug.h comp-c-include -./usr/include/netkey/key_var.h comp-c-include -./usr/include/netkey/keydb.h comp-c-include +./usr/include/netkey/key.h comp-obsolete obsolete +./usr/include/netkey/key_debug.h comp-obsolete obsolete +./usr/include/netkey/key_var.h comp-obsolete obsolete +./usr/include/netkey/keydb.h comp-obsolete obsolete ./usr/include/netkey/keysock.h comp-c-include ./usr/include/netkey/keyv2.h comp-obsolete obsolete ./usr/include/netmpls/mpls.h comp-c-include Index: src/sys/netinet6/Makefile diff -u src/sys/netinet6/Makefile:1.7 src/sys/netinet6/Makefile:1.8 --- src/sys/netinet6/Makefile:1.7 Wed Jan 4 15:55:36 2012 +++ src/sys/netinet6/Makefile Fri Jan 6 14:17:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2012/01/04 15:55:36 drochner Exp $ +# $NetBSD: Makefile,v 1.8 2012/01/06 14:17:11 drochner Exp $ INCSDIR= /usr/include/netinet6 @@ -7,7 +7,5 @@ INCS= in6.h in6_gif.h in6_ifattach.h in6 mld6_var.h nd6.h pim6.h pim6_var.h \ raw_ip6.h udp6.h udp6_var.h INCS+= ipsec.h -# XXX ah.h is used by ping6, rest unneeded -INCS+= ah.h esp.h ipcomp.h .include bsd.kinc.mk Index: src/sys/netinet6/ipsec.h diff -u src/sys/netinet6/ipsec.h:1.52 src/sys/netinet6/ipsec.h:1.53 --- src/sys/netinet6/ipsec.h:1.52 Wed Jan 4 15:55:36 2012 +++ src/sys/netinet6/ipsec.h Fri Jan 6 14:17:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.h,v 1.52 2012/01/04 15:55:36 drochner Exp $ */ +/* $NetBSD: ipsec.h,v 1.53 2012/01/06 14:17:11 drochner Exp $ */ /* $KAME: ipsec.h,v 1.51 2001/08/05 04:52:58 itojun Exp $ */ /* @@ -42,10 +42,11 @@ #endif #include net/pfkeyv2.h -#include netkey/keydb.h #ifdef _KERNEL +#include netkey/keydb.h + /* * Security Policy Index * NOTE: Ensure to be same address family and upper layer protocol.
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: drochner Date: Fri Jan 6 14:21:17 UTC 2012 Modified Files: src/usr.bin/netstat: Makefile ipsec.c Added Files: src/usr.bin/netstat: pfkey.c Log Message: split the ipsec.c source file into the pfkey part which is shared with FAST_IPSEC and KAME specific IPSEC statistics To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.bin/netstat/Makefile cvs rdiff -u -r1.15 -r1.16 src/usr.bin/netstat/ipsec.c cvs rdiff -u -r0 -r1.1 src/usr.bin/netstat/pfkey.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/Makefile diff -u src/usr.bin/netstat/Makefile:1.36 src/usr.bin/netstat/Makefile:1.37 --- src/usr.bin/netstat/Makefile:1.36 Tue Aug 16 12:03:31 2011 +++ src/usr.bin/netstat/Makefile Fri Jan 6 14:21:16 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2011/08/16 12:03:31 christos Exp $ +# $NetBSD: Makefile,v 1.37 2012/01/06 14:21:16 drochner Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/12/93 .include bsd.own.mk @@ -7,8 +7,8 @@ USE_FORT?= yes # setgid RUMPPRG=netstat SRCS= atalk.c bpf.c fast_ipsec.c if.c inet.c inet6.c ipsec.c iso.c \ - main.c mbuf.c mroute.c mroute6.c pfsync.c show.c route.c tp_astring.c \ - unix.c vtw.c + main.c mbuf.c mroute.c mroute6.c pfkey.c pfsync.c show.c route.c \ + tp_astring.c unix.c vtw.c .PATH: ${NETBSDSRCDIR}/sys/netiso BINGRP= kmem BINMODE=2555 Index: src/usr.bin/netstat/ipsec.c diff -u src/usr.bin/netstat/ipsec.c:1.15 src/usr.bin/netstat/ipsec.c:1.16 --- src/usr.bin/netstat/ipsec.c:1.15 Sun Apr 12 16:08:37 2009 +++ src/usr.bin/netstat/ipsec.c Fri Jan 6 14:21:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.15 2009/04/12 16:08:37 lukem Exp $ */ +/* $NetBSD: ipsec.c,v 1.16 2012/01/06 14:21:16 drochner Exp $ */ /* $KAME: ipsec.c,v 1.33 2003/07/25 09:54:32 itojun Exp $ */ /* @@ -65,7 +65,7 @@ static char sccsid[] = from: @(#)inet.c 8.4 (Berkeley) 4/20/94; #else #ifdef __NetBSD__ -__RCSID($NetBSD: ipsec.c,v 1.15 2009/04/12 16:08:37 lukem Exp $); +__RCSID($NetBSD: ipsec.c,v 1.16 2012/01/06 14:21:16 drochner Exp $); #endif #endif #endif /* not lint */ @@ -79,7 +79,6 @@ __RCSID($NetBSD: ipsec.c,v 1.15 2009/04 #ifdef IPSEC #include netinet6/ipsec.h -#include netkey/keysock.h #endif #include err.h @@ -130,18 +129,9 @@ static struct val2str ipsec_compnames[] { -1, NULL }, }; -static const char *pfkey_msgtypenames[] = { - reserved, getspi, update, add, delete, - get, acquire, register, expire, flush, - dump, x_promisc, x_pchange, x_spdupdate, x_spdadd, - x_spddelete, x_spdget, x_spdacquire, x_spddump, x_spdflush, - x_spdsetidx, x_spdexpire, x_spddelete2 -}; - static uint64_t ipsecstat[IPSEC_NSTATS]; static void print_ipsecstats(void); -static const char *pfkey_msgtype_names(int); static void ipsec_hist(const u_quad_t *, int, const struct val2str *, size_t, const char *); @@ -240,84 +230,4 @@ ipsec_stats(u_long off, const char *name print_ipsecstats(); } -static const char * -pfkey_msgtype_names(int x) -{ - const int max = - sizeof(pfkey_msgtypenames)/sizeof(pfkey_msgtypenames[0]); - static char buf[20]; - - if (x max pfkey_msgtypenames[x]) - return pfkey_msgtypenames[x]; - snprintf(buf, sizeof(buf), #%d, x); - return buf; -} - -void -pfkey_stats(u_long off, const char *name) -{ - uint64_t pfkeystat[PFKEY_NSTATS]; - int first, type; - - if (use_sysctl) { - size_t size = sizeof(pfkeystat); - - if (sysctlbyname(net.key.stats, pfkeystat, size, - NULL, 0) == -1) - return; - } else { - warnx(%s stats not available via KVM., name); - return; - } - - printf (%s:\n, name); - -#define p(f, m) if (pfkeystat[f] || sflag = 1) \ -printf(m, (unsigned long long)pfkeystat[f], plural(pfkeystat[f])) - - /* userland - kernel */ - p(PFKEY_STAT_OUT_TOTAL, \t%llu request%s sent from userland\n); - p(PFKEY_STAT_OUT_BYTES, \t%llu byte%s sent from userland\n); - for (first = 1, type = 0; type 256; type++) { - if (pfkeystat[PFKEY_STAT_OUT_MSGTYPE + type] == 0) - continue; - if (first) { - printf(\thistogram by message type:\n); - first = 0; - } - printf(\t\t%s: %llu\n, pfkey_msgtype_names(type), - (unsigned long long)pfkeystat[PFKEY_STAT_OUT_MSGTYPE + type]); - } - p(PFKEY_STAT_OUT_INVLEN, \t%llu message%s with invalid length field\n); - p(PFKEY_STAT_OUT_INVVER, \t%llu message%s with invalid version field\n); - p(PFKEY_STAT_OUT_INVMSGTYPE, \t%llu message%s with invalid message type field\n); - p(PFKEY_STAT_OUT_TOOSHORT, \t%llu message%s too short\n); - p(PFKEY_STAT_OUT_NOMEM, \t%llu message%s with memory allocation failure\n); - p(PFKEY_STAT_OUT_DUPEXT, \t%llu message%s with duplicate extension\n); - p(PFKEY_STAT_OUT_INVEXTTYPE, \t%llu message%s with invalid extension type\n); - p(PFKEY_STAT_OUT_INVSATYPE, \t%llu message%s with invalid sa type\n); - p(PFKEY_STAT_OUT_INVADDR, \t%llu message%s with invalid address extension\n); - - /* kernel - userland
CVS commit: src/sys/arch
Module Name:src Committed By: cherry Date: Fri Jan 6 15:15:28 UTC 2012 Modified Files: src/sys/arch/x86/x86: pmap.c src/sys/arch/xen/x86: cpu.c Log Message: Address those pesky DIAGNOSTIC messages. \n Take a performance hit at fork() for not DTRT. \n Note: Only applicable for kernels built with options DIAGNOSTIC \n To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/xen/x86/cpu.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/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.149 src/sys/arch/x86/x86/pmap.c:1.150 --- src/sys/arch/x86/x86/pmap.c:1.149 Fri Dec 30 17:57:49 2011 +++ src/sys/arch/x86/x86/pmap.c Fri Jan 6 15:15:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.149 2011/12/30 17:57:49 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.150 2012/01/06 15:15:27 cherry Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.149 2011/12/30 17:57:49 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.150 2012/01/06 15:15:27 cherry Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -2120,6 +2120,9 @@ pmap_pdp_ctor(void *arg, void *v, int fl for (i = 0; i PDP_SIZE; i++, object += PAGE_SIZE) { (void) pmap_extract(pmap_kernel(), object, pdirpa); /* FIXME: This should use pmap_protect() .. */ +#ifdef DIAGNOSTIC + pmap_kremove(object, PAGE_SIZE); +#endif /* DIAGNOSTIC */ pmap_kenter_pa(object, pdirpa, VM_PROT_READ, 0); pmap_update(pmap_kernel()); /* Index: src/sys/arch/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.75 src/sys/arch/xen/x86/cpu.c:1.76 --- src/sys/arch/xen/x86/cpu.c:1.75 Wed Jan 4 10:30:23 2012 +++ src/sys/arch/xen/x86/cpu.c Fri Jan 6 15:15:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.75 2012/01/04 10:30:23 cherry Exp $ */ +/* $NetBSD: cpu.c,v 1.76 2012/01/06 15:15:28 cherry Exp $ */ /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ /*- @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.75 2012/01/04 10:30:23 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.76 2012/01/06 15:15:28 cherry Exp $); #include opt_ddb.h #include opt_multiprocessor.h @@ -1307,6 +1307,10 @@ pmap_cpu_init_late(struct cpu_info *ci) #endif /* __x86_64__ else PAE */ /* Xen wants R/O */ + /* FIXME: This should use pmap_protect() .. */ +#ifdef DIAGNOSTIC + pmap_kremove((vaddr_t)ci-ci_kpm_pdir, PAGE_SIZE); +#endif /* DIAGNOSTIC */ pmap_kenter_pa((vaddr_t)ci-ci_kpm_pdir, ci-ci_kpm_pdirpa, VM_PROT_READ, 0); @@ -1319,6 +1323,10 @@ pmap_cpu_init_late(struct cpu_info *ci) ci-ci_pae_l3_pdir[3] = xpmap_ptom_masked(ci-ci_kpm_pdirpa) | PG_k | PG_V; /* Mark L3 R/O (Xen wants this) */ +#ifdef DIAGNOSTIC + /* FIXME: This should use pmap_protect() .. */ + pmap_kremove((vaddr_t)ci-ci_pae_l3_pdir, PAGE_SIZE); +#endif /* DIAGNOSTIC */ pmap_kenter_pa((vaddr_t)ci-ci_pae_l3_pdir, ci-ci_pae_l3_pdirpa, VM_PROT_READ, 0);
CVS commit: src
Module Name:src Committed By: joerg Date: Fri Jan 6 15:16:03 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/diff: diff3.c side.c src/gnu/dist/gcc4/libstdc++-v3/include/bits: stl_tree.h src/gnu/dist/gcc4/libstdc++-v3/src: strstream.cc tree.cc src/gnu/dist/groff/src/roff/troff: input.cpp mtsm.cpp node.cpp src/gnu/usr.bin/rcs/ci: ci.c src/gnu/usr.bin/rcs/ident: ident.c src/gnu/usr.bin/rcs/lib: rcsbase.h rcsedit.c rcsgen.c rcsrev.c src/gnu/usr.bin/rcs/rcs: rcs.c src/gnu/usr.bin/rcs/rcsdiff: rcsdiff.c src/gnu/usr.bin/rcs/rlog: rlog.c Log Message: Don't use dangling elses. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/diff/diff3.c \ src/external/gpl2/xcvs/dist/diff/side.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/libstdc++-v3/src/strstream.cc \ src/gnu/dist/gcc4/libstdc++-v3/src/tree.cc cvs rdiff -u -r1.1.1.3 -r1.2 src/gnu/dist/groff/src/roff/troff/input.cpp \ src/gnu/dist/groff/src/roff/troff/node.cpp cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/groff/src/roff/troff/mtsm.cpp cvs rdiff -u -r1.4 -r1.5 src/gnu/usr.bin/rcs/ci/ci.c cvs rdiff -u -r1.5 -r1.6 src/gnu/usr.bin/rcs/ident/ident.c cvs rdiff -u -r1.9 -r1.10 src/gnu/usr.bin/rcs/lib/rcsbase.h \ src/gnu/usr.bin/rcs/lib/rcsedit.c cvs rdiff -u -r1.4 -r1.5 src/gnu/usr.bin/rcs/lib/rcsgen.c cvs rdiff -u -r1.6 -r1.7 src/gnu/usr.bin/rcs/lib/rcsrev.c cvs rdiff -u -r1.6 -r1.7 src/gnu/usr.bin/rcs/rcs/rcs.c cvs rdiff -u -r1.7 -r1.8 src/gnu/usr.bin/rcs/rcsdiff/rcsdiff.c cvs rdiff -u -r1.5 -r1.6 src/gnu/usr.bin/rcs/rlog/rlog.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/gpl2/xcvs/dist/diff/diff3.c diff -u src/external/gpl2/xcvs/dist/diff/diff3.c:1.1.1.1 src/external/gpl2/xcvs/dist/diff/diff3.c:1.2 --- src/external/gpl2/xcvs/dist/diff/diff3.c:1.1.1.1 Tue Apr 7 22:10:10 2009 +++ src/external/gpl2/xcvs/dist/diff/diff3.c Fri Jan 6 15:16:02 2012 @@ -1556,10 +1556,12 @@ undotlines (leading_dot, start, num) { write_output (.\n, 2); if (leading_dot) + { if (num == 1) printf_output (%ds/^\\.//\n, start); else printf_output (%d,%ds/^\\.//\n, start, start + num - 1); + } } /* @@ -1751,10 +1753,12 @@ output_diff3_merge (infile, diff, mappin { c = getc (infile); if (c == EOF) + { if (ferror (infile)) diff3_perror_with_exit (input file); else if (feof (infile)) diff3_fatal (input file shrank); + } cc = c; write_output (cc, 1); } @@ -1805,6 +1809,7 @@ output_diff3_merge (infile, diff, mappin while (0 = --i) while ((c = getc (infile)) != '\n') if (c == EOF) + { if (ferror (infile)) diff3_perror_with_exit (input file); else if (feof (infile)) @@ -1813,6 +1818,7 @@ output_diff3_merge (infile, diff, mappin diff3_fatal (input file shrank); return conflicts_found; } + } } /* Copy rest of common file. */ while ((c = getc (infile)) != EOF || !(ferror (infile) | feof (infile))) Index: src/external/gpl2/xcvs/dist/diff/side.c diff -u src/external/gpl2/xcvs/dist/diff/side.c:1.1.1.1 src/external/gpl2/xcvs/dist/diff/side.c:1.2 --- src/external/gpl2/xcvs/dist/diff/side.c:1.1.1.1 Tue Apr 7 22:10:11 2009 +++ src/external/gpl2/xcvs/dist/diff/side.c Fri Jan 6 15:16:02 2012 @@ -123,6 +123,7 @@ print_half_line (line, indent, out_bound case '\b': if (in_position != 0 --in_position out_bound) + { if (out_position = in_position) /* Add spaces to make up for suppressed tab past out_bound. */ for (; out_position in_position; out_position++) @@ -133,6 +134,7 @@ print_half_line (line, indent, out_bound cc = c; write_output (cc, 1); } + } break; case '\f': Index: src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h diff -u src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h:1.1.1.1 src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h:1.2 --- src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h:1.1.1.1 Thu Apr 20 10:05:44 2006 +++ src/gnu/dist/gcc4/libstdc++-v3/include/bits/stl_tree.h Fri Jan 6 15:16:02 2012 @@ -923,10 +923,12 @@ namespace std } iterator __j = iterator(__y); if (__comp) + { if (__j == begin()) return pairiterator,bool(_M_insert(__x, __y, __v), true); else --__j; + } if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) return pairiterator, bool(_M_insert(__x, __y, __v), true); return pairiterator, bool(__j, false); Index: src/gnu/dist/gcc4/libstdc++-v3/src/strstream.cc diff -u src/gnu/dist/gcc4/libstdc++-v3/src/strstream.cc:1.1.1.1 src/gnu/dist/gcc4/libstdc++-v3/src/strstream.cc:1.2 ---
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Fri Jan 6 20:39:42 UTC 2012 Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: printf()-thunk_printf() since its for debugging and should be printed outside the kernel's printing system. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/usermode/usermode/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.52 src/sys/arch/usermode/usermode/trap.c:1.53 --- src/sys/arch/usermode/usermode/trap.c:1.52 Tue Jan 3 21:28:50 2012 +++ src/sys/arch/usermode/usermode/trap.c Fri Jan 6 20:39:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.52 2012/01/03 21:28:50 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.53 2012/01/06 20:39:42 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.52 2012/01/03 21:28:50 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.53 2012/01/06 20:39:42 reinoud Exp $); #include sys/types.h #include sys/param.h @@ -204,33 +204,33 @@ illegal_instruction_handler(int sig, sig (void *) info-si_addr); #endif #if 0 - printf(SIGILL!\n); - printf(\tsi_signo = %d\n, info-si_signo); - printf(\tsi_errno = %d\n, info-si_errno); - printf(\tsi_code = %d\n, info-si_code); + thunk_printf(SIGILL!\n); + thunk_printf(\tsi_signo = %d\n, info-si_signo); + thunk_printf(\tsi_errno = %d\n, info-si_errno); + thunk_printf(\tsi_code = %d\n, info-si_code); if (info-si_code == ILL_ILLOPC) - printf(\t\tIllegal opcode); + thunk_printf(\t\tIllegal opcode); if (info-si_code == ILL_ILLOPN) - printf(\t\tIllegal operand); + thunk_printf(\t\tIllegal operand); if (info-si_code == ILL_ILLADR) - printf(\t\tIllegal addressing mode); + thunk_printf(\t\tIllegal addressing mode); if (info-si_code == ILL_ILLTRP) - printf(\t\tIllegal trap); + thunk_printf(\t\tIllegal trap); if (info-si_code == ILL_PRVOPC) - printf(\t\tPrivileged opcode); + thunk_printf(\t\tPrivileged opcode); if (info-si_code == ILL_PRVREG) - printf(\t\tPrivileged register); + thunk_printf(\t\tPrivileged register); if (info-si_code == ILL_COPROC) - printf(\t\tCoprocessor error); + thunk_printf(\t\tCoprocessor error); if (info-si_code == ILL_BADSTK) - printf(\t\tInternal stack error); - printf(\tsi_addr = %p\n, info-si_addr); - printf(\tsi_trap = %d\n, info-si_trap); + thunk_printf(\t\tInternal stack error); + thunk_printf(\tsi_addr = %p\n, info-si_addr); + thunk_printf(\tsi_trap = %d\n, info-si_trap); - printf(%p : , info-si_addr); + thunk_printf(%p : , info-si_addr); for (int i = 0; i 10; i++) - printf(%02x , *((uint8_t *) info-si_addr + i)); - printf(\n); + thunk_printf(%02x , *((uint8_t *) info-si_addr + i)); + thunk_printf(\n); #endif l = curlwp;
CVS commit: src/sys/arch/usermode/dev
Module Name:src Committed By: reinoud Date: Fri Jan 6 20:40:51 UTC 2012 Modified Files: src/sys/arch/usermode/dev: ld_thunkbus.c Log Message: Enhance debugging printfs to also report the functionname To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/usermode/dev/ld_thunkbus.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/ld_thunkbus.c diff -u src/sys/arch/usermode/dev/ld_thunkbus.c:1.26 src/sys/arch/usermode/dev/ld_thunkbus.c:1.27 --- src/sys/arch/usermode/dev/ld_thunkbus.c:1.26 Fri Jan 6 14:11:55 2012 +++ src/sys/arch/usermode/dev/ld_thunkbus.c Fri Jan 6 20:40:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_thunkbus.c,v 1.26 2012/01/06 14:11:55 jmcneill Exp $ */ +/* $NetBSD: ld_thunkbus.c,v 1.27 2012/01/06 20:40:51 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ld_thunkbus.c,v 1.26 2012/01/06 14:11:55 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: ld_thunkbus.c,v 1.27 2012/01/06 20:40:51 reinoud Exp $); #include sys/param.h #include sys/proc.h @@ -161,7 +161,8 @@ ld_thunkbus_complete(void *arg) goto done; } - //printf(ld: %s %u @ %lld - %p (flags 0x%08x)\n, bp-b_flags B_READ ? read : write, + //printf(%s: %s %u @ %lld - %p (flags 0x%08x)\n, __func__, + //bp-b_flags B_READ ? read : write, //(unsigned int)bp-b_bcount, (long long)offset, bp-b_data, bp-b_flags); /* read/write the request */ @@ -172,7 +173,7 @@ ld_thunkbus_complete(void *arg) } //if (ret == -1) - // printf(ld: errno = %d\n, thunk_geterrno()); + // printf(%s: errno = %d\n, __func__, thunk_geterrno()); /* setup return params */ if ((ret = 0) (ret == bp-b_bcount)) {
CVS commit: src/distrib/utils/sysinst/arch/mac68k
Module Name:src Committed By: riz Date: Fri Jan 6 20:41:28 UTC 2012 Modified Files: src/distrib/utils/sysinst/arch/mac68k: md.c Log Message: Use getfslabelname() instead of trying to access fstypenames[] directly. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/distrib/utils/sysinst/arch/mac68k/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/mac68k/md.c diff -u src/distrib/utils/sysinst/arch/mac68k/md.c:1.60 src/distrib/utils/sysinst/arch/mac68k/md.c:1.61 --- src/distrib/utils/sysinst/arch/mac68k/md.c:1.60 Fri Nov 4 11:27:03 2011 +++ src/distrib/utils/sysinst/arch/mac68k/md.c Fri Jan 6 20:41:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.60 2011/11/04 11:27:03 martin Exp $ */ +/* $NetBSD: md.c,v 1.61 2012/01/06 20:41:28 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -336,7 +336,7 @@ md_make_bsd_partitions(void) (void)fprintf (f, \t:p%c#%d:o%c#%d:t%c=%s:, 'a'+i, bsdlabel[i].pi_size, 'a'+i, bsdlabel[i].pi_offset, - 'a'+i, fstypenames[bsdlabel[i].pi_fstype]); + 'a'+i, getfslabelname(bsdlabel[i].pi_fstype)); if (bsdlabel[i].pi_fstype == FS_BSDFFS) (void)fprintf (f, b%c#%d:f%c#%d, 'a'+i, bsdlabel[i].pi_fsize * bsdlabel[i].pi_frag,
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: reinoud Date: Fri Jan 6 20:44:57 UTC 2012 Modified Files: src/sys/arch/usermode/conf: GENERIC.i386 Makefile.usermode src/sys/arch/usermode/usermode: machdep.c Added Files: src/sys/arch/usermode/conf: GENERIC.amd64 src/sys/arch/usermode/usermode: machdep.i386.c Log Message: Split machdep.c into a MI part and a MD part. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/usermode/conf/GENERIC.amd64 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/conf/GENERIC.i386 cvs rdiff -u -r1.28 -r1.29 src/sys/arch/usermode/conf/Makefile.usermode cvs rdiff -u -r1.48 -r1.49 src/sys/arch/usermode/usermode/machdep.c cvs rdiff -u -r0 -r1.1 src/sys/arch/usermode/usermode/machdep.i386.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/conf/GENERIC.i386 diff -u src/sys/arch/usermode/conf/GENERIC.i386:1.2 src/sys/arch/usermode/conf/GENERIC.i386:1.3 --- src/sys/arch/usermode/conf/GENERIC.i386:1.2 Tue Jan 3 21:28:50 2012 +++ src/sys/arch/usermode/conf/GENERIC.i386 Fri Jan 6 20:44:57 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.i386,v 1.2 2012/01/03 21:28:50 reinoud Exp $ +# $NetBSD: GENERIC.i386,v 1.3 2012/01/06 20:44:57 reinoud Exp $ machine usermode include arch/usermode/conf/GENERIC.common @@ -9,9 +9,11 @@ no options EXEC_ELF64 options TEXTADDR=0x4000 # 1 Gb `phys ram' / total space options KVMSIZE= 0x1000 # KVM space reserved in VM map, 256 Mb options NKMEMPAGES_MAX=32768 # 128 Mb max + +makeoptions USERMODE_CPU=i386 makeoptions COPTS+=-m32 makeoptions LD=ld -melf_i386 #options INCLUDE_CONFIG_FILE -#ident GENERIC32-$Revision: 1.2 $ +#ident GENERIC32-$Revision: 1.3 $ Index: src/sys/arch/usermode/conf/Makefile.usermode diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.28 src/sys/arch/usermode/conf/Makefile.usermode:1.29 --- src/sys/arch/usermode/conf/Makefile.usermode:1.28 Thu Jan 5 12:12:58 2012 +++ src/sys/arch/usermode/conf/Makefile.usermode Fri Jan 6 20:44:57 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.usermode,v 1.28 2012/01/05 12:12:58 jmcneill Exp $ +# $NetBSD: Makefile.usermode,v 1.29 2012/01/06 20:44:57 reinoud Exp $ OPT_CPU_HOST= %CPU_HOST% .if !empty(OPT_CPU_HOST) @@ -53,6 +53,9 @@ MD_OBJS= thunk.o MD_CFILES= ${USERMODE}/usermode/thunk.c MD_SFILES= +MD_OBJS+= machdep.${USERMODE_CPU}.o +MD_CFILES+= ${USERMODE}/usermode/machdep.${USERMODE_CPU}.c + ## ## (5) link settings ## @@ -76,6 +79,8 @@ NVFLAGS= -n .BEGIN: @rm -f i386 \ ln -s $S/arch/i386/include i386 + @rm -f amd64 \ + ln -s $S/arch/amd64/include amd64 .endif thunk.d: ${USERMODE}/usermode/thunk.c Index: src/sys/arch/usermode/usermode/machdep.c diff -u src/sys/arch/usermode/usermode/machdep.c:1.48 src/sys/arch/usermode/usermode/machdep.c:1.49 --- src/sys/arch/usermode/usermode/machdep.c:1.48 Tue Jan 3 10:53:46 2012 +++ src/sys/arch/usermode/usermode/machdep.c Fri Jan 6 20:44:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.48 2012/01/03 10:53:46 reinoud Exp $ */ +/* $NetBSD: machdep.c,v 1.49 2012/01/06 20:44:57 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -37,7 +37,7 @@ #include opt_memsize.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.48 2012/01/03 10:53:46 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.49 2012/01/06 20:44:57 reinoud Exp $); #include sys/types.h #include sys/systm.h @@ -226,304 +226,3 @@ mm_md_physacc(paddr_t pa, vm_prot_t prog return 0; } - -#ifdef __i386__ - -#if 0 -static void dump_regs(register_t *reg);; - -static void -dump_regs(register_t *reg) -{ - int i; - - /* register dump before call */ - const char *name[] = {GS, FS, ES, DS, EDI, ESI, EBP, ESP, - EBX, EDX, ECX, EAX, TRAPNO, ERR, EIP, CS, EFL, - UESP, SS}; - - for (i =0; i 19; i++) - printf(reg[%02d] (%6s) = %PRIx32\n, i, name[i], (uint32_t) reg[i]); -} -#endif - - -/* from sys/arch/i386/include/frame.h : KEEP IN SYNC */ - -/* - * New-style signal frame - */ -struct sigframe_siginfo { - int sf_ra; /* return address for handler */ - int sf_signum; /* signum argument for handler */ - siginfo_t *sf_sip; /* sip argument for handler */ - ucontext_t *sf_ucp; /* ucp argument for handler */ - siginfo_t sf_si; /* actual saved siginfo */ - ucontext_t sf_uc; /* actual saved ucontext */ -}; - - -/* - * mcontext extensions to handle signal delivery. - */ -#define _UC_SETSTACK 0x0001 -#define _UC_CLRSTACK 0x0002 -#define _UC_VM 0x0004 -#define _UC_TLSBASE 0x0008 - - -void -sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask) -{ - struct lwp *l = curlwp; - struct proc *p = l-l_proc; - struct pcb *pcb = lwp_getpcb(l); - struct sigacts *ps = p-p_sigacts; - struct sigframe_siginfo *fp, frame; - int sig = ksi-ksi_signo; - sig_t catcher = SIGACTION(p, sig).sa_handler; - ucontext_t *ucp = pcb-pcb_userret_ucp; -
CVS commit: src/distrib/utils/sysinst/arch/sandpoint
Module Name:src Committed By: riz Date: Fri Jan 6 20:52:43 UTC 2012 Modified Files: src/distrib/utils/sysinst/arch/sandpoint: md.c Log Message: Don't use snprintf() to format, when run_program() will do it nicely on its own. Suggested by joerg. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/distrib/utils/sysinst/arch/sandpoint/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/sandpoint/md.c diff -u src/distrib/utils/sysinst/arch/sandpoint/md.c:1.37 src/distrib/utils/sysinst/arch/sandpoint/md.c:1.38 --- src/distrib/utils/sysinst/arch/sandpoint/md.c:1.37 Fri Nov 4 11:27:04 2011 +++ src/distrib/utils/sysinst/arch/sandpoint/md.c Fri Jan 6 20:52:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.37 2011/11/04 11:27:04 martin Exp $ */ +/* $NetBSD: md.c,v 1.38 2012/01/06 20:52:43 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -168,7 +168,6 @@ md_cleanup_install(void) { #ifndef DEBUG int new_speed; - char sed_cmd[64]; enable_rc_conf(); @@ -187,9 +186,8 @@ md_cleanup_install(void) new_speed = 0; if (new_speed != 0) { - snprintf(sed_cmd, 64, sed -an -e 's/115200/%d/;H;$!d;g;w + run_program(RUN_CHROOT, sed -an -e 's/115200/%d/;H;$!d;g;w /etc/ttys' /etc/ttys, new_speed); - run_program(RUN_CHROOT, sed_cmd); } #endif }
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Fri Jan 6 20:55:29 UTC 2012 Modified Files: src/sys/arch/hppa/hppa: pmap.c src/sys/arch/hppa/include: pmap.h Log Message: Track if a page has an executable mapping and flush the icache (and dcache) appropriately. Fixes the lang/python26 build on my C3700 (PA8700) and chuq's J6700 with PA8500. Thanks to chuq for ideas and help with this. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/hppa/hppa/pmap.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hppa/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.96 src/sys/arch/hppa/hppa/pmap.c:1.97 --- src/sys/arch/hppa/hppa/pmap.c:1.96 Fri Jan 6 08:54:05 2012 +++ src/sys/arch/hppa/hppa/pmap.c Fri Jan 6 20:55:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.96 2012/01/06 08:54:05 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.97 2012/01/06 20:55:28 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.96 2012/01/06 08:54:05 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.97 2012/01/06 20:55:28 skrll Exp $); #include opt_cputype.h @@ -209,6 +209,7 @@ static inline struct pv_entry *pmap_pv_r static inline void pmap_flush_page(struct vm_page *, bool); static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); +static void pmap_syncicache_page(struct vm_page *, pmap_t, vaddr_t); static void pmap_page_physload(paddr_t, paddr_t); @@ -228,7 +229,8 @@ void pmap_dump_table(pa_space_t, vaddr_t void pmap_dump_pv(paddr_t); #endif -#define IS_IOPAGE_P(pa) ((pa) = HPPA_IOBEGIN) +#define IS_IOPAGE_P(pa) ((pa) = HPPA_IOBEGIN) +#define IS_PVFEXEC_P(f) (((f) PVF_EXEC) != 0) /* un-invert PVF_REF */ #define pmap_pvh_attrs(a) \ @@ -601,6 +603,14 @@ pmap_pv_remove(struct vm_page *pg, pmap_ } } + if (IS_PVFEXEC_P(md-pvh_attrs)) { + if (md-pvh_list == NULL) { + md-pvh_attrs = ~PVF_EXEC; + } else { + pmap_syncicache_page(pg, pmap, va); + } + } + return (pv); } @@ -1167,6 +1177,31 @@ pmap_reference(pmap_t pmap) mutex_exit(pmap-pm_lock); } + +void +pmap_syncicache_page(struct vm_page *pg, pmap_t pm, vaddr_t va) +{ + struct vm_page_md * const md = VM_PAGE_TO_MD(pg); + struct pv_entry *pve = md-pvh_list; + + for (; pve; pve = pve-pv_next) { + pmap_t fpm = pve-pv_pmap; + vaddr_t fva = pve-pv_va PV_VAMASK; + pt_entry_t pte = pmap_vp_find(fpm, fva); + + if ((pte PTE_PROT(TLB_DIRTY)) == 0) + continue; + + /* Don't attempt to use the mapping we're adding */ + if (pm == fpm va == fva) + continue; + + fdcache(fpm-pm_space, fva, PAGE_SIZE); + ficache(fpm-pm_space, fva, PAGE_SIZE); + break; + } +} + /* * pmap_enter(pmap, va, pa, prot, flags) * Create a translation for the virtual address (va) to the physical @@ -1179,7 +1214,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd { volatile pt_entry_t *pde; pt_entry_t pte; - struct vm_page *pg, *ptp = NULL; + struct vm_page *pg = NULL, *ptp = NULL; struct pv_entry *pve = NULL; bool wired = (flags PMAP_WIRED) != 0; @@ -1213,13 +1248,13 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd else if (!wired (pte PTE_PROT(TLB_WIRED))) pmap-pm_stats.wired_count--; + pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte)); if (PTE_PAGE(pte) == pa) { DPRINTF(PDB_FOLLOW|PDB_ENTER, (%s: same page\n, __func__)); goto enter; } - pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte)); if (pg != NULL) { pve = pmap_pv_remove(pg, pmap, va); @@ -1257,6 +1292,17 @@ enter: /* preserve old ref mod */ pte = pa | PTE_PROT(pmap_prot(pmap, prot)) | (pte PTE_PROT(TLB_UNCACHEABLE|TLB_DIRTY|TLB_REFTRAP)); + + if (pg != NULL) { + struct vm_page_md * const md = VM_PAGE_TO_MD(pg); + + if ((pte PTE_PROT(TLB_EXECUTE)) != 0 + !IS_PVFEXEC_P(md-pvh_attrs)) { + pmap_syncicache_page(pg, pmap, va); + md-pvh_attrs |= PVF_EXEC; + } + } + if (IS_IOPAGE_P(pa)) pte |= PTE_PROT(TLB_UNCACHEABLE); if (wired) @@ -1380,9 +1426,11 @@ pmap_write_protect(pmap_t pmap, vaddr_t if (pg != NULL) { struct vm_page_md * const md = VM_PAGE_TO_MD(pg); + md-pvh_attrs |= pmap_pvh_attrs(pte); } + /* Add TLB_EXECUTE if PVF_EXEC ??? */ pmap_pte_flush(pmap, sva, pte); pte = ~PTE_PROT(TLB_AR_MASK); pte |= pteprot; @@ -1401,8 +1449,10 @@ pmap_page_remove(struct vm_page *pg) DPRINTF(PDB_FOLLOW|PDB_PV, (%s(%p)\n, __func__, pg)); - if (md-pvh_list == NULL) + if (md-pvh_list == NULL) { + KASSERT((md-pvh_attrs PVF_EXEC) == 0); return; + } pvp = md-pvh_list; for (pve = md-pvh_list; pve; pve = npve) { @@ -1438,6 +1488,7 @@ pmap_page_remove(struct vm_page *pg) } PMAP_UNLOCK(pmap); } + md-pvh_attrs = ~PVF_EXEC; *pvp = NULL; DPRINTF(PDB_FOLLOW|PDB_PV, (%s: leaving\n,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Jan 6 22:14:05 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: s/aprint_verbose/aprint_debug/ To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/autoconf.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/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.40 src/sys/arch/hp700/hp700/autoconf.c:1.41 --- src/sys/arch/hp700/hp700/autoconf.c:1.40 Mon Dec 12 19:03:09 2011 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Jan 6 22:14:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $ */ +/* $NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -477,7 +477,7 @@ hppa_walkbus(struct confargs *ca) if (ca-ca_hpabase == 0) return; - aprint_verbose( Walking bus at HPA 0x%lx\n, ca-ca_hpabase); + aprint_debug( Walking bus at HPA 0x%lx\n, ca-ca_hpabase); for (i = 0; i ca-ca_nmodules; i++) { int error; @@ -500,12 +500,12 @@ hppa_walkbus(struct confargs *ca) if (error 0) continue; - aprint_verbose( HPA 0x%lx[0x%x], nhm.hm_hpa, + aprint_debug( HPA 0x%lx[0x%x], nhm.hm_hpa, nhm.hm_hpasz); TAILQ_FOREACH(hm, hppa_pdcmodule_list, hm_link) { if (nhm.hm_hpa == hm-hm_hpa) { -aprint_verbose( found by firmware\n); +aprint_debug( found by firmware\n); break; } } @@ -516,7 +516,7 @@ hppa_walkbus(struct confargs *ca) /* Expect PDC to report devices of the following types */ if (nhm.hm_type.iodc_type == HPPA_TYPE_FIO) { - aprint_verbose( expected to be missing\n); + aprint_debug( expected to be missing\n); continue; } @@ -568,7 +568,7 @@ pdc_scanbus(device_t self, struct confar } else nca.ca_naddrs = hm-hm_naddrs; - aprint_verbose( ADDRS[%d/%d]: , nca.ca_naddrs, + aprint_debug( ADDRS[%d/%d]: , nca.ca_naddrs, hm-hm_modindex); KASSERT(hm-hm_modindex != -1); @@ -583,31 +583,31 @@ pdc_scanbus(device_t self, struct confar nca.ca_addrs[ia].size = pdc_find_addr.size PGSHIFT; -aprint_verbose( 0x%lx[0x%x], +aprint_debug( 0x%lx[0x%x], nca.ca_addrs[ia].addr, nca.ca_addrs[ia].size); } - aprint_verbose(\n); + aprint_debug(\n); } - aprint_verbose( HPA 0x%lx[0x%x]\n, nca.ca_hpa, + aprint_debug( HPA 0x%lx[0x%x]\n, nca.ca_hpa, nca.ca_hpasz); snprintb(buf, sizeof(buf), PZF_BITS, nca.ca_dp.dp_flags); - aprint_verbose( probing: flags %s , buf); + aprint_debug( probing: flags %s , buf); if (nca.ca_dp.dp_mod =0) { int n; - aprint_verbose( path ); + aprint_debug( path ); for (n = 0; n 6; n++) { if (nca.ca_dp.dp_bc[n] = 0) - aprint_verbose(%d/, + aprint_debug(%d/, nca.ca_dp.dp_bc[n]); } - aprint_verbose(%d, nca.ca_dp.dp_mod); + aprint_debug(%d, nca.ca_dp.dp_mod); } - aprint_verbose( type %x sv %x\n, + aprint_debug( type %x sv %x\n, nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model); nca.ca_irq = HP700CF_IRQ_UNDEF; @@ -707,12 +707,12 @@ hppa_pdcmodule_create(struct hppa_pdcmod if (hm-hm_dp.dp_mod = 0) { int n; - aprint_verbose( %s device at path , who); + aprint_debug( %s device at path , who); for (n = 0; n 6; n++) { if (hm-hm_dp.dp_bc[n] = 0) -aprint_verbose(%d/, hm-hm_dp.dp_bc[n]); +aprint_debug(%d/, hm-hm_dp.dp_bc[n]); } - aprint_verbose(%d addrs %d\n, hm-hm_dp.dp_mod, + aprint_debug(%d addrs %d\n, hm-hm_dp.dp_mod, hm-hm_naddrs); }
CVS commit: src/lib/libcurses
Module Name:src Committed By: christos Date: Fri Jan 6 22:20:54 UTC 2012 Modified Files: src/lib/libcurses: getstr.c Log Message: PR/45791: Nat Sloss: getnstr erase character weirdness Fix processing of backspace erase char and char left. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libcurses/getstr.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/libcurses/getstr.c diff -u src/lib/libcurses/getstr.c:1.20 src/lib/libcurses/getstr.c:1.21 --- src/lib/libcurses/getstr.c:1.20 Mon May 28 11:01:55 2007 +++ src/lib/libcurses/getstr.c Fri Jan 6 17:20:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: getstr.c,v 1.20 2007/05/28 15:01:55 blymn Exp $ */ +/* $NetBSD: getstr.c,v 1.21 2012/01/06 22:20:54 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -35,10 +35,11 @@ #if 0 static char sccsid[] = @(#)getstr.c 8.2 (Berkeley) 5/4/94; #else -__RCSID($NetBSD: getstr.c,v 1.20 2007/05/28 15:01:55 blymn Exp $); +__RCSID($NetBSD: getstr.c,v 1.21 2012/01/06 22:20:54 christos Exp $); #endif #endif/* not lint */ +#include ctype.h #include curses.h #include curses_private.h @@ -161,12 +162,12 @@ int __wgetnstr(WINDOW *win, char *str, int n) { char *ostr, ec, kc; - int c, oldx, remain; + int c, xpos, oldx, remain; ostr = str; ec = erasechar(); kc = killchar(); - oldx = win-curx; + xpos = oldx = win-curx; _DIAGASSERT(n == -1 || n 1); remain = n - 1; @@ -182,17 +183,23 @@ __wgetnstr(WINDOW *win, char *str, int n *str = '\0'; if (str != ostr) { if ((char) c == ec) { - mvwaddch(win, win-cury, win-curx, - ' '); - wmove(win, win-cury, win-curx - 1); + mvwaddch(win, win-cury, xpos, ' '); + if (xpos oldx) + mvwaddch(win, win-cury, + xpos - 1, ' '); + if (win-curx xpos - 1) + wmove(win, win-cury, xpos - 1); + xpos--; } if (c == KEY_BACKSPACE || c == KEY_LEFT) { /* getch() displays the key sequence */ - mvwaddch(win, win-cury, win-curx - 1, + mvwaddch(win, win-cury, win-curx, ' '); - mvwaddch(win, win-cury, win-curx - 2, + mvwaddch(win, win-cury, win-curx - 1, ' '); - wmove(win, win-cury, win-curx - 1); + if (win-curx xpos) + wmove(win, win-cury, xpos - 1); + xpos--; } str--; if (n != -1) { @@ -200,11 +207,12 @@ __wgetnstr(WINDOW *win, char *str, int n remain++; } } else {/* str == ostr */ -if (c == KEY_BACKSPACE || c == KEY_LEFT) - /* getch() displays the other keys */ +/* getch() displays the other keys */ +if (win-curx oldx) mvwaddch(win, win-cury, win-curx - 1, ' '); wmove(win, win-cury, oldx); +xpos = oldx; } } else if (c == kc) { *str = '\0'; @@ -229,15 +237,20 @@ __wgetnstr(WINDOW *win, char *str, int n wmove(win, win-cury, oldx); } else if (c = KEY_MIN c = KEY_MAX) { /* getch() displays these characters */ - mvwaddch(win, win-cury, win-curx - 1, ' '); - wmove(win, win-cury, win-curx - 1); + mvwaddch(win, win-cury, xpos, ' '); + wmove(win, win-cury, xpos); } else { if (remain) { +if (iscntrl((unsigned char)c)) { + mvwaddch(win, win-cury, xpos, ' '); + wmove(win, win-cury, xpos + 1); +} str++; +xpos++; remain--; } else { -mvwaddch(win, win-cury, win-curx - 1, ' '); -wmove(win, win-cury, win-curx - 1); +mvwaddch(win, win-cury, xpos, ' '); +wmove(win, win-cury, xpos - 1); } } }
CVS commit: src/external/mit/xorg/lib/xcb-util
Module Name:src Committed By: mrg Date: Sat Jan 7 02:07:59 UTC 2012 Modified Files: src/external/mit/xorg/lib/xcb-util: Makefile xcb-util.mk src/external/mit/xorg/lib/xcb-util/icccm: Makefile src/external/mit/xorg/lib/xcb-util/image: Makefile src/external/mit/xorg/lib/xcb-util/property: Makefile src/external/mit/xorg/lib/xcb-util/render-util: Makefile Log Message: - reorder the SUBDIR list to have correct .WAIT-based dependancies. - fix the handling of subdir additional LIBDPLIBS so they're present when bsd.lib.mk is loaded. fixes missing shlib links relative to what the normal package does. (noted by wiz.) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/xcb-util/Makefile \ src/external/mit/xorg/lib/xcb-util/xcb-util.mk cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/xcb-util/icccm/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/xcb-util/image/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/xcb-util/property/Makefile cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/lib/xcb-util/render-util/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/xcb-util/Makefile diff -u src/external/mit/xorg/lib/xcb-util/Makefile:1.2 src/external/mit/xorg/lib/xcb-util/Makefile:1.3 --- src/external/mit/xorg/lib/xcb-util/Makefile:1.2 Sun Jul 18 10:58:07 2010 +++ src/external/mit/xorg/lib/xcb-util/Makefile Sat Jan 7 02:07:58 2012 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2010/07/18 10:58:07 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2012/01/07 02:07:58 mrg Exp $ -SUBDIR= atom property event aux .WAIT \ - reply image icccm keysyms render-util +SUBDIR= reply keysyms render-util \ + atom event aux .WAIT property .WAIT \ + image icccm .include bsd.subdir.mk Index: src/external/mit/xorg/lib/xcb-util/xcb-util.mk diff -u src/external/mit/xorg/lib/xcb-util/xcb-util.mk:1.2 src/external/mit/xorg/lib/xcb-util/xcb-util.mk:1.3 --- src/external/mit/xorg/lib/xcb-util/xcb-util.mk:1.2 Sun May 15 21:19:20 2011 +++ src/external/mit/xorg/lib/xcb-util/xcb-util.mk Sat Jan 7 02:07:58 2012 @@ -1,4 +1,4 @@ -# $NetBSD: xcb-util.mk,v 1.2 2011/05/15 21:19:20 christos Exp $ +# $NetBSD: xcb-util.mk,v 1.3 2012/01/07 02:07:58 mrg Exp $ # define XCBUTIL to something before including this @@ -10,7 +10,8 @@ CPPFLAGS+= -DHAVE_VASPRINTF LIBDPLIBS=\ xcb ${.CURDIR}/../../libxcb/libxcb \ Xau ${.CURDIR}/../../libXau \ - Xdmcp ${.CURDIR}/../../libXdmcp + Xdmcp ${.CURDIR}/../../libXdmcp \ + ${XCBUTIL_EXTRA_DPLIBS} SHLIB_MAJOR?= 0 SHLIB_MINOR?= 0 Index: src/external/mit/xorg/lib/xcb-util/icccm/Makefile diff -u src/external/mit/xorg/lib/xcb-util/icccm/Makefile:1.1 src/external/mit/xorg/lib/xcb-util/icccm/Makefile:1.2 --- src/external/mit/xorg/lib/xcb-util/icccm/Makefile:1.1 Sun Jul 18 07:01:38 2010 +++ src/external/mit/xorg/lib/xcb-util/icccm/Makefile Sat Jan 7 02:07:58 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/07/18 07:01:38 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2012/01/07 02:07:58 mrg Exp $ XCBUTIL= icccm @@ -6,13 +6,13 @@ SRCS= icccm.c SHLIB_MAJOR= 1 -.include ../xcb-util.mk - -LIBDPLIBS+=\ +XCBUTIL_EXTRA_DPLIBS+=\ xcb-atom ${.CURDIR}/../atom \ xcb-property ${.CURDIR}/../property \ xcb-event ${.CURDIR}/../event +.include ../xcb-util.mk + CPPFLAGS+= -I${X11SRCDIR.xcb-util}/atom CPPFLAGS+= -I${X11SRCDIR.xcb-util}/property CPPFLAGS+= -I${X11SRCDIR.xcb-util}/event Index: src/external/mit/xorg/lib/xcb-util/image/Makefile diff -u src/external/mit/xorg/lib/xcb-util/image/Makefile:1.2 src/external/mit/xorg/lib/xcb-util/image/Makefile:1.3 --- src/external/mit/xorg/lib/xcb-util/image/Makefile:1.2 Thu Aug 11 23:15:39 2011 +++ src/external/mit/xorg/lib/xcb-util/image/Makefile Sat Jan 7 02:07:58 2012 @@ -1,16 +1,16 @@ -# $NetBSD: Makefile,v 1.2 2011/08/11 23:15:39 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2012/01/07 02:07:58 mrg Exp $ XCBUTIL= image SRCS= \ xcb_image.c -.include ../xcb-util.mk - -LIBDPLIBS+=\ +XCBUTIL_EXTRA_DPLIBS+=\ xcb-shm ${.CURDIR}/../../libxcb/shm \ xcb-aux ${.CURDIR}/../aux +.include ../xcb-util.mk + CPPFLAGS+= -I${X11SRCDIR.xcb-util}/aux CWARNFLAGS.clang+= -Wno-return-type Index: src/external/mit/xorg/lib/xcb-util/property/Makefile diff -u src/external/mit/xorg/lib/xcb-util/property/Makefile:1.1 src/external/mit/xorg/lib/xcb-util/property/Makefile:1.2 --- src/external/mit/xorg/lib/xcb-util/property/Makefile:1.1 Sun Jul 18 07:01:39 2010 +++ src/external/mit/xorg/lib/xcb-util/property/Makefile Sat Jan 7 02:07:58 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/07/18 07:01:39 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2012/01/07 02:07:58 mrg Exp $ XCBUTIL= property @@ -6,9 +6,9 @@ SRCS= property.c SHLIB_MAJOR= 1 -.include ../xcb-util.mk - -LIBDPLIBS+=\ +XCBUTIL_EXTRA_DPLIBS+=\ xcb-event ${.CURDIR}/../event +.include
CVS commit: othersrc/external/bsd/vmdk
Module Name:othersrc Committed By: agc Date: Sat Jan 7 03:11:15 UTC 2012 Update of /cvsroot/othersrc/external/bsd/vmdk In directory ivanova.netbsd.org:/tmp/cvs-serv11595 Log Message: initial import of vmdk, a library and program to make and list VMDK images - currently supports monolithicSparse and twoGbMaxExtentSparse types of VMDK files. Status: Vendor Tag: CROOKS Release Tags: vmdk-base N othersrc/external/bsd/vmdk/Makefile N othersrc/external/bsd/vmdk/dist/Makefile N othersrc/external/bsd/vmdk/dist/TODO N othersrc/external/bsd/vmdk/dist/libvmdk.3 N othersrc/external/bsd/vmdk/dist/libvmdk.c N othersrc/external/bsd/vmdk/dist/main.c N othersrc/external/bsd/vmdk/dist/vmdk.8 N othersrc/external/bsd/vmdk/dist/vmdk.h N othersrc/external/bsd/vmdk/lib/Makefile N othersrc/external/bsd/vmdk/lib/shlib_version N othersrc/external/bsd/vmdk/usr.sbin/Makefile No conflicts created by this import
CVS commit: [netbsd-5-1] src
Module Name:src Committed By: snj Date: Sat Jan 7 03:55:09 UTC 2012 Modified Files: src/gnu/usr.bin/groff/tmac [netbsd-5-1]: mdoc.local src/sys/sys [netbsd-5-1]: param.h Added Files: src/doc [netbsd-5-1]: CHANGES-5.1.2 Log Message: 5.1.1_PATCH To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-5.1.2 cvs rdiff -u -r1.43.4.15.2.2 -r1.43.4.15.2.3 \ src/gnu/usr.bin/groff/tmac/mdoc.local cvs rdiff -u -r1.330.4.15.2.2 -r1.330.4.15.2.3 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.2 src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.3 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.2 Tue Jan 3 05:31:08 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Sat Jan 7 03:55:08 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.43.4.15.2.2 2012/01/03 05:31:08 snj Exp $ +.\ $NetBSD: mdoc.local,v 1.43.4.15.2.3 2012/01/07 03:55:08 snj Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\ Default .Os value -.ds doc-operating-system NetBSD\~5.1.1 +.ds doc-operating-system NetBSD\~5.1.1_PATCH .\ Default footer operating system value -.ds doc-default-operating-system NetBSD\~5.1.1 +.ds doc-default-operating-system NetBSD\~5.1.1_PATCH .\ Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.330.4.15.2.2 src/sys/sys/param.h:1.330.4.15.2.3 --- src/sys/sys/param.h:1.330.4.15.2.2 Tue Jan 3 05:31:08 2012 +++ src/sys/sys/param.h Sat Jan 7 03:55:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.330.4.15.2.2 2012/01/03 05:31:08 snj Exp $ */ +/* $NetBSD: param.h,v 1.330.4.15.2.3 2012/01/07 03:55:08 snj Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 50100 /* NetBSD 5.1.1 */ +#define __NetBSD_Version__ 50100 /* NetBSD 5.1.1_PATCH */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) = __NetBSD_Version__) Added files: Index: src/doc/CHANGES-5.1.2 diff -u /dev/null src/doc/CHANGES-5.1.2:1.1.2.1 --- /dev/null Sat Jan 7 03:55:09 2012 +++ src/doc/CHANGES-5.1.2 Sat Jan 7 03:55:08 2012 @@ -0,0 +1,11 @@ +# $NetBSD: CHANGES-5.1.2,v 1.1.2.1 2012/01/07 03:55:08 snj Exp $ + +A complete list of changes from the NetBSD 5.1.1 release to the NetBSD 5.1.2 +release: + +gnu/usr.bin/groff/tmac/mdoc.local patched by hand +sys/sys/param.h patched by hand + + Welcome to 5.1.1_PATCH. + [snj] +