CVS commit: src/tests/fs/ffs
Module Name:src Committed By: jakllsch Date: Tue Nov 27 15:59:16 UTC 2012 Modified Files: src/tests/fs/ffs: t_mount.c Log Message: Rename fsbsize2big to fsbsizeovermaxphys to accurately match what it tests. Additionally, compute failing size dynamically by doubling MAXPHYS instead of assuming 128K will be too big enough. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/fs/ffs/t_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/ffs/t_mount.c diff -u src/tests/fs/ffs/t_mount.c:1.11 src/tests/fs/ffs/t_mount.c:1.12 --- src/tests/fs/ffs/t_mount.c:1.11 Sun Nov 7 17:51:17 2010 +++ src/tests/fs/ffs/t_mount.c Tue Nov 27 15:59:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mount.c,v 1.11 2010/11/07 17:51:17 jmmv Exp $ */ +/* $NetBSD: t_mount.c,v 1.12 2012/11/27 15:59:15 jakllsch Exp $ */ /* * Basic tests for mounting @@ -44,8 +44,8 @@ ATF_TC_BODY(48Kimage, tc) FSTEST_DESTRUCTOR(tc, ffs, tmp); } -ATF_TC(fsbsize2big); -ATF_TC_HEAD(fsbsize2big, tc) +ATF_TC(fsbsizeovermaxphys); +ATF_TC_HEAD(fsbsizeovermaxphys, tc) { atf_tc_set_md_var(tc, descr, mounts file system with @@ -53,11 +53,7 @@ ATF_TC_HEAD(fsbsize2big, tc) /* PR kern/43727 */ } -#define MYBLOCKSIZE 131072 -#if MAXPHYS = MYBLOCKSIZE -#error MAXPHYS too large for test to work -#endif -ATF_TC_BODY(fsbsize2big, tc) +ATF_TC_BODY(fsbsizeovermaxphys, tc) { char cmd[1024]; struct ufs_args args; @@ -68,7 +64,7 @@ ATF_TC_BODY(fsbsize2big, tc) * so do things the oldfashioned manual way. */ snprintf(cmd, sizeof(cmd), newfs -G -b %d -F -s 1 - ffs.img /dev/null, MYBLOCKSIZE); + ffs.img /dev/null, MAXPHYS * 2); if (system(cmd)) atf_tc_fail(cannot create file system); @@ -94,7 +90,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, 48Kimage); - ATF_TP_ADD_TC(tp, fsbsize2big); + ATF_TP_ADD_TC(tp, fsbsizeovermaxphys); return atf_no_error(); }
CVS commit: src/tests/fs/ffs
Module Name:src Committed By: jakllsch Date: Tue Nov 27 16:01:49 UTC 2012 Modified Files: src/tests/fs/ffs: t_mount.c Log Message: Add fsbsizeovermaxbsize test that tests mouting a FS with block size greater than MAXBSIZE. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/fs/ffs/t_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/ffs/t_mount.c diff -u src/tests/fs/ffs/t_mount.c:1.12 src/tests/fs/ffs/t_mount.c:1.13 --- src/tests/fs/ffs/t_mount.c:1.12 Tue Nov 27 15:59:15 2012 +++ src/tests/fs/ffs/t_mount.c Tue Nov 27 16:01:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mount.c,v 1.12 2012/11/27 15:59:15 jakllsch Exp $ */ +/* $NetBSD: t_mount.c,v 1.13 2012/11/27 16:01:49 jakllsch Exp $ */ /* * Basic tests for mounting @@ -86,11 +86,53 @@ ATF_TC_BODY(fsbsizeovermaxphys, tc) /* otherwise we're do-ne */ } +ATF_TC(fsbsizeovermaxbsize); +ATF_TC_HEAD(fsbsizeovermaxbsize, tc) +{ + + atf_tc_set_md_var(tc, descr, mounts file system with + blocksize MAXBSIZE); +} + +ATF_TC_BODY(fsbsizeovermaxbsize, tc) +{ + char cmd[1024]; + struct ufs_args args; + struct statvfs svb; + + /* + * We cannot pass newfs parameters via the fstest interface, + * so do things the oldfashioned manual way. + */ + snprintf(cmd, sizeof(cmd), newfs -G -b %d -F -s 1 + ffs.img /dev/null, MAXBSIZE * 2); + if (system(cmd)) + atf_tc_fail(cannot create file system); + + rump_init(); + if (rump_pub_etfs_register(/devdisk, ffs.img, RUMP_ETFS_BLK)) + atf_tc_fail(cannot register rump fake device); + + args.fspec = __UNCONST(/devdisk); + + if (rump_sys_mkdir(/mp, 0777) == -1) + atf_tc_fail_errno(create mountpoint); + + /* mount succeeded? bad omen. confirm we're in trouble. */ + if (rump_sys_mount(MOUNT_FFS, /mp, 0, args, sizeof(args)) != -1) { + rump_sys_statvfs1(/mp, svb, ST_WAIT); + atf_tc_fail(not expecting to be alive); + } + + /* otherwise we're do-ne */ +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, 48Kimage); ATF_TP_ADD_TC(tp, fsbsizeovermaxphys); + ATF_TP_ADD_TC(tp, fsbsizeovermaxbsize); return atf_no_error(); }
CVS commit: [netbsd-5] src/distrib/notes/common
Module Name:src Committed By: riz Date: Tue Nov 27 18:12:24 UTC 2012 Modified Files: src/distrib/notes/common [netbsd-5]: main Log Message: Update release notes for 5.2 To generate a diff of this commit: cvs rdiff -u -r1.425.2.15 -r1.425.2.16 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.425.2.15 src/distrib/notes/common/main:1.425.2.16 --- src/distrib/notes/common/main:1.425.2.15 Wed Dec 1 12:28:38 2010 +++ src/distrib/notes/common/main Tue Nov 27 18:12:23 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: main,v 1.425.2.15 2010/12/01 12:28:38 sborrill Exp $ +.\ $NetBSD: main,v 1.425.2.16 2012/11/27 18:12:23 riz Exp $ .\ .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -50,7 +50,7 @@ .as MACHINE_LIST sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus . .so \*[.CURDIR]/../common/macros . -.Dd April 24, 2010 +.Dd November 27, 2012 .Dt INSTALL 8 .Os NetBSD .Sh NAME @@ -451,1121 +451,330 @@ possible, it's likely that .Nx wouldn't exist. . -.Ss Dedication -.Pp -. -.Nx -5.1 is dedicated to the memory of Martti Kuparinen, who -was the victim of a traffic accident in June 2010. -.Pp -Martti's technical contributions are too many to list here in full. -He created and maintained numerous packages in pkgsrc, updated two -packet filter solutions distributed with -.Nx -and improved several -hardware drivers. Beyond that he was always helpful and friendly. His -example encouraged users to contribute to the project and share their -work with the community. Some of these users later became -.Nx -developers themselves thanks to Martti's efforts. -. .if \n[FOR_RELEASE] \{\ -.Ss Changes Between the NetBSD 5.0 and 5.1 Releases -.Pp -The -.Nx -\*V -release is the first feature update of the NetBSD 5.0 release branch. -It represents a selected subset of fixes deemed critical for security or -stability reasons, as well as new features and enhancements. -.Pp -Please note that all fixes in security/critical updates (i.e., NetBSD 5.0.1, -5.0.2, etc.) are cumulative, so the latest update contains all such fixes -since the corresponding minor release. -These fixes also appear in minor releases (i.e., NetBSD 5.1, 5.2, etc.). .Pp The complete list of changes can be found in the -CHANGES-5.1: -.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.1/CHANGES-5.1 -file in the top level directory of the NetBSD 5.1 release tree. -An abbreviated list is as follows: +CHANGES-5.2: +.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2/CHANGES-5.2 +file in the top level directory of the NetBSD 5.2 release tree. An abbreviated list is as follows: .Ss2 Security Advisory Fixes .(bullet -NetBSD-SA2009-004 (NetBSD OpenPAM -.Xr passwd 1 -changing weakness): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-004.txt.asc -.It -NetBSD-SA2009-005 (Plaintext Recovery Attack Against SSH): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-005.txt.asc -.It -NetBSD-SA2009-006 (Buffer overflows in ntp): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-006.txt.asc +NetBSD-SA2010-012: +.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2010-012.txt.asc , +OpenSSL TLS extension parsing race condition .It -NetBSD-SA2009-007 (Buffer overflows in -.Xr hack 6 ): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-007.txt.asc +NetBSD-SA2011-001: +.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2011-001.txt.asc , +BIND DoS due to improper handling of RRSIG records .It -NetBSD-SA2009-008 (OpenSSL ASN1 parsing denial of service and CMS signature -verification weakness): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-008.txt.asc +NetBSD-SA2011-002: +.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2011-002.txt.asc , +OpenSSL TLS extension parsing race condition .It -NetBSD-SA2009-009 (OpenSSL DTLS Memory Exhaustion and DSA signature -verification vulnerabilities): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-009.txt.asc +NetBSD-SA2011-003: +.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2011-003.txt.asc , +Exhausting kernel memory from user controlled value .It -NetBSD-SA2009-010 (ISC dhclient subnet-mask flag stack overflow): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-010.txt.asc +NetBSD-SA2011-004: +.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2011-004.txt.asc , +Kernel stack overflow via nested IPCOMP packet (CVE-2011-1547) .It -NetBSD-SA2009-011 (ISC DHCP server Denial of Service vulnerability): -.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-011.txt.asc +NetBSD-SA2011-005: +.Lk
CVS commit: [netbsd-5] src/usr.bin/tput
Module Name:src Committed By: riz Date: Tue Nov 27 18:17:08 UTC 2012 Modified Files: src/usr.bin/tput [netbsd-5]: tput.c Log Message: usr.bin/tput/tput.c patch Fix tput support for setaf terminfo sequence. PR#39883. [jnemeth, ticket #1822] To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.4.1 src/usr.bin/tput/tput.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tput/tput.c diff -u src/usr.bin/tput/tput.c:1.19 src/usr.bin/tput/tput.c:1.19.4.1 --- src/usr.bin/tput/tput.c:1.19 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/tput/tput.c Tue Nov 27 18:17:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tput.c,v 1.19 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: tput.c,v 1.19.4.1 2012/11/27 18:17:08 riz Exp $ */ /*- * Copyright (c) 1980, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)tput.c 8.3 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: tput.c,v 1.19 2008/07/21 14:19:27 lukem Exp $); +__RCSID($NetBSD: tput.c,v 1.19.4.1 2012/11/27 18:17:08 riz Exp $); #endif /* not lint */ #include termios.h @@ -105,7 +105,10 @@ main(int argc, char **argv) break; } cptr = buf; - if (tgetstr(p, cptr)) + if (strlen(p) 2) + errx(2, this program only supports termcap + capabilities, not terminfo); + else if (tgetstr(p, cptr)) argv = process(p, buf, argv); else if ((n = tgetnum(p)) != -1) (void)printf(%d\n, n);
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: riz Date: Tue Nov 27 18:17:26 UTC 2012 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Ticket 1822 To generate a diff of this commit: cvs rdiff -u -r1.1.2.201 -r1.1.2.202 src/doc/CHANGES-5.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.2 diff -u src/doc/CHANGES-5.2:1.1.2.201 src/doc/CHANGES-5.2:1.1.2.202 --- src/doc/CHANGES-5.2:1.1.2.201 Mon Nov 26 20:00:35 2012 +++ src/doc/CHANGES-5.2 Tue Nov 27 18:17:26 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.201 2012/11/26 20:00:35 riz Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.202 2012/11/27 18:17:26 riz Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -8817,3 +8817,8 @@ xsrc/external/mit/expat/dist/xmlwf/readf Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876. [spz, ticket #1821] +usr.bin/tput/tput.cpatch + + Fix tput support for setaf terminfo sequence. PR#39883. + [jnemeth, ticket #1822] +
CVS commit: [netbsd-5] src
Module Name:src Committed By: riz Date: Tue Nov 27 18:52:28 UTC 2012 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 LAST_MINUTE README.files src/gnu/usr.bin/groff/tmac [netbsd-5]: mdoc.local src/sys/sys [netbsd-5]: param.h Log Message: Welcome to 5.2! To generate a diff of this commit: cvs rdiff -u -r1.1.2.202 -r1.1.2.203 src/doc/CHANGES-5.2 cvs rdiff -u -r1.2.30.2 -r1.2.30.3 src/doc/LAST_MINUTE cvs rdiff -u -r1.4.10.3 -r1.4.10.4 src/doc/README.files cvs rdiff -u -r1.43.4.17 -r1.43.4.18 src/gnu/usr.bin/groff/tmac/mdoc.local cvs rdiff -u -r1.330.4.17 -r1.330.4.18 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.202 src/doc/CHANGES-5.2:1.1.2.203 --- src/doc/CHANGES-5.2:1.1.2.202 Tue Nov 27 18:17:26 2012 +++ src/doc/CHANGES-5.2 Tue Nov 27 18:52:28 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.202 2012/11/27 18:17:26 riz Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.203 2012/11/27 18:52:28 riz Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -8822,3 +8822,11 @@ usr.bin/tput/tput.cpatch Fix tput support for setaf terminfo sequence. PR#39883. [jnemeth, ticket #1822] +doc/LAST_MINUTE patch +doc/README.filespatch +gnu/usr.bin/groff/tmac/mdoc.local patch +sys/sys/param.h patch + + Welcome to 5.2! + [riz] + Index: src/doc/LAST_MINUTE diff -u src/doc/LAST_MINUTE:1.2.30.2 src/doc/LAST_MINUTE:1.2.30.3 --- src/doc/LAST_MINUTE:1.2.30.2 Sat Nov 6 18:10:17 2010 +++ src/doc/LAST_MINUTE Tue Nov 27 18:52:28 2012 @@ -1,6 +1,6 @@ -# $NetBSD: LAST_MINUTE,v 1.2.30.2 2010/11/06 18:10:17 snj Exp $ +# $NetBSD: LAST_MINUTE,v 1.2.30.3 2012/11/27 18:52:28 riz Exp $ -This file contains important information on the NetBSD 5.1 release that +This file contains important information on the NetBSD 5.2 release that did not make it into the main documentation. [all] Index: src/doc/README.files diff -u src/doc/README.files:1.4.10.3 src/doc/README.files:1.4.10.4 --- src/doc/README.files:1.4.10.3 Sat Nov 6 18:10:17 2010 +++ src/doc/README.files Tue Nov 27 18:52:28 2012 @@ -1,4 +1,4 @@ -# $NetBSD: README.files,v 1.4.10.3 2010/11/06 18:10:17 snj Exp $ +# $NetBSD: README.files,v 1.4.10.4 2012/11/27 18:52:28 riz Exp $ What's in this directory: @@ -8,6 +8,8 @@ CHANGES-5.0 Changes between the initial CHANGES-5.1 Changes between the 5.0 and 5.1 releases. +CHANGES-5.2 Changes between the 5.1 and 5.2 releases. + CHANGES.prev Changes in previous NetBSD releases. LAST_MINUTE Last minute changes and notes about the release. Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.17 src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.18 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.17 Tue Nov 6 20:41:32 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Tue Nov 27 18:52:27 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.43.4.17 2012/11/06 20:41:32 riz Exp $ +.\ $NetBSD: mdoc.local,v 1.43.4.18 2012/11/27 18:52:27 riz Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\ Default .Os value -.ds doc-operating-system NetBSD\~5.2_RC1 +.ds doc-operating-system NetBSD\~5.2 .\ Default footer operating system value -.ds doc-default-operating-system NetBSD\~5.2_RC1 +.ds doc-default-operating-system NetBSD\~5.2 .\ Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.330.4.17 src/sys/sys/param.h:1.330.4.18 --- src/sys/sys/param.h:1.330.4.17 Tue Nov 6 20:41:32 2012 +++ src/sys/sys/param.h Tue Nov 27 18:52:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.330.4.17 2012/11/06 20:41:32 riz Exp $ */ +/* $NetBSD: param.h,v 1.330.4.18 2012/11/27 18:52:28 riz Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 50200 /* NetBSD 5.2_RC1 */ +#define __NetBSD_Version__ 50200 /* NetBSD 5.2 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) = __NetBSD_Version__)
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Tue Nov 27 19:24:47 UTC 2012 Modified Files: src/sys/arch/powerpc/booke: e500_mpsubr.S e500_tlb.c genassym.cf src/sys/arch/powerpc/include: cpu.h src/sys/arch/powerpc/include/booke: e500var.h Log Message: Make the 85xx get closer to spinning up the secondary CPUs. Don't assume TLB1[0] has the mapping for VA/PA 0. Make sure the TLB1 entries that map physical memory have the M (memory coherent) bit set. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/e500_mpsubr.S cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/e500_tlb.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/genassym.cf cvs rdiff -u -r1.94 -r1.95 src/sys/arch/powerpc/include/cpu.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/booke/e500var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/e500_mpsubr.S diff -u src/sys/arch/powerpc/booke/e500_mpsubr.S:1.2 src/sys/arch/powerpc/booke/e500_mpsubr.S:1.3 --- src/sys/arch/powerpc/booke/e500_mpsubr.S:1.2 Wed Jun 29 06:06:04 2011 +++ src/sys/arch/powerpc/booke/e500_mpsubr.S Tue Nov 27 19:24:46 2012 @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ /* * r3 = fdt pointer (ignored) @@ -11,8 +39,6 @@ .p2align 5 ENTRY_NOPROFILE(e500_spinup_trampoline) - stw %r7, 4(%r0) /* r7 to 4 */ - lis %r31, 0xdeadbeef@h ori %r31, %r31, 0xdeadbeef@l mr %r30, %r31 @@ -49,16 +75,38 @@ ENTRY_NOPROFILE(e500_spinup_trampoline) */ lis %r20, _C_LABEL(cpu_hatch_data)@h ori %r20, %r20, _C_LABEL(cpu_hatch_data)@l + sync + + /* + * Ensure that the TLB entry we are using is memory coherent. + */ + lis %r0, (MASX_TLBSEL_MAKE(1)|MAS0_ESEL_MAKE(0))@h + mtspr SPR_MAS0, %r0 /* setup MAS0 */ + lis %r3, (MAS1_V|MAS1_IPROT)@h /* V | IPROT */ + ori %r3, %r3, MASX_TSIZE_64MB /* and 64MB */ + mtspr SPR_MAS1, %r3 /* save MAS1 */ + li %r3, MAS2_M /* set M bit */ + mtspr SPR_MAS2, %r3 /* save MAS2 */ + li %r3, MAS3_SX|MAS3_SR|MAS3_SW /* set kernel RWX */ + mtspr SPR_MAS3, %r3 /* save MAS3 */ + tlbwe /* update entry */ + isync /* flush i-stream */ + sync /* sync memory. */ li %r0, 0 stw %r0, HATCH_RUNNING(%r20) /* progress */ - eieio + sync +#if 0 + dcbf 0, %r20 +#endif lwz %r1, HATCH_SP(%r20) /* get hatch SP */ lwz %r21, HATCH_CI(%r20) /* get cpu_info */ mtsprg0 %r21/* save cpu_info */ lwz %r13, CI_CURLWP(%r21) /* load r13 with curlwp */ mtsprg2 %r13/* save it in sprg2 */ + addi%r0,%r21,CI_SAVELIFO /* get SAVE area start */ + mtsprg3 %r0/* save it in sprg3 */ /* * Now to synchronize timebase values. First to make sure HID0 is @@ -102,6 +150,7 @@ ENTRY_NOPROFILE(e500_spinup_trampoline) li %r0, 2 stw %r0, HATCH_RUNNING(%r20) /* progress */ + sync /* * We have to setup the IVOR SPRs since the ones u-boot setup @@ -146,15 +195,11 @@ ENTRY_NOPROFILE(e500_spinup_trampoline) stw %r0, HATCH_RUNNING(%r20) /* progress */ /* - * Let's find out what TLB1[0] entry we are supposed to use. + * Let's find out what TLB1 entry we are supposed to use. */ - li %r3, 0 + lwz %r3, HATCH_TLBIDX(%r20) bl _C_LABEL(e500_tlb1_fetch) - lwz %r28, 0(%r3) /* load the saved TLB1 entry */ - mtspr SPR_MAS0, %r28 /* place into SPRs */ - mtspr SPR_MAS1, %r29 - mtspr SPR_MAS2, %r30 - mtspr SPR_MAS3, %r31 + lmw %r28, 0(%r3)
CVS commit: src
Module Name:src Committed By: jkunz Date: Tue Nov 27 20:00:39 UTC 2012 Modified Files: src/external/bsd/elftosb/lib: Makefile src/external/bsd/elftosb/usr.sbin/elftosb: Makefile src/external/bsd/elftosb/usr.sbin/sbkeygen: Makefile src/external/bsd/elftosb/usr.sbin/sbtool: Makefile src/sys/arch/evbarm/stand: Makefile src/tools: Makefile Log Message: According to the i.MX23 Reference Manual section 3.1, Page 3-3: The i.MX23 always operates in litle-endian mode. So build elftosb and bootloader for this processor only for evbarm(-el). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftosb/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftosb/usr.sbin/elftosb/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftosb/usr.sbin/sbtool/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/stand/Makefile cvs rdiff -u -r1.160 -r1.161 src/tools/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/bsd/elftosb/lib/Makefile diff -u src/external/bsd/elftosb/lib/Makefile:1.3 src/external/bsd/elftosb/lib/Makefile:1.4 --- src/external/bsd/elftosb/lib/Makefile:1.3 Fri Nov 16 05:39:25 2012 +++ src/external/bsd/elftosb/lib/Makefile Tue Nov 27 20:00:38 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2012/11/16 05:39:25 christos Exp $ +# $NetBSD: Makefile,v 1.4 2012/11/27 20:00:38 jkunz Exp $ -.if (${MACHINE} == evbarm) +.if (${MACHINE} == evbarm) (${MACHINE_ARCH} == arm) LIBISPRIVATE= yes LIB= elftosb SRCS= AESKey.cpp \ Index: src/external/bsd/elftosb/usr.sbin/elftosb/Makefile diff -u src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.1 src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.2 --- src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.1 Thu Nov 15 19:49:16 2012 +++ src/external/bsd/elftosb/usr.sbin/elftosb/Makefile Tue Nov 27 20:00:38 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/11/15 19:49:16 jkunz Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/27 20:00:38 jkunz Exp $ .include bsd.init.mk .PATH: ${DIST}/elftosb2 -.if (${MACHINE} == evbarm) +.if (${MACHINE} == evbarm) (${MACHINE_ARCH} == arm) PROG_CXX= elftosb SRCS= BootImageGenerator.cpp \ ConversionController.cpp \ Index: src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile diff -u src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile:1.1 src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile:1.2 --- src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile:1.1 Thu Nov 15 19:49:16 2012 +++ src/external/bsd/elftosb/usr.sbin/sbkeygen/Makefile Tue Nov 27 20:00:39 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/11/15 19:49:16 jkunz Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/27 20:00:39 jkunz Exp $ .include bsd.init.mk .PATH: ${DIST}/keygen -.if (${MACHINE} == evbarm) +.if (${MACHINE} == evbarm) (${MACHINE_ARCH} == arm) PROG_CXX= sbkeygen SRCS= keygen.cpp .endif Index: src/external/bsd/elftosb/usr.sbin/sbtool/Makefile diff -u src/external/bsd/elftosb/usr.sbin/sbtool/Makefile:1.1 src/external/bsd/elftosb/usr.sbin/sbtool/Makefile:1.2 --- src/external/bsd/elftosb/usr.sbin/sbtool/Makefile:1.1 Thu Nov 15 19:49:17 2012 +++ src/external/bsd/elftosb/usr.sbin/sbtool/Makefile Tue Nov 27 20:00:39 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/11/15 19:49:17 jkunz Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/27 20:00:39 jkunz Exp $ .include bsd.init.mk .PATH: ${DIST}/sbtool -.if (${MACHINE} == evbarm) +.if (${MACHINE} == evbarm) (${MACHINE_ARCH} == arm) PROG_CXX= sbtool SRCS= EncoreBootImageReader.cpp sbtool.cpp .endif Index: src/sys/arch/evbarm/stand/Makefile diff -u src/sys/arch/evbarm/stand/Makefile:1.3 src/sys/arch/evbarm/stand/Makefile:1.4 --- src/sys/arch/evbarm/stand/Makefile:1.3 Tue Nov 20 19:17:03 2012 +++ src/sys/arch/evbarm/stand/Makefile Tue Nov 27 20:00:39 2012 @@ -1,7 +1,11 @@ -# $NetBSD: Makefile,v 1.3 2012/11/20 19:17:03 jkunz Exp $ +# $NetBSD: Makefile,v 1.4 2012/11/27 20:00:39 jkunz Exp $ SUBDIR+= gzboot SUBDIR+= boot2440 +.if ${MACHINE_ARCH} == arm +# According to the i.MX23 Reference Manual section 3.1, Page 3-3: +# The i.MX23 always operates in litle-endian mode. SUBDIR+= bootimx23 +.endif .include bsd.subdir.mk Index: src/tools/Makefile diff -u src/tools/Makefile:1.160 src/tools/Makefile:1.161 --- src/tools/Makefile:1.160 Mon Nov 26 16:57:25 2012 +++ src/tools/Makefile Tue Nov 27 20:00:39 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.160 2012/11/26 16:57:25 pooka Exp $ +# $NetBSD: Makefile,v 1.161 2012/11/27 20:00:39 jkunz Exp $ .include bsd.own.mk @@ -154,7 +154,7 @@ SUBDIR+= amiga-txlt SUBDIR+= hp300-mkboot .endif -.if ${MACHINE} == evbarm +.if ${MACHINE} == evbarm ${MACHINE_ARCH} == arm SUBDIR+= elftosb .endif
CVS commit: src/share/man/man4
Module Name:src Committed By: jkunz Date: Tue Nov 27 20:06:37 UTC 2012 Modified Files: src/share/man/man4: ugen.4 Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/ugen.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/ugen.4 diff -u src/share/man/man4/ugen.4:1.30 src/share/man/man4/ugen.4:1.31 --- src/share/man/man4/ugen.4:1.30 Wed Dec 23 09:10:07 2009 +++ src/share/man/man4/ugen.4 Tue Nov 27 20:06:36 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: ugen.4,v 1.30 2009/12/23 09:10:07 wiz Exp $ +.\ $NetBSD: ugen.4,v 1.31 2012/11/27 20:06:36 jkunz Exp $ .\ .\ Copyright (c) 1999 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -189,7 +189,7 @@ This operation can only be performed whe are open. .It Dv USB_GET_NO_ALT (struct usb_alt_interface) Return the number of different alternate settings in the -.Dv aui_alt_no +.Dv uai_alt_no field. .It Dv USB_GET_DEVICE_DESC (usb_device_descriptor_t) Return the device descriptor.
CVS commit: src/sys/uvm
Module Name:src Committed By: jakllsch Date: Tue Nov 27 20:15:55 UTC 2012 Modified Files: src/sys/uvm: uvm_swap.c Log Message: Until such time as the swap subsystem can be converted to use The One True Allocator, prevent panics if (MAXPHYS/PAGE_SIZE) BLIST_MAX_ALLOC. From Wolfgang Stukenbrock in PR#41765. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/uvm/uvm_swap.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/uvm/uvm_swap.c diff -u src/sys/uvm/uvm_swap.c:1.161 src/sys/uvm/uvm_swap.c:1.162 --- src/sys/uvm/uvm_swap.c:1.161 Sun Feb 5 16:08:28 2012 +++ src/sys/uvm/uvm_swap.c Tue Nov 27 20:15:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.161 2012/02/05 16:08:28 rmind Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.162 2012/11/27 20:15:55 jakllsch Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_swap.c,v 1.161 2012/02/05 16:08:28 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_swap.c,v 1.162 2012/11/27 20:15:55 jakllsch Exp $); #include opt_uvmhist.h #include opt_compat_netbsd.h @@ -1535,6 +1535,19 @@ uvm_swap_alloc(int *nslots /* IN/OUT */, return 0; /* + * XXXJAK: BEGIN HACK + * + * blist_alloc() in subr_blist.c will panic if we try to allocate + * too many slots. + */ + if (*nslots BLIST_MAX_ALLOC) { + if (__predict_false(lessok == false)) + return 0; + *nslots = BLIST_MAX_ALLOC; + } + /* XXXJAK: END HACK */ + + /* * lock data lock, convert slots into blocks, and enter loop */ mutex_enter(uvm_swap_data_lock);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jakllsch Date: Tue Nov 27 20:32:59 UTC 2012 Modified Files: src/sys/arch/x86/x86: mpbios.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/x86/x86/mpbios.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/mpbios.c diff -u src/sys/arch/x86/x86/mpbios.c:1.59 src/sys/arch/x86/x86/mpbios.c:1.60 --- src/sys/arch/x86/x86/mpbios.c:1.59 Wed Oct 17 21:35:38 2012 +++ src/sys/arch/x86/x86/mpbios.c Tue Nov 27 20:32:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mpbios.c,v 1.59 2012/10/17 21:35:38 dyoung Exp $ */ +/* $NetBSD: mpbios.c,v 1.60 2012/11/27 20:32:58 jakllsch Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpbios.c,v 1.59 2012/10/17 21:35:38 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mpbios.c,v 1.60 2012/11/27 20:32:58 jakllsch Exp $); #include acpica.h #include lapic.h @@ -1025,7 +1025,7 @@ mpbios_ioapic(const uint8_t *ent, device aaa.apic_version = entry-apic_version; aaa.apic_address = (paddr_t)entry-apic_address; aaa.apic_vecbase = -1; - aaa.flags = (mp_fps-mpfb2 0x80) ? IOAPIC_PICMODE : IOAPIC_VWIRE; + aaa.flags = (mp_fps-mpfb2 0x80) ? IOAPIC_PICMODE : IOAPIC_VWIRE; locs[IOAPICBUSCF_APID] = aaa.apic_id; config_found_sm_loc(self, ioapicbus, locs, aaa, mp_ioapicprint,
CVS commit: [matt-nb6-plus] src/gnu/dist/gcc4/libcpp
Module Name:src Committed By: matt Date: Tue Nov 27 22:18:50 UTC 2012 Modified Files: src/gnu/dist/gcc4/libcpp [matt-nb6-plus]: init.c macro.c src/gnu/dist/gcc4/libcpp/include [matt-nb6-plus]: cpplib.h Log Message: Pull from HEAD: Teach gcc4.1's cpp about the magic __COUNTER__ macro, which returns a unique integer each time it is expanded. This code was written without reference to any other implementation of the same feature. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.46.1 src/gnu/dist/gcc4/libcpp/init.c cvs rdiff -u -r1.3 -r1.3.10.1 src/gnu/dist/gcc4/libcpp/macro.c cvs rdiff -u -r1.2 -r1.2.10.1 src/gnu/dist/gcc4/libcpp/include/cpplib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/libcpp/init.c diff -u src/gnu/dist/gcc4/libcpp/init.c:1.2 src/gnu/dist/gcc4/libcpp/init.c:1.2.46.1 --- src/gnu/dist/gcc4/libcpp/init.c:1.2 Fri May 12 00:24:43 2006 +++ src/gnu/dist/gcc4/libcpp/init.c Tue Nov 27 22:18:49 2012 @@ -309,6 +309,7 @@ static const struct builtin builtin_arra B(__BASE_FILE__, BT_BASE_FILE), B(__LINE__, BT_SPECLINE), B(__INCLUDE_LEVEL__, BT_INCLUDE_LEVEL), + B(__COUNTER__, BT_COUNTER), /* Keep builtins not used for -traditional-cpp at the end, and update init_builtins() if any more are added. */ B(_Pragma, BT_PRAGMA), Index: src/gnu/dist/gcc4/libcpp/macro.c diff -u src/gnu/dist/gcc4/libcpp/macro.c:1.3 src/gnu/dist/gcc4/libcpp/macro.c:1.3.10.1 --- src/gnu/dist/gcc4/libcpp/macro.c:1.3 Wed Nov 11 19:03:52 2009 +++ src/gnu/dist/gcc4/libcpp/macro.c Tue Nov 27 22:18:49 2012 @@ -284,6 +284,14 @@ _cpp_builtin_macro_text (cpp_reader *pfi else result = pfile-time; break; + +case BT_COUNTER: + { + static unsigned int counter = 0; + + number = counter++; + } + break; } if (result == NULL) Index: src/gnu/dist/gcc4/libcpp/include/cpplib.h diff -u src/gnu/dist/gcc4/libcpp/include/cpplib.h:1.2 src/gnu/dist/gcc4/libcpp/include/cpplib.h:1.2.10.1 --- src/gnu/dist/gcc4/libcpp/include/cpplib.h:1.2 Wed Nov 11 19:03:52 2009 +++ src/gnu/dist/gcc4/libcpp/include/cpplib.h Tue Nov 27 22:18:49 2012 @@ -551,6 +551,7 @@ enum builtin_type BT_BASE_FILE, /* `__BASE_FILE__' */ BT_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */ BT_TIME, /* `__TIME__' */ + BT_COUNTER, /* `__COUNTER__' */ BT_STDC, /* `__STDC__' */ BT_PRAGMA /* `_Pragma' operator */ };
CVS commit: [matt-nb6-plus] src/common/lib/libc/arch/arm/atomic
Module Name:src Committed By: matt Date: Tue Nov 27 23:42:35 UTC 2012 Modified Files: src/common/lib/libc/arch/arm/atomic [matt-nb6-plus]: Makefile.inc atomic_add_32.S atomic_and_32.S atomic_cas_32.S atomic_cas_8.S atomic_dec_32.S atomic_inc_32.S atomic_op_asm.h atomic_or_32.S atomic_swap.S membar_ops.S Added Files: src/common/lib/libc/arch/arm/atomic [matt-nb6-plus]: atomic_add_64.S atomic_and_64.S atomic_cas_64.S atomic_dec_64.S atomic_inc_64.S atomic_or_64.S atomic_swap_64.S Log Message: Pull atomic ops from HEAD. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.12.1 \ src/common/lib/libc/arch/arm/atomic/Makefile.inc cvs rdiff -u -r1.2 -r1.2.24.1 \ src/common/lib/libc/arch/arm/atomic/atomic_add_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_and_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_dec_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h \ src/common/lib/libc/arch/arm/atomic/atomic_or_32.S \ src/common/lib/libc/arch/arm/atomic/atomic_swap.S \ src/common/lib/libc/arch/arm/atomic/membar_ops.S cvs rdiff -u -r0 -r1.3.4.2 \ src/common/lib/libc/arch/arm/atomic/atomic_add_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S cvs rdiff -u -r0 -r1.2.4.2 \ src/common/lib/libc/arch/arm/atomic/atomic_and_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_dec_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_or_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S cvs rdiff -u -r1.1 -r1.1.12.1 \ src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/atomic/Makefile.inc diff -u src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.8 src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.8.12.1 --- src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.8 Sun Jan 4 17:54:29 2009 +++ src/common/lib/libc/arch/arm/atomic/Makefile.inc Tue Nov 27 23:42:34 2012 @@ -1,19 +1,43 @@ -# $NetBSD: Makefile.inc,v 1.8 2009/01/04 17:54:29 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.8.12.1 2012/11/27 23:42:34 matt Exp $ + +ARMV6= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*} +ARMV6+= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*} +ARMV6+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*} +ARMV6+= ${CFLAGS:M-march=armv6*:} ${CFLAGS:M-mcpu=arm11*} +ARMV6+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*} +ARMV6+= ${CPPFLAGS:M-march=armv6*:} ${CPPFLAGS:M-mcpu=arm11*} .if defined(LIB) (${LIB} == kern || ${LIB} == c || ${LIB} == pthread \ || ${LIB} == rump) -SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \ - atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \ - atomic_inc_32_cas.c atomic_inc_32_nv_cas.c atomic_or_32_cas.c \ - atomic_or_32_nv_cas.c atomic_swap_32_cas.c membar_ops_nop.c +.if empty(ARMV6) +SRCS.atomic+= atomic_add_32_cas.c atomic_add_32_nv_cas.c \ + atomic_and_32_cas.c atomic_and_32_nv_cas.c \ + atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \ + atomic_inc_32_cas.c atomic_inc_32_nv_cas.c \ + atomic_or_32_cas.c atomic_or_32_nv_cas.c \ + atomic_swap_32_cas.c membar_ops_nop.c +.else +SRCS.atomic+= atomic_add_32.S atomic_and_32.S atomic_cas_32.S +SRCS.atomic+= atomic_dec_32.S atomic_inc_32.S atomic_or_32.S +SRCS.atomic+= atomic_swap.S membar_ops.S +SRCS.atomic+= atomic_add_64.S atomic_and_64.S atomic_cas_64.S +SRCS.atomic+= atomic_dec_64.S atomic_inc_64.S atomic_or_64.S +SRCS.atomic+= atomic_swap_64.S +.endif .endif .if defined(LIB) (${LIB} == c || ${LIB} == pthread) -SRCS+= atomic_init_testset.c -SRCS+= atomic_cas_up.S +.if empty(ARMV6) +SRCS.atomic+= atomic_init_testset.c +SRCS.atomic+= atomic_cas_up.S CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP +.else +SRCS.atomic+= atomic_init_cas.c +.endif .endif + +SRCS+= ${SRCS.atomic} Index: src/common/lib/libc/arch/arm/atomic/atomic_add_32.S diff -u src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.2.24.1 --- src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.2 Sat Aug 16 07:12:39 2008 +++ src/common/lib/libc/arch/arm/atomic/atomic_add_32.S Tue Nov 27 23:42:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_add_32.S,v 1.2 2008/08/16 07:12:39 matt Exp $ */ +/* $NetBSD: atomic_add_32.S,v 1.2.24.1 2012/11/27 23:42:34 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -40,6 +40,11 @@ ENTRY_NP(_atomic_add_32) strex ip, r2, [r3] /* try to store */ cmp ip, #0 /* succeed? */ bne 1b /* no, try again */ +#ifdef _ARM_ARCH_7 + dmb +#else + mcr p15, 0, ip, c7, c10, 5 /* data memory barrier */ +#endif RET/* return
CVS commit: src/common/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Tue Nov 27 23:57:07 UTC 2012 Modified Files: src/common/lib/libc/arch/arm/gen: byte_swap_2.S byte_swap_4.S Log Message: Use the armv6 rev/rev16 if armv6 or later To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/gen/byte_swap_2.S \ src/common/lib/libc/arch/arm/gen/byte_swap_4.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/gen/byte_swap_2.S diff -u src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.4 src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.5 --- src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.4 Mon Apr 28 20:22:52 2008 +++ src/common/lib/libc/arch/arm/gen/byte_swap_2.S Tue Nov 27 23:57:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap_2.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */ +/* $NetBSD: byte_swap_2.S,v 1.5 2012/11/27 23:57:07 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,11 @@ _ENTRY(_C_LABEL(ntohs)) _ENTRY(_C_LABEL(htons)) #endif _PROF_PROLOGUE +#ifdef _ARM_ARCH_6 + rev16 r0, r0 +#else and r1, r0, #0xff mov r0, r0, lsr #8 orr r0, r0, r1, lsl #8 +#endif RET Index: src/common/lib/libc/arch/arm/gen/byte_swap_4.S diff -u src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.4 src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.5 --- src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.4 Mon Apr 28 20:22:52 2008 +++ src/common/lib/libc/arch/arm/gen/byte_swap_4.S Tue Nov 27 23:57:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap_4.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */ +/* $NetBSD: byte_swap_4.S,v 1.5 2012/11/27 23:57:07 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -41,8 +41,12 @@ _ENTRY(_C_LABEL(ntohl)) _ENTRY(_C_LABEL(htonl)) #endif _PROF_PROLOGUE +#ifdef _ARM_ARCH_6 + rev r0, r0 +#else eor r1, r0, r0, ror #16 bic r1, r1, #0x00FF mov r0, r0, ror #8 eor r0, r0, r1, lsr #8 +#endif RET
CVS commit: src/common/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Nov 28 01:35:06 UTC 2012 Modified Files: src/common/lib/libc/arch/arm/gen: modsi3.S umodsi3.S Log Message: Optimize. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/gen/modsi3.S \ src/common/lib/libc/arch/arm/gen/umodsi3.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/gen/modsi3.S diff -u src/common/lib/libc/arch/arm/gen/modsi3.S:1.1 src/common/lib/libc/arch/arm/gen/modsi3.S:1.2 --- src/common/lib/libc/arch/arm/gen/modsi3.S:1.1 Wed Oct 10 02:16:54 2012 +++ src/common/lib/libc/arch/arm/gen/modsi3.S Wed Nov 28 01:35:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: modsi3.S,v 1.1 2012/10/10 02:16:54 christos Exp $ */ +/* $NetBSD: modsi3.S,v 1.2 2012/11/28 01:35:05 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -22,10 +22,9 @@ */ ENTRY(__modsi3) - stmfd sp!, {lr} - sub sp, sp, #4 /* align stack */ + str lr, [sp, #-8]! /* push lr */ bl PIC_SYM(__divsi3, PLT) - add sp, sp, #4 /* unalign stack */ mov r0, r1 - ldmfd sp!, {pc} - + ldr lr, [sp], #8 /* pop lr */ + RET +END(__modsi3) Index: src/common/lib/libc/arch/arm/gen/umodsi3.S diff -u src/common/lib/libc/arch/arm/gen/umodsi3.S:1.1 src/common/lib/libc/arch/arm/gen/umodsi3.S:1.2 --- src/common/lib/libc/arch/arm/gen/umodsi3.S:1.1 Wed Oct 10 02:16:54 2012 +++ src/common/lib/libc/arch/arm/gen/umodsi3.S Wed Nov 28 01:35:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: umodsi3.S,v 1.1 2012/10/10 02:16:54 christos Exp $ */ +/* $NetBSD: umodsi3.S,v 1.2 2012/11/28 01:35:05 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -22,9 +22,8 @@ */ ENTRY(__umodsi3) - stmfd sp!, {lr} - sub sp, sp, #4 /* align stack */ + str lr, [sp, #-8]! /* push lr */ bl PIC_SYM(__udivsi3, PLT) - add sp, sp, #4 /* unalign stack */ mov r0, r1 - ldmfd sp!, {pc} + ldr lr, [sp], #8 /* pop lr */ + RET
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: matt Date: Wed Nov 28 01:40:19 UTC 2012 Modified Files: src/distrib/sets/lists/comp: md.evbarm Log Message: Add missing debug files. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/comp/md.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.evbarm diff -u src/distrib/sets/lists/comp/md.evbarm:1.15 src/distrib/sets/lists/comp/md.evbarm:1.16 --- src/distrib/sets/lists/comp/md.evbarm:1.15 Mon Jul 18 17:18:14 2011 +++ src/distrib/sets/lists/comp/md.evbarm Wed Nov 28 01:40:19 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.evbarm,v 1.15 2011/07/18 17:18:14 dyoung Exp $ +# $NetBSD: md.evbarm,v 1.16 2012/11/28 01:40:19 matt Exp $ ./usr/include/evbarmcomp-c-include ./usr/include/evbarm/ansi.h comp-c-include ./usr/include/evbarm/aout_machdep.h comp-c-include @@ -48,3 +48,6 @@ ./usr/include/evbarm/varargs.h comp-obsolete obsolete ./usr/include/evbarm/vmparam.h comp-c-include ./usr/include/evbarm/wchar_limits.h comp-c-include +./usr/libdata/debug/usr/sbin/elftosb.debug comp-util-debug debug +./usr/libdata/debug/usr/sbin/sbkeygen.debug comp-util-debug debug +./usr/libdata/debug/usr/sbin/sbtool.debug comp-util-debug debug
CVS commit: [matt-nb6-plus] src/common/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Nov 28 01:45:27 UTC 2012 Modified Files: src/common/lib/libc/arch/arm/gen [matt-nb6-plus]: byte_swap_2.S byte_swap_4.S Log Message: Use rev/rev16 on armv6 and later. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.24.1 src/common/lib/libc/arch/arm/gen/byte_swap_2.S \ src/common/lib/libc/arch/arm/gen/byte_swap_4.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/gen/byte_swap_2.S diff -u src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.4 src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.4.24.1 --- src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.4 Mon Apr 28 20:22:52 2008 +++ src/common/lib/libc/arch/arm/gen/byte_swap_2.S Wed Nov 28 01:45:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap_2.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */ +/* $NetBSD: byte_swap_2.S,v 1.4.24.1 2012/11/28 01:45:26 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,11 @@ _ENTRY(_C_LABEL(ntohs)) _ENTRY(_C_LABEL(htons)) #endif _PROF_PROLOGUE +#ifdef _ARM_ARCH_6 + rev16 r0, r0 +#else and r1, r0, #0xff mov r0, r0, lsr #8 orr r0, r0, r1, lsl #8 +#endif RET Index: src/common/lib/libc/arch/arm/gen/byte_swap_4.S diff -u src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.4 src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.4.24.1 --- src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.4 Mon Apr 28 20:22:52 2008 +++ src/common/lib/libc/arch/arm/gen/byte_swap_4.S Wed Nov 28 01:45:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap_4.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */ +/* $NetBSD: byte_swap_4.S,v 1.4.24.1 2012/11/28 01:45:26 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -41,8 +41,12 @@ _ENTRY(_C_LABEL(ntohl)) _ENTRY(_C_LABEL(htonl)) #endif _PROF_PROLOGUE +#ifdef _ARM_ARCH_6 + rev r0, r0 +#else eor r1, r0, r0, ror #16 bic r1, r1, #0x00FF mov r0, r0, ror #8 eor r0, r0, r1, lsr #8 +#endif RET
CVS commit: [matt-nb6-plus] src
Module Name:src Committed By: matt Date: Wed Nov 28 01:53:43 UTC 2012 Modified Files: src/common/lib/libc/arch/arm/gen [matt-nb6-plus]: divsi3.S src/lib/libc/arch/arm/gen [matt-nb6-plus]: Makefile.inc Added Files: src/common/lib/libc/arch/arm/gen [matt-nb6-plus]: divide.S modsi3.S udivsi3.S umodsi3.S Log Message: Merge from HEAD. split udivsi3 and divsi3 to fix static linking. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.6.2 src/common/lib/libc/arch/arm/gen/divide.S \ src/common/lib/libc/arch/arm/gen/udivsi3.S cvs rdiff -u -r1.1 -r1.1.54.1 src/common/lib/libc/arch/arm/gen/divsi3.S cvs rdiff -u -r0 -r1.2.2.2 src/common/lib/libc/arch/arm/gen/modsi3.S \ src/common/lib/libc/arch/arm/gen/umodsi3.S cvs rdiff -u -r1.16.8.2 -r1.16.8.2.2.1 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/gen/divsi3.S diff -u src/common/lib/libc/arch/arm/gen/divsi3.S:1.1 src/common/lib/libc/arch/arm/gen/divsi3.S:1.1.54.1 --- src/common/lib/libc/arch/arm/gen/divsi3.S:1.1 Tue Dec 20 19:28:49 2005 +++ src/common/lib/libc/arch/arm/gen/divsi3.S Wed Nov 28 01:53:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: divsi3.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ +/* $NetBSD: divsi3.S,v 1.1.54.1 2012/11/28 01:53:42 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -16,371 +16,5 @@ #include machine/asm.h -/* - * stack is aligned as there's a possibility of branching to .L_overflow - * which makes a C call - */ - -ENTRY(__umodsi3) - stmfd sp!, {lr} - sub sp, sp, #4 /* align stack */ - bl .L_udivide - add sp, sp, #4 /* unalign stack */ - mov r0, r1 - ldmfd sp!, {pc} - -ENTRY(__modsi3) - stmfd sp!, {lr} - sub sp, sp, #4 /* align stack */ - bl .L_divide - add sp, sp, #4 /* unalign stack */ - mov r0, r1 - ldmfd sp!, {pc} - -.L_overflow: -#if !defined(_KERNEL) !defined(_STANDALONE) - mov r0, #8 /* SIGFPE */ - bl PIC_SYM(_C_LABEL(raise), PLT) /* raise it */ - mov r0, #0 -#else - /* XXX should cause a fatal error */ - mvn r0, #0 -#endif - RET - -ENTRY(__udivsi3) -.L_udivide:/* r0 = r0 / r1; r1 = r0 % r1 */ - eor r0, r1, r0 - eor r1, r0, r1 - eor r0, r1, r0 - /* r0 = r1 / r0; r1 = r1 % r0 */ - cmp r0, #1 - bcc .L_overflow - beq .L_divide_l0 - mov ip, #0 - movs r1, r1 - bpl .L_divide_l1 - orr ip, ip, #0x2000 /* ip bit 0x2000 = -ve r1 */ - movs r1, r1, lsr #1 - orrcs ip, ip, #0x1000 /* ip bit 0x1000 = bit 0 of r1 */ - b .L_divide_l1 - -.L_divide_l0:/* r0 == 1 */ - mov r0, r1 - mov r1, #0 - RET - ENTRY(__divsi3) -.L_divide:/* r0 = r0 / r1; r1 = r0 % r1 */ - eor r0, r1, r0 - eor r1, r0, r1 - eor r0, r1, r0 - /* r0 = r1 / r0; r1 = r1 % r0 */ - cmp r0, #1 - bcc .L_overflow - beq .L_divide_l0 - ands ip, r0, #0x8000 - rsbmi r0, r0, #0 - ands r2, r1, #0x8000 - eor ip, ip, r2 - rsbmi r1, r1, #0 - orr ip, r2, ip, lsr #1 /* ip bit 0x4000 = -ve division */ - /* ip bit 0x8000 = -ve remainder */ - -.L_divide_l1: - mov r2, #1 - mov r3, #0 - - /* - * If the highest bit of the dividend is set, we have to be - * careful when shifting the divisor. Test this. - */ - movs r1,r1 - bpl .L_old_code - - /* - * At this point, the highest bit of r1 is known to be set. - * We abuse this below in the tst instructions. - */ - tst r1, r0 /*, lsl #0 */ - bmi .L_divide_b1 - tst r1, r0, lsl #1 - bmi .L_divide_b2 - tst r1, r0, lsl #2 - bmi .L_divide_b3 - tst r1, r0, lsl #3 - bmi .L_divide_b4 - tst r1, r0, lsl #4 - bmi .L_divide_b5 - tst r1, r0, lsl #5 - bmi .L_divide_b6 - tst r1, r0, lsl #6 - bmi .L_divide_b7 - tst r1, r0, lsl #7 - bmi .L_divide_b8 - tst r1, r0, lsl #8 - bmi .L_divide_b9 - tst r1, r0, lsl #9 - bmi .L_divide_b10 - tst r1, r0, lsl #10 - bmi .L_divide_b11 - tst r1, r0, lsl #11 - bmi .L_divide_b12 - tst r1, r0, lsl #12 - bmi .L_divide_b13 - tst r1, r0, lsl #13 - bmi .L_divide_b14 - tst r1, r0, lsl #14 - bmi .L_divide_b15 - tst r1, r0, lsl #15 - bmi .L_divide_b16 - tst r1, r0, lsl #16 - bmi .L_divide_b17 - tst r1, r0, lsl #17 - bmi .L_divide_b18 - tst r1, r0, lsl #18 - bmi .L_divide_b19 - tst r1, r0, lsl #19 - bmi .L_divide_b20 - tst r1, r0, lsl #20 - bmi .L_divide_b21 - tst r1, r0, lsl #21 - bmi .L_divide_b22 - tst r1, r0, lsl #22 - bmi .L_divide_b23 - tst r1, r0, lsl #23 - bmi .L_divide_b24 - tst r1, r0, lsl #24 - bmi .L_divide_b25 - tst r1, r0, lsl #25 - bmi .L_divide_b26 - tst r1, r0, lsl #26 - bmi .L_divide_b27 - tst r1, r0, lsl #27 - bmi .L_divide_b28 - tst r1, r0, lsl #28 - bmi .L_divide_b29 - tst r1, r0, lsl #29 - bmi .L_divide_b30 - tst r1, r0, lsl #30 - bmi .L_divide_b31 -/* - * instead of: - * tst r1, r0, lsl #31 - * bmi .L_divide_b32 - */ - b .L_divide_b32 - -.L_old_code: - cmp r1, r0 - bcc .L_divide_b0 - cmp r1, r0, lsl #1 - bcc .L_divide_b1 - cmp r1, r0, lsl #2 - bcc .L_divide_b2 - cmp r1, r0,
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Nov 28 02:18:25 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Add missing registers. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.8 src/lib/libc/arch/arm/gen/swapcontext.S:1.9 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.8 Thu Sep 27 11:20:20 2012 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Nov 28 02:18:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.9 2012/11/28 02:18:24 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,15 +33,15 @@ #include assym.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $) +RCSID($NetBSD: swapcontext.S,v 1.9 2012/11/28 02:18:24 matt Exp $) #endif /* LIBC_SCCS !lint */ ENTRY(swapcontext) stmfd sp!, {r0-r1, lr} /* Must save oucp, ucp, lr. */ - sub sp, #4 + sub sp, sp, #4 bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 - add sp, #4 + add sp, sp, #4 ldmfd sp!, {r0-r1, lr} RETc(ne) str sp, [r0, #_UC_REGS_SP] /* Adjust saved SP. */
CVS commit: [matt-nb6-plus] src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Wed Nov 28 02:21:41 UTC 2012 Modified Files: src/lib/libc/arch/arm [matt-nb6-plus]: Makefile.inc src/lib/libc/arch/arm/gen [matt-nb6-plus]: _lwp.c makecontext.c swapcontext.S Added Files: src/lib/libc/arch/arm [matt-nb6-plus]: genassym.cf Log Message: Pullup EABI changes. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.4.1 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r0 -r1.1.6.2 src/lib/libc/arch/arm/genassym.cf cvs rdiff -u -r1.5 -r1.5.8.1 src/lib/libc/arch/arm/gen/_lwp.c cvs rdiff -u -r1.3 -r1.3.26.1 src/lib/libc/arch/arm/gen/makecontext.c cvs rdiff -u -r1.5.26.1 -r1.5.26.2 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.10 src/lib/libc/arch/arm/Makefile.inc:1.10.4.1 --- src/lib/libc/arch/arm/Makefile.inc:1.10 Fri Nov 18 16:10:02 2011 +++ src/lib/libc/arch/arm/Makefile.inc Wed Nov 28 02:21:41 2012 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.10 2011/11/18 16:10:02 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.10.4.1 2012/11/28 02:21:41 matt Exp $ .include bsd.own.mk SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S -CPPFLAGS += -DSOFTFLOAT +CPPFLAGS += -I. +CPPFLAGS += -DSOFTFLOAT -I. SOFTFLOAT_BITS=32 .include softfloat/Makefile.inc Index: src/lib/libc/arch/arm/gen/_lwp.c diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.5 src/lib/libc/arch/arm/gen/_lwp.c:1.5.8.1 --- src/lib/libc/arch/arm/gen/_lwp.c:1.5 Thu Feb 24 04:28:41 2011 +++ src/lib/libc/arch/arm/gen/_lwp.c Wed Nov 28 02:21:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $ */ +/* $NetBSD: _lwp.c,v 1.5.8.1 2012/11/28 02:21:41 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -37,7 +37,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $); +__RCSID($NetBSD: _lwp.c,v 1.5.8.1 2012/11/28 02:21:41 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -50,7 +50,7 @@ void _lwp_makecontext(ucontext_t *u, void (*start)(void *), void *arg, void *private, caddr_t stack_base, size_t stack_size) { - void **sp; + uintptr_t sp; getcontext(u); u-uc_link = NULL; @@ -58,16 +58,15 @@ _lwp_makecontext(ucontext_t *u, void (*s u-uc_stack.ss_sp = stack_base; u-uc_stack.ss_size = stack_size; - sp = (void **) (stack_base + stack_size); - + sp = (uintptr_t)stack_base + stack_size; /* * Note: We make sure the stack is 8-byte aligned, here. */ - u-uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg; - u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp) ~7; - u-uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit; - u-uc_mcontext.__gregs[_REG_PC] = (__greg_t) start; - u-uc_mcontext._mc_tlsbase = (uintptr_t)private; + u-uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg; + u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t)sp) ~7; + u-uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit; + u-uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start; + u-uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private; u-uc_flags |= _UC_TLSBASE; } Index: src/lib/libc/arch/arm/gen/makecontext.c diff -u src/lib/libc/arch/arm/gen/makecontext.c:1.3 src/lib/libc/arch/arm/gen/makecontext.c:1.3.26.1 --- src/lib/libc/arch/arm/gen/makecontext.c:1.3 Mon Apr 28 20:22:55 2008 +++ src/lib/libc/arch/arm/gen/makecontext.c Wed Nov 28 02:21:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $ */ +/* $NetBSD: makecontext.c,v 1.3.26.1 2012/11/28 02:21:41 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $); +__RCSID($NetBSD: makecontext.c,v 1.3.26.1 2012/11/28 02:21:41 matt Exp $); #endif #include stddef.h @@ -55,12 +55,12 @@ makecontext(ucontext_t *ucp, void (*func /* Allocate necessary stack space for arguments exceeding r0-3. */ if (argc 4) sp -= argc - 4; - gr[_REG_SP] = (__greg_t)sp; + gr[_REG_SP] = (__greg_t)(uintptr_t)sp; /* Wipe out frame pointer. */ gr[_REG_FP] = 0; /* Arrange for return via the trampoline code. */ - gr[_REG_LR] = (__greg_t)_resumecontext; - gr[_REG_PC] = (__greg_t)func; + gr[_REG_LR] = (__greg_t)(uintptr_t)_resumecontext; + gr[_REG_PC] = (__greg_t)(uintptr_t)func; va_start(ap, argc); /* Pass up to four arguments in r0-3. */ Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.5.26.1 src/lib/libc/arch/arm/gen/swapcontext.S:1.5.26.2 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.5.26.1 Thu Nov 1 16:44:57 2012 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Nov 28 02:21:41 2012 @@ -1,4 +1,4 @@
CVS commit: [matt-nb6-plus] src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Wed Nov 28 02:25:44 UTC 2012 Modified Files: src/sys/lib/libkern/arch/arm [matt-nb6-plus]: Makefile.inc Log Message: Deal with div/mod changes. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.20.1 src/sys/lib/libkern/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/arch/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.9 src/sys/lib/libkern/arch/arm/Makefile.inc:1.9.20.1 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.9 Fri Aug 14 19:23:53 2009 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Wed Nov 28 02:25:43 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.9 2009/08/14 19:23:53 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.9.20.1 2012/11/28 02:25:43 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S -SRCS+= divsi3.S clzsi2.S +SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S
CVS commit: [netbsd-5] src/sys/arch/x86/include
Module Name:src Committed By: riz Date: Wed Nov 28 04:39:03 UTC 2012 Modified Files: src/sys/arch/x86/include [netbsd-5]: specialreg.h Log Message: Pull up following revision(s) (requested by christos in ticket #1819): sys/arch/x86/include/specialreg.h: revision 1.58 Add VIA Eden FCR MSR. To generate a diff of this commit: cvs rdiff -u -r1.31.4.1 -r1.31.4.2 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.31.4.1 src/sys/arch/x86/include/specialreg.h:1.31.4.2 --- src/sys/arch/x86/include/specialreg.h:1.31.4.1 Tue Jun 16 02:23:31 2009 +++ src/sys/arch/x86/include/specialreg.h Wed Nov 28 04:39:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.31.4.1 2009/06/16 02:23:31 snj Exp $ */ +/* $NetBSD: specialreg.h,v 1.31.4.2 2012/11/28 04:39:03 riz Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -360,6 +360,11 @@ #define MSR_VIA_ACE_ENABLE 0x1000 /* + * VIA Eden MSRs + */ +#define MSR_VIA_FCR MSR_VIA_ACE + +/* * AMD K6/K7 MSRs. */ #define MSR_K6_UWCCR 0xc085
CVS commit: othersrc/external/bsd/getopt2/dist
Module Name:othersrc Committed By: agc Date: Wed Nov 28 06:51:24 UTC 2012 Modified Files: othersrc/external/bsd/getopt2/dist: getopt2.c Log Message: more feedback from fuzz testing round: check arguments passed to us, return error codes if they're not good. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/getopt2/dist/getopt2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/getopt2/dist/getopt2.c diff -u othersrc/external/bsd/getopt2/dist/getopt2.c:1.1.1.1 othersrc/external/bsd/getopt2/dist/getopt2.c:1.2 --- othersrc/external/bsd/getopt2/dist/getopt2.c:1.1.1.1 Fri Jul 15 05:30:48 2011 +++ othersrc/external/bsd/getopt2/dist/getopt2.c Wed Nov 28 06:51:23 2012 @@ -32,6 +32,9 @@ int getopt2_init(getopt2_t *options) { + if (options == NULL) { + return 0; + } (void) memset(options, 0x0, sizeof(*options)); options-optind = 1; return 1; @@ -44,6 +47,9 @@ getopt2(getopt2_t *options, int argc, ch char ch; int subind; + if (options == NULL || argc 0 || argv == NULL || optstring == NULL) { + return -1; + } if (options-optind == 0) { /* allow for straight getopt2() invocation without init */ getopt2_init(options);