CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Wed Mar 10 06:57:23 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: db_interface.c locore.s pmap.c Log Message: XXX: workaround we'd like to remove when pmap / uvm locking is cleaned up: - rename pseg_get() and pseg_set() to pseg_get_real() and pseg_set_real(). - if USE_LOCKSAFE_PSEG_GETSET is defined, which it current is by default, define pseg_[gs]et() in terms of functions that take a new pseg_lock mutex at IPL_VM while calling into the real functions. this seems to avoid the pseg_set() crashes we've seen: 1 - spare needed, when pseg_get() just worked for this pmap 2 - the 2rd ldxa via ASI_PHYS_CACHED in pseg_set() loads garbage into %o4, and causes the 3rd ldxa to fault To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/sparc64/sparc64/db_interface.c cvs rdiff -u -r1.326 -r1.327 src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.258 -r1.259 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/db_interface.c diff -u src/sys/arch/sparc64/sparc64/db_interface.c:1.123 src/sys/arch/sparc64/sparc64/db_interface.c:1.124 --- src/sys/arch/sparc64/sparc64/db_interface.c:1.123 Sat Mar 6 08:08:29 2010 +++ src/sys/arch/sparc64/sparc64/db_interface.c Wed Mar 10 06:57:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.123 2010/03/06 08:08:29 mrg Exp $ */ +/* $NetBSD: db_interface.c,v 1.124 2010/03/10 06:57:22 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.123 2010/03/06 08:08:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.124 2010/03/10 06:57:22 mrg Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -650,7 +650,8 @@ } } -int64_t pseg_get(struct pmap *, vaddr_t); +/* XXX no locking; shouldn't matter */ +int64_t pseg_get_real(struct pmap *, vaddr_t); void db_dump_pmap(struct pmap *pm) @@ -706,7 +707,7 @@ if (have_addr) { /* lookup an entry for this VA */ - if ((data = pseg_get(pmap_kernel(), (vaddr_t)addr))) { + if ((data = pseg_get_real(pmap_kernel(), (vaddr_t)addr))) { db_printf("pmap_kernel(%p)->pm_segs[%lx][%lx][%lx]=>%qx\n", (void *)(uintptr_t)addr, (u_long)va_to_seg(addr), (u_long)va_to_dir(addr), (u_long)va_to_pte(addr), Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.326 src/sys/arch/sparc64/sparc64/locore.s:1.327 --- src/sys/arch/sparc64/sparc64/locore.s:1.326 Mon Mar 8 08:59:06 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Wed Mar 10 06:57:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.326 2010/03/08 08:59:06 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.327 2010/03/10 06:57:22 mrg Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -6568,14 +6568,15 @@ retl mov %o4, %g1 ! Restore g1 #endif + /* - * extern int64_t pseg_get(struct pmap *pm, vaddr_t addr); + * extern int64_t pseg_get_real(struct pmap *pm, vaddr_t addr); * * Return TTE at addr in pmap. Uses physical addressing only. * pmap->pm_physaddr must by the physical address of pm_segs * */ -ENTRY(pseg_get) +ENTRY(pseg_get_real) ! flushw ! Make sure we don't have stack probs & lose hibits of %o ldx [%o0 + PM_PHYS], %o2 ! pmap->pm_segs @@ -6637,13 +6638,13 @@ /* * In 32-bit mode: * - * extern int pseg_set(struct pmap* %o0, vaddr_t addr %o1, int64_t tte %o2:%o3, - * paddr_t spare %o4:%o5); + * extern int pseg_set_real(struct pmap* %o0, vaddr_t addr %o1, + * int64_t tte %o2:%o3, paddr_t spare %o4:%o5); * * In 64-bit mode: * - * extern int pseg_set(struct pmap* %o0, vaddr_t addr %o1, int64_t tte %o2, - * paddr_t spare %o3); + * extern int pseg_set_real(struct pmap* %o0, vaddr_t addr %o1, + * int64_t tte %o2, paddr_t spare %o3); * * Set a pseg entry to a particular TTE value. Return values are: * @@ -6673,7 +6674,7 @@ * The counters are 32 bit or 64 bit wide, depending on the kernel type we are * running! */ -ENTRY(pseg_set) +ENTRY(pseg_set_real) #ifndef _LP64 sllx %o4, 32, %o4! Put args into 64-bit format sllx %o2, 32, %o2! Shift to high 32-bits Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.258 src/sys/arch/sparc64/sparc64/pmap.c:1.259 --- src/sys/arch/sparc64/sparc64/pmap.c:1.258 Mon Mar 8 08:59:06 2010 +++ src/sys/arch/sparc64/sparc64/pmap.c Wed Mar 10 06:57:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.258 2010/03/08 08:59:06 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.259 2010/03/10 06:57:22 mrg Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.258 2010/03/08 08:59:06 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.259 2010/03/1
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Wed Mar 10 06:57:23 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: db_interface.c locore.s pmap.c Log Message: XXX: workaround we'd like to remove when pmap / uvm locking is cleaned up: - rename pseg_get() and pseg_set() to pseg_get_real() and pseg_set_real(). - if USE_LOCKSAFE_PSEG_GETSET is defined, which it current is by default, define pseg_[gs]et() in terms of functions that take a new pseg_lock mutex at IPL_VM while calling into the real functions. this seems to avoid the pseg_set() crashes we've seen: 1 - spare needed, when pseg_get() just worked for this pmap 2 - the 2rd ldxa via ASI_PHYS_CACHED in pseg_set() loads garbage into %o4, and causes the 3rd ldxa to fault To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/sparc64/sparc64/db_interface.c cvs rdiff -u -r1.326 -r1.327 src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.258 -r1.259 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Mar 10 05:16:17 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Added Files: src/sys/dev/pci: wcfbreg.h Log Message: - move register definition in their own header, reduce magic numbers - get geometry and framebuffer layout from the chip instead of hardcoding - get rid of some now superfluous leftovers - remove some debug code - clean things up a bit - dump registers with WCFB_DEBUG even if we're not the console To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/wcfb.c cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/wcfbreg.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/wcfb.c diff -u src/sys/dev/pci/wcfb.c:1.5 src/sys/dev/pci/wcfb.c:1.6 --- src/sys/dev/pci/wcfb.c:1.5 Wed Mar 10 02:41:02 2010 +++ src/sys/dev/pci/wcfb.c Wed Mar 10 05:16:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.5 2010/03/10 02:41:02 macallan Exp $ */ +/* $NetBSD: wcfb.c,v 1.6 2010/03/10 05:16:17 macallan Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.5 2010/03/10 02:41:02 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.6 2010/03/10 05:16:17 macallan Exp $"); #include #include @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -94,7 +95,7 @@ u_char sc_cmap_red[256]; u_char sc_cmap_green[256]; u_char sc_cmap_blue[256]; - uint32_t sc_fb0off; + uint32_t sc_fb0off, sc_fb1off; void (*copycols)(void *, int, int, int, int); void (*erasecols)(void *, int, int, int, long); @@ -151,8 +152,9 @@ prop_dictionary_t dict; struct wsemuldisplaydev_attach_args aa; int i, j; + uint32_t reg; unsigned long defattr; - bool is_console; + bool is_console = 0; char devinfo[256]; void *wtf; @@ -164,23 +166,14 @@ dict = device_properties(self); prop_dictionary_get_bool(dict, "is_console", &is_console); - if(!is_console) return; - +#ifndef WCFB_DEBUG + if (!is_console) return; +#endif sc->sc_memt = pa->pa_memt; sc->sc_iot = pa->pa_iot; sc->sc_pc = pa->pa_pc; sc->sc_pcitag = pa->pa_tag; - /* fill in parameters from properties */ - if (!prop_dictionary_get_uint32(dict, "width", &sc->sc_width)) { - aprint_error("%s: no width property\n", device_xname(self)); - return; - } - if (!prop_dictionary_get_uint32(dict, "height", &sc->sc_height)) { - aprint_error("%s: no height property\n", device_xname(self)); - return; - } - if (pci_mapreg_map(pa, 0x14, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_regt, &sc->sc_regh, &sc->sc_reg, &sc->sc_regsize)) { aprint_error("%s: failed to map registers.\n", @@ -203,13 +196,19 @@ sc->sc_fbaddr = bus_space_vaddr(sc->sc_memt, sc->sc_fbh); - sc->sc_fb0off = bus_space_read_4(sc->sc_regt, sc->sc_regh, 0x8080) - - sc->sc_fb; + sc->sc_fb0off = + bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_FB8_ADDR0) - sc->sc_fb; sc->sc_fb0 = sc->sc_fbaddr + sc->sc_fb0off; - sc->sc_fb1 = sc->sc_fb0 + 0x20; - - sc->sc_stride = 1 << - ((bus_space_read_4(sc->sc_regt, sc->sc_regh, 0x8074) & 0x00ff) >> 16); + sc->sc_fb1off = + bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_FB8_ADDR1) - sc->sc_fb; + sc->sc_fb1 = sc->sc_fbaddr + sc->sc_fb1off; + + reg = bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_RESOLUTION); + sc->sc_height = (reg >> 16) + 1; + sc->sc_width = (reg & 0x) + 1; + sc->sc_stride = 1 << + ((bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_CONFIG) & + 0x00ff) >> 16); printf("%s: %d x %d, %d\n", device_xname(sc->sc_dev), sc->sc_width, sc->sc_height, sc->sc_stride); @@ -229,6 +228,9 @@ printf("\n"); } + /* make sure video output is on */ + bus_space_write_4(sc->sc_regt, sc->sc_regh, WC_DPMS_STATE, WC_DPMS_ON); + sc->sc_defaultscreen_descr = (struct wsscreen_descr){ "default", 0, 0, @@ -263,20 +265,16 @@ rasops_cmap[j + 2]); j += 3; } - wcfb_putpalreg(sc, 0, 0, 0, 0); - wcfb_putpalreg(sc, 15, 0xff, 0xff, 0xff); if (is_console) { vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1, &defattr); sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; -#if 0 - wcfb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, - ri->ri_devcmap[(defattr >> 16) & 0xff]); -#else - /*memset(sc->sc_fbaddr + sc->sc_fb0off, 0, 0x40);*/ -#endif + memset(sc->sc_fb0, ri->ri_devcmap[(defattr >> 16) & 0xff], + sc->sc_stride * sc->sc_height); + memset(sc->sc_fb1, ri->ri_devcmap[(defattr >> 16) & 0xff], + sc->sc_stride * sc->sc_height); sc->sc_defaultscreen_descr.textops = &ri->ri_ops; sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; sc->sc_defaultscreen_descr.nrows = ri->ri_rows; @@ -289,7 +287,11 @@ * since we're not the console we can postpone the rest * until someone actually allocates a screen for us */ - (*ri->ri_ops.allocattr)(r
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Mar 10 05:16:17 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Added Files: src/sys/dev/pci: wcfbreg.h Log Message: - move register definition in their own header, reduce magic numbers - get geometry and framebuffer layout from the chip instead of hardcoding - get rid of some now superfluous leftovers - remove some debug code - clean things up a bit - dump registers with WCFB_DEBUG even if we're not the console To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/wcfb.c cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/wcfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: macallan Date: Wed Mar 10 03:11:49 UTC 2010 Modified Files: src/sys/arch/sparc64/conf: GENERIC Log Message: enable wcfb now that it's actually useful This driver has been tested on Sun XVR-500 and XVR-1200 boards but it should work on most ( all? ) Wildcat-based boards. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/sparc64/conf/GENERIC 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/sparc64/conf/GENERIC diff -u src/sys/arch/sparc64/conf/GENERIC:1.119 src/sys/arch/sparc64/conf/GENERIC:1.120 --- src/sys/arch/sparc64/conf/GENERIC:1.119 Sun Mar 7 09:39:44 2010 +++ src/sys/arch/sparc64/conf/GENERIC Wed Mar 10 03:11:49 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.119 2010/03/07 09:39:44 plunky Exp $ +# $NetBSD: GENERIC,v 1.120 2010/03/10 03:11:49 macallan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.119 $" +#ident "GENERIC-$Revision: 1.120 $" maxusers 64 @@ -883,6 +883,9 @@ # Sun PGX32 / TechSource Raptor GFX 8P pm2fb* at pci? +# 3Dlabs Wildcat based boards like XVR-500, 1200 etc. +wcfb* at pci? + # generic PCI framebuffers genfb* at pci?
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: macallan Date: Wed Mar 10 03:11:49 UTC 2010 Modified Files: src/sys/arch/sparc64/conf: GENERIC Log Message: enable wcfb now that it's actually useful This driver has been tested on Sun XVR-500 and XVR-1200 boards but it should work on most ( all? ) Wildcat-based boards. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/sparc64/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Mar 10 02:41:02 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: forgot to include opt_wsdisplay_compat.h for WSDISPLAY_SCROLLSUPPORT To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/wcfb.c diff -u src/sys/dev/pci/wcfb.c:1.4 src/sys/dev/pci/wcfb.c:1.5 --- src/sys/dev/pci/wcfb.c:1.4 Tue Mar 9 23:17:12 2010 +++ src/sys/dev/pci/wcfb.c Wed Mar 10 02:41:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.4 2010/03/09 23:17:12 macallan Exp $ */ +/* $NetBSD: wcfb.c,v 1.5 2010/03/10 02:41:02 macallan Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.4 2010/03/09 23:17:12 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.5 2010/03/10 02:41:02 macallan Exp $"); #include #include @@ -53,7 +53,7 @@ #include #include "opt_wsfb.h" -#include "opt_wcfb.h" +#include "opt_wsdisplay_compat.h" #ifdef WCFB_DEBUG # define DPRINTF printf
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Mar 10 02:41:02 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: forgot to include opt_wsdisplay_compat.h for WSDISPLAY_SCROLLSUPPORT To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Wed Mar 10 00:21:10 UTC 2010 Modified Files: src/sys/dev/cardbus: ehci_cardbus.c if_tlp_cardbus.c ohci_cardbus.c Log Message: This is *always* compiled with #define rbus 1, so get rid of the conditional compilation. Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); Tested by Klaus Heinz. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/cardbus/ehci_cardbus.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/cardbus/if_tlp_cardbus.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/cardbus/ohci_cardbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cardbus/ehci_cardbus.c diff -u src/sys/dev/cardbus/ehci_cardbus.c:1.27 src/sys/dev/cardbus/ehci_cardbus.c:1.28 --- src/sys/dev/cardbus/ehci_cardbus.c:1.27 Fri Feb 26 00:57:01 2010 +++ src/sys/dev/cardbus/ehci_cardbus.c Wed Mar 10 00:21:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_cardbus.c,v 1.27 2010/02/26 00:57:01 dyoung Exp $ */ +/* $NetBSD: ehci_cardbus.c,v 1.28 2010/03/10 00:21:10 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.27 2010/02/26 00:57:01 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.28 2010/03/10 00:21:10 dyoung Exp $"); #include #include @@ -153,11 +153,6 @@ sc->sc_ct = ct; sc->sc.sc_bus.dmatag = ca->ca_dmat; -#if rbus -#else -XXX (ct->ct_cf->cardbus_mem_open)(cc, 0, iob, iob + 0x40); -#endif - /* Enable the device. */ csr = Cardbus_conf_read(ct, ca->ca_tag, PCI_COMMAND_STATUS_REG); Cardbus_conf_write(ct, ca->ca_tag, PCI_COMMAND_STATUS_REG, @@ -169,7 +164,7 @@ DPRINTF(("%s: offs=%d\n", devname, sc->sc.sc_offs)); EOWRITE2(&sc->sc, EHCI_USBINTR, 0); - sc->sc_ih = cardbus_intr_establish(cc, cf, ca->ca_intrline, + sc->sc_ih = Cardbus_intr_establish(ct, ca->ca_intrline, IPL_USB, ehci_intr, sc); if (sc->sc_ih == NULL) { printf("%s: couldn't establish interrupt\n", devname); @@ -206,7 +201,7 @@ printf("%s: init failed, error=%d\n", devname, r); /* Avoid spurious interrupts. */ - cardbus_intr_disestablish(sc->sc_cc, sc->sc_cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); sc->sc_ih = NULL; return; @@ -231,7 +226,7 @@ if (rv) return (rv); if (sc->sc_ih != NULL) { - cardbus_intr_disestablish(sc->sc_cc, sc->sc_cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); sc->sc_ih = NULL; } if (sc->sc.sc_size) { Index: src/sys/dev/cardbus/if_tlp_cardbus.c diff -u src/sys/dev/cardbus/if_tlp_cardbus.c:1.66 src/sys/dev/cardbus/if_tlp_cardbus.c:1.67 --- src/sys/dev/cardbus/if_tlp_cardbus.c:1.66 Fri Feb 26 00:57:02 2010 +++ src/sys/dev/cardbus/if_tlp_cardbus.c Wed Mar 10 00:21:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_cardbus.c,v 1.66 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_tlp_cardbus.c,v 1.67 2010/03/10 00:21:10 dyoung Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.66 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.67 2010/03/10 00:21:10 dyoung Exp $"); #include "opt_inet.h" @@ -307,20 +307,12 @@ if (Cardbus_mapreg_map(ct, TULIP_PCI_MMBA, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_st, &sc->sc_sh, &adr, &csc->sc_mapsize) == 0) { -#if rbus -#else - (*ct->ct_cf->cardbus_mem_open)(cc, 0, adr, adr+csc->sc_mapsize); -#endif csc->sc_csr |= PCI_COMMAND_MEM_ENABLE; csc->sc_bar_reg = TULIP_PCI_MMBA; csc->sc_bar_val = adr | PCI_MAPREG_TYPE_MEM; } else if (Cardbus_mapreg_map(ct, TULIP_PCI_IOBA, PCI_MAPREG_TYPE_IO, 0, &sc->sc_st, &sc->sc_sh, &adr, &csc->sc_mapsize) == 0) { -#if rbus -#else - (*ct->ct_cf->cardbus_io_open)(cc, 0, adr, adr+csc->sc_mapsize); -#endif csc->sc_csr |= PCI_COMMAND_IO_ENABLE; csc->sc_bar_reg = TULIP_PCI_IOBA; csc->sc_bar_val = adr | PCI_MAPREG_TYPE_IO; @@ -472,7 +464,7 @@ * Unhook the interrupt handler. */ if (csc->sc_ih != NULL) - cardbus_intr_disestablish(ct->ct_cc, ct->ct_cf, csc->sc_ih); + Cardbus_intr_disestablish(ct, csc->sc_ih); /* * Release bus space and close window. @@ -489,8 +481,6 @@ { struct tulip_cardbus_softc *csc = (void *) sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; /* * Power on the socket. @@ -505,7 +495,7 @@ /* * Map and establish the interrupt. */ - csc->sc_ih = cardbus_intr_establish(cc, cf, csc->sc_intrline, IPL_NET, + csc->sc_ih = Cardbus_intr_establish(ct, csc->sc_intrline, IPL_NET, tlp_intr, sc); if (csc->sc_ih == NULL)
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Wed Mar 10 00:21:10 UTC 2010 Modified Files: src/sys/dev/cardbus: ehci_cardbus.c if_tlp_cardbus.c ohci_cardbus.c Log Message: This is *always* compiled with #define rbus 1, so get rid of the conditional compilation. Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); Tested by Klaus Heinz. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/cardbus/ehci_cardbus.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/cardbus/if_tlp_cardbus.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/cardbus/ohci_cardbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Tue Mar 9 23:17:12 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: now we also draw a cursor To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/wcfb.c diff -u src/sys/dev/pci/wcfb.c:1.3 src/sys/dev/pci/wcfb.c:1.4 --- src/sys/dev/pci/wcfb.c:1.3 Tue Mar 9 22:45:50 2010 +++ src/sys/dev/pci/wcfb.c Tue Mar 9 23:17:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.3 2010/03/09 22:45:50 macallan Exp $ */ +/* $NetBSD: wcfb.c,v 1.4 2010/03/09 23:17:12 macallan Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.3 2010/03/09 22:45:50 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.4 2010/03/09 23:17:12 macallan Exp $"); #include #include @@ -451,11 +451,44 @@ static void wcfb_cursor(void *cookie, int on, int row, int col) { -#if 0 struct rasops_info *ri = cookie; struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; + int coffset; + + if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) { + + if (ri->ri_flg & RI_CURSOR) { + /* remove cursor */ + coffset = ri->ri_ccol + (ri->ri_crow * ri->ri_cols); +#ifdef WSDISPLAY_SCROLLSUPPORT + coffset += scr->scr_offset_to_zero; +#endif + wcfb_putchar(cookie, ri->ri_crow, + ri->ri_ccol, scr->scr_chars[coffset], + scr->scr_attrs[coffset]); + ri->ri_flg &= ~RI_CURSOR; + } + ri->ri_crow = row; + ri->ri_ccol = col; + if (on) { + long attr, revattr; + coffset = col + (row * ri->ri_cols); +#ifdef WSDISPLAY_SCROLLSUPPORT + coffset += scr->scr_offset_to_zero; #endif + attr = scr->scr_attrs[coffset]; + revattr = attr ^ 0x; + + wcfb_putchar(cookie, ri->ri_crow, ri->ri_ccol, + scr->scr_chars[coffset], revattr); + ri->ri_flg |= RI_CURSOR; + } + } else { + ri->ri_crow = row; + ri->ri_ccol = col; + ri->ri_flg &= ~RI_CURSOR; + } } static void
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Tue Mar 9 23:17:12 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: now we also draw a cursor To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jym Date: Tue Mar 9 23:12:06 UTC 2010 Modified Files: src/sys/arch/xen/x86: xen_bus_dma.c Log Message: Although Xen's documentation states that the address_bits field is not used by XENMEM_decrease_reservation, it is checked by the hypervisor. In certain circumstances (stack leak), the field could have an improper value, leading to a fail of the hypercall. Set it to 0 ("no addressing restriction") to avoid that. Patch tested by Sam Fourman and h...@. This should fix the rare "failed allocating DMA memory" encountered under NetBSD dom0. Will ask for a pull-up. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/x86/xen_bus_dma.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/xen/x86/xen_bus_dma.c diff -u src/sys/arch/xen/x86/xen_bus_dma.c:1.19 src/sys/arch/xen/x86/xen_bus_dma.c:1.20 --- src/sys/arch/xen/x86/xen_bus_dma.c:1.19 Tue Mar 2 00:13:50 2010 +++ src/sys/arch/xen/x86/xen_bus_dma.c Tue Mar 9 23:12:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_bus_dma.c,v 1.19 2010/03/02 00:13:50 jym Exp $ */ +/* $NetBSD: xen_bus_dma.c,v 1.20 2010/03/09 23:12:06 jym Exp $ */ /* NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */ /*- @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.19 2010/03/02 00:13:50 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.20 2010/03/09 23:12:06 jym Exp $"); #include #include @@ -95,6 +95,7 @@ xenguest_handle(res.extent_start) = &mfn; res.nr_extents = 1; res.extent_order = 0; + res.address_bits = 0; res.domid = DOMID_SELF; error = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &res); if (error != 1) {
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jym Date: Tue Mar 9 23:12:06 UTC 2010 Modified Files: src/sys/arch/xen/x86: xen_bus_dma.c Log Message: Although Xen's documentation states that the address_bits field is not used by XENMEM_decrease_reservation, it is checked by the hypervisor. In certain circumstances (stack leak), the field could have an improper value, leading to a fail of the hypercall. Set it to 0 ("no addressing restriction") to avoid that. Patch tested by Sam Fourman and h...@. This should fix the rare "failed allocating DMA memory" encountered under NetBSD dom0. Will ask for a pull-up. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/x86/xen_bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Tue Mar 9 22:45:50 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: Use a shadow framebuffer instead of doing every operation twice ( once for each framebuffer ) - this gives quite a dramatic speedup and hides the funky effects previously seen. Almost there, now we need to actually draw a cursor. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/wcfb.c diff -u src/sys/dev/pci/wcfb.c:1.2 src/sys/dev/pci/wcfb.c:1.3 --- src/sys/dev/pci/wcfb.c:1.2 Thu Feb 25 20:56:20 2010 +++ src/sys/dev/pci/wcfb.c Tue Mar 9 22:45:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.2 2010/02/25 20:56:20 macallan Exp $ */ +/* $NetBSD: wcfb.c,v 1.3 2010/03/09 22:45:50 macallan Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.2 2010/02/25 20:56:20 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.3 2010/03/09 22:45:50 macallan Exp $"); #include #include @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -83,7 +84,7 @@ int sc_width, sc_height, sc_stride; int sc_locked; - uint8_t *sc_fbaddr; + uint8_t *sc_fbaddr, *sc_fb0, *sc_fb1, *sc_shadow; struct vcons_screen sc_console_screen; struct wsscreen_descr sc_defaultscreen_descr; const struct wsscreen_descr *sc_screens[1]; @@ -204,10 +205,21 @@ sc->sc_fb0off = bus_space_read_4(sc->sc_regt, sc->sc_regh, 0x8080) - sc->sc_fb; + sc->sc_fb0 = sc->sc_fbaddr + sc->sc_fb0off; + sc->sc_fb1 = sc->sc_fb0 + 0x20; + sc->sc_stride = 1 << ((bus_space_read_4(sc->sc_regt, sc->sc_regh, 0x8074) & 0x00ff) >> 16); printf("%s: %d x %d, %d\n", device_xname(sc->sc_dev), sc->sc_width, sc->sc_height, sc->sc_stride); + + sc->sc_shadow = kmem_alloc(sc->sc_stride * sc->sc_height, KM_SLEEP); + if (sc->sc_shadow == NULL) { + printf("%s: failed to allocate shadow buffer\n", + device_xname(self)); + return; + } + for (i = 0x40; i < 0x100; i += 16) { printf("%04x:", i); for (j = 0; j < 16; j += 4) { @@ -375,7 +387,7 @@ ri->ri_stride = sc->sc_stride; ri->ri_flg = RI_CENTER /*| RI_FULLCLEAR*/; - ri->ri_bits = (char *)sc->sc_fbaddr + sc->sc_fb0off; + ri->ri_bits = sc->sc_shadow; if (existing) { ri->ri_flg |= RI_CLEAR; @@ -408,11 +420,22 @@ struct rasops_info *ri = cookie; struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; + int offset = (ri->ri_yorigin + row * ri->ri_font->fontheight) * + sc->sc_stride + ri->ri_xorigin + col * ri->ri_font->fontwidth; + uint8_t *from, *to0, *to1; + int i; sc->putchar(ri, row, col, c, attr); - ri->ri_bits += 0x20; - sc->putchar(ri, row, col, c, attr); - ri->ri_bits -= 0x20; + from = sc->sc_shadow + offset; + to0 = sc->sc_fb0 + offset; + to1 = sc->sc_fb1 + offset; + for (i = 0; i < ri->ri_font->fontheight; i++) { + memcpy(to0, from, ri->ri_font->fontwidth); + memcpy(to1, from, ri->ri_font->fontwidth); + to0 += sc->sc_stride; + to1 += sc->sc_stride; + from += sc->sc_stride; + } } static void @@ -441,37 +464,72 @@ struct rasops_info *ri = cookie; struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; + int offset = (ri->ri_yorigin + row * ri->ri_font->fontheight) * + sc->sc_stride + ri->ri_xorigin + dstcol * ri->ri_font->fontwidth; + uint8_t *from, *to0, *to1; + int i; sc->copycols(ri, row, srccol, dstcol, ncols); - ri->ri_bits += 0x20; - sc->copycols(ri, row, srccol, dstcol, ncols); - ri->ri_bits -= 0x20; + from = sc->sc_shadow + offset; + to0 = sc->sc_fb0 + offset; + to1 = sc->sc_fb1 + offset; + for (i = 0; i < ri->ri_font->fontheight; i++) { + memcpy(to0, from, ri->ri_font->fontwidth * ncols); + memcpy(to1, from, ri->ri_font->fontwidth * ncols); + to0 += sc->sc_stride; + to1 += sc->sc_stride; + from += sc->sc_stride; + } } static void -wcfb_erasecols(void *cookie, int row, int startcol, int ncol, long fillattr) +wcfb_erasecols(void *cookie, int row, int startcol, int ncols, long fillattr) { struct rasops_info *ri = cookie; struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; - - sc->erasecols(ri, row, startcol, ncol, fillattr); - ri->ri_bits += 0x20; - sc->erasecols(ri, row, startcol, ncol, fillattr); - ri->ri_bits -= 0x20; + int offset = (ri->ri_yorigin + row * ri->ri_font->fontheight) * + sc->sc_stride + ri->ri_xorigin + startcol * ri->ri_font->fontwidth; + uint8_t *to0, *to1; + int i; + + sc->erasecols(ri, row, startcol, ncols, fillattr); + + to0 = sc->sc_fb0 + offset; + to1 = sc->sc_fb1 + offset; + for (i = 0; i < ri->ri_font->fontheight; i++) { + memset(to0, ri->ri_devcmap[(fillattr >> 16) & 0xff], + ri->ri_font->fontwidth * ncols); + memset(to1, ri->r
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Tue Mar 9 22:45:50 UTC 2010 Modified Files: src/sys/dev/pci: wcfb.c Log Message: Use a shadow framebuffer instead of doing every operation twice ( once for each framebuffer ) - this gives quite a dramatic speedup and hides the funky effects previously seen. Almost there, now we need to actually draw a cursor. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/wcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:41:03 UTC 2010 Modified Files: src/sys/arch/powerpc/include: cpu.h Log Message: Add BookE modifications to cpu_info To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/powerpc/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:41:03 UTC 2010 Modified Files: src/sys/arch/powerpc/include: cpu.h Log Message: Add BookE modifications to cpu_info To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h diff -u src/sys/arch/powerpc/include/cpu.h:1.67 src/sys/arch/powerpc/include/cpu.h:1.68 --- src/sys/arch/powerpc/include/cpu.h:1.67 Sat Oct 24 20:03:56 2009 +++ src/sys/arch/powerpc/include/cpu.h Tue Mar 9 22:41:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.67 2009/10/24 20:03:56 rmind Exp $ */ +/* $NetBSD: cpu.h,v 1.68 2010/03/09 22:41:03 matt Exp $ */ /* * Copyright (C) 1999 Wolfgang Solfrank. @@ -78,11 +78,14 @@ int ci_intrdepth; int ci_mtx_oldspl; int ci_mtx_count; +#ifndef PPC_BOOKE char *ci_intstk; +#endif #define CPUSAVE_LEN 8 register_t ci_tempsave[CPUSAVE_LEN]; register_t ci_ddbsave[CPUSAVE_LEN]; register_t ci_ipkdbsave[CPUSAVE_LEN]; +#ifndef PPC_BOOKE #define CPUSAVE_R28 0 /* where r28 gets saved */ #define CPUSAVE_R29 1 /* where r29 gets saved */ #define CPUSAVE_R30 2 /* where r30 gets saved */ @@ -93,6 +96,18 @@ #define CPUSAVE_SRR1 7 /* where SRR1 gets saved */ #define DISISAVE_LEN 4 register_t ci_disisave[DISISAVE_LEN]; +#else +#define CPUSAVE_R26 0 /* where r26 gets saved */ +#define CPUSAVE_R27 1 /* where r27 gets saved */ +#define CPUSAVE_R28 2 /* where r28 gets saved */ +#define CPUSAVE_R29 3 /* where r29 gets saved */ +#define CPUSAVE_R30 4 /* where r30 gets saved */ +#define CPUSAVE_R31 5 /* where r31 gets saved */ + register_t ci_critsave[CPUSAVE_LEN]; + register_t ci_mchksave[CPUSAVE_LEN]; + struct pmap_segtab *ci_pmap_kern_segtab; + struct pmap_segtab *ci_pmap_user_segtab; +#endif struct cache_info ci_ci; void *ci_sysmon_cookie; void (*ci_idlespin)(void);
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:40:06 UTC 2010 Modified Files: src/sys/arch/powerpc/include: pmap.h Log Message: Include BookE version of pmap.h To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/powerpc/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/powerpc/include/pmap.h diff -u src/sys/arch/powerpc/include/pmap.h:1.34 src/sys/arch/powerpc/include/pmap.h:1.35 --- src/sys/arch/powerpc/include/pmap.h:1.34 Tue Dec 9 20:45:45 2008 +++ src/sys/arch/powerpc/include/pmap.h Tue Mar 9 22:40:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.34 2008/12/09 20:45:45 pooka Exp $ */ +/* $NetBSD: pmap.h,v 1.35 2010/03/09 22:40:06 matt Exp $ */ #ifdef _KERNEL_OPT #include "opt_ppcarch.h" @@ -6,6 +6,8 @@ #ifdef PPC_IBM4XX #include +#elif defined(PPC_BOOKE) +#include #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE) #include #else
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:40:06 UTC 2010 Modified Files: src/sys/arch/powerpc/include: pmap.h Log Message: Include BookE version of pmap.h To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/powerpc/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: matt Date: Tue Mar 9 22:39:32 UTC 2010 Added Files: src/sys/arch/powerpc/include/booke: Makefile booke_intr.h pte.h spr.h trap.h vmparam.h Log Message: Add initial versions of these for BookE. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/include/booke/Makefile \ src/sys/arch/powerpc/include/booke/booke_intr.h \ src/sys/arch/powerpc/include/booke/pte.h \ src/sys/arch/powerpc/include/booke/spr.h \ src/sys/arch/powerpc/include/booke/trap.h \ src/sys/arch/powerpc/include/booke/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/powerpc/include/booke/Makefile diff -u /dev/null src/sys/arch/powerpc/include/booke/Makefile:1.1 --- /dev/null Tue Mar 9 22:39:32 2010 +++ src/sys/arch/powerpc/include/booke/Makefile Tue Mar 9 22:39:32 2010 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2010/03/09 22:39:32 matt Exp $ + +INCSDIR= /usr/include/powerpc/booke + +INCS= booke_intr.h \ + pmap.h pte.h \ + spr.h \ + trap.h \ + vmparam.h + +.include Index: src/sys/arch/powerpc/include/booke/booke_intr.h diff -u /dev/null src/sys/arch/powerpc/include/booke/booke_intr.h:1.1 --- /dev/null Tue Mar 9 22:39:32 2010 +++ src/sys/arch/powerpc/include/booke/booke_intr.h Tue Mar 9 22:39:32 2010 @@ -0,0 +1,95 @@ +/* $NetBSD: booke_intr.h,v 1.1 2010/03/09 22:39:32 matt Exp $ */ + +/*- + * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Charles M. Hannum. + * + * 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. + */ + +#ifndef _BOOKE_INTR_H_ +#define _BOOKE_INTR_H_ + +/* Interrupt priority `levels'. */ +#define IPL_NONE 0 /* nothing */ +#define IPL_SOFTCLOCK 1 /* software clock interrupt */ +#define IPL_SOFTBIO 2 /* software block i/o interrupt */ +#define IPL_SOFTNET 3 /* software network interrupt */ +#define IPL_SOFTSERIAL 4 /* software serial interrupt */ +#define IPL_VM 5 /* memory allocation */ +#define IPL_SCHED 6 /* clock */ +#define IPL_HIGH 7 /* everything */ +#define NIPL 8 + +/* Interrupt sharing types. */ +#define IST_NONE 0 /* none */ +#define IST_PULSE 1 /* pulsed */ +#define IST_EDGE 2 /* edge-triggered */ +#define IST_LEVEL 3 /* level-triggered */ + +#ifndef _LOCORE + +#define CLKF_BASEPRI(frame) ((frame)->cf_ipl == IPL_NONE) + +void *intr_establish(int, int, int, int (*)(void *), void *); +void intr_disestablish(void *); +void intr_init(void); +void ext_intr(void); /* for machdep */ +int splraise(int); +int spllower(int); +void splx(int); +void softintr(int); + +extern volatile u_int imask[NIPL]; +extern const int mask_clock; /* for clock.c */ +extern const int mask_statclock; /* for clock.c */ + +#define spllowersoftclock() spllower(imask[IPL_SOFTCLOCK]) + +typedef int ipl_t; +typedef struct { + ipl_t _ipl; +} ipl_cookie_t; + +static inline ipl_cookie_t +makeiplcookie(ipl_t ipl) +{ + + return (ipl_cookie_t){._ipl = ipl}; +} + +static inline int +splraiseipl(ipl_cookie_t icookie) +{ + + return splraise(imask[icookie._ipl]); +} + +#include + +#define spl0() spllower(0) + +#endif /* !_LOCORE */ +#endif /* !_BOOKE_INTR_H_ */ Index: src/sys/arch/powerpc/include/booke/pte.h diff -u /dev/null src/sys/arch/powerpc/include/booke/pte.h:1.1 --- /dev/null Tue Mar 9 22:39:32 2010 +++ src/sys/arch/powerpc/include/booke/pte.h Tue Mar 9 22:39:32 2010 @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundatio
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: matt Date: Tue Mar 9 22:39:32 UTC 2010 Added Files: src/sys/arch/powerpc/include/booke: Makefile booke_intr.h pte.h spr.h trap.h vmparam.h Log Message: Add initial versions of these for BookE. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/include/booke/Makefile \ src/sys/arch/powerpc/include/booke/booke_intr.h \ src/sys/arch/powerpc/include/booke/pte.h \ src/sys/arch/powerpc/include/booke/spr.h \ src/sys/arch/powerpc/include/booke/trap.h \ src/sys/arch/powerpc/include/booke/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:37:47 UTC 2010 Modified Files: src/sys/arch/powerpc/include: psl.h Log Message: Add BookE variation of MSR. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/psl.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/powerpc/include/psl.h diff -u src/sys/arch/powerpc/include/psl.h:1.14 src/sys/arch/powerpc/include/psl.h:1.15 --- src/sys/arch/powerpc/include/psl.h:1.14 Sat Aug 5 21:26:49 2006 +++ src/sys/arch/powerpc/include/psl.h Tue Mar 9 22:37:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.14 2006/08/05 21:26:49 sanjayl Exp $ */ +/* $NetBSD: psl.h,v 1.15 2010/03/09 22:37:47 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -42,24 +42,34 @@ * * [*] Little-endian mode on the 601 is implemented in the HID0 register. */ -#define PSL_VEC 0x0200 /* AltiVec vector unit available */ -#define PSL_POW 0x0004 /* power management */ -#define PSL_TGPR 0x0002 /* temp. gpr remapping (mpc603e) */ -#define PSL_ILE 0x0001 /* interrupt endian mode (1 == le) */ -#define PSL_EE 0x8000 /* external interrupt enable */ -#define PSL_PR 0x4000 /* privilege mode (1 == user) */ -#define PSL_FP 0x2000 /* floating point enable */ -#define PSL_ME 0x1000 /* machine check enable */ -#define PSL_FE0 0x0800 /* floating point interrupt mode 0 */ -#define PSL_SE 0x0400 /* single-step trace enable */ -#define PSL_BE 0x0200 /* branch trace enable */ -#define PSL_FE1 0x0100 /* floating point interrupt mode 1 */ -#define PSL_IP 0x0040 /* interrupt prefix */ -#define PSL_IR 0x0020 /* instruction address relocation */ -#define PSL_DR 0x0010 /* data address relocation */ -#define PSL_PM 0x0008 /* Performance monitor marked mode */ -#define PSL_RI 0x0002 /* recoverable interrupt */ -#define PSL_LE 0x0001 /* endian mode (1 == le) */ +#define PSL_VEC 0x0200 /* ..6. AltiVec vector unit available */ +#define PSL_UCLE 0x0040 /* B... user-mode cache lock enable */ +#define PSL_SPV 0x0020 /* B... (e500) SPE enable */ +#define PSL_POW 0x0004 /* ..6. power management */ +#define PSL_WE PSL_POW /* B4.. wait state enable */ +#define PSL_TGPR 0x0002 /* ..6. temp. gpr remapping (mpc603e) */ +#define PSL_CE PSL_TGPR /* B4.. critical interrupt enable */ +#define PSL_ILE 0x0001 /* ..6. interrupt endian mode (1 == le) */ +#define PSL_EE 0x8000 /* B468 external interrupt enable */ +#define PSL_PR 0x4000 /* B468 privilege mode (1 == user) */ +#define PSL_FP 0x2000 /* B.6. floating point enable */ +#define PSL_ME 0x1000 /* B468 machine check enable */ +#define PSL_FE0 0x0800 /* B.6. floating point mode 0 */ +#define PSL_SE 0x0400 /* ..6. single-step trace enable */ +#define PSL_DWE PSL_SE /* .4.. debug wait enable */ +#define PSL_UBLE PSL_SE /* B... user BTB lock enable */ +#define PSL_BE 0x0200 /* ..6. branch trace enable */ +#define PSL_DE PSL_BE /* B4.. debug interrupt enable */ +#define PSL_FE1 0x0100 /* B.6. floating point mode 1 */ +#define PSL_IP 0x0040 /* ..6. interrupt prefix */ +#define PSL_IR 0x0020 /* .468 instruction address relocation */ +#define PSL_IS PSL_IR /* B... instruction address space */ +#define PSL_DR 0x0010 /* .468 data address relocation */ +#define PSL_DS PSL_DR /* B... data address space */ +#define PSL_PM 0x0008 /* ..6. Performance monitor */ +#define PSL_PMM PSL_PM /* B... Performance monitor */ +#define PSL_RI 0x0002 /* ..6. recoverable interrupt */ +#define PSL_LE 0x0001 /* ..6. endian mode (1 == le) */ #define PSL_601_MASK ~(PSL_VEC|PSL_POW|PSL_ILE|PSL_BE|PSL_RI|PSL_LE)
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:37:47 UTC 2010 Modified Files: src/sys/arch/powerpc/include: psl.h Log Message: Add BookE variation of MSR. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/psl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:36:41 UTC 2010 Modified Files: src/sys/arch/powerpc/include: asm.h Log Message: Put ASM RCSIDs into .ident To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Tue Mar 9 22:36:41 UTC 2010 Modified Files: src/sys/arch/powerpc/include: asm.h Log Message: Put ASM RCSIDs into .ident To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/asm.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/powerpc/include/asm.h diff -u src/sys/arch/powerpc/include/asm.h:1.28 src/sys/arch/powerpc/include/asm.h:1.29 --- src/sys/arch/powerpc/include/asm.h:1.28 Thu Dec 10 05:10:03 2009 +++ src/sys/arch/powerpc/include/asm.h Tue Mar 9 22:36:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.28 2009/12/10 05:10:03 rmind Exp $ */ +/* $NetBSD: asm.h,v 1.29 2010/03/09 22:36:41 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -123,7 +123,7 @@ #define ASMSTR .asciz -#define RCSID(x) .text; .asciz x +#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection #ifdef __ELF__ #define WEAK_ALIAS(alias,sym) \
CVS commit: src/sys/arch/powerpc/conf
Module Name:src Committed By: matt Date: Tue Mar 9 22:35:50 UTC 2010 Added Files: src/sys/arch/powerpc/conf: files.booke Log Message: Add PPC BookE files. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/conf/files.booke Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/powerpc/conf/files.booke diff -u /dev/null src/sys/arch/powerpc/conf/files.booke:1.1 --- /dev/null Tue Mar 9 22:35:50 2010 +++ src/sys/arch/powerpc/conf/files.booke Tue Mar 9 22:35:50 2010 @@ -0,0 +1,42 @@ +# $NetBSD: files.booke,v 1.1 2010/03/09 22:35:50 matt Exp $ +# +# PPC BookE specific configuration info + +#include "arch/powerpc/fpu/files.fpu" + +# Board Properties +file arch/powerpc/booke/board_prop.c + +# Processor Local Bus +#device cpuchip {[device = -1], [core = -1]}: gpiobus +device cpuchip {}: gpiobus +attach cpuchip at root +file arch/powerpc/booke/dev/cpuchip.c cpuchip +file arch/powerpc/booke/dev/gpio.c gpio + +# On-chip Peripheral Bus +device obio {[addr = -1], [irq = -1]} +attach obio at cpuchip +file arch/powerpc/booke/dev/obio.c obio + +device cpu {} +attach cpu at cpuchip +file arch/powerpc/booke/cpu.c + +device ecc +attach ecc at cpuchip with ecc_cpuchip +file arch/powerpc/booke/dev/ecc_cpuchip.c ecc_cpuchip + +# On-chip com device(s) +attach com at cpuchip with com_cpuchip +file arch/powerpc/booke/dev/com_cpuchip.c com_cpuchip + +# On-chip ethernet device(s) +device estec: ether, ifnet, arp, mii +attach estec at cpuchip +file arch/powerpc/booke/dev/if_etsec.c etsec + +# Watchdog timer +device wdog: sysmon_wdog +attach wdog at cpuchip +file arch/powerpc/booke/dev/wdog.c wdog
CVS commit: src/sys/arch/powerpc/conf
Module Name:src Committed By: matt Date: Tue Mar 9 22:35:50 UTC 2010 Added Files: src/sys/arch/powerpc/conf: files.booke Log Message: Add PPC BookE files. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/conf/files.booke Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/conf
Module Name:src Committed By: matt Date: Tue Mar 9 22:35:12 UTC 2010 Modified Files: src/sys/arch/powerpc/conf: files.powerpc Log Message: Add PPC_BOOKE cputype and booke files. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/powerpc/conf/files.powerpc 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/powerpc/conf/files.powerpc diff -u src/sys/arch/powerpc/conf/files.powerpc:1.71 src/sys/arch/powerpc/conf/files.powerpc:1.72 --- src/sys/arch/powerpc/conf/files.powerpc:1.71 Thu Dec 11 19:30:14 2008 +++ src/sys/arch/powerpc/conf/files.powerpc Tue Mar 9 22:35:12 2010 @@ -1,9 +1,9 @@ -# $NetBSD: files.powerpc,v 1.71 2008/12/11 19:30:14 pooka Exp $ +# $NetBSD: files.powerpc,v 1.72 2010/03/09 22:35:12 matt Exp $ defflag opt_altivec.h ALTIVEC K_ALTIVEC defflag opt_openpic.h OPENPIC OPENPIC_SERIAL_MODE defparam opt_ppcparam.h L2CR_CONFIG L3CR_CONFIG INTSTK CLOCKBASE -defflag opt_ppcarch.h PPC_OEA PPC_OEA601 PPC_OEA64 PPC_OEA64_BRIDGE PPC_MPC8XX PPC_IBM4XX PPC_IBM403 +defflag opt_ppcarch.h PPC_OEA PPC_OEA601 PPC_OEA64 PPC_OEA64_BRIDGE PPC_MPC8XX PPC_IBM4XX PPC_IBM403 PPC_BOOKE defflag opt_pmap.h PMAPDEBUG PMAPCHECK PMAPCOUNTERS defparam opt_pmap.h PTEGCOUNT PMAP_MEMLIMIT @@ -55,6 +55,14 @@ file arch/powerpc/powerpc/fpu.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601 file arch/powerpc/powerpc/trap.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601 +# PPC BookE (MPC85xx) Family files +file arch/powerpc/booke/booke_machdep.c ppc_booke +file arch/powerpc/booke/clock.c ppc_booke +file arch/powerpc/booke/copyinstr.c ppc_booke +file arch/powerpc/booke/copyoutstr.c ppc_booke +file arch/powerpc/booke/pmap.c ppc_booke +file arch/powerpc/booke/trap.c ppc_booke + # Binary compatibility with previous NetBSD releases (COMPAT_XX) file arch/powerpc/powerpc/compat_13_machdep.c compat_13 file arch/powerpc/powerpc/compat_16_machdep.c compat_16
CVS commit: src/sys/arch/powerpc/conf
Module Name:src Committed By: matt Date: Tue Mar 9 22:35:12 UTC 2010 Modified Files: src/sys/arch/powerpc/conf: files.powerpc Log Message: Add PPC_BOOKE cputype and booke files. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/powerpc/conf/files.powerpc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Mar 9 18:15:22 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_wakedev.c acpivar.h Log Message: Remove the namespace scopes. These are neither used nor useful beyond the parser and interpreter. ok jmcneill@, joerg@ To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Mar 9 18:15:22 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_wakedev.c acpivar.h Log Message: Remove the namespace scopes. These are neither used nor useful beyond the parser and interpreter. ok jmcneill@, joerg@ To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/acpi/acpivar.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.156 src/sys/dev/acpi/acpi.c:1.157 --- src/sys/dev/acpi/acpi.c:1.156 Fri Mar 5 21:01:44 2010 +++ src/sys/dev/acpi/acpi.c Tue Mar 9 18:15:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.156 2010/03/05 21:01:44 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.157 2010/03/09 18:15:21 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.156 2010/03/05 21:01:44 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.157 2010/03/09 18:15:21 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -402,17 +402,15 @@ acpi_childdet(device_t self, device_t child) { struct acpi_softc *sc = device_private(self); - struct acpi_scope *as; struct acpi_devnode *ad; if (sc->sc_apmbus == child) sc->sc_apmbus = NULL; - TAILQ_FOREACH(as, &sc->sc_scopes, as_list) { - TAILQ_FOREACH(ad, &as->as_devnodes, ad_list) { - if (ad->ad_device == child) -ad->ad_device = NULL; - } + SIMPLEQ_FOREACH(ad, &sc->sc_devnodes, ad_list) { + + if (ad->ad_device == child) + ad->ad_device = NULL; } } @@ -450,6 +448,7 @@ rsdt->AslCompilerId, rsdt->AslCompilerRevision); } else aprint_error_dev(self, "X/RSDT: Not found\n"); + acpi_unmap_rsdt(rsdt); sc->sc_dev = self; @@ -461,6 +460,8 @@ sc->sc_pciflags = aa->aa_pciflags; sc->sc_ic = aa->aa_ic; + SIMPLEQ_INIT(&sc->sc_devnodes); + acpi_softc = sc; /* @@ -661,11 +662,6 @@ } #endif -struct acpi_make_devnode_state { - struct acpi_softc *softc; - struct acpi_scope *scope; -}; - /* * acpi_build_tree: * @@ -676,46 +672,27 @@ acpi_build_tree(struct acpi_softc *sc) { static const char *scopes[] = { - "\\_PR_", /* ACPI 1.0 processor namespace */ - "\\_SB_", /* system bus namespace */ - "\\_SI_", /* system indicator namespace */ - "\\_TZ_", /* ACPI 1.0 thermal zone namespace */ - NULL, + "\\_PR_", "\\_SB_", "\\_SI_", "\\_TZ_", NULL }; - struct acpi_make_devnode_state state; - struct acpi_scope *as; + ACPI_HANDLE parent; ACPI_STATUS rv; int i; - TAILQ_INIT(&sc->sc_scopes); - - state.softc = sc; - /* - * Scan the namespace and build our tree. + * Scan the namespace and build our device tree. */ for (i = 0; scopes[i] != NULL; i++) { - as = malloc(sizeof(*as), M_ACPI, M_WAITOK); - as->as_name = scopes[i]; - TAILQ_INIT(&as->as_devnodes); - - TAILQ_INSERT_TAIL(&sc->sc_scopes, as, as_list); - - state.scope = as; - - rv = AcpiGetHandle(ACPI_ROOT_OBJECT, scopes[i], - &parent); - if (ACPI_SUCCESS(rv)) { - AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100, - acpi_make_devnode, &state, NULL); - } + + rv = AcpiGetHandle(ACPI_ROOT_OBJECT, scopes[i], &parent); + + if (ACPI_SUCCESS(rv)) + (void)AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100, + acpi_make_devnode, sc, NULL); } acpi_rescan1(sc, NULL, NULL); - acpi_wakedev_scan(sc); - acpi_pcidev_scan(sc); } @@ -743,73 +720,68 @@ static void acpi_rescan_nodes(struct acpi_softc *sc) { - struct acpi_scope *as; - - TAILQ_FOREACH(as, &sc->sc_scopes, as_list) { - struct acpi_devnode *ad; + struct acpi_attach_args aa; + struct acpi_devnode *ad; - /* Now, for this namespace, try to attach the devices. */ - TAILQ_FOREACH(ad, &as->as_devnodes, ad_list) { - struct acpi_attach_args aa; + SIMPLEQ_FOREACH(ad, &sc->sc_devnodes, ad_list) { - if (ad->ad_device != NULL) -continue; + if (ad->ad_device != NULL) + continue; - aa.aa_node = ad; - aa.aa_iot = sc->sc_iot; - aa.aa_memt = sc->sc_memt; - aa.aa_pc = sc->sc_pc; - aa.aa_pciflags = sc->sc_pciflags; - aa.aa_ic = sc->sc_ic; - - if (ad->ad_devinfo->Type == ACPI_TYPE_DEVICE) { -/* - * XXX We only attach devices which are: - * - * - present - * - enabled - * - functioning properly - * - * However, if enabled, it's decoding resources, - * so we should claim them, if possible. - * Requires changes to bus_space(9). - */ -if ((ad->ad_devinfo->Valid & ACPI_VALID_STA) == -ACPI_VALID_STA && -(ad->ad_devinfo->CurrentStatus & - (ACPI_STA_DEV_PRESENT|ACPI_STA_DEV_ENABLED| - ACPI_STA_DEV_OK)) != -(ACPI_STA_DEV_PRESENT|ACPI_STA_DEV_ENABLED| - ACPI_S
CVS commit: src/usr.bin/passwd
Module Name:src Committed By: joerg Date: Tue Mar 9 16:14:08 UTC 2010 Modified Files: src/usr.bin/passwd: pam_passwd.c Log Message: Do not call pam_end with an invalid handle if pam_start failed. >From Richard Hansen. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/passwd/pam_passwd.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/passwd/pam_passwd.c diff -u src/usr.bin/passwd/pam_passwd.c:1.5 src/usr.bin/passwd/pam_passwd.c:1.6 --- src/usr.bin/passwd/pam_passwd.c:1.5 Tue Mar 2 16:19:13 2010 +++ src/usr.bin/passwd/pam_passwd.c Tue Mar 9 16:14:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_passwd.c,v 1.5 2010/03/02 16:19:13 gdt Exp $ */ +/* $NetBSD: pam_passwd.c,v 1.6 2010/03/09 16:14:08 joerg Exp $ */ /*- * Copyright (c) 2002 Networks Associates Technologies, Inc. @@ -38,7 +38,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/usr.bin/passwd/passwd.c,v 1.23 2003/04/18 21:27:09 nectar Exp $"); #else -__RCSID("$NetBSD: pam_passwd.c,v 1.5 2010/03/02 16:19:13 gdt Exp $"); +__RCSID("$NetBSD: pam_passwd.c,v 1.6 2010/03/09 16:14:08 joerg Exp $"); #endif #include @@ -108,7 +108,9 @@ /* initialize PAM -- always use the program name "passwd" */ pam_err = pam_start("passwd", username, &pamc, &pamh); - pam_check("unable to start PAM session"); + if (pam_err != PAM_SUCCESS) + errx(1, "unable to start PAM session: %s", + pam_strerror(NULL, pam_err)); pam_err = pam_set_item(pamh, PAM_TTY, ttyname(STDERR_FILENO)); pam_check("unable to set TTY");
CVS commit: src/usr.bin/passwd
Module Name:src Committed By: joerg Date: Tue Mar 9 16:14:08 UTC 2010 Modified Files: src/usr.bin/passwd: pam_passwd.c Log Message: Do not call pam_end with an invalid handle if pam_start failed. >From Richard Hansen. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/passwd/pam_passwd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Tue Mar 9 14:31:36 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Fix the revision number of if_wm.c in ticket #1277. The commit messages of each file were fixed with cvs admin command. To generate a diff of this commit: cvs rdiff -u -r1.1.2.212 -r1.1.2.213 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.212 src/doc/CHANGES-5.1:1.1.2.213 --- src/doc/CHANGES-5.1:1.1.2.212 Tue Mar 9 04:11:19 2010 +++ src/doc/CHANGES-5.1 Tue Mar 9 14:31:35 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.212 2010/03/09 04:11:19 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.213 2010/03/09 14:31:35 msaitoh Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16405,7 +16405,7 @@ Support associated BCM5709CAX and BCM5709C PHYs. [bouyer, ticket #1268] -sys/dev/pci/if_wm.c1.184-1.194 + patch +sys/dev/pci/if_wm.c1.184-1.192, 1.194 + patch sys/dev/pci/if_wmreg.h1.29-1.35 sys/dev/pci/if_wmvar.h1.5-1.8 + patch sys/dev/pci/pcidevs 1.1006,1.1009-1.1010, 1.1012-1.1013 via patch
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Tue Mar 9 14:31:36 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Fix the revision number of if_wm.c in ticket #1277. The commit messages of each file were fixed with cvs admin command. To generate a diff of this commit: cvs rdiff -u -r1.1.2.212 -r1.1.2.213 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/btattach
Module Name:src Committed By: wiz Date: Tue Mar 9 10:54:01 UTC 2010 Modified Files: src/usr.sbin/btattach: btattach.8 Log Message: Sort sections. Try to improve description of -t. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/btattach/btattach.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/btattach
Module Name:src Committed By: wiz Date: Tue Mar 9 10:54:01 UTC 2010 Modified Files: src/usr.sbin/btattach: btattach.8 Log Message: Sort sections. Try to improve description of -t. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/btattach/btattach.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btattach/btattach.8 diff -u src/usr.sbin/btattach/btattach.8:1.4 src/usr.sbin/btattach/btattach.8:1.5 --- src/usr.sbin/btattach/btattach.8:1.4 Mon Mar 8 18:35:51 2010 +++ src/usr.sbin/btattach/btattach.8 Tue Mar 9 10:54:01 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: btattach.8,v 1.4 2010/03/08 18:35:51 kiyohara Exp $ +.\" $NetBSD: btattach.8,v 1.5 2010/03/09 10:54:01 wiz Exp $ .\" .\" Copyright (c) 2007 KIYOHARA Takashi .\" All rights reserved. @@ -113,10 +113,10 @@ .Pp Only the super-user may attach a Bluetooth HCI interface. .Pp -Test mode guess speed by received link-establish packet from HCI. -Or -.Xr btuart 4 -, if not respond. +Test mode tries to guess the speed using the received link-establish +packet from HCI, or +.Xr btuart 4 , +if there is no response. .Sh FILES .Bl -tag -compact .It Pa /var/run/btattach- Ns Bro tty Brc Ns .pid @@ -126,10 +126,6 @@ .Xr bluetooth 4 , .Xr btuart 4 , .Xr btconfig 8 -.Sh BUGS -Not all -.Ar type -initializations have been tested. .Sh HISTORY The .Nm @@ -140,3 +136,7 @@ .Sh AUTHORS .An KIYOHARA Takashi Aq kiyoh...@kk.iij4u.or.jp .An Iain Hibbert +.Sh BUGS +Not all +.Ar type +initializations have been tested.