CVS commit: src/libexec/ld.elf_so/arch/aarch64
Module Name:src Committed By: skrll Date: Fri Jan 18 11:59:04 UTC 2019 Modified Files: src/libexec/ld.elf_so/arch/aarch64: mdreloc.c rtld_start.S Log Message: Adapt https://svnweb.freebsd.org/base?view=revision=342113 to NetBSD. This brings us resolving for dynamically loaded libraries and makes tests/libexec/ld.elf_so/t_thread_local_dtor pass. With suggestions from joerg@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/aarch64/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/aarch64/mdreloc.c diff -u src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.12 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.13 --- src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.12 Fri Nov 23 11:26:05 2018 +++ src/libexec/ld.elf_so/arch/aarch64/mdreloc.c Fri Jan 18 11:59:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.12 2018/11/23 11:26:05 skrll Exp $ */ +/* $NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.12 2018/11/23 11:26:05 skrll Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $"); #endif /* not lint */ #include @@ -70,17 +70,16 @@ __RCSID("$NetBSD: mdreloc.c,v 1.12 2018/ #include "rtld.h" struct tls_data { - int64_t index; - Obj_Entry *obj; - const Elf_Rela *rela; + size_t td_tlsindex; + Elf_Addr td_tlsoffs; }; void _rtld_bind_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); Elf_Addr _rtld_bind(const Obj_Entry *, Elf_Word); -void *_rtld_tlsdesc(void *); +void *_rtld_tlsdesc_static(void *); +void *_rtld_tlsdesc_undef(void *); void *_rtld_tlsdesc_dynamic(void *); -int64_t _rtld_tlsdesc_handle(struct tls_data *, u_int); /* * AARCH64 PLT looks like this; @@ -117,67 +116,63 @@ _rtld_setup_pltgot(const Obj_Entry *obj) } static struct tls_data * -_rtld_tlsdesc_alloc(Obj_Entry *obj, const Elf_Rela *rela) +_rtld_tlsdesc_alloc(size_t tlsindex, Elf_Addr offs) { struct tls_data *tlsdesc; tlsdesc = xmalloc(sizeof(*tlsdesc)); - tlsdesc->index = -1; - tlsdesc->obj = obj; - tlsdesc->rela = rela; + tlsdesc->td_tlsindex = tlsindex; + tlsdesc->td_tlsoffs = offs; return tlsdesc; } -static int64_t -_rtld_tlsdesc_handle_locked(struct tls_data *tlsdesc, u_int flags) +static void +_rtld_tlsdesc_fill(const Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where, u_int flags) { - const Elf_Rela *rela; const Elf_Sym *def; const Obj_Entry *defobj; - Obj_Entry *obj; - - rela = tlsdesc->rela; - obj = tlsdesc->obj; - - def = _rtld_find_symdef(ELF_R_SYM(rela->r_info), obj, , flags); - if (def == NULL) - _rtld_die(); - - tlsdesc->index = defobj->tlsoffset + def->st_value + rela->r_addend + - sizeof(struct tls_tcb); + Elf_Addr offs = 0; + unsigned long symnum = ELF_R_SYM(rela->r_info); - return tlsdesc->index; -} - -int64_t -_rtld_tlsdesc_handle(struct tls_data *tlsdesc, u_int flags) -{ - sigset_t mask; + if (symnum != 0) { + def = _rtld_find_symdef(ELF_R_SYM(rela->r_info), obj, , + flags); + if (def == NULL) + _rtld_die(); + if (def == &_rtld_sym_zero) { + /* Weak undefined thread variable */ + where[0] = (Elf_Addr)_rtld_tlsdesc_undef; + where[1] = rela->r_addend; - /* We have already found the index, return it */ - if (tlsdesc->index >= 0) - return tlsdesc->index; - - _rtld_exclusive_enter(); - /* tlsdesc->index may have been set by another thread */ - if (tlsdesc->index == -1) - _rtld_tlsdesc_handle_locked(tlsdesc, flags); - _rtld_exclusive_exit(); + rdbg(("TLSDESC %s (weak) in %s --> %p", + obj->strtab + obj->symtab[symnum].st_name, + obj->path, (void *)where[1])); - return tlsdesc->index; -} + return; + } + offs = def->st_value; + } else { + defobj = obj; + } + offs += rela->r_addend; -static void -_rtld_tlsdesc_fill(Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where) -{ - if (ELF_R_SYM(rela->r_info) == 0) { - where[0] = (Elf_Addr)_rtld_tlsdesc; - where[1] = obj->tlsoffset + rela->r_addend + + if (defobj->tls_done) { + /* Variable is in initialy allocated TLS segment */ + where[0] = (Elf_Addr)_rtld_tlsdesc_static; + where[1] = defobj->tlsoffset + offs + sizeof(struct tls_tcb); + + rdbg(("TLSDESC %s --> %p static", + obj->path, (void *)where[1])); } else { + /* TLS offset is unknown at load time, use dynamic resolving */ where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; - where[1] = (Elf_Addr)_rtld_tlsdesc_alloc(obj, rela); + where[1] = (Elf_Addr)_rtld_tlsdesc_alloc(defobj->tlsindex, offs); + + rdbg(("TLSDESC %s in %s --> %p dynamic (%zu, %p)", + obj->strtab + obj->symtab[symnum].st_name, + obj->path, (void *)where[1], defobj->tlsindex, (void *)offs)); } } @@ -276,7
CVS commit: src/libexec/ld.elf_so/arch/aarch64
Module Name:src Committed By: skrll Date: Fri Jan 18 11:59:04 UTC 2019 Modified Files: src/libexec/ld.elf_so/arch/aarch64: mdreloc.c rtld_start.S Log Message: Adapt https://svnweb.freebsd.org/base?view=revision=342113 to NetBSD. This brings us resolving for dynamically loaded libraries and makes tests/libexec/ld.elf_so/t_thread_local_dtor pass. With suggestions from joerg@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/aarch64/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Jan 18 18:03:06 UTC 2019 Modified Files: src/sys/arch/ia64/ia64: vm_machdep.c Log Message: hopefully fix deadlock issue in cpu_switchto. pointed out by (Thanks!) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/ia64/vm_machdep.c diff -u src/sys/arch/ia64/ia64/vm_machdep.c:1.15 src/sys/arch/ia64/ia64/vm_machdep.c:1.16 --- src/sys/arch/ia64/ia64/vm_machdep.c:1.15 Wed Nov 14 21:10:59 2018 +++ src/sys/arch/ia64/ia64/vm_machdep.c Fri Jan 18 18:03:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.15 2018/11/14 21:10:59 scole Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.16 2019/01/18 18:03:06 scole Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -91,8 +91,9 @@ cpu_switchto(lwp_t *oldlwp, lwp_t *newlw KASSERT(oldlwp == l); swapctx(oldpcb, newpcb); } - - return (oldlwp); + + /* return oldlwp for the original thread that called cpu_switchto */ + return ((lwp_t *)reg9); } /* @@ -189,13 +190,12 @@ cpu_lwp_fork(struct lwp *l1, struct lwp tf->tf_scratch.gr10 = 0; } - tf->tf_scratch.gr2 = (unsigned long)FDESC_FUNC(func); - tf->tf_scratch.gr3 = (unsigned long)arg; - - pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET; - pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline); pcb2->pcb_special.bspstore = ua2 + UAREA_BSPSTORE_OFFSET + ndirty; pcb2->pcb_special.pfs = 0; + pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET; + pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline); + tf->tf_scratch.gr2 = (unsigned long)FDESC_FUNC(func); + tf->tf_scratch.gr3 = (unsigned long)arg; return; }
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Jan 18 18:03:06 UTC 2019 Modified Files: src/sys/arch/ia64/ia64: vm_machdep.c Log Message: hopefully fix deadlock issue in cpu_switchto. pointed out by (Thanks!) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Jan 18 18:47:16 UTC 2019 Modified Files: src/sys/arch/ia64/ia64: machdep.c Log Message: Add DPRINTF function, use kstack variable for proc0 memory, reorder some functions so ci initialized before use To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/ia64/ia64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Fri Jan 18 17:30:31 UTC 2019 Modified Files: src/distrib/sets/lists/comp: ad.m68k mi Log Message: If we are building gcc, we always install the include files, otherwise we can't build things even when cross-compiling because of missing header files (like stdatomic.h). Really all the md/ad header files now will be installed when mkgcccmds=no, but I've only fixed m68k. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/comp/ad.m68k cvs rdiff -u -r1.2248 -r1.2249 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.
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Fri Jan 18 17:30:31 UTC 2019 Modified Files: src/distrib/sets/lists/comp: ad.m68k mi Log Message: If we are building gcc, we always install the include files, otherwise we can't build things even when cross-compiling because of missing header files (like stdatomic.h). Really all the md/ad header files now will be installed when mkgcccmds=no, but I've only fixed m68k. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/comp/ad.m68k cvs rdiff -u -r1.2248 -r1.2249 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/ad.m68k diff -u src/distrib/sets/lists/comp/ad.m68k:1.58 src/distrib/sets/lists/comp/ad.m68k:1.59 --- src/distrib/sets/lists/comp/ad.m68k:1.58 Sat Sep 29 20:42:17 2018 +++ src/distrib/sets/lists/comp/ad.m68k Fri Jan 18 12:30:31 2019 @@ -1,13 +1,13 @@ -# $NetBSD: ad.m68k,v 1.58 2018/09/30 00:42:17 mrg Exp $ +# $NetBSD: ad.m68k,v 1.59 2019/01/18 17:30:31 christos Exp $ ./usr/bin/elf2aoutcomp-sysutil-bin ./usr/include/gcc-4.5/math-68881.h comp-c-include obsolete ./usr/include/gcc-4.5/tgmath.h comp-c-include obsolete ./usr/include/gcc-4.8/math-68881.h comp-c-include obsolete ./usr/include/gcc-4.8/tgmath.h comp-c-include obsolete -./usr/include/gcc-5/math-68881.h comp-c-include gcccmds,gcc=5 -./usr/include/gcc-5/tgmath.h comp-c-include gcccmds,gcc=5 -./usr/include/gcc-6/math-68881.h comp-c-include gcccmds,gcc=6 -./usr/include/gcc-6/tgmath.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-5/math-68881.h comp-c-include gcc=5 +./usr/include/gcc-5/tgmath.h comp-c-include gcc=5 +./usr/include/gcc-6/math-68881.h comp-c-include gcc=6 +./usr/include/gcc-6/tgmath.h comp-c-include gcc=6 ./usr/include/m68kcomp-c-include ./usr/include/m68k/ansi.h comp-c-include ./usr/include/m68k/aout_machdep.h comp-c-include Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2248 src/distrib/sets/lists/comp/mi:1.2249 --- src/distrib/sets/lists/comp/mi:1.2248 Tue Jan 1 13:46:09 2019 +++ src/distrib/sets/lists/comp/mi Fri Jan 18 12:30:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2248 2019/01/01 18:46:09 maya Exp $ +# $NetBSD: mi,v 1.2249 2019/01/18 17:30:31 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -2074,11 +2074,11 @@ ./usr/include/gcc-5/xtestintrin.h comp-obsolete gcc=6,obsolete ./usr/include/gcc-6/omp.h comp-gcc-include gcc=6 ./usr/include/gcc-6/openacc.h comp-gcc-include gcc=6 -./usr/include/gcc-6/sanitizer/allocator_interface.h comp-gcc-include gcc=6,gcccmds -./usr/include/gcc-6/sanitizer/asan_interface.h comp-gcc-include gcc=6,gcccmds -./usr/include/gcc-6/sanitizer/common_interface_defs.h comp-gcc-include gcc=6,gcccmds -./usr/include/gcc-6/sanitizer/tsan_interface_atomic.h comp-gcc-include gcc=6,gcccmds -./usr/include/gcc-6/stdatomic.h comp-gcc-include gcc=6,gcccmds +./usr/include/gcc-6/sanitizer/allocator_interface.h comp-gcc-include gcc=6 +./usr/include/gcc-6/sanitizer/asan_interface.h comp-gcc-include gcc=6 +./usr/include/gcc-6/sanitizer/common_interface_defs.h comp-gcc-include gcc=6 +./usr/include/gcc-6/sanitizer/tsan_interface_atomic.h comp-gcc-include gcc=6 +./usr/include/gcc-6/stdatomic.h comp-gcc-include gcc=6 ./usr/include/gelf.hcomp-c-include ./usr/include/getopt.hcomp-c-include ./usr/include/glob.hcomp-c-include
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Jan 18 18:47:16 UTC 2019 Modified Files: src/sys/arch/ia64/ia64: machdep.c Log Message: Add DPRINTF function, use kstack variable for proc0 memory, reorder some functions so ci initialized before use To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/ia64/ia64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/ia64/machdep.c diff -u src/sys/arch/ia64/ia64/machdep.c:1.40 src/sys/arch/ia64/ia64/machdep.c:1.41 --- src/sys/arch/ia64/ia64/machdep.c:1.40 Thu Nov 15 20:39:18 2018 +++ src/sys/arch/ia64/ia64/machdep.c Fri Jan 18 18:47:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.40 2018/11/15 20:39:18 scole Exp $ */ +/* $NetBSD: machdep.c,v 1.41 2019/01/18 18:47:16 scole Exp $ */ /*- * Copyright (c) 2003,2004 Marcel Moolenaar @@ -119,6 +119,12 @@ #include #include +#ifdef DEBUG +#define DPRINTF(fmt, args...) printf("%s: " fmt, __func__, ##args) +#else +#define DPRINTF(fmt, args...) ((void)0) +#endif + /* the following is used externally (sysctl_hw) */ char machine[] = MACHINE; /* from */ char machine_arch[] = MACHINE_ARCH; /* from */ @@ -387,12 +393,6 @@ ia64_init(void) vaddr_t v; /* NO OUTPUT ALLOWED UNTIL FURTHER NOTICE */ - - /* - * TODO: Disable interrupts, floating point etc. - * Maybe flush cache and tlb - */ - ia64_set_fpsr(IA64_FPSR_DEFAULT); /* @@ -514,10 +514,8 @@ ia64_init(void) for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) { -#ifdef DEBUG - printf("MD %p: type %d pa 0x%lx cnt 0x%lx\n", md, - md->md_type, md->md_phys, md->md_pages); -#endif + DPRINTF("MD %p: type %d pa 0x%lx cnt 0x%lx\n", md, + md->md_type, md->md_phys, md->md_pages); pfn0 = ia64_btop(round_page(md->md_phys)); pfn1 = ia64_btop(trunc_page(md->md_phys + md->md_pages * 4096)); @@ -553,17 +551,15 @@ ia64_init(void) * Must compute the location of the kernel * within the segment. */ -#ifdef DEBUG - printf("Descriptor %p contains kernel\n", md); -#endif + DPRINTF("Descriptor %p contains kernel\n", md); + if (pfn0 < kernstartpfn) { /* * There is a chunk before the kernel. */ -#ifdef DEBUG -printf("Loading chunk before kernel: " - "0x%lx / 0x%lx\n", pfn0, kernstartpfn); -#endif +DPRINTF("Loading chunk before kernel: " + "0x%lx / 0x%lx\n", pfn0, kernstartpfn); + uvm_page_physload(pfn0, kernstartpfn, pfn0, kernstartpfn, VM_FREELIST_DEFAULT); @@ -572,10 +568,8 @@ ia64_init(void) /* * There is a chunk after the kernel. */ -#ifdef DEBUG -printf("Loading chunk after kernel: " - "0x%lx / 0x%lx\n", kernendpfn, pfn1); -#endif +DPRINTF("Loading chunk after kernel: " + "0x%lx / 0x%lx\n", kernendpfn, pfn1); uvm_page_physload(kernendpfn, pfn1, kernendpfn, pfn1, VM_FREELIST_DEFAULT); @@ -585,10 +579,8 @@ ia64_init(void) /* * Just load this cluster as one chunk. */ -#ifdef DEBUG - printf("Loading descriptor %p: 0x%lx / 0x%lx\n", - md, pfn0, pfn1); -#endif + DPRINTF("Loading descriptor %p: 0x%lx / 0x%lx\n", +md, pfn0, pfn1); uvm_page_physload(pfn0, pfn1, pfn0, pfn1, VM_FREELIST_DEFAULT); @@ -600,21 +592,16 @@ ia64_init(void) panic("can't happen: system seems to have no memory!"); /* - * Initialize the virtual memory system. - */ - - pmap_bootstrap(); - - /* * Initialize error message buffer (at end of core). */ msgbufaddr = (void *) uvm_pageboot_alloc(MSGBUFSIZE); initmsgbuf(msgbufaddr, MSGBUFSIZE); /* - * Init mapping for u page(s) for proc 0 + * Init mapping for u page(s) for proc 0. use memory area + * already set up in locore.S */ - v = uvm_pageboot_alloc(UPAGES * PAGE_SIZE); + v = (vaddr_t) uvm_lwp_setuarea(, v); /* @@ -622,6 +609,8 @@ ia64_init(void) * and make lwp0's trapframe pointer point to it for sanity. */ lwp0.l_md.md_tf = (struct trapframe *)(v + UAREA_TF_OFFSET); + lwp0.l_md.md_tf->tf_length = sizeof(struct trapframe); + lwp0.l_md.md_tf->tf_flags = FRAME_SYSCALL; lwp0.l_md.user_stack = NULL; lwp0.l_md.user_stack_size = 0; @@ -630,8 +619,6 @@ ia64_init(void) pcb0->pcb_special.sp = v + UAREA_SP_OFFSET; pcb0->pcb_special.bspstore = v + UAREA_BSPSTORE_OFFSET; - mutex_init(>pcb_fpcpu_slock, MUTEX_DEFAULT, 0); - /* * Setup global data for the bootstrap cpu. */ @@ -643,9 +630,8 @@ ia64_init(void) ia64_set_k4((uint64_t) ci); ci->ci_cpuid = cpu_number(); - /* - * Initialise process context. XXX: This should really be in cpu_switch + * Initialise process context. XXX: This should really be in cpu_switchto */ ci->ci_curlwp = @@ -662,6 +648,8 @@ ia64_init(void) ia64_set_tpr(0); ia64_srlz_d(); + mutex_init(>pcb_fpcpu_slock, MUTEX_DEFAULT, 0); + /* * Save our current context so that we have a known (maybe
CVS commit: src/external/gpl3/gcc.old
Module Name:src Committed By: christos Date: Fri Jan 18 17:31:39 UTC 2019 Modified Files: src/external/gpl3/gcc.old: Makefile src/external/gpl3/gcc.old/usr.bin: Makefile Log Message: Descend and build includes even if mkgcccmds=no because we need the header files during cross build too. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/usr.bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/Makefile diff -u src/external/gpl3/gcc.old/Makefile:1.7 src/external/gpl3/gcc.old/Makefile:1.8 --- src/external/gpl3/gcc.old/Makefile:1.7 Sun Nov 11 17:49:37 2018 +++ src/external/gpl3/gcc.old/Makefile Fri Jan 18 12:31:39 2019 @@ -1,11 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2018/11/11 22:49:37 mrg Exp $ - -SUBDIR+= lib +# $NetBSD: Makefile,v 1.8 2019/01/18 17:31:39 christos Exp $ .include -.if ${MKGCCCMDS} != "no" -SUBDIR+= .WAIT usr.bin -.endif +SUBDIR+= lib .WAIT usr.bin .include Index: src/external/gpl3/gcc.old/usr.bin/Makefile diff -u src/external/gpl3/gcc.old/usr.bin/Makefile:1.7 src/external/gpl3/gcc.old/usr.bin/Makefile:1.8 --- src/external/gpl3/gcc.old/usr.bin/Makefile:1.7 Sun Nov 11 17:50:06 2018 +++ src/external/gpl3/gcc.old/usr.bin/Makefile Fri Jan 18 12:31:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2018/11/11 22:50:06 mrg Exp $ +# $NetBSD: Makefile,v 1.8 2019/01/18 17:31:39 christos Exp $ NOOBJ=# defined @@ -8,8 +8,9 @@ GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5 .if ${MKGCC} != "no" && exists(${.CURDIR}/gcc/arch/${GCC_MACHINE_ARCH}/defs.mk) -# We keep libcpp here since it depends upon frontend. +.if ${MKGCCCMDS} != "no" || make(includes) +# We keep libcpp here since it depends upon frontend. SUBDIR+= host-libiberty .WAIT \ host-libcpp .WAIT \ backend .WAIT \ @@ -20,6 +21,8 @@ SUBDIR+= host-libiberty .WAIT \ lto1 lto-wrapper \ include +.endif + .include .else
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Fri Jan 18 17:49:56 UTC 2019 Modified Files: src/distrib/sets/lists/base: ad.mips shl.mi src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.hppa ad.m68k ad.mips ad.powerpc ad.riscv ad.sh3 md.alpha md.amd64 md.hppa md.i386 md.ia64 md.or1k md.sparc md.sparc64 md.vax mi src/distrib/sets/lists/debug: ad.mips shl.mi Log Message: - mark gcc=5 files obsolete - make includes always available, not only when gcccmds - mark files obsolete consistently To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.853 -r1.854 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.91 -r1.92 src/distrib/sets/lists/comp/ad.arm cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/comp/ad.hppa cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/comp/ad.m68k cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/comp/ad.powerpc cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/comp/ad.riscv \ src/distrib/sets/lists/comp/md.hppa cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/comp/ad.sh3 cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/comp/md.alpha cvs rdiff -u -r1.264 -r1.265 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.182 -r1.183 src/distrib/sets/lists/comp/md.i386 cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/comp/md.ia64 cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/comp/md.or1k cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/md.sparc cvs rdiff -u -r1.203 -r1.204 src/distrib/sets/lists/comp/md.sparc64 cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/comp/md.vax cvs rdiff -u -r1.2249 -r1.2250 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.213 -r1.214 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/ad.mips diff -u src/distrib/sets/lists/base/ad.mips:1.77 src/distrib/sets/lists/base/ad.mips:1.78 --- src/distrib/sets/lists/base/ad.mips:1.77 Tue Feb 13 05:02:12 2018 +++ src/distrib/sets/lists/base/ad.mips Fri Jan 18 12:49:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.77 2018/02/13 10:02:12 mrg Exp $ +# $NetBSD: ad.mips,v 1.78 2019/01/18 17:49:55 christos Exp $ ./lib/libc_fp.sobase-sys-shlib dynamicroot,softfloat,arch64 ./lib/libc_fp.so.0base-sys-shlib dynamicroot,softfloat,arch64 ./lib/libc_fp.so.0.0base-sys-shlib dynamicroot,softfloat,arch64 @@ -13,7 +13,6 @@ ./usr/lib/o32/libc_fp.so base-compat-shlib compat,pic,arch64 ./usr/lib/o32/libc_fp.so.0 base-compat-shlib compat,pic,arch64 ./usr/lib/o32/libc_fp.so.0.0 base-compat-shlib compat,pic,arch64 -./usr/lib/o32/libgomp.so.1.2 base-compat-shlib compat,pic,arch64,gcc=5 ./usr/lib/o32/libgomp.so.1.3 base-compat-shlib compat,pic,arch64,gcc=6 ./usr/libexec/ld.elf_so-64 base-compat-shlib compat,pic,arch64 ./usr/libexec/ld.elf_so-o32 base-sysutil-bin compat,pic,arch64 Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.853 src/distrib/sets/lists/base/shl.mi:1.854 --- src/distrib/sets/lists/base/shl.mi:1.853 Wed Jan 9 11:59:34 2019 +++ src/distrib/sets/lists/base/shl.mi Fri Jan 18 12:49:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.853 2019/01/09 16:59:34 christos Exp $ +# $NetBSD: shl.mi,v 1.854 2019/01/18 17:49:55 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -181,8 +181,8 @@ ./usr/lib/libarchive.so.4 base-sys-shlib compatfile ./usr/lib/libarchive.so.4.0 base-sys-shlib compatfile ./usr/lib/libasan.sobase-sys-shlib compatfile,gcc -./usr/lib/libasan.so.2base-sys-shlib compatfile,gcc=5 -./usr/lib/libasan.so.2.0 base-sys-shlib compatfile,gcc=5 +./usr/lib/libasan.so.2base-obsolete obsolete +./usr/lib/libasan.so.2.0 base-obsolete obsolete ./usr/lib/libasan.so.3base-sys-shlib compatfile,gcc=6 ./usr/lib/libasan.so.3.0 base-sys-shlib compatfile,gcc=6 ./usr/lib/libasn1.sobase-krb5-shlib compatfile,kerberos @@ -305,9 +305,7 @@ ./usr/lib/libgnumalloc.so.1.0 base-sys-shlib compatfile ./usr/lib/libgomp.sobase-sys-shlib compatfile,gcc ./usr/lib/libgomp.so.1base-sys-shlib compatfile,gcc -./usr/lib/libgomp.so.1.2 base-sys-shlib compatfile,gcc=5,!machine_arch=mips64eb,!machine_arch=mips64el -./usr/lib/libgomp.so.1.2 base-sys-shlib gcc=5,machine_arch=mips64eb -./usr/lib/libgomp.so.1.2 base-sys-shlib gcc=5,machine_arch=mips64el +./usr/lib/libgomp.so.1.2 base-obsolete obsolete ./usr/lib/libgomp.so.1.3 base-sys-shlib compatfile,gcc=6,!machine_arch=mips64eb,!machine_arch=mips64el ./usr/lib/libgomp.so.1.3 base-sys-shlib gcc=6,machine_arch=mips64eb
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Fri Jan 18 17:49:56 UTC 2019 Modified Files: src/distrib/sets/lists/base: ad.mips shl.mi src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.hppa ad.m68k ad.mips ad.powerpc ad.riscv ad.sh3 md.alpha md.amd64 md.hppa md.i386 md.ia64 md.or1k md.sparc md.sparc64 md.vax mi src/distrib/sets/lists/debug: ad.mips shl.mi Log Message: - mark gcc=5 files obsolete - make includes always available, not only when gcccmds - mark files obsolete consistently To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.853 -r1.854 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.91 -r1.92 src/distrib/sets/lists/comp/ad.arm cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/comp/ad.hppa cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/comp/ad.m68k cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/comp/ad.powerpc cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/comp/ad.riscv \ src/distrib/sets/lists/comp/md.hppa cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/comp/ad.sh3 cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/comp/md.alpha cvs rdiff -u -r1.264 -r1.265 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.182 -r1.183 src/distrib/sets/lists/comp/md.i386 cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/comp/md.ia64 cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/comp/md.or1k cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/md.sparc cvs rdiff -u -r1.203 -r1.204 src/distrib/sets/lists/comp/md.sparc64 cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/comp/md.vax cvs rdiff -u -r1.2249 -r1.2250 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.213 -r1.214 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: skrll Date: Fri Jan 18 19:41:03 UTC 2019 Modified Files: src/sys/stand/efiboot: boot.c version Log Message: Add support for "bootargs" environment variable from jmcneill@ Doesn't work with some (all?) u-boots. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.14 src/sys/stand/efiboot/boot.c:1.15 --- src/sys/stand/efiboot/boot.c:1.14 Thu Nov 15 23:52:33 2018 +++ src/sys/stand/efiboot/boot.c Fri Jan 18 19:41:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.14 2018/11/15 23:52:33 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.15 2019/01/18 19:41:03 skrll Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -73,11 +73,13 @@ static char default_device[32]; static char initrd_path[255]; static char dtb_path[255]; static char netbsd_path[255]; +static char netbsd_args[255]; #define DEFTIMEOUT 5 #define DEFFILENAME names[0] int set_bootfile(const char *); +int set_bootargs(const char *); void command_boot(char *); void command_dev(char *); @@ -328,6 +330,15 @@ set_bootfile(const char *arg) return 0; } +int +set_bootargs(const char *arg) +{ + if (strlen(arg) + 1 > sizeof(netbsd_args)) + return ERANGE; + strcpy(netbsd_args, arg); + return 0; +} + void print_banner(void) { @@ -376,6 +387,15 @@ read_env(void) set_default_device(s); FreePool(s); } + + s = efi_env_get("bootargs"); + if (s) { +#ifdef EFIBOOT_DEBUG + printf(">> Setting default boot args to '%s' from environment\n", s); +#endif + set_bootargs(s); + FreePool(s); + } } void @@ -401,7 +421,7 @@ boot(void) if (c != '\r' && c != '\n' && c != '\0') bootprompt(); /* does not return */ - exec_netbsd(netbsd_path, ""); + exec_netbsd(netbsd_path, netbsd_args); } bootprompt(); /* does not return */ Index: src/sys/stand/efiboot/version diff -u src/sys/stand/efiboot/version:1.8 src/sys/stand/efiboot/version:1.9 --- src/sys/stand/efiboot/version:1.8 Thu Nov 15 23:52:33 2018 +++ src/sys/stand/efiboot/version Fri Jan 18 19:41:03 2019 @@ -1,4 +1,4 @@ -$NetBSD: version,v 1.8 2018/11/15 23:52:33 jmcneill Exp $ +$NetBSD: version,v 1.9 2019/01/18 19:41:03 skrll Exp $ NOTE ANY CHANGES YOU MAKE TO THE EFI BOOTLOADER HERE. The format of this file is important - make sure the entries are appended on end, last item @@ -12,3 +12,4 @@ is taken as the current. 1.5: EFI runtime support. 1.6: Add GPT support. 1.7: Add NFS support. +1.8: Add support for "bootargs" environment variable.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: skrll Date: Fri Jan 18 19:41:03 UTC 2019 Modified Files: src/sys/stand/efiboot: boot.c version Log Message: Add support for "bootargs" environment variable from jmcneill@ Doesn't work with some (all?) u-boots. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old
Module Name:src Committed By: christos Date: Fri Jan 18 17:31:39 UTC 2019 Modified Files: src/external/gpl3/gcc.old: Makefile src/external/gpl3/gcc.old/usr.bin: Makefile Log Message: Descend and build includes even if mkgcccmds=no because we need the header files during cross build too. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/usr.bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Fri Jan 18 17:31:55 UTC 2019 Modified Files: src/external/gpl3/gcc: Makefile src/external/gpl3/gcc/usr.bin: Makefile Log Message: Descend and build includes even if mkgcccmds=no because we need the header files during cross build too. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/Makefile diff -u src/external/gpl3/gcc/Makefile:1.2 src/external/gpl3/gcc/Makefile:1.3 --- src/external/gpl3/gcc/Makefile:1.2 Sun Jan 4 20:52:23 2015 +++ src/external/gpl3/gcc/Makefile Fri Jan 18 12:31:55 2019 @@ -1,11 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2015/01/05 01:52:23 mrg Exp $ - -SUBDIR+= lib +# $NetBSD: Makefile,v 1.3 2019/01/18 17:31:55 christos Exp $ .include -.if ${MKGCCCMDS} != "no" -SUBDIR+= .WAIT usr.bin -.endif +SUBDIR+= lib .WAIT usr.bin .include Index: src/external/gpl3/gcc/usr.bin/Makefile diff -u src/external/gpl3/gcc/usr.bin/Makefile:1.10 src/external/gpl3/gcc/usr.bin/Makefile:1.11 --- src/external/gpl3/gcc/usr.bin/Makefile:1.10 Sat Feb 10 21:12:28 2018 +++ src/external/gpl3/gcc/usr.bin/Makefile Fri Jan 18 12:31:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2018/02/11 02:12:28 christos Exp $ +# $NetBSD: Makefile,v 1.11 2019/01/18 17:31:55 christos Exp $ NOOBJ=# defined @@ -8,8 +8,9 @@ GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5 .if ${MKGCC} != "no" && exists(${.CURDIR}/gcc/arch/${GCC_MACHINE_ARCH}/defs.mk) -# We keep libcpp here since it depends upon frontend. +.if ${MKGCCCMDS} != "no" || make(includes) +# We keep libcpp here since it depends upon frontend. SUBDIR+= host-libiberty .WAIT \ host-libcpp .WAIT \ backend .WAIT \ @@ -20,6 +21,8 @@ SUBDIR+= host-libiberty .WAIT \ lto1 lto-wrapper \ include +.endif + .include .else
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Fri Jan 18 17:31:55 UTC 2019 Modified Files: src/external/gpl3/gcc: Makefile src/external/gpl3/gcc/usr.bin: Makefile Log Message: Descend and build includes even if mkgcccmds=no because we need the header files during cross build too. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Fri Jan 18 19:16:50 UTC 2019 Modified Files: src/sys/dev/ic: ahcisata_core.c Log Message: revert rev 1.73 - while it apparently helped Christos case, it re-broke the disk detection on several other systems, so need something else To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/ahcisata_core.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.73 src/sys/dev/ic/ahcisata_core.c:1.74 --- src/sys/dev/ic/ahcisata_core.c:1.73 Sat Jan 12 15:16:51 2019 +++ src/sys/dev/ic/ahcisata_core.c Fri Jan 18 19:16:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.73 2019/01/12 15:16:51 jdolecek Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.73 2019/01/12 15:16:51 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $"); #include #include @@ -850,8 +850,6 @@ ahci_do_reset_drive(struct ata_channel * case TIMEOUT: aprint_error("%s port %d: setting WDCTL_RST failed " "for drive %d\n", AHCINAME(sc), chp->ch_channel, drive); - if (sigp) - *sigp = 0x; error = EBUSY; goto end; default: @@ -877,8 +875,6 @@ ahci_do_reset_drive(struct ata_channel * case TIMEOUT: aprint_error("%s port %d: clearing WDCTL_RST failed " "for drive %d\n", AHCINAME(sc), chp->ch_channel, drive); - if (sigp) - *sigp = 0x; error = EBUSY; goto end; default: @@ -900,8 +896,6 @@ skip_reset: if (i == AHCI_RST_WAIT) { aprint_error("%s: BSY never cleared, TD 0x%x\n", AHCINAME(sc), sig); - if (sigp) - *sigp = 0x; goto end; } AHCIDEBUG_PRINT(("%s: BSY took %d ms\n", AHCINAME(sc), i * 10), @@ -1000,7 +994,6 @@ ahci_probe_drive(struct ata_channel *chp return; } -again: /* bring interface up, accept FISs, power up and spin up device */ AHCI_WRITE(sc, AHCI_P_CMD(chp->ch_channel), AHCI_P_CMD_ICC_AC | AHCI_P_CMD_FRE | @@ -1011,6 +1004,9 @@ again: case SStatus_DET_DEV: ata_delay(chp, 500, "ahcidv", AT_WAIT); + /* Initial value, used in case the soft reset fails */ + sig = AHCI_READ(sc, AHCI_P_SIG(chp->ch_channel)); + if (sc->sc_ahci_cap & AHCI_CAP_SPM) { error = ahci_do_reset_drive(chp, PMP_PORT_CTL, AT_WAIT, , c_slot); @@ -1023,7 +1019,7 @@ again: PMP_PORT_CTL); sc->sc_ahci_cap &= ~AHCI_CAP_SPM; -goto again; +ahci_reset_channel(chp, AT_WAIT); } } else { ahci_do_reset_drive(chp, 0, AT_WAIT, , c_slot);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Fri Jan 18 19:16:50 UTC 2019 Modified Files: src/sys/dev/ic: ahcisata_core.c Log Message: revert rev 1.73 - while it apparently helped Christos case, it re-broke the disk detection on several other systems, so need something else To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/ahcisata_core.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xorg-server/include
Module Name:xsrc Committed By: mrg Date: Fri Jan 18 23:06:21 UTC 2019 Modified Files: xsrc/external/mit/xorg-server/include: dix-config.h xorg-config.h Log Message: define HAVE_BACKTRACE 1. now X server crashes have backtraces in the log. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 xsrc/external/mit/xorg-server/include/dix-config.h cvs rdiff -u -r1.16 -r1.17 \ xsrc/external/mit/xorg-server/include/xorg-config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/include/dix-config.h diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.31 xsrc/external/mit/xorg-server/include/dix-config.h:1.32 --- xsrc/external/mit/xorg-server/include/dix-config.h:1.31 Thu Jan 3 23:24:49 2019 +++ xsrc/external/mit/xorg-server/include/dix-config.h Fri Jan 18 23:06:21 2019 @@ -61,7 +61,7 @@ #define HAS_SHM 1 /* Has backtrace support */ -/* #undef HAVE_BACKTRACE */ +#define HAVE_BACKTRACE 1 /* Has libunwind support */ /* #undef HAVE_LIBUNWIND */ Index: xsrc/external/mit/xorg-server/include/xorg-config.h diff -u xsrc/external/mit/xorg-server/include/xorg-config.h:1.16 xsrc/external/mit/xorg-server/include/xorg-config.h:1.17 --- xsrc/external/mit/xorg-server/include/xorg-config.h:1.16 Mon Dec 31 09:50:03 2018 +++ xsrc/external/mit/xorg-server/include/xorg-config.h Fri Jan 18 23:06:21 2019 @@ -116,7 +116,7 @@ /* #undef HAS_APERTURE_DRV */ /* Has backtrace support */ -/* #undef HAVE_BACKTRACE */ +#define HAVE_BACKTRACE 1 /* Name of the period field in struct kbd_repeat */ /* #undef LNX_KBD_PERIOD_NAME */
CVS commit: src/tests/usr.bin/awk
Module Name:src Committed By: christos Date: Sat Jan 19 01:02:12 UTC 2019 Modified Files: src/tests/usr.bin/awk: t_awk.sh Log Message: add a range and a repeat regex test. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/awk/t_awk.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/awk/t_awk.sh diff -u src/tests/usr.bin/awk/t_awk.sh:1.5 src/tests/usr.bin/awk/t_awk.sh:1.6 --- src/tests/usr.bin/awk/t_awk.sh:1.5 Mon Dec 10 15:30:06 2012 +++ src/tests/usr.bin/awk/t_awk.sh Fri Jan 18 20:02:12 2019 @@ -1,4 +1,4 @@ -# $NetBSD: t_awk.sh,v 1.5 2012/12/10 20:30:06 christos Exp $ +# $NetBSD: t_awk.sh,v 1.6 2019/01/19 01:02:12 christos Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -335,6 +335,30 @@ newline_rs_body() { -x "printf '\n\n\nr1f1\nr1f2\n\nr2f1\nr2f2\n\n\n' | $awk '{\$1=\$1}1' RS= OFS=:" } +atf_test_case regex_range + +regex_range_head() { + atf_set "descr" "Test awk(1) with regex range" +} + +regex_range_body() { + atf_check \ + -o "inline:matched\n" \ + -x "echo '1 a' | $awk '/[[:digit:]][[:space:]][[:alpha:]]/ { print \"matched\"; }'" +} + +atf_test_case regex_repeat + +regex_repeat_head() { + atf_set "descr" "Test awk(1) with regex repeat" +} + +regex_repeat_body() { + atf_check \ + -o "inline:matched\n" \ + -x "echo 'aaacc' | $awk '/a{3}b{4}c{2}/ { print \"matched\"; }'" +} + atf_test_case modify_subsep modify_subsep_head() { @@ -374,5 +398,7 @@ atf_init_test_cases() { atf_add_test_case regex_reallocation_rs atf_add_test_case empty_rs atf_add_test_case newline_rs + atf_add_test_case regex_range + atf_add_test_case regex_repeat atf_add_test_case modify_subsep }
CVS commit: src/tests/usr.bin/awk
Module Name:src Committed By: christos Date: Sat Jan 19 01:02:12 UTC 2019 Modified Files: src/tests/usr.bin/awk: t_awk.sh Log Message: add a range and a repeat regex test. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/awk/t_awk.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xorg-server/include
Module Name:xsrc Committed By: mrg Date: Fri Jan 18 23:06:21 UTC 2019 Modified Files: xsrc/external/mit/xorg-server/include: dix-config.h xorg-config.h Log Message: define HAVE_BACKTRACE 1. now X server crashes have backtraces in the log. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 xsrc/external/mit/xorg-server/include/dix-config.h cvs rdiff -u -r1.16 -r1.17 \ xsrc/external/mit/xorg-server/include/xorg-config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/server/xorg-server
Module Name:src Committed By: mrg Date: Fri Jan 18 23:05:31 UTC 2019 Modified Files: src/external/mit/xorg/server/xorg-server: Makefile.Xserver Log Message: link in libexecinfo. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 \ src/external/mit/xorg/server/xorg-server/Makefile.Xserver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/server/xorg-server
Module Name:src Committed By: mrg Date: Fri Jan 18 23:05:31 UTC 2019 Modified Files: src/external/mit/xorg/server/xorg-server: Makefile.Xserver Log Message: link in libexecinfo. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 \ src/external/mit/xorg/server/xorg-server/Makefile.Xserver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/Makefile.Xserver diff -u src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.21 src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.22 --- src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.21 Mon Dec 31 11:14:03 2018 +++ src/external/mit/xorg/server/xorg-server/Makefile.Xserver Fri Jan 18 23:05:30 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.Xserver,v 1.21 2018/12/31 11:14:03 mrg Exp $ +# $NetBSD: Makefile.Xserver,v 1.22 2019/01/18 23:05:30 mrg Exp $ .for _SL in \ mi \ @@ -74,5 +74,5 @@ CPPFLAGS+= -I${X11SRCDIR.xorg-server}/in -I${DESTDIR}${X11INCDIR}/pixman-1 \ -I${X11SRCDIR.xorg-server}/../include -LDADD+= -lm -DPADD+= ${LIBM} +LDADD+= -lm -lexecinfo +DPADD+= ${LIBM} ${LIBEXECINFO}
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Sat Jan 19 00:37:42 UTC 2019 Modified Files: src/external/historical/nawk/dist: b.c Log Message: PR/53885: Martijn Dekker: Add ERE support from https://opensource.apple.com/tarballs/awk/awk-24.tar.gz To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/historical/nawk/dist/b.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/historical/nawk/dist/b.c diff -u src/external/historical/nawk/dist/b.c:1.5 src/external/historical/nawk/dist/b.c:1.6 --- src/external/historical/nawk/dist/b.c:1.5 Wed Jan 2 08:46:17 2013 +++ src/external/historical/nawk/dist/b.c Fri Jan 18 19:37:41 2019 @@ -70,6 +70,11 @@ int rlxval; static const uschar *rlxstr; static const uschar *prestr; /* current position in current re */ static const uschar *lastre; /* origin of last re */ +static const uschar *lastatom; /* origin of last Atom */ +static const uschar *starttok; +static const uschar *basestr; /* starts with original, replaced during + repetition processing */ +static const uschar *firstbasestr; static int setcnt; static int poscnt; @@ -176,6 +181,8 @@ fa *mkdfa(const char *s, int anchor) /* Node *p, *p1; fa *f; + firstbasestr = s; + basestr = firstbasestr; p = reparse(s); p1 = op2(CAT, op2(STAR, op2(ALL, NIL, NIL), NIL), p); /* put ALL STAR in front of reg. exp. */ @@ -198,6 +205,10 @@ fa *mkdfa(const char *s, int anchor) /* f->initstat = makeinit(f, anchor); f->anchor = anchor; f->restr = (uschar *) tostring(s); + if (firstbasestr != basestr) { + if (basestr) + free(__UNCONST(basestr)); + } return f; } @@ -740,9 +751,11 @@ Node *regexp(void) /* top-level parse of Node *primary(void) { Node *np; + int savelastatom; switch (rtok) { case CHAR: + lastatom = starttok; np = op2(CHAR, NIL, itonp(rlxval)); rtok = relex(); return (unary(np)); @@ -751,16 +764,19 @@ Node *primary(void) return (unary(op2(ALL, NIL, NIL))); case EMPTYRE: rtok = relex(); - return (unary(op2(ALL, NIL, NIL))); + return (unary(op2(EMPTYRE, NIL, NIL))); case DOT: + lastatom = starttok; rtok = relex(); return (unary(op2(DOT, NIL, NIL))); case CCL: np = op2(CCL, NIL, (Node*) cclenter((const char *) rlxstr)); + lastatom = starttok; rtok = relex(); return (unary(np)); case NCCL: np = op2(NCCL, NIL, (Node *) cclenter((const char *) rlxstr)); + lastatom = starttok; rtok = relex(); return (unary(np)); case '^': @@ -770,6 +786,8 @@ Node *primary(void) rtok = relex(); return (unary(op2(CHAR, NIL, NIL))); case '(': + lastatom = starttok; + savelastatom = starttok - basestr; /* Retain over recursion */ rtok = relex(); if (rtok == ')') { /* special pleading for () */ rtok = relex(); @@ -777,6 +795,7 @@ Node *primary(void) } np = regexp(); if (rtok == ')') { + lastatom = basestr + savelastatom; /* Restore */ rtok = relex(); return (unary(np)); } @@ -791,8 +810,12 @@ Node *primary(void) Node *concat(Node *np) { switch (rtok) { - case CHAR: case DOT: case ALL: case EMPTYRE: case CCL: case NCCL: case '$': case '(': + case CHAR: case DOT: case ALL: case CCL: case NCCL: case '$': case '(': return (concat(op2(CAT, np, primary(; + case EMPTYRE: + rtok = relex(); + return (concat(op2(CAT, op2(CCL, NIL, (Node *) tostring("")), +primary(; } return (np); } @@ -869,6 +892,115 @@ static const struct charclass { { NULL, 0, NULL }, }; +#define REPEAT_SIMPLE 0 +#define REPEAT_PLUS_APPENDED 1 +#define REPEAT_WITH_Q 2 +#define REPEAT_ZERO 3 + +static int +replace_repeat(const uschar *reptok, int reptoklen, const uschar *atom, + int atomlen, int firstnum, int secondnum, int special_case) +{ + int i, j; + uschar *buf = 0; + int ret = 1; + int init_q = (firstnum==0); /* first added char will be ? */ + int n_q_reps = secondnum-firstnum; /* m>n, so reduce until {1,m-n} left */ + int prefix_length = reptok - basestr; /* prefix includes first rep */ + int suffix_length = strlen(reptok) - reptoklen; /* string after rep specifier */ + int size = prefix_length + suffix_length; + + if (firstnum > 1) { /* add room for reps 2 through firstnum */ + size += atomlen*(firstnum-1); + } + + /* Adjust size of buffer for special cases */ + if (special_case == REPEAT_PLUS_APPENDED) { + size++; /* for the final + */ + } else if (special_case == REPEAT_WITH_Q) { + size += init_q + (atomlen+1)* n_q_reps; + } else if (special_case == REPEAT_ZERO) { + size += 2; /* just a null ERE: () */ + } + if ((buf = (uschar *) malloc(size+1)) == NULL) + FATAL("out of space in reg expr %.10s..", lastre); + memcpy(buf, basestr, prefix_length); /* copy prefix */ + j = prefix_length; + if (special_case == REPEAT_ZERO) { + j -= atomlen; + buf[j++] = '('; + buf[j++] = ')'; + } + for (i=1; i < firstnum; i++) { /* copy x reps */ +
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Sat Jan 19 00:37:42 UTC 2019 Modified Files: src/external/historical/nawk/dist: b.c Log Message: PR/53885: Martijn Dekker: Add ERE support from https://opensource.apple.com/tarballs/awk/awk-24.tar.gz To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/historical/nawk/dist/b.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/sun
Module Name:src Committed By: macallan Date: Sat Jan 19 00:16:43 UTC 2019 Modified Files: src/sys/dev/sun: cgsix.c Log Message: allow font loading, resizing etc. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sun/cgsix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sun/cgsix.c diff -u src/sys/dev/sun/cgsix.c:1.67 src/sys/dev/sun/cgsix.c:1.68 --- src/sys/dev/sun/cgsix.c:1.67 Thu Apr 21 18:06:06 2016 +++ src/sys/dev/sun/cgsix.c Sat Jan 19 00:16:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cgsix.c,v 1.67 2016/04/21 18:06:06 macallan Exp $ */ +/* $NetBSD: cgsix.c,v 1.68 2019/01/19 00:16:43 macallan Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.67 2016/04/21 18:06:06 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.68 2019/01/19 00:16:43 macallan Exp $"); #include #include @@ -158,7 +158,7 @@ struct wsscreen_descr cgsix_defaultscree 0, 0, /* will be filled in -- XXX shouldn't, it's global */ NULL, /* textops */ 8, 16, /* font width/height */ - WSSCREEN_WSCOLORS, /* capabilities */ + WSSCREEN_WSCOLORS | WSSCREEN_RESIZE | WSSCREEN_UNDERLINE, NULL /* modecookie */ }; @@ -562,6 +562,8 @@ cg6attach(struct cgsix_softc *sc, const sc->sc_gc.gc_bitblt = cgsix_bitblt; sc->sc_gc.gc_blitcookie = sc; sc->sc_gc.gc_rop = CG6_ALU_COPY; + sc->vd.show_screen_cookie = >sc_gc; + sc->vd.show_screen_cb = glyphcache_adapt; if(isconsole) { /* we mess with cg6_console_screen only once */ @@ -1024,7 +1026,7 @@ cgsixmmap(dev_t dev, off_t off, int prot { struct cgsix_softc *sc = device_lookup_private(_cd, minor(dev)); struct mmo *mo; - u_int u, sz; + u_int u, sz, flags; static struct mmo mmo[] = { { CG6_USER_RAM, 0, CGSIX_RAM_OFFSET }, @@ -1053,12 +1055,18 @@ cgsixmmap(dev_t dev, off_t off, int prot if ((u_long)off < mo->mo_uaddr) continue; u = off - mo->mo_uaddr; - sz = mo->mo_size ? mo->mo_size : - sc->sc_ramsize; + if (mo->mo_size == 0) { + flags = BUS_SPACE_MAP_LINEAR | +BUS_SPACE_MAP_PREFETCHABLE; + sz = sc->sc_ramsize; + } else { + flags = BUS_SPACE_MAP_LINEAR; + sz = mo->mo_size; + } if (u < sz) { return (bus_space_mmap(sc->sc_bustag, sc->sc_paddr, u+mo->mo_physoff, -prot, BUS_SPACE_MAP_LINEAR)); +prot, flags)); } } @@ -1161,7 +1169,8 @@ cgsix_mmap(void *v, void *vs, off_t offs if (offset < sc->sc_ramsize) { return bus_space_mmap(sc->sc_bustag, sc->sc_paddr, - CGSIX_RAM_OFFSET + offset, prot, BUS_SPACE_MAP_LINEAR); + CGSIX_RAM_OFFSET + offset, prot, + BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE); } return -1; } @@ -1241,12 +1250,14 @@ cgsix_init_screen(void *cookie, struct v av = sc->sc_ramsize - (sc->sc_height * sc->sc_stride); ri->ri_flg = RI_CENTER | RI_8BIT_IS_RGB; if (av > (128 * 1024)) { - ri->ri_flg |= RI_ENABLE_ALPHA; + ri->ri_flg |= RI_ENABLE_ALPHA | RI_PREFER_ALPHA; } ri->ri_bits = sc->sc_fb.fb_pixels; - + scr->scr_flags |= VCONS_LOADFONT; + rasops_init(ri, 0, 0); - ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_REVERSE; + ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_REVERSE | + WSSCREEN_UNDERLINE | WSSCREEN_RESIZE; rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight, sc->sc_width / ri->ri_font->fontwidth);
CVS commit: src/sys/dev/sun
Module Name:src Committed By: macallan Date: Sat Jan 19 00:16:43 UTC 2019 Modified Files: src/sys/dev/sun: cgsix.c Log Message: allow font loading, resizing etc. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sun/cgsix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.