CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: scole Date: Fri Sep 16 17:32:36 UTC 2016 Modified Files: src/sys/arch/macppc/dev: platinumfb.c Log Message: Add note about 16 bit console brokenness To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/dev/platinumfb.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/macppc/dev/platinumfb.c diff -u src/sys/arch/macppc/dev/platinumfb.c:1.2 src/sys/arch/macppc/dev/platinumfb.c:1.3 --- src/sys/arch/macppc/dev/platinumfb.c:1.2 Wed Jul 6 13:28:34 2016 +++ src/sys/arch/macppc/dev/platinumfb.c Fri Sep 16 17:32:36 2016 @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: platinumfb.c,v 1.2 2016/07/06 13:28:34 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: platinumfb.c,v 1.3 2016/09/16 17:32:36 scole Exp $"); #include #include @@ -87,6 +87,13 @@ __KERNEL_RCSID(0, "$NetBSD: platinumfb.c #define PLATINUM_FB_DEPTH 16 /* + * XXX 16 bit console not working without this patch to rasops15.c, + * http://mail-index.netbsd.org/current-users/2016/09/14/msg030132.html + * see thread, but rasops may need separate flags for host byte order + * and video hw byte order + */ + +/* * resolution, from one of platinumfb_setting vmode_name's. */ #define PLATINUM_FB_VMODE "1024x768x60"
CVS commit: src/distrib/notes/macppc
Module Name:src Committed By: scole Date: Thu Sep 15 19:27:47 UTC 2016 Modified Files: src/distrib/notes/macppc: contents hardware Log Message: updates for PPC601 support being added To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/notes/macppc/contents cvs rdiff -u -r1.48 -r1.49 src/distrib/notes/macppc/hardware Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/macppc/contents diff -u src/distrib/notes/macppc/contents:1.11 src/distrib/notes/macppc/contents:1.12 --- src/distrib/notes/macppc/contents:1.11 Tue May 19 19:30:28 2015 +++ src/distrib/notes/macppc/contents Thu Sep 15 19:27:47 2016 @@ -1,6 +1,6 @@ -.\" $NetBSD: contents,v 1.11 2015/05/19 19:30:28 snj Exp $ +.\" $NetBSD: contents,v 1.12 2016/09/15 19:27:47 scole Exp $ .\" -.\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. +.\" Copyright (c) 1999-2016 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -62,6 +62,11 @@ A gzipped .Nx kernel containing code for everything supported in this release. . +. It Pa netbsd-GENERIC_601.gz +A gzipped +.Nx +kernel containing code for PowerPC 601 machines. +. . It Pa netbsd-GENERIC.MP.gz . A gzipped @@ -191,7 +196,17 @@ kernel named .Pa /netbsd . You .Em must -install this distribution set. +install this distribution set unless you have a PowerPC 601 machine. +.It Sy kern-GENERIC_601 +This set contains a +.Nx*M +\*V +.Li GENERIC_601 +kernel named +.Pa /netbsd . +You +.Em must +install this distribution set if you have a PowerPC 601 machine. .It Sy kern-GENERIC.MP This set contains a .Nx*M Index: src/distrib/notes/macppc/hardware diff -u src/distrib/notes/macppc/hardware:1.48 src/distrib/notes/macppc/hardware:1.49 --- src/distrib/notes/macppc/hardware:1.48 Tue May 19 19:30:28 2015 +++ src/distrib/notes/macppc/hardware Thu Sep 15 19:27:47 2016 @@ -1,4 +1,4 @@ -.\"$NetBSD: hardware,v 1.48 2015/05/19 19:30:28 snj Exp $ +.\"$NetBSD: hardware,v 1.49 2016/09/15 19:27:47 scole Exp $ . Currently, .Nx*M @@ -34,15 +34,6 @@ Open Firmware version 2.4 is slightly di Open Firmware version 3 is altogether different, but easier to set up for .Nx . .Pp -At present, -.Nx*M -does not support the PPC 601 microprocessor, which means that the -PowerMacintosh 7200 and 7500 models are not supported. -The PowerMacintosh 7500 may be upgraded to a PPC 604, G3 -or G4 microprocessor via a daughtercard replacement, in which case -.Nx -will run on this system. -.Pp The minimal configuration requires 16 MB of RAM and 160 MB of disk space. To install the entire system requires considerably more, plus space for the swap partition (usually the RAM size, unless you've got a lot of RAM). @@ -58,7 +49,7 @@ version: .It Em "Open Firmware 1.0.5" .Pp .(bullet -compact -Apple PowerMacintosh (7300, 7500 (with CPU upgrade), 7600, 8500, 8600, 9500, +Apple PowerMacintosh (7200, 7300, 7500, 7600, 8500, 8600, 9500, and 9600) .It Apple Workgroup Server 8550 @@ -150,9 +141,6 @@ G5 models are supported as a 32-bit port . .Ss2 Unsupported models .(bullet -compact -offset indent -Systems with Open Firmware, but using a PPC 601 microprocessor -(PowerMacintosh 7200 and 7500 (without CPU upgrade)) -.It Systems with a PowerPC microprocessor, but lacking Open Firmware .(bullet -compact Apple PowerBook (1400, 2300, and 5300) @@ -179,7 +167,8 @@ part of the upgrade) CPU upgrades .(bullet -compact Only one CPU in a multiprocessor system is supported with the GENERIC kernel. -All CPUs are supported with the GENERIC.MP kernel. +For the 601, only one CPU is supported with the GENERIC_601 kernel. +All CPUs (except the 601) are supported with the GENERIC.MP kernel. .It Most CPU upgrades are supported. Some older models will not automatically enable the L2 and/or L3 caches on @@ -355,9 +344,12 @@ systems is reported to have the same pro PCI frame buffers which have Open Firmware support (ATI, IMS, Matrox, and NVIDIA have several models which work) .It +Valkyrie and Platinum framebuffer drivers +.Pq Em valkyriefb and Em platinumfb +.It Full wscons capabilities, such as virtual terminals and color text are available. (Note however that switching between virtual terminals -while running an X session is not supported at present.) +while running an X session may not be supported by all drivers.) .bullet) .It Audio
CVS commit: src/share/man/man4/man4.macppc
Module Name:src Committed By: scole Date: Thu Sep 15 15:19:00 UTC 2016 Modified Files: src/share/man/man4/man4.macppc: platinumfb.4 Log Message: Reference rasops(9), not rasops(4) which doesn't exist To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/man4.macppc/platinumfb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.macppc/platinumfb.4 diff -u src/share/man/man4/man4.macppc/platinumfb.4:1.2 src/share/man/man4/man4.macppc/platinumfb.4:1.3 --- src/share/man/man4/man4.macppc/platinumfb.4:1.2 Thu Sep 15 09:11:47 2016 +++ src/share/man/man4/man4.macppc/platinumfb.4 Thu Sep 15 15:19:00 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: platinumfb.4,v 1.2 2016/09/15 09:11:47 wiz Exp $ +.\" $NetBSD: platinumfb.4,v 1.3 2016/09/15 15:19:00 scole Exp $ .\" .\" Copyright (c) 2016 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -43,7 +43,7 @@ This driver should support console outpu .Pp It may be required to set the output-device to 'screen' in Open Firmware. .Sh SEE ALSO -.Xr rasops 4 , +.Xr rasops 9 , .Xr wsdisplay 4 .Sh HISTORY The
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: scole Date: Wed Sep 14 20:05:04 UTC 2016 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add platinumfb man page To generate a diff of this commit: cvs rdiff -u -r1.1533 -r1.1534 src/distrib/sets/lists/man/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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1533 src/distrib/sets/lists/man/mi:1.1534 --- src/distrib/sets/lists/man/mi:1.1533 Wed Aug 24 22:50:57 2016 +++ src/distrib/sets/lists/man/mi Wed Sep 14 20:05:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1533 2016/08/24 22:50:57 szptvlfn Exp $ +# $NetBSD: mi,v 1.1534 2016/09/14 20:05:04 scole Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1388,6 +1388,7 @@ ./usr/share/man/cat4/macppc/mesh.0 man-sys-catman .cat ./usr/share/man/cat4/macppc/obio.0 man-sys-catman .cat ./usr/share/man/cat4/macppc/pbms.0 man-sys-catman .cat +./usr/share/man/cat4/macppc/platinumfb.0 man-sys-catman .cat ./usr/share/man/cat4/macppc/snapper.0 man-sys-catman .cat ./usr/share/man/cat4/mainbus.0 man-sys-catman .cat ./usr/share/man/cat4/makphy.0 man-sys-catman .cat @@ -4435,6 +4436,7 @@ ./usr/share/man/html4/macppc/mesh.html man-sys-htmlman html ./usr/share/man/html4/macppc/obio.html man-sys-htmlman html ./usr/share/man/html4/macppc/pbms.html man-sys-htmlman html +./usr/share/man/html4/macppc/platinumfb.html man-sys-htmlman html ./usr/share/man/html4/macppc/snapper.html man-sys-htmlman html ./usr/share/man/html4/mainbus.html man-sys-htmlman html ./usr/share/man/html4/makphy.html man-sys-htmlman html @@ -7332,6 +7334,7 @@ ./usr/share/man/man4/macppc/mesh.4 man-sys-man .man ./usr/share/man/man4/macppc/obio.4 man-sys-man .man ./usr/share/man/man4/macppc/pbms.4 man-sys-man .man +./usr/share/man/man4/macppc/platinumfb.4 man-sys-man .man ./usr/share/man/man4/macppc/snapper.4 man-sys-man .man ./usr/share/man/man4/mainbus.4 man-sys-man .man ./usr/share/man/man4/makphy.4 man-sys-man .man
CVS commit: src/share/man/man4/man4.macppc
Module Name:src Committed By: scole Date: Wed Sep 14 20:04:22 UTC 2016 Modified Files: src/share/man/man4/man4.macppc: Makefile Added Files: src/share/man/man4/man4.macppc: platinumfb.4 Log Message: Add platinumfb man page To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/man4.macppc/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.macppc/platinumfb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.macppc/Makefile diff -u src/share/man/man4/man4.macppc/Makefile:1.9 src/share/man/man4/man4.macppc/Makefile:1.10 --- src/share/man/man4/man4.macppc/Makefile:1.9 Tue Dec 12 19:25:54 2006 +++ src/share/man/man4/man4.macppc/Makefile Wed Sep 14 20:04:22 2016 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.9 2006/12/12 19:25:54 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2016/09/14 20:04:22 scole Exp $ MAN= autoconf.4 awacs.4 bm.4 gm.4 intro.4 \ - mesh.4 obio.4 pbms.4 snapper.4 + mesh.4 obio.4 pbms.4 platinumfb.4 snapper.4 MANSUBDIR= /macppc Added files: Index: src/share/man/man4/man4.macppc/platinumfb.4 diff -u /dev/null src/share/man/man4/man4.macppc/platinumfb.4:1.1 --- /dev/null Wed Sep 14 20:04:22 2016 +++ src/share/man/man4/man4.macppc/platinumfb.4 Wed Sep 14 20:04:22 2016 @@ -0,0 +1,63 @@ +.\" $NetBSD: platinumfb.4,v 1.1 2016/09/14 20:04:22 scole Exp $ +.\" +.\" Copyright (c) 2016 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" 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. +.\" +.Dd September 14, 2016 +.Dt PLATINUMFB 4 macppc +.Os +.Sh NAME +.Nm platinumfb +.Nd Apple Platinum framebuffer driver +.Sh SYNOPSIS +.Cd "platinumfb0 at mainbus?" +.Sh DESCRIPTION +The +.Nm +driver provides support for Apple Platinum graphics devices found in a +couple early model PowerMacs such as the 7200. +.Pp +This driver should support console output (with rastor ops) and X +(in unaccelerated modes). +.Pp +It may be required to set the output-device to 'screen' in Open Firmware. +.Sh SEE ALSO +.Xr rasops 4 , +.Xr wsdisplay 4 +.Sh HISTORY +The +.Nm +device driver appeared in +.Nx 7.0 . +.Sh AUTHORS +The +.Nm +driver was written by Sean Cole. +.Sh BUGS +Early PowerMacs with the +.Nm +device may not work through Open Firmware. +.Pp +.Xr X 7 +is pretty slow.
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 12 02:08:20 UTC 2016 Modified Files: src/sys/arch/ia64/ia64: vm_machdep.c Log Message: Add volatile flag which might help with ski emulator and longjmp, ok'ed by To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 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.11 src/sys/arch/ia64/ia64/vm_machdep.c:1.12 --- src/sys/arch/ia64/ia64/vm_machdep.c:1.11 Thu Feb 10 14:46:46 2011 +++ src/sys/arch/ia64/ia64/vm_machdep.c Fri Aug 12 02:08:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.11 2011/02/10 14:46:46 pooka Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.12 2016/08/12 02:08:20 scole Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp void (*func)(void *), void *arg) { struct pcb *pcb1, *pcb2; - struct trapframe *tf; + struct trapframe * volatile tf; pcb1 = lwp_getpcb(l1); pcb2 = lwp_getpcb(l2);
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Tue Aug 9 13:45:45 UTC 2016 Modified Files: src/sys/arch/ia64/include: atomic.h Log Message: Rename some functions so any atomic ops from this file and/or can be used. May want to pare overlap in the future, but let's leave both options for now To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/atomic.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/ia64/include/atomic.h diff -u src/sys/arch/ia64/include/atomic.h:1.2 src/sys/arch/ia64/include/atomic.h:1.3 --- src/sys/arch/ia64/include/atomic.h:1.2 Mon Aug 8 17:44:24 2016 +++ src/sys/arch/ia64/include/atomic.h Tue Aug 9 13:45:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.2 2016/08/08 17:44:24 scole Exp $ */ +/* $NetBSD: atomic.h,v 1.3 2016/08/09 13:45:45 scole Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -28,14 +28,8 @@ * $FreeBSD: releng/10.1/sys/ia64/include/atomic.h 262004 2014-02-16 23:08:21Z marcel $ */ -#ifndef _MACHINE_ATOMIC_H_ -#define _MACHINE_ATOMIC_H_ - -/* XXX need these? -#define mb() __asm __volatile("mf") -#define wmb() mb() -#define rmb() mb() -*/ +#ifndef _IA64_ATOMIC_H_ +#define _IA64_ATOMIC_H_ /* * Various simple arithmetic on memory which is atomic in the presence @@ -391,20 +385,11 @@ atomic_fetchadd_long(volatile u_long *p, } /* - * XXX already defined in - * src/common/lib/libc/arch/ia64/atomic/atomic.S. Need to sort out - * what to do with this file and atomic.S. atomic.S version comments - * (from 2008) say it is not tested at all, but if it works we may not - * need anything in this file? - */ -#if 0 - -/* * atomic_swap_(volatile *p, v); */ static __inline uint32_t -atomic_swap_32(volatile uint32_t *p, uint32_t v) +ia64_atomic_swap_32(volatile uint32_t *p, uint32_t v) { uint32_t r; @@ -414,7 +399,7 @@ atomic_swap_32(volatile uint32_t *p, uin } static __inline uint64_t -atomic_swap_64(volatile uint64_t *p, uint64_t v) +ia64_atomic_swap_64(volatile uint64_t *p, uint64_t v) { uint64_t r; @@ -422,10 +407,9 @@ atomic_swap_64(volatile uint64_t *p, uin "r"(v), "m"(*p) : "memory"); return (r); } -#endif -#define atomic_swap_int atomic_swap_32 -#define atomic_swap_long atomic_swap_64 -#define atomic_swap_ptr atomic_swap_64 +#define ia64_atomic_swap_int ia64_atomic_swap_32 +#define ia64_atomic_swap_long ia64_atomic_swap_64 +#define ia64_atomic_swap_ptr ia64_atomic_swap_64 -#endif /* ! _MACHINE_ATOMIC_H_ */ +#endif /* ! _IA64_ATOMIC_H_ */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Mon Aug 8 17:44:24 UTC 2016 Modified Files: src/sys/arch/ia64/include: atomic.h Log Message: Import later FreeBSD version, add note about atomic.S which contains similar functions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/atomic.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/ia64/include/atomic.h diff -u src/sys/arch/ia64/include/atomic.h:1.1 src/sys/arch/ia64/include/atomic.h:1.2 --- src/sys/arch/ia64/include/atomic.h:1.1 Fri Apr 7 14:21:18 2006 +++ src/sys/arch/ia64/include/atomic.h Mon Aug 8 17:44:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */ +/* $NetBSD: atomic.h,v 1.2 2016/08/08 17:44:24 scole Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -25,12 +25,18 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/include/atomic.h,v 1.10 2005/09/27 17:39:10 jhb Exp $ + * $FreeBSD: releng/10.1/sys/ia64/include/atomic.h 262004 2014-02-16 23:08:21Z marcel $ */ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ +/* XXX need these? +#define mb() __asm __volatile("mf") +#define wmb() mb() +#define rmb() mb() +*/ + /* * Various simple arithmetic on memory which is atomic in the presence * of interrupts and SMP safe. @@ -44,7 +50,7 @@ "mov ar.ccv=%2;;\n\t" \ "cmpxchg" #sz "." #sem " %0=%4,%3,ar.ccv\n\t" \ : "=r" (ret), "=m" (*p) \ - : "r" (cmpval), "r" (newval), "m" (*p) \ + : "r" ((uint64_t)cmpval), "r" (newval), "m" (*p) \ : "memory") /* @@ -140,8 +146,11 @@ ATOMIC_STORE_LOAD(long, 64, "8") #undef ATOMIC_STORE_LOAD -#define atomic_load_acq_ptr atomic_load_acq_64 -#define atomic_store_rel_ptr atomic_store_rel_64 +#define atomic_load_acq_ptr(p) \ +((void *)atomic_load_acq_64((volatile uint64_t *)p)) + +#define atomic_store_rel_ptr(p, v) \ +atomic_store_rel_64((volatile uint64_t *)p, (uint64_t)v) #define IA64_ATOMIC(sz, type, name, width, op)\ static __inline type \ @@ -260,6 +269,7 @@ IA64_ATOMIC(8, uint64_t, subtract, 64, - #define atomic_add_rel_long atomic_add_rel_64 #define atomic_subtract_rel_long atomic_subtract_rel_64 +/* XXX Needs casting. */ #define atomic_set_ptr atomic_set_64 #define atomic_clear_ptr atomic_clear_64 #define atomic_add_ptr atomic_add_64 @@ -313,13 +323,18 @@ atomic_cmpset_rel_64(volatile uint64_t* #define atomic_cmpset_64 atomic_cmpset_acq_64 #define atomic_cmpset_int atomic_cmpset_32 #define atomic_cmpset_long atomic_cmpset_64 -#define atomic_cmpset_ptr atomic_cmpset_64 #define atomic_cmpset_acq_int atomic_cmpset_acq_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 -#define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 + +#define atomic_cmpset_acq_ptr(p, o, n) \ +(atomic_cmpset_acq_64((volatile uint64_t *)p, (uint64_t)o, (uint64_t)n)) + +#define atomic_cmpset_ptr atomic_cmpset_acq_ptr + +#define atomic_cmpset_rel_ptr(p, o, n) \ +(atomic_cmpset_rel_64((volatile uint64_t *)p, (uint64_t)o, (uint64_t)n)) static __inline uint32_t atomic_readandclear_32(volatile uint32_t* p) @@ -343,6 +358,7 @@ atomic_readandclear_64(volatile uint64_t #define atomic_readandclear_int atomic_readandclear_32 #define atomic_readandclear_long atomic_readandclear_64 +#define atomic_readandclear_ptr atomic_readandclear_64 /* * Atomically add the value of v to the integer pointed to by p and return @@ -363,4 +379,53 @@ atomic_fetchadd_32(volatile uint32_t *p, #define atomic_fetchadd_int atomic_fetchadd_32 +static __inline u_long +atomic_fetchadd_long(volatile u_long *p, u_long v) +{ + u_long value; + + do { + value = *p; + } while (!atomic_cmpset_64(p, value, value + v)); + return (value); +} + +/* + * XXX already defined in + * src/common/lib/libc/arch/ia64/atomic/atomic.S. Need to sort out + * what to do with this file and atomic.S. atomic.S version comments + * (from 2008) say it is not tested at all, but if it works we may not + * need anything in this file? + */ +#if 0 + +/* + * atomic_swap_(volatile *p, v); + */ + +static __inline uint32_t +atomic_swap_32(volatile uint32_t *p, uint32_t v) +{ + uint32_t r; + + __asm __volatile ("xchg4 %0 = %3, %2;;" : "=r"(r), "=m"(*p) : + "r"(v), "m"(*p) : "memory"); + return (r); +} + +static __inline uint64_t +atomic_swap_64(volatile uint64_t *p, uint64_t v) +{ + uint64_t r; + + __asm __volatile ("xchg8 %0 = %3, %2;;" : "=r"(r), "=m"(*p) : + "r"(v), "m"(*p) : "memory"); + return (r); +} +#endif + +#define atomic_swap_int atomic_swap_32 +#define atomic_swap_long atomic_swap_64 +#define atomic_swap_ptr atomic_swap_64 + #endif /* !
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Mon Aug 8 17:20:17 UTC 2016 Modified Files: src/sys/arch/ia64/include: pte.h Log Message: Remove unused functions pte_atomic_clear() and pte_atomic_set() To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/pte.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/ia64/include/pte.h diff -u src/sys/arch/ia64/include/pte.h:1.3 src/sys/arch/ia64/include/pte.h:1.4 --- src/sys/arch/ia64/include/pte.h:1.3 Fri Aug 5 17:02:59 2016 +++ src/sys/arch/ia64/include/pte.h Mon Aug 8 17:20:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.3 2016/08/05 17:02:59 scole Exp $ */ +/* $NetBSD: pte.h,v 1.4 2016/08/08 17:20:17 scole Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -70,28 +70,14 @@ typedef uint64_t pt_entry_t; -#ifdef _KERNEL -static __inline pt_entry_t -pte_atomic_clear(pt_entry_t *ptep, uint64_t val) -{ - return (atomic_clear_64(ptep, val)); -} - -static __inline pt_entry_t -pte_atomic_set(pt_entry_t *ptep, uint64_t val) -{ - return (atomic_set_64(ptep, val)); -} -#endif - /* * A long-format VHPT entry. */ struct ia64_lpte { -pt_entry_t pte; -uint64_titir; -uint64_ttag;/* includes ti */ -uint64_tchain; /* pa of collision chain */ + pt_entry_t pte; + uint64_t itir; + uint64_t tag; /* includes ti */ + uint64_t chain; /* pa of collision chain */ }; /*
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Mon Aug 8 12:25:35 UTC 2016 Modified Files: src/sys/arch/ia64/include: ia64_cpu.h Log Message: Import FreeBSD update To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/ia64_cpu.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/ia64/include/ia64_cpu.h diff -u src/sys/arch/ia64/include/ia64_cpu.h:1.2 src/sys/arch/ia64/include/ia64_cpu.h:1.3 --- src/sys/arch/ia64/include/ia64_cpu.h:1.2 Mon Jul 20 04:41:37 2009 +++ src/sys/arch/ia64/include/ia64_cpu.h Mon Aug 8 12:25:35 2016 @@ -1,6 +1,7 @@ -/* $NetBSD: ia64_cpu.h,v 1.2 2009/07/20 04:41:37 kiyohara Exp $ */ +/* $NetBSD: ia64_cpu.h,v 1.3 2016/08/08 12:25:35 scole Exp $ */ /*- + * Copyright (c) 2007 Marcel Moolenaar * Copyright (c) 2000 Doug Rabson * All rights reserved. * @@ -25,13 +26,37 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: releng/10.1/sys/ia64/include/ia64_cpu.h 223170 2011-06-17 04:26:03Z marcel $ */ #ifndef _MACHINE_IA64_CPU_H_ #define _MACHINE_IA64_CPU_H_ /* + * Local Interrupt ID. + */ +#define IA64_LID_GET_SAPIC_ID(x) ((u_int)((x) >> 16) & 0x) +#define IA64_LID_SET_SAPIC_ID(x) ((u_int)((x) & 0x) << 16) + +/* + * Definition of DCR bits. + */ +#define IA64_DCR_PP 0x0001 +#define IA64_DCR_BE 0x0002 +#define IA64_DCR_LC 0x0004 +#define IA64_DCR_DM 0x0100 +#define IA64_DCR_DP 0x0200 +#define IA64_DCR_DK 0x0400 +#define IA64_DCR_DX 0x0800 +#define IA64_DCR_DR 0x1000 +#define IA64_DCR_DA 0x2000 +#define IA64_DCR_DD 0x4000 + +#define IA64_DCR_DEFAULT \ +(IA64_DCR_DM | IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | \ + IA64_DCR_DR | IA64_DCR_DA | IA64_DCR_DD) + +/* * Definition of PSR and IPSR bits. */ #define IA64_PSR_BE 0x0002 @@ -180,10 +205,6 @@ ia64_fc(uint64_t va) __asm __volatile("fc %0" :: "r"(va)); } -/* - * Flush Instruction Cache - */ - static __inline void ia64_fc_i(uint64_t va) { @@ -238,7 +259,7 @@ ia64_tpa(uint64_t va) static __inline void ia64_ptc_e(uint64_t v) { - __asm __volatile("ptc.e %0;; srlz.d;;" :: "r"(v)); + __asm __volatile("ptc.e %0;; srlz.i;;" :: "r"(v)); } /* @@ -247,7 +268,7 @@ ia64_ptc_e(uint64_t v) static __inline void ia64_ptc_g(uint64_t va, uint64_t log2size) { - __asm __volatile("ptc.g %0,%1;; srlz.d;;" :: "r"(va), "r"(log2size)); + __asm __volatile("ptc.g %0,%1;;" :: "r"(va), "r"(log2size)); } /* @@ -256,7 +277,7 @@ ia64_ptc_g(uint64_t va, uint64_t log2siz static __inline void ia64_ptc_ga(uint64_t va, uint64_t log2size) { - __asm __volatile("ptc.ga %0,%1;; srlz.d;;" :: "r"(va), "r"(log2size)); + __asm __volatile("ptc.ga %0,%1;;" :: "r"(va), "r"(log2size)); } /* @@ -265,7 +286,84 @@ ia64_ptc_ga(uint64_t va, uint64_t log2si static __inline void ia64_ptc_l(uint64_t va, uint64_t log2size) { - __asm __volatile("ptc.l %0,%1;; srlz.d;;" :: "r"(va), "r"(log2size)); + __asm __volatile("ptc.l %0,%1;; srlz.i;;" :: "r"(va), "r"(log2size)); +} + +/* + * Invalidate the ALAT on the local processor. + */ +static __inline void +ia64_invala(void) +{ + __asm __volatile("invala;;"); +} + +/* + * Unordered memory load. + */ + +static __inline uint8_t +ia64_ld1(uint8_t *p) +{ + uint8_t v; + + __asm __volatile("ld1 %0=[%1];;" : "=r"(v) : "r"(p)); + return (v); +} + +static __inline uint16_t +ia64_ld2(uint16_t *p) +{ + uint16_t v; + + __asm __volatile("ld2 %0=[%1];;" : "=r"(v) : "r"(p)); + return (v); +} + +static __inline uint32_t +ia64_ld4(uint32_t *p) +{ + uint32_t v; + + __asm __volatile("ld4 %0=[%1];;" : "=r"(v) : "r"(p)); + return (v); +} + +static __inline uint64_t +ia64_ld8(uint64_t *p) +{ + uint64_t v; + + __asm __volatile("ld8 %0=[%1];;" : "=r"(v) : "r"(p)); + return (v); +} + +/* + * Unordered memory store. + */ + +static __inline void +ia64_st1(uint8_t *p, uint8_t v) +{ + __asm __volatile("st1 [%0]=%1;;" :: "r"(p), "r"(v)); +} + +static __inline void +ia64_st2(uint16_t *p, uint16_t v) +{ + __asm __volatile("st2 [%0]=%1;;" :: "r"(p), "r"(v)); +} + +static __inline void +ia64_st4(uint32_t *p, uint32_t v) +{ + __asm __volatile("st4 [%0]=%1;;" :: "r"(p), "r"(v)); +} + +static __inline void +ia64_st8(uint64_t *p, uint64_t v) +{ + __asm __volatile("st8 [%0]=%1;;" :: "r"(p), "r"(v)); } /* @@ -393,7 +491,7 @@ IA64_CR(lrr1) static __inline void ia64_set_rr(uint64_t rrbase, uint64_t v) { - __asm __volatile("mov rr[%0]=%1;; srlz.d;;" + __asm __volatile("mov rr[%0]=%1" :: "r"(rrbase), "r"(v) : "memory"); } @@ -421,17 +519,14 @@ ia64_enable_highfp(void) __asm __volatile("rsm psr.dfh;; srlz.d"); } -static __inline void -ia64_srlz_d(void) -{ - __asm __volatile("srlz.d"); -} - -static __inline void
CVS commit: src/sys/modules
Module Name:src Committed By: scole Date: Fri Aug 5 17:12:13 UTC 2016 Modified Files: src/sys/modules: Makefile Log Message: PR port-ia64/51261 Use exec_elf64 modules for ia64 To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/sys/modules/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/modules/Makefile diff -u src/sys/modules/Makefile:1.168 src/sys/modules/Makefile:1.169 --- src/sys/modules/Makefile:1.168 Thu Aug 4 23:53:47 2016 +++ src/sys/modules/Makefile Fri Aug 5 17:12:13 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.168 2016/08/04 23:53:47 pgoyette Exp $ +# $NetBSD: Makefile,v 1.169 2016/08/05 17:12:13 scole Exp $ .include @@ -133,12 +133,15 @@ SUBDIR+= xldscripts SUBDIR+= exec_aout .endif -.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_CPU} != "aarch64" +.if ${MACHINE_ARCH} != "alpha" && \ +${MACHINE_CPU} != "aarch64" && \ +${MACHINE_ARCH} != "ia64" SUBDIR+= exec_elf32 .endif .if ${MACHINE_CPU} == "aarch64" || \ ${MACHINE_ARCH} == "alpha" || \ +${MACHINE_ARCH} == "ia64" || \ ${MACHINE_ARCH} == "sparc64" || \ ${MACHINE_ARCH} == "x86_64" SUBDIR+= exec_elf64
CVS commit: src/sys/lib/libkern/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 17:10:48 UTC 2016 Modified Files: src/sys/lib/libkern/arch/ia64: Makefile.inc Removed Files: src/sys/lib/libkern/arch/ia64: memcpy.S Log Message: PR port-ia64/51261 Use common/lib/libc/arch/ia64/string functions To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r1.1 -r0 src/sys/lib/libkern/arch/ia64/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/sys/lib/libkern/arch/ia64/Makefile.inc diff -u src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 src/sys/lib/libkern/arch/ia64/Makefile.inc:1.5 --- src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/ia64/Makefile.inc Fri Aug 5 17:10:48 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.4 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.5 2016/08/05 17:10:48 scole Exp $ # SRCS+= ffs.c SRCS+= divdi3.S divsi3.S modsi3.S moddi3.S udivdi3.S udivsi3.S SRCS+= umoddi3.S umodsi3.S bswap64.S bswap32.S bswap16.S ntohl.S htonl.S -SRCS+= memcpy.S +SRCS+= bcopy.S bzero.S ffs.S memcpy.S memmove.S
CVS commit: src/sys/arch/ia64/stand/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 17:08:10 UTC 2016 Modified Files: src/sys/arch/ia64/stand/ia64/efi: Makefile src/sys/arch/ia64/stand/ia64/ski: Makefile Log Message: PR port-ia64/51261 Put skiload loader.efi loader.sym in /usr/mdec To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/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/ia64/stand/ia64/efi/Makefile diff -u src/sys/arch/ia64/stand/ia64/efi/Makefile:1.3 src/sys/arch/ia64/stand/ia64/efi/Makefile:1.4 --- src/sys/arch/ia64/stand/ia64/efi/Makefile:1.3 Sat Jan 22 19:19:19 2011 +++ src/sys/arch/ia64/stand/ia64/efi/Makefile Fri Aug 5 17:08:10 2016 @@ -1,48 +1,37 @@ +# $NetBSD: Makefile,v 1.4 2016/08/05 17:08:10 scole Exp $ + S= ${.CURDIR}/../../../../.. VERSIONFILE= ${.CURDIR}/version .include "../Makefile.booters" -PROG= loader.sym - -MAN=# Tell bsd.prog.mk that loader.sym is not a man page. - -INTERNALPROG= +PROGS= loader.sym loader.efi +MAN.loader.sym= # no man +MAN.loader.efi= # no man -SRCS= start.S conf.c efimd.c vers.c main.c - -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include/${MACHINE_ARCH} CPPFLAGS+= -I${IA64_STAND_DIR}/efi/libefi/ -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/libshell/ CPPFLAGS+= -I${IA64_STAND_DIR}/common/ CPPFLAGS+= -I${S} - -CPPFLAGS+= -DLOADER - -CPPFLAGS+= -DLIBKERN_OPTIMISE_SPACE \ - -DHEAP_VARIABLE - - -# Pick up FreeBSD glue -#CPPFLAGS+= -I${.CURDIR}/../../ +CPPFLAGS+= -DLOADER -DLIBKERN_OPTIMISE_SPACE -DHEAP_VARIABLE # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" +# need to do this after common stuff pulled in +SRCS.loader.sym:= start.S conf.c efimd.c vers.c main.c ${SRCS} -FILES= loader.efi - +# XXX verify +BINDIR?= /usr/mdec LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic -nostdlib -${PROG}: ${LDSCRIPT} +loader.sym: ${LDSCRIPT} -CLEANFILES+= vers.c loader.efi ${OBJS} +CLEANFILES+= vers.c ${OBJS} NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH} @@ -50,14 +39,14 @@ vers.c: ${VERSIONFILE} ${SOURCES} ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT} -loader.efi: ${PROG} - if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ - ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ +loader.efi: loader.sym + if [ `${OBJDUMP} -t loader.sym | fgrep '*UND*' | wc -l` != 0 ]; then \ + ${OBJDUMP} -t loader.sym | fgrep '*UND*'; \ exit 1; \ fi ${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \ -j .rela.dyn -j .reloc -j .sdata -j .text \ - --target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET} + --target=efi-app-${MACHINE_ARCH} loader.sym ${.TARGET} @echo link finished. all: loader.efi Index: src/sys/arch/ia64/stand/ia64/ski/Makefile diff -u src/sys/arch/ia64/stand/ia64/ski/Makefile:1.4 src/sys/arch/ia64/stand/ia64/ski/Makefile:1.5 --- src/sys/arch/ia64/stand/ia64/ski/Makefile:1.4 Sat Jan 22 19:19:19 2011 +++ src/sys/arch/ia64/stand/ia64/ski/Makefile Fri Aug 5 17:08:10 2016 @@ -6,6 +6,7 @@ VERSIONFILE= ${.CURDIR}/version PROG= skiload MAN=# +BINDIR?= /usr/mdec STRIP= # We must not strip skiload at install time. @@ -16,8 +17,6 @@ SRCS= conf.c copy.c delay.c devicename. CPPFLAGS+= -DLOADER -DSKIFS CPPFLAGS+= -I${S} CPPFLAGS+= -I${IA64_STAND_DIR}/common -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include/${MACHINE_ARCH} CPPFLAGS+= -DLIBKERN_OPTIMISE_SPACE \ -DHEAP_VARIABLE
CVS commit: src/sys/arch/ia64/pci
Module Name:src Committed By: scole Date: Fri Aug 5 17:04:52 UTC 2016 Modified Files: src/sys/arch/ia64/pci: pci_machdep.c Log Message: PR port-ia64/51261 Add pci_enumerate_bus stub so kernels will compile To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/pci/pci_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/pci/pci_machdep.c diff -u src/sys/arch/ia64/pci/pci_machdep.c:1.4 src/sys/arch/ia64/pci/pci_machdep.c:1.5 --- src/sys/arch/ia64/pci/pci_machdep.c:1.4 Fri Oct 2 05:22:51 2015 +++ src/sys/arch/ia64/pci/pci_machdep.c Fri Aug 5 17:04:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.4 2015/10/02 05:22:51 msaitoh Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.5 2016/08/05 17:04:52 scole Exp $ */ /* * Copyright (c) 2009, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.4 2015/10/02 05:22:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.5 2016/08/05 17:04:52 scole Exp $"); #include #include @@ -102,3 +102,13 @@ pci_conf_write(pci_chipset_tag_t pc, pci if (res.sal_status < 0) printf("pci configuration write failed\n"); } + +int +pci_enumerate_bus(struct pci_softc *sc, const int *locators, + int (*match)(const struct pci_attach_args *), struct pci_attach_args *pap) +{ + /* XXX implement */ + panic("ia64 pci_enumerate_bus not implemented"); + + return -1; +}
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:04:16 UTC 2016 Modified Files: src/sys/arch/ia64/include: vmparam.h Log Message: PR port-ia64/51261 Import more variables from FreeBSD that will be needed later To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/include/vmparam.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/ia64/include/vmparam.h diff -u src/sys/arch/ia64/include/vmparam.h:1.7 src/sys/arch/ia64/include/vmparam.h:1.8 --- src/sys/arch/ia64/include/vmparam.h:1.7 Sun Nov 14 13:33:22 2010 +++ src/sys/arch/ia64/include/vmparam.h Fri Aug 5 17:04:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.7 2010/11/14 13:33:22 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.8 2016/08/05 17:04:16 scole Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -63,7 +63,7 @@ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif - +#define IA64_VM_MINKERN_REGION 4 /* * PTEs for mapping user space into the kernel for phyio operations. @@ -82,6 +82,53 @@ #define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) #define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) +/* + * The Itanium architecture defines that all implementations support at + * least 51 virtual address bits (i.e. IMPL_VA_MSB=50). The unimplemented + * bits are sign-extended from VA{IMPL_VA_MSB}. As such, there's a gap in + * the virtual address range, which extends at most from 0x0004 + * to 0x1ffb. We define the top half of a region in terms of + * this worst-case gap. + */ +#define IA64_REGION_GAP_START 0x0004 +#define IA64_REGION_GAP_EXTEND 0x1ffc + +/* + * Parameters for Pre-Boot Virtual Memory (PBVM). + * The kernel, its modules and metadata are loaded in the PBVM by the loader. + * The PBVM consists of pages for which the mapping is maintained in a page + * table. The page table is at least 1 EFI page large (i.e. 4KB), but can be + * larger to accommodate more PBVM. The maximum page table size is 1MB. With + * 8 bytes per page table entry, this means that the PBVM has at least 512 + * pages and at most 128K pages. + * The GNU toolchain (in particular GNU ld) does not support an alignment + * larger than 64K. This means that we cannot guarantee page alignment for + * a page size that's larger than 64K. We do want to have text and data in + * different pages, which means that the maximum usable page size is 64KB. + * Consequently: + * The maximum total PBVM size is 8GB -- enough for a DVD image. A page table + * of a single EFI page (4KB) allows for 32MB of PBVM. + * + * The kernel is given the PA and size of the page table that provides the + * mapping of the PBVM. The page table itself is assumed to be mapped at a + * known virtual address and using a single translation wired into the CPU. + * As such, the page table is assumed to be a power of 2 and naturally aligned. + * The kernel also assumes that a good portion of the kernel text is mapped + * and wired into the CPU, but does not assume that the mapping covers the + * whole of PBVM. + */ +#define IA64_PBVM_RRIA64_VM_MINKERN_REGION +#define IA64_PBVM_BASE \ +(IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_GAP_EXTEND) + +#define IA64_PBVM_PGTBL_MAXSZ 1048576 +#define IA64_PBVM_PGTBL \ +(IA64_RR_BASE(IA64_PBVM_RR + 1) - IA64_PBVM_PGTBL_MAXSZ) + +#define IA64_PBVM_PAGE_SHIFT16 /* 64KB */ +#define IA64_PBVM_PAGE_SIZE (1 << IA64_PBVM_PAGE_SHIFT) +#define IA64_PBVM_PAGE_MASK (IA64_PBVM_PAGE_SIZE - 1) + #define IA64_ID_PAGE_SHIFT 28 /* 256M */ #define IA64_ID_PAGE_SIZE (1 << IA64_ID_PAGE_SHIFT) #define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1)
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:02:59 UTC 2016 Modified Files: src/sys/arch/ia64/include: pte.h Log Message: PR port-ia64/51261 Sync with FreeBSD, no functional changes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/pte.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/ia64/include/pte.h diff -u src/sys/arch/ia64/include/pte.h:1.2 src/sys/arch/ia64/include/pte.h:1.3 --- src/sys/arch/ia64/include/pte.h:1.2 Thu Dec 27 15:58:55 2012 +++ src/sys/arch/ia64/include/pte.h Fri Aug 5 17:02:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.2 2012/12/27 15:58:55 martin Exp $ */ +/* $NetBSD: pte.h,v 1.3 2016/08/05 17:02:59 scole Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: releng/10.1/sys/ia64/include/pte.h 137978 2004-11-21 21:40:08Z marcel $ */ #ifndef _MACHINE_PTE_H_ @@ -45,7 +45,6 @@ #define PTE_PL_KERN 0x #define PTE_PL_USER 0x0180 #define PTE_AR_MASK 0x0E00 - #define PTE_AR_R 0x #define PTE_AR_RX 0x0200 #define PTE_AR_RW 0x0400 @@ -95,7 +94,6 @@ struct ia64_lpte { uint64_tchain; /* pa of collision chain */ }; - /* * Layout of rr[x]. */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:01:56 UTC 2016 Modified Files: src/sys/arch/ia64/include: pci_machdep.h Log Message: PR port-ia64/51261 Add pci_enumerate_bus To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/pci_machdep.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/ia64/include/pci_machdep.h diff -u src/sys/arch/ia64/include/pci_machdep.h:1.2 src/sys/arch/ia64/include/pci_machdep.h:1.3 --- src/sys/arch/ia64/include/pci_machdep.h:1.2 Mon Jun 28 12:14:08 2010 +++ src/sys/arch/ia64/include/pci_machdep.h Fri Aug 5 17:01:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.2 2010/06/28 12:14:08 kiyohara Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.3 2016/08/05 17:01:56 scole Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -42,4 +42,13 @@ void pci_decompose_tag(pci_chipset_tag_t pcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int); void pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); +/* + * XXX should ia64_pci_enumerate_bus and + * #define PCI_MACHDEP_ENUMERATE_BUS ia64_pci_enumerate_bus + * be used? acpi_pci appears to require pci_enumerate_bus though. + */ +int pci_enumerate_bus(struct pci_softc *, const int *, + int (*)(const struct pci_attach_args *), + struct pci_attach_args *); + #endif
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:01:13 UTC 2016 Modified Files: src/sys/arch/ia64/include: mcontext.h Log Message: PR port-ia64/51261 Add __fpregset_t __gregset_t _UC_MACHINE_PC stubs To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/mcontext.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/ia64/include/mcontext.h diff -u src/sys/arch/ia64/include/mcontext.h:1.4 src/sys/arch/ia64/include/mcontext.h:1.5 --- src/sys/arch/ia64/include/mcontext.h:1.4 Thu Jun 30 01:41:05 2016 +++ src/sys/arch/ia64/include/mcontext.h Fri Aug 5 17:01:13 2016 @@ -1,9 +1,11 @@ -/* $NetBSD: mcontext.h,v 1.4 2016/06/30 01:41:05 mrg Exp $ */ +/* $NetBSD: mcontext.h,v 1.5 2016/08/05 17:01:13 scole Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * + * Copyright (c) 1999, 2003 Marcel Moolenaar + * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * @@ -15,6 +17,8 @@ * 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. + * 3. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -34,6 +38,19 @@ #include +/* XXX fix this, just get to compile for now */ +#define _NGREG 128 + +#ifndef __ASSEMBLER__ +typedef unsigned long __greg_t; +typedef __greg_t __gregset_t[_NGREG]; + +typedef struct { + union _ia64_fpreg __fpregs[_NGREG]; +} __fpregset_t; + +#endif /* __ASSEMBLER__ */ + /* * The mc_flags field provides the necessary clues when dealing with the gory * details of ia64 specific contexts. A comprehensive explanation is added for @@ -80,7 +97,6 @@ typedef struct __mcontext { unsigned long mc_flags; #define _MC_FLAGS_ASYNC_CONTEXT 0x0001 #define _MC_FLAGS_HIGHFP_VALID 0x0002 -#define _MC_FLAGS_KSE_SET_MBOX 0x0004 /* Undocumented. Has to go. */ #define _MC_FLAGS_SYSCALL_CONTEXT 0x0008 unsigned long _reserved_; struct _special mc_special; @@ -89,10 +105,15 @@ typedef struct __mcontext { struct _caller_saved mc_scratch; struct _caller_saved_fp mc_scratch_fp; struct _high_fp mc_high_fp; + + /* XXX fix */ + __gregset_t __gregs; + __fpregset_t __fpregs; } mcontext_t; #define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.mc_special.sp) -#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.mc_special.rp) +/* XXX or assembly "mov Rn = ip" or ...? */ +#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.mc_special.iip) static __inline void * __lwp_getprivate_fast(void)
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:59:26 UTC 2016 Modified Files: src/sys/arch/ia64/include: lock.h Log Message: PR port-ia64/51261 Add mb_read mb_write mb_memory To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/lock.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/ia64/include/lock.h diff -u src/sys/arch/ia64/include/lock.h:1.4 src/sys/arch/ia64/include/lock.h:1.5 --- src/sys/arch/ia64/include/lock.h:1.4 Mon Jul 20 04:41:37 2009 +++ src/sys/arch/ia64/include/lock.h Fri Aug 5 16:59:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.4 2009/07/20 04:41:37 kiyohara Exp $ */ +/* $NetBSD: lock.h,v 1.5 2016/08/05 16:59:26 scole Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -116,4 +116,26 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp = __SIMPLELOCK_UNLOCKED; } +/* XXX mf.a overkill for these? */ +static __inline void +mb_read(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + +static __inline void +mb_write(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + +static __inline void +mb_memory(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + #endif /* _IA64_LOCK_H_ */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:58:33 UTC 2016 Modified Files: src/sys/arch/ia64/include: elf_machdep.h Log Message: PR port-ia64/51261 Add macro R_TYPE() stub To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/elf_machdep.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/ia64/include/elf_machdep.h diff -u src/sys/arch/ia64/include/elf_machdep.h:1.1 src/sys/arch/ia64/include/elf_machdep.h:1.2 --- src/sys/arch/ia64/include/elf_machdep.h:1.1 Fri Apr 7 14:21:18 2006 +++ src/sys/arch/ia64/include/elf_machdep.h Fri Aug 5 16:58:33 2016 @@ -27,7 +27,8 @@ * * $FreeBSD: src/sys/ia64/include/elf.h,v 1.11 2003/09/25 01:10:24 peter Exp $ */ - +#ifndef _IA64_ELF_MACHDEP_H +#define _IA64_ELF_MACHDEP_H #define ELF32_MACHDEP_ENDIANNESS XXX /* break compilation */ #define ELF32_MACHDEP_ID_CASES \ @@ -145,6 +146,8 @@ #define SHF_IA_64_NORECOV 0x2000 /* section contains code that uses speculative instructions without * recovery code */ +/* XXX fix these for ld.elf_so */ +#define R_IA64_COPY (0) +#define R_TYPE(name)__CONCAT(R_IA64_,name) - - +#endif /* _IA64_ELF_MACHDEP_H */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:56:44 UTC 2016 Modified Files: src/sys/arch/ia64/include: Makefile Removed Files: src/sys/arch/ia64/include: acpi_func.h Log Message: PR port-ia64/51261 Remove local acpi_func.h as common version exists To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/include/Makefile cvs rdiff -u -r1.4 -r0 src/sys/arch/ia64/include/acpi_func.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/ia64/include/Makefile diff -u src/sys/arch/ia64/include/Makefile:1.6 src/sys/arch/ia64/include/Makefile:1.7 --- src/sys/arch/ia64/include/Makefile:1.6 Fri Jun 20 12:41:34 2014 +++ src/sys/arch/ia64/include/Makefile Fri Aug 5 16:56:43 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2014/06/20 12:41:34 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2016/08/05 16:56:43 scole Exp $ INCSDIR= /usr/include/ia64 -INCS= _regset.h acpi_func.h acpi_machdep.h ansi.h \ +INCS= _regset.h acpi_machdep.h ansi.h \ aout_machdep.h asm.h atomic.h bootinfo.h bswap.h cdefs.h \ cpu.h cpufunc.h dig64.h disklabel.h efi.h \ elf_machdep.h endian.h endian_machdep.h float.h fpu.h frame.h \
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:53:36 UTC 2016 Modified Files: src/sys/arch/ia64/ia64: support.S Log Message: PR port-ia64/51261 Use common/lib/libc/arch/ia64/string/bzero.S and other string functions To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/support.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/ia64/ia64/support.S diff -u src/sys/arch/ia64/ia64/support.S:1.6 src/sys/arch/ia64/ia64/support.S:1.7 --- src/sys/arch/ia64/ia64/support.S:1.6 Sun Aug 8 18:18:58 2010 +++ src/sys/arch/ia64/ia64/support.S Fri Aug 5 16:53:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: support.S,v 1.6 2010/08/08 18:18:58 chs Exp $ */ +/* $NetBSD: support.S,v 1.7 2016/08/05 16:53:36 scole Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -769,84 +769,10 @@ ENTRY(copyoutstr, 4) st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp // ret0 left over from copystr END(copyoutstr) /* - * Not the fastest bcopy in the world. - */ -ENTRY(bcopy, 3) - mov ret0=r0// return zero for copy{in,out} - ;; - cmp.le p6,p0=in2,r0 // bail if len <= 0 -(p6) br.ret.spnt.few rp - - sub r14=in1,in0 ;; // check for overlap - cmp.ltu p6,p0=r14,in2 // dst-src < len -(p6) br.cond.spnt.few 5f - - extr.u r14=in0,0,3 // src & 7 - extr.u r15=in1,0,3 ;; // dst & 7 - cmp.eq p6,p0=r14,r15 // different alignment? -(p6) br.cond.spnt.few 2f // branch if same alignment - -1: ld1 r14=[in0],1 ;; // copy bytewise - st1 [in1]=r14,1 - add in2=-1,in2 ;; // len-- - cmp.ne p6,p0=r0,in2 -(p6) br.cond.dptk.few 1b // loop - br.ret.sptk.few rp // done - -2: cmp.eq p6,p0=r14,r0 // aligned? -(p6) br.cond.sptk.few 4f - -3: ld1 r14=[in0],1 ;; // copy bytewise - st1 [in1]=r14,1 - extr.u r15=in0,0,3 // src & 7 - add in2=-1,in2 ;; // len-- - cmp.eq p6,p0=r0,in2 // done? - cmp.eq p7,p0=r0,r15 ;; // aligned now? -(p6) br.ret.spnt.few rp // return if done -(p7) br.cond.spnt.few 4f // go to main copy - br.cond.sptk.few 3b // more bytes to copy - - // At this point, in2 is non-zero - -4: mov r14=8 ;; - cmp.ltu p6,p0=in2,r14 ;; // len < 8? -(p6) br.cond.spnt.few 1b // byte copy the end - ld8 r15=[in0],8 ;; // copy word - st8 [in1]=r15,8 - add in2=-8,in2 ;; // len -= 8 - cmp.ne p6,p0=r0,in2 // done? -(p6) br.cond.spnt.few 4b // again - - br.ret.sptk.few rp // return - - // Don't bother optimising overlap case - -5: add in0=in0,in2 - add in1=in1,in2 ;; - add in0=-1,in0 - add in1=-1,in1 ;; - -6: ld1 r14=[in0],-1 ;; - st1 [in1]=r14,-1 - add in2=-1,in2 ;; - cmp.ne p6,p0=r0,in2 -(p6) br.cond.spnt.few 6b - - br.ret.sptk.few rp -END(bcopy) - -ENTRY(memcpy,3) - mov r14=in0 ;; - mov in0=in1 ;; - mov in1=r14 - br.cond.sptk.few bcopy -END(memcpy) - -/* * int kcopy(const void *from, void *to, size_t len); * Copy len bytes, abort on fault. */ @@ -876,12 +802,13 @@ ENTRY(kcopy, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// XXX netbsd kcopy same as freebsd? ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(kcopy) ENTRY(copyin, 3) @@ -914,12 +841,13 @@ ENTRY(copyin, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// return zero for copy{in,out} ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(copyin) ENTRY(copyout, 3) @@ -952,12 +880,13 @@ ENTRY(copyout, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// return zero for copy{in,out} ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(copyout) ENTRY(copyerr, 0)
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:51:56 UTC 2016 Added Files: src/sys/arch/ia64/ia64: procfs_machdep.c Log Message: PR port-ia64/51261 Add procfs_getcpuinfstr() To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/ia64/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/ia64/ia64/procfs_machdep.c diff -u /dev/null src/sys/arch/ia64/ia64/procfs_machdep.c:1.1 --- /dev/null Fri Aug 5 16:51:56 2016 +++ src/sys/arch/ia64/ia64/procfs_machdep.c Fri Aug 5 16:51:56 2016 @@ -0,0 +1,49 @@ +/* $NetBSD: procfs_machdep.c,v 1.1 2016/08/05 16:51:56 scole Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.1 2016/08/05 16:51:56 scole Exp $"); + +#include +#include +#include +#include +#include + + +/* + * Linux-style /proc/cpuinfo. + * Only used when procfs is mounted with -o linux. + */ +int +procfs_getcpuinfstr(char *buf, size_t *len) +{ + *len = 0; + + return 0; +}
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:50:07 UTC 2016 Added Files: src/sys/arch/ia64/ia64: core_machdep.c Log Message: PR port-ia64/51261 Add cpu_coredump() stub To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/ia64/core_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/ia64/ia64/core_machdep.c diff -u /dev/null src/sys/arch/ia64/ia64/core_machdep.c:1.1 --- /dev/null Fri Aug 5 16:50:07 2016 +++ src/sys/arch/ia64/ia64/core_machdep.c Fri Aug 5 16:50:07 2016 @@ -0,0 +1,59 @@ +/* $NetBSD: core_machdep.c,v 1.1 2016/08/05 16:50:07 scole Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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 /* RCS ID & Copyright macro defns */ +__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.1 2016/08/05 16:50:07 scole Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +/* + * Dump the machine specific header information at the start of a core dump. + */ +int +cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie, +struct core *chdr) +{ + /* XXX implement, pause in ski */ + __asm __volatile("break.i 0"); + + return -1; +}
CVS commit: src/sys/arch/ia64/conf
Module Name:src Committed By: scole Date: Fri Aug 5 16:48:04 UTC 2016 Modified Files: src/sys/arch/ia64/conf: files.ia64 Log Message: PR port-ia64/51261 Add pcibus so kernels will compile. Required for acpi now To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/conf/files.ia64 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/conf/files.ia64 diff -u src/sys/arch/ia64/conf/files.ia64:1.7 src/sys/arch/ia64/conf/files.ia64:1.8 --- src/sys/arch/ia64/conf/files.ia64:1.7 Sat Oct 1 15:59:27 2011 +++ src/sys/arch/ia64/conf/files.ia64 Fri Aug 5 16:48:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.ia64,v 1.7 2011/10/01 15:59:27 chs Exp $ +# $NetBSD: files.ia64,v 1.8 2016/08/05 16:48:04 scole Exp $ # # new style config file for ia64 architecture # @@ -25,6 +25,8 @@ file arch/ia64/ia64/interrupt.c file arch/ia64/ia64/vm_machdep.c file arch/ia64/ia64/efi.c file arch/ia64/ia64/sal.c +#file arch/ia64/ia64/physmem.c +#file arch/ia64/ia64/unaligned.c file arch/ia64/disasm/disasm_decode.c ddb file arch/ia64/disasm/disasm_extract.c ddb @@ -36,6 +38,7 @@ file arch/ia64/ia64/db_trace.c ddb file arch/ia64/ia64/exception.S file arch/ia64/ia64/context.S +#file arch/ia64/ia64/physical.S file arch/ia64/ia64/syscall_stubs.S file arch/ia64/ia64/support.S file arch/ia64/ia64/setjmp.S @@ -55,7 +58,7 @@ file arch/ia64/pci/pci_machdep.c acpi | # # System bus types # -device mainbus: cpubus, acpibus +device mainbus: cpubus, acpibus, pcibus attach mainbus at root file arch/ia64/ia64/mainbus.c mainbus @@ -86,6 +89,8 @@ device fdc {drive = -1} # XXX: Oops # PCI fixup options # XX: Oops, required by acpi.c defflag opt_pcifixup.h ACPI_PCI_FIXUP +# PCI Root Bridge +#device pchb: pcibus include "dev/acpi/files.acpi" include "arch/ia64/conf/majors.ia64"
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:46:56 UTC 2016 Modified Files: src/sys/arch/ia64/ia64: context.S Log Message: PR port-ia64/51261 Import later version from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/context.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/ia64/ia64/context.S diff -u src/sys/arch/ia64/ia64/context.S:1.5 src/sys/arch/ia64/ia64/context.S:1.6 --- src/sys/arch/ia64/ia64/context.S:1.5 Sun Mar 24 06:06:19 2013 +++ src/sys/arch/ia64/ia64/context.S Fri Aug 5 16:46:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: context.S,v 1.5 2013/03/24 06:06:19 kiyohara Exp $ */ +/* $NetBSD: context.S,v 1.6 2016/08/05 16:46:56 scole Exp $ */ /* * Copyright (c) 2003 Marcel Moolenaar @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/context.S,v 1.3 2003/07/02 12:57:07 ru Exp $ + * $FreeBSD: releng/10.1/sys/ia64/ia64/context.S 204184 2010-02-22 01:23:41Z marcel $ */ #include @@ -64,7 +64,7 @@ ENTRY(restorectx, 1) { .mmi loadrs ld8 r21=[r30],16 // rnat - mov pr=r18,0x1003e // Preserved pr (p1-p5, p16-p63) + mov pr=r18,0x1fffe ;; } { .mmi @@ -88,18 +88,18 @@ ENTRY(restorectx, 1) { .mmi ld8.fill r6=[r14],16 // r6 ld8.fill r7=[r15],16 // r7 - nop 1 + nop 0 ;; } { .mmi mov ar.unat=r16 mov ar.rsc=3 - nop 2 + nop 0 } { .mmi ld8 r17=[r14],16 // b1 ld8 r18=[r15],16 // b2 - nop 3 + nop 0 ;; } { .mmi @@ -288,7 +288,7 @@ ENTRY(swapctx, 2) (p15) br.ret.sptk rp ;; } -{ .mfb +{ .mib mov r32=r33 nop 0 br.sptk restorectx @@ -340,10 +340,10 @@ ENTRY(save_callee_saved, 1) mov r17=b5 ;; } -{ .mfi +{ .mii st8 [r14]=r17,16 // b5 - nop 0 mov r16=ar.lc + nop 0 ;; } { .mmb @@ -365,13 +365,13 @@ ENTRY(restore_callee_saved, 1) add r31=-8,r32 ;; } -{ .mmb +{ .mmi ld8.fill r4=[r31],16 // r4 ld8.fill r5=[r32],16 // r5 nop 0 ;; } -{ .mmb +{ .mmi ld8.fill r6=[r31],16 // r6 ld8.fill r7=[r32],16 // r7 nop 0 @@ -657,7 +657,7 @@ ENTRY(restore_high_fp, 1) ldf.fill f32=[r32],32 ;; ldf.fill f33=[r31],32 - ldf.fill f34=[r32],32 + ldf.fill f34=[r32],32 ;; ldf.fill f35=[r31],32 ldf.fill f36=[r32],32
CVS commit: src/sys/arch/ia64/disasm
Module Name:src Committed By: scole Date: Fri Aug 5 16:45:50 UTC 2016 Modified Files: src/sys/arch/ia64/disasm: disasm.h disasm_decode.c disasm_extract.c disasm_format.c disasm_int.h Log Message: PR port-ia64/51261 Import later version from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/disasm/disasm.h \ src/sys/arch/ia64/disasm/disasm_extract.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/disasm/disasm_decode.c \ src/sys/arch/ia64/disasm/disasm_int.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/disasm/disasm_format.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/disasm/disasm.h diff -u src/sys/arch/ia64/disasm/disasm.h:1.2 src/sys/arch/ia64/disasm/disasm.h:1.3 --- src/sys/arch/ia64/disasm/disasm.h:1.2 Thu Apr 3 17:02:34 2014 +++ src/sys/arch/ia64/disasm/disasm.h Fri Aug 5 16:45:50 2016 @@ -1,7 +1,7 @@ -/* $NetBSD: disasm.h,v 1.2 2014/04/03 17:02:34 martin Exp $ */ +/* $NetBSD: disasm.h,v 1.3 2016/08/05 16:45:50 scole Exp $ */ /*- - * Copyright (c) 2000-2003 Marcel Moolenaar + * Copyright (c) 2000-2006 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/disasm/disasm.h,v 1.3 2005/01/06 22:18:22 imp Exp $ + * $FreeBSD: releng/10.1/sys/ia64/disasm/disasm.h 172689 2007-10-16 02:49:40Z marcel $ */ #ifndef _DISASM_H_ @@ -112,6 +112,7 @@ enum asm_cmpltr_class { ASM_CC_RW, ASM_CC_TREL, ASM_CC_TRUNC, ASM_CC_UNIT, ASM_CC_UNPACK, ASM_CC_UNS, + ASM_CC_VMSW, ASM_CC_XMA }; @@ -205,15 +206,16 @@ enum asm_fmt { ASM_FMT_F1, ASM_FMT_F2, ASM_FMT_F3, ASM_FMT_F4, ASM_FMT_F5, ASM_FMT_F6, ASM_FMT_F7, ASM_FMT_F8, ASM_FMT_F9, ASM_FMT_F10, ASM_FMT_F11, ASM_FMT_F12, - ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15, + ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15, ASM_FMT_F16, ASM_FMT_I = 0x0400, ASM_FMT_I1, ASM_FMT_I2, ASM_FMT_I3, ASM_FMT_I4, ASM_FMT_I5, ASM_FMT_I6, ASM_FMT_I7, ASM_FMT_I8, ASM_FMT_I9, ASM_FMT_I10, ASM_FMT_I11, ASM_FMT_I12, ASM_FMT_I13, ASM_FMT_I14, ASM_FMT_I15, ASM_FMT_I16, - ASM_FMT_I17, ASM_FMT_I19, ASM_FMT_I20, ASM_FMT_I21, - ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24, ASM_FMT_I25, - ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28, ASM_FMT_I29, + ASM_FMT_I17, ASM_FMT_I18, ASM_FMT_I19, ASM_FMT_I20, + ASM_FMT_I21, ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24, + ASM_FMT_I25, ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28, + ASM_FMT_I29, ASM_FMT_I30, ASM_FMT_M = 0x0500, ASM_FMT_M1, ASM_FMT_M2, ASM_FMT_M3, ASM_FMT_M4, ASM_FMT_M5, ASM_FMT_M6, ASM_FMT_M7, ASM_FMT_M8, @@ -226,9 +228,10 @@ enum asm_fmt { ASM_FMT_M33, ASM_FMT_M34, ASM_FMT_M35, ASM_FMT_M36, ASM_FMT_M37, ASM_FMT_M38, ASM_FMT_M39, ASM_FMT_M40, ASM_FMT_M41, ASM_FMT_M42, ASM_FMT_M43, ASM_FMT_M44, - ASM_FMT_M45, ASM_FMT_M46, + ASM_FMT_M45, ASM_FMT_M46, ASM_FMT_M47, ASM_FMT_M48, ASM_FMT_X = 0x0600, - ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4 + ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4, + ASM_FMT_X5 }; /* Instruction opcodes. */ @@ -252,6 +255,7 @@ enum asm_op { ASM_OP_FPRSQRTA, ASM_OP_FRCPA, ASM_OP_FRSQRTA, ASM_OP_FSELECT, ASM_OP_FSETC, ASM_OP_FSWAP, ASM_OP_FSXT, ASM_OP_FWB, ASM_OP_FXOR, ASM_OP_GETF, + ASM_OP_HINT, ASM_OP_INVALA, ASM_OP_ITC, ASM_OP_ITR, ASM_OP_LD1, ASM_OP_LD16, ASM_OP_LD2, ASM_OP_LD4, ASM_OP_LD8, ASM_OP_LDF, ASM_OP_LDF8, ASM_OP_LDFD, ASM_OP_LDFE, ASM_OP_LDFP8, @@ -273,9 +277,10 @@ enum asm_op { ASM_OP_ST2, ASM_OP_ST4, ASM_OP_ST8, ASM_OP_STF, ASM_OP_STF8, ASM_OP_STFD, ASM_OP_STFE, ASM_OP_STFS, ASM_OP_SUB, ASM_OP_SUM, ASM_OP_SXT1, ASM_OP_SXT2, ASM_OP_SXT4, ASM_OP_SYNC, - ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_THASH, ASM_OP_TNAT, ASM_OP_TPA, - ASM_OP_TTAG, + ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_TF, ASM_OP_THASH, ASM_OP_TNAT, + ASM_OP_TPA, ASM_OP_TTAG, ASM_OP_UNPACK1, ASM_OP_UNPACK2, ASM_OP_UNPACK4, + ASM_OP_VMSW, ASM_OP_XCHG1, ASM_OP_XCHG2, ASM_OP_XCHG4, ASM_OP_XCHG8, ASM_OP_XMA, ASM_OP_XOR, ASM_OP_ZXT1, ASM_OP_ZXT2, ASM_OP_ZXT4, Index: src/sys/arch/ia64/disasm/disasm_extract.c diff -u src/sys/arch/ia64/disasm/disasm_extract.c:1.2 src/sys/arch/ia64/disasm/disasm_extract.c:1.3 --- src/sys/arch/ia64/disasm/disasm_extract.c:1.2 Sun Jul 17 20:54:42 2011 +++ src/sys/arch/ia64/disasm/disasm_extract.c Fri Aug 5 16:45:50 2016 @@ -1,7 +1,7 @@ -/* $NetBSD: disasm_extract.c,v 1.2 2011/07/17 20:54:42 joerg Exp $ */ +/* $NetBSD: disasm_extract.c,v 1.3 2016/08/05 16:45:50 scole Exp $ */ /*- - * Copyright (c) 2000-2003 Marcel Moolenaar + * Copyright (c) 2000-2006 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ #include -/* __FBSDID("$FreeBSD:
CVS commit: src/share/mk
Module Name:src Committed By: scole Date: Fri Aug 5 16:44:31 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: PR port-ia64/51261 For ia64, don't build elf32, disable MKDYNAMICROOT and MKRUMP. ld.elf_so and rump are not implemented yet To generate a diff of this commit: cvs rdiff -u -r1.938 -r1.939 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.938 src/share/mk/bsd.own.mk:1.939 --- src/share/mk/bsd.own.mk:1.938 Thu Jul 7 07:52:24 2016 +++ src/share/mk/bsd.own.mk Fri Aug 5 16:44:31 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.938 2016/07/07 07:52:24 martin Exp $ +# $NetBSD: bsd.own.mk,v 1.939 2016/08/05 16:44:31 scole Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -636,7 +636,7 @@ MACHINES.x86_64= amd64 # for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH # OBJECT_FMTS= -.if ${MACHINE_ARCH} != "alpha" +.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64" OBJECT_FMTS+= elf32 .endif .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != "" @@ -703,6 +703,11 @@ check_RELEASEDIR: .PHONY .NOTMAIN # MKDYNAMICROOT?= yes +# For ia64, ld.elf_so not yet implemented +.if ${MACHINE_ARCH} == "ia64" +MKDYNAMICROOT= no +.endif + # # Where the system object and source trees are kept; can be configurable # by the user in case they want them in ~/foosrc and ~/fooobj (for example). @@ -1126,6 +1131,11 @@ MKGCCCMDS?= ${MKGCC} MKKMOD= no .endif +# Rump doesn't work yet on ia64 +.if ${MACHINE} == "ia64" +MKRUMP= no +.endif + # # MK* options which default to "no". Note that MKZFS has a different # default for some platforms, see above.
CVS commit: src/lib/libc/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:40:47 UTC 2016 Modified Files: src/lib/libc/arch/ia64/gen: Makefile.inc src/lib/libc/arch/ia64/sys: __clone.S ptrace.S Added Files: src/lib/libc/arch/ia64/gen: fpgetsticky.c fpsetsticky.c getcontext.S makecontext.c swapcontext.S Log Message: PR port-ia64/51261 Add stubs for ia64 build To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/ia64/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/ia64/gen/fpgetsticky.c \ src/lib/libc/arch/ia64/gen/fpsetsticky.c \ src/lib/libc/arch/ia64/gen/getcontext.S \ src/lib/libc/arch/ia64/gen/makecontext.c \ src/lib/libc/arch/ia64/gen/swapcontext.S cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/ia64/sys/__clone.S \ src/lib/libc/arch/ia64/sys/ptrace.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/ia64/gen/Makefile.inc diff -u src/lib/libc/arch/ia64/gen/Makefile.inc:1.7 src/lib/libc/arch/ia64/gen/Makefile.inc:1.8 --- src/lib/libc/arch/ia64/gen/Makefile.inc:1.7 Thu Jun 30 09:14:30 2016 +++ src/lib/libc/arch/ia64/gen/Makefile.inc Fri Aug 5 16:40:47 2016 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.7 2016/06/30 09:14:30 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.8 2016/08/05 16:40:47 scole Exp $ SRCS+= _lwp.c SRCS+= bswap16.c bswap32.c bswap64.c SRCS+= setjmp.S _setjmp.S sigsetjmp.S SRCS+= flt_rounds.c fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c +SRCS+= fpgetsticky.c fpsetsticky.c +SRCS+= getcontext.S makecontext.c swapcontext.S + # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c SRCS+= fpclassifyf_ieee754.c fpclassifyd_ieee754.c Index: src/lib/libc/arch/ia64/sys/__clone.S diff -u src/lib/libc/arch/ia64/sys/__clone.S:1.1 src/lib/libc/arch/ia64/sys/__clone.S:1.2 --- src/lib/libc/arch/ia64/sys/__clone.S:1.1 Sun Sep 10 21:22:34 2006 +++ src/lib/libc/arch/ia64/sys/__clone.S Fri Aug 5 16:40:47 2016 @@ -1,3 +1,42 @@ -/* $NetBSD: __clone.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */ +/* $NetBSD: __clone.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */ + +/*- + * Copyright (c) 2006,2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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. + */ + +/* XXX: Stub */ +#include + +#include "SYS.h" + +#ifdef WEAK_ALIAS +WEAK_ALIAS(clone, __clone) +#endif + +ENTRY(__clone,4) + /* XXX implement, break in ski*/ + break.i 0 -/* XXX: Stub */ \ No newline at end of file +END(__clone) Index: src/lib/libc/arch/ia64/sys/ptrace.S diff -u src/lib/libc/arch/ia64/sys/ptrace.S:1.1 src/lib/libc/arch/ia64/sys/ptrace.S:1.2 --- src/lib/libc/arch/ia64/sys/ptrace.S:1.1 Sun Sep 10 21:22:34 2006 +++ src/lib/libc/arch/ia64/sys/ptrace.S Fri Aug 5 16:40:47 2016 @@ -1,3 +1,36 @@ -/* $NetBSD: ptrace.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */ +/* $NetBSD: ptrace.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */ -/* XXX: Stub */ \ No newline at end of file +/*- + * Copyright (c) 2006,2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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
CVS commit: src/external/gpl3
Module Name:src Committed By: scole Date: Fri Aug 5 16:25:19 UTC 2016 Modified Files: src/external/gpl3/gcc.old/dist/gcc: tree-ssa-ccp.c src/external/gpl3/gcc/dist/gcc: tree-ssa-ccp.c Log Message: PR port-ia64/51261 Change JEMALLOC_TINY_MIN_2POW for ia64 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.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/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c diff -u src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.3 src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.4 --- src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.3 Wed Sep 23 03:39:11 2015 +++ src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c Fri Aug 5 16:25:18 2016 @@ -2541,6 +2541,7 @@ struct gimple_opt_pass pass_fold_builtin #if defined(__alpha__) || defined(__amd64__) || defined(__sparc64__) \ || (defined(__arm__) && defined(__ARM_EABI)) || defined(__powerpc__) \ + || defined(__ia64__) \ || ((defined(__mips__) || defined(__riscv__)) && defined(_LP64)) #define JEMALLOC_TINY_MIN_2POW 3 #endif Index: src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c diff -u src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.6 src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.7 --- src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.6 Fri Mar 18 10:07:52 2016 +++ src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c Fri Aug 5 16:25:19 2016 @@ -2852,7 +2852,7 @@ make_pass_fold_builtins (gcc::context *c #if defined(__alpha__) || defined(__amd64__) || defined(__sparc64__) \ || (defined(__arm__) && defined(__ARM_EABI__)) \ - || defined(__powerpc__) \ + || defined(__ia64__) || defined(__powerpc__) \ || ((defined(__mips__) || defined(__riscv__)) && defined(_LP64)) #define JEMALLOC_TINY_MIN_2POW 3 #endif
CVS commit: src/etc/etc.ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:22:08 UTC 2016 Added Files: src/etc/etc.ia64: MAKEDEV.conf Makefile.inc rc.conf.append ttys Log Message: PR port-ia64/51261 Stubs for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/etc/etc.ia64/MAKEDEV.conf \ src/etc/etc.ia64/Makefile.inc src/etc/etc.ia64/rc.conf.append \ src/etc/etc.ia64/ttys Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/etc/etc.ia64/MAKEDEV.conf diff -u /dev/null src/etc/etc.ia64/MAKEDEV.conf:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/MAKEDEV.conf Fri Aug 5 16:22:08 2016 @@ -0,0 +1,48 @@ +# $NetBSD: MAKEDEV.conf,v 1.1 2016/08/05 16:22:08 scole Exp $ + +# As of 2005-03-15, the "init" case must not create more than 1024 entries. +all_md) + makedev std wscons wt0 fd0 fd1 + makedev wd0 wd1 wd2 wd3 wd4 wd5 wd6 wd7 + makedev sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 + makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7 + makedev tty0 tty1 tty2 tty3 + makedev st0 st1 ch0 cd0 cd1 mcd0 vnd0 + makedev bpf + makedev ccd0 md0 random + makedev cgd0 cgd1 + makedev amr0 iop0 mfi0 mlx0 mly0 dpti0 dpt0 twe0 icp0 + makedev ed0 ed1 + makedev raid0 raid1 raid2 raid3 + makedev ld0 ld1 ld2 ld3 + makedev xbd0 xbd1 xbd2 xbd3 xen + makedev usbs + makedev ipty + makedev local + makedev lpa0 lpa1 lpa2 + makedev lpt0 lpt1 lpt2 + makedev ss0 uk0 uk1 + makedev speaker joy0 joy1 + makedev apm satlink0 + makedev cmos + makedev audio + makedev radio + makedev isdns + makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 + makedev scsibus0 scsibus1 scsibus2 scsibus3 + makedev ses0 ses1 ses2 ses3 + makedev sysmon + makedev bktr + makedev ttyCZ0 ttyCY0 + makedev agp0 + makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7 + makedev pci8 pci9 pci10 pci11 + makedev altq + makedev cir0 cir1 irframe0 irframe1 + makedev dmoverio + makedev kttcp + makedev nsmb + makedev io + makedev bio + makedev cfs + ;; Index: src/etc/etc.ia64/Makefile.inc diff -u /dev/null src/etc/etc.ia64/Makefile.inc:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/Makefile.inc Fri Aug 5 16:22:08 2016 @@ -0,0 +1,27 @@ +# $NetBSD: Makefile.inc,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# etc.ia64/Makefile.inc -- ia64-specific etc Makefile targets +# + +# If you change the list of distributed kernels, don't forget +# to update the release documentation in distrib/notes/common/contents + +# XXX fix all this + +KERNEL_SETS= GENERIC +KERNEL_SETS+= GENERIC.SKI + +#BUILD_KERNELS+= INSTALL + +#INSTALLATION_DIRS+= installation/cdrom +#INSTALLATION_DIRS+= installation/diskimage +#INSTALLATION_DIRS+= installation/instkernel +#INSTALLATION_DIRS+= installation/netboot + +#snap_md_post: +# cd ${KERNSRCDIR}/arch/i386/stand/dosboot && ${MAKE} release +# cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release +# cd ${KERNSRCDIR}/arch/i386/stand/misc && ${MAKE} release +# ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso' +# ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs' +# cd ${KERNSRCDIR}/arch/alpha/stand/netboot && ${MAKE} release Index: src/etc/etc.ia64/rc.conf.append diff -u /dev/null src/etc/etc.ia64/rc.conf.append:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/rc.conf.append Fri Aug 5 16:22:08 2016 @@ -0,0 +1,15 @@ +# $NetBSD: rc.conf.append,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# Arch-specific rc.conf(5) configuration. + +# powerd(8) is required under Xen to manage save/restore events. +# +if /sbin/sysctl -q machdep.xen; then + powerd=YES +fi + +# powerd(8) is recommended if ACPI is enabled to handle PM events. +# +if /sbin/sysctl -q hw.acpi.root; then + powerd=YES +fi Index: src/etc/etc.ia64/ttys diff -u /dev/null src/etc/etc.ia64/ttys:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/ttys Fri Aug 5 16:22:08 2016 @@ -0,0 +1,23 @@ +# +# $NetBSD: ttys,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# name gettytype status comments + +# In normal operation, getty on 'console' pseudo-device is disabled, and is +# enabled for the correct 'real' device (e.g. one of the serial ports). + +# console pseudo-device +console "/usr/libexec/getty std.9600" vt100 on secure +constty "/usr/libexec/getty std.9600" vt100 off secure + +# Workstation console (framebuffer) ttys +ttyE0 "/usr/libexec/getty std.9600" wsvt25 off secure +ttyE1 "/usr/libexec/getty std.9600" wsvt25 off secure + +# DEC 3000 Z8530 ("scc") serial ports +ttyB0 "/usr/libexec/getty std.9600" unknown off secure +ttyB1 "/usr/libexec/getty std.9600" unknown off secure + +# AlphaStation NS16550 ("com") serial ports +ttyC0 "/usr/libexec/getty std.9600" unknown off secure +ttyC1 "/usr/libexec/getty std.9600" unknown off secure
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: scole Date: Fri Aug 5 16:21:09 UTC 2016 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/modules: md.ia64 Added Files: src/distrib/sets/lists/base: md.ia64 src/distrib/sets/lists/comp: md.ia64 Log Message: PR port-ia64/51261 Changes for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base/md.ia64 cvs rdiff -u -r1.779 -r1.780 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/comp/md.ia64 cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/modules/md.ia64 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/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.779 src/distrib/sets/lists/base/shl.mi:1.780 --- src/distrib/sets/lists/base/shl.mi:1.779 Tue Aug 2 14:54:03 2016 +++ src/distrib/sets/lists/base/shl.mi Fri Aug 5 16:21:09 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.779 2016/08/02 14:54:03 jakllsch Exp $ +# $NetBSD: shl.mi,v 1.780 2016/08/05 16:21:09 scole Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -88,15 +88,15 @@ ./lib/libz.so base-sys-shlib dynamicroot ./lib/libz.so.1 base-sys-shlib dynamicroot ./lib/libz.so.1.0base-sys-shlib dynamicroot -./lib/npf/ext_log.sobase-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_log.so.0base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_log.so.0.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so.0.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so.0.0 base-npf-shlib dynamicroot,compatfile,npf +./lib/npf/ext_log.sobase-npf-shlib compatfile,npf +./lib/npf/ext_log.so.0base-npf-shlib compatfile,npf +./lib/npf/ext_log.so.0.0 base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so.0 base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so.0.0 base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so.0 base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so.0.0 base-npf-shlib compatfile,npf ./libexec/ld.elf_sobase-sys-shlib dynamicroot ./usr/lib/i18n/libBIG5.so base-i18n-shlib compatfile ./usr/lib/i18n/libBIG5.so.5 base-i18n-shlib compatfile @@ -870,4 +870,4 @@ ./usr/lib/security/pam_skey.so.4 base-sys-shlib compatfile,skey,pam ./usr/lib/security/pam_ssh.so.4 base-sys-shlib compatfile,crypto,pam ./usr/lib/security/pam_unix.so.4 base-sys-shlib compatfile,pam -./usr/libexec/ld.elf_sobase-sys-shlib +./usr/libexec/ld.elf_sobase-sys-shlib dynamicroot Index: src/distrib/sets/lists/modules/md.ia64 diff -u src/distrib/sets/lists/modules/md.ia64:1.3 src/distrib/sets/lists/modules/md.ia64:1.4 --- src/distrib/sets/lists/modules/md.ia64:1.3 Sun Aug 10 11:51:40 2014 +++ src/distrib/sets/lists/modules/md.ia64 Fri Aug 5 16:21:09 2016 @@ -1,3 +1,5 @@ -# $NetBSD: md.ia64,v 1.3 2014/08/10 11:51:40 bad Exp $ +# $NetBSD: md.ia64,v 1.4 2016/08/05 16:21:09 scole Exp $ +./@MODULEDIR@/exec_elf64 base-kernel-modules kmod +./@MODULEDIR@/exec_elf64/exec_elf64.kmod base-kernel-modules kmod ./@MODULEDIR@/acpiverbose base-kernel-modules kmod ./@MODULEDIR@/acpiverbose/acpiverbose.kmod base-kernel-modules kmod Added files: Index: src/distrib/sets/lists/base/md.ia64 diff -u /dev/null src/distrib/sets/lists/base/md.ia64:1.1 --- /dev/null Fri Aug 5 16:21:09 2016 +++ src/distrib/sets/lists/base/md.ia64 Fri Aug 5 16:21:09 2016 @@ -0,0 +1,9 @@ +# $NetBSD: md.ia64,v 1.1 2016/08/05 16:21:09 scole Exp $ +# +# XXX add skiload for now +# +# XXX loader.sym probaby not necessary +# +./usr/mdec/loader.efi base-sysutil-bin +./usr/mdec/loader.sym base-sysutil-bin +./usr/mdec/skiload base-sysutil-bin Index: src/distrib/sets/lists/comp/md.ia64 diff -u /dev/null src/distrib/sets/lists/comp/md.ia64:1.1 --- /dev/null Fri Aug 5 16:21:09 2016 +++ src/distrib/sets/lists/comp/md.ia64 Fri Aug 5 16:21:09 2016 @@ -0,0 +1,62 @@ +# $NetBSD: md.ia64,v 1.1 2016/08/05 16:21:09 scole Exp $ +./usr/include/gcc-4.8/ia64intrin.h comp-c-include obsolete +./usr/include/gcc-4.8/tgmath.h comp-c-include obsolete +./usr/include/gcc-5/ia64intrin.h comp-c-include +./usr/include/gcc-5/tgmath.h comp-c-include +./usr/include/ia64 comp-c-include +./usr/include/ia64/_regset.h comp-c-include +./usr/include/ia64/acpi_machdep.h comp-c-include +./usr/include/ia64/ansi.h comp-c-include +./usr/include/ia64/aout_machdep.h
CVS commit: src/distrib/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:18:19 UTC 2016 Added Files: src/distrib/ia64: Makefile src/distrib/ia64/cdroms: Makefile src/distrib/ia64/cdroms/installcd: Makefile Log Message: PR port-ia64/51261 Add stubs for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/ia64/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/ia64/cdroms/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/ia64/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/distrib/ia64/Makefile diff -u /dev/null src/distrib/ia64/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ + +.include +.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" + +.include + +# XXX add other SUBDIR + +SUBDIR= cdroms +#SUBDIR+= netboot ramdisk + +TARGETS+= release + +# XXX sort out loader.efi +#BOOTOBJ!= cd ${KERNSRCDIR}/arch/ia64/stand/ia64/efi && ${PRINTOBJDIR} +#EFIBOOTERS= ${BOOTOBJ}/loader.sym ${BOOTOBJ}/loader.efi + +#release: check_RELEASEDIR .WAIT ${EFIBOOTERS} +# ${RELEASE_INSTALL} ${EFIBOOTERS} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation + +iso_image: + ${MAKEDIRTARGET} cdroms iso_image + +.include Index: src/distrib/ia64/cdroms/Makefile diff -u /dev/null src/distrib/ia64/cdroms/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/cdroms/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ + +SUBDIR= installcd +TARGETS+= release iso_image + +.include Index: src/distrib/ia64/cdroms/installcd/Makefile diff -u /dev/null src/distrib/ia64/cdroms/installcd/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/cdroms/installcd/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ +CDBASE= ia64cd # gives ${CDBASE}.iso +#CDINSTKERNEL= ../../instkernel/instkernel +CDKERNELS= netbsd netbsd +CDRELEASE= true # include $RELEASEDIR/$MACHINE + +#make the CD bootable +image_md_post: + ${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE} + +.include "${.CURDIR}/../../../common/Makefile.bootcd" +
CVS commit: src/common/lib/libc/arch/ia64/string
Module Name:src Committed By: scole Date: Fri Aug 5 15:06:02 UTC 2016 Added Files: src/common/lib/libc/arch/ia64/string: bcopy.S bzero.S ffs.S memcpy.S memmove.S Log Message: PR port-ia64/51261 Imported from FreeBSD with a minor change or two To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/ia64/string/bcopy.S \ src/common/lib/libc/arch/ia64/string/bzero.S \ src/common/lib/libc/arch/ia64/string/ffs.S \ src/common/lib/libc/arch/ia64/string/memcpy.S \ src/common/lib/libc/arch/ia64/string/memmove.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/ia64/string/bcopy.S diff -u /dev/null src/common/lib/libc/arch/ia64/string/bcopy.S:1.1 --- /dev/null Fri Aug 5 15:06:02 2016 +++ src/common/lib/libc/arch/ia64/string/bcopy.S Fri Aug 5 15:06:02 2016 @@ -0,0 +1,102 @@ +/* $NetBSD: bcopy.S,v 1.1 2016/08/05 15:06:02 scole Exp $ */ + +/*- + * Copyright (c) 2000 Doug Rabson + * All rights reserved. + * + * 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 AUTHOR 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 AUTHOR 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. + * + * __FBSDID("$FreeBSD: releng/10.1/lib/libc/ia64/string/bcopy.S 125669 2004-02-10 20:45:28Z cperciva $"); + */ + +#include + +/* + * void + * bcopy(const void *src, void *dst, size_t len); + */ + +/* + * Not the fastest bcopy in the world. + */ +ENTRY(bcopy, 3) + + cmp.le p6,p0=in2,r0 // bail if len <= 0 +(p6) br.ret.spnt.few rp + + sub r14=in1,in0 ;; // check for overlap + cmp.ltu p6,p0=r14,in2 // dst-src < len +(p6) br.cond.spnt.few 5f + + extr.u r14=in0,0,3 // src & 7 + extr.u r15=in1,0,3 ;; // dst & 7 + cmp.eq p6,p0=r14,r15 // different alignment? +(p6) br.cond.spnt.few 2f // branch if same alignment + +1: ld1 r14=[in0],1 ;; // copy bytewise + st1 [in1]=r14,1 + add in2=-1,in2 ;; // len-- + cmp.ne p6,p0=r0,in2 +(p6) br.cond.dptk.few 1b // loop + br.ret.sptk.few rp // done + +2: cmp.eq p6,p0=r14,r0 // aligned? +(p6) br.cond.sptk.few 4f + +3: ld1 r14=[in0],1 ;; // copy bytewise + st1 [in1]=r14,1 + extr.u r15=in0,0,3 // src & 7 + add in2=-1,in2 ;; // len-- + cmp.eq p6,p0=r0,in2 // done? + cmp.eq p7,p0=r0,r15 ;; // aligned now? +(p6) br.ret.spnt.few rp // return if done +(p7) br.cond.spnt.few 4f // go to main copy + br.cond.sptk.few 3b // more bytes to copy + + // At this point, in2 is non-zero + +4: mov r14=8 ;; + cmp.ltu p6,p0=in2,r14 ;; // len < 8? +(p6) br.cond.spnt.few 1b // byte copy the end + ld8 r15=[in0],8 ;; // copy word + st8 [in1]=r15,8 + add in2=-8,in2 ;; // len -= 8 + cmp.ne p6,p0=r0,in2 // done? +(p6) br.cond.spnt.few 4b // again + + br.ret.sptk.few rp // return + + // Don't bother optimising overlap case + +5: add in0=in0,in2 + add in1=in1,in2 ;; + add in0=-1,in0 + add in1=-1,in1 ;; + +6: ld1 r14=[in0],-1 ;; + st1 [in1]=r14,-1 + add in2=-1,in2 ;; + cmp.ne p6,p0=r0,in2 +(p6) br.cond.spnt.few 6b + + br.ret.sptk.few rp +END(bcopy) Index: src/common/lib/libc/arch/ia64/string/bzero.S diff -u /dev/null src/common/lib/libc/arch/ia64/string/bzero.S:1.1 --- /dev/null Fri Aug 5 15:06:02 2016 +++ src/common/lib/libc/arch/ia64/string/bzero.S Fri Aug 5 15:06:02 2016 @@ -0,0 +1,88 @@ +/* $NetBSD: bzero.S,v 1.1 2016/08/05 15:06:02 scole Exp $ */ + +/*- + * Copyright (c) 2000 Doug Rabson + * All rights reserved. + * + * 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 + *
CVS commit: src/tests/lib/libc/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 15:02:29 UTC 2016 Modified Files: src/tests/lib/libc/arch/ia64: return_one.S Log Message: PR port-ia64/51261 Fix for ia64 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/arch/ia64/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/ia64/return_one.S diff -u src/tests/lib/libc/arch/ia64/return_one.S:1.1 src/tests/lib/libc/arch/ia64/return_one.S:1.2 --- src/tests/lib/libc/arch/ia64/return_one.S:1.1 Mon Jul 18 23:16:09 2011 +++ src/tests/lib/libc/arch/ia64/return_one.S Fri Aug 5 15:02:29 2016 @@ -1,8 +1,11 @@ -/* $NetBSD: return_one.S,v 1.1 2011/07/18 23:16:09 jym Exp $ */ +/* $NetBSD: return_one.S,v 1.2 2016/08/05 15:02:29 scole Exp $ */ #include -.globl return_one, return_one_end; +.globl return_one_end -return_one: return_one_end: - nop +ENTRY(return_one,0) + mov ret0=1 + br.ret.sptk.few rp +return_one_end: +END(return_one)
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: scole Date: Fri Aug 5 15:01:39 UTC 2016 Modified Files: src/tests/lib/libc/sys: t_getrusage.c Log Message: PR port-ia64/51261 Make this compile for ia64 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_getrusage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_getrusage.c diff -u src/tests/lib/libc/sys/t_getrusage.c:1.3 src/tests/lib/libc/sys/t_getrusage.c:1.4 --- src/tests/lib/libc/sys/t_getrusage.c:1.3 Wed Sep 3 19:24:12 2014 +++ src/tests/lib/libc/sys/t_getrusage.c Fri Aug 5 15:01:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_getrusage.c,v 1.3 2014/09/03 19:24:12 matt Exp $ */ +/* $NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_getrusage.c,v 1.3 2014/09/03 19:24:12 matt Exp $"); +__RCSID("$NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $"); #include #include @@ -60,6 +60,8 @@ work(void) while (n > 0) { #ifdef __or1k__ asm volatile("l.nop"); /* Do something. */ +#elif defined(__ia64__) + asm volatile("nop 0"); /* Do something. */ #else asm volatile("nop"); /* Do something. */ #endif
CVS commit: src/sys/external/bsd/gnu-efi/dist/inc
Module Name:src Committed By: scole Date: Thu Aug 4 18:08:12 UTC 2016 Modified Files: src/sys/external/bsd/gnu-efi/dist/inc: efiapi.h Added Files: src/sys/external/bsd/gnu-efi/dist/inc: efifpswa.h Log Message: PR port-ia64/50719 Remove duplicate EFI files for ia64 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.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/external/bsd/gnu-efi/dist/inc/efiapi.h diff -u src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.2 --- src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.1.1.1 Tue Apr 1 16:16:07 2014 +++ src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h Thu Aug 4 18:08:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: efiapi.h,v 1.1.1.1 2014/04/01 16:16:07 jakllsch Exp $ */ +/* $NetBSD: efiapi.h,v 1.2 2016/08/04 18:08:12 scole Exp $ */ #ifndef _EFI_API_H #define _EFI_API_H @@ -848,6 +848,9 @@ typedef struct _EFI_BOOT_SERVICES { #define SAL_SYSTEM_TABLE_GUID\ { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } +/* DIG64 Headless Console & Debug Port Table. */ +#define HCDP_TABLE_GUID\ +{ 0xf951938d, 0x620b, 0x42ef, {0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98} } typedef struct _EFI_CONFIGURATION_TABLE { EFI_GUIDVendorGuid; Added files: Index: src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h diff -u /dev/null src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h:1.1 --- /dev/null Thu Aug 4 18:08:12 2016 +++ src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h Thu Aug 4 18:08:12 2016 @@ -0,0 +1,41 @@ +/* $NetBSD: efifpswa.h,v 1.1 2016/08/04 18:08:12 scole Exp $ */ +/* $FreeBSD: releng/10.1/sys/boot/efi/include/efifpswa.h 96893 2002-05-19 03:17:22Z marcel $ */ +#ifndef _EFI_FPSWA_H +#define _EFI_FPSWA_H + +/* + * EFI FP SWA Driver (Floating Point Software Assist) + */ + +#define EFI_INTEL_FPSWA \ +{ 0xc41b6531, 0x97b9, 0x11d3, 0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } + +INTERFACE_DECL(_FPSWA_INTERFACE); + +typedef struct _FPSWA_RET { +UINT64 status; +UINT64 err1; +UINT64 err2; +UINT64 err3; +} FPSWA_RET; + +typedef +FPSWA_RET +(EFIAPI *EFI_FPSWA) ( +IN UINTNTrapType, +IN OUT VOID *Bundle, +IN OUT UINT64 *pipsr, +IN OUT UINT64 *pfsr, +IN OUT UINT64 *pisr, +IN OUT UINT64 *ppreds, +IN OUT UINT64 *pifs, +IN OUT VOID *fp_state +); + +typedef struct _FPSWA_INTERFACE { +UINT32 Revision; +UINT32 Reserved; +EFI_FPSWA Fpswa; +} FPSWA_INTERFACE; + +#endif
CVS commit: src/sys/arch/ia64
Module Name:src Committed By: scole Date: Thu Aug 4 18:07:43 UTC 2016 Modified Files: src/sys/arch/ia64/stand/efi/libefi: bootinfo.c copy.c efi.c efifpswa.c exec.c time.c src/sys/arch/ia64/stand/ia64: Makefile.booters src/sys/arch/ia64/stand/ia64/efi: main.c Added Files: src/sys/arch/ia64/include: efilib.h Removed Files: src/sys/arch/ia64/stand/efi/include: README efi.h efi_nii.h efiapi.h eficon.h efidebug.h efidef.h efidevp.h efierr.h efifpswa.h efifs.h efilib.h efinet.h efipart.h efiprot.h efipxebc.h efiser.h efistdarg.h src/sys/arch/ia64/stand/efi/include/ia64: efibind.h pe.h Log Message: PR port-ia64/50719 Remove duplicate EFI files for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/include/efilib.h cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/efi/include/README \ src/sys/arch/ia64/stand/efi/include/efi.h \ src/sys/arch/ia64/stand/efi/include/efi_nii.h \ src/sys/arch/ia64/stand/efi/include/efiapi.h \ src/sys/arch/ia64/stand/efi/include/eficon.h \ src/sys/arch/ia64/stand/efi/include/efidebug.h \ src/sys/arch/ia64/stand/efi/include/efidef.h \ src/sys/arch/ia64/stand/efi/include/efidevp.h \ src/sys/arch/ia64/stand/efi/include/efifpswa.h \ src/sys/arch/ia64/stand/efi/include/efifs.h \ src/sys/arch/ia64/stand/efi/include/efilib.h \ src/sys/arch/ia64/stand/efi/include/efinet.h \ src/sys/arch/ia64/stand/efi/include/efipart.h \ src/sys/arch/ia64/stand/efi/include/efiprot.h \ src/sys/arch/ia64/stand/efi/include/efipxebc.h \ src/sys/arch/ia64/stand/efi/include/efiser.h \ src/sys/arch/ia64/stand/efi/include/efistdarg.h cvs rdiff -u -r1.3 -r0 src/sys/arch/ia64/stand/efi/include/efierr.h cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/efi/include/ia64/efibind.h \ src/sys/arch/ia64/stand/efi/include/ia64/pe.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/efi/libefi/bootinfo.c \ src/sys/arch/ia64/stand/efi/libefi/copy.c \ src/sys/arch/ia64/stand/efi/libefi/efi.c \ src/sys/arch/ia64/stand/efi/libefi/efifpswa.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/efi/libefi/exec.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/time.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/stand/ia64/Makefile.booters cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/ia64/efi/main.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/stand/efi/libefi/bootinfo.c diff -u src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.4 src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.5 --- src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.4 Thu Dec 27 20:21:51 2012 +++ src/sys/arch/ia64/stand/efi/libefi/bootinfo.c Thu Aug 4 18:07:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.c,v 1.4 2012/12/27 20:21:51 martin Exp $ */ +/* $NetBSD: bootinfo.c,v 1.5 2016/08/04 18:07:43 scole Exp $ */ /*- * Copyright (c) 1998 Michael Smith@@ -48,6 +48,8 @@ #include #include +#include + #include "bootstrap.h" static EFI_GUID hcdp = HCDP_TABLE_GUID; Index: src/sys/arch/ia64/stand/efi/libefi/copy.c diff -u src/sys/arch/ia64/stand/efi/libefi/copy.c:1.4 src/sys/arch/ia64/stand/efi/libefi/copy.c:1.5 --- src/sys/arch/ia64/stand/efi/libefi/copy.c:1.4 Mon Oct 26 19:16:56 2009 +++ src/sys/arch/ia64/stand/efi/libefi/copy.c Thu Aug 4 18:07:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.c,v 1.4 2009/10/26 19:16:56 cegger Exp $ */ +/* $NetBSD: copy.c,v 1.5 2016/08/04 18:07:43 scole Exp $ */ /*- * Copyright (c) 1998 Michael Smith @@ -35,6 +35,7 @@ #include #include +#include int efi_copyin(void *src, vaddr_t va, size_t len) Index: src/sys/arch/ia64/stand/efi/libefi/efi.c diff -u src/sys/arch/ia64/stand/efi/libefi/efi.c:1.4 src/sys/arch/ia64/stand/efi/libefi/efi.c:1.5 --- src/sys/arch/ia64/stand/efi/libefi/efi.c:1.4 Thu Dec 27 20:21:51 2012 +++ src/sys/arch/ia64/stand/efi/libefi/efi.c Thu Aug 4 18:07:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: efi.c,v 1.4 2012/12/27 20:21:51 martin Exp $ */ +/* $NetBSD: efi.c,v 1.5 2016/08/04 18:07:43 scole Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -34,6 +34,8 @@ #include #include +#include + EFI_HANDLE IH; EFI_SYSTEM_TABLE *ST; EFI_BOOT_SERVICES *BS; Index: src/sys/arch/ia64/stand/efi/libefi/efifpswa.c diff -u src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.4 src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.5 --- src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.4 Sun Jul 17 20:54:42 2011 +++ src/sys/arch/ia64/stand/efi/libefi/efifpswa.c Thu Aug 4 18:07:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: efifpswa.c,v 1.4 2011/07/17 20:54:42 joerg Exp $ */ +/* $NetBSD: efifpswa.c,v 1.5 2016/08/04 18:07:43 scole Exp $ */ /*- * Copyright (c) 2001 Peter Wemm @@ -36,6 +36,7 @@ #include #include +#include
CVS commit: src/sys/arch/ia64/stand
Module Name:src Committed By: scole Date: Thu Aug 4 16:22:40 UTC 2016 Modified Files: src/sys/arch/ia64/stand/common: Makefile.inc dev_net.c dev_net.h src/sys/arch/ia64/stand/efi/libefi: Makefile efiboot.h efinet.c src/sys/arch/ia64/stand/ia64: Makefile.booters src/sys/arch/ia64/stand/ia64/efi: conf.c main.c src/sys/arch/ia64/stand/ia64/ski: conf.c time.c Log Message: PR port-ia64/49717 Minimal changes needed to add nfs netboot support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/common/Makefile.inc \ src/sys/arch/ia64/stand/common/dev_net.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/common/dev_net.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/efi/libefi/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/efi/libefi/efiboot.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/efi/libefi/efinet.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/Makefile.booters cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/conf.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/stand/ia64/efi/main.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/ia64/ski/conf.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/ski/time.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/stand/common/Makefile.inc diff -u src/sys/arch/ia64/stand/common/Makefile.inc:1.2 src/sys/arch/ia64/stand/common/Makefile.inc:1.3 --- src/sys/arch/ia64/stand/common/Makefile.inc:1.2 Sun Jul 2 17:28:11 2006 +++ src/sys/arch/ia64/stand/common/Makefile.inc Thu Aug 4 16:22:40 2016 @@ -1,6 +1,6 @@ -# $FreeBSD$ +# $NetBSD: Makefile.inc,v 1.3 2016/08/04 16:22:40 scole Exp $ -SRCS+= commands.c console.c devopen.c interp.c boot.c #XXX: Remove bcache.c +SRCS+= commands.c console.c devopen.c interp.c boot.c dev_net.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= panic.c calloc.c readdir.c pager.c environment.c fileload.c SRCS+= getopt.c gets.c strdup.c strtol.c strspn.c @@ -9,7 +9,8 @@ SRCS+= getopt.c gets.c strdup.c strtol. SRCS+= load_elf64.c .endif -.if defined(LOADER_NET_SUPPORT) +# XXX might need this for different loaders later +#.if defined(LOADER_NET_SUPPORT) #SRCS+= dev_net.c -.endif +#.endif Index: src/sys/arch/ia64/stand/common/dev_net.h diff -u src/sys/arch/ia64/stand/common/dev_net.h:1.2 src/sys/arch/ia64/stand/common/dev_net.h:1.3 --- src/sys/arch/ia64/stand/common/dev_net.h:1.2 Sat Apr 22 07:58:53 2006 +++ src/sys/arch/ia64/stand/common/dev_net.h Thu Aug 4 16:22:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dev_net.h,v 1.2 2006/04/22 07:58:53 cherry Exp $ */ +/* $NetBSD: dev_net.h,v 1.3 2016/08/04 16:22:40 scole Exp $ */ /*- * Copyright (c) 1998 Doug Rabson@@ -28,5 +28,7 @@ * $FreeBSD: src/sys/boot/common/dev_net.h,v 1.2 1999/08/28 00:39:46 peter Exp $ */ -extern struct devsw netdev; - +int net_open(struct open_file *, ...); +int net_close(struct open_file *); +int net_ioctl(struct open_file *, u_long, void *); +int net_strategy(void *, int , daddr_t , size_t, void *, size_t *); Index: src/sys/arch/ia64/stand/common/dev_net.c diff -u src/sys/arch/ia64/stand/common/dev_net.c:1.10 src/sys/arch/ia64/stand/common/dev_net.c:1.11 --- src/sys/arch/ia64/stand/common/dev_net.c:1.10 Mon Feb 1 17:38:31 2016 +++ src/sys/arch/ia64/stand/common/dev_net.c Thu Aug 4 16:22:40 2016 @@ -1,5 +1,5 @@ /* - * $NetBSD: dev_net.c,v 1.10 2016/02/01 17:38:31 christos Exp $ + * $NetBSD: dev_net.c,v 1.11 2016/08/04 16:22:40 scole Exp $ */ /*- @@ -53,17 +53,15 @@ */ #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include + +#include +#include +#include +#include +#include +#include +#include +#include #include "dev_net.h" #include "bootstrap.h" @@ -73,31 +71,8 @@ int debug = 0; static int netdev_sock = -1; static int netdev_opens; -static int net_init(void); -static int net_open(struct open_file *, ...); -static int net_close(struct open_file *); -static int net_strategy(); -static void net_print(int); - static int net_getparams(int sock); -struct devsw netdev = { -"net", -DEVT_NET, -net_init, -net_strategy, -net_open, -net_close, -noioctl, -net_print -}; - -int -net_init(void) -{ -return 0; -} - /* * Called by devopen after it sets f->f_dev to our devsw entry. * This opens the low-level device and sets f->f_devdata. @@ -136,6 +111,23 @@ net_open(struct open_file *f, ...) return (error); } } + if (debug) + printf("net_open: got rootip %s\n", inet_ntoa(rootip)); + + /* + * Get the NFS file handle (mount). + */ + error = nfs_mount(netdev_sock, rootip, rootpath); + if (error) { + netif_close(netdev_sock); + netdev_sock = -1; + printf("net_open: error with nfs mount 0x%x\n", error); + return error; + } + + if
CVS commit: src/usr.bin/systat
Module Name:src Committed By: scole Date: Tue Aug 2 17:53:46 UTC 2016 Modified Files: src/usr.bin/systat: convtbl.c convtbl.h ifcmds.c ifstat.c Log Message: Add $NetBSD$ tag for new files To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/systat/convtbl.c \ src/usr.bin/systat/convtbl.h src/usr.bin/systat/ifcmds.c \ src/usr.bin/systat/ifstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/convtbl.c diff -u src/usr.bin/systat/convtbl.c:1.1 src/usr.bin/systat/convtbl.c:1.2 --- src/usr.bin/systat/convtbl.c:1.1 Tue Aug 2 15:56:09 2016 +++ src/usr.bin/systat/convtbl.c Tue Aug 2 17:53:46 2016 @@ -1,3 +1,5 @@ +/* $NetBSD: convtbl.c,v 1.2 2016/08/02 17:53:46 scole Exp $ */ + /* * Copyright (c) 2003, Trent Nelson,. * All rights reserved. @@ -30,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: convtbl.c,v 1.1 2016/08/02 15:56:09 scole Exp $"); +__RCSID("$NetBSD: convtbl.c,v 1.2 2016/08/02 17:53:46 scole Exp $"); #endif /* not lint */ #include Index: src/usr.bin/systat/convtbl.h diff -u src/usr.bin/systat/convtbl.h:1.1 src/usr.bin/systat/convtbl.h:1.2 --- src/usr.bin/systat/convtbl.h:1.1 Tue Aug 2 15:56:09 2016 +++ src/usr.bin/systat/convtbl.h Tue Aug 2 17:53:46 2016 @@ -1,3 +1,5 @@ +/* $NetBSD: convtbl.h,v 1.2 2016/08/02 17:53:46 scole Exp $ */ + /* * Copyright (c) 2003, Trent Nelson, . * All rights reserved. Index: src/usr.bin/systat/ifcmds.c diff -u src/usr.bin/systat/ifcmds.c:1.1 src/usr.bin/systat/ifcmds.c:1.2 --- src/usr.bin/systat/ifcmds.c:1.1 Tue Aug 2 15:56:09 2016 +++ src/usr.bin/systat/ifcmds.c Tue Aug 2 17:53:46 2016 @@ -1,3 +1,5 @@ +/* $NetBSD: ifcmds.c,v 1.2 2016/08/02 17:53:46 scole Exp $ */ + /* * Copyright (c) 2003, Trent Nelson, . * All rights reserved. @@ -30,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ifcmds.c,v 1.1 2016/08/02 15:56:09 scole Exp $"); +__RCSID("$NetBSD: ifcmds.c,v 1.2 2016/08/02 17:53:46 scole Exp $"); #endif /* not lint */ #include Index: src/usr.bin/systat/ifstat.c diff -u src/usr.bin/systat/ifstat.c:1.1 src/usr.bin/systat/ifstat.c:1.2 --- src/usr.bin/systat/ifstat.c:1.1 Tue Aug 2 15:56:09 2016 +++ src/usr.bin/systat/ifstat.c Tue Aug 2 17:53:46 2016 @@ -1,3 +1,5 @@ +/* $NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $ */ + /* * Copyright (c) 2003, Trent Nelson, . * All rights reserved. @@ -30,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ifstat.c,v 1.1 2016/08/02 15:56:09 scole Exp $"); +__RCSID("$NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $"); #endif /* not lint */ #include
CVS commit: src/usr.bin/systat
Module Name:src Committed By: scole Date: Tue Aug 2 15:56:09 UTC 2016 Modified Files: src/usr.bin/systat: Makefile cmds.c cmdtab.c extern.h systat.1 Added Files: src/usr.bin/systat: convtbl.c convtbl.h ifcmds.c ifstat.c Log Message: PR bin/51204 Add ifstat command to systat. Imported from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/systat/Makefile cvs rdiff -u -r1.28 -r1.29 src/usr.bin/systat/cmds.c cvs rdiff -u -r1.24 -r1.25 src/usr.bin/systat/cmdtab.c cvs rdiff -u -r0 -r1.1 src/usr.bin/systat/convtbl.c \ src/usr.bin/systat/convtbl.h src/usr.bin/systat/ifcmds.c \ src/usr.bin/systat/ifstat.c cvs rdiff -u -r1.44 -r1.45 src/usr.bin/systat/extern.h \ src/usr.bin/systat/systat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/Makefile diff -u src/usr.bin/systat/Makefile:1.38 src/usr.bin/systat/Makefile:1.39 --- src/usr.bin/systat/Makefile:1.38 Sat Jan 23 21:22:50 2016 +++ src/usr.bin/systat/Makefile Tue Aug 2 15:56:09 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2016/01/23 21:22:50 christos Exp $ +# $NetBSD: Makefile,v 1.39 2016/08/02 15:56:09 scole Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -11,10 +11,10 @@ PROG= systat CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/vmstat -DSUPPORT_UTMP -DSUPPORT_UTMPX \ -I${NETBSDSRCDIR}/usr.bin/who -D_KMEMUSER CWARNFLAGS+=-Wno-format-y2k -SRCS= bufcache.c cmds.c cmdtab.c disks.c df.c drvstats.c fetch.c \ - globalcmds.c icmp.c iostat.c ip.c keyboard.c main.c mbufs.c \ - netcmds.c netstat.c pigs.c ps.c swap.c tcp.c vmstat.c utmpentry.c \ - syscall.c +SRCS= bufcache.c cmds.c cmdtab.c convtbl.c disks.c df.c drvstats.c \ + fetch.c globalcmds.c icmp.c ifcmds.c ifstat.c iostat.c ip.c \ + keyboard.c main.c mbufs.c netcmds.c netstat.c pigs.c ps.c swap.c \ + tcp.c vmstat.c utmpentry.c syscall.c DPADD= ${LIBCURSES} ${LIBTERMINFO} ${LIBM} ${LIBKVM} LDADD= -lutil -lcurses -lterminfo -lm -lkvm BINGRP= kmem Index: src/usr.bin/systat/cmds.c diff -u src/usr.bin/systat/cmds.c:1.28 src/usr.bin/systat/cmds.c:1.29 --- src/usr.bin/systat/cmds.c:1.28 Thu Nov 4 07:18:47 2004 +++ src/usr.bin/systat/cmds.c Tue Aug 2 15:56:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.28 2004/11/04 07:18:47 dsl Exp $ */ +/* $NetBSD: cmds.c,v 1.29 2016/08/02 15:56:09 scole Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95"; #endif -__RCSID("$NetBSD: cmds.c,v 1.28 2004/11/04 07:18:47 dsl Exp $"); +__RCSID("$NetBSD: cmds.c,v 1.29 2016/08/02 15:56:09 scole Exp $"); #endif /* not lint */ #include @@ -152,3 +152,15 @@ status(void) { error("Showing %s, refresh every %d seconds.", curmode->c_name, naptime); } + +int +prefix(const char *s1, const char *s2) +{ + + while (*s1 == *s2) { + if (*s1 == '\0') + return (1); + s1++, s2++; + } + return (*s1 == '\0'); +} Index: src/usr.bin/systat/cmdtab.c diff -u src/usr.bin/systat/cmdtab.c:1.24 src/usr.bin/systat/cmdtab.c:1.25 --- src/usr.bin/systat/cmdtab.c:1.24 Fri Jan 6 14:08:08 2012 +++ src/usr.bin/systat/cmdtab.c Tue Aug 2 15:56:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cmdtab.c,v 1.24 2012/01/06 14:08:08 drochner Exp $ */ +/* $NetBSD: cmdtab.c,v 1.25 2016/08/02 15:56:09 scole Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: cmdtab.c,v 1.24 2012/01/06 14:08:08 drochner Exp $"); +__RCSID("$NetBSD: cmdtab.c,v 1.25 2016/08/02 15:56:09 scole Exp $"); #endif /* not lint */ #include "systat.h" @@ -69,6 +69,13 @@ struct command icmp_commands[] = { { .c_name = NULL } }; +struct command ifstat_commands[] = { + { "scale", ifstat_scale, "modify scale of display"}, + { "pps", ifstat_pps, "toggle packets per second display"}, + { "match", ifstat_match, "display matching interfaces"}, + { .c_name = NULL } +}; + struct command iostat_commands[] = { { "bars", iostat_bars, "show io stats as a bar graph"}, { "numbers", iostat_numbers, "show io stats numerically"}, @@ -159,6 +166,9 @@ struct mode modes[] = { { "df", showdf, fetchdf, labeldf, initdf, opendf, closedf, df_commands, CF_LOADAV }, + { "ifstat", showifstat, fetchifstat, labelifstat, + initifstat, openifstat, closeifstat, ifstat_commands, + CF_LOADAV }, { "inet.icmp", showicmp, fetchicmp, labelicmp, initicmp, openicmp, closeicmp, icmp_commands, CF_LOADAV }, Index: src/usr.bin/systat/extern.h diff -u src/usr.bin/systat/extern.h:1.44 src/usr.bin/systat/extern.h:1.45 --- src/usr.bin/systat/extern.h:1.44 Sun Aug 23 18:33:15 2015 +++ src/usr.bin/systat/extern.h Tue Aug 2 15:56:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.44 2015/08/23 18:33:15 mrg Exp $ */ +/* $NetBSD: extern.h,v 1.45 2016/08/02 15:56:09 scole Exp $ */ /*- * Copyright (c) 1991, 1993 @@
CVS commit: src/distrib/notes/common
Module Name:src Committed By: scole Date: Mon Aug 1 19:06:32 UTC 2016 Modified Files: src/distrib/notes/common: main Log Message: Add myself To generate a diff of this commit: cvs rdiff -u -r1.530 -r1.531 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.530 src/distrib/notes/common/main:1.531 --- src/distrib/notes/common/main:1.530 Tue Jun 28 16:45:06 2016 +++ src/distrib/notes/common/main Mon Aug 1 19:06:32 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.530 2016/06/28 16:45:06 maya Exp $ +.\" $NetBSD: main,v 1.531 2016/08/01 19:06:32 scole Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1144,6 +1144,7 @@ If you're one of them, and would like to .It Ta Mihai Chelaru Ta Mt kef...@netbsd.org .It Ta Aleksey Cheusov Ta Mt cheu...@netbsd.org .It Ta Bill Coldwell Ta Mt bi...@netbsd.org +.It Ta Sean Cole Ta Mt sc...@netbsd.org .It Ta Julian Coleman Ta Mt j...@netbsd.org .It Ta Marcus Comstedt Ta Mt mar...@netbsd.org .It Ta Jeremy Cooper Ta Mt jer...@netbsd.org