CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: jdc Date: Mon Jan 18 09:58:20 UTC 2010 Modified Files: src/sys/arch/sparc64/dev: sab.c Log Message: Re-do the previous check for the RSC console: Do the check in sabtty_console_flags() and set a flag if we are an RSC port. If we are an RSC port, note that the baud rate is 115200, but don't write a new value to the baud rate generator register, as this stops the console working. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sparc64/dev/sab.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/dev/sab.c diff -u src/sys/arch/sparc64/dev/sab.c:1.43 src/sys/arch/sparc64/dev/sab.c:1.44 --- src/sys/arch/sparc64/dev/sab.c:1.43 Wed Dec 30 21:03:48 2009 +++ src/sys/arch/sparc64/dev/sab.c Mon Jan 18 09:58:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sab.c,v 1.43 2009/12/30 21:03:48 jdc Exp $ */ +/* $NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 jdc Exp $ */ /* $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $ */ /* @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.43 2009/12/30 21:03:48 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 jdc Exp $"); #include "opt_kgdb.h" #include @@ -104,14 +104,15 @@ u_char * sc_txp; int sc_txc; int sc_flags; -#define SABTTYF_STOP 0x01 -#define SABTTYF_DONE 0x02 -#define SABTTYF_RINGOVERFLOW 0x04 -#define SABTTYF_CDCHG 0x08 -#define SABTTYF_CONS_IN 0x10 -#define SABTTYF_CONS_OUT 0x20 -#define SABTTYF_TXDRAIN 0x40 -#define SABTTYF_DONTDDB 0x80 +#define SABTTYF_STOP 0x0001 +#define SABTTYF_DONE 0x0002 +#define SABTTYF_RINGOVERFLOW 0x0004 +#define SABTTYF_CDCHG 0x0008 +#define SABTTYF_CONS_IN 0x0010 +#define SABTTYF_CONS_OUT 0x0020 +#define SABTTYF_TXDRAIN 0x0040 +#define SABTTYF_DONTDDB 0x0080 +#define SABTTYF_IS_RSC 0x0100 uint8_t sc_rbuf[SABTTY_RBUF_SIZE]; uint8_t *sc_rend, *sc_rput, *sc_rget; uint8_t sc_polling, sc_pollrfc; @@ -375,7 +376,6 @@ struct sabtty_attach_args *sa = aux; int r; int maj; - int node; int is_kgdb = 0; #ifdef KGDB @@ -443,10 +443,7 @@ } t.c_ispeed= 0; - node = sc->sc_parent->sc_node; - /* Are we connected to an E250 RSC? */ - if (sc->sc_portno == prom_getpropint(node, "ssp-console", -1) || - sc->sc_portno == prom_getpropint(node, "ssp-control", -1)) + if (sc->sc_flags & SABTTYF_IS_RSC) t.c_ospeed = 115200; else t.c_ospeed = 9600; @@ -1039,7 +1036,7 @@ dafo |= SAB_DAFO_PAR_NONE; SAB_WRITE(sc, SAB_DAFO, dafo); - if (ospeed != 0) { + if (!(sc->sc_flags & SABTTYF_IS_RSC) && ospeed != 0) { SAB_WRITE(sc, SAB_BGR, ospeed & 0xff); r = SAB_READ(sc, SAB_CCR2); r &= ~(SAB_CCR2_BR9 | SAB_CCR2_BR8); @@ -1306,6 +1303,10 @@ if (channel == cookie) sc->sc_flags |= SABTTYF_CONS_OUT; } + /* Are we connected to an E250 RSC? */ + if (channel == prom_getpropint(node, "ssp-console", -1) || + channel == prom_getpropint(node, "ssp-control", -1)) + sc->sc_flags |= SABTTYF_IS_RSC; } void
CVS commit: src/etc/mtree
Module Name:src Committed By: plunky Date: Mon Jan 18 10:25:29 UTC 2010 Modified Files: src/etc/mtree: Makefile Log Message: also clean up NetBSD.dist.tmp as if a second build is done without the NetBSD.dist changing, the tmp file will remain. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/etc/mtree/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/Makefile diff -u src/etc/mtree/Makefile:1.14 src/etc/mtree/Makefile:1.15 --- src/etc/mtree/Makefile:1.14 Fri Dec 18 04:12:36 2009 +++ src/etc/mtree/Makefile Mon Jan 18 10:25:29 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2009/12/18 04:12:36 uebayasi Exp $ +# $NetBSD: Makefile,v 1.15 2010/01/18 10:25:29 plunky Exp $ .include @@ -56,6 +56,6 @@ .endif # MKUNPRIVED # } .endif # DISTRIBUTION_DONE # } -CLEANFILES+= NetBSD.dist +CLEANFILES+= NetBSD.dist NetBSD.dist.tmp .include
CVS commit: src/etc/etc.sparc64
Module Name:src Committed By: jdc Date: Mon Jan 18 10:35:18 UTC 2010 Modified Files: src/etc/etc.sparc64: MAKEDEV.conf Log Message: Add RSC ports (ttyh2, ttyh3) to all_md. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/etc/etc.sparc64/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.sparc64/MAKEDEV.conf diff -u src/etc/etc.sparc64/MAKEDEV.conf:1.13 src/etc/etc.sparc64/MAKEDEV.conf:1.14 --- src/etc/etc.sparc64/MAKEDEV.conf:1.13 Sat Sep 13 11:46:18 2008 +++ src/etc/etc.sparc64/MAKEDEV.conf Mon Jan 18 10:35:18 2010 @@ -1,7 +1,8 @@ -# $NetBSD: MAKEDEV.conf,v 1.13 2008/09/13 11:46:18 tsutsui Exp $ +# $NetBSD: MAKEDEV.conf,v 1.14 2010/01/18 10:35:18 jdc Exp $ all_md) - makedev std_sparc64 ttya ttyb ttyc ttyd ttyC00 ttyC01 ttyh0 ttyh1 + makedev std_sparc64 ttya ttyb ttyc ttyd ttyC00 ttyC01 + makedev ttyh0 ttyh1 ttyh2 ttyh3 makedev sd0 sd1 sd2 sd3 sd4 ss0 ch0 uk0 uk1 makedev wd0 wd1 wd2 wd3 cd0 st0 st1 fd0 makedev audio
CVS commit: src/share/man/man3
Module Name:src Committed By: skrll Date: Mon Jan 18 15:25:52 UTC 2010 Modified Files: src/share/man/man3: dlfcn.3 Log Message: Various improvements to bring closer to reality. Mostly from OpenBSD. More improvements possible / probable. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/man/man3/dlfcn.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/dlfcn.3 diff -u src/share/man/man3/dlfcn.3:1.23 src/share/man/man3/dlfcn.3:1.24 --- src/share/man/man3/dlfcn.3:1.23 Fri Mar 13 14:23:30 2009 +++ src/share/man/man3/dlfcn.3 Mon Jan 18 15:25:52 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: dlfcn.3,v 1.23 2009/03/13 14:23:30 joerg Exp $ +.\" $NetBSD: dlfcn.3,v 1.24 2010/01/18 15:25:52 skrll Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 31, 2008 +.Dd January 18, 2010 .Dt DLFCN 3 .Os .Sh NAME @@ -39,7 +39,8 @@ .Nm dlerror .Nd dynamic link interface .Sh LIBRARY -(These functions are not in a library. They are included in every +(These functions are not in a library. +They are included in every dynamically linked program automatically.) .Sh SYNOPSIS .In dlfcn.h @@ -60,41 +61,85 @@ .Xr ld.so 1 . They allow new shared objects to be loaded into the process' address space under program control. +.Pp The .Fn dlopen -function takes a name of a shared object as the first argument. -The shared object is mapped into the address space, relocated and +function takes the name of a shared object as the first argument. +The shared object is mapped into the address space, relocated, and its external references are resolved in the same way as is done with the implicitly loaded shared libraries at program startup. -The argument can either be an absolute pathname or it can be of the form +.Pp +The +.Fa path +argument can be specified as either an absolute pathname to a shared object +or just the name of the shared object itself. +When an absolute pathname is specified, +only the path provided will be searched. +When just a shared object name is specified, the same search rules apply that are +used for +.Dq intrinsic +shared object searches. +.Pp +Shared libraries take the following form: .Sm off .Do lib Ao name Ac .so Oo .xx Oo .yy Oc Oc .Dc -.Sm on -in which case the same library search rules apply that are used for -.Dq intrinsic -shared library searches. +.Sm on . +.Pp If the first argument is .Dv NULL , .Fn dlopen -returns a handle on the global symbol object. This object +returns a +.Fa handle +on the global symbol object. +This object provides access to all symbols from an ordered set of objects consisting of the original program image and any dependencies loaded during startup. .Pp -The second argument has currently no effect, but should be set to -.Dv RTLD_LAZY -for future compatibility. +The +.Fa mode +parameter specifies symbol resolution time and symbol visibility. +One of the following values may be used to specify symbol resolution time: +.Bl -tag -width "RTLD_LAZYXX" -offset indent +.It Sy RTLD_NOW +Symbols are resolved immediately. +.It Sy RTLD_LAZY +Symbols are resolved when they are first referred to. +This is the default value if resolution time is unspecified. +.El +.Pp +One of the following values may be used to specify symbol visibility: +.Pp +.Bl -tag -width "RTLD_GLOBAL" -compact -offset indent +.It Sy RTLD_GLOBAL +The object's symbols and the symbols of its dependencies will be visible to +other objects. +.It Sy RTLD_LOCAL +The object's symbols and the symbols of its dependencies will not be visible to +other objects. +This is the default value if visibility is unspecified. +.El +.Pp +To specify both resolution time and visibility, bitwise inclusive OR one of +each of the above values together. +If an object was opened with RTLD_LOCAL and later opened with RTLD_GLOBAL, +then it is promoted to RTLD_GLOBAL. +.Pp .Fn dlopen -returns a handle to be used in calls to +returns a +.Fa handle +to be used in calls to .Fn dlclose , -.Fn dlsym +.Fn dlsym , and .Fn dlctl . If the named shared object has already been loaded by a previous call to .Fn dlopen .Pq and not yet unloaded by Fn dlclose , -a handle referring to the resident copy is returned. +a +.Fa handle +referring to the resident copy is returned. .Pp .Fn dlclose unlinks and removes the object referred to by @@ -102,21 +147,71 @@ from the process address space. If multiple calls to .Fn dlopen -have been done on this object -.Po or the object was one loaded at startup time -.Pc -the object is removed when its reference count drops to zero. +have been done on this object, or the object was one loaded at startup time, +or the object is a dependency of another object +then the object is removed whe
CVS commit: src/share/man/man3
Module Name:src Committed By: wiz Date: Mon Jan 18 15:36:11 UTC 2010 Modified Files: src/share/man/man3: dlfcn.3 Log Message: Use Dv for defined values. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/share/man/man3/dlfcn.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/dlfcn.3 diff -u src/share/man/man3/dlfcn.3:1.24 src/share/man/man3/dlfcn.3:1.25 --- src/share/man/man3/dlfcn.3:1.24 Mon Jan 18 15:25:52 2010 +++ src/share/man/man3/dlfcn.3 Mon Jan 18 15:36:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: dlfcn.3,v 1.24 2010/01/18 15:25:52 skrll Exp $ +.\" $NetBSD: dlfcn.3,v 1.25 2010/01/18 15:36:11 wiz Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -101,9 +101,9 @@ parameter specifies symbol resolution time and symbol visibility. One of the following values may be used to specify symbol resolution time: .Bl -tag -width "RTLD_LAZYXX" -offset indent -.It Sy RTLD_NOW +.It Dv RTLD_NOW Symbols are resolved immediately. -.It Sy RTLD_LAZY +.It Dv RTLD_LAZY Symbols are resolved when they are first referred to. This is the default value if resolution time is unspecified. .El @@ -111,10 +111,10 @@ One of the following values may be used to specify symbol visibility: .Pp .Bl -tag -width "RTLD_GLOBAL" -compact -offset indent -.It Sy RTLD_GLOBAL +.It Dv RTLD_GLOBAL The object's symbols and the symbols of its dependencies will be visible to other objects. -.It Sy RTLD_LOCAL +.It Dv RTLD_LOCAL The object's symbols and the symbols of its dependencies will not be visible to other objects. This is the default value if visibility is unspecified. @@ -122,8 +122,12 @@ .Pp To specify both resolution time and visibility, bitwise inclusive OR one of each of the above values together. -If an object was opened with RTLD_LOCAL and later opened with RTLD_GLOBAL, -then it is promoted to RTLD_GLOBAL. +If an object was opened with +.Dv RTLD_LOCAL +and later opened with +.Dv RTLD_GLOBAL , +then it is promoted to +.Dv RTLD_GLOBAL . .Pp .Fn dlopen returns a @@ -184,16 +188,16 @@ values may be used with .Fn dlsym : .Bl -tag -width "RTLD_DEFAULTXX" -offset indent -.It Sy NULL +.It Dv NULL Interpreted as a reference to the executable or shared object from which the call is being made. Thus an object can reference its own symbols and the symbols of its dependencies without calling .Fn dlopen . -.It Sy RTLD_DEFAULT +.It Dv RTLD_DEFAULT All the visible shared objects and the executable will be searched in the order they were loaded. -.It Sy RTLD_NEXT +.It Dv RTLD_NEXT The search for .Fa symbol is limited to the visible shared objects which were loaded after the one issuing the @@ -204,7 +208,7 @@ is called from the main program, all the visible shared libraries are searched. If it is called from a shared library, all subsequently visible shared libraries are searched. -.It Sy RTLD_SELF +.It Dv RTLD_SELF The search for .Fa symbol is limited to the shared object issuing the call to
CVS commit: src/share/man/man4/man4.sparc64
Module Name:src Committed By: jdc Date: Mon Jan 18 15:55:11 UTC 2010 Modified Files: src/share/man/man4/man4.sparc64: sab.4 Log Message: Add a note about the RSC ports on the E250. Bump date. Remove trailing whitespace. s;Sun Ultra 5/10;.Tn Sun Ultra; To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/man4.sparc64/sab.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.sparc64/sab.4 diff -u src/share/man/man4/man4.sparc64/sab.4:1.3 src/share/man/man4/man4.sparc64/sab.4:1.4 --- src/share/man/man4/man4.sparc64/sab.4:1.3 Wed Apr 30 13:10:56 2008 +++ src/share/man/man4/man4.sparc64/sab.4 Mon Jan 18 15:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: sab.4,v 1.3 2008/04/30 13:10:56 martin Exp $ +.\" $NetBSD: sab.4,v 1.4 2010/01/18 15:55:11 jdc Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 29, 2003 +.Dd January 18, 2010 .Dt SAB 4 sparc64 .Os .Sh NAME @@ -45,16 +45,24 @@ .Tn Infineon (previously .Tn Siemens ) -82532 serial communications interface found in Sun Ultra 5/10 -workstations. +82532 serial communications interface found in many +.Tn Sun Ultra +workstations and servers. .Pp Input and output speeds for each line may be set to any baud rate in the -following list: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, -4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200, +following list: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, +4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200, 460800, 614400, 921600. +.Sh NOTES +The speed cannot be changed on the ports connected the +.Tn Remote System Control +(RSC) on a +.Tn Sun Enterprise[tm] 250 Server +(ttyh2 and ttyh3). +These ports are fixed at 115200 baud. .Sh FILES .Bl -tag -width XdevXttyh0X -.It Pa /dev/ttyh[01] +.It Pa /dev/ttyh[0123] serial ports .El .Sh DIAGNOSTICS
CVS commit: src/sys/netisdn
Module Name:src Committed By: pooka Date: Mon Jan 18 16:29:51 UTC 2010 Modified Files: src/sys/netisdn: i4b_mbuf.c Log Message: Don't freak out if a kernel config already has I4B_MBUF_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/netisdn/i4b_mbuf.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/netisdn/i4b_mbuf.c diff -u src/sys/netisdn/i4b_mbuf.c:1.5 src/sys/netisdn/i4b_mbuf.c:1.6 --- src/sys/netisdn/i4b_mbuf.c:1.5 Sun Dec 11 12:25:06 2005 +++ src/sys/netisdn/i4b_mbuf.c Mon Jan 18 16:29:51 2010 @@ -27,7 +27,7 @@ * i4b - mbuf handling support routines * * - * $Id: i4b_mbuf.c,v 1.5 2005/12/11 12:25:06 christos Exp $ + * $Id: i4b_mbuf.c,v 1.6 2010/01/18 16:29:51 pooka Exp $ * * $FreeBSD$ * @@ -36,7 +36,7 @@ *---*/ #include -__KERNEL_RCSID(0, "$NetBSD: i4b_mbuf.c,v 1.5 2005/12/11 12:25:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i4b_mbuf.c,v 1.6 2010/01/18 16:29:51 pooka Exp $"); #include #include @@ -51,7 +51,9 @@ #include #include +#ifndef I4B_MBUF_DEBUG #define I4B_MBUF_DEBUG +#endif #undef I4B_MBUF_TYPE_DEBUG #ifdef I4B_MBUF_TYPE_DEBUG
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 16:34:47 UTC 2010 Modified Files: src/sys/dev/acpi: acpidevs Log Message: Add some ACPI 4.0 devices. ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpidevs 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/acpidevs diff -u src/sys/dev/acpi/acpidevs:1.13 src/sys/dev/acpi/acpidevs:1.14 --- src/sys/dev/acpi/acpidevs:1.13 Sun Sep 27 14:11:07 2009 +++ src/sys/dev/acpi/acpidevs Mon Jan 18 16:34:47 2010 @@ -1,4 +1,4 @@ -# $NetBSD: acpidevs,v 1.13 2009/09/27 14:11:07 jmcneill Exp $ +# $NetBSD: acpidevs,v 1.14 2010/01/18 16:34:47 jruoho Exp $ # # Extracted from: # http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/devids.txt @@ -354,5 +354,13 @@ ACPI0004 Module Device ACPI0005 SMBus 2.0 Host Controller ACPI0006 GPE Block Device +ACPI0007 Processor Device +ACPI0008 Ambient Light Sensor +ACPI0009 I/O APIC/SAPIC Device +ACPI000A I/O APIC Device +ACPI000B I/O SAPIC Device +ACPI000C Processor Aggregator +ACPI000D Power Meter +ACPI000E Wake Alarm Device # Others INT0800 Intel FWH Random Number Generator
CVS commit: src/sys/netisdn
Module Name:src Committed By: pooka Date: Mon Jan 18 16:37:41 UTC 2010 Modified Files: src/sys/netisdn: i4b_l4mgmt.c Log Message: Nuke some debug print code which has never compiled in NetBSD. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/netisdn/i4b_l4mgmt.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/netisdn/i4b_l4mgmt.c diff -u src/sys/netisdn/i4b_l4mgmt.c:1.17 src/sys/netisdn/i4b_l4mgmt.c:1.18 --- src/sys/netisdn/i4b_l4mgmt.c:1.17 Mon Jul 9 21:11:14 2007 +++ src/sys/netisdn/i4b_l4mgmt.c Mon Jan 18 16:37:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: i4b_l4mgmt.c,v 1.17 2007/07/09 21:11:14 ad Exp $ */ +/* $NetBSD: i4b_l4mgmt.c,v 1.18 2010/01/18 16:37:41 pooka Exp $ */ /* * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. @@ -29,7 +29,7 @@ * i4b_l4mgmt.c - layer 4 calldescriptor management utilites * --- * - * $Id: i4b_l4mgmt.c,v 1.17 2007/07/09 21:11:14 ad Exp $ + * $Id: i4b_l4mgmt.c,v 1.18 2010/01/18 16:37:41 pooka Exp $ * * $FreeBSD$ * @@ -38,7 +38,7 @@ *---*/ #include -__KERNEL_RCSID(0, "$NetBSD: i4b_l4mgmt.c,v 1.17 2007/07/09 21:11:14 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i4b_l4mgmt.c,v 1.18 2010/01/18 16:37:41 pooka Exp $"); #include "isdn.h" @@ -377,103 +377,4 @@ } } -#ifdef I4B_CD_DEBUG_PRINT - -extern char *print_l3state(call_desc_t *cd); - -void i4b_print_cdp(call_desc_t *cdp); -void i4b_print_cdx(int index); -void i4b_print_cda(void); -void i4b_print_cdaa(void); - -/*---* - * print a call descriptor by cd-pointer - *---*/ -void -i4b_print_cdp(call_desc_t *cdp) -{ - if((cdp > &(call_desc[num_call_desc])) || (cdp < &(call_desc[0]))) - { - printf("i4b_print_cd: cdp out of range!\n"); - return; - } - - printf("i4b_print_cd: printing call descriptor %d at 0x%lx:\n", cdp - (&(call_desc[0])), (unsigned long)cdp); - - printf(" cdid = %d\n", cdp->cdid); - printf(" controller = %d (u=%d, dl=%d, b1=%d, b2=%d)\n", - cdp->controller, - ctrl_desc[cdp->controller].unit, - ctrl_desc[cdp->controller].dl_est, - ctrl_desc[cdp->controller].bch_state[CHAN_B1], - ctrl_desc[cdp->controller].bch_state[CHAN_B2]); - printf(" cr = 0x%02x\n", cdp->cr); - printf(" crflag = %d\n", cdp->crflag); - printf("channelid = %d\n", cdp->channelid); - printf("bprot = %d\n", cdp->bprot); - printf(" driver = %d\n", cdp->driver); - printf(" driver_unit = %d\n", cdp->driver_unit); - printf(" call_state = %d\n", cdp->call_state); - printf("Q931state = %s\n", print_l3state(cdp)); - printf("event = %d\n", cdp->event); - printf(" response = %d\n", cdp->response); - printf(" T303 = %d\n", cdp->T303); - printf("T303_first_to = %d\n", cdp->T303_first_to); - printf(" T305 = %d\n", cdp->T305); - printf(" T308 = %d\n", cdp->T308); - printf("T308_first_to = %d\n", cdp->T308_first_to); - printf(" T309 = %d\n", cdp->T309); - printf(" T310 = %d\n", cdp->T310); - printf(" T313 = %d\n", cdp->T313); - printf(" T400 = %d\n", cdp->T400); - printf(" dir = %s\n", cdp->dir == DIR_OUTGOING ? "out" : "in"); -} - -/*---* - * print a call descriptor by index - *---*/ -void -i4b_print_cdx(int index) -{ - if(index >= num_call_desc) - { - printf("i4b_print_cdx: index %d >= N_CALL_DESC %d\n", index, N_CALL_DESC); - return; - } - i4b_print_cdp(&(call_desc[index])); -} - -/*---* - * print all call descriptors - *---*/ -void -i4b_print_cda(void) -{ - int i; - - for(i=0; i < num_call_desc; i++) - { - i4b_print_cdp(&(call_desc[i])); - } -} - -/*---* - * print all active call descriptors - *---*/ -void -i4b_print_cdaa(void) -{ - int i; - - for(i=0; i < num_call_desc; i++) - { - if(call_desc[i].cdid != CDID_UNUSED) - { - i4b_print_cdp(&(call_desc[i])); - } - } -} - -#endif /* I4B_CD_DEBUG_PRINT */ - #endif /* NISDN > 0 */
CVS commit: src/sys/arch/x86
Module Name:src Committed By: rmind Date: Mon Jan 18 16:40:18 UTC 2010 Modified Files: src/sys/arch/x86/include: cpu.h src/sys/arch/x86/x86: cpu_topology.c identcpu.c Log Message: x86_cpu_topology, not toplogy. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/cpu_topology.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/x86/identcpu.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/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.19 src/sys/arch/x86/include/cpu.h:1.20 --- src/sys/arch/x86/include/cpu.h:1.19 Sat Jan 9 20:56:17 2010 +++ src/sys/arch/x86/include/cpu.h Mon Jan 18 16:40:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.19 2010/01/09 20:56:17 cegger Exp $ */ +/* $NetBSD: cpu.h,v 1.20 2010/01/18 16:40:17 rmind Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -355,7 +355,7 @@ void cpu_identify(struct cpu_info *); /* cpu_topology.c */ -void x86_cpu_toplogy(struct cpu_info *); +void x86_cpu_topology(struct cpu_info *); /* vm_machdep.c */ void cpu_proc_fork(struct proc *, struct proc *); Index: src/sys/arch/x86/x86/cpu_topology.c diff -u src/sys/arch/x86/x86/cpu_topology.c:1.2 src/sys/arch/x86/x86/cpu_topology.c:1.3 --- src/sys/arch/x86/x86/cpu_topology.c:1.2 Tue May 26 01:42:02 2009 +++ src/sys/arch/x86/x86/cpu_topology.c Mon Jan 18 16:40:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_topology.c,v 1.2 2009/05/26 01:42:02 rmind Exp $ */ +/* $NetBSD: cpu_topology.c,v 1.3 2010/01/18 16:40:17 rmind Exp $ */ /*- * Copyright (c) 2009 Mindaugas Rasiukevicius , @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.2 2009/05/26 01:42:02 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.3 2010/01/18 16:40:17 rmind Exp $"); #include #include @@ -49,7 +49,7 @@ #include void -x86_cpu_toplogy(struct cpu_info *ci) +x86_cpu_topology(struct cpu_info *ci) { u_int lp_max; /* Logical processors per package */ u_int core_max; /* Core per package */ Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.17 src/sys/arch/x86/x86/identcpu.c:1.18 --- src/sys/arch/x86/x86/identcpu.c:1.17 Fri Oct 2 18:50:03 2009 +++ src/sys/arch/x86/x86/identcpu.c Mon Jan 18 16:40:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.17 2009/10/02 18:50:03 jmcneill Exp $ */ +/* $NetBSD: identcpu.c,v 1.18 2010/01/18 16:40:18 rmind Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.17 2009/10/02 18:50:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.18 2010/01/18 16:40:18 rmind Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -652,7 +652,7 @@ cpu_probe_c3(ci); cpu_probe_geode(ci); - x86_cpu_toplogy(ci); + x86_cpu_topology(ci); if (cpu_vendor != CPUVENDOR_AMD && (ci->ci_feature_flags & CPUID_TM) && (rdmsr(MSR_MISC_ENABLE) & (1 << 3)) == 0) {
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: pooka Date: Mon Jan 18 16:43:15 UTC 2010 Modified Files: src/sys/arch/i386/conf: ALL Log Message: include ISDN support To generate a diff of this commit: cvs rdiff -u -r1.227 -r1.228 src/sys/arch/i386/conf/ALL 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/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.227 src/sys/arch/i386/conf/ALL:1.228 --- src/sys/arch/i386/conf/ALL:1.227 Thu Jan 7 18:49:30 2010 +++ src/sys/arch/i386/conf/ALL Mon Jan 18 16:43:15 2010 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.227 2010/01/07 18:49:30 tnn Exp $ +# $NetBSD: ALL,v 1.228 2010/01/18 16:43:15 pooka Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.227 $" +#ident "ALL-$Revision: 1.228 $" maxusers 64 # estimated number of users @@ -1645,6 +1645,94 @@ options PAX_ASLR=0 # PaX Address Space Layout Randomization options PAX_SEGVGUARD=0 # PaX Segmentation fault guard +# +# NetBSD: GENERIC_ISDN,v 1.16 2010/01/03 03:53:34 dholland Exp +# + +#- +# Various ISDN board drivers: +#- +# Legacy ISA cards (no P&P support): +# +# Teles S0/8 or Niccy 1008 +options ISICISA_TEL_S0_8 +#isic0 at isa? iomem 0xd irq 2 +# Teles S0/16 or Creatix ISDN-S0 or Niccy 1016 +options ISICISA_TEL_S0_16 +#isic0 at isa? port 0xd80 iomem 0xd irq 9 +# Teles S0/16.3 +options ISICISA_TEL_S0_16_3 +#isic0 at isa? port 0xd80 irq 12 +# AVM A1 or AVM Fritz!Card +options ISICISA_AVM_A1 +isic0 at isa? port 0x340 irq 10 +# USRobotics Sportster ISDN TA intern +options ISICISA_USR_STI +#isic0 at isa? port 0x268 irq 10 +# ITK ix1 micro +options ISICISA_ITKIX1 +#isic0 at isa? port 0x398 irq 10 +# +# XXX not ready yet: +# Active EICON/Diehl Cards: S, SX, SXn, SCOM or QUADRO +#daic0 at isa? iomem 0xd8000 irq 10 +# +#- +# Supported ISA Plug & Play cards: +# +options ISICPNP_TEL_S0_16_3_P # Teles S0/16PnP (but not 16.3c !) +options ISICPNP_CRTX_S0_P # Creatix ISDN-S0 P&P +options ISICPNP_DRN_NGO # Dr. Neuhaus Niccy GO@ +options ISICPNP_ELSA_QS1ISA # ELSA QuickStep 1000 (ISA Version) +options ISICPNP_ELSA_PCC16 # later variant of ELSA QuickStep +options ISICPNP_SEDLBAUER # Sedlbauer WinSpeed +options ISICPNP_DYNALINK # Dynalink IS64PH +options ISICPNP_SIEMENS_ISURF2 # Siemens I-Surf +options ISICPNP_ITKIX # ITK IX PnP cards +isic* at isapnp? +# +#- +# Supported PCI cards: +# +isic* at pci? + +# Winbond W6692 +iwic* at pci? + +# AVM Fritz!PCI card +ifpci* at pci? + +# AVM Fritz!PCI V2 card +ifritz* at pci? + +# AVM B1/T1 PCI card +iavc* at pci? + +# +#- +# Supported PCMCIA cards: +# +options ISICPCMCIA_AVM_A1 # Fritz!Card PCMCIA Version +options ISICPCMCIA_ELSA_ISDNMC # ELSA MicroLink ISDN/MC +options ISICPCMCIA_ELSA_MCALL # ELSA MicroLink MC/all +options ISICPCMCIA_SBSPEEDSTAR2 # Sedlbauer speed star II +isic* at pcmcia? function ? +# + +#- +# ISDN user land devices, drivers and pseudo-devices. +#- +# +pseudo-device isdn # communication with userland daemon +pseudo-device isdntrc 2 # userland driver to do ISDN tracing +pseudo-device isdnctl # userland driver to control the whole thing +pseudo-device isdnbchan 4 # userland driver for access to raw B channel +pseudo-device isdntel 2 # userland driver for telephony +options IRIP_VJ # compile support for VJ compression +pseudo-device irip 2 # network driver for IP over raw HDLC ISDN +pseudo-device ippp 2 # synchronous PPP over ISDN +#- + options ATHHAL_DEBUG options A9PCIC_DEBUG options AAC_DEBUG @@ -1903,7 +1991,6 @@ options HSCXBDEBUG options I2ODEBUG options I4BISPPPDEBUG -options I4B_CD_DEBUG_PRINT options I4B_MBUF_DEBUG options I4B_MBUF_TYPE_DEBUG options IBCS2_DEBUG
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 16:50:08 UTC 2010 Modified Files: src/sys/dev/acpi: acpidevs_data.h Log Message: regen. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/acpidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpidevs_data.h diff -u src/sys/dev/acpi/acpidevs_data.h:1.11 src/sys/dev/acpi/acpidevs_data.h:1.12 --- src/sys/dev/acpi/acpidevs_data.h:1.11 Sun Sep 27 14:11:58 2009 +++ src/sys/dev/acpi/acpidevs_data.h Mon Jan 18 16:50:08 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: acpidevs_data.h,v 1.11 2009/09/27 14:11:58 jmcneill Exp $ */ +/* $NetBSD: acpidevs_data.h,v 1.12 2010/01/18 16:50:08 jruoho Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * # NetBSD: acpidevs,v 1.13 2009/09/27 14:11:07 jmcneill Exp + * # NetBSD: acpidevs,v 1.14 2010/01/18 16:34:47 jruoho Exp */ const struct { const char *pnp, *str; } acpi_knowndevs[] = { @@ -1313,6 +1313,38 @@ "GPE Block Device", }, { + "ACPI0007", + "Processor Device", + }, + { + "ACPI0008", + "Ambient Light Sensor", + }, + { + "ACPI0009", + "I/O APIC/SAPIC Device", + }, + { + "ACPI000A", + "I/O APIC Device", + }, + { + "ACPI000B", + "I/O SAPIC Device", + }, + { + "ACPI000C", + "Processor Aggregator", + }, + { + "ACPI000D", + "Power Meter", + }, + { + "ACPI000E", + "Wake Alarm Device", + }, + { "INT0800", "Intel FWH Random Number Generator", },
CVS commit: src/share/wscons/fonts
Module Name:src Committed By: ahoka Date: Mon Jan 18 16:55:36 UTC 2010 Modified Files: src/share/wscons/fonts: Makefile Added Files: src/share/wscons/fonts: latin2.808.uue latin2.814.uue latin2.816.uue Log Message: Add font files for latin-2 (ISO 8859-2) encoding. Loading these fonts will enable wscons to read texts in central european languages, eg. HU or CZ. >From FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/wscons/fonts/Makefile cvs rdiff -u -r0 -r1.1 src/share/wscons/fonts/latin2.808.uue \ src/share/wscons/fonts/latin2.814.uue \ src/share/wscons/fonts/latin2.816.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/wscons/fonts/Makefile diff -u src/share/wscons/fonts/Makefile:1.9 src/share/wscons/fonts/Makefile:1.10 --- src/share/wscons/fonts/Makefile:1.9 Fri Mar 19 08:07:27 2004 +++ src/share/wscons/fonts/Makefile Mon Jan 18 16:55:36 2010 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2004/03/19 08:07:27 jmc Exp $ +# $NetBSD: Makefile,v 1.10 2010/01/18 16:55:36 ahoka Exp $ FONTS= vt220l.814 vt220h.814 vt220l.808 vt220h.808 \ vt220l.816 vt220h.816 vt220l.810 vt220h.810 \ + latin2.808 latin2.814 latin2.816 \ donna.816 flori.816 orator.816 FILES=${FONTS} Added files: Index: src/share/wscons/fonts/latin2.808.uue diff -u /dev/null src/share/wscons/fonts/latin2.808.uue:1.1 --- /dev/null Mon Jan 18 16:55:36 2010 +++ src/share/wscons/fonts/latin2.808.uue Mon Jan 18 16:55:36 2010 @@ -0,0 +1,51 @@ +# $NetBSD: latin2.808.uue,v 1.1 2010/01/18 16:55:36 ahoka Exp $ +# $FreeBSD: src/share/syscons/fonts/iso02-8x8.fnt,v 1.3.36.1.2.1 2009/10/25 01:10:29 kensmith Exp $ +begin 644 latin2.808 +M +M +M +M +M +MP\&!...@` +M&`!L;&P``&QL_FS^;&P`Y@/`9\&```QLP8,&;&`#AL.';`'y...@?`8&9CP`'#...@?&9F/`...@8,&!...@8`#qf +M9CQF9CP`/&9F/@8,.```&!...@``!@8```8&```&!...@p#!@P8#`8#'X``'X` +M`&`P&`P8,&``/&8...@`&`!\QM[>wl!...@\9f9^9f8`_&9F?&9F_``\9L#` +MP&8\`/AL9F9F;/@`_F)H>&a...@#^8fax:P`#QFP,#.9cx`9f9f?f...@`\ +M&!...@8&!...@\`!x,#`S,S'@`YF9L>&q...@#p8&!...@8f;^`,;N_O[6QL8`QN;VWL[& +...@`x;,;&QFPX`/qf...@8/``/&9f9f...@#\9f9\;&;F`#QF,!@,9CP`?EH8 +M&!...@8/`!F9F9F9F9^`&9F9F9F/!...@`ql;&uo...@#&;#...@x;,;&`&9F9CP8P` +M_L:,)f...@`\,#`P,#`\`,!@,!@,!@(`/`P,#`P,/``0.&S& +M``#_,#`8`'@,?,qv...@8'QF9MP\9F!F/``<#`Q\S,QV +M/&9^8#P`'#8P>#`P>';,S'P,^.!@;'9F9N8`&``X&!...@8/``&``8&!F9F +M/@9fqx;.8...@8&!...@8/,S^_M;&?&9F9F8\9F9F/-QF +m...@\```=ls,?`P>``#<=...@\#y@/`9\`!`p?#`...@```#,S,S,=...@`` +M`&9F9CP8QM;^_FP```#&;#...@```&9F9CX&?```?DP8,gx...@8SL8`;#cf]m...@`,&'S&QL9\`#AL?,;&QGP`-FQ\QL;& +M?`#&?,;&QL9\``#&;#...@``;#C\QOS,q...@`x;/;&QL9\``P8QL;&QGP`-FS& +MQL;&?`#&`,;&QL9\``Q^9F8\P`?EH8&!...@8/`YXS,S8S,;,``P8W'9F8/`` +M#!AX#'S,=...@`x;'@,?,QV`,9\>`Q\S'8`S`!X#'S,=...@!s-c`p,#!X``P8`#Q@ +M8#P\9F!F/#...@v'``\8&`\``P8/&9^8#P\9GY@/!QF`#QF?F`\`#8< +M/&9^8#p...@x&!...@8/``<-...@8&!...@\`&PX#`Q\S'8`##X,?,S,=...@`,&'QF9F9F +M`&PX?&9f9f8...@`/&9F/``<-...@`\9f8\`#9l`#qf9cp`9@`\9F9F/```&`!^ +...@``&PXW'9F8/``,,PPS,S,=...@`8,`#,S,QV`&S8`,S,S'8`S`#,S,S,=...@`, +7&&9F9CX&?!`p?#`...@.&``` +` +end Index: src/share/wscons/fonts/latin2.814.uue diff -u /dev/null src/share/wscons/fonts/latin2.814.uue:1.1 --- /dev/null Mon Jan 18 16:55:36 2010 +++ src/share/wscons/fonts/latin2.814.uue Mon Jan 18 16:55:36 2010 @@ -0,0 +1,85 @@ +# $NetBSD: latin2.814.uue,v 1.1 2010/01/18 16:55:36 ahoka Exp $ +# $FreeBSD: src/share/syscons/fonts/iso02-8x14.fnt,v 1.3.36.1.2.1 2009/10/25 01:10:29 kensmith Exp $ +begin 644 latin2.814 +M +M +M +M +M +M +M +M +M +M +M```8/#P\&!...@`&!...@`9f9f)```;&S^ +M;&QL_FQL&!A\QL+`?`:&QGP8&```PL8,...@``.&QL.';< +MS,QV`#`P,&P8,#`P,#`8#```,!@,#`P,#...@p +M`&8\_SQF&!A^&!...@`&!...@8,``` +m``...@`8&`...@8,...@p(``
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: ahoka Date: Mon Jan 18 16:57:39 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi Log Message: Add the new latin2 fonts for wscons to the file list. To generate a diff of this commit: cvs rdiff -u -r1.854 -r1.855 src/distrib/sets/lists/base/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.854 src/distrib/sets/lists/base/mi:1.855 --- src/distrib/sets/lists/base/mi:1.854 Sat Jan 16 16:12:01 2010 +++ src/distrib/sets/lists/base/mi Mon Jan 18 16:57:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.854 2010/01/16 16:12:01 roy Exp $ +# $NetBSD: mi,v 1.855 2010/01/18 16:57:39 ahoka Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -3994,6 +3994,9 @@ ./usr/share/wscons/fonts/vt220l.810 base-util-share share ./usr/share/wscons/fonts/vt220l.814 base-util-share share ./usr/share/wscons/fonts/vt220l.816 base-util-share share +./usr/share/wscons/fonts/latin2.808 base-util-share share +./usr/share/wscons/fonts/latin2.814 base-util-share share +./usr/share/wscons/fonts/latin2.816 base-util-share share ./usr/share/wscons/keymaps base-util-share ./usr/share/wscons/keymaps/amikbd.pl.qwertz.iso8859-2 base-util-share share ./usr/share/wscons/keymaps/mkbd.pt.iso8859-1 base-util-share share
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 17:09:17 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_tz.c Log Message: Fix a minor bug where a reference handle is used for error reporting even though it may not be present. While here, convert few lines to aprint_*(). ok pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/acpi/acpi_tz.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/acpi/acpi_tz.c diff -u src/sys/dev/acpi/acpi_tz.c:1.54 src/sys/dev/acpi/acpi_tz.c:1.55 --- src/sys/dev/acpi/acpi_tz.c:1.54 Tue Jan 5 13:47:52 2010 +++ src/sys/dev/acpi/acpi_tz.c Mon Jan 18 17:09:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_tz.c,v 1.54 2010/01/05 13:47:52 jruoho Exp $ */ +/* $NetBSD: acpi_tz.c,v 1.55 2010/01/18 17:09:17 jruoho Exp $ */ /* * Copyright (c) 2003 Jared D. McNeill @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.54 2010/01/05 13:47:52 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.55 2010/01/18 17:09:17 jruoho Exp $"); #include #include @@ -401,25 +401,21 @@ case ACPI_TYPE_STRING: rv = AcpiGetHandle(NULL, obj->String.Pointer, &cooler); if (ACPI_FAILURE(rv)) { - printf("acpitz_switch_cooler: " - "failed to get handler from %s\n", - obj->String.Pointer); + aprint_error("%s: failed to get handler from %s\n", + __func__, obj->String.Pointer); return rv; } break; default: - printf("acpitz_switch_cooler: " - "unknown power type: %d\n", obj->Type); + aprint_error("%s: unknown power type: %u\n", + __func__, obj->Type); return AE_OK; } rv = acpi_pwr_switch_consumer(cooler, pwr_state); - if (rv != AE_BAD_PARAMETER && ACPI_FAILURE(rv)) { - printf("acpitz_switch_cooler: " - "failed to change state for %s: %s\n", - acpi_name(obj->Reference.Handle), - AcpiFormatException(rv)); - } + if (rv != AE_BAD_PARAMETER && ACPI_FAILURE(rv)) + aprint_error("%s: failed to change state for %s: %s\n", + __func__, acpi_name(cooler), AcpiFormatException(rv)); return AE_OK; }
CVS commit: src/etc
Module Name:src Committed By: ahoka Date: Mon Jan 18 17:10:29 UTC 2010 Modified Files: src/etc: wscons.conf Log Message: Add examples to make switching wscons to ISO 8859-2 as easy as removing some hashmarks. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/etc/wscons.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/wscons.conf diff -u src/etc/wscons.conf:1.17 src/etc/wscons.conf:1.18 --- src/etc/wscons.conf:1.17 Sun Nov 15 07:43:13 2009 +++ src/etc/wscons.conf Mon Jan 18 17:10:29 2010 @@ -1,4 +1,4 @@ -# $NetBSD: wscons.conf,v 1.17 2009/11/15 07:43:13 tsutsui Exp $ +# $NetBSD: wscons.conf,v 1.18 2010/01/18 17:10:29 ahoka Exp $ # # workstation console configuration @@ -12,6 +12,10 @@ #font pcvt - - pcvt /usr/share/wscons/fonts/vt220h.816 #font pcvt - 8 pcvt /usr/share/wscons/fonts/vt220h.808 +# Font for central european languages (ISO 8859-2). +# Uncomment to load. Needs to be explicitly enabled (see below). +#font latin2 - 16 iso /usr/share/wscons/fonts/latin2.816 + # screens to create # idx screen emul # Screen 0 is already configured as console in most cases. @@ -30,7 +34,7 @@ # Select a kernel builtin keyboard map by uncommenting the following line and # altering the country code to your requirements -# (choose from user, us, uk, de, dk, it, fr, jp, sv, no, es, pt, cz). +# (choose from user, us, uk, de, dk, it, fr, jp, sv, no, es, pt, cz, hu). # See wsconsctl(8), pckbd(4), ukbd(4) etc. for more details. #encoding sv #encoding us.swapctrlcaps @@ -45,6 +49,12 @@ #setvar ttyE0 font ibm #setvar ttyE1 font ibm +# Uncomment for ISO 8859-2 support +#setvar ttyE0 font latin2 +#setvar ttyE1 font latin2 +#setvar ttyE2 font latin2 +#setvar ttyE3 font latin2 + # Change keyboard repeat speed to faster settings. #setvar wskbd repeat.del1 250 #setvar wskbd repeat.deln 30
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 17:11:00 UTC 2010 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c Log Message: Add definitions for volume keys. ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/thinkpad_acpi.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/acpi/thinkpad_acpi.c diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.22 src/sys/dev/acpi/thinkpad_acpi.c:1.23 --- src/sys/dev/acpi/thinkpad_acpi.c:1.22 Fri Jan 8 20:40:41 2010 +++ src/sys/dev/acpi/thinkpad_acpi.c Mon Jan 18 17:11:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.22 2010/01/08 20:40:41 dyoung Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.23 2010/01/18 17:11:00 jruoho Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.22 2010/01/08 20:40:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.23 2010/01/18 17:11:00 jruoho Exp $"); #include #include @@ -94,6 +94,9 @@ #define THINKPAD_NOTIFY_BrightnessDown 0x011 #define THINKPAD_NOTIFY_ThinkLight 0x012 #define THINKPAD_NOTIFY_Zoom 0x014 +#define THINKPAD_NOTIFY_VolumeUp 0x015 +#define THINKPAD_NOTIFY_VolumeDown 0x016 +#define THINKPAD_NOTIFY_VolumeMute 0x017 #define THINKPAD_NOTIFY_ThinkVantage 0x018 #define THINKPAD_CMOS_BRIGHTNESS_UP 0x04 @@ -386,6 +389,9 @@ case THINKPAD_NOTIFY_FnF10: case THINKPAD_NOTIFY_FnF11: case THINKPAD_NOTIFY_ThinkLight: + case THINKPAD_NOTIFY_VolumeUp: + case THINKPAD_NOTIFY_VolumeDown: + case THINKPAD_NOTIFY_VolumeMute: /* XXXJDM we should deliver hotkeys as keycodes */ break; default:
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 17:34:37 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c Log Message: Ensure that the return string is NUL-terminated in acpi_eval_string(). ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/dev/acpi/acpi.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.144 src/sys/dev/acpi/acpi.c:1.145 --- src/sys/dev/acpi/acpi.c:1.144 Tue Jan 12 12:21:04 2010 +++ src/sys/dev/acpi/acpi.c Mon Jan 18 17:34:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.144 2010/01/12 12:21:04 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.145 2010/01/18 17:34:37 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.144 2010/01/12 12:21:04 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.145 2010/01/18 17:34:37 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -1189,27 +1189,41 @@ ACPI_STATUS acpi_eval_string(ACPI_HANDLE handle, const char *path, char **stringp) { - ACPI_STATUS rv; + ACPI_OBJECT *obj; ACPI_BUFFER buf; + ACPI_STATUS rv; - if (handle == NULL) - handle = ACPI_ROOT_OBJECT; + rv = acpi_eval_struct(handle, path, &buf); - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_LOCAL_BUFFER; + if (ACPI_FAILURE(rv)) + return rv; - rv = AcpiEvaluateObjectTyped(handle, path, NULL, &buf, ACPI_TYPE_STRING); - if (ACPI_SUCCESS(rv)) { - ACPI_OBJECT *param = buf.Pointer; - const char *ptr = param->String.Pointer; - size_t len = param->String.Length; - if ((*stringp = ACPI_ALLOCATE(len)) == NULL) - rv = AE_NO_MEMORY; - else - (void)memcpy(*stringp, ptr, len); - ACPI_FREE(param); + obj = buf.Pointer; + + if (obj->Type != ACPI_TYPE_STRING) { + rv = AE_TYPE; + goto out; + } + + if (obj->String.Length == 0) { + rv = AE_BAD_DATA; + goto out; + } + + *stringp = ACPI_ALLOCATE(obj->String.Length + 1); + + if (*stringp == NULL) { + rv = AE_NO_MEMORY; + goto out; } + (void)memcpy(*stringp, obj->String.Pointer, obj->String.Length); + + (*stringp)[obj->String.Length] = '\0'; + +out: + ACPI_FREE(buf.Pointer); + return rv; }
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: pooka Date: Mon Jan 18 17:53:35 UTC 2010 Modified Files: src/sys/arch/alpha/conf: files.alpha Removed Files: src/sys/arch/alpha/a12: if_ade.c if_adevar.h Log Message: if_ade doesn't build, suggesting nobody has tried to do anything else than rototill it for the past n+1 years. The comments at the top note a number of clauses after which it can be removed. I'm sure that in the past 10+ years those have either been met or become irrelevant, so remove this. To generate a diff of this commit: cvs rdiff -u -r1.36 -r0 src/sys/arch/alpha/a12/if_ade.c cvs rdiff -u -r1.6 -r0 src/sys/arch/alpha/a12/if_adevar.h cvs rdiff -u -r1.181 -r1.182 src/sys/arch/alpha/conf/files.alpha 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/alpha/conf/files.alpha diff -u src/sys/arch/alpha/conf/files.alpha:1.181 src/sys/arch/alpha/conf/files.alpha:1.182 --- src/sys/arch/alpha/conf/files.alpha:1.181 Fri Aug 21 03:39:41 2009 +++ src/sys/arch/alpha/conf/files.alpha Mon Jan 18 17:53:35 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.alpha,v 1.181 2009/08/21 03:39:41 thorpej Exp $ +# $NetBSD: files.alpha,v 1.182 2010/01/18 17:53:35 pooka Exp $ # # alpha-specific configuration info @@ -355,13 +355,6 @@ file arch/alpha/pci/sio_pic.c sio | pceb # -# A12 if_de hack -# -device ade: ether, ifnet, arp -attach ade at pci -file arch/alpha/a12/if_ade.c ade - -# # alpha/a12 platform-specific drivers #
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 18:06:31 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpivar.h Log Message: Introduce acpi_eval_reference_handle() -- an utility function to evaluate reference handles from package elements. ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.38 -r1.39 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.145 src/sys/dev/acpi/acpi.c:1.146 --- src/sys/dev/acpi/acpi.c:1.145 Mon Jan 18 17:34:37 2010 +++ src/sys/dev/acpi/acpi.c Mon Jan 18 18:06:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.145 2010/01/18 17:34:37 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.146 2010/01/18 18:06:31 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.145 2010/01/18 17:34:37 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.146 2010/01/18 18:06:31 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -1251,6 +1251,38 @@ } /* + * acpi_eval_reference_handle: + * + * Evaluate a reference handle from an element in a package. + */ +ACPI_STATUS +acpi_eval_reference_handle(ACPI_OBJECT *elm, ACPI_HANDLE *handle) +{ + + if (elm == NULL || handle == NULL) + return AE_BAD_PARAMETER; + + switch (elm->Type) { + + case ACPI_TYPE_ANY: + case ACPI_TYPE_LOCAL_REFERENCE: + + if (elm->Reference.Handle == NULL) + return AE_NULL_ENTRY; + + *handle = elm->Reference.Handle; + + return AE_OK; + + case ACPI_TYPE_STRING: + return AcpiGetHandle(NULL, elm->String.Pointer, handle); + + default: + return AE_TYPE; + } +} + +/* * acpi_foreach_package_object: * * Iterate over all objects in a in a packages and pass then all Index: src/sys/dev/acpi/acpivar.h diff -u src/sys/dev/acpi/acpivar.h:1.38 src/sys/dev/acpi/acpivar.h:1.39 --- src/sys/dev/acpi/acpivar.h:1.38 Sun Nov 29 21:32:50 2009 +++ src/sys/dev/acpi/acpivar.h Mon Jan 18 18:06:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpivar.h,v 1.38 2009/11/29 21:32:50 cegger Exp $ */ +/* $NetBSD: acpivar.h,v 1.39 2010/01/18 18:06:31 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -271,6 +271,7 @@ ACPI_INTEGER arg); ACPI_STATUS acpi_eval_string(ACPI_HANDLE, const char *, char **); ACPI_STATUS acpi_eval_struct(ACPI_HANDLE, const char *, ACPI_BUFFER *); +ACPI_STATUS acpi_eval_reference_handle(ACPI_OBJECT *, ACPI_HANDLE *); ACPI_STATUS acpi_foreach_package_object(ACPI_OBJECT *, ACPI_STATUS (*)(ACPI_OBJECT *, void *), void *);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdc Date: Mon Jan 18 18:09:23 UTC 2010 Modified Files: src/sys/dev/pci: if_casvar.h Log Message: Add definitions for CAS_INTR_REG and CAS_INTR_PCI. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_casvar.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/if_casvar.h diff -u src/sys/dev/pci/if_casvar.h:1.1 src/sys/dev/pci/if_casvar.h:1.2 --- src/sys/dev/pci/if_casvar.h:1.1 Thu Jan 7 09:19:55 2010 +++ src/sys/dev/pci/if_casvar.h Mon Jan 18 18:09:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_casvar.h,v 1.1 2010/01/07 09:19:55 jdc Exp $ */ +/* $NetBSD: if_casvar.h,v 1.2 2010/01/18 18:09:22 jdc Exp $ */ /* $OpenBSD: if_casvar.h,v 1.6 2009/06/13 12:18:58 kettenis Exp $ */ /* @@ -256,6 +256,9 @@ CAS_CDRXSYNC((sc), (d), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \ } while (0) +#define CAS_INTR_PCI 1 +#define CAS_INTR_REG 2 + #define ETHER_ALIGN 2 #endif
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: pooka Date: Mon Jan 18 18:14:43 UTC 2010 Modified Files: src/sys/arch/amiga/dev: if_qn.c Log Message: Fix bpf. compile-tested only. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amiga/dev/if_qn.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/amiga/dev/if_qn.c diff -u src/sys/arch/amiga/dev/if_qn.c:1.35 src/sys/arch/amiga/dev/if_qn.c:1.36 --- src/sys/arch/amiga/dev/if_qn.c:1.35 Mon Oct 26 19:16:54 2009 +++ src/sys/arch/amiga/dev/if_qn.c Mon Jan 18 18:14:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_qn.c,v 1.35 2009/10/26 19:16:54 cegger Exp $ */ +/* $NetBSD: if_qn.c,v 1.36 2010/01/18 18:14:43 pooka Exp $ */ /* * Copyright (c) 1995 Mika Kortelainen @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.35 2009/10/26 19:16:54 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.36 2010/01/18 18:14:43 pooka Exp $"); #include "qn.h" #if NQN > 0 @@ -147,9 +147,6 @@ u_short volatile *nic_reset; u_short volatile *nic_len; u_char transmit_pending; -#if NBPFILTER > 0 - void * sc_bpf; -#endif } qn_softc[NQN]; #if NBPFILTER > 0 @@ -414,8 +411,8 @@ * that RAM is not visible to the host but is read from FIFO) * */ - if (sc->sc_bpf) - bpf_mtap(sc->sc_bpf, m); + if (ifp->if_bpf) + bpf_mtap(ifp->if_bpf, m); #endif len = qn_put(sc->nic_fifo, m); m_freem(m); @@ -598,8 +595,8 @@ } #if NBPFILTER > 0 - if (sc->sc_bpf) - bpf_mtap(sc->sc_bpf, head); + if (ifp->if_bpf) + bpf_mtap(ifp->if_bpf, head); #endif (*ifp->if_input)(ifp, head);
CVS commit: src/sys/arch/arm/gemini
Module Name:src Committed By: pooka Date: Mon Jan 18 18:23:53 UTC 2010 Modified Files: src/sys/arch/arm/gemini: gemini_gmac.c Log Message: Pass correct pointer to bpf_mtap() and most likely avoid a crash if bpf is activated. not even compile-tested, since i can't find any config in the tree which uses this(?) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/gemini/gemini_gmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/gemini/gemini_gmac.c diff -u src/sys/arch/arm/gemini/gemini_gmac.c:1.3 src/sys/arch/arm/gemini/gemini_gmac.c:1.4 --- src/sys/arch/arm/gemini/gemini_gmac.c:1.3 Tue Dec 23 02:15:10 2008 +++ src/sys/arch/arm/gemini/gemini_gmac.c Mon Jan 18 18:23:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gemini_gmac.c,v 1.3 2008/12/23 02:15:10 matt Exp $ */ +/* $NetBSD: gemini_gmac.c,v 1.4 2010/01/18 18:23:53 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -49,7 +49,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.3 2008/12/23 02:15:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.4 2010/01/18 18:23:53 pooka Exp $"); #define SWFREEQ_DESCS 256 /* one page worth */ #define HWFREEQ_DESCS 256 /* one page worth */ @@ -550,7 +550,7 @@ #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp, m); + bpf_mtap(ifp->if_bpf, m); #endif m_freem(m); } @@ -860,7 +860,7 @@ KASSERT(m_length(m) == m->m_pkthdr.len); #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp, m); + bpf_mtap(ifp->if_bpf, m); #endif (*ifp->if_input)(ifp, m); break;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 18:36:50 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_ec.c acpi_powerres.c acpi_tz.c Log Message: Use acpi_eval_reference_handle() to simplify code. No functional change. ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/dev/acpi/acpi_ec.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_powerres.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/acpi/acpi_tz.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/acpi/acpi_ec.c diff -u src/sys/dev/acpi/acpi_ec.c:1.58 src/sys/dev/acpi/acpi_ec.c:1.59 --- src/sys/dev/acpi/acpi_ec.c:1.58 Fri Jan 8 20:40:41 2010 +++ src/sys/dev/acpi/acpi_ec.c Mon Jan 18 18:36:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_ec.c,v 1.58 2010/01/08 20:40:41 dyoung Exp $ */ +/* $NetBSD: acpi_ec.c,v 1.59 2010/01/18 18:36:49 jruoho Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger . @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.58 2010/01/08 20:40:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.59 2010/01/18 18:36:49 jruoho Exp $"); #include #include @@ -459,27 +459,16 @@ } c = &p->Package.Elements[0]; - switch (c->Type) { - case ACPI_TYPE_LOCAL_REFERENCE: - case ACPI_TYPE_ANY: - *gpe_handle = c->Reference.Handle; - break; - case ACPI_TYPE_STRING: - /* XXX should be using real scope here */ - rv = AcpiGetHandle(NULL, p->String.Pointer, gpe_handle); - if (rv != AE_OK) { - aprint_error_dev(self, - "_GPE device reference unresolvable\n"); - ACPI_FREE(p); - return false; - } - break; - default: - aprint_error_dev(self, "_GPE device reference incorrect\n"); + rv = acpi_eval_reference_handle(c, gpe_handle); + + if (ACPI_FAILURE(rv)) { + aprint_error_dev(self, "failed to evaluate _GPE handle\n"); ACPI_FREE(p); return false; } + c = &p->Package.Elements[1]; + if (c->Type != ACPI_TYPE_INTEGER) { aprint_error_dev(self, "_GPE package needs integer as 2nd field\n"); Index: src/sys/dev/acpi/acpi_powerres.c diff -u src/sys/dev/acpi/acpi_powerres.c:1.8 src/sys/dev/acpi/acpi_powerres.c:1.9 --- src/sys/dev/acpi/acpi_powerres.c:1.8 Tue Jan 5 13:39:49 2010 +++ src/sys/dev/acpi/acpi_powerres.c Mon Jan 18 18:36:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_powerres.c,v 1.8 2010/01/05 13:39:49 jruoho Exp $ */ +/* $NetBSD: acpi_powerres.c,v 1.9 2010/01/18 18:36:50 jruoho Exp $ */ /*- * Copyright (c) 2001 Michael Smith @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_powerres.c,v 1.8 2010/01/05 13:39:49 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_powerres.c,v 1.9 2010/01/18 18:36:50 jruoho Exp $"); #include #include @@ -487,36 +487,10 @@ ACPI_FUNCTION_TRACE(__func__); - /* check the object type */ - switch (obj->Type) { - case ACPI_TYPE_LOCAL_REFERENCE: - case ACPI_TYPE_ANY: - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "building reference from %s to %s\n", - acpi_name(pc->ac_consumer), acpi_name(obj->Reference.Handle))); + status = acpi_eval_reference_handle(obj, &res); - res = obj->Reference.Handle; - break; - - case ACPI_TYPE_STRING: - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, - "building reference from %s to %s\n", - acpi_name(pc->ac_consumer), - obj->String.Pointer)); - - /* get the handle of the resource */ - status = AcpiGetHandle(NULL, obj->String.Pointer, &res); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, - "couldn't find power resource %s\n", - obj->String.Pointer)); - return_ACPI_STATUS(AE_OK); - } - break; - - default: - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, - "don't know how to create a power reference to object type %d\n", - obj->Type)); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "failed to get handle\n")); return_ACPI_STATUS(AE_OK); } Index: src/sys/dev/acpi/acpi_tz.c diff -u src/sys/dev/acpi/acpi_tz.c:1.55 src/sys/dev/acpi/acpi_tz.c:1.56 --- src/sys/dev/acpi/acpi_tz.c:1.55 Mon Jan 18 17:09:17 2010 +++ src/sys/dev/acpi/acpi_tz.c Mon Jan 18 18:36:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_tz.c,v 1.55 2010/01/18 17:09:17 jruoho Exp $ */ +/* $NetBSD: acpi_tz.c,v 1.56 2010/01/18 18:36:50 jruoho Exp $ */ /* * Copyright (c) 2003 Jared D. McNeill @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.55 2010/01/18 17:09:17 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.56 2010/01/18 18:36:50 jruoho Exp $"); #include #include @@ -393,23 +393,10 @@ else pwr_state = ACPI_STATE_D3; - switch(obj->Type) { - case ACPI_TYPE_LOCAL_REFERENCE: - case ACPI_TYPE_ANY: - cooler = obj->Reference.Handle; - break; - case ACPI_TYPE_STRING: - rv = AcpiGetHandle(NULL, obj->String.Pointer, &cooler); - if (ACPI_FAILURE(rv)) { - aprint_error("%s: failed to get handler from %s\n", - __fun
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Mon Jan 18 18:49:28 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c Log Message: Fix and improve several comments. To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/dev/acpi/acpi.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.146 src/sys/dev/acpi/acpi.c:1.147 --- src/sys/dev/acpi/acpi.c:1.146 Mon Jan 18 18:06:31 2010 +++ src/sys/dev/acpi/acpi.c Mon Jan 18 18:49:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.146 2010/01/18 18:06:31 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.147 2010/01/18 18:49:27 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.146 2010/01/18 18:06:31 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.147 2010/01/18 18:49:27 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -161,7 +161,7 @@ extern kmutex_t acpi_interrupt_list_mtx; /* - * Ignored HIDs + * Ignored HIDs. */ static const char * const acpi_ignored_ids[] = { #if defined(i386) || defined(x86_64) @@ -464,7 +464,7 @@ acpi_softc = sc; /* - * Register null power management handler + * Register null power management handler. */ if (!pmf_device_register(self, acpi_suspend, acpi_resume)) aprint_error_dev(self, "couldn't establish power handler\n"); @@ -499,7 +499,7 @@ return; } - /* early EC handler initialization if ECDT table is available */ + /* Early EC handler initialization if ECDT table is available. */ config_found_ia(self, "acpiecdtbus", NULL, NULL); rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); @@ -598,7 +598,7 @@ return; } - /* early EC handler initialization if ECDT table is available */ + /* Early EC handler initialization if ECDT table is available. */ config_found_ia(self, "acpiecdtbus", NULL, NULL); rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); @@ -1044,7 +1044,6 @@ /* * Check for fixed-hardware buttons. */ - if ((AcpiGbl_FADT.Flags & ACPI_FADT_POWER_BUTTON) == 0) { aprint_verbose_dev(sc->sc_dev, "fixed-feature power button present\n"); @@ -1163,6 +1162,11 @@ return rv; } +/* + * acpi_eval_set_integer: + * + * Evaluate an integer object with a single integer input parameter. + */ ACPI_STATUS acpi_eval_set_integer(ACPI_HANDLE handle, const char *path, ACPI_INTEGER arg) { @@ -1227,7 +1231,6 @@ return rv; } - /* * acpi_eval_struct: * @@ -1285,11 +1288,10 @@ /* * acpi_foreach_package_object: * - * Iterate over all objects in a in a packages and pass then all + * Iterate over all objects in a package, and pass them all * to a function. If the called function returns non AE_OK, the * iteration is stopped and that value is returned. */ - ACPI_STATUS acpi_foreach_package_object(ACPI_OBJECT *pkg, ACPI_STATUS (*func)(ACPI_OBJECT *, void *), @@ -1310,6 +1312,15 @@ return rv; } +/* + * acpi_name: + * + * Return a complete pathname from a handle. + * + * Note that the function uses static data storage; + * if the data is needed for future use, it should be + * copied before any subsequent calls overwrite it. + */ const char * acpi_name(ACPI_HANDLE handle) { @@ -1346,7 +1357,7 @@ /* * acpi_match_hid * - * Match given ids against _HID and _CIDs + * Match given ids against _HID and _CIDs. */ int acpi_match_hid(ACPI_DEVICE_INFO *ad, const char * const *ids) @@ -1374,7 +1385,7 @@ /* * acpi_wake_gpe_helper * - * Set/unset GPE as both Runtime and Wake + * Set/unset GPE as both Runtime and Wake. */ static void acpi_wake_gpe_helper(ACPI_HANDLE handle, bool enable) @@ -1440,7 +1451,7 @@ /* * acpi_clear_wake_gpe * - * Clear GPE as both Runtime and Wake + * Clear GPE as both Runtime and Wake. */ void acpi_clear_wake_gpe(ACPI_HANDLE handle) @@ -1451,7 +1462,7 @@ /* * acpi_set_wake_gpe * - * Set GPE as both Runtime and Wake + * Set GPE as both Runtime and Wake. */ void acpi_set_wake_gpe(ACPI_HANDLE handle) @@ -1476,7 +1487,7 @@ /* * acpi_enter_sleep_state: * - * enter to the specified sleep state. + * Enter to the specified sleep state. */ ACPI_STATUS
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Mon Jan 18 18:52:25 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.1 CHANGES-5.0.2 Log Message: Move tickets 1238, 1240,1241 to the correct file. To generate a diff of this commit: cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-5.0.1 cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-5.0.2 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.0.1 diff -u src/doc/CHANGES-5.0.1:1.1.2.45 src/doc/CHANGES-5.0.1:1.1.2.46 --- src/doc/CHANGES-5.0.1:1.1.2.45 Sat Jan 16 17:54:33 2010 +++ src/doc/CHANGES-5.0.1 Mon Jan 18 18:52:24 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.1,v 1.1.2.45 2010/01/16 17:54:33 bouyer Exp $ +# $NetBSD: CHANGES-5.0.1,v 1.1.2.46 2010/01/18 18:52:24 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.0.1 release: @@ -733,24 +733,3 @@ Welcome to 5.0.1! [snj] -sys/kern/kern_sig.c1.302 - - sigactsunshare(): set reference count in a case of new sigacts - allocation. - Bug (e.g. memory leak) can happen when using clone(2) call. - [rmind, ticket #1238] - -sys/kern/kern_runq.c1.28 - - sched_catchlwp: fix the case when other CPU might see - curlwp->l_cpu != curcpu() while LWP is finishing context switch. - Should fix PR/42539, tested by mar...@. - [rmind, ticket #1240] - -sys/kern/kern_softint.c1.30 - - softint_execute: release/re-acquire kernel-lock depending on - SOFTINT_MPSAFE flag. Keeping it held for MP-safe cases break the - lock order assumptions. Per discussion with . - [rmind, ticket #1241] - Index: src/doc/CHANGES-5.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.40 src/doc/CHANGES-5.0.2:1.1.2.41 --- src/doc/CHANGES-5.0.2:1.1.2.40 Tue Jan 12 09:09:59 2010 +++ src/doc/CHANGES-5.0.2 Mon Jan 18 18:52:24 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.40 2010/01/12 09:09:59 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.41 2010/01/18 18:52:24 bouyer Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -941,3 +941,24 @@ Disable OpenSSL renegotiation, thus avoiding CVE-2009-3555. [tonnerre, ticket #1237] +sys/kern/kern_sig.c1.302 + + sigactsunshare(): set reference count in a case of new sigacts + allocation. + Bug (e.g. memory leak) can happen when using clone(2) call. + [rmind, ticket #1238] + +sys/kern/kern_runq.c1.28 + + sched_catchlwp: fix the case when other CPU might see + curlwp->l_cpu != curcpu() while LWP is finishing context switch. + Should fix PR/42539, tested by mar...@. + [rmind, ticket #1240] + +sys/kern/kern_softint.c1.30 + + softint_execute: release/re-acquire kernel-lock depending on + SOFTINT_MPSAFE flag. Keeping it held for MP-safe cases break the + lock order assumptions. Per discussion with . + [rmind, ticket #1241] +
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: pooka Date: Mon Jan 18 18:52:35 UTC 2010 Modified Files: src/sys/dev/cardbus: if_ath_cardbus.c if_atw_cardbus.c if_fxp_cardbus.c if_ral_cardbus.c if_rtk_cardbus.c if_rtw_cardbus.c if_tlp_cardbus.c Log Message: Remove conditional inclusion of unused bpf.h To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/cardbus/if_ath_cardbus.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/cardbus/if_atw_cardbus.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/cardbus/if_fxp_cardbus.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/cardbus/if_ral_cardbus.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/cardbus/if_rtk_cardbus.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/cardbus/if_rtw_cardbus.c cvs rdiff -u -r1.61 -r1.62 src/sys/dev/cardbus/if_tlp_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/if_ath_cardbus.c diff -u src/sys/dev/cardbus/if_ath_cardbus.c:1.37 src/sys/dev/cardbus/if_ath_cardbus.c:1.38 --- src/sys/dev/cardbus/if_ath_cardbus.c:1.37 Fri Jan 8 19:47:42 2010 +++ src/sys/dev/cardbus/if_ath_cardbus.c Mon Jan 18 18:52:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ath_cardbus.c,v 1.37 2010/01/08 19:47:42 dyoung Exp $ */ +/* $NetBSD: if_ath_cardbus.c,v 1.38 2010/01/18 18:52:35 pooka Exp $ */ /* * Copyright (c) 2003 * Ichiro FUKUHARA . @@ -30,10 +30,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.37 2010/01/08 19:47:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.38 2010/01/18 18:52:35 pooka Exp $"); #include "opt_inet.h" -#include "bpfilter.h" #include #include @@ -55,10 +54,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - #ifdef INET #include #include Index: src/sys/dev/cardbus/if_atw_cardbus.c diff -u src/sys/dev/cardbus/if_atw_cardbus.c:1.28 src/sys/dev/cardbus/if_atw_cardbus.c:1.29 --- src/sys/dev/cardbus/if_atw_cardbus.c:1.28 Fri Jan 8 19:47:42 2010 +++ src/sys/dev/cardbus/if_atw_cardbus.c Mon Jan 18 18:52:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atw_cardbus.c,v 1.28 2010/01/08 19:47:42 dyoung Exp $ */ +/* $NetBSD: if_atw_cardbus.c,v 1.29 2010/01/18 18:52:35 pooka Exp $ */ /*- * Copyright (c) 1999, 2000, 2003 The NetBSD Foundation, Inc. @@ -36,10 +36,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atw_cardbus.c,v 1.28 2010/01/08 19:47:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atw_cardbus.c,v 1.29 2010/01/18 18:52:35 pooka Exp $"); #include "opt_inet.h" -#include "bpfilter.h" #include #include @@ -62,10 +61,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - #ifdef INET #include #include Index: src/sys/dev/cardbus/if_fxp_cardbus.c diff -u src/sys/dev/cardbus/if_fxp_cardbus.c:1.40 src/sys/dev/cardbus/if_fxp_cardbus.c:1.41 --- src/sys/dev/cardbus/if_fxp_cardbus.c:1.40 Sat Sep 5 14:50:10 2009 +++ src/sys/dev/cardbus/if_fxp_cardbus.c Mon Jan 18 18:52:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.40 2009/09/05 14:50:10 tsutsui Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.41 2010/01/18 18:52:35 pooka Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,10 +34,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.40 2009/09/05 14:50:10 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.41 2010/01/18 18:52:35 pooka Exp $"); #include "opt_inet.h" -#include "bpfilter.h" #include "rnd.h" #include @@ -61,10 +60,6 @@ #include -#if NBPFILTER > 0 -#include -#endif - #ifdef INET #include #include Index: src/sys/dev/cardbus/if_ral_cardbus.c diff -u src/sys/dev/cardbus/if_ral_cardbus.c:1.16 src/sys/dev/cardbus/if_ral_cardbus.c:1.17 --- src/sys/dev/cardbus/if_ral_cardbus.c:1.16 Tue May 12 14:17:31 2009 +++ src/sys/dev/cardbus/if_ral_cardbus.c Mon Jan 18 18:52:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ral_cardbus.c,v 1.16 2009/05/12 14:17:31 cegger Exp $ */ +/* $NetBSD: if_ral_cardbus.c,v 1.17 2010/01/18 18:52:35 pooka Exp $ */ /* $OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $ */ /*- @@ -22,9 +22,8 @@ * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.16 2009/05/12 14:17:31 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.17 2010/01/18 18:52:35 pooka Exp $"); -#include "bpfilter.h" #include #include Index: src/sys/dev/cardbus/if_rtk_cardbus.c diff -u src/sys/dev/cardbus/if_rtk_cardbus.c:1.38 src/sys/dev/cardbus/if_rtk_cardbus.c:1.39 --- src/sys/dev/cardbus/if_rtk_cardbus.c:1.38 Sat Sep 5 14:50:10 2009 +++ src/sys/dev/cardbus/if_rtk_cardbus.c Mon Jan 18 18:52:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_rtk_cardbus.c,v 1.38 2009/09/05 14:50:10 tsutsui Exp $ */ +/* $NetBSD: if_rtk_cardbus.c,v 1.39 2010/01/18 18:52:35 pooka Exp $ */ /* * Copyright (c) 2000 Masanori Kanaoka @@ -36,10 +36,9 @@ */ #include
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: pooka Date: Mon Jan 18 19:00:58 UTC 2010 Modified Files: src/sys/dev/eisa: if_ep_eisa.c if_fea.c if_tlp_eisa.c Log Message: nuke unused bpf inclusions To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/eisa/if_ep_eisa.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/eisa/if_fea.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/eisa/if_tlp_eisa.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/eisa/if_ep_eisa.c diff -u src/sys/dev/eisa/if_ep_eisa.c:1.41 src/sys/dev/eisa/if_ep_eisa.c:1.42 --- src/sys/dev/eisa/if_ep_eisa.c:1.41 Fri Dec 4 11:13:04 2009 +++ src/sys/dev/eisa/if_ep_eisa.c Mon Jan 18 19:00:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ep_eisa.c,v 1.41 2009/12/04 11:13:04 njoly Exp $ */ +/* $NetBSD: if_ep_eisa.c,v 1.42 2010/01/18 19:00:58 pooka Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -64,10 +64,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ep_eisa.c,v 1.41 2009/12/04 11:13:04 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ep_eisa.c,v 1.42 2010/01/18 19:00:58 pooka Exp $"); #include "opt_inet.h" -#include "bpfilter.h" #include #include @@ -92,12 +91,6 @@ #include #endif - -#if NBPFILTER > 0 -#include -#include -#endif - #include #include #include Index: src/sys/dev/eisa/if_fea.c diff -u src/sys/dev/eisa/if_fea.c:1.42 src/sys/dev/eisa/if_fea.c:1.43 --- src/sys/dev/eisa/if_fea.c:1.42 Fri Dec 4 11:13:04 2009 +++ src/sys/dev/eisa/if_fea.c Mon Jan 18 19:00:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fea.c,v 1.42 2009/12/04 11:13:04 njoly Exp $ */ +/* $NetBSD: if_fea.c,v 1.43 2010/01/18 19:00:58 pooka Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.42 2009/12/04 11:13:04 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.43 2010/01/18 19:00:58 pooka Exp $"); #include "opt_inet.h" @@ -55,12 +55,6 @@ #include #include -#include "bpfilter.h" -#if NBPFILTER > 0 -#include -#include -#endif - #ifdef INET #include #include Index: src/sys/dev/eisa/if_tlp_eisa.c diff -u src/sys/dev/eisa/if_tlp_eisa.c:1.23 src/sys/dev/eisa/if_tlp_eisa.c:1.24 --- src/sys/dev/eisa/if_tlp_eisa.c:1.23 Fri Dec 4 11:13:04 2009 +++ src/sys/dev/eisa/if_tlp_eisa.c Mon Jan 18 19:00:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_eisa.c,v 1.23 2009/12/04 11:13:04 njoly Exp $ */ +/* $NetBSD: if_tlp_eisa.c,v 1.24 2010/01/18 19:00:58 pooka Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,10 +36,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.23 2009/12/04 11:13:04 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.24 2010/01/18 19:00:58 pooka Exp $"); #include "opt_inet.h" -#include "bpfilter.h" #include #include @@ -58,10 +57,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - #ifdef INET #include #include
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Mon Jan 18 19:17:42 UTC 2010 Modified Files: src/lib/libedit: filecomplete.c Log Message: PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack smashing To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/filecomplete.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/libedit/filecomplete.c diff -u src/lib/libedit/filecomplete.c:1.17 src/lib/libedit/filecomplete.c:1.18 --- src/lib/libedit/filecomplete.c:1.17 Wed Dec 30 17:37:40 2009 +++ src/lib/libedit/filecomplete.c Mon Jan 18 14:17:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.17 2009/12/30 22:37:40 christos Exp $ */ +/* $NetBSD: filecomplete.c,v 1.18 2010/01/18 19:17:42 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.17 2009/12/30 22:37:40 christos Exp $"); +__RCSID("$NetBSD: filecomplete.c,v 1.18 2010/01/18 19:17:42 christos Exp $"); #endif /* not lint && not SCCSID */ #include @@ -419,9 +419,9 @@ len = li->cursor - ctemp; #if defined(__SSP__) || defined(__SSP_ALL__) - temp = malloc(len + 1); + temp = malloc(sizeof(*temp) * (len + 1)); #else - temp = alloca(len + 1); + temp = alloca(sizeof(*temp) * (len + 1)); #endif (void)Strncpy(temp, ctemp, len); temp[len] = '\0';
CVS commit: src/sys/dev/pci
Module Name:src Committed By: pooka Date: Mon Jan 18 20:45:13 UTC 2010 Modified Files: src/sys/dev/pci: if_devar.h Log Message: Remove unused macro definition (the NetBSD version would just not go through a compiler). To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_devar.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/if_devar.h diff -u src/sys/dev/pci/if_devar.h:1.52 src/sys/dev/pci/if_devar.h:1.53 --- src/sys/dev/pci/if_devar.h:1.52 Wed May 6 10:34:32 2009 +++ src/sys/dev/pci/if_devar.h Mon Jan 18 20:45:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_devar.h,v 1.52 2009/05/06 10:34:32 cegger Exp $ */ +/* $NetBSD: if_devar.h,v 1.53 2010/01/18 20:45:12 pooka Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (m...@3am-software.com) @@ -945,7 +945,6 @@ #if NBPFILTER > 0 #define TULIP_BPF_MTAP(sc, m) bpf_mtap(&(sc)->tulip_if, m) #define TULIP_BPF_TAP(sc, p, l) bpf_tap(&(sc)->tulip_if, p, l) -#define TULIP_BPF_ATTACH(sc) bpfattach(&(sc)->tulip_if, DLT_EN10MB, sizeof(struct ether_header)) #endif #define tulip_intrfunc_t void #define TULIP_VOID_INTRFUNC @@ -1064,7 +1063,6 @@ #if !defined(TULIP_BPF_MTAP) && NBPFILTER > 0 #define TULIP_BPF_MTAP(sc, m) bpf_mtap((sc)->tulip_bpf, m) #define TULIP_BPF_TAP(sc, p, l) bpf_tap((sc)->tulip_bpf, p, l) -#define TULIP_BPF_ATTACH(sc) bpfattach(&(sc)->tulip_bpf, &(sc)->tulip_if, DLT_EN10MB, sizeof(struct ether_header)) #endif #if defined(TULIP_PERFSTATS)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Jan 18 20:54:22 UTC 2010 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add two CTI usb-rs485 adapters To generate a diff of this commit: cvs rdiff -u -r1.540 -r1.541 src/sys/dev/usb/usbdevs 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/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.540 src/sys/dev/usb/usbdevs:1.541 --- src/sys/dev/usb/usbdevs:1.540 Thu Jan 14 09:30:39 2010 +++ src/sys/dev/usb/usbdevs Mon Jan 18 20:54:22 2010 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.540 2010/01/14 09:30:39 matthias Exp $ +$NetBSD: usbdevs,v 1.541 2010/01/18 20:54:22 martin Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -1107,6 +1107,8 @@ product FTDI MHAM_RS232 0x RS232 product FTDI MHAM_Y9 0xeeef Y9 product FTDI COASTAL_TNCX 0xf448 Coastal ChipWorks TNC-X +product FTDI CTI_485_MINI 0xf608 CTI 485 Mini +product FTDI CTI_NANO_485 0xf60b CTI Nano 485 product FTDI LCD_MX200_USB 0xfa01 Matrix Orbital MX2/MX3/MX6 Series product FTDI LCD_MX4_MX5_USB 0xfa02 Matrix Orbital MX4/MX5 Series LCD product FTDI LCD_LK202_24_USB 0xfa03 Matrix Orbital LK/VK/PK202-24 LCD
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: joerg Date: Mon Jan 18 20:54:54 UTC 2010 Modified Files: src/sys/lib/libkern: arc4random.c Log Message: Keep arc4_i and arc4_j synchronised after a rekeying. This prevents accidentally ending up in a short ARC4 cycle. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/lib/libkern/arc4random.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/lib/libkern/arc4random.c diff -u src/sys/lib/libkern/arc4random.c:1.20 src/sys/lib/libkern/arc4random.c:1.21 --- src/sys/lib/libkern/arc4random.c:1.20 Mon Apr 28 20:24:06 2008 +++ src/sys/lib/libkern/arc4random.c Mon Jan 18 20:54:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: arc4random.c,v 1.20 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: arc4random.c,v 1.21 2010/01/18 20:54:54 joerg Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -136,6 +136,7 @@ arc4_j = (arc4_j + arc4_sbox[n] + key[n]) % 256; arc4_swap(&arc4_sbox[n], &arc4_sbox[arc4_j]); } + arc4_i = arc4_j; /* Reset for next reseed cycle. */ arc4_nextreseed = time_uptime + ARC4_RESEED_SECONDS;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Jan 18 20:55:37 UTC 2010 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.535 -r1.536 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.536 -r1.537 src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.535 src/sys/dev/usb/usbdevs.h:1.536 --- src/sys/dev/usb/usbdevs.h:1.535 Thu Jan 14 09:30:39 2010 +++ src/sys/dev/usb/usbdevs.h Mon Jan 18 20:55:37 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.535 2010/01/14 09:30:39 matthias Exp $ */ +/* $NetBSD: usbdevs.h,v 1.536 2010/01/18 20:55:37 martin Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.539 2010/01/12 14:50:38 jakllsch Exp + * NetBSD: usbdevs,v 1.541 2010/01/18 20:54:22 martin Exp */ /* @@ -1114,6 +1114,8 @@ #define USB_PRODUCT_FTDI_MHAM_RS232 0x /* RS232 */ #define USB_PRODUCT_FTDI_MHAM_Y9 0xeeef /* Y9 */ #define USB_PRODUCT_FTDI_COASTAL_TNCX 0xf448 /* Coastal ChipWorks TNC-X */ +#define USB_PRODUCT_FTDI_CTI_485_MINI 0xf608 /* CTI 485 Mini */ +#define USB_PRODUCT_FTDI_CTI_NANO_485 0xf60b /* CTI Nano 485 */ #define USB_PRODUCT_FTDI_LCD_MX200_USB 0xfa01 /* Matrix Orbital MX2/MX3/MX6 Series */ #define USB_PRODUCT_FTDI_LCD_MX4_MX5_USB 0xfa02 /* Matrix Orbital MX4/MX5 Series LCD */ #define USB_PRODUCT_FTDI_LCD_LK202_24_USB 0xfa03 /* Matrix Orbital LK/VK/PK202-24 LCD */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.536 src/sys/dev/usb/usbdevs_data.h:1.537 --- src/sys/dev/usb/usbdevs_data.h:1.536 Thu Jan 14 09:30:39 2010 +++ src/sys/dev/usb/usbdevs_data.h Mon Jan 18 20:55:37 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.536 2010/01/14 09:30:39 matthias Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.537 2010/01/18 20:55:37 martin Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.539 2010/01/12 14:50:38 jakllsch Exp + * NetBSD: usbdevs,v 1.541 2010/01/18 20:54:22 martin Exp */ /* @@ -3383,6 +3383,14 @@ "Coastal ChipWorks TNC-X", }, { + USB_VENDOR_FTDI, USB_PRODUCT_FTDI_CTI_485_MINI, + "CTI 485 Mini", + }, + { + USB_VENDOR_FTDI, USB_PRODUCT_FTDI_CTI_NANO_485, + "CTI Nano 485", + }, + { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_LCD_MX200_USB, "Matrix Orbital MX2/MX3/MX6 Series", }, @@ -7039,4 +7047,4 @@ "Prestige", }, }; -const int usb_nproducts = 1286; +const int usb_nproducts = 1288;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Jan 18 20:57:13 UTC 2010 Modified Files: src/sys/dev/usb: uftdi.c Log Message: Add two CTI rs485 dongles To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/uftdi.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/usb/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.44 src/sys/dev/usb/uftdi.c:1.45 --- src/sys/dev/usb/uftdi.c:1.44 Thu Nov 12 19:51:44 2009 +++ src/sys/dev/usb/uftdi.c Mon Jan 18 20:57:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.44 2009/11/12 19:51:44 dyoung Exp $ */ +/* $NetBSD: uftdi.c,v 1.45 2010/01/18 20:57:13 martin Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.44 2009/11/12 19:51:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.45 2010/01/18 20:57:13 martin Exp $"); #include #include @@ -131,6 +131,8 @@ { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_MHAM_RS232 }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_MHAM_Y9 }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_COASTAL_TNCX }, + { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_CTI_485_MINI }, + { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_CTI_NANO_485 }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SEMC_DSS20 }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_LCD_LK202_24_USB }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_LCD_LK204_24_USB },
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Mon Jan 18 21:48:15 UTC 2010 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c Log Message: If no limits are exceeded, make sure we set state to SVALID To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.74 src/sys/dev/sysmon/sysmon_envsys_events.c:1.75 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.74 Sat Jan 2 19:02:39 2010 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Mon Jan 18 21:48:15 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.74 2010/01/02 19:02:39 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.75 2010/01/18 21:48:15 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.74 2010/01/02 19:02:39 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.75 2010/01/18 21:48:15 pgoyette Exp $"); #include #include @@ -687,6 +687,8 @@ edata->state = ENVSYS_SCRITOVER; else if __EXCEED_LIM(PROP_WARNMAX, sel_warnmax, >) edata->state = ENVSYS_SWARNOVER; + else +edata->state = ENVSYS_SVALID; } #undef __EXCEED_LIM
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: njoly Date: Mon Jan 18 21:55:40 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: procfs_machdep.c Log Message: Do not check more than 32 bits against ci_feature_flags, to avoid printing bogus data on /proc/cpuinfo flags line. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd64/procfs_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/amd64/amd64/procfs_machdep.c diff -u src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 src/sys/arch/amd64/amd64/procfs_machdep.c:1.13 --- src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 Sun Aug 16 11:04:48 2009 +++ src/sys/arch/amd64/amd64/procfs_machdep.c Mon Jan 18 21:55:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $"); #include #include @@ -151,7 +151,7 @@ p = featurebuf; left = sizeof featurebuf; - for (i = 0; i < sizeof(i386_features)/sizeof(*i386_features); i++) { + for (i = 0; i < 32; i++) { if ((ci->ci_feature_flags & (1 << i)) && (i386_features[i] != NULL)) { l = snprintf(p, left, "%s ", i386_features[i]);
CVS commit: src/sys/arch
Module Name:src Committed By: rmind Date: Mon Jan 18 22:31:14 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: procfs_machdep.c src/sys/arch/i386/i386: procfs_machdep.c Log Message: Reduce the difference between i386 and amd64 procfs MD code. Prepare for the merge, no functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/amd64/procfs_machdep.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/i386/i386/procfs_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/amd64/amd64/procfs_machdep.c diff -u src/sys/arch/amd64/amd64/procfs_machdep.c:1.13 src/sys/arch/amd64/amd64/procfs_machdep.c:1.14 --- src/sys/arch/amd64/amd64/procfs_machdep.c:1.13 Mon Jan 18 21:55:40 2010 +++ src/sys/arch/amd64/amd64/procfs_machdep.c Mon Jan 18 22:31:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.14 2010/01/18 22:31:14 rmind Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.14 2010/01/18 22:31:14 rmind Exp $"); #include #include @@ -56,17 +56,16 @@ #include #include -extern int i386_fpu_present, i386_fpu_exception, i386_fpu_fdivbug; -extern char cpu_model[]; -extern int cpu_class; +extern int i386_fpu_present, i386_fpu_exception, i386_fpu_fdivbug; +extern char cpu_model[]; -static const char * const i386_features[] = { +static const char * const x86_features[] = { /* Intel-defined */ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx", "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL, - + /* AMD-defined */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, @@ -105,7 +104,7 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; -static int procfs_getonecpu(int, struct cpu_info *, char *, int *); +static int procfs_getonecpu(int, struct cpu_info *, char *, int *); /* * Linux-style /proc/cpuinfo. @@ -134,7 +133,7 @@ *len += used + 1; used = --total; if (used == 0) - break; +break; } else { *len += used; break; @@ -150,11 +149,10 @@ char featurebuf[256], *p; p = featurebuf; - left = sizeof featurebuf; + left = sizeof(featurebuf); for (i = 0; i < 32; i++) { - if ((ci->ci_feature_flags & (1 << i)) && - (i386_features[i] != NULL)) { - l = snprintf(p, left, "%s ", i386_features[i]); + if ((ci->ci_feature_flags & (1 << i)) && x86_features[i]) { + l = snprintf(p, left, "%s ", x86_features[i]); left -= l; p += l; if (left <= 0) @@ -165,20 +163,18 @@ p = bf; left = *len; l = snprintf(p, left, - "processor\t: %d\n" - "vendor_id\t: %s\n" - "cpu family\t: %d\n" - "model\t\t: %d\n" - "model name\t: %s\n" - "stepping\t: ", - xcpu, - (char *)ci->ci_vendor, - cpuid_level >= 0 ? - ((ci->ci_signature >> 8) & 15) : cpu_class + 3, - cpuid_level >= 0 ? - ((ci->ci_signature >> 4) & 15) : 0, - cpu_brand_string - ); + "processor\t: %d\n" + "vendor_id\t: %s\n" + "cpu family\t: %d\n" + "model\t\t: %d\n" + "model name\t: %s\n" + "stepping\t: ", + xcpu, + (char *)ci->ci_vendor, + cpuid_level >= 0 ? ((ci->ci_signature >> 8) & 15) : cpu_class + 3, + cpuid_level >= 0 ? ((ci->ci_signature >> 4) & 15) : 0, + cpu_brand_string + ); left -= l; p += l; @@ -195,7 +191,6 @@ if (left <= 0) return 0; - if (ci->ci_data.cpu_cc_freq != 0) { uint64_t freq, fraq; @@ -212,18 +207,25 @@ return 0; l = snprintf(p, left, - "fdiv_bug\t: %s\n" - "fpu\t\t: %s\n" - "fpu_exception\t: %s\n" - "cpuid level\t: %d\n" - "wp\t\t: %s\n" - "flags\t\t: %s\n", - "no", /* XXX */ - "yes", /* XXX */ - "yes", /* XXX */ - cpuid_level, - (rcr0() & CR0_WP) ? "yes" : "no", - featurebuf); + "fdiv_bug\t: %s\n" + "fpu\t\t: %s\n" + "fpu_exception\t: %s\n" + "cpuid level\t: %d\n" + "wp\t\t: %s\n" + "flags\t\t: %s\n", +#ifdef __x86_64__ + "no", /* XXX */ + "yes", /* XXX */ + "yes", /* XXX */ +#else + i386_fpu_fdivbug ? "yes" : "no", + i386_fpu_present ? "yes" : "no", + i386_fpu_exception ? "yes" : "no", +#endif + cpuid_level, + (rcr0() & CR0_WP) ? "yes" : "no", + featurebuf + ); if (l > left) return 0; Index: src/sys/arch/i386/i386/procfs_machdep.c diff -u src/sys/arch/i386/i386/procfs_machdep.c:1.32 src/sys/arch/i386/i386/procfs_machdep.c:1.33 --- src/sys/arch/i386/i386/procfs_machdep.c:1.32 Sun Aug 16 11:04:48 2009 +++ src/sys/arch/i386/i386/procfs_machdep.c Mon Jan 18 22:31:14 2010 @@ -1,4 +1,4 @@ -/* $
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: jmmv Date: Mon Jan 18 23:04:30 UTC 2010 Modified Files: src/sys/arch/arm/arm32: arm32_machdep.c Log Message: Define an empty module_init_md function so that kernels with 'options MODULAR' can be built (at least in shark). Still not working due to some relocations resolving to too far away symbols though. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/arm/arm32/arm32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/arm32_machdep.c diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.71 src/sys/arch/arm/arm32/arm32_machdep.c:1.72 --- src/sys/arch/arm/arm32/arm32_machdep.c:1.71 Sun Nov 29 04:15:42 2009 +++ src/sys/arch/arm/arm32/arm32_machdep.c Mon Jan 18 23:04:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_machdep.c,v 1.71 2009/11/29 04:15:42 rmind Exp $ */ +/* $NetBSD: arm32_machdep.c,v 1.72 2010/01/18 23:04:30 jmmv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -42,8 +42,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.71 2009/11/29 04:15:42 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.72 2010/01/18 23:04:30 jmmv Exp $"); +#include "opt_modular.h" #include "opt_md.h" #include "opt_pmap_debug.h" @@ -60,6 +61,7 @@ #include #include #include +#include #include @@ -478,3 +480,13 @@ } } #endif /* __HAVE_FAST_SOFTINTS */ + +#ifdef MODULAR +/* + * Push any modules loaded by the boot loader. + */ +void +module_init_md(void) +{ +} +#endif /* MODULAR */
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: jmmv Date: Mon Jan 18 23:35:51 UTC 2010 Modified Files: src/sys/arch/powerpc/powerpc: kobj_machdep.c powerpc_machdep.c Log Message: Define kobj_machdep and module_init_md empty functions so that powerpc kernels (at least macppc) with 'options MODULAR' can be built. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/powerpc/kobj_machdep.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/powerpc/powerpc/powerpc_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/powerpc/powerpc/kobj_machdep.c diff -u src/sys/arch/powerpc/powerpc/kobj_machdep.c:1.2 src/sys/arch/powerpc/powerpc/kobj_machdep.c:1.3 --- src/sys/arch/powerpc/powerpc/kobj_machdep.c:1.2 Mon Apr 28 20:23:32 2008 +++ src/sys/arch/powerpc/powerpc/kobj_machdep.c Mon Jan 18 23:35:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:32 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.3 2010/01/18 23:35:51 jmmv Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.3 2010/01/18 23:35:51 jmmv Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -141,3 +141,10 @@ return 0; } + +int +kobj_machdep(kobj_t ko, void *base, size_t size, bool load) +{ + + return 0; +} Index: src/sys/arch/powerpc/powerpc/powerpc_machdep.c diff -u src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.41 src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.42 --- src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.41 Thu Dec 10 14:13:51 2009 +++ src/sys/arch/powerpc/powerpc/powerpc_machdep.c Mon Jan 18 23:35:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: powerpc_machdep.c,v 1.41 2009/12/10 14:13:51 matt Exp $ */ +/* $NetBSD: powerpc_machdep.c,v 1.42 2010/01/18 23:35:51 jmmv Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,9 +32,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.41 2009/12/10 14:13:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.42 2010/01/18 23:35:51 jmmv Exp $"); #include "opt_altivec.h" +#include "opt_modular.h" #include #include @@ -48,6 +49,7 @@ #include #include #include +#include int cpu_timebase; int cpu_printfataltraps; @@ -301,3 +303,12 @@ return curcpu()->ci_idepth != 0; } +#ifdef MODULAR +/* + * Push any modules loaded by the boot loader. + */ +void +module_init_md(void) +{ +} +#endif /* MODULAR */
CVS commit: src/share/mk
Module Name:src Committed By: jmmv Date: Mon Jan 18 23:39:08 UTC 2010 Modified Files: src/share/mk: bsd.kmodule.mk Log Message: Generate long calls in modules for arm32 and powerpc to avoid unsupported relocations by the module loader in the kernel. This makes modules work in, at least, shark and macppc respectively. This is obviously a workaround that results in slower code, but at least makes modules work. I'm adding a comment detailing what the real solution would be so that the whole thing can be revisited in the future. (Read: I don't have time now to dig the details of how to implement trampoline generation.) (Based on the old bsd.kmod.mk file, I understand that hppa needs this workaround too, but I can't check this platform.) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/mk/bsd.kmodule.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.kmodule.mk diff -u src/share/mk/bsd.kmodule.mk:1.23 src/share/mk/bsd.kmodule.mk:1.24 --- src/share/mk/bsd.kmodule.mk:1.23 Mon Dec 14 08:51:16 2009 +++ src/share/mk/bsd.kmodule.mk Mon Jan 18 23:39:07 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmodule.mk,v 1.23 2009/12/14 08:51:16 mrg Exp $ +# $NetBSD: bsd.kmodule.mk,v 1.24 2010/01/18 23:39:07 jmmv Exp $ # We are not building this with PIE MKPIE=no @@ -23,6 +23,18 @@ CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign .endif +# XXX This is a workaround for platforms that have relative relocations +# that, when relocated by the module loader, result in addresses that +# overflow the size of the relocation (e.g. R_PPC_REL24 in powerpc). +# The real solution to this involves generating trampolines for those +# relocations inside the loader and removing this workaround, as the +# resulting code would be much faster. +.if ${MACHINE_CPU} == "arm" +CFLAGS+= -mlong-calls +.elif ${MACHINE_CPU} == "powerpc" +CFLAGS+= -mlongcall +.endif + _YKMSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}} DPSRCS+= ${_YKMSRCS} CLEANFILES+= ${_YKMSRCS}
CVS commit: src/sys/arch
Module Name:src Committed By: jmmv Date: Mon Jan 18 23:40:07 UTC 2010 Modified Files: src/sys/arch/macppc/conf: GENERIC src/sys/arch/shark/conf: GENERIC Log Message: Enable 'options MODULAR' in macppc and shark GENERIC kernels now that the modules work. To generate a diff of this commit: cvs rdiff -u -r1.277 -r1.278 src/sys/arch/macppc/conf/GENERIC cvs rdiff -u -r1.86 -r1.87 src/sys/arch/shark/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/macppc/conf/GENERIC diff -u src/sys/arch/macppc/conf/GENERIC:1.277 src/sys/arch/macppc/conf/GENERIC:1.278 --- src/sys/arch/macppc/conf/GENERIC:1.277 Sat Dec 5 20:11:15 2009 +++ src/sys/arch/macppc/conf/GENERIC Mon Jan 18 23:40:06 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.277 2009/12/05 20:11:15 pooka Exp $ +# $NetBSD: GENERIC,v 1.278 2010/01/18 23:40:06 jmmv Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.277 $" +#ident "GENERIC-$Revision: 1.278 $" maxusers 32 @@ -40,6 +40,7 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support +options MODULAR # new style module framework options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) Index: src/sys/arch/shark/conf/GENERIC diff -u src/sys/arch/shark/conf/GENERIC:1.86 src/sys/arch/shark/conf/GENERIC:1.87 --- src/sys/arch/shark/conf/GENERIC:1.86 Sat Dec 5 20:11:17 2009 +++ src/sys/arch/shark/conf/GENERIC Mon Jan 18 23:40:06 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.86 2009/12/05 20:11:17 pooka Exp $ +# $NetBSD: GENERIC,v 1.87 2010/01/18 23:40:06 jmmv Exp $ # # Generic Shark configuration. # @@ -7,7 +7,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.86 $" +#ident "GENERIC-$Revision: 1.87 $" # estimated number of users maxusers 32 @@ -152,6 +152,7 @@ options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel +options MODULAR # new style module framework # Development and Debugging options
CVS commit: src/doc
Module Name:src Committed By: jmmv Date: Mon Jan 18 23:41:47 UTC 2010 Modified Files: src/doc: CHANGES Log Message: Document the addition of new-style kernel modules support in macppc and shark. To generate a diff of this commit: cvs rdiff -u -r1.1344 -r1.1345 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1344 src/doc/CHANGES:1.1345 --- src/doc/CHANGES:1.1344 Sat Jan 16 15:46:32 2010 +++ src/doc/CHANGES Mon Jan 18 23:41:47 2010 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1344 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1345 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -522,3 +522,5 @@ found on SPARCstation-4/5 and qemu. Allows to idle the CPU when in the idle loop. [bouyer 20100115] tn3270: Removed from base [roy 20100116] + macppc: Add support for new-style kernel modules. [jmmv 20100118] + shark: Add support for new-style kernel modules. [jmmv 20100118]
CVS commit: src/sys/dev/pad
Module Name:src Committed By: dyoung Date: Mon Jan 18 23:57:14 UTC 2010 Modified Files: src/sys/dev/pad: pad.c Log Message: If the device does not exist, return ENXIO, as is customary, instead of ENODEV. Ok jmcne...@. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pad/pad.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/pad/pad.c diff -u src/sys/dev/pad/pad.c:1.11 src/sys/dev/pad/pad.c:1.12 --- src/sys/dev/pad/pad.c:1.11 Sat Mar 14 11:08:28 2009 +++ src/sys/dev/pad/pad.c Mon Jan 18 23:57:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pad.c,v 1.11 2009/03/14 11:08:28 ad Exp $ */ +/* $NetBSD: pad.c,v 1.12 2010/01/18 23:57:14 dyoung Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.11 2009/03/14 11:08:28 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.12 2010/01/18 23:57:14 dyoung Exp $"); #include #include @@ -297,7 +297,7 @@ sc = device_lookup_private(&pad_cd, PADUNIT(dev)); if (sc == NULL) - return ENODEV; + return ENXIO; if (sc->sc_open++) { sc->sc_open--; @@ -314,7 +314,7 @@ sc = device_lookup_private(&pad_cd, PADUNIT(dev)); if (sc == NULL) - return ENODEV; + return ENXIO; KASSERT(sc->sc_open > 0); sc->sc_open--; @@ -333,7 +333,7 @@ sc = device_lookup_private(&pad_cd, PADUNIT(dev)); if (sc == NULL) - return ENODEV; + return ENXIO; err = 0;