CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 07:25:52 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcpy.S Log Message: Unless we are using an XSCALE, default to the normal arm version of memcpy. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memcpy.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/string/memcpy.S diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.4 src/common/lib/libc/arch/arm/string/memcpy.S:1.5 --- src/common/lib/libc/arch/arm/string/memcpy.S:1.4 Fri Feb 15 22:35:39 2013 +++ src/common/lib/libc/arch/arm/string/memcpy.S Tue Aug 20 07:25:52 2013 @@ -1,8 +1,8 @@ -/* $NetBSD: memcpy.S,v 1.4 2013/02/15 22:35:39 matt Exp $ */ +/* $NetBSD: memcpy.S,v 1.5 2013/08/20 07:25:52 matt Exp $ */ #include -#if !defined(_ARM_ARCH_DWORD_OK) || defined(_STANDALONE) +#if !defined(__XSCALE__) || defined(_STANDALONE) #include "memcpy_arm.S" #else #include "memcpy_xscale.S"
CVS commit: src/common/lib/libc/arch/arm/atomic
Module Name:src Committed By: matt Date: Tue Aug 20 07:52:31 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/atomic: atomic_add_64.S atomic_and_64.S atomic_or_64.S atomic_swap_64.S Log Message: Push two registers to keep stack aligned. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/atomic/atomic_add_64.S cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/atomic/atomic_and_64.S \ src/common/lib/libc/arch/arm/atomic/atomic_or_64.S cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/atomic/atomic_swap_64.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/atomic_add_64.S diff -u src/common/lib/libc/arch/arm/atomic/atomic_add_64.S:1.7 src/common/lib/libc/arch/arm/atomic/atomic_add_64.S:1.8 --- src/common/lib/libc/arch/arm/atomic/atomic_add_64.S:1.7 Sun Aug 11 04:41:17 2013 +++ src/common/lib/libc/arch/arm/atomic/atomic_add_64.S Tue Aug 20 07:52:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_add_64.S,v 1.7 2013/08/11 04:41:17 matt Exp $ */ +/* $NetBSD: atomic_add_64.S,v 1.8 2013/08/20 07:52:31 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +33,7 @@ #ifdef _ARM_ARCH_6 ENTRY_NP(_atomic_add_64_nv) - push {r4} /* save temporary */ + push {r3,r4} /* save temporary */ mov ip, r0 /* need r0 for return value */ #ifndef __ARM_EABI__ mov r3, r2 @@ -50,7 +50,7 @@ ENTRY_NP(_atomic_add_64_nv) #else mcr p15, 0, r4, c7, c10, 5 /* data memory barrier */ #endif - pop {r4} /* restore temporary */ + pop {r3,r4} /* restore temporary */ RET/* return new value */ END(_atomic_add_64_nv) Index: src/common/lib/libc/arch/arm/atomic/atomic_and_64.S diff -u src/common/lib/libc/arch/arm/atomic/atomic_and_64.S:1.6 src/common/lib/libc/arch/arm/atomic/atomic_and_64.S:1.7 --- src/common/lib/libc/arch/arm/atomic/atomic_and_64.S:1.6 Sun Aug 11 04:41:17 2013 +++ src/common/lib/libc/arch/arm/atomic/atomic_and_64.S Tue Aug 20 07:52:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_and_64.S,v 1.6 2013/08/11 04:41:17 matt Exp $ */ +/* $NetBSD: atomic_and_64.S,v 1.7 2013/08/20 07:52:31 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +33,7 @@ #ifdef _ARM_ARCH_6 ENTRY_NP(_atomic_and_64_nv) - push {r4} /* save temporary */ + push {r3,r4} /* save temporary */ #ifndef __ARM_EABI__ mov r3, r2 mov r2, r1 @@ -50,7 +50,7 @@ ENTRY_NP(_atomic_and_64_nv) #else mcr p15, 0, r4, c7, c10, 5 /* data memory barrier */ #endif - pop {r4} /* restore temporary */ + pop {r3,r4} /* restore temporary */ RET/* return new value */ END(_atomic_and_64_nv) Index: src/common/lib/libc/arch/arm/atomic/atomic_or_64.S diff -u src/common/lib/libc/arch/arm/atomic/atomic_or_64.S:1.6 src/common/lib/libc/arch/arm/atomic/atomic_or_64.S:1.7 --- src/common/lib/libc/arch/arm/atomic/atomic_or_64.S:1.6 Sun Aug 11 04:41:17 2013 +++ src/common/lib/libc/arch/arm/atomic/atomic_or_64.S Tue Aug 20 07:52:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_or_64.S,v 1.6 2013/08/11 04:41:17 matt Exp $ */ +/* $NetBSD: atomic_or_64.S,v 1.7 2013/08/20 07:52:31 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +33,7 @@ #ifdef _ARM_ARCH_6 ENTRY_NP(_atomic_or_64_nv) - push {r4} /* save temporary */ + push {r3,r4} /* save temporary */ #ifndef __ARM_EABI__ mov r3, r2 mov r2, r1 @@ -50,7 +50,7 @@ ENTRY_NP(_atomic_or_64_nv) #else mcr p15, 0, r4, c7, c10, 5 /* data memory barrier */ #endif - pop {r4} /* restore temporary */ + pop {r3,r4} /* restore temporary */ RET/* return new value */ END(_atomic_or_64_nv) Index: src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S diff -u src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S:1.4 src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S:1.5 --- src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S:1.4 Sat Aug 10 19:59:21 2013 +++ src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S Tue Aug 20 07:52:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_swap_64.S,v 1.4 2013/08/10 19:59:21 matt Exp $ */ +/* $NetBSD: atomic_swap_64.S,v 1.5 2013/08/20 07:52:31 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" ENTRY_NP(_atomic_swap_64) - push {r4} /* save temporary */ + push {r3,r4} /* save temporary */ mov ip, r0 /* return value will be in r0 */ #ifndef __ARM_EABI__ mov r3, r2 /* r2 will be overwriten by r1 */ @@ -46,7 +46,7 @@ ENTRY_NP(_atomic_swap_64) #else mcr p15, 0, r4, c7, c10, 5 /* data memory barrier */ #endif - pop {r4} /* restore temporary */ + pop {r3,r4} /* restore temporary */ RET END(_atomic_swap_64) ATOMIC_OP_ALIAS(atomic_swap_64,_atomic_swap_64)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:06:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: thumbify (part2) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_arm.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/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4 Mon Aug 19 01:17:32 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Tue Aug 20 08:06:30 2013 @@ -29,7 +29,11 @@ #include -RCSID("$NetBSD: strlen_arm.S,v 1.4 2013/08/19 01:17:32 matt Exp $") +RCSID("$NetBSD: strlen_arm.S,v 1.5 2013/08/20 08:06:30 matt Exp $") + +#if defined(__thumb__) && !defined(_ARM_ARCH_T2) +#error Only Thumb2 or ARM supported +#endif #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -63,10 +67,10 @@ ENTRY(FUNCNAME) .cfi_offset 5, -4 .cfi_offset 4, -8 #endif - add r5, r0, r1 /* get ptr to end of string */ + adds r5, r0, r1 /* get ptr to end of string */ mov r4, r1 /* save maxlen */ #endif - add ip, r0, #4 /* for the final post-inc */ + adds r2, r0, #4 /* for the final post-inc */ 1: tst r0, #3 /* test for word alignment */ beq .Lpre_main_loop /* finally word aligned */ #ifdef STRNLEN @@ -74,10 +78,10 @@ ENTRY(FUNCNAME) beq .Lmaxed_out /* yes, return maxlen */ #endif ldrb r3, [r0], #1 /* load a byte */ - teq r3, #0 /* is it 0? */ + cmp r3, #0 /* is it 0? */ bne 1b /* no, try next byte */ - sub ip, ip, #3 /* subtract (4 - the NUL) */ - sub r0, r0, ip /* subtract start */ + subs r2, r2, #3 /* subtract (4 - the NUL) */ + subs r0, r0, r2 /* subtract start */ #ifdef STRNLEN pop {r4, r5} /* restore registers */ #endif @@ -127,7 +131,12 @@ ENTRY(FUNCNAME) rev r3, r3 /* we want this in BE for the CLZ */ #endif clz r3, r3 /* count how many leading zeros */ +#ifdef __thumb__ + lsrs r3, r3, #3 + adds r0, r0, r3 /* divide that by 8 and add to count */ +#else add r0, r0, r3, lsr #3 /* divide that by 8 and add to count */ +#endif #else /* * We encountered a NUL. @@ -147,7 +156,7 @@ ENTRY(FUNCNAME) * start of the string (which also has 4 added to it to compensate for * the post-inc. */ - sub r0, r0, ip /* subtract start to get length */ + subs r0, r0, r2 /* subtract start to get length */ #ifdef STRNLEN cmp r0, r4 /* is it larger than maxlen? */ movgt r0, r4 /* yes, return maxlen */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:05:49 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_arm.S Log Message: swap r1 & ip use adds, eors, etc. teq -> cmp To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strrchr_arm.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/string/strrchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.4 src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.4 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_arm.S Tue Aug 20 08:05:49 2013 @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strrchr_arm.S,v 1.4 2013/08/11 04:56:32 matt Exp $") +RCSID("$NetBSD: strrchr_arm.S,v 1.5 2013/08/20 08:05:49 matt Exp $") #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -37,49 +37,52 @@ RCSID("$NetBSD: strrchr_arm.S,v 1.4 2013 #define BYTE2 0x00ff #define BYTE3 0xff00 #define lshi lsl +#define lshis lsls #else #define BYTE0 0xff00 #define BYTE1 0x00ff #define BYTE2 0xff00 #define BYTE3 0x00ff #define lshi lsr +#define lshis lsrs #endif - .text ENTRY(strrchr) - teq r1, #0 /* searching for NUL? */ + ands r2, r1, #0xff /* is the byte value NUL? */ bne 1f /* no, do it the hard way */ push {r0, lr} /* save pointer and return addr */ bl PLT_SYM(strlen) /* get length */ - pop {r1, lr} /* restore pointer and returna addr */ - add r0, r0, r1 /* add pointer to length */ - RET/* return */ + pop {r1, r2} /* restore pointer / return addr */ + adds r0, r0, r1 /* add pointer to length */ + RETr(r2) /* return */ -1: mov ip, r0 /* we use r0 at the return value */ - mov r0, #0 /* return NULL by default */ - and r2, r1, #0xff /* restrict to byte value */ -2: tst ip, #3 /* test for word alignment */ +1: mov r1, r0 /* we use r0 at the return value */ + movs r0, #0 /* return NULL by default */ +2: tst r1, #3 /* test for word alignment */ beq .Lpre_main_loop /* finally word aligned */ - ldrb r3, [ip], #1 /* load a byte */ + ldrb r3, [r1], #1 /* load a byte */ cmp r3, r2 /* did it match? */ - subeq r0, ip, #1 /* yes, remember that it did */ - teq r3, #0 /* was it NUL? */ +#ifdef __thumb__ + it eq + subeq r0, r1, #1 /* yes, remember that it did */ +#endif + cmp r3, #0 /* was it NUL? */ bne 2b /* no, try next byte */ RET/* return */ .Lpre_main_loop: push {r4, r5} /* save some registers */ #if defined(_ARM_ARCH_7) - movw r1, #0xfefe /* magic constant; 254 in each byte */ - movt r1, #0xfefe /* magic constant; 254 in each byte */ + movw ip, #0xfefe /* magic constant; 254 in each byte */ + movt ip, #0xfefe /* magic constant; 254 in each byte */ #elif defined(_ARM_ARCH_6) - mov r1, #0xfe /* put 254 in low byte */ - orr r1, r1, r1, lsl #8 /* move to next byte */ - orr r1, r1, r1, lsl #16 /* move to next halfword */ + mov ip, #0xfe /* put 254 in low byte */ + orr ip, ip, ip, lsl #8 /* move to next byte */ + orr ip, ip, ip, lsl #16 /* move to next halfword */ #endif /* _ARM_ARCH_6 */ orr r2, r2, r2, lsl #8 /* move to next byte */ orr r2, r2, r2, lsl #16 /* move to next halfword */ .Lmain_loop: - ldr r3, [ip], #4 /* load next word */ + ldr r3, [r1], #4 /* load next word */ #if defined(_ARM_ARCH_6) /* * Add 254 to each byte using the UQADD8 (unsigned saturating add 8) @@ -87,10 +90,10 @@ ENTRY(strrchr) * become 255. For NUL, it will be 254. When we complement the * result, if the result is non-0 then we must have encountered a NUL. */ - uqadd8 r4, r3, r1 /* NUL detection happens here */ + uqadd8 r4, r3, ip /* NUL detection happens here */ usub8 r3, r3, r2 /* bias for char looked for? */ - uqadd8 r5, r3, r1 /* char detection happens here */ - and r3, r4, r5 /* merge results */ + uqadd8 r5, r3, ip /* char detection happens here */ + ands r3, r4, r5 /* merge results */ mvns r3, r3 /* is the complement non-0? */ beq .Lmain_loop /* no, then keep going */ @@ -104,7 +107,10 @@ ENTRY(strrchr) */ bics r5, r5, r4 /* clear any NUL match bits */ beq .Ldone /* no remaining matches, we're done */ - movs r3, r4, lshi #8 /* shift up a byte */ + lshis r3, r4, #8 /* shift up a byte */ +#ifdef __thumb__ + itt ne +#endif orrsne r3, r3, r3, lshi #8 /* if non 0, copy up to next byte */ orrsne r3, r3, r3, lshi #8 /* if non 0, copy up to last byte */ bics r5, r5, r3 /* clear match bits */ @@ -117,13 +123,13 @@ ENTRY(strrchr) * If we have multiple matches, we want to the select the "last" match * in the word which will be the lowest bit set. */ - sub r3, r5, #1 /* subtract 1 */ - and r3, r3, r5 /* and with mask */ - eor r5, r5, r3 /* only have the lowest bit set left */ + subs r3, r5, #1 /* subtract 1 */ + ands r3, r3, r5 /* and with
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:07:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr.S strlen.S strrchr.S Log Message: Use the arm versions of strlen/strchr/strrchr if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strchr.S \ src/common/lib/libc/arch/arm/string/strlen.S \ src/common/lib/libc/arch/arm/string/strrchr.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/string/strchr.S diff -u src/common/lib/libc/arch/arm/string/strchr.S:1.3 src/common/lib/libc/arch/arm/string/strchr.S:1.4 --- src/common/lib/libc/arch/arm/string/strchr.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strchr.S Tue Aug 20 08:07:30 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strchr.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ #include STRONG_ALIAS(index, strchr) -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) && !defined(_ARM_ARCH_T2)) #include "strchr_naive.S" #else #include "strchr_arm.S" Index: src/common/lib/libc/arch/arm/string/strlen.S diff -u src/common/lib/libc/arch/arm/string/strlen.S:1.3 src/common/lib/libc/arch/arm/string/strlen.S:1.4 --- src/common/lib/libc/arch/arm/string/strlen.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strlen.S Tue Aug 20 08:07:30 2013 @@ -1,6 +1,8 @@ -/* $NetBSD: strlen.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strlen.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ -#if defined(_STANDALONE) || defined(__thumb__) +#include + +#if defined(_STANDALONE) || (defined(__thumb__) && !defined(_ARM_ARCH_T2)) #include "strlen_naive.S" #else #include "strlen_arm.S" Index: src/common/lib/libc/arch/arm/string/strrchr.S diff -u src/common/lib/libc/arch/arm/string/strrchr.S:1.3 src/common/lib/libc/arch/arm/string/strrchr.S:1.4 --- src/common/lib/libc/arch/arm/string/strrchr.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strrchr.S Tue Aug 20 08:07:30 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strrchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strrchr.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ #include STRONG_ALIAS(rindex, strrchr) -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) && !defined(_ARM_ARCH_T2)) #include "strrchr_naive.S" #else #include "strrchr_arm.S"
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:08:59 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strnlen.S Log Message: Use the arm versions of strnlen if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strnlen.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/string/strnlen.S diff -u src/common/lib/libc/arch/arm/string/strnlen.S:1.2 src/common/lib/libc/arch/arm/string/strnlen.S:1.3 --- src/common/lib/libc/arch/arm/string/strnlen.S:1.2 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strnlen.S Tue Aug 20 08:08:59 2013 @@ -1,8 +1,10 @@ -/* $NetBSD: strnlen.S,v 1.2 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strnlen.S,v 1.3 2013/08/20 08:08:59 matt Exp $ */ + +#include /* for _ARM_ARCH_T2 */ #define STRNLEN -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) && !defined(_ARM_ARCH_T2)) #include "strlen_naive.S" #else #include "strlen_arm.S"
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: macallan Date: Tue Aug 20 10:33:03 UTC 2013 Modified Files: src/sys/arch/sparc64/dev: psychoreg.h Log Message: add US-IIe specific STICK and ESTAR registers To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc64/dev/psychoreg.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/sparc64/dev/psychoreg.h diff -u src/sys/arch/sparc64/dev/psychoreg.h:1.17 src/sys/arch/sparc64/dev/psychoreg.h:1.18 --- src/sys/arch/sparc64/dev/psychoreg.h:1.17 Wed Mar 16 05:49:43 2011 +++ src/sys/arch/sparc64/dev/psychoreg.h Tue Aug 20 10:33:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: psychoreg.h,v 1.17 2011/03/16 05:49:43 mrg Exp $ */ +/* $NetBSD: psychoreg.h,v 1.18 2013/08/20 10:33:03 macallan Exp $ */ /* * Copyright (c) 1999 Matthew R. Green @@ -242,9 +242,18 @@ struct psychoreg { uint64_t strbuf_error_diag[128]; /* streaming buffer error status diag *//* 1fe..b400-b7f8 */ uint64_t strbuf_pg_tag_diag[16]; /* streaming buffer page tag diag */ /* 1fe..b800-b878 */ uint64_t pad18[16]; - uint64_t strbuf_ln_tag_diag[16]; /* streaming buffer line tag diag */ /* 1fe..b900-b978 */ - uint64_t pad19[208]; + uint64_t strbuf_ln_tag_diag[16]; /* streaming buffer line tag diag */ /* 1fe..b900-b978 */ + uint64_t pad19[208]; } psy_strbufdiag[2]; /* For PCI a and b */ + + /* 1fe..d000-f058 */ + uint64_t pad20[1036]; + /* US-IIe and II'i' only */ + uint64_t stick_cmp_low; + uint64_t stick_cmp_high; + uint64_t stick_count_low; + uint64_t stick_count_high; + uint64_t estar_mode; /* * Here is the rest of the map, which we're not specifying: @@ -302,6 +311,26 @@ struct psychoreg { #define PCICTL_4ENABLE 0x000fLL /* enable 4 PCI slots */ #define PCICTL_6ENABLE 0x003fLL /* enable 6 PCI slots */ +/* the following registers only exist on US-IIe and US-II'i' */ + +/* STICK_COMPARE */ +#define STICK_ENABLE 0x8000LL /* enable STICK interrupt */ +#define STICK_MASK 0x7fffLL /* counter is 63bit wide */ + +/* + * ESTAR_MODE + * CPU clock MUST remain above 66MHz, so we can't use 1/6 on a 400MHz chip + */ +#define ESTAR_FULL 0 /* full CPU speed */ +#define ESTAR_DIV_2 1 /* 1/2 */ +#define ESTAR_DIV_6 2 /* 1/6 */ +/* + * the following exist only on US-II'i' - that is the 2nd generation of US-IIe + * CPUs that Sun decided to call US-IIi just to screw with everyone + */ +#define ESTAR_DIV_4 3 /* 1/4 */ +#define ESTAR_DIV_8 4 /* 1/8 */ + /* * these are the PROM structures we grovel */
CVS commit: src/sys/net
Module Name:src Committed By: yamt Date: Tue Aug 20 12:28:12 UTC 2013 Modified Files: src/sys/net: if_tap.c Log Message: - deal with softint_establish failure - establish softint only when necessary To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/net/if_tap.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/net/if_tap.c diff -u src/sys/net/if_tap.c:1.70 src/sys/net/if_tap.c:1.71 --- src/sys/net/if_tap.c:1.70 Mon Jan 28 15:05:03 2013 +++ src/sys/net/if_tap.c Tue Aug 20 12:28:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.70 2013/01/28 15:05:03 yamt Exp $ */ +/* $NetBSD: if_tap.c,v 1.71 2013/08/20 12:28:12 yamt Exp $ */ /* * Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.70 2013/01/28 15:05:03 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.71 2013/08/20 12:28:12 yamt Exp $"); #if defined(_KERNEL_OPT) @@ -268,7 +268,7 @@ tap_attach(device_t parent, device_t sel char enaddrstr[3 * ETHER_ADDR_LEN]; sc->sc_dev = self; - sc->sc_sih = softint_establish(SOFTINT_CLOCK, tap_softintr, sc); + sc->sc_sih = NULL; getnanotime(&sc->sc_btime); sc->sc_atime = sc->sc_mtime = sc->sc_btime; @@ -391,7 +391,10 @@ tap_detach(device_t self, int flags) if_down(ifp); splx(s); - softint_disestablish(sc->sc_sih); + if (sc->sc_sih != NULL) { + softint_disestablish(sc->sc_sih); + sc->sc_sih = NULL; + } #if defined(COMPAT_40) || defined(MODULAR) /* @@ -852,6 +855,10 @@ tap_dev_close(struct tap_softc *sc) } splx(s); + if (sc->sc_sih != NULL) { + softint_disestablish(sc->sc_sih); + sc->sc_sih = NULL; + } sc->sc_flags &= ~(TAP_INUSE | TAP_ASYNCIO); return (0); @@ -1104,10 +,21 @@ tap_dev_ioctl(int unit, u_long cmd, void case FIOGETOWN: return fgetown(sc->sc_pgid, cmd, data); case FIOASYNC: - if (*(int *)data) + if (*(int *)data) { + if (sc->sc_sih == NULL) { +sc->sc_sih = softint_establish(SOFTINT_CLOCK, +tap_softintr, sc); +if (sc->sc_sih == NULL) + return EBUSY; /* XXX */ + } sc->sc_flags |= TAP_ASYNCIO; - else + } else { sc->sc_flags &= ~TAP_ASYNCIO; + if (sc->sc_sih != NULL) { +softint_disestablish(sc->sc_sih); +sc->sc_sih = NULL; + } + } return 0; case FIONBIO: if (*(int *)data)
CVS commit: src/distrib/utils/libhack
Module Name:src Committed By: christos Date: Tue Aug 20 15:44:17 UTC 2013 Modified Files: src/distrib/utils/libhack: gethost.c Log Message: modernize, comment out dead code, amend gethostbyaddr prototype. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/utils/libhack/gethost.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/libhack/gethost.c diff -u src/distrib/utils/libhack/gethost.c:1.8 src/distrib/utils/libhack/gethost.c:1.9 --- src/distrib/utils/libhack/gethost.c:1.8 Thu Aug 7 05:27:57 2003 +++ src/distrib/utils/libhack/gethost.c Tue Aug 20 11:44:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: gethost.c,v 1.8 2003/08/07 09:27:57 agc Exp $ */ +/* $NetBSD: gethost.c,v 1.9 2013/08/20 15:44:17 christos Exp $ */ /*- * Copyright (c) 1985, 1988, 1993 @@ -90,11 +90,11 @@ static struct in_addr host_addr; static FILE *hostf = NULL; static int stayopen = 0; -void _sethtent __P((int)); -void _endhtent __P((void)); -struct hostent *_gethtent __P((void)); -struct hostent *_gethtbyname __P((const char *)); -struct hostent *_gethtbyaddr __P((const char *, int, int)); +void _sethtent(int); +void _endhtent(void); +struct hostent *_gethtent(void); +struct hostent *_gethtbyname(const char *); +struct hostent *_gethtbyaddr(const void *, socklen_t, int); #if PACKETSZ > 1024 @@ -106,16 +106,15 @@ struct hostent *_gethtbyaddr __P((const extern int h_errno; struct hostent * -gethostbyname(name) - const char *name; +gethostbyname(const char *name) { - register const char *cp; + const char *cp; /* * disallow names consisting only of digits/dots, unless * they end in a dot. */ - if (isdigit(name[0])) + if (isdigit((unsigned char)name[0])) for (cp = name;; ++cp) { if (!*cp) { if (*--cp == '.') @@ -137,39 +136,37 @@ gethostbyname(name) h_addr_ptrs[0] = (char *)&host_addr; h_addr_ptrs[1] = NULL; host.h_addr_list = h_addr_ptrs; -return (&host); +return &host; } - if (!isdigit(*cp) && *cp != '.') + if (!isdigit((unsigned char)*cp) && *cp != '.') break; } /* XXX - Force host table lookup. */ - return (_gethtbyname(name)); + return _gethtbyname(name); } struct hostent * -gethostbyaddr(addr, len, type) - const char *addr; - socklen_t len; - int type; +gethostbyaddr(const void *addr, socklen_t len, int type) { +#if 0 char qbuf[MAXDNAME]; +#endif if (type != AF_INET) - return ((struct hostent *) NULL); - (void)sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa", - ((unsigned)addr[3] & 0xff), - ((unsigned)addr[2] & 0xff), - ((unsigned)addr[1] & 0xff), - ((unsigned)addr[0] & 0xff)); + return NULL; +#if 0 + (void)snprintf(qbuf, sizeof(qbuf), "%u.%u.%u.%u.in-addr.arpa", + ((unsigned)addr[3] & 0xff), ((unsigned)addr[2] & 0xff), + ((unsigned)addr[1] & 0xff), ((unsigned)addr[0] & 0xff)); +#endif /* XXX - Force host table lookup. */ - return (_gethtbyaddr(addr, len, type)); + return _gethtbyaddr(addr, len, type); } void -_sethtent(f) - int f; +_sethtent(int f) { if (hostf == NULL) hostf = fopen(_PATH_HOSTS, "r" ); @@ -179,7 +176,7 @@ _sethtent(f) } void -_endhtent() +_endhtent(void) { if (hostf && !stayopen) { (void) fclose(hostf); @@ -188,16 +185,16 @@ _endhtent() } struct hostent * -_gethtent() +_gethtent(void) { char *p; - register char *cp, **q; + char *cp, **q; if (hostf == NULL && (hostf = fopen(_PATH_HOSTS, "r" )) == NULL) - return (NULL); + return NULL; again: if ((p = fgets(hostbuf, BUFSIZ, hostf)) == NULL) - return (NULL); + return NULL; if (*p == '#') goto again; cp = strpbrk(p, "#\n"); @@ -234,15 +231,14 @@ again: *cp++ = '\0'; } *q = NULL; - return (&host); + return &host; } struct hostent * -_gethtbyname(name) - const char *name; +_gethtbyname(const char *name) { - register struct hostent *p; - register char **cp; + struct hostent *p; + char **cp; _sethtent(0); while ((p = _gethtent()) != NULL) { @@ -254,25 +250,23 @@ _gethtbyname(name) } found: _endhtent(); - if (p==NULL) + if (p == NULL) h_errno = HOST_NOT_FOUND; - return (p); + return p; } struct hostent * -_gethtbyaddr(addr, len, type) - const char *addr; - int len, type; +_gethtbyaddr(const void *addr, socklen_t len, int type) { - register struct hostent *p; + struct hostent *p; _sethtent(0); while ((p = _gethtent()) != NULL) if (p->h_addrtype == type && !memcmp(p->h_addr, addr, len)) break; _endhtent(); - if (p==NULL) + if (p == NULL) h_errno = HOST_NOT_FOUND; - return (p); + return p; }
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 16:34:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Add a missing it gt before movgt for thumb To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_arm.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/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 Tue Aug 20 08:06:30 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Tue Aug 20 16:34:47 2013 @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strlen_arm.S,v 1.5 2013/08/20 08:06:30 matt Exp $") +RCSID("$NetBSD: strlen_arm.S,v 1.6 2013/08/20 16:34:47 matt Exp $") #if defined(__thumb__) && !defined(_ARM_ARCH_T2) #error Only Thumb2 or ARM supported @@ -159,6 +159,9 @@ ENTRY(FUNCNAME) subs r0, r0, r2 /* subtract start to get length */ #ifdef STRNLEN cmp r0, r4 /* is it larger than maxlen? */ +#ifdef __thumb__ + it gt +#endif movgt r0, r4 /* yes, return maxlen */ pop {r4, r5} /* restore registers */ #endif
CVS commit: src/lib/libkern
Module Name:src Committed By: matt Date: Tue Aug 20 17:35:41 UTC 2013 Added Files: src/lib/libkern: Makefile Log Message: Make libkern.a for standalone problems and install it into ./usr/lib To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libkern/Makefile diff -u /dev/null src/lib/libkern/Makefile:1.1 --- /dev/null Tue Aug 20 17:35:41 2013 +++ src/lib/libkern/Makefile Tue Aug 20 17:35:41 2013 @@ -0,0 +1,71 @@ +# $NetBSD: Makefile,v 1.1 2013/08/20 17:35:41 matt Exp $ + +WITHOUT_MAN=true # defined + +.include # Pull in OBJDIR name rules. +.include + +LIB= kern +DBG= -Os + +MKDEBUGLIB:=no +MKLINT:=no +MKPICINSTALL:= no +MKPIC:= no +MKPROFILE:= no + +S= ${NETBSDSRCDIR}/sys +CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} -I${S}/arch + +CPPFLAGS+= -D_STANDALONE + +COPTS+= -ffreestanding +COPTS+= -fno-stack-protector +COPTS+= -fno-unwind-tables +CWARNFLAGS+= -Werror +CWARNFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith + +.if !make(obj) && !make(clean) && !make(cleandir) +.NOPATH: machine +.endif + +realdepend realall: machine +CLEANFILES+= ${MACHINE_CPU} machine + +machine:: + -rm -f ${MACHINE_CPU} machine + ln -s ${S}/arch/${MACHINE}/include machine + ln -s ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} + +${OBJS}: machine + +### find out what to use for libkern +KERN_AS= library +KERNDIR= ${S}/lib/libkern + +.include "${S}/lib/libkern/Makefile.libkern" +.ifndef ARCHSUBDIR +.BEGIN: + @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU} + @false +.endif + +cleandir distclean: .WAIT cleanlibdir + +cleanlibdir: + -rm -rf lib + +.include + +lib${LIB}.o:: ${OBJS} + @echo building standard ${LIB} library + @rm -f lib${LIB}.o + @${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}` + +lib${LIB}.po:: ${POBJS} + @echo building profiled ${LIB} library + @rm -f lib${LIB}.po + @${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}` + +showsources: ${SRCS} + @echo ${.ALLSRC}
CVS commit: src/lib
Module Name:src Committed By: matt Date: Tue Aug 20 17:36:20 UTC 2013 Modified Files: src/lib: Makefile Log Message: Build libkern To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.204 src/lib/Makefile:1.205 --- src/lib/Makefile:1.204 Mon Jul 29 21:02:58 2013 +++ src/lib/Makefile Tue Aug 20 17:36:20 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.204 2013/07/29 21:02:58 joerg Exp $ +# $NetBSD: Makefile,v 1.205 2013/08/20 17:36:20 matt Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -33,7 +33,7 @@ SUBDIR+= i18n_module SUBDIR+= libarch \ libbluetooth libbsdmalloc libbz2 \ libcompat libcrypt \ - libintl libipsec libisns libkvm libm \ + libintl libipsec libisns libkern libkvm libm \ libossaudio libpci libpmc libposix libprop libpthread \ libpthread_dbg libpuffs libresolv librmt librpcsvc librt \ libtelnet libterminfo \
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: matt Date: Tue Aug 20 17:43:47 UTC 2013 Modified Files: src/distrib/sets/lists/comp: mi Log Message: We provide ./usr/lib/libkern.a now To generate a diff of this commit: cvs rdiff -u -r1.1832 -r1.1833 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1832 src/distrib/sets/lists/comp/mi:1.1833 --- src/distrib/sets/lists/comp/mi:1.1832 Wed Aug 14 09:31:41 2013 +++ src/distrib/sets/lists/comp/mi Tue Aug 20 17:43:47 2013 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1832 2013/08/14 09:31:41 pooka Exp $ +# $NetBSD: mi,v 1.1833 2013/08/20 17:43:47 matt Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2999,6 +2999,7 @@ ./usr/lib/libkdb_p.acomp-obsolete obsolete ./usr/lib/libkdc.acomp-krb5-lib kerberos ./usr/lib/libkdc_p.acomp-krb5-proflib profile,kerberos +./usr/lib/libkern.acomp-c-lib ./usr/lib/libkrb.acomp-obsolete obsolete ./usr/lib/libkrb5.acomp-krb5-lib kerberos ./usr/lib/libkrb5_p.acomp-krb5-proflib profile,kerberos
CVS commit: src/lib/libkern
Module Name:src Committed By: matt Date: Tue Aug 20 17:41:58 UTC 2013 Modified Files: src/lib/libkern: Makefile Log Message: remove some dead rules. Use ln -sf To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkern/Makefile diff -u src/lib/libkern/Makefile:1.1 src/lib/libkern/Makefile:1.2 --- src/lib/libkern/Makefile:1.1 Tue Aug 20 17:35:41 2013 +++ src/lib/libkern/Makefile Tue Aug 20 17:41:58 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/08/20 17:35:41 matt Exp $ +# $NetBSD: Makefile,v 1.2 2013/08/20 17:41:58 matt Exp $ WITHOUT_MAN=true # defined @@ -29,13 +29,16 @@ CWARNFLAGS+= -Wall -Wmissing-prototypes .NOPATH: machine .endif -realdepend realall: machine +realdepend realall: machine .WAIT CLEANFILES+= ${MACHINE_CPU} machine machine:: - -rm -f ${MACHINE_CPU} machine - ln -s ${S}/arch/${MACHINE}/include machine - ln -s ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} +.if ${MACHINE_CPU} == "arm" + ln -sf ${S}/arch/${MACHINE_CPU}/include machine +.else + ln -sf ${S}/arch/${MACHINE}/include machine +.endif + ln -sf ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} ${OBJS}: machine @@ -50,11 +53,6 @@ KERNDIR= ${S}/lib/libkern @false .endif -cleandir distclean: .WAIT cleanlibdir - -cleanlibdir: - -rm -rf lib - .include lib${LIB}.o:: ${OBJS}
CVS commit: src/lib/libkern
Module Name:src Committed By: matt Date: Tue Aug 20 18:06:03 UTC 2013 Modified Files: src/lib/libkern: Makefile Log Message: Add LIBISPRIVATE?=yes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkern/Makefile diff -u src/lib/libkern/Makefile:1.2 src/lib/libkern/Makefile:1.3 --- src/lib/libkern/Makefile:1.2 Tue Aug 20 17:41:58 2013 +++ src/lib/libkern/Makefile Tue Aug 20 18:06:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/08/20 17:41:58 matt Exp $ +# $NetBSD: Makefile,v 1.3 2013/08/20 18:06:03 matt Exp $ WITHOUT_MAN=true # defined @@ -6,6 +6,7 @@ WITHOUT_MAN=true # defined .include LIB= kern +LIBISPRIVATE?= yes DBG= -Os MKDEBUGLIB:=no
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: matt Date: Tue Aug 20 18:05:03 UTC 2013 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Don't install libkern.a To generate a diff of this commit: cvs rdiff -u -r1.1833 -r1.1834 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1833 src/distrib/sets/lists/comp/mi:1.1834 --- src/distrib/sets/lists/comp/mi:1.1833 Tue Aug 20 17:43:47 2013 +++ src/distrib/sets/lists/comp/mi Tue Aug 20 18:05:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1833 2013/08/20 17:43:47 matt Exp $ +# $NetBSD: mi,v 1.1834 2013/08/20 18:05:03 matt Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2999,7 +2999,6 @@ ./usr/lib/libkdb_p.acomp-obsolete obsolete ./usr/lib/libkdc.acomp-krb5-lib kerberos ./usr/lib/libkdc_p.acomp-krb5-proflib profile,kerberos -./usr/lib/libkern.acomp-c-lib ./usr/lib/libkrb.acomp-obsolete obsolete ./usr/lib/libkrb5.acomp-krb5-lib kerberos ./usr/lib/libkrb5_p.acomp-krb5-proflib profile,kerberos
CVS commit: src/sys/arch/sparc64
Module Name:src Committed By: macallan Date: Tue Aug 20 19:19:23 UTC 2013 Modified Files: src/sys/arch/sparc64/dev: psycho.c psychoreg.h psychovar.h src/sys/arch/sparc64/include: cpu.h src/sys/arch/sparc64/sparc64: clock.c cpu.c Log Message: support UltraSPARC-IIe STICK counter as time base To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc64/dev/psycho.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc64/dev/psychoreg.h \ src/sys/arch/sparc64/dev/psychovar.h cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sparc64/include/cpu.h cvs rdiff -u -r1.108 -r1.109 src/sys/arch/sparc64/sparc64/clock.c cvs rdiff -u -r1.103 -r1.104 src/sys/arch/sparc64/sparc64/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/dev/psycho.c diff -u src/sys/arch/sparc64/dev/psycho.c:1.113 src/sys/arch/sparc64/dev/psycho.c:1.114 --- src/sys/arch/sparc64/dev/psycho.c:1.113 Fri Jun 21 20:09:58 2013 +++ src/sys/arch/sparc64/dev/psycho.c Tue Aug 20 19:19:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: psycho.c,v 1.113 2013/06/21 20:09:58 nakayama Exp $ */ +/* $NetBSD: psycho.c,v 1.114 2013/08/20 19:19:23 macallan Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.113 2013/06/21 20:09:58 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.114 2013/08/20 19:19:23 macallan Exp $"); #include "opt_ddb.h" @@ -70,6 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1 #define PDB_INTR 0x04 #define PDB_INTMAP 0x08 #define PDB_CONF 0x10 +#define PDB_STICK 0x20 int psycho_debug = 0x0; #define DPRINTF(l, s) do { if (psycho_debug & l) printf s; } while (0) #else @@ -220,6 +221,8 @@ struct psycho_names { { NULL, 0 } }; +struct psycho_softc *psycho0 = NULL; + static int psycho_match(device_t parent, cfdata_t match, void *aux) { @@ -307,7 +310,11 @@ psycho_attach(device_t parent, device_t sc->sc_node = ma->ma_node; sc->sc_bustag = ma->ma_bustag; sc->sc_dmatag = ma->ma_dmatag; + sc->sc_last_stick = 0; + if (psycho0 == NULL) + psycho0 = sc; + DPRINTF(PDB_STICK, ("init psycho0 %lx\n", (long)sc)); /* * Identify the device. */ @@ -375,6 +382,7 @@ found: ma->ma_address[0], &sc->sc_bh); sc->sc_regs = (struct psychoreg *) bus_space_vaddr(sc->sc_bustag, sc->sc_bh); + bus_space_subregion(sc->sc_bustag, sc->sc_bh, offsetof(struct psychoreg, psy_pcictl), sizeof(struct pci_ctl), &pci_ctl); @@ -397,7 +405,6 @@ found: ma->ma_nreg); } - csr = bus_space_read_8(sc->sc_bustag, sc->sc_bh, offsetof(struct psychoreg, psy_csr)); sc->sc_ign = 0x7c0; /* APB IGN is always 0x7c */ @@ -1510,3 +1517,67 @@ psycho_sabre_dmamap_sync(bus_dma_tag_t t } bus_dmamap_sync(t->_parent, map, offset, len, ops); } + +/* US-IIe STICK support */ + +long +psycho_getstick(void) +{ + long foo; + + foo = bus_space_read_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CNT_LOW) | + (bus_space_read_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CNT_HIGH) & 0x7fff) << 32; + return foo; +} + +void +psycho_setstick(long cnt) +{ + + /* + * looks like we can't actually write the STICK counter, so instead we + * prepare sc_last_stick for the coming interrupt setup + */ +#if 0 + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CNT_HIGH, (cnt >> 32)); + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CNT_LOW, (uint32_t)(cnt & 0x)); +#endif + + if (cnt == 0) { + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CMP_HIGH, 0); + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CMP_LOW, 0); + psycho0->sc_last_stick = 0; + } + + psycho0->sc_last_stick = psycho_getstick(); + DPRINTF(PDB_STICK, ("stick: %ld\n", psycho0->sc_last_stick)); +} + +void +psycho_nextstick(long diff) +{ + uint64_t cmp, now; + + /* + * there is no way we'll ever overflow + * the counter is 63 bits wide, at 12MHz that's >24000 years + */ + now = psycho_getstick() + 1000; + cmp = psycho0->sc_last_stick; + + while (cmp < now) + cmp += diff; + + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CMP_HIGH, (cmp >> 32) & 0x7fff); + bus_space_write_8(psycho0->sc_bustag, psycho0->sc_bh, + STICK_CMP_LOW, (cmp & 0x)); + + psycho0->sc_last_stick = cmp; +} Index: src/sys/arch/sparc64/dev/psychoreg.h diff -u src/sys/arch/sparc64/dev/psychoreg.h:1.18 src/sys/arch/sparc64/dev/psychoreg.h:1.19 --- src/sys/arch/sparc64/dev/psychoreg.h:1.18 Tue Aug 20 10:33:03 2013 +++ src/sys/arch/sparc64/dev/psychoreg.h Tue Aug 20 19:19:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: psychoreg.h,v 1.18 2013/08/20 10:33:03 macallan Exp $ */ +/* $NetBSD: psychoreg.h,v 1.19 2013/08/20 19:19:23 macallan Exp $ */ /* * Copyright (c) 1999 Matthew R. Green @@ -249,11 +249,11 @@ struct psychoreg { /* 1fe..d0
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Tue Aug 20 19:58:30 UTC 2013 Modified Files: src/lib/libc/citrus: citrus_lc_ctype.c src/lib/libc/locale: global_locale.c nb_lc_messages_misc.h nb_lc_monetary_misc.h nb_lc_numeric_misc.h nb_lc_time_misc.h nl_langinfo.c setlocale_local.h Log Message: Extract the data for nl_langinfo directly from the corresponding part implementation using a category/offset table. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/citrus/citrus_lc_ctype.c cvs rdiff -u -r1.19 -r1.20 src/lib/libc/locale/global_locale.c cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/nb_lc_messages_misc.h \ src/lib/libc/locale/nb_lc_monetary_misc.h \ src/lib/libc/locale/nb_lc_numeric_misc.h cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/nb_lc_time_misc.h cvs rdiff -u -r1.16 -r1.17 src/lib/libc/locale/nl_langinfo.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/locale/setlocale_local.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/libc/citrus/citrus_lc_ctype.c diff -u src/lib/libc/citrus/citrus_lc_ctype.c:1.13 src/lib/libc/citrus/citrus_lc_ctype.c:1.14 --- src/lib/libc/citrus/citrus_lc_ctype.c:1.13 Mon Aug 19 22:43:28 2013 +++ src/lib/libc/citrus/citrus_lc_ctype.c Tue Aug 20 19:58:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_lc_ctype.c,v 1.13 2013/08/19 22:43:28 joerg Exp $ */ +/* $NetBSD: citrus_lc_ctype.c,v 1.14 2013/08/20 19:58:30 joerg Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -28,7 +28,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: citrus_lc_ctype.c,v 1.13 2013/08/19 22:43:28 joerg Exp $"); +__RCSID("$NetBSD: citrus_lc_ctype.c,v 1.14 2013/08/20 19:58:30 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "reentrant.h" @@ -100,10 +100,7 @@ _PREFIX(build_cache)(struct _locale_cach _RuneLocale * __restrict data) { _DIAGASSERT(cache != NULL); - _DIAGASSERT(cache->items != NULL); _DIAGASSERT(data != NULL); - - cache->items[(size_t)CODESET] = data->rl_codeset; } static __inline void Index: src/lib/libc/locale/global_locale.c diff -u src/lib/libc/locale/global_locale.c:1.19 src/lib/libc/locale/global_locale.c:1.20 --- src/lib/libc/locale/global_locale.c:1.19 Mon Aug 19 22:43:28 2013 +++ src/lib/libc/locale/global_locale.c Tue Aug 20 19:58:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: global_locale.c,v 1.19 2013/08/19 22:43:28 joerg Exp $ */ +/* $NetBSD: global_locale.c,v 1.20 2013/08/20 19:58:30 joerg Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -28,7 +28,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: global_locale.c,v 1.19 2013/08/19 22:43:28 joerg Exp $"); +__RCSID("$NetBSD: global_locale.c,v 1.20 2013/08/20 19:58:30 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -137,69 +137,8 @@ static const struct lconv _C_ldata = { .int_n_sign_posn = NBCHAR_MAX, }; -static const char * const _C_items [(size_t)ALT_DIGITS + 1] = { - [(size_t)D_T_FMT] = "%a %b %e %H:%M:%S %Y", - [(size_t)D_FMT ] = "%m/%d/%y", - [(size_t)T_FMT ] = "%H:%M:%S", - [(size_t)T_FMT_AMPM ] = "%I:%M:%S %p", - [(size_t)AM_STR ] = "AM", - [(size_t)PM_STR ] = "PM", - [(size_t)DAY_1 ] = "Sun", - [(size_t)DAY_2 ] = "Mon", - [(size_t)DAY_3 ] = "Tue", - [(size_t)DAY_4 ] = "Wed", - [(size_t)DAY_5 ] = "Thu", - [(size_t)DAY_6 ] = "Fri", - [(size_t)DAY_7 ] = "Sat", - [(size_t)ABDAY_1] = "Sunday", - [(size_t)ABDAY_2] = "Monday", - [(size_t)ABDAY_3] = "Tuesday", - [(size_t)ABDAY_4] = "Wednesday", - [(size_t)ABDAY_5] = "Thursday", - [(size_t)ABDAY_6] = "Friday", - [(size_t)ABDAY_7] = "Saturday", - [(size_t)MON_1 ] = "Jan", - [(size_t)MON_2 ] = "Feb", - [(size_t)MON_3 ] = "Mar", - [(size_t)MON_4 ] = "Apr", - [(size_t)MON_5 ] = "May", - [(size_t)MON_6 ] = "Jun", - [(size_t)MON_7 ] = "Jul", - [(size_t)MON_8 ] = "Aug", - [(size_t)MON_9 ] = "Sep", - [(size_t)MON_10 ] = "Oct", - [(size_t)MON_11 ] = "Nov", - [(size_t)MON_12 ] = "Dec", - [(size_t)ABMON_1] = "January", - [(size_t)ABMON_2] = "February", - [(size_t)ABMON_3] = "March", - [(size_t)ABMON_4] = "April", - [(size_t)ABMON_5] = "May", - [(size_t)ABMON_6] = "June", - [(size_t)ABMON_7] = "July", - [(size_t)ABMON_8] = "August", - [(size_t)ABMON_9] = "September", - [(size_t)ABMON_10 ] = "October", - [(size_t)ABMON_11 ] = "November", - [(size_t)ABMON_12 ] = "December", - [(size_t)RADIXCHAR ] = ".", - [(size_t)THOUSEP] = "", - [(size_t)YESSTR ] = "yes", - [(size_t)YESEXPR] = "^[Yy]", - [(size_t)NOSTR ] = "no", - [(size_t)NOEXPR ] = "^[Nn]", - [(size_t)CRNCYSTR ] = NULL, - [(size_t)CODESET] = "646", - [(size_t)ERA] = NULL, - [(size_t)ERA_D_FMT ] = NULL, - [(size_t)ERA_D_T_FMT] = NULL, - [(size_
CVS commit: src/lib/libkern
Module Name:src Committed By: matt Date: Tue Aug 20 20:54:35 UTC 2013 Modified Files: src/lib/libkern: Makefile Log Message: Add links for various directories needs by amd64/sparc64/i386/sun2/m68000 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkern/Makefile diff -u src/lib/libkern/Makefile:1.3 src/lib/libkern/Makefile:1.4 --- src/lib/libkern/Makefile:1.3 Tue Aug 20 18:06:03 2013 +++ src/lib/libkern/Makefile Tue Aug 20 20:54:35 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/08/20 18:06:03 matt Exp $ +# $NetBSD: Makefile,v 1.4 2013/08/20 20:54:35 matt Exp $ WITHOUT_MAN=true # defined @@ -9,12 +9,6 @@ LIB= kern LIBISPRIVATE?= yes DBG= -Os -MKDEBUGLIB:=no -MKLINT:=no -MKPICINSTALL:= no -MKPIC:= no -MKPROFILE:= no - S= ${NETBSDSRCDIR}/sys CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} -I${S}/arch @@ -33,12 +27,28 @@ CWARNFLAGS+= -Wall -Wmissing-prototypes realdepend realall: machine .WAIT CLEANFILES+= ${MACHINE_CPU} machine +ARCHDIRS.i386= x86 +ARCHDIRS.m68000= m68k +ARCHDIRS.sparc64= sparc +ARCHDIRS.x86_64= x86 +MACHDIRS.sun2= sun68k + machine:: .if ${MACHINE_CPU} == "arm" ln -sf ${S}/arch/${MACHINE_CPU}/include machine .else ln -sf ${S}/arch/${MACHINE}/include machine .endif +.if !empty(ARCHDIRS.${MACHINE_ARCH}) +.for d in ${ARCHDIRS.${MACHINE_ARCH}} + ln -sf ${S}/arch/${d}/include ${d} +.endfor +.endif +.if !empty(MACHDIRS.${MACHINE}) +.for d in ${MACHDIRS.${MACHINE}} + ln -sf ${S}/arch/${d}/include ${d} +.endfor +.endif ln -sf ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} ${OBJS}: machine
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:08:54 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat.S Log Message: strlcat_arm.S is smaller than strlcat_naive.S so always use it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat.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/string/strlcat.S diff -u src/common/lib/libc/arch/arm/string/strlcat.S:1.1 src/common/lib/libc/arch/arm/string/strlcat.S:1.2 --- src/common/lib/libc/arch/arm/string/strlcat.S:1.1 Wed Jan 23 07:56:09 2013 +++ src/common/lib/libc/arch/arm/string/strlcat.S Tue Aug 20 21:08:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: strlcat.S,v 1.1 2013/01/23 07:56:09 matt Exp $ */ +/* $NetBSD: strlcat.S,v 1.2 2013/08/20 21:08:54 matt Exp $ */ #include @@ -7,7 +7,7 @@ WEAK_ALIAS(strlcat, _strlcat) #include "namespace.h" #endif -#ifdef _STANDALONE +#if defined(_STANDALONE) && 0 /* arm version is always smaller */ #include "strlcat_naive.S" #else #include "strlcat_arm.S"
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:32:50 UTC 2013 Added Files: src/common/lib/libc/arch/arm/string: strcpy_thumb.S Log Message: Thumb versions of strcpy/strlcpy/strncpy To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/strcpy_thumb.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/common/lib/libc/arch/arm/string/strcpy_thumb.S diff -u /dev/null src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.1 --- /dev/null Tue Aug 20 21:32:50 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_thumb.S Tue Aug 20 21:32:50 2013 @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2013 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. + */ +#include + +RCSID("$NetBSD: strcpy_thumb.S,v 1.1 2013/08/20 21:32:50 matt Exp $") + +#ifdef _LIBC +#ifdef STRLCPY +WEAK_ALIAS(strlcpy, _strlcpy) +#endif +#include "namespace.h" +#endif + +/* + * These are "naive" versions of the str*cpy routines designed to be simple + * and small. + */ + +#if defined(STRLCPY) +/* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ +ENTRY(strlcpy) + adds r3, r1, #1 /* save src pointer (+ NUL) */ + subs r2, r2, #1 /* make sure there's room for a NUL */ + blt 3f /* no room, do the strlen */ + adds r2, r2, r0 /* get end of dst */ + subs r0, r0, r1 /* bias against r1 so one incr */ +1: cmp r0, r2 /* room for another char? */ + beq 2f /* no, write NUL and do the strlen */ + ldrb r3, [r1] /* read a byte */ + strb r3, [r0, r1] /* write a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, do next byte */ + b 4f /* yes, end of string, so return */ +2: movs r3, #0 /* NUL */ + strb r3, [r0] /* write to end of string */ +3: ldrb r3, [r1] /* read a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 3b /* no, get next byte */ +4: subs r0, r1, r3 /* return length of src string */ + RET +END(strlcpy) +#elif defined(STRNCPY) +/* LINTSTUB: char * strncpy(char *, const char *, size_t) */ +ENTRY(strncpy) + mov ip, r0 /* we want to preserve r0 */ + adds r2, r2, r0 /* get end of dst buffer */ + subs r1, r1, r0 /* allows to only increment once */ +1: cmp r0, r2 /* are at the end of dst already? */ + beq 3f /* yes, just return. */ + ldrb r3, [r1, r0] /* read a byte */ + strb r3, [r0] /* write a byte */ + adds r0, r0, #1 /* advance a byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, try next byte */ +2: cmp r0, r2 /* are at the end of dst already? */ + beq 3f /* yes, exit loop + strb r3, [r0] /* write a NUL */ + adds r0, r0, #1 /* advance a bytes */ + b 2b /* until dst is filled */ +3: mov r0, ip /* return dst pointer */ + RET +END(strncpy) +#else +/* LINTSTUB: char * strcpy(char *, const char *) */ +ENTRY(strcpy) + subs r2, r0, r1 /* we want to preserve r0 */ +1: ldrb r3, [r1] /* read a byte */ + strb r3, [r2, r1] /* write a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, try next byte */ + RET/* return dst pointer */ +END(strcpy) +#endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:35:24 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy.S strlcpy.S strncpy.S Log Message: If compiling standalone with Thumb, use the thumb version instead of the naive version. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy.S \ src/common/lib/libc/arch/arm/string/strlcpy.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strncpy.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/string/strcpy.S diff -u src/common/lib/libc/arch/arm/string/strcpy.S:1.4 src/common/lib/libc/arch/arm/string/strcpy.S:1.5 --- src/common/lib/libc/arch/arm/string/strcpy.S:1.4 Thu Jan 10 02:13:49 2013 +++ src/common/lib/libc/arch/arm/string/strcpy.S Tue Aug 20 21:35:24 2013 @@ -1,7 +1,11 @@ -/* $NetBSD: strcpy.S,v 1.4 2013/01/10 02:13:49 matt Exp $ */ +/* $NetBSD: strcpy.S,v 1.5 2013/08/20 21:35:24 matt Exp $ */ #if defined(_STANDALONE) +#ifdef __thumb__ +#include "strcpy_thumb.S" +#else #include "strcpy_naive.S" +#endif #else #include "strcpy_arm.S" #endif Index: src/common/lib/libc/arch/arm/string/strlcpy.S diff -u src/common/lib/libc/arch/arm/string/strlcpy.S:1.4 src/common/lib/libc/arch/arm/string/strlcpy.S:1.5 --- src/common/lib/libc/arch/arm/string/strlcpy.S:1.4 Thu Jan 10 06:52:35 2013 +++ src/common/lib/libc/arch/arm/string/strlcpy.S Tue Aug 20 21:35:24 2013 @@ -1,9 +1,13 @@ -/* $NetBSD: strlcpy.S,v 1.4 2013/01/10 06:52:35 matt Exp $ */ +/* $NetBSD: strlcpy.S,v 1.5 2013/08/20 21:35:24 matt Exp $ */ #define STRLCPY #if defined(_STANDALONE) +#if defined(__thumb__) +#include "strcpy_thumb.S" +#else #include "strcpy_naive.S" +#endif #else #include "strcpy_arm.S" #endif Index: src/common/lib/libc/arch/arm/string/strncpy.S diff -u src/common/lib/libc/arch/arm/string/strncpy.S:1.2 src/common/lib/libc/arch/arm/string/strncpy.S:1.3 --- src/common/lib/libc/arch/arm/string/strncpy.S:1.2 Thu Jan 10 02:13:49 2013 +++ src/common/lib/libc/arch/arm/string/strncpy.S Tue Aug 20 21:35:24 2013 @@ -1,9 +1,13 @@ -/* $NetBSD: strncpy.S,v 1.2 2013/01/10 02:13:49 matt Exp $ */ +/* $NetBSD: strncpy.S,v 1.3 2013/08/20 21:35:24 matt Exp $ */ #define STRNCPY #if defined(_STANDALONE) +#if defined(__thumb__) +#include "strcpy_thumb.S" +#else #include "strcpy_naive.S" +#endif #else #include "strcpy_arm.S" #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:37:39 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: write of final NUL in strlcpy doesn't need to be post-incremented To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_naive.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/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.4 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3 Sun Aug 11 05:02:35 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Tue Aug 20 21:37:39 2013 @@ -28,7 +28,7 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.3 2013/08/11 05:02:35 matt Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.4 2013/08/20 21:37:39 matt Exp $") #ifdef _LIBC #ifdef STRLCPY @@ -57,7 +57,7 @@ ENTRY(strlcpy) bne 1b /* no, do next byte */ b 4f /* yes, end of string, so return */ 2: mov r3, #0 /* NUL */ - strb r3, [r0], #1 /* write to end of string */ + strb r3, [r0] /* write to end of string */ 3: ldrb r3, [r1], #1 /* read a byte */ teq r3, #0 /* was it a NUL? */ bne 3b /* no, get next byte */
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Tue Aug 20 21:43:03 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: Some assembly files need to compiled -marm since they are Thumb compatible. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.19 src/sys/lib/libkern/arch/arm/Makefile.inc:1.20 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.19 Mon Aug 12 23:22:12 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Tue Aug 20 21:43:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.19 2013/08/12 23:22:12 matt Exp $ +# $NetBSD: Makefile.inc,v 1.20 2013/08/20 21:43:03 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S @@ -9,5 +9,17 @@ SRCS+= modsi3.S umodsi3.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= unwind_stub.c -.else +.endif +.if empty(MACHINE_ARCH:Mearmv7*) +CPUFLAGS.ffs.S+= -marm +.endif +CPUFLAGS.divide.S+= -marm +CPUFLAGS.memcmp.S+= -marm +CPUFLAGS.memcpy.S+= -marm +CPUFLAGS.memmove.S+= -marm +CPUFLAGS.memset.S+= -marm +.if empty(CPPFLAGS:M-D_STANDALONE) +CPUFLAGS.strcpy.S+= -marm +CPUFLAGS.strlcpy.S+= -marm +CPUFLAGS.strncpy.S+= -marm .endif
CVS commit: src/lib/libpam/modules/pam_deny
Module Name:src Committed By: perseant Date: Tue Aug 20 22:07:44 UTC 2013 Modified Files: src/lib/libpam/modules/pam_deny: pam_deny.8 pam_deny.c Log Message: Add Edgar Fuss's patch to pam_deny, to allow users to be able to change their LDAP password with "passwd". To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libpam/modules/pam_deny/pam_deny.8 cvs rdiff -u -r1.2 -r1.3 src/lib/libpam/modules/pam_deny/pam_deny.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/modules/pam_deny/pam_deny.8 diff -u src/lib/libpam/modules/pam_deny/pam_deny.8:1.3 src/lib/libpam/modules/pam_deny/pam_deny.8:1.4 --- src/lib/libpam/modules/pam_deny/pam_deny.8:1.3 Sat Feb 26 14:54:25 2005 +++ src/lib/libpam/modules/pam_deny/pam_deny.8 Tue Aug 20 22:07:44 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: pam_deny.8,v 1.3 2005/02/26 14:54:25 thorpej Exp $ +.\" $NetBSD: pam_deny.8,v 1.4 2013/08/20 22:07:44 perseant Exp $ .\" Copyright (c) 2001 Mark R V Murray .\" All rights reserved. .\" @@ -73,6 +73,17 @@ suppress warning messages to the user. These messages include reasons why the user's authentication attempt was declined. +.It Cm prelim_ignore +for password management ( +.Dq Li password +feature), return PAM_IGNORE +in the preliminary phase. +This allows the module to be used (with the +.Dq Li required +flag) at the end of a chain of +.Dq Li sufficient +modules with this service +(where the entire chain is in fact run twice). .El .Sh SEE ALSO .Xr syslog 3 , Index: src/lib/libpam/modules/pam_deny/pam_deny.c diff -u src/lib/libpam/modules/pam_deny/pam_deny.c:1.2 src/lib/libpam/modules/pam_deny/pam_deny.c:1.3 --- src/lib/libpam/modules/pam_deny/pam_deny.c:1.2 Sun Dec 12 08:18:44 2004 +++ src/lib/libpam/modules/pam_deny/pam_deny.c Tue Aug 20 22:07:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_deny.c,v 1.2 2004/12/12 08:18:44 christos Exp $ */ +/* $NetBSD: pam_deny.c,v 1.3 2013/08/20 22:07:44 perseant Exp $ */ /*- * Copyright 2001 Mark R V Murray @@ -30,10 +30,12 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_deny/pam_deny.c,v 1.9 2002/04/12 22:27:19 des Exp $"); #else -__RCSID("$NetBSD: pam_deny.c,v 1.2 2004/12/12 08:18:44 christos Exp $"); +__RCSID("$NetBSD: pam_deny.c,v 1.3 2013/08/20 22:07:44 perseant Exp $"); #endif #include +#include +#include #define PAM_SM_AUTH #define PAM_SM_ACCOUNT @@ -61,7 +63,7 @@ pam_sm_setcred(pam_handle_t *pamh __unus int argc __unused, const char *argv[] __unused) { - return (PAM_AUTH_ERR); + return (PAM_CRED_ERR); } PAM_EXTERN int @@ -73,11 +75,25 @@ pam_sm_acct_mgmt(pam_handle_t *pamh __un } PAM_EXTERN int -pam_sm_chauthtok(pam_handle_t *pamh __unused, int flags __unused, -int argc __unused, const char *argv[] __unused) +pam_sm_chauthtok(pam_handle_t *pamh __unused, int flags, +int argc, const char *argv[]) { + int prelim_ignore = 0, debug = 0; + int i; - return (PAM_AUTH_ERR); + for (i = 0; i < argc; i++) { + if (strcmp(argv[i], "prelim_ignore") == 0) + prelim_ignore = 1; + else if (strcmp(argv[i], "debug") == 0) + debug = 1; + else + syslog(LOG_ERR, "illegal option %s", argv[i]); + } + + if (flags & PAM_PRELIM_CHECK && prelim_ignore) + return (PAM_IGNORE); + else + return (PAM_AUTHTOK_ERR); } PAM_EXTERN int @@ -85,7 +101,7 @@ pam_sm_open_session(pam_handle_t *pamh _ int argc __unused, const char *argv[] __unused) { - return (PAM_AUTH_ERR); + return (PAM_SESSION_ERR); } PAM_EXTERN int @@ -93,7 +109,7 @@ pam_sm_close_session(pam_handle_t *pamh int argc __unused, const char *argv[] __unused) { - return (PAM_AUTH_ERR); + return (PAM_SESSION_ERR); } PAM_MODULE_ENTRY("pam_deny");
CVS commit: src/lib/libpam/modules/pam_deny
Module Name:src Committed By: wiz Date: Tue Aug 20 22:44:38 UTC 2013 Modified Files: src/lib/libpam/modules/pam_deny: pam_deny.8 Log Message: Whitespace and markup improvements. Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libpam/modules/pam_deny/pam_deny.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/modules/pam_deny/pam_deny.8 diff -u src/lib/libpam/modules/pam_deny/pam_deny.8:1.4 src/lib/libpam/modules/pam_deny/pam_deny.8:1.5 --- src/lib/libpam/modules/pam_deny/pam_deny.8:1.4 Tue Aug 20 22:07:44 2013 +++ src/lib/libpam/modules/pam_deny/pam_deny.8 Tue Aug 20 22:44:37 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: pam_deny.8,v 1.4 2013/08/20 22:07:44 perseant Exp $ +.\" $NetBSD: pam_deny.8,v 1.5 2013/08/20 22:44:37 wiz Exp $ .\" Copyright (c) 2001 Mark R V Murray .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" .\" $FreeBSD: src/lib/libpam/modules/pam_deny/pam_deny.8,v 1.4 2001/08/15 20:05:30 markm Exp $ .\" -.Dd July 7, 2001 +.Dd August 21, 2013 .Dt PAM_DENY 8 .Os .Sh NAME @@ -74,9 +74,10 @@ These messages include reasons why the user's authentication attempt was declined. .It Cm prelim_ignore -for password management ( -.Dq Li password -feature), return PAM_IGNORE +for password management +.Dq ( Li password +feature), return +.Dv PAM_IGNORE in the preliminary phase. This allows the module to be used (with the .Dq Li required
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Tue Aug 20 23:19:28 UTC 2013 Modified Files: src/lib/libc: Makefile.inc Log Message: Disable -w for lint again. It clearly creates more issues than it ever solved. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/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/lib/libc/Makefile.inc diff -u src/lib/libc/Makefile.inc:1.14 src/lib/libc/Makefile.inc:1.15 --- src/lib/libc/Makefile.inc:1.14 Wed Mar 21 14:52:40 2012 +++ src/lib/libc/Makefile.inc Tue Aug 20 23:19:28 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2012/03/21 14:52:40 christos Exp $ +# $NetBSD: Makefile.inc,v 1.15 2013/08/20 23:19:28 joerg Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -42,7 +42,7 @@ CPPFLAGS+= -DYP .endif # Set lint to exit on warnings -LINTFLAGS+= -w +#LINTFLAGS+= -w # ignore 'empty translation unit' warnings. LINTFLAGS+= -X 272
CVS commit: src/common/lib/libc/atomic
Module Name:src Committed By: matt Date: Wed Aug 21 03:00:56 UTC 2013 Modified Files: src/common/lib/libc/atomic: atomic_init_cas.c atomic_init_testset.c Log Message: Use __section(".test.startup") for the init routines To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/atomic/atomic_init_cas.c cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/atomic/atomic_init_testset.c 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/atomic/atomic_init_cas.c diff -u src/common/lib/libc/atomic/atomic_init_cas.c:1.3 src/common/lib/libc/atomic/atomic_init_cas.c:1.4 --- src/common/lib/libc/atomic/atomic_init_cas.c:1.3 Mon Apr 28 20:22:53 2008 +++ src/common/lib/libc/atomic/atomic_init_cas.c Wed Aug 21 03:00:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_init_cas.c,v 1.3 2008/04/28 20:22:53 martin Exp $ */ +/* $NetBSD: atomic_init_cas.c,v 1.4 2013/08/21 03:00:56 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,11 +32,11 @@ */ #include -__RCSID("$NetBSD: atomic_init_cas.c,v 1.3 2008/04/28 20:22:53 martin Exp $"); +__RCSID("$NetBSD: atomic_init_cas.c,v 1.4 2013/08/21 03:00:56 matt Exp $"); void __libc_atomic_init(void) __attribute__ ((visibility("hidden"))); -void +void __section(".text.startup") __libc_atomic_init(void) { Index: src/common/lib/libc/atomic/atomic_init_testset.c diff -u src/common/lib/libc/atomic/atomic_init_testset.c:1.8 src/common/lib/libc/atomic/atomic_init_testset.c:1.9 --- src/common/lib/libc/atomic/atomic_init_testset.c:1.8 Tue Feb 28 20:41:19 2012 +++ src/common/lib/libc/atomic/atomic_init_testset.c Wed Aug 21 03:00:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_init_testset.c,v 1.8 2012/02/28 20:41:19 joerg Exp $ */ +/* $NetBSD: atomic_init_testset.c,v 1.9 2013/08/21 03:00:56 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: atomic_init_testset.c,v 1.8 2012/02/28 20:41:19 joerg Exp $"); +__RCSID("$NetBSD: atomic_init_testset.c,v 1.9 2013/08/21 03:00:56 matt Exp $"); #include "atomic_op_namespace.h" @@ -109,7 +109,7 @@ _atomic_cas_32(volatile uint32_t *ptr, u return (*_atomic_cas_fn)(ptr, old, new); } -void +void __section(".text.startup") __libc_atomic_init(void) { int ncpu, mib[2];
CVS commit: src/lib/csu/arch/earm
Module Name:src Committed By: matt Date: Wed Aug 21 03:03:02 UTC 2013 Modified Files: src/lib/csu/arch/earm: crt0.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/earm/crt0.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/csu/arch/earm/crt0.S diff -u src/lib/csu/arch/earm/crt0.S:1.1 src/lib/csu/arch/earm/crt0.S:1.2 --- src/lib/csu/arch/earm/crt0.S:1.1 Mon Aug 13 02:49:04 2012 +++ src/lib/csu/arch/earm/crt0.S Wed Aug 21 03:03:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: crt0.S,v 1.1 2012/08/13 02:49:04 matt Exp $ */ +/* $NetBSD: crt0.S,v 1.2 2013/08/21 03:03:02 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -RCSID("$NetBSD: crt0.S,v 1.1 2012/08/13 02:49:04 matt Exp $") +RCSID("$NetBSD: crt0.S,v 1.2 2013/08/21 03:03:02 matt Exp $") STRONG_ALIAS(_start,__start) @@ -44,7 +44,14 @@ _ENTRY(__start) mov r2, ip /* tmp -> ps_strings */ /* Ensure the stack is properly aligned before calling C code. */ +#if !defined(__thumb__) || defined(_ARM_ARCH_T2) bic sp, sp, #7 +#else + movs r6, #7 + mov r7, sp + bics r7, r7, r6 + mov sp, r7 +#endif /* * void ___start(void (*cleanup)(void),
CVS commit: src/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Wed Aug 21 03:05:35 UTC 2013 Modified Files: src/lib/libc/arch/arm/string: Makefile.inc Log Message: Add -marm to those sources who aren't thumb friendly. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/string/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/lib/libc/arch/arm/string/Makefile.inc diff -u src/lib/libc/arch/arm/string/Makefile.inc:1.8 src/lib/libc/arch/arm/string/Makefile.inc:1.9 --- src/lib/libc/arch/arm/string/Makefile.inc:1.8 Thu Jul 30 20:57:15 2009 +++ src/lib/libc/arch/arm/string/Makefile.inc Wed Aug 21 03:05:35 2013 @@ -1,5 +1,29 @@ -# $NetBSD: Makefile.inc,v 1.8 2009/07/30 20:57:15 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.9 2013/08/21 03:05:35 matt Exp $ -SRCS+= memcpy.S bcopy.S memmove.S memset.S bzero.S ffs.S strcmp.S -SRCS+= strncmp.S memcmp.S +SRCS.string+= memcmp.S memcpy.S memmove.S memset.S +SRCS.string+= ffs.S +SRCS.string+= bcopy.S bzero.S +SRCS.string+= strcat.S +SRCS.string+= strcpy.S strlcpy.S strncpy.S +.if empty(LIBC_MACHINE_ARCH:M*v7*) +SRCS.string+= strcmp.S strncmp.S +SRCS.string+= strlen.S strnlen.S +SRCS.string+= strchr.S strrchr.S +.endif +.for f in ${SRCS.string} +CPUFLAGS.${f}+= -marm +.for s in o po pico ln d +${f:.S=.${s}}: ${ARCHDIR}/string/Makefile.inc +.endfor +.endfor + +.if !empty(LIBC_MACHINE_ARCH:M*v7*) +SRCS.string+= strcmp.S strncmp.S +SRCS.string+= strlen.S strnlen.S +SRCS.string+= strchr.S strrchr.S +.endif + +SRCS.string+= strlcat.S + +SRCS+= ${SRCS.string}
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Wed Aug 21 03:09:08 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: If not earmv7, use -marm on all assembly files To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/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/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.23 src/lib/libc/arch/arm/Makefile.inc:1.24 --- src/lib/libc/arch/arm/Makefile.inc:1.23 Sun Aug 18 16:55:47 2013 +++ src/lib/libc/arch/arm/Makefile.inc Wed Aug 21 03:09:08 2013 @@ -1,9 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.23 2013/08/18 16:55:47 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.24 2013/08/21 03:09:08 matt Exp $ .include SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +.if empty(LIBC_MACHINE_ARCH:Mearmv7*) +AFLAGS+= -marm +.endif + CPPFLAGS += -I. .if !empty(LIBC_MACHINE_ARCH:Mearm*)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Aug 21 03:09:39 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: divide.S need -marm To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 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/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.24 src/lib/libc/arch/arm/gen/Makefile.inc:1.25 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.24 Thu Jun 20 17:53:01 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Wed Aug 21 03:09:39 2013 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.24 2013/06/20 17:53:01 msaitoh Exp $ +# $NetBSD: Makefile.inc,v 1.25 2013/08/21 03:09:39 matt Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ fabs.c flt_rounds.c udivsi3.S +CPUFLAGS.divide.S+= -marm + # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c SRCS+= fpclassifyf_ieee754.c fpclassifyd_ieee754.c
CVS commit: src/lib
Module Name:src Committed By: matt Date: Wed Aug 21 03:18:05 UTC 2013 Modified Files: src/lib: Makefile Log Message: Don't build compat versions libkern.a To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.206 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.205 src/lib/Makefile:1.206 --- src/lib/Makefile:1.205 Tue Aug 20 17:36:20 2013 +++ src/lib/Makefile Wed Aug 21 03:18:05 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.205 2013/08/20 17:36:20 matt Exp $ +# $NetBSD: Makefile,v 1.206 2013/08/21 03:18:05 matt Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -33,12 +33,16 @@ SUBDIR+= i18n_module SUBDIR+= libarch \ libbluetooth libbsdmalloc libbz2 \ libcompat libcrypt \ - libintl libipsec libisns libkern libkvm libm \ + libintl libipsec libisns libkvm libm \ libossaudio libpci libpmc libposix libprop libpthread \ libpthread_dbg libpuffs libresolv librmt librpcsvc librt \ libtelnet libterminfo \ libusbhid libutil libwrap liby libz +.if !defined(BSD_MK_COMPAT_FILE) +SUBDIR+= libkern +.endif + .if (${MACHINE_CPU} == "arm") LIBC_MACHINE_ARCH?=${MACHINE_ARCH} .if empty(LIBC_MACHINE_ARCH:M*hf*)
CVS commit: src/lib/libkern
Module Name:src Committed By: matt Date: Wed Aug 21 05:45:16 UTC 2013 Modified Files: src/lib/libkern: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkern/Makefile diff -u src/lib/libkern/Makefile:1.4 src/lib/libkern/Makefile:1.5 --- src/lib/libkern/Makefile:1.4 Tue Aug 20 20:54:35 2013 +++ src/lib/libkern/Makefile Wed Aug 21 05:45:16 2013 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2013/08/20 20:54:35 matt Exp $ +# $NetBSD: Makefile,v 1.5 2013/08/21 05:45:16 matt Exp $ WITHOUT_MAN=true # defined .include # Pull in OBJDIR name rules. .include +.include LIB= kern LIBISPRIVATE?= yes @@ -20,39 +21,6 @@ COPTS+= -fno-unwind-tables CWARNFLAGS+= -Werror CWARNFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -.if !make(obj) && !make(clean) && !make(cleandir) -.NOPATH: machine -.endif - -realdepend realall: machine .WAIT -CLEANFILES+= ${MACHINE_CPU} machine - -ARCHDIRS.i386= x86 -ARCHDIRS.m68000= m68k -ARCHDIRS.sparc64= sparc -ARCHDIRS.x86_64= x86 -MACHDIRS.sun2= sun68k - -machine:: -.if ${MACHINE_CPU} == "arm" - ln -sf ${S}/arch/${MACHINE_CPU}/include machine -.else - ln -sf ${S}/arch/${MACHINE}/include machine -.endif -.if !empty(ARCHDIRS.${MACHINE_ARCH}) -.for d in ${ARCHDIRS.${MACHINE_ARCH}} - ln -sf ${S}/arch/${d}/include ${d} -.endfor -.endif -.if !empty(MACHDIRS.${MACHINE}) -.for d in ${MACHDIRS.${MACHINE}} - ln -sf ${S}/arch/${d}/include ${d} -.endfor -.endif - ln -sf ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} - -${OBJS}: machine - ### find out what to use for libkern KERN_AS= library KERNDIR= ${S}/lib/libkern @@ -65,16 +33,3 @@ KERNDIR= ${S}/lib/libkern .endif .include - -lib${LIB}.o:: ${OBJS} - @echo building standard ${LIB} library - @rm -f lib${LIB}.o - @${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}` - -lib${LIB}.po:: ${POBJS} - @echo building profiled ${LIB} library - @rm -f lib${LIB}.po - @${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}` - -showsources: ${SRCS} - @echo ${.ALLSRC}
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: matt Date: Wed Aug 21 05:50:14 UTC 2013 Modified Files: src/sys/lib/libkern: Makefile Log Message: Simplify by using LIBISPRIVATE?= yes To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/lib/libkern/Makefile 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/Makefile diff -u src/sys/lib/libkern/Makefile:1.95 src/sys/lib/libkern/Makefile:1.96 --- src/sys/lib/libkern/Makefile:1.95 Sun Jan 18 20:42:11 2009 +++ src/sys/lib/libkern/Makefile Wed Aug 21 05:50:14 2013 @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.95 2009/01/18 20:42:11 he Exp $ +# $NetBSD: Makefile,v 1.96 2013/08/21 05:50:14 matt Exp $ LIB= kern -NOPIC= # defined -LLIBS= # defined +LIBISPRIVATE?= yes .include "Makefile.libkern" .ifndef ARCHSUBDIR @@ -11,10 +10,6 @@ LLIBS= # defined @false .endif -# only needed during build -libinstall:: - -.undef DESTDIR .include lib${LIB}.o:: ${OBJS}
CVS commit: src/sys/arch/evbarm/stand/gzboot
Module Name:src Committed By: matt Date: Wed Aug 21 05:55:26 UTC 2013 Modified Files: src/sys/arch/evbarm/stand/gzboot: Makefile.gzboot Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot 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/evbarm/stand/gzboot/Makefile.gzboot diff -u src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.24 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.25 --- src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.24 Thu Aug 15 21:41:09 2013 +++ src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot Wed Aug 21 05:55:26 2013 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile.gzboot,v 1.24 2013/08/15 21:41:09 matt Exp $ +# $NetBSD: Makefile.gzboot,v 1.25 2013/08/21 05:55:26 matt Exp $ NOMAN= # defined .include # Pull in OBJDIR name rules. .include +.include EVBARM_STAND= ${S}/arch/evbarm/stand @@ -60,20 +61,6 @@ CLEANFILES+= ${STARTFILE} vers.c ${BASE} CLEANFILES+= ${PROGSYM} SRCS+= vers.c -.if !make(obj) && !make(clean) && !make(cleandir) -.NOPATH: machine -.endif - -realdepend realall: machine -CLEANFILES+= arm machine - -machine:: - -rm -f arm machine - ln -s ${S}/arch/evbarm/include machine - ln -s ${S}/arch/arm/include arm - -${OBJS}: machine - ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc"
CVS commit: src/sys/arch/evbarm/stand/boot2440
Module Name:src Committed By: matt Date: Wed Aug 21 05:59:14 UTC 2013 Modified Files: src/sys/arch/evbarm/stand/boot2440: Makefile Log Message: Use DBG=-Os (instead of blank) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/stand/boot2440/Makefile 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/evbarm/stand/boot2440/Makefile diff -u src/sys/arch/evbarm/stand/boot2440/Makefile:1.10 src/sys/arch/evbarm/stand/boot2440/Makefile:1.11 --- src/sys/arch/evbarm/stand/boot2440/Makefile:1.10 Thu Aug 15 21:41:08 2013 +++ src/sys/arch/evbarm/stand/boot2440/Makefile Wed Aug 21 05:59:14 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2013/08/15 21:41:08 matt Exp $ +# $NetBSD: Makefile,v 1.11 2013/08/21 05:59:14 matt Exp $ S= ${.CURDIR}/../../../.. @@ -7,6 +7,7 @@ SRCS= entry.S main.c devopen.c netif.c SRCS+= s3csdi.c vers.c .include +.include CLEANFILES+= vers.c ${PROG}.elf CFLAGS+= -Wall -Wno-main -ffreestanding -fno-unwind-tables @@ -17,7 +18,7 @@ CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I CPPFLAGS+= -march=armv4 -mabi=apcs-gnu -mfloat-abi=soft CPPFLAGS+= -mno-thumb -mno-thumb-interwork CPUFLAGS= -DBG= +DBG= -Os LIBCRT0= # nothing LIBCRTBEGIN= # nothing @@ -32,14 +33,6 @@ BINMODE= 444 RELOC= 0x30A0 ENTRY= _start -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @[ -h machine ] || ln -s ${S}/arch/evbarm/include machine - @[ -h arm ] || ln -s ${S}/arch/arm/include arm -.NOPATH: machine arm -.endif -CLEANFILES+= machine arm - ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc"
CVS commit: src/sys/arch/acorn26/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:07:26 UTC 2013 Modified Files: src/sys/arch/acorn26/stand: Makefile.buildboot src/sys/arch/acorn26/stand/lib: riscoscalls.S Log Message: Unified syntax (remove uneeded lines) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/acorn26/stand/Makefile.buildboot cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn26/stand/lib/riscoscalls.S 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/acorn26/stand/Makefile.buildboot diff -u src/sys/arch/acorn26/stand/Makefile.buildboot:1.16 src/sys/arch/acorn26/stand/Makefile.buildboot:1.17 --- src/sys/arch/acorn26/stand/Makefile.buildboot:1.16 Thu Aug 15 21:41:08 2013 +++ src/sys/arch/acorn26/stand/Makefile.buildboot Wed Aug 21 06:07:26 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.16 2013/08/15 21:41:08 matt Exp $ +# $NetBSD: Makefile.buildboot,v 1.17 2013/08/21 06:07:26 matt Exp $ S?= ${.CURDIR}/../../../.. @@ -39,15 +39,6 @@ CFLAGS= -O2 CFLAGS+= -ffreestanding -fno-unwind-tables CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - -rm -f machine ${MACHINE_ARCH} - ln -s $S/arch/${MACHINE}/include machine - ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.endif - -CLEANFILES+= machine ${MACHINE_ARCH} - ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc" Index: src/sys/arch/acorn26/stand/lib/riscoscalls.S diff -u src/sys/arch/acorn26/stand/lib/riscoscalls.S:1.4 src/sys/arch/acorn26/stand/lib/riscoscalls.S:1.5 --- src/sys/arch/acorn26/stand/lib/riscoscalls.S:1.4 Thu Jul 20 23:35:20 2006 +++ src/sys/arch/acorn26/stand/lib/riscoscalls.S Wed Aug 21 06:07:26 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.S,v 1.4 2006/07/20 23:35:20 bjh21 Exp $ */ +/* $NetBSD: riscoscalls.S,v 1.5 2013/08/21 06:07:26 matt Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -92,7 +92,7 @@ ENTRY(xosargs_read) sub fp, ip, #4 mov r3, r2 swi OS_Args - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r3, #0 strne r2, [r3] mov r0, #0 @@ -151,7 +151,7 @@ ENTRY(xosfind_open) stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 swi XOS_Find - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r3, #0 strne r0, [r3] mov r0, #0 @@ -226,7 +226,7 @@ ENTRY(xos_swi_number_from_string) mov r2, r1 mov r1, r0 swi XOS_SWINumberFromString - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} str r0, [r2] mov r0, #0 ldmdb fp, {fp, sp, pc} @@ -311,7 +311,7 @@ ENTRY(xcache_control) stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 swi XCache_Control - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r2, #0 strne r0, [r2] mov r0, #0
CVS commit: src/sys/arch/vax/boot
Module Name:src Committed By: matt Date: Wed Aug 21 06:15:41 UTC 2013 Modified Files: src/sys/arch/vax/boot: Makefile.inc src/sys/arch/vax/boot/boot: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/boot/Makefile.inc cvs rdiff -u -r1.40 -r1.41 src/sys/arch/vax/boot/boot/Makefile 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/vax/boot/Makefile.inc diff -u src/sys/arch/vax/boot/Makefile.inc:1.15 src/sys/arch/vax/boot/Makefile.inc:1.16 --- src/sys/arch/vax/boot/Makefile.inc:1.15 Thu Jul 18 12:15:16 2013 +++ src/sys/arch/vax/boot/Makefile.inc Wed Aug 21 06:15:41 2013 @@ -1,4 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.15 2013/07/18 12:15:16 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.16 2013/08/21 06:15:41 matt Exp $ + +.include RELOC=0x3f .PATH: ${.CURDIR}/../../vax ${.CURDIR}/../common @@ -9,6 +11,7 @@ CPPFLAGS+=-I${.CURDIR}/../../ CPPFLAGS+=-I${.CURDIR}/../common CPPFLAGS+=-I${.CURDIR}/../../include CPPFLAGS+=-DRELOC=${RELOC} +CPPFLAGS+=-D_STANDALONE WARNS?= 1 CFLAGS+=-ffreestanding -fno-pic -fno-unwind-tables @@ -18,13 +21,3 @@ MKMAN=no LIBCRTBEGIN= LIBCRTEND= - -.if ${MACHINE} == "vax" -.PHONY: machine-links -beforedepend: machine-links -machine-links: - @rm -f machine && ln -s ${S}/arch/${MACHINE}/include machine - @rm -f ${MACHINE_ARCH} && ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.NOPATH: machine ${MACHINE_ARCH} -CLEANFILES+= machine ${MACHINE_ARCH} -.endif Index: src/sys/arch/vax/boot/boot/Makefile diff -u src/sys/arch/vax/boot/boot/Makefile:1.40 src/sys/arch/vax/boot/boot/Makefile:1.41 --- src/sys/arch/vax/boot/boot/Makefile:1.40 Mon May 14 10:05:50 2012 +++ src/sys/arch/vax/boot/boot/Makefile Wed Aug 21 06:15:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2012/05/14 10:05:50 abs Exp $ +# $NetBSD: Makefile,v 1.41 2013/08/21 06:15:41 matt Exp $ S= ${.CURDIR}/../../../.. @@ -36,7 +36,7 @@ vers.c: ${.CURDIR}/version ${HOST_SH} ${S}/conf/newvers_stand.sh -N ${${MKREPRO} == "yes" :?:-D} \ ${.CURDIR}/version "${MACHINE}" -${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${_MKTARGET_LINK} ${LD} -N -Ttext ${RELOC} -e nisse -o ${PROG}.sym ${OBJS} \ ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
CVS commit: src/sys/arch/rs6000/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:20:49 UTC 2013 Modified Files: src/sys/arch/rs6000/stand/boot: Makefile src/sys/arch/rs6000/stand/common: Makefile Log Message: Use Add a missing ${_MKTARGET_LINK} To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/rs6000/stand/boot/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/stand/common/Makefile 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/rs6000/stand/boot/Makefile diff -u src/sys/arch/rs6000/stand/boot/Makefile:1.4 src/sys/arch/rs6000/stand/boot/Makefile:1.5 --- src/sys/arch/rs6000/stand/boot/Makefile:1.4 Sat Jan 22 19:19:22 2011 +++ src/sys/arch/rs6000/stand/boot/Makefile Wed Aug 21 06:20:49 2013 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2011/01/22 19:19:22 joerg Exp $ +# $NetBSD: Makefile,v 1.5 2013/08/21 06:20:49 matt Exp $ NOMAN= # defined .include +.include COMMON= ${.CURDIR}/../common COMMONOBJ!= cd ${COMMON} && ${PRINTOBJDIR} @@ -46,28 +47,16 @@ LIBCRTEND= RELOC= 0x80 #RELOC= 0x0 -CLEANFILES+= vers.c machine powerpc +CLEANFILES+= vers.c LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: machine powerpc -.NOPATH: machine powerpc - -machine:: - -rm -f $@ - ln -s ${S}/arch/${MACHINE}/include $@ - -powerpc:: - -rm -f $@ - ln -s ${S}/arch/powerpc/include $@ -.endif - vers.c: ${.CURDIR}/../boot/version ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ ${.CURDIR}/../boot/version "rs6000" ${NEWVERSWHAT} ${PROG}: ${OBJS} ${LIBS} + ${_MKTARGET_LINK} ${LD} -o ${PROG} -s -N -T ${.CURDIR}/../boot/ld.script \ -Ttext ${RELOC} ${OBJS} ${LIBS} Index: src/sys/arch/rs6000/stand/common/Makefile diff -u src/sys/arch/rs6000/stand/common/Makefile:1.2 src/sys/arch/rs6000/stand/common/Makefile:1.3 --- src/sys/arch/rs6000/stand/common/Makefile:1.2 Thu May 27 06:58:15 2010 +++ src/sys/arch/rs6000/stand/common/Makefile Wed Aug 21 06:20:49 2013 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2010/05/27 06:58:15 dholland Exp $ +# $NetBSD: Makefile,v 1.3 2013/08/21 06:20:49 matt Exp $ S= ${.CURDIR}/../../../.. +.include + NOMAN= # defined CPPFLAGS+= -D_STANDALONE @@ -11,19 +13,6 @@ CPPFLAGS+= -Werror -Wall -Wstrict-protot CFLAGS= -Os -mmultiple -ffreestanding -CLEANFILES+= machine powerpc - -.if !make(obj) && !make(clean) && !make(cleandir) -.PHONY: machine-links -beforedepend: machine-links - -machine-links: - -rm -f machine - ln -s ${S}/arch/${MACHINE}/include machine - -rm -f ${MACHINE_ARCH} - ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.endif - .include ### find out what to use for libkern @@ -44,9 +33,4 @@ LIBSA= ${SALIB} LIBS= ${LIBSA} ${LIBZ} ${LIBKERN} -realall: machine-links ${LIBS} - -cleandir distclean: .WAIT cleanlibdir - -cleanlibdir: - -rm -rf lib +realall: ${LIBS}
CVS commit: src/sys/arch/shark/stand/ofwboot
Module Name:src Committed By: matt Date: Wed Aug 21 06:24:42 UTC 2013 Modified Files: src/sys/arch/shark/stand/ofwboot: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/shark/stand/ofwboot/Makefile 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/shark/stand/ofwboot/Makefile diff -u src/sys/arch/shark/stand/ofwboot/Makefile:1.13 src/sys/arch/shark/stand/ofwboot/Makefile:1.14 --- src/sys/arch/shark/stand/ofwboot/Makefile:1.13 Sun Jun 30 21:54:26 2013 +++ src/sys/arch/shark/stand/ofwboot/Makefile Wed Aug 21 06:24:42 2013 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.13 2013/06/30 21:54:26 matt Exp $ +# $NetBSD: Makefile,v 1.14 2013/08/21 06:24:42 matt Exp $ NOMAN= # defined .include +.include S= ${.CURDIR}/../../../.. @@ -40,15 +41,6 @@ CPPFLAGS+= -DRELOC=0x${RELOC} CFLAGS+= -fno-unwind-tables CPUFLAGS= -mcpu=strongarm -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine - @[ -h arm ] || ln -s ${S}/arch/arm/include arm -.endif - -.NOPATH: machine arm -CLEANFILES+= machine arm - CLEANFILES+= ${PROG}.aout ### find out what to use for libkern
CVS commit: src/sys/arch/sbmips/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:27:54 UTC 2013 Modified Files: src/sys/arch/sbmips/stand: Makefile.bootprogs Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sbmips/stand/Makefile.bootprogs 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/sbmips/stand/Makefile.bootprogs diff -u src/sys/arch/sbmips/stand/Makefile.bootprogs:1.10 src/sys/arch/sbmips/stand/Makefile.bootprogs:1.11 --- src/sys/arch/sbmips/stand/Makefile.bootprogs:1.10 Thu Jan 19 19:58:16 2012 +++ src/sys/arch/sbmips/stand/Makefile.bootprogs Wed Aug 21 06:27:54 2013 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.bootprogs,v 1.10 2012/01/19 19:58:16 matt Exp $ +# $NetBSD: Makefile.bootprogs,v 1.11 2013/08/21 06:27:54 matt Exp $ .include +.include .include # for HOST_SH S= ${.CURDIR}/../../../.. @@ -20,18 +21,6 @@ STRIP?= strip CHECKSIZE_CMD= SIZE=${SIZE} ${HOST_SH} ${.CURDIR}/../common/checksize.sh -.PHONY: machine-links -beforedepend: machine-links .WAIT -# ${MACHINE} then ${MACHINE_ARCH} -machine-links: - -rm -f machine && \ - ln -s $S/arch/sbmips/include machine - -rm -f mips && \ - ln -s $S/arch/mips/include mips -CLEANFILES+=machine mips - -realall: machine-links ${PROG} - AFLAGS+= -DASSEMBLER -D_LOCORE -mno-abicalls -mips64 # -I${.CURDIR}/../.. done by Makefile.inc CPPFLAGS+= -nostdinc -I${.OBJDIR} -D_STANDALONE -I${S}
CVS commit: src/sys/arch/sparc/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:41:52 UTC 2013 Modified Files: src/sys/arch/sparc/stand/bootblk: Makefile src/sys/arch/sparc/stand/ofwboot: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/stand/bootblk/Makefile cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/stand/ofwboot/Makefile 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/sparc/stand/bootblk/Makefile diff -u src/sys/arch/sparc/stand/bootblk/Makefile:1.13 src/sys/arch/sparc/stand/bootblk/Makefile:1.14 --- src/sys/arch/sparc/stand/bootblk/Makefile:1.13 Sat Feb 13 23:38:17 2010 +++ src/sys/arch/sparc/stand/bootblk/Makefile Wed Aug 21 06:41:52 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2010/02/13 23:38:17 eeh Exp $ +# $NetBSD: Makefile,v 1.14 2013/08/21 06:41:52 matt Exp $ CURDIR= ${.CURDIR} S= ${CURDIR}/../../../.. @@ -10,7 +10,7 @@ S= ${CURDIR}/../../../.. PROG= bootblk SRCS= bootblk.fth OBJS= -CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp machine sparc \ +CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \ bootblk bootblk.text bootblk.text.tmp NOMAN= # defined @@ -21,17 +21,6 @@ USE_GENASSYM?= no INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL -#all:: bootblk.text bootblk - -#clean:: -# rm assym.fth.h bootblk.text machine bootblk - -sparc: - ln -s ${.CURDIR}/../../../sparc/include sparc - -machine: - ln -s ${.CURDIR}/../../../${MACHINE}/include machine - ffs.fth.h: genfth.cf machine sparc ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ <${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \ @@ -61,4 +50,5 @@ fake: bootblk bootblk.text ../fakeboot/fakeboot -elf32 /bootblk ../fakeboot/fakeboot -elf32 /bootblk.text +.include .include Index: src/sys/arch/sparc/stand/ofwboot/Makefile diff -u src/sys/arch/sparc/stand/ofwboot/Makefile:1.29 src/sys/arch/sparc/stand/ofwboot/Makefile:1.30 --- src/sys/arch/sparc/stand/ofwboot/Makefile:1.29 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/Makefile Wed Aug 21 06:41:52 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2011/05/21 15:50:42 tsutsui Exp $ +# $NetBSD: Makefile,v 1.30 2013/08/21 06:41:52 matt Exp $ CURDIR= ${.CURDIR} S= ${CURDIR}/../../../.. @@ -8,6 +8,7 @@ S= ${CURDIR}/../../../.. # WARNS?= 2 +KLINK_MACHINE= sparc64 PROG?= ofwboot SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c @@ -78,21 +79,8 @@ SAMISCCPPFLAGS+= -DCOMPAT_SOLARIS_UFS .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @([ -h machine ] || ln -s ${S}/arch/sparc64/include machine) - @([ -h sparc64 ] || ln -s ${S}/arch/sparc64/include sparc64) - @([ -h sparc ] || ln -s ${S}/arch/sparc/include sparc) -.NOPATH: machine sparc64 sparc -.endif -CLEANFILES+= machine sparc64 sparc - -cleandir distclean: .WAIT cleanlibdir - -cleanlibdir: - -rm -rf lib - .include +.include vers.c: version ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ @@ -102,10 +90,12 @@ CLEANFILES+= vers.c .if CROSS ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} + ${_MKTARGET_LINK} ${LD} -N -p -Ttext ${RELOC} -e ${ENTRY} >lderr -o ${PROG} \ ${OBJS} -L${SADST} -lsa -L${ZDST} -lz -L${KERNDST} -lkern # solaris linker .else ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} + ${_MKTARGET_LINK} ${LD} -X -N -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \ ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} # native linker .endif
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: matt Date: Wed Aug 21 06:44:02 UTC 2013 Modified Files: src/sys/arch/sandpoint/stand/altboot: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sandpoint/stand/altboot/Makefile 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/altboot/Makefile diff -u src/sys/arch/sandpoint/stand/altboot/Makefile:1.12 src/sys/arch/sandpoint/stand/altboot/Makefile:1.13 --- src/sys/arch/sandpoint/stand/altboot/Makefile:1.12 Sun Oct 30 20:42:09 2011 +++ src/sys/arch/sandpoint/stand/altboot/Makefile Wed Aug 21 06:44:02 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2011/10/30 20:42:09 phx Exp $ +# $NetBSD: Makefile,v 1.13 2013/08/21 06:44:02 matt Exp $ S= ${.CURDIR}/../../../.. @@ -19,6 +19,7 @@ CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I DBG= -Os .include +.include # XXX SHOULD NOT NEED TO DEFINE THESE! LIBCRT0= @@ -32,14 +33,6 @@ BINMODE= 444 RELOC= 100 ENTRY= _start -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine - @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc -.NOPATH: machine powerpc -.endif -CLEANFILES+= machine powerpc - ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc" @@ -62,6 +55,7 @@ vers.c: version ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint" ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} + ${_MKTARGET_LINK} ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${OBJCOPY} -S -O binary ${PROG} ${PROG}.bin
CVS commit: src/sys/arch/ofppc/stand/ofwboot
Module Name:src Committed By: matt Date: Wed Aug 21 06:46:26 UTC 2013 Modified Files: src/sys/arch/ofppc/stand/ofwboot: Makefile Log Message: Use Add ${_MKTARGET_LINK} To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/ofppc/stand/ofwboot/Makefile 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/ofppc/stand/ofwboot/Makefile diff -u src/sys/arch/ofppc/stand/ofwboot/Makefile:1.27 src/sys/arch/ofppc/stand/ofwboot/Makefile:1.28 --- src/sys/arch/ofppc/stand/ofwboot/Makefile:1.27 Mon Jan 24 19:27:18 2011 +++ src/sys/arch/ofppc/stand/ofwboot/Makefile Wed Aug 21 06:46:26 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2011/01/24 19:27:18 joerg Exp $ +# $NetBSD: Makefile,v 1.28 2013/08/21 06:46:26 matt Exp $ S!= cd ${.CURDIR}/../../../.. ; pwd @@ -14,6 +14,7 @@ CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP CPPFLAGS+= -DHEAP_VARIABLE .include +.include DBG= -Os -mmultiple @@ -46,14 +47,6 @@ CPPFLAGS+= -DRELOC=0x${RELOC} CPPFLAGS+= -DFIRMWORKSBUGS CPPFLAGS+= -DCOMPAT_386BSD_MBRPART -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine - @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc -.endif -.NOPATH: machine powerpc -CLEANFILES+= machine powerpc - ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc" @@ -76,6 +69,7 @@ vers.c: version ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} + ${_MKTARGET_LINK} ${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \ -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} mv -f ${PROG}.X ${PROG}
CVS commit: src/sys/arch/prep/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:49:45 UTC 2013 Modified Files: src/sys/arch/prep/stand/boot: Makefile src/sys/arch/prep/stand/common: Makefile Log Message: Use Use ${_MKTARGET_LINK} To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/prep/stand/boot/Makefile cvs rdiff -u -r1.10 -r1.11 src/sys/arch/prep/stand/common/Makefile 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/prep/stand/boot/Makefile diff -u src/sys/arch/prep/stand/boot/Makefile:1.26 src/sys/arch/prep/stand/boot/Makefile:1.27 --- src/sys/arch/prep/stand/boot/Makefile:1.26 Sat May 19 14:40:13 2012 +++ src/sys/arch/prep/stand/boot/Makefile Wed Aug 21 06:49:44 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2012/05/19 14:40:13 kiyohara Exp $ +# $NetBSD: Makefile,v 1.27 2013/08/21 06:49:44 matt Exp $ NOMAN= # defined @@ -56,26 +56,15 @@ CLEANFILES+= vers.c machine powerpc ${PR LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: machine powerpc -.NOPATH: machine powerpc - -machine:: - -rm -f $@ - ln -s ${S}/arch/${MACHINE}/include $@ - -powerpc:: - -rm -f $@ - ln -s ${S}/arch/powerpc/include $@ -.endif - vers.c: ${.CURDIR}/../boot/version ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ ${.CURDIR}/../boot/version "prep" ${NEWVERSWHAT} ${PROG}: ${OBJS} ${LIBS} + ${_MKTARGET_LINK} ${LD} -o ${PROG}.elf -N -T ${.CURDIR}/../boot/ld.script \ -Ttext ${RELOC} ${OBJS} ${LIBS} ${STRIP} -o ${PROG} ${PROG}.elf .include +.include Index: src/sys/arch/prep/stand/common/Makefile diff -u src/sys/arch/prep/stand/common/Makefile:1.10 src/sys/arch/prep/stand/common/Makefile:1.11 --- src/sys/arch/prep/stand/common/Makefile:1.10 Thu May 27 06:58:15 2010 +++ src/sys/arch/prep/stand/common/Makefile Wed Aug 21 06:49:45 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2010/05/27 06:58:15 dholland Exp $ +# $NetBSD: Makefile,v 1.11 2013/08/21 06:49:45 matt Exp $ S= ${.CURDIR}/../../../.. @@ -11,20 +11,8 @@ CPPFLAGS+= -Werror -Wall -Wstrict-protot CFLAGS= -Os -mmultiple -ffreestanding -CLEANFILES+= machine powerpc - -.if !make(obj) && !make(clean) && !make(cleandir) -.PHONY: machine-links -beforedepend: machine-links - -machine-links: - -rm -f machine - ln -s ${S}/arch/${MACHINE}/include machine - -rm -f ${MACHINE_ARCH} - ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.endif - .include +.include ### find out what to use for libkern KERN_AS= library @@ -44,7 +32,7 @@ LIBSA= ${SALIB} LIBS= ${LIBSA} ${LIBZ} ${LIBKERN} -realall: machine-links ${LIBS} +realall: ${LIBS} cleandir distclean: .WAIT cleanlibdir
CVS commit: src/sys/arch/bebox/stand
Module Name:src Committed By: matt Date: Wed Aug 21 06:53:10 UTC 2013 Modified Files: src/sys/arch/bebox/stand/boot: Makefile src/sys/arch/bebox/stand/common: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/bebox/stand/boot/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/bebox/stand/common/Makefile 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/bebox/stand/boot/Makefile diff -u src/sys/arch/bebox/stand/boot/Makefile:1.32 src/sys/arch/bebox/stand/boot/Makefile:1.33 --- src/sys/arch/bebox/stand/boot/Makefile:1.32 Sat Sep 1 00:29:00 2012 +++ src/sys/arch/bebox/stand/boot/Makefile Wed Aug 21 06:53:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2012/09/01 00:29:00 matt Exp $ +# $NetBSD: Makefile,v 1.33 2013/08/21 06:53:10 matt Exp $ NOMAN= # defined @@ -56,23 +56,10 @@ LIBCRTEND= RELOC= 0x70 -CLEANFILES+= vers.c machine powerpc ${PROG}.elf +CLEANFILES+= vers.c ${PROG}.elf LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: machine powerpc -.NOPATH: machine powerpc - -machine:: - -rm -f $@ - ln -s ${S}/arch/${MACHINE}/include $@ - -powerpc:: - -rm -f $@ - ln -s ${S}/arch/powerpc/include $@ -.endif - vers.c: ${.CURDIR}/../boot/version ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ ${.CURDIR}/../boot/version "bebox" ${NEWVERSWHAT} @@ -84,3 +71,4 @@ ${PROG}: ${OBJS} ${LIBS} ${STRIP} -o ${PROG} ${PROG}.elf .include +.include Index: src/sys/arch/bebox/stand/common/Makefile diff -u src/sys/arch/bebox/stand/common/Makefile:1.2 src/sys/arch/bebox/stand/common/Makefile:1.3 --- src/sys/arch/bebox/stand/common/Makefile:1.2 Thu May 27 06:58:13 2010 +++ src/sys/arch/bebox/stand/common/Makefile Wed Aug 21 06:53:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/05/27 06:58:13 dholland Exp $ +# $NetBSD: Makefile,v 1.3 2013/08/21 06:53:10 matt Exp $ S= ${.CURDIR}/../../../.. @@ -11,20 +11,8 @@ CPPFLAGS+= -Werror -Wall -Wstrict-protot CFLAGS= -Os -mmultiple -ffreestanding -CLEANFILES+= machine powerpc - -.if !make(obj) && !make(clean) && !make(cleandir) -.PHONY: machine-links -beforedepend: machine-links - -machine-links: - -rm -f machine - ln -s ${S}/arch/${MACHINE}/include machine - -rm -f ${MACHINE_ARCH} - ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.endif - .include +.include ### find out what to use for libkern KERN_AS= library @@ -44,7 +32,7 @@ LIBSA= ${SALIB} LIBS= ${LIBSA} ${LIBZ} ${LIBKERN} -realall: machine-links ${LIBS} +realall: ${LIBS} cleandir distclean: .WAIT cleanlibdir
CVS commit: src/sys/arch/next68k/stand/boot
Module Name:src Committed By: matt Date: Wed Aug 21 06:56:14 UTC 2013 Modified Files: src/sys/arch/next68k/stand/boot: Makefile Log Message: Use Add ${_MKTARGET_LINK} To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/next68k/stand/boot/Makefile 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/next68k/stand/boot/Makefile diff -u src/sys/arch/next68k/stand/boot/Makefile:1.26 src/sys/arch/next68k/stand/boot/Makefile:1.27 --- src/sys/arch/next68k/stand/boot/Makefile:1.26 Mon Nov 5 16:53:25 2012 +++ src/sys/arch/next68k/stand/boot/Makefile Wed Aug 21 06:56:14 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2012/11/05 16:53:25 apb Exp $ +# $NetBSD: Makefile,v 1.27 2013/08/21 06:56:14 matt Exp $ NOMAN= # defined @@ -44,7 +44,7 @@ SRCS= boot.c machdep.c conf.c devopen. .PATH: ${S}/lib/libsa SRCS+= dev_net.c -CLEANFILES+= srt0.o boot.elf boot.raw machine ${MACHINE_ARCH} limits.h +CLEANFILES+= srt0.o boot.elf boot.raw limits.h CLEANFILES+= vers.c build.c build # generated dynamically BINDIR= /usr/mdec @@ -65,6 +65,7 @@ function x(v) { printf "\\0\\%o\\%o\\%o" }' ${PROG}: srt0.o ${OBJS} ${LIBS} + ${_MKTARGET_LINK} ${LD} -N -Ttext ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@.elf ${SIZE} $@.elf ${OBJCOPY} -O binary $@.elf $@.raw @@ -89,17 +90,5 @@ vers.c: version # utilities -.if !make(obj) && !make(clean) && !make(cleandir) -.NOPATH: machine ${MACHINE_ARCH} -.BEGIN: machine ${MACHINE_ARCH} - -machine: - -rm -f machine - ln -s ${S}/arch/${MACHINE}/include machine - -${MACHINE_ARCH}: - -rm -f ${MACHINE_ARCH} - ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} -.endif - .include +.include
CVS commit: src/sys/arch/mvme68k/stand/installboot
Module Name:src Committed By: matt Date: Wed Aug 21 06:58:58 UTC 2013 Modified Files: src/sys/arch/mvme68k/stand/installboot: Makefile Log Message: Use To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mvme68k/stand/installboot/Makefile 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/mvme68k/stand/installboot/Makefile diff -u src/sys/arch/mvme68k/stand/installboot/Makefile:1.16 src/sys/arch/mvme68k/stand/installboot/Makefile:1.17 --- src/sys/arch/mvme68k/stand/installboot/Makefile:1.16 Wed Dec 28 08:08:00 2005 +++ src/sys/arch/mvme68k/stand/installboot/Makefile Wed Aug 21 06:58:58 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2005/12/28 08:08:00 skrll Exp $ +# $NetBSD: Makefile,v 1.17 2013/08/21 06:58:58 matt Exp $ NOMAN= # defined @@ -12,19 +12,9 @@ CPPFLAGS+= -I${LIBSA} -I. -D__daddr_t=in # Need this to work in the miniroot LDSTATIC= -static -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: machine -.NOPATH: machine - -machine:: - -rm -f $@ - ln -s ${.CURDIR}/../../include $@ -.endif - -CLEANFILES+= machine - .PATH.c: ${LIBSA} SRCS= installboot.c byteorder.c loadfile.c loadfile_aout.c loadfile_elf32.c .include +.include