CVS commit: xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: mrg Date: Thu Jul 9 07:08:07 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/dix: devices.c xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86Config.c xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod: xf86vmode.c Removed Files: xsrc/external/mit/xorg-server/dist: config.log Log Message: merge xorg-server 1.6.2 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xorg-server/dist/config.log cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xorg-server/dist/dix/devices.c cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/dix/devices.c diff -u xsrc/external/mit/xorg-server/dist/dix/devices.c:1.3 xsrc/external/mit/xorg-server/dist/dix/devices.c:1.4 --- xsrc/external/mit/xorg-server/dist/dix/devices.c:1.3 Thu Jun 11 02:13:35 2009 +++ xsrc/external/mit/xorg-server/dist/dix/devices.c Thu Jul 9 07:08:06 2009 @@ -216,6 +216,8 @@ /* device grab defaults */ dev->deviceGrab.grabTime = currentTime; +dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; +dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = TRUE; Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.4 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.3 Thu Jun 11 02:13:44 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c Thu Jul 9 07:08:06 2009 @@ -601,7 +601,9 @@ defaultFontPath = Xprintf("%s%s%s", fileconf->file_fontpath, *temp_path ? "," : "", temp_path); - must_copy = FALSE; + if (defaultFontPath != NULL) { + must_copy = FALSE; + } } else defaultFontPath = fileconf->file_fontpath; @@ -617,7 +619,14 @@ !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { defaultFontPath = Xprintf("%s%sbuilt-ins", temp_path, *temp_path ? "," : ""); - must_copy = FALSE; + if (must_copy == TRUE) { + if (defaultFontPath != NULL) { + must_copy = FALSE; + } + } else { + /* already made a copy of the font path */ + xfree(temp_path); + } } /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; @@ -733,7 +742,7 @@ { FLAG_DONTVTSWITCH, "DontVTSwitch", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN, - {0}, TRUE }, + {0}, FALSE }, { FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN, @@ -845,8 +854,7 @@ xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals); xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch); -if (!xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap)) -xf86Info.dontZap = !party_like_its_1989; +xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap); xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom); xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI); Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c:1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c:1.4 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c:1.3 Thu Jun 11 02:13:45 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/extmod/xf86vmode.c Thu Jul 9 07:08:07 2009 @@ -1545,6 +1545,7 @@ { CARD16 *ramp = NULL; int n, length, i; +size_t ramplen; xXF86VidModeGetGammaRampReply rep; REQUEST(xXF86VidModeGetGammaRampReq); @@ -1559,7 +1560,8 @@ length = (stuff->size + 1) & ~1; if(stuff->size) { -if(!(ramp = xalloc(length * 3 * sizeof(CARD16 + ramplen = length * 3 * sizeof(CARD16); + if (!(ramp = xalloc(ramplen))) return BadAlloc; if (!VidModeGetGammaRamp(stuff->screen, stuff->size, @@ -1577,13 +1579,12 @@ swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swaps(&rep.size, n); - for(i = 0; i < length * 3; i++) - swaps(&ramp[i],n); + SwapShorts(ramp, length * 3); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); if(stuff->size) { - WriteToClient(client, rep.length << 2, (char*)ramp); + WriteToClient(client, ramplen, (char*)ramp); xfree(ramp);
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Thu Jul 9 07:30:17 UTC 2009 Modified Files: src/share/mk: bsd.x11.mk Log Message: XORG_CURRENT_VERSION is now 1.6.2. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.x11.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.x11.mk diff -u src/share/mk/bsd.x11.mk:1.75 src/share/mk/bsd.x11.mk:1.76 --- src/share/mk/bsd.x11.mk:1.75 Tue Jun 23 04:40:29 2009 +++ src/share/mk/bsd.x11.mk Thu Jul 9 07:30:17 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.75 2009/06/23 04:40:29 mrg Exp $ +# $NetBSD: bsd.x11.mk,v 1.76 2009/07/09 07:30:17 mrg Exp $ .include @@ -130,7 +130,7 @@ -DXLOCALELIBDIR=\"${X11LIBDIR}/locale\" # XXX oh yeah, fix me later -XORG_VERSION_CURRENT="(((1) * 1000) + ((6) * 10) + ((1) * 1000) + 901)" +XORG_VERSION_CURRENT="(((1) * 1000) + ((6) * 10) + ((2) * 1000) + 0)" .endif PRINT_PACKAGE_VERSION= awk '/^PACKAGE_VERSION=/ { \
CVS commit: xsrc/external/mit/xorg-server/include
Module Name:xsrc Committed By: mrg Date: Thu Jul 9 07:30:54 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/include: dix-config.h xf86Build.h xorg-config.h xorg-server.h Log Message: update these for xorg-server 1.6.2. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xorg-server/include/dix-config.h cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/xorg-server/include/xf86Build.h cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/include/xorg-config.h cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xorg-server/include/xorg-server.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/include/dix-config.h diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.10 xsrc/external/mit/xorg-server/include/dix-config.h:1.11 --- xsrc/external/mit/xorg-server/include/dix-config.h:1.10 Tue Jun 16 00:25:39 2009 +++ xsrc/external/mit/xorg-server/include/dix-config.h Thu Jul 9 07:30:54 2009 @@ -11,7 +11,7 @@ /* #define BUILDERADDR "x...@lists.freedesktop.org" */ /* Operating System Name */ -/* #define OSNAME "NetBSD 5.0 amd64" */ +/* #define OSNAME "NetBSD 5.0_STABLE amd64" */ /* Operating System Vendor */ /* #define OSVENDOR "" */ @@ -333,10 +333,10 @@ /* #undef XORG_RELEASE */ /* Current Xorg version */ -#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((1) * 1000) + 901) +#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((2) * 1000) + 0) /* Xorg release date */ -#define XORG_DATE "2009-5-8" +#define XORG_DATE "2009-7-7" /* Build Xv Extension */ #define XvExtension 1 Index: xsrc/external/mit/xorg-server/include/xf86Build.h diff -u xsrc/external/mit/xorg-server/include/xf86Build.h:1.1 xsrc/external/mit/xorg-server/include/xf86Build.h:1.2 --- xsrc/external/mit/xorg-server/include/xf86Build.h:1.1 Fri Jun 12 01:54:48 2009 +++ xsrc/external/mit/xorg-server/include/xf86Build.h Thu Jul 9 07:30:54 2009 @@ -1,2 +1,2 @@ -#define BUILD_DATE 20090610 -#define BUILD_TIME 00 +#define BUILD_DATE 20090709 +#define BUILD_TIME 1001403 Index: xsrc/external/mit/xorg-server/include/xorg-config.h diff -u xsrc/external/mit/xorg-server/include/xorg-config.h:1.6 xsrc/external/mit/xorg-server/include/xorg-config.h:1.7 --- xsrc/external/mit/xorg-server/include/xorg-config.h:1.6 Tue Jun 16 00:25:39 2009 +++ xsrc/external/mit/xorg-server/include/xorg-config.h Thu Jul 9 07:30:54 2009 @@ -17,7 +17,7 @@ #define XORGSERVER 1 /* Current X.Org version. */ -#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((1) * 1000) + 901) +#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((2) * 1000) + 0) /* Name of X server. */ #define __XSERVERNAME__ "Xorg" @@ -85,8 +85,8 @@ /* BSD /dev/io */ /* #undef USE_DEV_IO */ -/* BSD i386 iopl */ #if defined(__i386__) || defined(__x86_64__) +/* BSD i386 iopl */ #define USE_I386_IOPL 1 #endif Index: xsrc/external/mit/xorg-server/include/xorg-server.h diff -u xsrc/external/mit/xorg-server/include/xorg-server.h:1.3 xsrc/external/mit/xorg-server/include/xorg-server.h:1.4 --- xsrc/external/mit/xorg-server/include/xorg-server.h:1.3 Thu Jun 11 04:56:54 2009 +++ xsrc/external/mit/xorg-server/include/xorg-server.h Thu Jul 9 07:30:54 2009 @@ -126,7 +126,7 @@ /* #undef XORG_RELEASE */ /* Current Xorg version */ -#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((1) * 1000) + 901) +#define XORG_VERSION_CURRENT (((1) * 1000) + ((6) * 10) + ((2) * 1000) + 0) /* Build Xv Extension */ #define XvExtension 1
CVS commit: src
Module Name:src Committed By: mrg Date: Thu Jul 9 07:31:55 UTC 2009 Modified Files: src: UPDATING Log Message: note that update builds might again fail for new xorg To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.197 src/UPDATING:1.198 --- src/UPDATING:1.197 Sun Jun 21 20:08:36 2009 +++ src/UPDATING Thu Jul 9 07:31:54 2009 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.197 2009/06/21 20:08:36 mrg Exp $ +$NetBSD: UPDATING,v 1.198 2009/07/09 07:31:54 mrg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,6 +16,10 @@ Recent changes: ^^^ +20090709: + Native Xorg was upgraded again. Builds will probably fail again + without a clean objdir, at least for src/external/mit/xorg. + 20090616: Native Xorg was upgraded. Builds will need a clean objdir for src/external/mit/xorg. Upgrading a system from sets will not
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-savage
Module Name:src Committed By: mrg Date: Thu Jul 9 07:50:10 UTC 2009 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-savage: Makefile Log Message: XXX: -Wno-error savage_exa.c for now. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile:1.5 src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile:1.6 --- src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile:1.5 Mon Jun 29 15:40:10 2009 +++ src/external/mit/xorg/server/drivers/xf86-video-savage/Makefile Thu Jul 9 07:50:10 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/06/29 15:40:10 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2009/07/09 07:50:10 mrg Exp $ DRIVER= xf86-video-savage DRIVER_NAME= savage_drv @@ -24,5 +24,6 @@ CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/X11/drm CPPFLAGS.savage_driver.c= -DPACKAGE_VERSION=\"${PACKAGE_MAJOR}\" +CPPFLAGS.savage_exa.c= -Wno-error # volatile -> mempcy .include "../Makefile.xf86-driver"
CVS commit: src
Module Name:src Committed By: dholland Date: Thu Jul 9 07:50:24 UTC 2009 Modified Files: src: UPDATING Log Message: Fix a garbled old entry that I happened upon just now. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.198 src/UPDATING:1.199 --- src/UPDATING:1.198 Thu Jul 9 07:31:54 2009 +++ src/UPDATING Thu Jul 9 07:50:24 2009 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.198 2009/07/09 07:31:54 mrg Exp $ +$NetBSD: UPDATING,v 1.199 2009/07/09 07:50:24 dholland Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -200,9 +200,10 @@ and userland are from after 20070913. 20070703: - nbinstall has been renamed as it calls the target specific and - the logic to pass down STRIP from mk been removed. This forces - a re-installation of tools. + nbinstall has been renamed ${MACHINE_GNU_ARCH}-install. It + calls the target-specific strip program, and the logic to pass + down STRIP from make has been removed. This requires a + re-installation of tools. 20070422: The way OS emulations lookup filenames inside the emulation root
CVS commit: src
Module Name:src Committed By: dholland Date: Thu Jul 9 08:04:32 UTC 2009 Modified Files: src: UPDATING Log Message: Add an entry for last summer's libpthread compat fix, since it apparently never got listed (only posted on current-users) and came up again recently. Thanks to Martin Husemann, Matthias Drochner, and Geoff Wing for info (any errors are mine). As per http://mail-index.netbsd.org/current-users/2008/08/05/msg003880.html. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.199 src/UPDATING:1.200 --- src/UPDATING:1.199 Thu Jul 9 07:50:24 2009 +++ src/UPDATING Thu Jul 9 08:04:32 2009 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.199 2009/07/09 07:50:24 dholland Exp $ +$NetBSD: UPDATING,v 1.200 2009/07/09 08:04:32 dholland Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -124,6 +124,20 @@ MKDEBUG build was broken because the .depend files did not know about .go files. You need to remove all .depend files and rebuild. +20080802: + A regression in binary compatibility for pthread_mutex_t has + been fixed. Unfortunately, the price is breaking compatibility + for -current. + + Threaded programs (using libpthread) and C++ programs (using + libstdc++) compiled after 20070907 and before 20080802 need to + be recompiled. + + One way to find affected pkgsrc packages: + + $ grep REQUIRES=/usr/lib/libpthread /var/db/pkg/*/+BUILD_INFO + $ grep REQUIRES=/usr/lib/libstdc++ /var/db/pkg/*/+BUILD_INFO + 20080731: WAPBL (metadata journaling support) has been added, but at this time isn't backwards compatible with pre-WAPBL aware kernels
CVS commit: src/sys/arch/sandpoint/stand/netboot
Module Name:src Committed By: nisimura Date: Thu Jul 9 15:39:28 UTC 2009 Modified Files: src/sys/arch/sandpoint/stand/netboot: tlp.c Log Message: - show link speed and duplexity. - fix an incomplete mod in mii_read(). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sandpoint/stand/netboot/tlp.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/sandpoint/stand/netboot/tlp.c diff -u src/sys/arch/sandpoint/stand/netboot/tlp.c:1.23 src/sys/arch/sandpoint/stand/netboot/tlp.c:1.24 --- src/sys/arch/sandpoint/stand/netboot/tlp.c:1.23 Fri Jul 3 10:31:19 2009 +++ src/sys/arch/sandpoint/stand/netboot/tlp.c Thu Jul 9 15:39:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tlp.c,v 1.23 2009/07/03 10:31:19 nisimura Exp $ */ +/* $NetBSD: tlp.c,v 1.24 2009/07/09 15:39:28 nisimura Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -95,6 +95,7 @@ #define SROM_SR (1U<<11) /* SEEPROM select */ #define PAR0_CSR25 0xa4 /* MAC 3:0 */ #define PAR1_CSR26 0xa8 /* MAC 5:4 */ +#define AN_OMODE 0xfc /* operation mode */ #define FRAMESIZE 1536 @@ -127,9 +128,9 @@ void * tlp_init(unsigned tag, void *data) { - unsigned val, i; struct local *l; struct desc *txd, *rxd; + unsigned i, val, fdx; uint8_t *en; l = ALLOC(struct local, 2 * sizeof(struct desc)); /* desc alignment */ @@ -165,6 +166,15 @@ mii_initphy(l); mii_dealan(l, 5); + val = CSR_READ(l, AN_OMODE); + if (val & (1U << 29)) { + printf("%s", (val & (1U << 31)) ? "100Mbps" : "10Mbps"); + fdx = !!(val & (1U << 30)); + if (fdx) + printf("-FDX"); + printf("\n"); + } + txd = &l->txd[0]; txd[1].xd1 = htole32(T1_TER); rxd = &l->rxd[0]; @@ -302,7 +312,7 @@ for (i = 0; i < 18; i++) { CSR_WRITE(l, SPR_CSR9, MII_MIDIR); DELAY(1); - rv = (data << 1) | !!(CSR_READ(l, SPR_CSR9) & MII_MDI); + rv = (rv << 1) | !!(CSR_READ(l, SPR_CSR9) & MII_MDI); CSR_WRITE(l, SPR_CSR9, MII_MIDIR | MII_MDC); DELAY(1); }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: pgoyette Date: Thu Jul 9 15:50:26 UTC 2009 Modified Files: src/sys/arch/x86/x86: ipmi.c Log Message: Don't extract upper/lower limit values if the values are not valid. Correct comparison of cur_value against lower-limits. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/ipmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/ipmi.c diff -u src/sys/arch/x86/x86/ipmi.c:1.36 src/sys/arch/x86/x86/ipmi.c:1.37 --- src/sys/arch/x86/x86/ipmi.c:1.36 Mon Jun 29 12:30:09 2009 +++ src/sys/arch/x86/x86/ipmi.c Thu Jul 9 15:50:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.36 2009/06/29 12:30:09 pgoyette Exp $ */ +/* $NetBSD: ipmi.c,v 1.37 2009/07/09 15:50:26 pgoyette Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.36 2009/06/29 12:30:09 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.37 2009/07/09 15:50:26 pgoyette Exp $"); #include #include @@ -1374,27 +1374,27 @@ data[0], data[1], data[2], data[3], data[4], data[5], data[6]); limits->sel_flags = 0; - if (data[0] & 0x20) { + if (data[0] & 0x20 && data[6] != 0xff) { limits->sel_critmax = ipmi_convert_sensor(&data[6], psensor); limits->sel_flags |= PROP_CRITMAX; } - if (data[0] & 0x10) { + if (data[0] & 0x10 && data[5] != 0xff) { limits->sel_critmax = ipmi_convert_sensor(&data[5], psensor); limits->sel_flags |= PROP_CRITMAX; } - if (data[0] & 0x08) { + if (data[0] & 0x08 && data[4] != 0xff) { limits->sel_warnmax = ipmi_convert_sensor(&data[4], psensor); limits->sel_flags |= PROP_WARNMAX; } - if (data[0] & 0x04) { + if (data[0] & 0x04 && data[3] != 0x00) { limits->sel_critmin = ipmi_convert_sensor(&data[3], psensor); limits->sel_flags |= PROP_CRITMIN; } - if (data[0] & 0x02) { + if (data[0] & 0x02 && data[2] != 0x00) { limits->sel_critmin = ipmi_convert_sensor(&data[2], psensor); limits->sel_flags |= PROP_CRITMIN; } - if (data[0] & 0x01) { + if (data[0] & 0x01 && data[1] != 0x00) { limits->sel_warnmin = ipmi_convert_sensor(&data[1], psensor); limits->sel_flags |= PROP_WARNMIN; } @@ -1428,11 +1428,11 @@ return ENVSYS_SWARNOVER; if (psensor->i_limits->sel_flags & PROP_WARNMIN && - edata->value_cur > psensor->i_limits->sel_warnmin) + edata->value_cur < psensor->i_limits->sel_warnmin) return ENVSYS_SWARNUNDER; if (psensor->i_limits->sel_flags & PROP_CRITMIN && - edata->value_cur > psensor->i_limits->sel_critmin) + edata->value_cur < psensor->i_limits->sel_critmin) return ENVSYS_SCRITUNDER; break;
CVS commit: src/lib/libedit/readline
Module Name:src Committed By: christos Date: Thu Jul 9 19:02:04 UTC 2009 Modified Files: src/lib/libedit/readline: readline.h Log Message: add stdio.h since we are using FILE. From Grant Erickson To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libedit/readline/readline.h 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/readline/readline.h diff -u src/lib/libedit/readline/readline.h:1.26 src/lib/libedit/readline/readline.h:1.27 --- src/lib/libedit/readline/readline.h:1.26 Tue Mar 31 13:53:03 2009 +++ src/lib/libedit/readline/readline.h Thu Jul 9 15:02:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.26 2009/03/31 17:53:03 christos Exp $ */ +/* $NetBSD: readline.h,v 1.27 2009/07/09 19:02:04 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -32,6 +32,7 @@ #define _READLINE_H_ #include +#include /* list of readline stuff supported by editline library's readline wrapper */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Thu Jul 9 19:22:21 UTC 2009 Modified Files: src/sys/dev/pci: pci_usrreq.c Log Message: enable mmap() support for /dev/pci* with options PCI_ALLOW_MMAP To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/pci_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_usrreq.c diff -u src/sys/dev/pci/pci_usrreq.c:1.19 src/sys/dev/pci/pci_usrreq.c:1.20 --- src/sys/dev/pci/pci_usrreq.c:1.19 Tue Jul 7 17:08:19 2009 +++ src/sys/dev/pci/pci_usrreq.c Thu Jul 9 19:22:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_usrreq.c,v 1.19 2009/07/07 17:08:19 christos Exp $ */ +/* $NetBSD: pci_usrreq.c,v 1.20 2009/07/09 19:22:21 macallan Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.19 2009/07/07 17:08:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.20 2009/07/09 19:22:21 macallan Exp $"); #include #include @@ -55,6 +55,8 @@ #include #include +#include "opt_pci.h" + static int pciopen(dev_t dev, int flags, int mode, struct lwp *l) { @@ -110,7 +112,7 @@ static paddr_t pcimmap(dev_t dev, off_t offset, int prot) { -#if 0 +#ifdef PCI_ALLOW_MMAP struct pci_softc *sc = device_lookup_private(&pci_cd, minor(dev)); /* @@ -119,7 +121,26 @@ * and pass 0 as the offset into that range. * * XXX Need a way to deal with linear/prefetchable/etc. + * + * XXX we rely on MD mmap() methods to enforce limits since these + * are hidden in *_tag_t structs if they exist at all */ + +#ifdef PCI_MAGIC_IO_RANGE + /* + * first, check if someone's trying to map the IO range + * XXX this assumes 64kB IO space even though some machines can have + * significantly more than that - macppc's bandit host bridge allows + * 8MB IO space and sparc64 may have the entire 4GB available. The + * firmware on both tries to use the lower 64kB first though and + * exausting it is pretty difficult so we should be safe + */ + if ((offset >= PCI_MAGIC_IO_RANGE) && + (offset < (PCI_MAGIC_IO_RANGE + 0x1))) { + return bus_space_mmap(sc->sc_iot, offset - PCI_MAGIC_IO_RANGE, + 0, prot, 0); + } +#endif /* PCI_MAGIC_IO_RANGE */ return bus_space_mmap(sc->sc_memt, offset, 0, prot, 0); #else /* XXX Consider this further. */
CVS commit: xsrc/external/mit/libpciaccess/dist/src
Module Name:xsrc Committed By: macallan Date: Thu Jul 9 19:27:08 UTC 2009 Modified Files: xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c Log Message: teack libpciaccess how to discover and map PCI devices on machines with more than one host bridge. While there get rid of some local (re)defines if PCI-related constants. With this Xorg should be able to use any PCI graphics device, no matter if it's console or not. TODO: - cleanup - deal with IO spaces - fix Xorg -configure To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.3 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4 --- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.3 Fri Jul 3 21:03:50 2009 +++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Thu Jul 9 19:27:08 2009 @@ -1,6 +1,7 @@ /* * Copyright (c) 2008 Juan Romero Pardines * Copyright (c) 2008 Mark Kettenis + * Copyright (c) 2009 Michael Lorenz * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -43,22 +44,50 @@ #include "pciaccess.h" #include "pciaccess_private.h" -#define PCIR_COMMAND0x04 -#define PCIM_CMD_PORTEN 0x0001 -#define PCIM_CMD_MEMEN 0x0002 -#define PCIR_BIOS 0x30 -#define PCIM_BIOS_ENABLE 0x01 -#define PCIM_BIOS_ADDR_MASK 0xf800 - -static int pcifd; +typedef struct _pcibus { + int fd; /* /dev/pci* */ + int num; /* bus number */ + int maxdevs; /* maximum number of devices */ +} PciBus; + +static PciBus buses[32]; /* indexed by pci_device.domain */ +static int nbuses = 0; /* number of buses found */ + +/* + * NetBSD's userland has a /dev/pci* entry for each bus but userland has no way + * to tell if a bus is a subordinate of another one or if it's on a different + * host bridge. On some architectures ( macppc for example ) all root buses have + * bus number 0 but on sparc64 for example the two roots in an Ultra60 have + * different bus numbers - one is 0 and the other 128. + * With each /dev/pci* we can map everything on the same root and we can also + * see all devices on the same root, trying to do that causes problems though: + * - since we can't tell which /dev/pci* is a subordinate we would find some + * devices more than once + * - we would have to guess subordinate bus numbers which is a waste of time + * since we can ask each /dev/pci* for its bus number so we can scan only the + * buses we know exist, not all 256 which may exist in each domain. + * - some bus_space_mmap() methods may limit mappings to address ranges which + * belong to known devices on that bus only. + * Each host bridge may or may not have its own IO range, to avoid guesswork + * here each /dev/pci* will let userland map its appropriate IO range at + * PCI_MAGIC_IO_RANGE if defined in + * With all this we should be able to use any PCI graphics device on any PCI + * bus on any architecture as long as Xorg has a driver, without allowing + * arbitrary mappings via /dev/mem and without userland having to know or care + * about translating bus addresses to physical addresses or the other way + * around. + */ static int -pci_read(int bus, int dev, int func, uint32_t reg, uint32_t *val) +pci_read(int domain, int bus, int dev, int func, uint32_t reg, uint32_t *val) { uint32_t rval; - if (pcibus_conf_read(pcifd, (unsigned int)bus, (unsigned int)dev, - (unsigned int)func, reg, &rval) == -1) + if ((domain < 0) || (domain > nbuses)) + return -1; + + if (pcibus_conf_read(buses[domain].fd, (unsigned int)bus, + (unsigned int)dev, (unsigned int)func, reg, &rval) == -1) return (-1); *val = rval; @@ -67,18 +96,25 @@ } static int -pci_write(int bus, int dev, int func, uint32_t reg, uint32_t val) +pci_write(int domain, int bus, int dev, int func, uint32_t reg, uint32_t val) { - return pcibus_conf_write(pcifd, (unsigned int)bus, (unsigned int)dev, - (unsigned int)func, reg, val); + + if ((domain < 0) || (domain > nbuses)) + return -1; + + return pcibus_conf_write(buses[domain].fd, (unsigned int)bus, + (unsigned int)dev, (unsigned int)func, reg, val); } static int -pci_nfuncs(int bus, int dev) +pci_nfuncs(int domain, int bus, int dev) { uint32_t hdr; - if (pci_read(bus, dev, 0, PCI_BHLC_REG, &hdr) != 0) + if ((domain < 0) || (domain > nbuses)) + return -1; + + if (pci_read(domain, bus, dev, 0, PCI_BHLC_REG, &hdr) != 0) return -1; return (PCI_HDRTYPE_MULTIFN(hdr) ? 8 : 1); @@ -93,18 +129,14 @@ struct mtrr m; int n = 1; #endif - int prot, fd, ret = 0; + int prot, ret = 0; prot = PROT_READ; if (map->flags & PCI_DEV_MAP_FLAG_WRITABLE) prot |= PROT_WRIT
CVS commit: [netbsd-5-0] src/sys/netinet
Module Name:src Committed By: snj Date: Thu Jul 9 19:35:56 UTC 2009 Modified Files: src/sys/netinet [netbsd-5-0]: ip_output.c Log Message: Pull up following revision(s) (requested by martin in ticket #847): sys/netinet/ip_output.c: revision 1.203 >From Wolfgang Stukenbrock in PR kern/41659: add missing splx(). To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.200.10.1 src/sys/netinet/ip_output.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/netinet/ip_output.c diff -u src/sys/netinet/ip_output.c:1.200 src/sys/netinet/ip_output.c:1.200.10.1 --- src/sys/netinet/ip_output.c:1.200 Sun Oct 12 11:15:54 2008 +++ src/sys/netinet/ip_output.c Thu Jul 9 19:35:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.200 2008/10/12 11:15:54 plunky Exp $ */ +/* $NetBSD: ip_output.c,v 1.200.10.1 2009/07/09 19:35:56 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.200 2008/10/12 11:15:54 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.200.10.1 2009/07/09 19:35:56 snj Exp $"); #include "opt_pfil_hooks.h" #include "opt_inet.h" @@ -671,8 +671,10 @@ if (!ipsec_outdone(m)) { s = splsoftnet(); if (inp != NULL && -IPSEC_PCB_SKIP_IPSEC(inp->inp_sp, IPSEC_DIR_OUTBOUND)) + IPSEC_PCB_SKIP_IPSEC(inp->inp_sp, IPSEC_DIR_OUTBOUND)) { + splx(s); goto spd_done; + } sp = ipsec4_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, inp); /*
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Thu Jul 9 19:37:59 UTC 2009 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.1 Log Message: Ticket 847. To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-5.0.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0.1 diff -u src/doc/CHANGES-5.0.1:1.1.2.33 src/doc/CHANGES-5.0.1:1.1.2.34 --- src/doc/CHANGES-5.0.1:1.1.2.33 Sun Jul 5 14:21:40 2009 +++ src/doc/CHANGES-5.0.1 Thu Jul 9 19:37:59 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.1,v 1.1.2.33 2009/07/05 14:21:40 snj Exp $ +# $NetBSD: CHANGES-5.0.1,v 1.1.2.34 2009/07/09 19:37:59 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.0.1 release: @@ -579,3 +579,8 @@ Fix build problem from ticket 850 on non-64bit systems. [spz, ticket #851] +sys/netinet/ip_output.c1.203 + + Fix PR kern/41659: add missing splx() in FAST_IPSEC code. + [martin, ticket #847] +
CVS commit: [netbsd-5] src/sys/netinet
Module Name:src Committed By: snj Date: Thu Jul 9 19:38:27 UTC 2009 Modified Files: src/sys/netinet [netbsd-5]: ip_output.c Log Message: Pull up following revision(s) (requested by martin in ticket #847): sys/netinet/ip_output.c: revision 1.203 >From Wolfgang Stukenbrock in PR kern/41659: add missing splx(). To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.200.4.1 src/sys/netinet/ip_output.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/netinet/ip_output.c diff -u src/sys/netinet/ip_output.c:1.200 src/sys/netinet/ip_output.c:1.200.4.1 --- src/sys/netinet/ip_output.c:1.200 Sun Oct 12 11:15:54 2008 +++ src/sys/netinet/ip_output.c Thu Jul 9 19:38:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.200 2008/10/12 11:15:54 plunky Exp $ */ +/* $NetBSD: ip_output.c,v 1.200.4.1 2009/07/09 19:38:27 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.200 2008/10/12 11:15:54 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.200.4.1 2009/07/09 19:38:27 snj Exp $"); #include "opt_pfil_hooks.h" #include "opt_inet.h" @@ -671,8 +671,10 @@ if (!ipsec_outdone(m)) { s = splsoftnet(); if (inp != NULL && -IPSEC_PCB_SKIP_IPSEC(inp->inp_sp, IPSEC_DIR_OUTBOUND)) + IPSEC_PCB_SKIP_IPSEC(inp->inp_sp, IPSEC_DIR_OUTBOUND)) { + splx(s); goto spd_done; + } sp = ipsec4_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, inp); /*
CVS commit: [netbsd-5] src/external/mit/xorg/server/drivers/xf86-video-mga
Module Name:src Committed By: snj Date: Thu Jul 9 19:40:25 UTC 2009 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-mga [netbsd-5]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #849): external/mit/xorg/server/drivers/xf86-video-mga/Makefile: revision 1.6 enable EXA and XAA. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.8.1 \ src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile:1.4 src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile:1.4.8.1 --- src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile:1.4 Mon Sep 1 04:21:04 2008 +++ src/external/mit/xorg/server/drivers/xf86-video-mga/Makefile Thu Jul 9 19:40:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2008/09/01 04:21:04 mrg Exp $ +# $NetBSD: Makefile,v 1.4.8.1 2009/07/09 19:40:25 snj Exp $ .include @@ -17,10 +17,12 @@ #if USE_EXA SRCS+= mga_exa.c +CPPFLAGS+= -DUSE_EXA #endif #if USE_XAA SRCS+= mga_storm.c +CPPFLAGS+= -DUSE_XAA #endif CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/X11
CVS commit: [netbsd-5] src/sys/fs/udf
Module Name:src Committed By: snj Date: Thu Jul 9 19:53:49 UTC 2009 Modified Files: src/sys/fs/udf [netbsd-5]: udf_strat_rmw.c Log Message: Pull up following revision(s) (requested by reinoud in ticket #853): sys/fs/udf/udf_strat_rmw.c: revision 1.22 Fix alternating oddity in RMW strategy. Even when in the reading state it would push out elements to fillup-read only when the time had come for them. This could then trickle feed the read queue slowly, but fast enough to prevent it from switching state. To generate a diff of this commit: cvs rdiff -u -r1.9.4.9 -r1.9.4.10 src/sys/fs/udf/udf_strat_rmw.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/fs/udf/udf_strat_rmw.c diff -u src/sys/fs/udf/udf_strat_rmw.c:1.9.4.9 src/sys/fs/udf/udf_strat_rmw.c:1.9.4.10 --- src/sys/fs/udf/udf_strat_rmw.c:1.9.4.9 Thu Jul 9 19:44:34 2009 +++ src/sys/fs/udf/udf_strat_rmw.c Thu Jul 9 19:53:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_strat_rmw.c,v 1.9.4.9 2009/07/09 19:44:34 snj Exp $ */ +/* $NetBSD: udf_strat_rmw.c,v 1.9.4.10 2009/07/09 19:53:49 snj Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -28,7 +28,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.9.4.9 2009/07/09 19:44:34 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.9.4.10 2009/07/09 19:53:49 snj Exp $"); #endif /* not lint */ @@ -1214,10 +1214,12 @@ if (eccline == NULL) break; - /* all others are later, so if not satisfied, abort */ - if ((eccline->wait_time.tv_sec - now.tv_sec > 0)) { -UDF_UNLOCK_ECCLINE(eccline); -break; + /* if not reading, wait until the time has come */ + if ((priv->cur_queue != UDF_SHED_READING) && +(eccline->wait_time.tv_sec - now.tv_sec > 0)) { + UDF_UNLOCK_ECCLINE(eccline); + /* all others are later, so break off */ + break; } /* release */
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Thu Jul 9 19:57:47 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 847, 852, and 853. To generate a diff of this commit: cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.45 src/doc/CHANGES-5.1:1.1.2.46 --- src/doc/CHANGES-5.1:1.1.2.45 Sun Jul 5 14:22:00 2009 +++ src/doc/CHANGES-5.1 Thu Jul 9 19:57:47 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.45 2009/07/05 14:22:00 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.46 2009/07/09 19:57:47 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -1506,3 +1506,42 @@ Fix build problem from ticket 850 on non-64bit systems. [spz, ticket #851] +sys/netinet/ip_output.c1.203 + + Fix PR kern/41659: add missing splx() in FAST_IPSEC code. + [martin, ticket #847] + +external/mit/xorg/server/drivers/xf86-video-mga/Makefile 1.6 + + Enable EXA and XAA support in xf86-video-mga. + [mrg, ticket #849] + +sys/fs/udf/udf.hpatch +sys/fs/udf/udf_allocation.c patch +sys/fs/udf/udf_osta.cpatch +sys/fs/udf/udf_readwrite.c patch +sys/fs/udf/udf_strat_bootstrap.c patch +sys/fs/udf/udf_strat_direct.c patch +sys/fs/udf/udf_strat_rmw.c patch +sys/fs/udf/udf_strat_sequential.c patch +sys/fs/udf/udf_subr.cpatch +sys/fs/udf/udf_subr.hpatch +sys/fs/udf/udf_vfsops.cpatch +sys/fs/udf/udf_vnops.cpatch + + Numerous UDF improvements: + - a much saner rmw backend + - free space management done right + - the high system time usage when encountering huge numbers + of nodes are a thing of the past due to refactoring + - various small fixes + [reinoud, ticket #852] + +sys/fs/udf/udf_strat_rmw.c 1.22 + + Fix alternating oddity in RMW strategy. Even when in the reading + state it would push out elements to fillup-read only when the + time had come for them. This could then trickle feed the read + queue slowly, but fast enough to prevent it from switching state. + [reinoud, ticket #853] +
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Thu Jul 9 21:43:17 UTC 2009 Modified Files: src/sys/arch/amd64/amd64: vector.S src/sys/arch/i386/i386: vector.S src/sys/uvm: uvm_emap.c Log Message: - Fix rare crashe in the intr_lapic_tlb_bcast() handler: save and setup %fs on i386, %gs on amd64 registers, before using them. Otherwise, it might be invalid/garbage, eg. IPI can interrupt userspace. - Explicitly initialize per-CPU emap generation number. Thanks for reporting and testing of patch. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/i386/vector.S cvs rdiff -u -r1.1 -r1.2 src/sys/uvm/uvm_emap.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/vector.S diff -u src/sys/arch/amd64/amd64/vector.S:1.30 src/sys/arch/amd64/amd64/vector.S:1.31 --- src/sys/arch/amd64/amd64/vector.S:1.30 Sun Jun 28 15:18:50 2009 +++ src/sys/arch/amd64/amd64/vector.S Thu Jul 9 21:43:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.30 2009/06/28 15:18:50 rmind Exp $ */ +/* $NetBSD: vector.S,v 1.31 2009/07/09 21:43:16 rmind Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -524,6 +524,10 @@ * Broadcast TLB shootdown handler for kernel_pmap. */ IDTVEC(intr_lapic_tlb_bcast) + testq $SEL_UPL,8(%rsp) + jz 0f + swapgs +0: /* Save state. */ pushq %rax pushq %rdi @@ -556,6 +560,10 @@ popq %rsi popq %rdi popq %rax + testq $SEL_UPL, 8(%rsp) + jz 5f + swapgs +5: iretq 3: testq %rdi, %rdi Index: src/sys/arch/i386/i386/vector.S diff -u src/sys/arch/i386/i386/vector.S:1.46 src/sys/arch/i386/i386/vector.S:1.47 --- src/sys/arch/i386/i386/vector.S:1.46 Sun Jun 28 15:18:50 2009 +++ src/sys/arch/i386/i386/vector.S Thu Jul 9 21:43:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.46 2009/06/28 15:18:50 rmind Exp $ */ +/* $NetBSD: vector.S,v 1.47 2009/07/09 21:43:16 rmind Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.46 2009/06/28 15:18:50 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.47 2009/07/09 21:43:16 rmind Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -252,6 +252,12 @@ pushl %ebx pushl %ecx pushl %edx + pushl %ds + pushl %fs + movl $GSEL(GDATA_SEL, SEL_KPL), %eax + movl $GSEL(GCPU_SEL, SEL_KPL), %edx + movl %eax, %ds + movl %edx, %fs /* Find out what we need to invalidate. */ movl %ss:_C_LABEL(pmap_mbox)+MB_ADDR1, %eax movl %ss:_C_LABEL(pmap_mbox)+MB_ADDR2, %edx @@ -269,6 +275,8 @@ /* Ack the request, restore state & return. */ lock incl %ss:_C_LABEL(pmap_mbox)+MB_TAIL + popl %fs + popl %ds popl %edx popl %ecx popl %ebx Index: src/sys/uvm/uvm_emap.c diff -u src/sys/uvm/uvm_emap.c:1.1 src/sys/uvm/uvm_emap.c:1.2 --- src/sys/uvm/uvm_emap.c:1.1 Sun Jun 28 15:18:50 2009 +++ src/sys/uvm/uvm_emap.c Thu Jul 9 21:43:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_emap.c,v 1.1 2009/06/28 15:18:50 rmind Exp $ */ +/* $NetBSD: uvm_emap.c,v 1.2 2009/07/09 21:43:17 rmind Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_emap.c,v 1.1 2009/06/28 15:18:50 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_emap.c,v 1.2 2009/07/09 21:43:17 rmind Exp $"); #include #include @@ -81,7 +81,9 @@ void uvm_emap_sysinit(void) { + struct uvm_cpu *ucpu; size_t qmax; + u_int i; uvm_emap_size = roundup(uvm_emap_size, PAGE_SIZE); qmax = 16 * PAGE_SIZE; @@ -98,7 +100,12 @@ panic("uvm_emap_init: vmem creation failed"); } + /* Initial generation value is 1. */ uvm_emap_gen = 1; + for (i = 0; i < MAXCPUS; i++) { + ucpu = &uvm.cpus[i]; + ucpu->emap_gen = 1; + } } /*
CVS commit: src/doc
Module Name:src Committed By: rmind Date: Thu Jul 9 21:53:08 UTC 2009 Modified Files: src/doc: CHANGES Log Message: Mention emap and few more items. To generate a diff of this commit: cvs rdiff -u -r1.1248 -r1.1249 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.1248 src/doc/CHANGES:1.1249 --- src/doc/CHANGES:1.1248 Wed Jul 8 22:36:29 2009 +++ src/doc/CHANGES Thu Jul 9 21:53:08 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1248 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1249 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -161,6 +161,8 @@ dependencies will no longer be available from NetBSD 6.0 onwards. We encourage users to enable logging on FFS file systems. [ad 20090222] + i386, amd64: ucas (CAS for user-space address) support for i386/amd64. + [rmind 20090223] dhcpcd(8): Import dhcpcd-4.0.12. [roy 20090226] evbarm: Improved support for GPIO support on the EP93xx ARM processors. [kenh 20090227] @@ -287,6 +289,8 @@ with strftime(3). [ginsbach 20090524] kernel: File descriptor access performance improvements. [ad 20090524] + i386, amd64: CPU topology detection support for AMD processors. + [rmind 20090526] rumpnet: Add IPv6 support [pooka 20090527] agr(4): Add support for layering vlans on top. Also allow LACP to be disabled. [darran 20090529] @@ -306,5 +310,7 @@ postfix(1): Import version 2.6.2 [tron 20090623] wake(8): New command to send Wake-on-LAN packets to machines on the local Ethernet. [mbalmer 20090625] + kernel: Ephemeral mapping (emap) implementation, i386/amd64 support. + [rmind 20090628] dhcpcd(8): Import dhcpcd-5.0.5 [roy 20090704] dhcpcd(8): Import dhcpcd-5.0.6 [roy 20090708]
CVS commit: src/lib/libcurses
Module Name:src Committed By: joerg Date: Thu Jul 9 22:08:45 UTC 2009 Modified Files: src/lib/libcurses: chgat.c Log Message: Ensure that y,x are valid coordinates before using them. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libcurses/chgat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/chgat.c diff -u src/lib/libcurses/chgat.c:1.2 src/lib/libcurses/chgat.c:1.3 --- src/lib/libcurses/chgat.c:1.2 Tue Jul 7 13:10:02 2009 +++ src/lib/libcurses/chgat.c Thu Jul 9 22:08:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: chgat.c,v 1.2 2009/07/07 13:10:02 joerg Exp $ */ +/* $NetBSD: chgat.c,v 1.3 2009/07/09 22:08:45 joerg Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: chgat.c,v 1.2 2009/07/07 13:10:02 joerg Exp $"); +__RCSID("$NetBSD: chgat.c,v 1.3 2009/07/09 22:08:45 joerg Exp $"); #include "curses.h" #include "curses_private.h" @@ -61,6 +61,11 @@ __LINE *lp; __LDATA *lc; + if (x < 0 || y < 0) + return (ERR); + if (x >= win->maxx || y >= win->maxy) + return (ERR); + attr = (attr & ~__COLOR) | COLOR_PAIR(color); if (count < 0 || count > win->maxx - x)
CVS commit: src/sys/nfs
Module Name:src Committed By: roy Date: Fri Jul 10 01:29:55 UTC 2009 Modified Files: src/sys/nfs: nfs_bootdhcp.c Log Message: When using DHCP, request the parameters that we need. Fixes PR kern/38830. Thanks to Tim McIntosh. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/nfs/nfs_bootdhcp.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/nfs/nfs_bootdhcp.c diff -u src/sys/nfs/nfs_bootdhcp.c:1.48 src/sys/nfs/nfs_bootdhcp.c:1.49 --- src/sys/nfs/nfs_bootdhcp.c:1.48 Wed May 6 05:34:12 2009 +++ src/sys/nfs/nfs_bootdhcp.c Fri Jul 10 01:29:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bootdhcp.c,v 1.48 2009/05/06 05:34:12 cegger Exp $ */ +/* $NetBSD: nfs_bootdhcp.c,v 1.49 2009/07/10 01:29:54 roy Exp $ */ /*- * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.48 2009/05/06 05:34:12 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.49 2009/07/10 01:29:54 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs_boot.h" @@ -461,6 +461,7 @@ #ifdef NFS_BOOT_DHCP char vci[64]; int vcilen; + unsigned int index; #endif error = socreate(AF_INET, &so, SOCK_DGRAM, 0, lwp, NULL); @@ -586,21 +587,32 @@ /* Fill-in the vendor data. */ memcpy(bootp->bp_vend, vm_rfc1048, 4); #ifdef NFS_BOOT_DHCP - bootp->bp_vend[4] = TAG_DHCP_MSGTYPE; - bootp->bp_vend[5] = 1; - bootp->bp_vend[6] = DHCPDISCOVER; + index = 4; + bootp->bp_vend[index++] = TAG_DHCP_MSGTYPE; + bootp->bp_vend[index++] = 1; + bootp->bp_vend[index++] = DHCPDISCOVER; + /* Request the paramters we need. */ + bootp->bp_vend[index++] = TAG_PARAM_REQ; + bootp->bp_vend[index++] = 6; + bootp->bp_vend[index++] = TAG_SUBNET_MASK; + bootp->bp_vend[index++] = TAG_GATEWAY; + bootp->bp_vend[index++] = TAG_HOST_NAME; + bootp->bp_vend[index++] = TAG_DOMAIN_NAME; + bootp->bp_vend[index++] = TAG_ROOT_PATH; + bootp->bp_vend[index++] = TAG_SWAP_SERVER; /* * Insert a NetBSD Vendor Class Identifier option. */ snprintf(vci, sizeof(vci), "%s:%s:kernel:%s", ostype, MACHINE, osrelease); vcilen = strlen(vci); - bootp->bp_vend[7] = TAG_CLASSID; - bootp->bp_vend[8] = vcilen; - memcpy(&bootp->bp_vend[9], vci, vcilen); - bootp->bp_vend[9 + vcilen] = TAG_END; + bootp->bp_vend[index++] = TAG_CLASSID; + bootp->bp_vend[index++] = vcilen; + memcpy(&bootp->bp_vend[index], vci, vcilen); + index += vcilen; + bootp->bp_vend[index] = TAG_END; #else - bootp->bp_vend[4] = TAG_END; + bootp->bp_vend[index] = TAG_END; #endif bpc.xid = xid; @@ -622,21 +634,38 @@ #ifdef NFS_BOOT_DHCP if (bpc.dhcp_ok) { u_int32_t leasetime; - bootp->bp_vend[6] = DHCPREQUEST; - bootp->bp_vend[7] = TAG_REQ_ADDR; - bootp->bp_vend[8] = 4; - memcpy(&bootp->bp_vend[9], &bpc.replybuf->bp_yiaddr, 4); - bootp->bp_vend[13] = TAG_SERVERID; - bootp->bp_vend[14] = 4; - memcpy(&bootp->bp_vend[15], &bpc.dhcp_serverip.s_addr, 4); - bootp->bp_vend[19] = TAG_LEASETIME; - bootp->bp_vend[20] = 4; + index = 6; + bootp->bp_vend[index++] = DHCPREQUEST; + bootp->bp_vend[index++] = TAG_REQ_ADDR; + bootp->bp_vend[index++] = 4; + memcpy(&bootp->bp_vend[index], &bpc.replybuf->bp_yiaddr, 4); + index += 4; + bootp->bp_vend[index++] = TAG_SERVERID; + bootp->bp_vend[index++] = 4; + memcpy(&bootp->bp_vend[index], &bpc.dhcp_serverip.s_addr, 4); + index += 4; + bootp->bp_vend[index++] = TAG_LEASETIME; + bootp->bp_vend[index++] = 4; leasetime = htonl(300); - memcpy(&bootp->bp_vend[21], &leasetime, 4); - bootp->bp_vend[25] = TAG_CLASSID; - bootp->bp_vend[26] = vcilen; - memcpy(&bootp->bp_vend[27], vci, vcilen); - bootp->bp_vend[27 + vcilen] = TAG_END; + memcpy(&bootp->bp_vend[index], &leasetime, 4); + index += 4; + /* Request the paramters we need. */ + bootp->bp_vend[index++] = TAG_PARAM_REQ; + bootp->bp_vend[index++] = 6; + bootp->bp_vend[index++] = TAG_SUBNET_MASK; + bootp->bp_vend[index++] = TAG_GATEWAY; + bootp->bp_vend[index++] = TAG_HOST_NAME; + bootp->bp_vend[index++] = TAG_DOMAIN_NAME; + bootp->bp_vend[index++] = TAG_ROOT_PATH; + bootp->bp_vend[index++] = TAG_SWAP_SERVER; + /* + * Insert a NetBSD Vendor Class Identifier option. + */ + bootp->bp_vend[index++] = TAG_CLASSID; + bootp->bp_vend[index++] = vcilen; + memcpy(&bootp->bp_vend[index], vci, vcilen); + index += vcilen; + bootp->bp_vend[index] = TAG_END; bpc.expected_dhcpmsgtype = DHCPACK;
CVS commit: src/sys/nfs
Module Name:src Committed By: roy Date: Fri Jul 10 02:41:39 UTC 2009 Modified Files: src/sys/nfs: nfs_bootdhcp.c Log Message: Protect against short IP addresses in the DHCP message. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/nfs/nfs_bootdhcp.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/nfs/nfs_bootdhcp.c diff -u src/sys/nfs/nfs_bootdhcp.c:1.49 src/sys/nfs/nfs_bootdhcp.c:1.50 --- src/sys/nfs/nfs_bootdhcp.c:1.49 Fri Jul 10 01:29:54 2009 +++ src/sys/nfs/nfs_bootdhcp.c Fri Jul 10 02:41:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bootdhcp.c,v 1.49 2009/07/10 01:29:54 roy Exp $ */ +/* $NetBSD: nfs_bootdhcp.c,v 1.50 2009/07/10 02:41:39 roy Exp $ */ /*- * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.49 2009/07/10 01:29:54 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.50 2009/07/10 02:41:39 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs_boot.h" @@ -747,15 +747,23 @@ #endif switch (tag) { case TAG_SUBNET_MASK: + if (len < 4) { +printf("nfs_boot: subnet mask < 4 bytes\n"); +break; + } memcpy(&netmask, p, 4); break; case TAG_GATEWAY: /* Routers */ + if (len < 4) { +printf("nfs_boot: routers < 4 bytes\n"); +break; + } memcpy(&gateway, p, 4); break; case TAG_HOST_NAME: if (len >= sizeof(hostname)) { -printf("nfs_boot: host name >= %lu bytes", +printf("nfs_boot: host name >= %lu bytes\n", (u_long)sizeof(hostname)); break; } @@ -764,7 +772,7 @@ break; case TAG_DOMAIN_NAME: if (len >= sizeof(domainname)) { -printf("nfs_boot: domain name >= %lu bytes", +printf("nfs_boot: domain name >= %lu bytes\n", (u_long)sizeof(domainname)); break; } @@ -774,7 +782,7 @@ case TAG_ROOT_PATH: /* Leave some room for the server name. */ if (len >= (MNAMELEN-10)) { -printf("nfs_boot: rootpath >=%d bytes", +printf("nfs_boot: rootpath >= %d bytes\n", (MNAMELEN-10)); break; } @@ -783,6 +791,10 @@ break; case TAG_SWAP_SERVER: /* override NFS server address */ + if (len < 4) { +printf("nfs_boot: swap server < 4 bytes\n"); +break; + } memcpy(&rootserver, p, 4); break; #ifdef NFS_BOOT_DHCP
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: roy Date: Fri Jul 10 02:55:42 UTC 2009 Modified Files: src/sys/lib/libsa: bootp.c Log Message: We should request the DHCP parameters we need. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libsa/bootp.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/libsa/bootp.c diff -u src/sys/lib/libsa/bootp.c:1.35 src/sys/lib/libsa/bootp.c:1.36 --- src/sys/lib/libsa/bootp.c:1.35 Wed May 6 23:56:49 2009 +++ src/sys/lib/libsa/bootp.c Fri Jul 10 02:55:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootp.c,v 1.35 2009/05/06 23:56:49 roy Exp $ */ +/* $NetBSD: bootp.c,v 1.36 2009/07/10 02:55:42 roy Exp $ */ /* * Copyright (c) 1992 Regents of the University of California. @@ -106,6 +106,7 @@ #ifdef SUPPORT_DHCP char vci[64]; int vcilen; + unsigned int index; #endif #ifdef BOOTP_DEBUG @@ -135,17 +136,28 @@ (void)strncpy((char *)bp->bp_file, bootfile, sizeof(bp->bp_file)); (void)memcpy(bp->bp_vend, vm_rfc1048, sizeof(vm_rfc1048)); #ifdef SUPPORT_DHCP - bp->bp_vend[4] = TAG_DHCP_MSGTYPE; - bp->bp_vend[5] = 1; - bp->bp_vend[6] = DHCPDISCOVER; + index = 4; + bp->bp_vend[index++] = TAG_DHCP_MSGTYPE; + bp->bp_vend[index++] = 1; + bp->bp_vend[index++] = DHCPDISCOVER; + /* Request the parameters we need. */ + bp->bp_vend[index++] = TAG_PARAM_REQ; + bp->bp_vend[index++] = 6; + bp->bp_vend[index++] = TAG_SUBNET_MASK; + bp->bp_vend[index++] = TAG_GATEWAY; + bp->bp_vend[index++] = TAG_HOSTNAME; + bp->bp_vend[index++] = TAG_DOMAINNAME; + bp->bp_vend[index++] = TAG_ROOTPATH; + bp->bp_vend[index++] = TAG_SWAPSERVER; /* * Insert a NetBSD Vendor Class Identifier option. */ sprintf(vci, "NetBSD:%s:libsa", MACHINE); vcilen = strlen(vci); - bp->bp_vend[7] = TAG_CLASSID; - bp->bp_vend[8] = vcilen; - (void)memcpy(&bp->bp_vend[9], vci, vcilen); + bp->bp_vend[index++] = TAG_CLASSID; + bp->bp_vend[index++] = vcilen; + (void)memcpy(&bp->bp_vend[index], vci, vcilen); + index += vcilen; bp->bp_vend[9 + vcilen] = TAG_END; #else bp->bp_vend[4] = TAG_END; @@ -172,26 +184,40 @@ #ifdef SUPPORT_DHCP if (dhcp_ok) { u_int32_t leasetime; - bp->bp_vend[6] = DHCPREQUEST; - bp->bp_vend[7] = TAG_REQ_ADDR; - bp->bp_vend[8] = 4; + index = 6; + bp->bp_vend[index++] = DHCPREQUEST; + bp->bp_vend[index++] = TAG_REQ_ADDR; + bp->bp_vend[index++] = 4; (void)memcpy(&bp->bp_vend[9], &rbuf.rbootp.bp_yiaddr, 4); - bp->bp_vend[13] = TAG_SERVERID; - bp->bp_vend[14] = 4; - (void)memcpy(&bp->bp_vend[15], &dhcp_serverip.s_addr, 4); - bp->bp_vend[19] = TAG_LEASETIME; - bp->bp_vend[20] = 4; + index += 4; + bp->bp_vend[index++] = TAG_SERVERID; + bp->bp_vend[index++] = 4; + (void)memcpy(&bp->bp_vend[index], &dhcp_serverip.s_addr, 4); + index += 4; + bp->bp_vend[index++] = TAG_LEASETIME; + bp->bp_vend[index++] = 4; leasetime = htonl(300); - (void)memcpy(&bp->bp_vend[21], &leasetime, 4); + (void)memcpy(&bp->bp_vend[index], &leasetime, 4); + index += 4; + /* Request the parameters we need. */ + bp->bp_vend[index++] = TAG_PARAM_REQ; + bp->bp_vend[index++] = 6; + bp->bp_vend[index++] = TAG_SUBNET_MASK; + bp->bp_vend[index++] = TAG_GATEWAY; + bp->bp_vend[index++] = TAG_HOSTNAME; + bp->bp_vend[index++] = TAG_DOMAINNAME; + bp->bp_vend[index++] = TAG_ROOTPATH; + bp->bp_vend[index++] = TAG_SWAPSERVER; /* * Insert a NetBSD Vendor Class Identifier option. */ sprintf(vci, "NetBSD:%s:libsa", MACHINE); vcilen = strlen(vci); - bp->bp_vend[25] = TAG_CLASSID; - bp->bp_vend[26] = vcilen; - (void)memcpy(&bp->bp_vend[27], vci, vcilen); - bp->bp_vend[27 + vcilen] = TAG_END; + bp->bp_vend[index++] = TAG_CLASSID; + bp->bp_vend[index++] = vcilen; + (void)memcpy(&bp->bp_vend[index], vci, vcilen); + index += vcilen; + bp->bp_vend[index] = TAG_END; expected_dhcpmsgtype = DHCPACK;