CVS commit: src/sys/arch/ia64/stand/common

2024-06-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 29 08:03:28 UTC 2024

Modified Files:
src/sys/arch/ia64/stand/common: Makefile.inc bootstrap.h
Removed Files:
src/sys/arch/ia64/stand/common: getopt.c

Log Message:
ia64: stand: Switch to libsa/getopt, NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/common/bootstrap.h
cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/common/getopt.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.3 src/sys/arch/ia64/stand/common/Makefile.inc:1.4
--- src/sys/arch/ia64/stand/common/Makefile.inc:1.3	Thu Aug  4 16:22:40 2016
+++ src/sys/arch/ia64/stand/common/Makefile.inc	Sat Jun 29 08:03:28 2024
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.3 2016/08/04 16:22:40 scole Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2024/06/29 08:03:28 rin Exp $
 
 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
+SRCS+=  gets.c strdup.c strtol.c strspn.c
 
 .if ${MACHINE_ARCH} == "ia64" 
 SRCS+=	load_elf64.c 

Index: src/sys/arch/ia64/stand/common/bootstrap.h
diff -u src/sys/arch/ia64/stand/common/bootstrap.h:1.10 src/sys/arch/ia64/stand/common/bootstrap.h:1.11
--- src/sys/arch/ia64/stand/common/bootstrap.h:1.10	Sun Dec 10 02:32:03 2017
+++ src/sys/arch/ia64/stand/common/bootstrap.h	Sat Jun 29 08:03:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootstrap.h,v 1.10 2017/12/10 02:32:03 christos Exp $	*/
+/*	$NetBSD: bootstrap.h,v 1.11 2024/06/29 08:03:28 rin Exp $	*/
 
 /*-
  * Copyright (c) 1998 Michael Smith 
@@ -406,9 +406,6 @@ extern void	ngets(char *, int);
 /* imports from stdlib, modified for sa */
 
 extern long	strtol(const char *, char **, int);
-extern char	*optarg;			/* getopt(3) external variables */
-extern int	optind, opterr, optopt, optreset;
-extern int	getopt(int, char * const [], const char *);
 
 extern long	strtol(const char *, char **, int);
 



CVS commit: src/sys/arch/ia64/stand/common

2024-06-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 29 08:03:28 UTC 2024

Modified Files:
src/sys/arch/ia64/stand/common: Makefile.inc bootstrap.h
Removed Files:
src/sys/arch/ia64/stand/common: getopt.c

Log Message:
ia64: stand: Switch to libsa/getopt, NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/common/bootstrap.h
cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/common/getopt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2024-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 18 19:57:03 UTC 2024

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
allow things to compile again


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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.12 src/sys/arch/ia64/include/mcontext.h:1.13
--- src/sys/arch/ia64/include/mcontext.h:1.12	Mon Jun 29 13:09:33 2020
+++ src/sys/arch/ia64/include/mcontext.h	Sat May 18 15:57:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.12 2020/06/29 17:09:33 scole Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.13 2024/05/18 19:57:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -117,6 +117,11 @@ typedef struct __mcontext {
 #define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.mc_scratch.gr8) /* gregs[8] */
 #define _UC_MACHINE_SET_PC(uc, pc)	(uc)->uc_mcontext.mc_special.iip = (pc)
 
+#define	_UC_TLSBASE	_UC_MD_BIT16
+#define	_UC_SETSTACK	_UC_MD_BIT17
+#define	_UC_CLRSTACK	_UC_MD_BIT18
+
+
 #if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \
 defined(__LIBPTHREAD_SOURCE__)
 #include 



CVS commit: src/sys/arch/ia64/include

2024-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 18 19:57:03 UTC 2024

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
allow things to compile again


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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.



CVS commit: src/sys/arch/ia64/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:37 UTC 2023

Modified Files:
src/sys/arch/ia64/include: asm.h bootinfo.h cpu.h db_machdep.h
ia64_cpu.h int_limits.h intrdefs.h loadfile_machdep.h lock.h
param.h pmap.h proc.h setjmp.h userret.h vmparam.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/asm.h \
src/sys/arch/ia64/include/pmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/bootinfo.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/ia64/include/cpu.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/db_machdep.h \
src/sys/arch/ia64/include/setjmp.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/ia64_cpu.h \
src/sys/arch/ia64/include/intrdefs.h \
src/sys/arch/ia64/include/loadfile_machdep.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/int_limits.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/lock.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/param.h \
src/sys/arch/ia64/include/vmparam.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/proc.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:37 UTC 2023

Modified Files:
src/sys/arch/ia64/include: asm.h bootinfo.h cpu.h db_machdep.h
ia64_cpu.h int_limits.h intrdefs.h loadfile_machdep.h lock.h
param.h pmap.h proc.h setjmp.h userret.h vmparam.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/asm.h \
src/sys/arch/ia64/include/pmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/bootinfo.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/ia64/include/cpu.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/db_machdep.h \
src/sys/arch/ia64/include/setjmp.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/ia64_cpu.h \
src/sys/arch/ia64/include/intrdefs.h \
src/sys/arch/ia64/include/loadfile_machdep.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/int_limits.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/lock.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/param.h \
src/sys/arch/ia64/include/vmparam.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/proc.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/userret.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/asm.h
diff -u src/sys/arch/ia64/include/asm.h:1.8 src/sys/arch/ia64/include/asm.h:1.9
--- src/sys/arch/ia64/include/asm.h:1.8	Fri Apr 17 14:19:43 2020
+++ src/sys/arch/ia64/include/asm.h	Fri Oct  6 11:45:37 2023
@@ -1,26 +1,26 @@
-/*	$NetBSD: asm.h,v 1.8 2020/04/17 14:19:43 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.9 2023/10/06 11:45:37 skrll Exp $	*/
 
 /* -
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  software.distribut...@cs.cmu.edu
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
Index: src/sys/arch/ia64/include/pmap.h
diff -u src/sys/arch/ia64/include/pmap.h:1.8 src/sys/arch/ia64/include/pmap.h:1.9
--- src/sys/arch/ia64/include/pmap.h:1.8	Sat Apr  8 18:08:33 2017
+++ src/sys/arch/ia64/include/pmap.h	Fri Oct  6 11:45:37 2023
@@ -178,10 +178,10 @@ void pmap_procwr(struct proc *, vaddr_t,
 struct vm_page_md {
 	TAILQ_HEAD(,pv_entry)	pv_list;
 	vm_memattr_t		memattr;
-#if 0 /* XXX freebsd */	
+#if 0 /* XXX freebsd */
 	uint8_t		pv_flags;
 	uint8_t		aflags;
-#endif	
+#endif
 };
 
 #define	VM_MDPAGE_INIT(pg)		\

Index: src/sys/arch/ia64/include/bootinfo.h
diff -u src/sys/arch/ia64/include/bootinfo.h:1.2 src/sys/arch/ia64/include/bootinfo.h:1.3
--- src/sys/arch/ia64/include/bootinfo.h:1.2	Thu Dec 26 04:53:11 2019
+++ src/sys/arch/ia64/include/bootinfo.h	Fri Oct  6 11:45:37 2023
@@ -1,21 +1,21 @@
-/*	$NetBSD: bootinfo.h,v 1.2 2019/12/26 04:53:11 msaitoh Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.3 2023/10/06 11:45:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
  * All rights reserved.
  *
  * Author: Chris G. Demetriou
- * 
+ *
  * Permission to use, copy, modify and distribute this software and
  * its documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
- * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
  *
  *  Software Distribution Coordinator  or  software.distribut...@cs.cmu.edu

Index: src/sys/arch/ia64/include/cpu.h
diff -u src/sys/arch/ia64/include/cpu.h:1.21 src/sys/arch/ia64/include/cpu.h:1.22
--- src/sys/arch/ia64/include/cpu.h:1.21	Tue May 31 08:43:14 2022
+++ src/sys/arch/ia64/include/cpu.h	Fri Oct  6 11:45:37 

CVS commit: src/sys/arch/ia64/ia64

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:16 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: context.S db_trace.c exception.S genassym.cf
interrupt.c locore.S machdep.c pal.S pmap.c process_machdep.c
setjmp.S sys_machdep.c syscall_stubs.S vm_machdep.c

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/context.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/exception.S \
src/sys/arch/ia64/ia64/process_machdep.c \
src/sys/arch/ia64/ia64/sys_machdep.c \
src/sys/arch/ia64/ia64/syscall_stubs.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/ia64/interrupt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/ia64/locore.S
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/pal.S \
src/sys/arch/ia64/ia64/setjmp.S
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/pmap.c
cvs rdiff -u -r1.18 -r1.19 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/context.S
diff -u src/sys/arch/ia64/ia64/context.S:1.8 src/sys/arch/ia64/ia64/context.S:1.9
--- src/sys/arch/ia64/ia64/context.S:1.8	Sat Apr  8 17:38:43 2017
+++ src/sys/arch/ia64/ia64/context.S	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: context.S,v 1.8 2017/04/08 17:38:43 scole Exp $	*/
+/*	$NetBSD: context.S,v 1.9 2023/10/06 11:45:16 skrll Exp $	*/
 
 /*
  * Copyright (c) 2003 Marcel Moolenaar
@@ -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

Index: src/sys/arch/ia64/ia64/db_trace.c
diff -u src/sys/arch/ia64/ia64/db_trace.c:1.5 src/sys/arch/ia64/ia64/db_trace.c:1.6
--- src/sys/arch/ia64/ia64/db_trace.c:1.5	Sun Jul 31 19:10:54 2016
+++ src/sys/arch/ia64/ia64/db_trace.c	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.5 2016/07/31 19:10:54 dholland Exp $	*/
+/*	$NetBSD: db_trace.c,v 1.6 2023/10/06 11:45:16 skrll Exp $	*/
 
 /* Inspired by reading alpha/db_trace.c */
 
@@ -122,7 +122,7 @@ db_stack_trace_print(db_expr_t addr, boo
 
 
 	} else (*pr) ("Unwind from arbitrary addresses unimplemented. \n");
-		
+
 
 		if (trace_thread) {
 			(*pr)("trace by pid unimplemented. \n");
@@ -139,14 +139,14 @@ extern vsize_t ia64_unwindtablen;
 
 
 /* Generates initial unwind frame context based on the contents
- * of the trap frame, by consulting the Unwind library 
+ * of the trap frame, by consulting the Unwind library
  * staterecord. If a register is of type enum UNSAVED, we fetch
  * the live value of the register from the trapframe.
  */
 
 void
 initunwindframe(struct unwind_frame *uwf, struct trapframe *tf)
-		 
+
 {
 
 	uwf->rp = tf->tf_special.rp;
@@ -165,10 +165,10 @@ initunwindframe(struct unwind_frame *uwf
 
 
 }
-		
 
 
-/* Single step the frame backward. 
+
+/* Single step the frame backward.
  * Assumes unwind_frame is setup already.
  */
 
@@ -185,7 +185,7 @@ rewindframe(struct unwind_frame *uwf, db
 	debug_frame_dump_XXX(uwf);
 #endif
 
-	/* Stomp on rp and pfs 
+	/* Stomp on rp and pfs
 	 */
 	KASSERT(ip >= kernstart);
 	patchunwindframe(uwf, ip - kernstart, kernstart);

Index: src/sys/arch/ia64/ia64/exception.S
diff -u src/sys/arch/ia64/ia64/exception.S:1.6 src/sys/arch/ia64/ia64/exception.S:1.7
--- src/sys/arch/ia64/ia64/exception.S:1.6	Sat Apr  8 17:42:47 2017
+++ src/sys/arch/ia64/ia64/exception.S	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.S,v 1.6 2017/04/08 17:42:47 scole Exp $ */
+/*	$NetBSD: exception.S,v 1.7 2023/10/06 11:45:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -31,7 +31,7 @@
 /* __FBSDID("$FreeBSD: releng/10.1/sys/ia64/ia64/exception.S 268200 2014-07-02 23:47:43Z marcel $"); */
 
 #include "assym.h"
-	
+
 /*
  * Nested TLB restart tokens. These are used by the
  * nested TLB handler for jumping back to the code
@@ -54,7 +54,7 @@
 	.size	ia64_kptdir, 8
 ia64_kptdir:	data8	0
 
-	
+
 #ifdef XTRACE
 
 	.align	8
@@ -747,7 +747,7 @@ ENTRY_NOPROFILE(exception_restore, 0)
 {	.mmi
 	mov		ar.rsc=r31		// setup for loadrs
 	mov		ar.k7=r16
-	addl		r29=NTLBRT_RESTORE,r0	// 22-bit restart token 
+	addl		r29=NTLBRT_RESTORE,r0	// 22-bit restart token
 	;;
 }
 
@@ -873,7 +873,7 @@ IVT_ENTRY(Instruction_TLB, 0x0400)
 	;;
 	add	r21=16,r18		// tag
 	add	r20=24,r18		// collision chain
-	;; 
+	;;
 	ld8	r21=[r21]		// check VHPT tag
 	ld8	r20=[r20]		// bucket head
 	;;
@@ -909,7 +909,7 @@ IVT_ENTRY(Instruction_TLB, 0x0400)
 	or	r21=r21,r22
 	;;
 	st8	[r20]=r21,8
-	;; 
+	;;
 	ld8	r22=[r20]		// read rest of pte
 	;;
 	dep	r18=0,r18,61,3		// convert vhpt ptr to physical
@@ -932,7 +932,7 @@ 

CVS commit: src/sys/arch/ia64/ia64

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:16 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: context.S db_trace.c exception.S genassym.cf
interrupt.c locore.S machdep.c pal.S pmap.c process_machdep.c
setjmp.S sys_machdep.c syscall_stubs.S vm_machdep.c

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/context.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/exception.S \
src/sys/arch/ia64/ia64/process_machdep.c \
src/sys/arch/ia64/ia64/sys_machdep.c \
src/sys/arch/ia64/ia64/syscall_stubs.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/ia64/interrupt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/ia64/locore.S
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/pal.S \
src/sys/arch/ia64/ia64/setjmp.S
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/ia64/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/acpi

2023-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul 13 18:43:34 UTC 2023

Modified Files:
src/sys/arch/ia64/acpi: madt.c

Log Message:
explicitly include no longer implicitly included sys/mutex.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/acpi/madt.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/acpi/madt.c
diff -u src/sys/arch/ia64/acpi/madt.c:1.5 src/sys/arch/ia64/acpi/madt.c:1.6
--- src/sys/arch/ia64/acpi/madt.c:1.5	Mon Dec 12 01:07:52 2022
+++ src/sys/arch/ia64/acpi/madt.c	Thu Jul 13 18:43:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: madt.c,v 1.5 2022/12/12 01:07:52 gutteridge Exp $	*/
+/*	$NetBSD: madt.c,v 1.6 2023/07/13 18:43:34 mrg Exp $	*/
 /*-
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 



CVS commit: src/sys/arch/ia64/acpi

2023-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul 13 18:43:34 UTC 2023

Modified Files:
src/sys/arch/ia64/acpi: madt.c

Log Message:
explicitly include no longer implicitly included sys/mutex.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/acpi/madt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2023-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 13 18:27:46 UTC 2023

Modified Files:
src/sys/arch/ia64/include: sapicvar.h

Log Message:
ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/sapicvar.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/sapicvar.h
diff -u src/sys/arch/ia64/include/sapicvar.h:1.1 src/sys/arch/ia64/include/sapicvar.h:1.2
--- src/sys/arch/ia64/include/sapicvar.h:1.1	Mon Jul 20 04:41:37 2009
+++ src/sys/arch/ia64/include/sapicvar.h	Thu Jul 13 18:27:46 2023
@@ -29,6 +29,10 @@
 #ifndef _MACHINE_SAPICVAR_H_
 #define _MACHINE_SAPICVAR_H_
 
+#include 
+
+#include 
+
 struct sapic {
 	kmutex_t	sa_mtx;
 	vaddr_t		sa_registers;	/* virtual address of sapic */



CVS commit: src/sys/arch/ia64/include

2023-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 13 18:27:46 UTC 2023

Modified Files:
src/sys/arch/ia64/include: sapicvar.h

Log Message:
ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/sapicvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/stand/ia64/efi

2023-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jun  5 18:16:07 UTC 2023

Modified Files:
src/sys/arch/ia64/stand/ia64/efi: start.S

Log Message:
Fix previous comment fix, which broke a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/stand/ia64/efi

2023-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jun  5 18:16:07 UTC 2023

Modified Files:
src/sys/arch/ia64/stand/ia64/efi: start.S

Log Message:
Fix previous comment fix, which broke a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/stand/ia64/efi/start.S
diff -u src/sys/arch/ia64/stand/ia64/efi/start.S:1.3 src/sys/arch/ia64/stand/ia64/efi/start.S:1.4
--- src/sys/arch/ia64/stand/ia64/efi/start.S:1.3	Sat Jun  3 20:41:45 2023
+++ src/sys/arch/ia64/stand/ia64/efi/start.S	Mon Jun  5 18:16:07 2023
@@ -1,4 +1,4 @@
-*	$NetBSD: start.S,v 1.3 2023/06/03 20:41:45 andvar Exp $	*/
+/*	$NetBSD: start.S,v 1.4 2023/06/05 18:16:07 martin Exp $	*/
 	
 /*-
  * Copyright (c) 2001 Doug Rabson



CVS commit: src/sys/arch/ia64/ia64

2023-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 23 14:55:47 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: machdep.c vm_machdep.c

Log Message:
ia64: Add missing barriers in cpu_switchto.

(ia64 has never really worked, so no pullups needed, right?)

PR kern/57240


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.17 -r1.18 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/machdep.c
diff -u src/sys/arch/ia64/ia64/machdep.c:1.43 src/sys/arch/ia64/ia64/machdep.c:1.44
--- src/sys/arch/ia64/ia64/machdep.c:1.43	Fri Apr 19 16:28:32 2019
+++ src/sys/arch/ia64/ia64/machdep.c	Thu Feb 23 14:55:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.43 2019/04/19 16:28:32 scole Exp $	*/
+/*	$NetBSD: machdep.c,v 1.44 2023/02/23 14:55:47 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -638,6 +638,10 @@ ia64_init(void)
 
 	/*
 	 * Initialise process context. XXX: This should really be in cpu_switchto
+	 *
+	 * No membar needed because we're not switching from a
+	 * previous lwp, and the idle lwp we're switching to can't be
+	 * holding locks already; see cpu_switchto.
 	 */
 	ci->ci_curlwp = 
 

Index: src/sys/arch/ia64/ia64/vm_machdep.c
diff -u src/sys/arch/ia64/ia64/vm_machdep.c:1.17 src/sys/arch/ia64/ia64/vm_machdep.c:1.18
--- src/sys/arch/ia64/ia64/vm_machdep.c:1.17	Sat Jan  1 21:07:14 2022
+++ src/sys/arch/ia64/ia64/vm_machdep.c	Thu Feb 23 14:55:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.17 2022/01/01 21:07:14 andvar Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.18 2023/02/23 14:55:47 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -77,9 +78,29 @@ cpu_switchto(lwp_t *oldlwp, lwp_t *newlw
 	register uint64_t reg9 __asm("r9");
 
 	KASSERT(newlwp != NULL);
-	
+
+	/*
+	 * Issue barriers to coordinate mutex_exit on this CPU with
+	 * mutex_vector_enter on another CPU.
+	 *
+	 * 1. Any prior mutex_exit by oldlwp must be visible to other
+	 *CPUs before we set ci_curlwp := newlwp on this one,
+	 *requiring a store-before-store barrier.
+	 *
+	 * 2. ci_curlwp := newlwp must be visible on all other CPUs
+	 *before any subsequent mutex_exit by newlwp can even test
+	 *whether there might be waiters, requiring a
+	 *store-before-load barrier.
+	 *
+	 * See kern_mutex.c for details -- this is necessary for
+	 * adaptive mutexes to detect whether the lwp is on the CPU in
+	 * order to safely block without requiring atomic r/m/w in
+	 * mutex_exit.
+	 */
+	membar_producer();	/* store-before-store */
 	ci->ci_curlwp = newlwp;
-	
+	membar_sync();		/* store-before-load */
+
 	/* required for lwp_startup, copy oldlwp into r9, "mov r9=in0" */
 	__asm __volatile("mov %0=%1" : "=r"(reg9) : "r"(oldlwp));
 	



CVS commit: src/sys/arch/ia64/ia64

2023-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 23 14:55:47 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: machdep.c vm_machdep.c

Log Message:
ia64: Add missing barriers in cpu_switchto.

(ia64 has never really worked, so no pullups needed, right?)

PR kern/57240


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/ia64/ia64/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2022-12-11 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Dec 12 01:07:53 UTC 2022

Modified Files:
src/sys/arch/ia64/acpi: madt.c
src/sys/arch/ia64/ia64: mainbus.c

Log Message:
madt.c & mainbus.c: fix build with acpica 20221020

AcpiTbChecksum() was renamed AcpiUtChecksum() during code consolidation.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/acpi/madt.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/ia64/ia64/mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2022-12-11 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Dec 12 01:07:53 UTC 2022

Modified Files:
src/sys/arch/ia64/acpi: madt.c
src/sys/arch/ia64/ia64: mainbus.c

Log Message:
madt.c & mainbus.c: fix build with acpica 20221020

AcpiTbChecksum() was renamed AcpiUtChecksum() during code consolidation.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/acpi/madt.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/ia64/ia64/mainbus.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/acpi/madt.c
diff -u src/sys/arch/ia64/acpi/madt.c:1.4 src/sys/arch/ia64/acpi/madt.c:1.5
--- src/sys/arch/ia64/acpi/madt.c:1.4	Mon Apr 29 16:39:58 2019
+++ src/sys/arch/ia64/acpi/madt.c	Mon Dec 12 01:07:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: madt.c,v 1.4 2019/04/29 16:39:58 scole Exp $	*/
+/*	$NetBSD: madt.c,v 1.5 2022/12/12 01:07:52 gutteridge Exp $	*/
 /*-
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
@@ -149,7 +149,7 @@ ia64_probe_sapics(void)
 
 		if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
 		ACPI_NAMESEG_SIZE) != 0 ||
-		ACPI_FAILURE(AcpiTbChecksum((void *)table,
+		ACPI_FAILURE(AcpiUtChecksum((void *)table,
 		table->Header.Length)))
 			continue;
 
@@ -243,7 +243,7 @@ ia64_count_cpus(void)
 
 		if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
 		ACPI_NAMESEG_SIZE) != 0 ||
-		ACPI_FAILURE(AcpiTbChecksum((void *)table,
+		ACPI_FAILURE(AcpiUtChecksum((void *)table,
 			table->Header.Length)))
 			continue;
 

Index: src/sys/arch/ia64/ia64/mainbus.c
diff -u src/sys/arch/ia64/ia64/mainbus.c:1.13 src/sys/arch/ia64/ia64/mainbus.c:1.14
--- src/sys/arch/ia64/ia64/mainbus.c:1.13	Sat Aug  7 16:18:56 2021
+++ src/sys/arch/ia64/ia64/mainbus.c	Mon Dec 12 01:07:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.13 2021/08/07 16:18:56 thorpej Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.14 2022/12/12 01:07:52 gutteridge Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2021/08/07 16:18:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.14 2022/12/12 01:07:52 gutteridge Exp $");
 
 #include "acpica.h"
 
@@ -98,7 +98,7 @@ mainbus_attach(device_t parent, device_t
 		if (strncmp(sig, ACPI_SIG_MADT, ACPI_NAMESEG_SIZE) != 0)
 			continue;
 		len = table->Header.Length;
-		if (ACPI_FAILURE(AcpiTbChecksum((void *)table, len)))
+		if (ACPI_FAILURE(AcpiUtChecksum((void *)table, len)))
 			continue;
 
 		end = (char *)table + table->Header.Length;



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:30:54 UTC 2022

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Use designated initializers for ski efi tables.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/ski/efi_stub.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/ia64/ski/efi_stub.c
diff -u src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.6 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.7
--- src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.6	Sun Aug 21 10:30:36 2022
+++ src/sys/arch/ia64/stand/ia64/ski/efi_stub.c	Sun Aug 21 10:30:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi_stub.c,v 1.6 2022/08/21 10:30:36 riastradh Exp $	*/
+/*	$NetBSD: efi_stub.c,v 1.7 2022/08/21 10:30:54 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -48,8 +48,8 @@ extern void acpi_stub_init(void);
 extern void sal_stub_init(void);
 
 struct efi_cfgtbl efi_cfgtab[] = {
-	{ EFI_TABLE_ACPI20,	_root },
-	{ EFI_TABLE_SAL,	_systab }
+	{ .ct_uuid = EFI_TABLE_ACPI20,	.ct_data = _root },
+	{ .ct_uuid = EFI_TABLE_SAL,	.ct_data = _systab },
 };
 
 static efi_status GetTime(struct efi_tm *, struct efi_tmcap *);
@@ -72,55 +72,57 @@ static efi_status ResetSystem(enum efi_r
 
 struct efi_rt efi_rttab = {
 	/* Header. */
-	{	0,			/* XXX Signature */
-		0,			/* XXX Revision */
-		0,			/* XXX HeaderSize */
-		0,			/* XXX CRC32 */
+	.rt_hdr = {
+		.th_sig = 0,		/* XXX Signature */
+		.th_rev = 0,		/* XXX Revision */
+		.th_hdrsz = 0,		/* XXX HeaderSize */
+		.th_crc32 = 0,		/* XXX CRC32 */
 	},
 
 	/* Time services */
-	GetTime,
-	SetTime,
-	GetWakeupTime,
-	SetWakeupTime,
+	.rt_gettime = GetTime,
+	.rt_settime = SetTime,
+	.rt_getwaketime = GetWakeupTime,
+	.rt_setwaketime = SetWakeupTime,
 
 	/* Virtual memory services */
-	SetVirtualAddressMap,
-	ConvertPointer,
+	.rt_setvirtual = SetVirtualAddressMap,
+	.rt_cvtptr = ConvertPointer,
 
 	/* Variable services */
-	GetVariable,
-	GetNextVariableName,
-	SetVariable,
+	.rt_getvar = GetVariable,
+	.rt_scanvar = GetNextVariableName,
+	.rt_setvar = SetVariable,
 
 	/* Misc */
-	GetNextHighMonotonicCount,
-	ResetSystem
+	.rt_gethicnt = GetNextHighMonotonicCount,
+	.rt_reset = ResetSystem
 };
 
 struct efi_systbl efi_systab = {
 	/* Header. */
-	{	EFI_SYSTBL_SIG,
-		0,			/* XXX Revision */
-		0,			/* XXX HeaderSize */
-		0,			/* XXX CRC32 */
+	.st_hdr = {
+		.th_sig = EFI_SYSTBL_SIG,
+		.th_rev = 0,		/* XXX Revision */
+		.th_hdrsz = 0,		/* XXX HeaderSize */
+		.th_crc32 = 0,		/* XXX CRC32 */
 	},
 
 	/* Firmware info. */
-	L"FreeBSD", 0, 0,
+	.st_fwvendor = L"FreeBSD", .st_fwrev = 0, .__pad = 0,
 
 	/* Console stuff. */
-	NULL, NULL,
-	NULL, NULL,
-	NULL, NULL,
+	.st_cin = NULL, .st_cinif = NULL,
+	.st_cout = NULL, .st_coutif = NULL,
+	.st_cerr = NULL, .st_cerrif = NULL,
 
 	/* Services (runtime first). */
-	_rttab,
-	NULL,
+	.st_rt = _rttab,
+	.st_bs = NULL,
 
 	/* Configuration tables. */
-	sizeof(efi_cfgtab)/sizeof(struct efi_cfgtbl),
-	efi_cfgtab
+	.st_entries = sizeof(efi_cfgtab)/sizeof(struct efi_cfgtbl),
+	.st_cfgtbl = efi_cfgtab,
 };
 
 static efi_status



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:30:54 UTC 2022

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Use designated initializers for ski efi tables.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:30:36 UTC 2022

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Fix fallout from uint64 -> void * changes in efi.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/ia64/ski/efi_stub.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/ia64/ski/efi_stub.c
diff -u src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.5 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.6
--- src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.5	Sat Aug 20 10:35:50 2022
+++ src/sys/arch/ia64/stand/ia64/ski/efi_stub.c	Sun Aug 21 10:30:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi_stub.c,v 1.5 2022/08/20 10:35:50 riastradh Exp $	*/
+/*	$NetBSD: efi_stub.c,v 1.6 2022/08/21 10:30:36 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -48,8 +48,8 @@ extern void acpi_stub_init(void);
 extern void sal_stub_init(void);
 
 struct efi_cfgtbl efi_cfgtab[] = {
-	{ EFI_TABLE_ACPI20,	(intptr_t)_root },
-	{ EFI_TABLE_SAL,	(intptr_t)_systab }
+	{ EFI_TABLE_ACPI20,	_root },
+	{ EFI_TABLE_SAL,	_systab }
 };
 
 static efi_status GetTime(struct efi_tm *, struct efi_tmcap *);
@@ -115,12 +115,12 @@ struct efi_systbl efi_systab = {
 	NULL, NULL,
 
 	/* Services (runtime first). */
-	(intptr_t)_rttab,
+	_rttab,
 	NULL,
 
 	/* Configuration tables. */
 	sizeof(efi_cfgtab)/sizeof(struct efi_cfgtbl),
-	(intptr_t)efi_cfgtab
+	efi_cfgtab
 };
 
 static efi_status



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:30:36 UTC 2022

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Fix fallout from uint64 -> void * changes in efi.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:55:03 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h

Log Message:
ia64/efi.h: Make st_rt/st_cfgtbl pointers, not uint64_t, per spec.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/efi.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/ia64/efi.c
diff -u src/sys/arch/ia64/ia64/efi.c:1.4 src/sys/arch/ia64/ia64/efi.c:1.5
--- src/sys/arch/ia64/ia64/efi.c:1.4	Sat Aug 20 10:54:25 2022
+++ src/sys/arch/ia64/ia64/efi.c	Sat Aug 20 10:55:03 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.4 2022/08/20 10:54:25 riastradh Exp $	*/
+/*	$NetBSD: efi.c,v 1.5 2022/08/20 10:55:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -68,12 +68,13 @@ efi_boot_minimal(uint64_t systbl)
 		efi_systbl = NULL;
 		return (EFAULT);
 	}
-	efi_cfgtbl = (efi_systbl->st_cfgtbl == 0) ? NULL :
-	(struct efi_cfgtbl *)IA64_PHYS_TO_RR7(efi_systbl->st_cfgtbl);
+	efi_cfgtbl = (efi_systbl->st_cfgtbl == NULL) ? NULL :
+	(struct efi_cfgtbl *)IA64_PHYS_TO_RR7(
+		(uint64_t)efi_systbl->st_cfgtbl);
 	if (efi_cfgtbl == NULL)
 		return (ENOENT);
-	efi_runtime = (efi_systbl->st_rt == 0) ? NULL :
-	(struct efi_rt *)IA64_PHYS_TO_RR7(efi_systbl->st_rt);
+	efi_runtime = (efi_systbl->st_rt == NULL) ? NULL :
+	(struct efi_rt *)IA64_PHYS_TO_RR7((uint64_t)efi_systbl->st_rt);
 	if (efi_runtime == NULL)
 		return (ENOENT);
 

Index: src/sys/arch/ia64/include/efi.h
diff -u src/sys/arch/ia64/include/efi.h:1.5 src/sys/arch/ia64/include/efi.h:1.6
--- src/sys/arch/ia64/include/efi.h:1.5	Sat Aug 20 10:54:25 2022
+++ src/sys/arch/ia64/include/efi.h	Sat Aug 20 10:55:03 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.h,v 1.5 2022/08/20 10:54:25 riastradh Exp $	*/
+/*	$NetBSD: efi.h,v 1.6 2022/08/20 10:55:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -152,10 +152,10 @@ struct efi_systbl {
 	void		*st_coutif;
 	void		*st_cerr;
 	void		*st_cerrif;
-	uint64_t	st_rt;
+	struct efi_rt	*st_rt;
 	void		*st_bs;
 	u_long		st_entries;
-	uint64_t	st_cfgtbl;
+	struct efi_cfgtbl *st_cfgtbl;
 };
 
 void efi_boot_finish(void);



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:55:03 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h

Log Message:
ia64/efi.h: Make st_rt/st_cfgtbl pointers, not uint64_t, per spec.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/efi.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:54:25 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h

Log Message:
ia64: Make ct_data void *, not uint64_t, as in spec.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/efi.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/ia64/efi.c
diff -u src/sys/arch/ia64/ia64/efi.c:1.3 src/sys/arch/ia64/ia64/efi.c:1.4
--- src/sys/arch/ia64/ia64/efi.c:1.3	Sat Aug 20 10:35:50 2022
+++ src/sys/arch/ia64/ia64/efi.c	Sat Aug 20 10:54:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.3 2022/08/20 10:35:50 riastradh Exp $	*/
+/*	$NetBSD: efi.c,v 1.4 2022/08/20 10:54:25 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -109,8 +109,10 @@ efi_get_table(struct uuid *uuid)
 	count = efi_systbl->st_entries;
 	ct = efi_cfgtbl;
 	while (count--) {
-		if (!memcmp(>ct_uuid, uuid, sizeof(*uuid)))
-			return ((void *)IA64_PHYS_TO_RR7(ct->ct_data));
+		if (!memcmp(>ct_uuid, uuid, sizeof(*uuid))) {
+			uint64_t data_pa = (uint64_t)(uintptr_t)ct->ct_data;
+			return ((void *)IA64_PHYS_TO_RR7(data_pa));
+		}
 		ct++;
 	}
 	return (NULL);

Index: src/sys/arch/ia64/include/efi.h
diff -u src/sys/arch/ia64/include/efi.h:1.4 src/sys/arch/ia64/include/efi.h:1.5
--- src/sys/arch/ia64/include/efi.h:1.4	Sat Aug 20 10:35:50 2022
+++ src/sys/arch/ia64/include/efi.h	Sat Aug 20 10:54:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.h,v 1.4 2022/08/20 10:35:50 riastradh Exp $	*/
+/*	$NetBSD: efi.h,v 1.5 2022/08/20 10:54:25 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -52,7 +52,7 @@ typedef unsigned long efi_status;
 
 struct efi_cfgtbl {
 	struct uuid	ct_uuid;
-	uint64_t	ct_data;
+	void		*ct_data;
 };
 
 struct efi_md {



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:54:25 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h

Log Message:
ia64: Make ct_data void *, not uint64_t, as in spec.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/efi.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:35:50 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Use uint64_t, not void *, for EFI virtual addresses, as in spec.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/efi.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/efi_stub.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/efi.c
diff -u src/sys/arch/ia64/ia64/efi.c:1.2 src/sys/arch/ia64/ia64/efi.c:1.3
--- src/sys/arch/ia64/ia64/efi.c:1.2	Wed Aug 30 11:12:04 2006
+++ src/sys/arch/ia64/ia64/efi.c	Sat Aug 20 10:35:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.2 2006/08/30 11:12:04 cherry Exp $	*/
+/*	$NetBSD: efi.c,v 1.3 2022/08/20 10:35:50 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -85,10 +85,10 @@ efi_boot_minimal(uint64_t systbl)
 		if (md->md_attr & EFI_MD_ATTR_RT) {
 			if (md->md_attr & EFI_MD_ATTR_WB)
 md->md_virt =
-(void *)IA64_PHYS_TO_RR7(md->md_phys);
+(uint64_t)IA64_PHYS_TO_RR7(md->md_phys);
 			else if (md->md_attr & EFI_MD_ATTR_UC)
 md->md_virt =
-(void *)IA64_PHYS_TO_RR6(md->md_phys);
+(uint64_t)IA64_PHYS_TO_RR6(md->md_phys);
 		}
 		md = efi_md_next(md);
 	}

Index: src/sys/arch/ia64/include/efi.h
diff -u src/sys/arch/ia64/include/efi.h:1.3 src/sys/arch/ia64/include/efi.h:1.4
--- src/sys/arch/ia64/include/efi.h:1.3	Sat Aug 20 09:40:22 2022
+++ src/sys/arch/ia64/include/efi.h	Sat Aug 20 10:35:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.h,v 1.3 2022/08/20 09:40:22 riastradh Exp $	*/
+/*	$NetBSD: efi.h,v 1.4 2022/08/20 10:35:50 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -73,7 +73,7 @@ struct efi_md {
 #define	EFI_MD_TYPE_PALCODE	13	/* PAL */
 	uint32_t	__pad;
 	uint64_t	md_phys;
-	void		*md_virt;
+	uint64_t	md_virt;
 	uint64_t	md_pages;
 	uint64_t	md_attr;
 #define	EFI_MD_ATTR_UC		0x0001UL

Index: src/sys/arch/ia64/stand/ia64/ski/efi_stub.c
diff -u src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.4 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.5
--- src/sys/arch/ia64/stand/ia64/ski/efi_stub.c:1.4	Thu Dec 27 20:21:51 2012
+++ src/sys/arch/ia64/stand/ia64/ski/efi_stub.c	Sat Aug 20 10:35:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi_stub.c,v 1.4 2012/12/27 20:21:51 martin Exp $	*/
+/*	$NetBSD: efi_stub.c,v 1.5 2022/08/20 10:35:50 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -183,7 +183,7 @@ SetVirtualAddressMap(u_long mapsz, u_lon
 {
 	uint64_t delta;
 
-	delta = (uintptr_t)memmap->md_virt - memmap->md_phys;
+	delta = memmap->md_virt - memmap->md_phys;
 	Reloc(_rttab.rt_gettime, delta);
 	Reloc(_rttab.rt_settime, delta);
 	return (0);		/* Hah... */
@@ -246,25 +246,25 @@ ski_init_stubs(struct bootinfo *bi)
 
 	memp[0].md_type = EFI_MD_TYPE_PALCODE;
 	memp[0].md_phys = 0x10;
-	memp[0].md_virt = NULL;
+	memp[0].md_virt = 0;
 	memp[0].md_pages = (4L*1024*1024)>>12;
 	memp[0].md_attr = EFI_MD_ATTR_WB | EFI_MD_ATTR_RT;
 
 	memp[1].md_type = EFI_MD_TYPE_FREE;
 	memp[1].md_phys = 5L*1024*1024;
-	memp[1].md_virt = NULL;
+	memp[1].md_virt = 0;
 	memp[1].md_pages = (128L*1024*1024)>>12;
 	memp[1].md_attr = EFI_MD_ATTR_WB;
 
 	memp[2].md_type = EFI_MD_TYPE_FREE;
 	memp[2].md_phys = 4L*1024*1024*1024;
-	memp[2].md_virt = NULL;
+	memp[2].md_virt = 0;
 	memp[2].md_pages = (64L*1024*1024)>>12;
 	memp[2].md_attr = EFI_MD_ATTR_WB;
 
 	memp[3].md_type = EFI_MD_TYPE_IOPORT;
 	memp[3].md_phys = 0xc00;
-	memp[3].md_virt = NULL;
+	memp[3].md_virt = 0;
 	memp[3].md_pages = (64L*1024*1024)>>12;
 	memp[3].md_attr = EFI_MD_ATTR_UC;
 



CVS commit: src/sys/arch/ia64

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 10:35:50 UTC 2022

Modified Files:
src/sys/arch/ia64/ia64: efi.c
src/sys/arch/ia64/include: efi.h
src/sys/arch/ia64/stand/ia64/ski: efi_stub.c

Log Message:
ia64: Use uint64_t, not void *, for EFI virtual addresses, as in spec.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/ia64/efi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/efi.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/efi_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 09:40:22 UTC 2022

Modified Files:
src/sys/arch/ia64/include: efi.h

Log Message:
ia64/efi.h: Fix whitespace.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/efi.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/efi.h
diff -u src/sys/arch/ia64/include/efi.h:1.2 src/sys/arch/ia64/include/efi.h:1.3
--- src/sys/arch/ia64/include/efi.h:1.2	Sat Aug 20 09:09:06 2022
+++ src/sys/arch/ia64/include/efi.h	Sat Aug 20 09:40:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.h,v 1.2 2022/08/20 09:09:06 riastradh Exp $	*/
+/*	$NetBSD: efi.h,v 1.3 2022/08/20 09:40:22 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -84,11 +84,11 @@ struct efi_md {
 #define	EFI_MD_ATTR_WP		0x1000UL
 #define	EFI_MD_ATTR_RP		0x2000UL
 #define	EFI_MD_ATTR_XP		0x4000UL
-#define	EFI_MD_ATTR_NV  0x8000UL
+#define	EFI_MD_ATTR_NV		0x8000UL
 #define	EFI_MD_ATTR_MORE_RELIABLE 0x0001UL
-#define	EFI_MD_ATTR_RO  0x0002UL
-#define	EFI_MD_ATTR_SP  0x0004UL
-#define	EFI_MD_ATTR_CPU_CRYPTO  0x0008UL
+#define	EFI_MD_ATTR_RO		0x0002UL
+#define	EFI_MD_ATTR_SP		0x0004UL
+#define	EFI_MD_ATTR_CPU_CRYPTO	0x0008UL
 #define	EFI_MD_ATTR_RT		0x8000UL
 };
 



CVS commit: src/sys/arch/ia64/include

2022-08-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug 20 09:40:22 UTC 2022

Modified Files:
src/sys/arch/ia64/include: efi.h

Log Message:
ia64/efi.h: Fix whitespace.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/efi.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/conf

2022-07-23 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jul 23 11:49:58 UTC 2022

Modified Files:
src/sys/arch/ia64/conf: GENERIC GENERIC.SKI

Log Message:
Add some file system options present in GENERIC kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/conf/GENERIC
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/conf/GENERIC.SKI

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/conf

2022-07-23 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jul 23 11:49:58 UTC 2022

Modified Files:
src/sys/arch/ia64/conf: GENERIC GENERIC.SKI

Log Message:
Add some file system options present in GENERIC kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/conf/GENERIC
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/conf/GENERIC.SKI

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/GENERIC
diff -u src/sys/arch/ia64/conf/GENERIC:1.9 src/sys/arch/ia64/conf/GENERIC:1.10
--- src/sys/arch/ia64/conf/GENERIC:1.9	Fri Apr  7 17:07:09 2017
+++ src/sys/arch/ia64/conf/GENERIC	Sat Jul 23 11:49:58 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.9 2017/04/07 17:07:09 scole Exp $
+# $NetBSD: GENERIC,v 1.10 2022/07/23 11:49:58 simonb Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/ia64/conf/std.ia64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.9 $"
+#ident 		"GENERIC-$Revision: 1.10 $"
 
 maxusers	32		# estimated number of users
 
@@ -77,6 +77,18 @@ file-system	OVERLAY		# overlay file syst
 #file-system	PROCFS		# /proc
 file-system	TMPFS		# Efficient memory file-system
 
+# File system options
+options 	QUOTA		# legacy UFS quotas
+options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	FFS_EI		# FFS Endian Independent support
+options 	WAPBL		# File system journaling support
+options 	NFSSERVER	# Network File System server
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+#options 	UFS_DIRHASH	# UFS Large Directory Hashing
+options 	UFS_EXTATTR	# Extended attribute support for UFS1
+#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
+# immutable) behave as system flags.
+
 # These options enable verbose messages for several subsystems.
 # Warning, these may compile large string tables into the kernel!
 options 	ACPIVERBOSE	# verbose ACPI device autoconfig messages

Index: src/sys/arch/ia64/conf/GENERIC.SKI
diff -u src/sys/arch/ia64/conf/GENERIC.SKI:1.18 src/sys/arch/ia64/conf/GENERIC.SKI:1.19
--- src/sys/arch/ia64/conf/GENERIC.SKI:1.18	Sun Sep 27 13:48:52 2020
+++ src/sys/arch/ia64/conf/GENERIC.SKI	Sat Jul 23 11:49:58 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.SKI,v 1.18 2020/09/27 13:48:52 roy Exp $
+# $NetBSD: GENERIC.SKI,v 1.19 2022/07/23 11:49:58 simonb Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/ia64/conf/std.ia64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.18 $"
+#ident 		"GENERIC-$Revision: 1.19 $"
 
 maxusers	32		# estimated number of users
 
@@ -74,6 +74,19 @@ file-system	KERNFS		# /kern
 file-system	NULLFS		# loopback file system
 #file-system	OVERLAY		# overlay file system
 #file-system	PROCFS		# /proc
+file-system	TMPFS		# Efficient memory file-system
+
+# File system options
+options 	QUOTA		# legacy UFS quotas
+options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	FFS_EI		# FFS Endian Independent support
+options 	WAPBL		# File system journaling support
+options 	NFSSERVER	# Network File System server
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+#options 	UFS_DIRHASH	# UFS Large Directory Hashing
+options 	UFS_EXTATTR	# Extended attribute support for UFS1
+#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
+# immutable) behave as system flags.
 
 #options 	GATEWAY		# packet forwarding
 options 	INET		# IP + ICMP + TCP + UDP



CVS commit: src/sys/arch/ia64/include

2022-07-21 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul 21 14:27:47 UTC 2022

Modified Files:
src/sys/arch/ia64/include: dig64.h

Log Message:
s/Transration/Translation/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/dig64.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/dig64.h
diff -u src/sys/arch/ia64/include/dig64.h:1.3 src/sys/arch/ia64/include/dig64.h:1.4
--- src/sys/arch/ia64/include/dig64.h:1.3	Thu Jul 21 10:09:21 2022
+++ src/sys/arch/ia64/include/dig64.h	Thu Jul 21 14:27:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: dig64.h,v 1.3 2022/07/21 10:09:21 andvar Exp $	*/
+/*	$NetBSD: dig64.h,v 1.4 2022/07/21 14:27:46 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2002 Marcel Moolenaar
@@ -105,8 +105,8 @@ struct dig64_vga_spec {
 #define DIG64_FLAGS_INTR_EDGE		(1 << 0)	/* Edge Triggered */
 #define DIG64_FLAGS_INTR_ACTH		(0 << 1)	/* Intr Active High */
 #define DIG64_FLAGS_INTR_ACTL		(1 << 1)	/* Intr Active Low */
-#define DIG64_FLAGS_TRANS_DENSE		(0 << 3)	/* Dense Transration */
-#define DIG64_FLAGS_TRANS_SPARSE	(1 << 3)	/* Sparse Transration */
+#define DIG64_FLAGS_TRANS_DENSE		(0 << 3)	/* Dense Translation */
+#define DIG64_FLAGS_TRANS_SPARSE	(1 << 3)	/* Sparse Translation */
 #define DIG64_FLAGS_TYPE_STATIC		(0 << 4)	/* Type Static */
 #define DIG64_FLAGS_TYPE_TRANS		(1 << 4)	/* Type Translation */
 #define DIG64_FLAGS_INTR_SUPP		(1 << 6)	/* Interrupt supported */



CVS commit: src/sys/arch/ia64/include

2022-07-21 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul 21 14:27:47 UTC 2022

Modified Files:
src/sys/arch/ia64/include: dig64.h

Log Message:
s/Transration/Translation/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/dig64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2021-11-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov 15 07:26:23 UTC 2021

Modified Files:
src/sys/arch/ia64/include: bus.h

Log Message:
Sprinkle const (and fix build)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/bus.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/bus.h
diff -u src/sys/arch/ia64/include/bus.h:1.4 src/sys/arch/ia64/include/bus.h:1.5
--- src/sys/arch/ia64/include/bus.h:1.4	Sun Dec 15 16:48:26 2019
+++ src/sys/arch/ia64/include/bus.h	Mon Nov 15 07:26:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.4 2019/12/15 16:48:26 tsutsui Exp $	*/
+/*	$NetBSD: bus.h,v 1.5 2021/11/15 07:26:23 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -428,7 +428,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint8_t *__p = (uint8_t *)((h) + (o));		\
-		uint8_t *__src = (ptr);	\
+		const uint8_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p = *__src++;\
 	}\
@@ -443,7 +443,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint16_t *__p = (uint16_t *)((h) + (o));	\
-		uint16_t *__src = (ptr);\
+		const uint16_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p = *__src++;\
 	}\
@@ -458,7 +458,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint32_t *__p = (uint32_t *)((h) + (o));	\
-		uint32_t *__src = (ptr);\
+		const uint32_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p = *__src++;\
 	}\
@@ -473,7 +473,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint64_t *__p = (uint64_t *)((h) + (o));	\
-		uint64_t *__src = (ptr);\
+		const uint64_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p = *__src++;\
 	}\
@@ -499,7 +499,7 @@ do {	\
 	if ((t) == IA64_BUS_SPACE_IO) {	\
 		int __i;		\
 		volatile bus_addr_t __port = (h) + (o);			\
-		uint8_t *__src = (ptr);	\
+		const uint8_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++) {			\
 			outb(__port, *__src);\
 			__port++;	\
@@ -508,7 +508,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint8_t *__p = (uint8_t *)((h) + (o));		\
-		uint8_t *__src = (ptr);	\
+		const uint8_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p++ = *__src++;\
 	}\
@@ -521,7 +521,7 @@ do {	\
 	if ((t) == IA64_BUS_SPACE_IO) {	\
 		int __i;		\
 		volatile bus_addr_t __port = (h) + (o);			\
-		uint16_t *__src = (ptr);\
+		const uint16_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++) {			\
 			outw(__port, *__src);\
 			__port += 2;	\
@@ -530,7 +530,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint16_t *__p = (uint16_t *)((h) + (o));	\
-		uint16_t *__src = (ptr);\
+		const uint16_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p++ = *__src++;\
 	}\
@@ -543,7 +543,7 @@ do {	\
 	if ((t) == IA64_BUS_SPACE_IO) {	\
 		int __i;		\
 		volatile bus_addr_t __port = (h) + (o);			\
-		uint32_t *__src = (ptr);\
+		const uint32_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++) {			\
 			outl(__port, *__src);\
 			__port += 4;	\
@@ -552,7 +552,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint32_t *__p = (uint32_t *)(h) + (o);		\
-		uint32_t *__src = (ptr);\
+		const uint32_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p++ = *__src++;\
 	}\
@@ -567,7 +567,7 @@ do {	\
 	} else {			\
 		int __i;		\
 		volatile uint64_t *__p = (uint64_t *)((h) + (o));	\
-		uint64_t *__src = (ptr);\
+		const uint64_t *__src = (ptr);\
 		for (__i = 0; __i < (cnt); __i++)			\
 			*__p++ = *__src++;\
 	}\



CVS commit: src/sys/arch/ia64/include

2021-11-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov 15 07:26:23 UTC 2021

Modified Files:
src/sys/arch/ia64/include: bus.h

Log Message:
Sprinkle const (and fix build)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/bus.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 20:50:08 UTC 2020

Modified Files:
src/sys/arch/ia64/ia64: interrupt.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/ia64/interrupt.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/interrupt.c
diff -u src/sys/arch/ia64/ia64/interrupt.c:1.10 src/sys/arch/ia64/ia64/interrupt.c:1.11
--- src/sys/arch/ia64/ia64/interrupt.c:1.10	Sun Nov 10 21:16:28 2019
+++ src/sys/arch/ia64/ia64/interrupt.c	Sat Nov 21 20:50:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:28 chs Exp $ */
+/* $NetBSD: interrupt.c,v 1.11 2020/11/21 20:50:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2020/11/21 20:50:08 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: interrupt.c,
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -293,7 +293,7 @@ intr_establish(int irq, int type, int le
 
 	i = ia64_intrs[vector];
 	if (i == NULL) {
-		i = malloc(sizeof(struct ia64_intr), M_DEVBUF, M_WAITOK);
+		i = kmem_alloc(sizeof(struct ia64_intr), KM_SLEEP);
 		i->irq = irq;
 		i->sapic = sa;
 		i->type = type;
@@ -309,7 +309,7 @@ intr_establish(int irq, int type, int le
 		if (i->type != type)
 			return NULL;
 
-	ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+	ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
 	ih->ih_func = func;
 	ih->ih_arg = arg;
 	ih->ih_level = level;
@@ -334,10 +334,10 @@ intr_disestablish(void *cookie)
 
 		ia64_intrs[vector] = NULL;
 		evcnt_detach(>evcnt);
-		free(i, M_DEVBUF);
+		kmem_free(i, sizeof(*i));
 	}
 
-	free(ih, M_DEVBUF);
+	kmem_free(ih, sizeof(*ih));
 }
 
 static int



CVS commit: src/sys/arch/ia64/ia64

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 20:50:08 UTC 2020

Modified Files:
src/sys/arch/ia64/ia64: interrupt.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/ia64/interrupt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2020-09-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep  7 07:48:23 UTC 2020

Modified Files:
src/sys/arch/ia64/include: types.h

Log Message:
define __HAVE___LWP_GETPRIVATE_FAST


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/types.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/types.h
diff -u src/sys/arch/ia64/include/types.h:1.11 src/sys/arch/ia64/include/types.h:1.12
--- src/sys/arch/ia64/include/types.h:1.11	Thu Jul 12 10:46:44 2018
+++ src/sys/arch/ia64/include/types.h	Mon Sep  7 07:48:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.11 2018/07/12 10:46:44 maxv Exp $	*/
+/*	$NetBSD: types.h,v 1.12 2020/09/07 07:48:23 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -69,6 +69,7 @@ typedef long int	__register_t;
 #define	__HAVE_CPU_DATA_FIRST
 #define	__HAVE_CPU_COUNTER
 #define	__HAVE_SYSCALL_INTERN
+#define	__HAVE___LWP_GETPRIVATE_FAST
 #define	__HAVE_MINIMAL_EMUL
 #define	__HAVE_OLD_DISKLABEL
 #define	__HAVE_ATOMIC64_OPS



CVS commit: src/sys/arch/ia64/include

2020-09-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep  7 07:48:23 UTC 2020

Modified Files:
src/sys/arch/ia64/include: types.h

Log Message:
define __HAVE___LWP_GETPRIVATE_FAST


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/types.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread scole_mail
Martin Husemann  writes:
>
> That build pre-dates Luke's fix.
>

Ahh, you are correct and it built fine for me, apologies.

Thanks


Re: CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread Martin Husemann
On Thu, Jul 02, 2020 at 08:03:09AM -0700, scole_mail wrote:
> That change didn't work:
> 
> http://releng.netbsd.org/builds/HEAD/202007020210Z/ia64.build.failed
>  ...
>  nbmake[10]: nbmake[10]: don't know how to make loader.efi.c. Stop


That build pre-dates Luke's fix.

Martin


Re: CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread scole_mail
"Luke Mewburn"  writes:

> Module Name:  src
> Committed By: lukem
> Date: Thu Jul  2 09:07:25 UTC 2020
>
> Modified Files:
>   src/sys/arch/ia64/stand/ia64/efi: Makefile
>
> Log Message:
> loader.efi doesn't have source
>
> (Untested fix)
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/efi/Makefile
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.

That change didn't work:

http://releng.netbsd.org/builds/HEAD/202007020210Z/ia64.build.failed
 ...
 nbmake[10]: nbmake[10]: don't know how to make loader.efi.c. Stop



CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Jul  2 09:07:25 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/ia64/efi: Makefile

Log Message:
loader.efi doesn't have source

(Untested fix)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/efi/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.6 src/sys/arch/ia64/stand/ia64/efi/Makefile:1.7
--- src/sys/arch/ia64/stand/ia64/efi/Makefile:1.6	Sun Apr  9 22:50:02 2017
+++ src/sys/arch/ia64/stand/ia64/efi/Makefile	Thu Jul  2 09:07:24 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/04/09 22:50:02 christos Exp $	
+#	$NetBSD: Makefile,v 1.7 2020/07/02 09:07:24 lukem Exp $	
 
 S=	${.CURDIR}/../../../../..
 
@@ -9,6 +9,8 @@ PROGS=		loader.sym loader.efi
 MAN.loader.sym=		# no man
 MAN.loader.efi=		# no man
 
+SRCS.loader.efi=	# no SRCS
+
 CPPFLAGS+=	-I${IA64_STAND_DIR}/efi/libefi/
 CPPFLAGS+=	-I${IA64_STAND_DIR}/common/
 CPPFLAGS+=	-I${S}



CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Jul  2 09:07:25 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/ia64/efi: Makefile

Log Message:
loader.efi doesn't have source

(Untested fix)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/efi/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2020-06-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Jun 29 17:09:33 UTC 2020

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
Fix for last checkin, don't try use non-existent register from a (currently) 
dummy struct


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/sys/arch/ia64/include/mcontext.h:1.12
--- src/sys/arch/ia64/include/mcontext.h:1.11	Mon Jun 29 01:37:27 2020
+++ src/sys/arch/ia64/include/mcontext.h	Mon Jun 29 17:09:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.11 2020/06/29 01:37:27 scole Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.12 2020/06/29 17:09:33 scole Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -114,7 +114,7 @@ typedef struct __mcontext {
 #define _UC_MACHINE_SP(uc)	((uc)->uc_mcontext.mc_special.sp)  /* gregs[12] */
 #define _UC_MACHINE_FP(uc)	0 /* Not supported in target */
 #define	_UC_MACHINE_PC(uc)	((uc)->uc_mcontext.mc_special.iip)
-#define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.__gregs[8])
+#define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.mc_scratch.gr8) /* gregs[8] */
 #define _UC_MACHINE_SET_PC(uc, pc)	(uc)->uc_mcontext.mc_special.iip = (pc)
 
 #if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \



CVS commit: src/sys/arch/ia64/include

2020-06-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Jun 29 17:09:33 UTC 2020

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
Fix for last checkin, don't try use non-existent register from a (currently) 
dummy struct


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.



CVS commit: src/sys/arch/ia64/include

2020-06-28 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Jun 29 01:37:27 UTC 2020

Modified Files:
src/sys/arch/ia64/include: mcontext.h setjmp.h

Log Message:
Allow kernel to compile by preventing "error: stack usage is ..."
too-large errors.  What was there previously was not correct and this
will need to be revisited for debugger to ever become functional
anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/mcontext.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/setjmp.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.10 src/sys/arch/ia64/include/mcontext.h:1.11
--- src/sys/arch/ia64/include/mcontext.h:1.10	Fri Dec 27 00:32:17 2019
+++ src/sys/arch/ia64/include/mcontext.h	Mon Jun 29 01:37:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.10 2019/12/27 00:32:17 kamil Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.11 2020/06/29 01:37:27 scole Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include 
 
 /* XXX fix this, just get to compile for now */
-#define _NGREG	128 
+#define _NGREG	1
 
 #ifndef __ASSEMBLER__
 typedef unsigned long __greg_t;

Index: src/sys/arch/ia64/include/setjmp.h
diff -u src/sys/arch/ia64/include/setjmp.h:1.3 src/sys/arch/ia64/include/setjmp.h:1.4
--- src/sys/arch/ia64/include/setjmp.h:1.3	Thu May  2 16:55:51 2019
+++ src/sys/arch/ia64/include/setjmp.h	Mon Jun 29 01:37:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: setjmp.h,v 1.3 2019/05/02 16:55:51 scole Exp $	*/
+/*	$NetBSD: setjmp.h,v 1.4 2020/06/29 01:37:27 scole Exp $	*/
 
 /*-
  * Copyright (c) 2000
@@ -86,6 +86,7 @@
 #define	J_SIGMASK	0x1d8
 #define	J_SIGSET	0x1e0
 
-#define	_JBLEN		0x200			/* Size in long XXX: Set to sizeof(mcontext_t)/sizeof(long) */
+/* XXX use FreeBSD value for now, set to sizeof(mcontext_t)/sizeof(long) ? */
+#define	_JBLEN		0x20			/* Size in long doubles */
 
 #endif /* !_MACHINE_SETJMP_H_ */



CVS commit: src/sys/arch/ia64/include

2020-06-28 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Jun 29 01:37:27 UTC 2020

Modified Files:
src/sys/arch/ia64/include: mcontext.h setjmp.h

Log Message:
Allow kernel to compile by preventing "error: stack usage is ..."
too-large errors.  What was there previously was not correct and this
will need to be revisited for debugger to ever become functional
anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/mcontext.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/setjmp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2020-02-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Feb  3 02:56:25 UTC 2020

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Update architectures ski is known to run on


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2020-02-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Feb  3 02:56:25 UTC 2020

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Update architectures ski is known to run on


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.9 src/sys/arch/ia64/TODO:1.10
--- src/sys/arch/ia64/TODO:1.9	Sun Nov 17 16:52:29 2019
+++ src/sys/arch/ia64/TODO	Mon Feb  3 02:56:25 2020
@@ -1,9 +1,8 @@
-$ NetBSD: TODO,v 1.1 2018/04/14 12:06:03 scole Exp $
+$ NetBSD: TODO,v 1.10 2020/02/03 02:54:23 scole Exp $
 
 What works:
   The ski simulator (pkgsrc/emulators/ski) is known to work on NetBSD
-  i386 and amd64, and probably will work on other archs as well.  It
-  can run and step through in assembly.
+  i386, amd64 and macppc. It "should" work on other archs as well.
 
   Netbooting may work on some machines, basically you need to boot
   diskless with the loader.efi (from src/sys/arch/ia64/stand/ia64/)



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:12:29 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: efiboot.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/efiboot.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/stand/efi/libefi/efiboot.h
diff -u src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.3 src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.4
--- src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.3	Thu Aug  4 16:22:40 2016
+++ src/sys/arch/ia64/stand/efi/libefi/efiboot.h	Sun Jan 26 10:12:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: efiboot.h,v 1.3 2016/08/04 16:22:40 scole Exp $	*/
+/*	$NetBSD: efiboot.h,v 1.4 2020/01/26 10:12:29 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1996
@@ -65,7 +65,7 @@ typedef unsigned long physaddr_t;
 
 /* exported devices XXX rename? */
 extern struct devsw devsw[];
-extern struct netif_driver efi_net; 
+extern struct netif_driver efi_net;
 
 /* Find EFI network resources */
 extern void efinet_init_driver(void);



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:12:29 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: efiboot.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/efiboot.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2020-01-14 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue Jan 14 16:23:08 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: ssc.c

Log Message:
add noinline attribute


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/ski/ssc.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/ia64/ski/ssc.c
diff -u src/sys/arch/ia64/stand/ia64/ski/ssc.c:1.3 src/sys/arch/ia64/stand/ia64/ski/ssc.c:1.4
--- src/sys/arch/ia64/stand/ia64/ski/ssc.c:1.3	Mon Jul 20 04:59:04 2009
+++ src/sys/arch/ia64/stand/ia64/ski/ssc.c	Tue Jan 14 16:23:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssc.c,v 1.3 2009/07/20 04:59:04 kiyohara Exp $	*/
+/*	$NetBSD: ssc.c,v 1.4 2020/01/14 16:23:07 scole Exp $	*/
 
 /*-
  * Copyright (c) 2001 Doug Rabson
@@ -41,6 +41,8 @@
  * PSR.dt across the SSC call. We do this by saving and restoring psr.l
  * completely.
  */
+
+__attribute__((__noinline__))
 u_int64_t
 ssc(u_int64_t in0, u_int64_t in1, u_int64_t in2, u_int64_t in3, int which)
 {



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2020-01-14 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue Jan 14 16:23:08 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: ssc.c

Log Message:
add noinline attribute


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/ski/ssc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-11-30 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Nov 30 16:23:46 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: pmap.c

Log Message:
Need  for atomic_inc_64.

Emptying out  had the side effect of removing an
implied #include .


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/ia64/ia64/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-11-30 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Nov 30 16:23:46 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: pmap.c

Log Message:
Need  for atomic_inc_64.

Emptying out  had the side effect of removing an
implied #include .


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/ia64/ia64/pmap.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/pmap.c
diff -u src/sys/arch/ia64/ia64/pmap.c:1.38 src/sys/arch/ia64/ia64/pmap.c:1.39
--- src/sys/arch/ia64/ia64/pmap.c:1.38	Thu May  9 15:48:55 2019
+++ src/sys/arch/ia64/ia64/pmap.c	Sat Nov 30 16:23:46 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.38 2019/05/09 15:48:55 scole Exp $ */
+/* $NetBSD: pmap.c,v 1.39 2019/11/30 16:23:46 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -81,9 +81,10 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.38 2019/05/09 15:48:55 scole Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.39 2019/11/30 16:23:46 riastradh Exp $");
 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/ia64/include

2019-11-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov 29 20:05:38 UTC 2019

Modified Files:
src/sys/arch/ia64/include: lock.h

Log Message:
Nix mb_* on ia64.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/sys/arch/ia64/include/lock.h:1.8
--- src/sys/arch/ia64/include/lock.h:1.7	Thu Jan 10 17:05:56 2019
+++ src/sys/arch/ia64/include/lock.h	Fri Nov 29 20:05:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.7 2019/01/10 17:05:56 scole Exp $	*/
+/*	$NetBSD: lock.h,v 1.8 2019/11/29 20:05:38 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -117,24 +117,6 @@ __cpu_simple_unlock(__cpu_simple_lock_t 
 }
 
 static __inline void
-mb_read(void)
-{
-	__asm __volatile("mf	\n" ::: "memory");
-}
-
-static __inline void
-mb_write(void)
-{
-	__asm __volatile("mf	\n" ::: "memory");
-}
-
-static __inline void
-mb_memory(void)
-{
-	__asm __volatile("mf	\n" ::: "memory");
-}
-
-static __inline void
 ia64_pause(void)
 {
 	__asm __volatile("hint @pause" ::: "memory");



CVS commit: src/sys/arch/ia64/include

2019-11-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov 29 20:05:38 UTC 2019

Modified Files:
src/sys/arch/ia64/include: lock.h

Log Message:
Nix mb_* on ia64.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.



CVS commit: src/sys/arch/ia64/include

2019-11-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Nov 24 15:45:41 UTC 2019

Modified Files:
src/sys/arch/ia64/include: cpu.h

Log Message:
Make ci_want_resched a u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/include/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/cpu.h
diff -u src/sys/arch/ia64/include/cpu.h:1.18 src/sys/arch/ia64/include/cpu.h:1.19
--- src/sys/arch/ia64/include/cpu.h:1.18	Sat Nov 23 19:40:35 2019
+++ src/sys/arch/ia64/include/cpu.h	Sun Nov 24 15:45:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.18 2019/11/23 19:40:35 ad Exp $	*/
+/*	$NetBSD: cpu.h,v 1.19 2019/11/24 15:45:41 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -107,7 +107,8 @@ struct cpu_info {
 	struct lwp *ci_fpcurlwp;	/* current owner of the FPU */
 	paddr_t ci_curpcb;		/* PA of current HW PCB */
 	struct pcb *ci_idle_pcb;	/* our idle PCB */
-	u_long ci_want_resched;		/* preempt current process */
+	u_int ci_want_resched;		/* preempt current process */
+	u_int ci_unused;		/* unused */
 	u_long ci_intrdepth;		/* interrupt trap depth */
 	struct trapframe *ci_db_regs;	/* registers for debuggers */
 	uint64_t ci_clock;		/* clock counter */



CVS commit: src/sys/arch/ia64/include

2019-11-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Nov 24 15:45:41 UTC 2019

Modified Files:
src/sys/arch/ia64/include: cpu.h

Log Message:
Make ci_want_resched a u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/include/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2019-11-17 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun Nov 17 16:52:29 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Mention ski works on amd64 and probably other archs


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.8 src/sys/arch/ia64/TODO:1.9
--- src/sys/arch/ia64/TODO:1.8	Mon Nov 11 18:06:47 2019
+++ src/sys/arch/ia64/TODO	Sun Nov 17 16:52:29 2019
@@ -1,8 +1,9 @@
 $ NetBSD: TODO,v 1.1 2018/04/14 12:06:03 scole Exp $
 
 What works:
-  The ski simulator (pkgsrc/emulators/ski) works on NetBSD/i386, can run
-  and step through in assembly.
+  The ski simulator (pkgsrc/emulators/ski) is known to work on NetBSD
+  i386 and amd64, and probably will work on other archs as well.  It
+  can run and step through in assembly.
 
   Netbooting may work on some machines, basically you need to boot
   diskless with the loader.efi (from src/sys/arch/ia64/stand/ia64/)



CVS commit: src/sys/arch/ia64

2019-11-17 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun Nov 17 16:52:29 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Mention ski works on amd64 and probably other archs


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2019-11-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Nov 16 22:51:51 UTC 2019

Modified Files:
src/sys/arch/ia64/include: fenv.h

Log Message:
do the ignore -Wshadow dance for builtins and GCC 8, copied from ppc version.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/fenv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2019-11-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Nov 16 22:51:51 UTC 2019

Modified Files:
src/sys/arch/ia64/include: fenv.h

Log Message:
do the ignore -Wshadow dance for builtins and GCC 8, copied from ppc version.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/fenv.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/fenv.h
diff -u src/sys/arch/ia64/include/fenv.h:1.2 src/sys/arch/ia64/include/fenv.h:1.3
--- src/sys/arch/ia64/include/fenv.h:1.2	Thu Mar 23 18:27:29 2017
+++ src/sys/arch/ia64/include/fenv.h	Sat Nov 16 22:51:51 2019
@@ -67,6 +67,11 @@ extern const fenv_t	__fe_dfl_env;
 #define	__stfpsr(__r)	__asm __volatile("mov %0=ar.fpsr" : "=r" (*(__r)))
 #define	__ldfpsr(__r)	__asm __volatile("mov ar.fpsr=%0;;" : : "r" (__r))
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
 __fenv_static inline int
 feclearexcept(int __excepts)
 {
@@ -206,6 +211,10 @@ fesetenv(const fenv_t *__envp)
 
 int feupdateenv(const fenv_t *__envp);
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic pop
+#endif
+
 #if defined(_NETBSD_SOURCE) || defined(_GNU_SOURCE)
 
 __fenv_static inline int



CVS commit: src/sys/arch/ia64

2019-11-11 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Nov 11 18:06:47 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
ski should run on i386 and amd64 with patches from http://gnats.netbsd.org/54690


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.7 src/sys/arch/ia64/TODO:1.8
--- src/sys/arch/ia64/TODO:1.7	Wed May 22 15:34:26 2019
+++ src/sys/arch/ia64/TODO	Mon Nov 11 18:06:47 2019
@@ -68,7 +68,6 @@ ski emulator tasks:
   source code lines respectively 
 - create a ski network driver
 - create a ski disk driver
-- fix ski to run on other archs beside i386, or at least amd64
 
 Pie in the sky:
 - Xen and itanium!



CVS commit: src/sys/arch/ia64

2019-11-11 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Nov 11 18:06:47 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
ski should run on i386 and amd64 with patches from http://gnats.netbsd.org/54690


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2019-06-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jun 17 15:08:34 UTC 2019

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
Enhance ia64/mcontext defines

Stop mapping _UC_MACHINE_FP() to a register as it is not supported by CPU.
There is need to use in code __builtin_frame_address() inlined in the code
to get the frame pointer.

Return a constant value 0 instead. New value does not pretend to return
a meaningful value.

While there, fix the definition of _UC_MACHINE_SET_PC as it didn't contain
the pc argument in the definition.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.



CVS commit: src/sys/arch/ia64/include

2019-06-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jun 17 15:08:34 UTC 2019

Modified Files:
src/sys/arch/ia64/include: mcontext.h

Log Message:
Enhance ia64/mcontext defines

Stop mapping _UC_MACHINE_FP() to a register as it is not supported by CPU.
There is need to use in code __builtin_frame_address() inlined in the code
to get the frame pointer.

Return a constant value 0 instead. New value does not pretend to return
a meaningful value.

While there, fix the definition of _UC_MACHINE_SET_PC as it didn't contain
the pc argument in the definition.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.8 src/sys/arch/ia64/include/mcontext.h:1.9
--- src/sys/arch/ia64/include/mcontext.h:1.8	Thu Apr 26 18:06:25 2018
+++ src/sys/arch/ia64/include/mcontext.h	Mon Jun 17 15:08:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.8 2018/04/26 18:06:25 scole Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.9 2019/06/17 15:08:34 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -112,10 +112,10 @@ typedef struct __mcontext {
 } mcontext_t;
 
 #define _UC_MACHINE_SP(uc)	((uc)->uc_mcontext.mc_special.sp)  /* gregs[12] */
-#define _UC_MACHINE_FP(uc)	((uc)->uc_mcontext.__gregs[79])
+#define _UC_MACHINE_FP(uc)	0 /* Not supported in target */
 #define	_UC_MACHINE_PC(uc)	((uc)->uc_mcontext.mc_special.iip)
 #define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.__gregs[8])
-#define _UC_MACHINE_SET_PC(uc)  _UC_MACHINE_PC(uc) = (pc)  /* XXX */
+#define _UC_MACHINE_SET_PC(uc, pc)	(uc)->uc_mcontext.mc_special.iip = (pc)
 
 static __inline void *
 __lwp_getprivate_fast(void)



CVS commit: src/sys/arch/ia64

2019-05-22 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed May 22 15:34:26 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
LOCKDEBUG kernels should work now.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2019-05-22 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed May 22 15:34:26 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
LOCKDEBUG kernels should work now.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.6 src/sys/arch/ia64/TODO:1.7
--- src/sys/arch/ia64/TODO:1.6	Sun May  5 16:45:34 2019
+++ src/sys/arch/ia64/TODO	Wed May 22 15:34:26 2019
@@ -28,7 +28,6 @@ Tasks remaining:
   originally written by one of ia64 gurus but still looks maintained
   and portable
4) something else
-- kernel with LOCKDEBUG option crashes in pmap startup somewhere
 - redo _regset.h in netbsd style with __greg_t __gregset_t
 - implement ld.elf_so, MK_DYNAMICROOT
 - fix memory detection, on real hardware doesn't find all memory



CVS commit: src/sys/arch/ia64

2019-05-09 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  9 15:48:55 UTC 2019

Modified Files:
src/sys/arch/ia64/conf: Makefile.ia64
src/sys/arch/ia64/ia64: pmap.c

Log Message:
Revert -O0 for pmap, avoid RAW dependency compilation warning


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/conf/Makefile.ia64
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/ia64/ia64/pmap.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/conf/Makefile.ia64
diff -u src/sys/arch/ia64/conf/Makefile.ia64:1.7 src/sys/arch/ia64/conf/Makefile.ia64:1.8
--- src/sys/arch/ia64/conf/Makefile.ia64:1.7	Sat May  4 02:06:59 2019
+++ src/sys/arch/ia64/conf/Makefile.ia64	Thu May  9 15:48:55 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ia64,v 1.7 2019/05/04 02:06:59 scole Exp $
+#	$NetBSD: Makefile.ia64,v 1.8 2019/05/09 15:48:55 scole Exp $
 
 # Makefile for NetBSD
 #
@@ -34,11 +34,6 @@ GENASSYM_CONF=	${IA64}/ia64/genassym.cf
 CPPFLAGS+=	-mconstant-gp -Dia64
 AFLAGS+=	-x assembler-with-cpp -Wa,-x 
 
-# XXX don't optimize pmap.c to get rid of assembler warnings like:
-#   Warning: Use of 'st8' may violate RAW dependency 'RR#' (data)
-# Happening with gcc7 and iirc several years worth of prior gcc versions
-COPTS.pmap.c+=	-O0
-
 ##
 ## (3) libkern and compat
 ##

Index: src/sys/arch/ia64/ia64/pmap.c
diff -u src/sys/arch/ia64/ia64/pmap.c:1.37 src/sys/arch/ia64/ia64/pmap.c:1.38
--- src/sys/arch/ia64/ia64/pmap.c:1.37	Fri May 25 06:34:02 2018
+++ src/sys/arch/ia64/ia64/pmap.c	Thu May  9 15:48:55 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.37 2018/05/25 06:34:02 jdolecek Exp $ */
+/* $NetBSD: pmap.c,v 1.38 2019/05/09 15:48:55 scole Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.37 2018/05/25 06:34:02 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.38 2019/05/09 15:48:55 scole Exp $");
 
 #include 
 #include 
@@ -471,12 +471,13 @@ pmap_bootstrap(void)
 	if (base == 0)
 		panic("Unable to allocate VHPT");
 
-	if (bootverbose)
-		printf("VHPT: address=%#lx, size=%#lx\n", base, size);
-
 	pmap_vhpt_nbuckets = size / sizeof(struct ia64_lpte);
 	pmap_vhpt_bucket = (void *)uvm_pageboot_alloc(pmap_vhpt_nbuckets *
 		  sizeof(struct ia64_bucket));
+	if (bootverbose)
+		printf("VHPT: address=%#lx, size=%#lx, buckets=%ld, address=%lx\n",
+		   base, size, pmap_vhpt_nbuckets, (long unsigned int)_vhpt_bucket[0]);
+
 	for (i = 0; i < pmap_vhpt_nbuckets; i++) {
 		/* Stolen memory is zeroed. */
 		mutex_init(_vhpt_bucket[i].mutex, MUTEX_DEFAULT, IPL_VM);
@@ -2541,6 +2542,8 @@ pmap_switch(pmap_t pm)
 		}
 	}
 
+	/* XXX */
+	ia64_srlz_d();
 	curcpu()->ci_pmap = pm;
 	ia64_srlz_d();
 



CVS commit: src/sys/arch/ia64

2019-05-09 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  9 15:48:55 UTC 2019

Modified Files:
src/sys/arch/ia64/conf: Makefile.ia64
src/sys/arch/ia64/ia64: pmap.c

Log Message:
Revert -O0 for pmap, avoid RAW dependency compilation warning


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/conf/Makefile.ia64
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/ia64/ia64/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2019-05-06 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue May  7 02:05:17 UTC 2019

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: exec.c

Log Message:
Avoid some RAW dependency compilation warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/stand/efi/libefi/exec.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/exec.c
diff -u src/sys/arch/ia64/stand/efi/libefi/exec.c:1.7 src/sys/arch/ia64/stand/efi/libefi/exec.c:1.8
--- src/sys/arch/ia64/stand/efi/libefi/exec.c:1.7	Thu Aug  4 18:07:43 2016
+++ src/sys/arch/ia64/stand/efi/libefi/exec.c	Tue May  7 02:05:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.7 2016/08/04 18:07:43 scole Exp $ */
+/* $NetBSD: exec.c,v 1.8 2019/05/07 02:05:17 scole Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -192,13 +192,17 @@ elf64_exec(struct preloaded_file *fp)
 
 	__asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7)));
 	__asm __volatile("mov cr.itir=%0" :: "r"(28 << 2));
-	__asm __volatile("ptr.i %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
+	__asm __volatile("srlz.d;;");
+	
 	__asm __volatile("ptr.d %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
+	__asm __volatile("srlz.d;;");
+	__asm __volatile("itr.d dtr[%0]=%1;;" :: "r"(0), "r"(pte));
+	__asm __volatile("srlz.d;;");
+	
+	__asm __volatile("ptr.i %0,%1;;" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
 	__asm __volatile("srlz.i;;");
 	__asm __volatile("itr.i itr[%0]=%1;;" :: "r"(0), "r"(pte));
 	__asm __volatile("srlz.i;;");
-	__asm __volatile("itr.d dtr[%0]=%1;;" :: "r"(0), "r"(pte));
-	__asm __volatile("srlz.i;;");
 
 	enter_kernel(fp->marks[MARK_ENTRY], bi);
 



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2019-05-06 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue May  7 02:05:17 UTC 2019

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: exec.c

Log Message:
Avoid some RAW dependency compilation warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/stand/efi/libefi/exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2019-05-05 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun May  5 16:45:34 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
a little bit of clean up, sort ski items, and some notes about libunwind


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.5 src/sys/arch/ia64/TODO:1.6
--- src/sys/arch/ia64/TODO:1.5	Wed Apr  3 21:03:06 2019
+++ src/sys/arch/ia64/TODO	Sun May  5 16:45:34 2019
@@ -1,7 +1,7 @@
 $ NetBSD: TODO,v 1.1 2018/04/14 12:06:03 scole Exp $
 
 What works:
-  The ski simulator (pkgsrc/emulators/ski) works on NetBSD, can run
+  The ski simulator (pkgsrc/emulators/ski) works on NetBSD/i386, can run
   and step through in assembly.
 
   Netbooting may work on some machines, basically you need to boot
@@ -13,32 +13,29 @@ What works:
   Also, a successful report of booting off the CD is here
   http://mail-index.netbsd.org/port-ia64/2009/06/18/msg000102.html
 
-Tasks remaining, first couple seem most important:
-
-- pmap.c is getting compilation warnings (for gcc6 & gcc7) like
-  /var/tmp//cckQKcKn.s:7614: Warning: Use of 'st8' may violate RAW dependency 'RR#' (data)
-  ...
-  how to change compile flags for specific kernel file like "CFLAGS.pmap.c+= -O0" ?
+Tasks remaining:
 - context switching and forking appear unfinished,
   vm_machdep.c::cpu_lwp_fork() appears incomplete
-- pmap module, imported from freebsd but still needs more work and
-  testing
+- pmap module, imported from freebsd but still needs more work and testing
 - IA64 Stack unwind code: Support remaining unwind descriptor
   types. (See arch/ia64/unwind/TODO). ddb() traces need to print line
-  information also.  Seems like a lot of this could be re-used
-  from freebsd
+  information also.  Seems like there are a few options:
+   1) fix and finish current unwind that is minimal, incomplete, and buggy
+   2) import FreeBSD/ia64 implementation, may be derived from HP originally:
+  http://lists.llvm.org/pipermail/cfe-dev/2016-September/050649.html
+   3) import this version
+  https://www.nongnu.org/libunwind/man/libunwind-ia64(3).html
+  originally written by one of ia64 gurus but still looks maintained
+  and portable
+   4) something else
+- kernel with LOCKDEBUG option crashes in pmap startup somewhere
 - redo _regset.h in netbsd style with __greg_t __gregset_t
-- some commands in ski are not yet implemented, 2 important ones
-  are still missing, "cstack" and "pm", which view the stack and
-  source code lines respectively 
-- create a ski network driver
-- create a ski disk driver
 - implement ld.elf_so, MK_DYNAMICROOT
 - fix memory detection, on real hardware doesn't find all memory
-- implement interrupts (sacpi & pci), can be mostly from freebsd?
+- implement interrupts (sacpi & pci)
 - MKGDB for ia64
 - implement fp[gs]etsticky, [make|get|set|swap]context
-- floating point, fenv functions were imported from freebsd, but haven't been tested
+- floating point, fenv functions were imported from freebsd, but only compile tested
 - implement core_machdep.c
 - implement __cloneS ptrace.S sbrk.S shmat.S
 - implement kvm_ia64.c
@@ -48,10 +45,9 @@ Tasks remaining, first couple seem most 
mutex_spin_enter()/mutex_spin_exit() __HAVE_SPIN_MUTEX_STUBS
 - rwlock.h rw_enter(),rw_exit(),rw_tryenter() __HAVE_RW_STUBS, implemented already?
 - add efipart_dev to read gpt/ffs disks for bootloader
-- fix printf of lx in bootloader/libsa ?
-- sort out bootloader/loader.efi stuff, is freebsd one good enough or
-  do we want commands more like netbsd i386 bootloader? e.g., add
-  command to boot nfs from loader.efi instead of hack now
+- sort out bootloader/loader.efi stuff, make it more like netbsd and
+  less like freebsd, command to boot nfs from loader.efi instead of
+  hack that exists now
 - ia64 implement __HAVE_FAST_SOFTINTS?
 - want or need __HAVE_CPU_UAREA_ROUTINES, cpu_uarea_alloc,  cpu_uarea_free
 - fix all "[Nn]ot yet" and "XXX" functions everywhere
@@ -65,9 +61,16 @@ Tasks remaining, first couple seem most 
 - write console and/or X framebuffer driver.  freebsd has vgapci
   device that may be portable
 - add ia32 emulation, port from freebsd
-- create install EFI/cdrom/netbsd
+- installation media for EFI/cdrom/usb
+
+ski emulator tasks:
+- some commands in ski are not yet implemented. 2 important ones
+  are still missing, "cstack" and "pm", which view the stack and
+  source code lines respectively 
+- create a ski network driver
+- create a ski disk driver
 - fix ski to run on other archs beside i386, or at least amd64
 
-Pie in the sky
+Pie in the sky:
 - Xen and itanium!
 - qemu and itanium



CVS commit: src/sys/arch/ia64

2019-05-05 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun May  5 16:45:34 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
a little bit of clean up, sort ski items, and some notes about libunwind


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/conf

2019-05-03 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sat May  4 02:06:59 UTC 2019

Modified Files:
src/sys/arch/ia64/conf: Makefile.ia64

Log Message:
Disable optimization for pmap.c to prevent RAW assembler dependency
warnings.

If port ever becomes more stable, should revert this and figure out
exactly why only pmap seems to have this issue in the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/conf/Makefile.ia64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/conf

2019-05-03 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sat May  4 02:06:59 UTC 2019

Modified Files:
src/sys/arch/ia64/conf: Makefile.ia64

Log Message:
Disable optimization for pmap.c to prevent RAW assembler dependency
warnings.

If port ever becomes more stable, should revert this and figure out
exactly why only pmap seems to have this issue in the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/conf/Makefile.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/Makefile.ia64
diff -u src/sys/arch/ia64/conf/Makefile.ia64:1.6 src/sys/arch/ia64/conf/Makefile.ia64:1.7
--- src/sys/arch/ia64/conf/Makefile.ia64:1.6	Sat Sep 22 12:24:02 2018
+++ src/sys/arch/ia64/conf/Makefile.ia64	Sat May  4 02:06:59 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ia64,v 1.6 2018/09/22 12:24:02 rin Exp $
+#	$NetBSD: Makefile.ia64,v 1.7 2019/05/04 02:06:59 scole Exp $
 
 # Makefile for NetBSD
 #
@@ -34,6 +34,11 @@ GENASSYM_CONF=	${IA64}/ia64/genassym.cf
 CPPFLAGS+=	-mconstant-gp -Dia64
 AFLAGS+=	-x assembler-with-cpp -Wa,-x 
 
+# XXX don't optimize pmap.c to get rid of assembler warnings like:
+#   Warning: Use of 'st8' may violate RAW dependency 'RR#' (data)
+# Happening with gcc7 and iirc several years worth of prior gcc versions
+COPTS.pmap.c+=	-O0
+
 ##
 ## (3) libkern and compat
 ##



CVS commit: src/sys/arch/ia64/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 17:34:01 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: syscall_stubs.S

Log Message:
Add more code from FreeBSD, still needs work


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/syscall_stubs.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 17:34:01 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: syscall_stubs.S

Log Message:
Add more code from FreeBSD, still needs work


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/syscall_stubs.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/syscall_stubs.S
diff -u src/sys/arch/ia64/ia64/syscall_stubs.S:1.5 src/sys/arch/ia64/ia64/syscall_stubs.S:1.6
--- src/sys/arch/ia64/ia64/syscall_stubs.S:1.5	Wed Jan  9 18:03:34 2019
+++ src/sys/arch/ia64/ia64/syscall_stubs.S	Thu May  2 17:34:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall_stubs.S,v 1.5 2019/01/09 18:03:34 scole Exp $	*/
+/*	$NetBSD: syscall_stubs.S,v 1.6 2019/05/02 17:34:01 scole Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Marcel Moolenaar
@@ -74,9 +74,510 @@
  * information they need and we have the freedom to move code around.
  */
 
+/* XXX fix */	
+#define syscall		0	
+#define SYS_sigreturn	0
+	
 	.section	.text.gateway, "ax"
 	.align		PAGE_SIZE
 	.global		ia64_gateway_page
 ia64_gateway_page:
-#warning this is a stub!!!
+{   .mmb
+mov r14=ar.k7   // Memory stack
+mov r15=ar.k6   // Register stack
+epc
+;;
+}
+{   .mlx
+mov r11=psr
+movlr31=epc_syscall
+;;
+}
+{   .mib
+rum psr.be
+mov b7=r31
+br  b7
+;;
+}
+gw_ret:
+{   .mmi
+mov ar.rnat=r22
+;;
+mov ar.rsc=r24
+mov ar.pfs=r20
+}
+{   .mib
+mov ar.fpsr=r25
+mov b0=r18
+br.sptk b6
+;;
+}
+gw_ret_ia32:
+{   .mmi
+flushrs
+nop 0
+nop 0
+;;
+}
+{   .mib
+nop 0
+nop 0
+br.ia.sptk  b6
+;;
+}
 
+
+ENTRY_NOPROFILE(break_sigtramp, 0)
+{   .mib
+mov ar.rsc=0
+cmp.ne  p15,p0=0,gp
+cover
+;;
+}
+{   .mmi
+flushrs
+(p15)   invala
+add r16=16+UC_MCONTEXT+MC_SPECIAL,sp
+;;
+}
+{   .mmi
+mov r17=ar.bsp
+mov r18=ar.rnat
+add r14=40,r16
+;;
+}
+{   .mmi
+st8 [r14]=r17,64// bspstore
+(p15)   mov ar.bspstore=gp
+add r15=48,r16
+;;
+}
+{   .mmi
+st8 [r15]=r18   // rnat
+st8 [r14]=r0// ndirty
+nop 0
+;;
+}
+{   .mmi
+alloc   r14=ar.pfs, 0, 0, 3, 0
+mov ar.rsc=15
+mov out0=r8
+;;
+}
+{   .mmi
+ld8 r16=[r10],8 // function address
+;;
+ld8 gp=[r10]// function's gp value
+mov b7=r16
+;;
+}
+{   .mib
+mov out1=r9
+add out2=16,sp
+br.call.sptkrp=b7
+;;
+}
+{   .mmi
+mov r15=SYS_sigreturn
+add out0=16,sp
+break   0x10
+;;
+}
+{   .mmi
+mov r15=SYS_exit
+mov out0=ret0
+break   0x10
+;;
+}
+END(break_sigtramp)
+
+ENTRY_NOPROFILE(epc_sigtramp, 0)
+{   .mmi
+ld8 r16=[r10],8 // function address
+mov ar.rsc=0
+cmp.ne  p15,p0=0,gp
+;;
+}
+{   .mmi
+(p15)   invala
+(p15)   mov ar.bspstore=gp
+mov b7=r16
+;;
+}
+{   .mmi
+alloc   r14=ar.pfs, 0, 0, 3, 0
+mov ar.rsc=15
+nop 0
+;;
+}
+{   .mii
+ld8 gp=[r10]// function's gp value
+mov out0=r8
+mov out1=r9
+}
+{   .mib
+add out2=16,sp
+nop 0
+br.call.sptkrp=b7
+;;
+}
+add out0=16,sp
+/* XXX fix */	
+#if 0
+CALLSYS_NOERROR(sigreturn)
+mov out0=ret0
+CALLSYS_NOERROR(exit)
+#endif	
+END(epc_sigtramp)
+
+.align  PAGE_SIZE
+
+.text
+
+ENTRY_NOPROFILE(epc_syscall, 8)
+.prologue
+.unwabi @svr4, 'E'
+.save   rp, r0
+.body
+{   .mmi
+mov r16=ar.rsc
+mov ar.rsc=0
+nop 0
+;;
+}
+{   .mmi
+mov r18=ar.bspstore
+;;
+mov 

CVS commit: src/sys/arch/ia64/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 17:31:56 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: genassym.cf

Log Message:
Restore UC_MCONTEXT, UC_MCONTEXT, and clean up some whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/genassym.cf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 17:31:56 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: genassym.cf

Log Message:
Restore UC_MCONTEXT, UC_MCONTEXT, and clean up some whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/genassym.cf

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/genassym.cf
diff -u src/sys/arch/ia64/ia64/genassym.cf:1.15 src/sys/arch/ia64/ia64/genassym.cf:1.16
--- src/sys/arch/ia64/ia64/genassym.cf:1.15	Thu May  2 16:55:50 2019
+++ src/sys/arch/ia64/ia64/genassym.cf	Thu May  2 17:31:56 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.15 2019/05/02 16:55:50 scole Exp $
+#	$NetBSD: genassym.cf,v 1.16 2019/05/02 17:31:56 scole Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -85,8 +85,8 @@ define	KSTACK_PAGES		KSTACK_PAGES
 
 define	IA64_VM_MINKERN_REGION	IA64_VM_MINKERN_REGION
 define	IA64_PBVM_RR		IA64_PBVM_RR
-define  IA64_PBVM_PAGE_SHIFT	IA64_PBVM_PAGE_SHIFT
-define  IA64_PSR_I		IA64_PSR_I
+define	IA64_PBVM_PAGE_SHIFT	IA64_PBVM_PAGE_SHIFT
+define	IA64_PSR_I		IA64_PSR_I
 define	IA64_PSR_DT		IA64_PSR_DT
 define	IA64_PSR_DFL		IA64_PSR_DFL
 define	IA64_PSR_DFH		IA64_PSR_DFH
@@ -95,7 +95,7 @@ define	IA64_PSR_RT		IA64_PSR_RT
 define	IA64_PSR_BN		IA64_PSR_BN
 define	IA64_PBVM_BASE		IA64_PBVM_BASE
 define	IA64_PBVM_PGTBL		IA64_PBVM_PGTBL
-define  IA64_DCR_DEFAULT	IA64_DCR_DEFAULT
+define	IA64_DCR_DEFAULT	IA64_DCR_DEFAULT
 
 define	PTE_PRESENT		PTE_PRESENT
 define	PTE_ACCESSED		PTE_ACCESSED
@@ -112,17 +112,20 @@ define	EFAULT			EFAULT
 # Important offsets into the lwp and proc structs & associated constants
 define	L_PCB			offsetof(struct lwp, l_addr)
 
-define  SIZEOF_PCB		sizeof(struct pcb)
-define  SIZEOF_TRAPFRAME	sizeof(struct trapframe)
+define	SIZEOF_PCB		sizeof(struct pcb)
+define	SIZEOF_TRAPFRAME	sizeof(struct trapframe)
 define	SIZEOF_SPECIAL		sizeof(struct _special)
 
+define	MC_SPECIAL		offsetof(struct __mcontext, mc_special)
+define	UC_MCONTEXT		offsetof(struct __ucontext, uc_mcontext)
+
 # general constants 
 define	VM_MAX_ADDRESS		VM_MAX_ADDRESS
 
 # Important offsets into the user struct & associated constants
 define	UPAGES			UPAGES
 
-define 	FRAME_SYSCALL		FRAME_SYSCALL
+define	FRAME_SYSCALL		FRAME_SYSCALL
 
 define	PC_CURLWP		offsetof(struct cpu_info, ci_curlwp) 
 define	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault) 



CVS commit: src/sys/arch/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 16:55:51 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: genassym.cf support.S
src/sys/arch/ia64/include: setjmp.h

Log Message:
Remove some unused assembly and other variables to reduce compile warnings


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/support.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/setjmp.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/ia64/genassym.cf
diff -u src/sys/arch/ia64/ia64/genassym.cf:1.14 src/sys/arch/ia64/ia64/genassym.cf:1.15
--- src/sys/arch/ia64/ia64/genassym.cf:1.14	Tue Nov 20 20:36:24 2018
+++ src/sys/arch/ia64/ia64/genassym.cf	Thu May  2 16:55:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.14 2018/11/20 20:36:24 scole Exp $
+#	$NetBSD: genassym.cf,v 1.15 2019/05/02 16:55:50 scole Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -63,48 +63,22 @@
 #	@(#)genassym.c	5.11 (Berkeley) 5/10/91
 #
 
-if defined(_KERNEL_OPT)
-include "opt_compat_linux.h"
-include "opt_multiprocessor.h"
-endif
-
 include 
 include 
 include 
 include 
-include 
 include 
 include 
 
-include 
-include 
-include 
-include 
-include 
-
 include 
 
 include 
 include 
 include 
-include 
 include 
 include 
 include 
 
-ifdef COMPAT_LINUX
-include 
-include 
-endif
-
-ifdef COMPAT_IA32
-
-endif
-
-ifdef MULTIPROCESSOR
-include 
-endif
-
 define	PAGE_SIZE		PAGE_SIZE
 define	PAGE_SHIFT		PAGE_SHIFT
 define	KSTACK_PAGES		KSTACK_PAGES
@@ -112,7 +86,13 @@ define	KSTACK_PAGES		KSTACK_PAGES
 define	IA64_VM_MINKERN_REGION	IA64_VM_MINKERN_REGION
 define	IA64_PBVM_RR		IA64_PBVM_RR
 define  IA64_PBVM_PAGE_SHIFT	IA64_PBVM_PAGE_SHIFT
+define  IA64_PSR_I		IA64_PSR_I
+define	IA64_PSR_DT		IA64_PSR_DT
+define	IA64_PSR_DFL		IA64_PSR_DFL
 define	IA64_PSR_DFH		IA64_PSR_DFH
+define	IA64_PSR_IT		IA64_PSR_IT
+define	IA64_PSR_RT		IA64_PSR_RT
+define	IA64_PSR_BN		IA64_PSR_BN
 define	IA64_PBVM_BASE		IA64_PBVM_BASE
 define	IA64_PBVM_PGTBL		IA64_PBVM_PGTBL
 define  IA64_DCR_DEFAULT	IA64_DCR_DEFAULT
@@ -125,61 +105,23 @@ define	PTE_AR_RWX		PTE_AR_RWX
 define	PTE_MA_WB		PTE_MA_WB
 define	PTE_MA_UC		PTE_MA_UC
 
-define	DT_NULL			DT_NULL
-define	DT_RELA			DT_RELA
-define	DT_RELAENT		DT_RELAENT
-define	DT_RELASZ		DT_RELASZ
-define	DT_SYMTAB		DT_SYMTAB
-define	DT_SYMENT		DT_SYMENT
-
-
-define	LSRUN			LSRUN
-define	LSONPROC		LSONPROC
-
 # errno values
 define	ENAMETOOLONG		ENAMETOOLONG
 define	EFAULT			EFAULT
 
 # Important offsets into the lwp and proc structs & associated constants
 define	L_PCB			offsetof(struct lwp, l_addr)
-define	L_PRIORITY		offsetof(struct lwp, l_priority)
-define	L_STAT			offsetof(struct lwp, l_stat)
-define	L_WCHAN			offsetof(struct lwp, l_wchan)
-define	L_PROC			offsetof(struct lwp, l_proc)
-define	L_CPU			offsetof(struct lwp, l_cpu)
-define	P_FLAG			offsetof(struct proc, p_flag)
-define	P_RASLIST		offsetof(struct proc, p_raslist)
-
-define	PK_SYSTEM		PK_SYSTEM
-
-define	M_DATA			offsetof(struct mbuf, m_data)
-define	M_LEN			offsetof(struct mbuf, m_len)
-define	M_NEXT			offsetof(struct mbuf, m_next)
-
-define	IP_SRC			offsetof(struct ip, ip_src)
-define	IP_DST			offsetof(struct ip, ip_dst)
-
-define	IP6_SRC			offsetof(struct ip6_hdr, ip6_src)
-define	IP6_DST			offsetof(struct ip6_hdr, ip6_dst)
-
-define	CI_NTRAP		offsetof(struct cpu_info, ci_data.cpu_ntrap)
-define	CI_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
 
 define  SIZEOF_PCB		sizeof(struct pcb)
 define  SIZEOF_TRAPFRAME	sizeof(struct trapframe)
 define	SIZEOF_SPECIAL		sizeof(struct _special)
 
-define	MC_SPECIAL		offsetof(struct __mcontext, mc_special)
-define	UC_MCONTEXT		offsetof(struct __ucontext, uc_mcontext)
-
 # general constants 
 define	VM_MAX_ADDRESS		VM_MAX_ADDRESS
 
 # Important offsets into the user struct & associated constants
 define	UPAGES			UPAGES
 
-#XXX: 
-
 define 	FRAME_SYSCALL		FRAME_SYSCALL
 
 define	PC_CURLWP		offsetof(struct cpu_info, ci_curlwp) 

Index: src/sys/arch/ia64/ia64/support.S
diff -u src/sys/arch/ia64/ia64/support.S:1.8 src/sys/arch/ia64/ia64/support.S:1.9
--- src/sys/arch/ia64/ia64/support.S:1.8	Sat Apr  6 03:06:25 2019
+++ src/sys/arch/ia64/ia64/support.S	Thu May  2 16:55:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: support.S,v 1.8 2019/04/06 03:06:25 thorpej Exp $	*/
+/*	$NetBSD: support.S,v 1.9 2019/05/02 16:55:50 scole Exp $	*/
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -56,7 +56,6 @@
  */
 
 #include 
-#include 
 
 #include "assym.h"
 

Index: src/sys/arch/ia64/include/setjmp.h
diff -u src/sys/arch/ia64/include/setjmp.h:1.2 src/sys/arch/ia64/include/setjmp.h:1.3
--- src/sys/arch/ia64/include/setjmp.h:1.2	Sun Sep 10 21:16:56 2006
+++ src/sys/arch/ia64/include/setjmp.h	Thu May  2 16:55:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: setjmp.h,v 1.2 2006/09/10 21:16:56 cherry Exp $	*/
+/*	$NetBSD: 

CVS commit: src/sys/arch/ia64

2019-05-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu May  2 16:55:51 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: genassym.cf support.S
src/sys/arch/ia64/include: setjmp.h

Log Message:
Remove some unused assembly and other variables to reduce compile warnings


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/support.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/setjmp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2019-04-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Apr 29 16:39:58 UTC 2019

Modified Files:
src/sys/arch/ia64/acpi: madt.c
src/sys/arch/ia64/ia64: mainbus.c

Log Message:
Rename ACPI_NAME_SIZE -> ACPI_NAMESEG_SIZE with acpica update, see
src/sys/external/bsd/acpica/dist/changes.txt


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/acpi/madt.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/ia64/mainbus.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/acpi/madt.c
diff -u src/sys/arch/ia64/acpi/madt.c:1.3 src/sys/arch/ia64/acpi/madt.c:1.4
--- src/sys/arch/ia64/acpi/madt.c:1.3	Sun Apr  7 07:37:51 2013
+++ src/sys/arch/ia64/acpi/madt.c	Mon Apr 29 16:39:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: madt.c,v 1.3 2013/04/07 07:37:51 kiyohara Exp $	*/
+/*	$NetBSD: madt.c,v 1.4 2019/04/29 16:39:58 scole Exp $	*/
 /*-
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
@@ -148,7 +148,7 @@ ia64_probe_sapics(void)
 			table->Header.Signature[3], table);
 
 		if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
-		ACPI_NAME_SIZE) != 0 ||
+		ACPI_NAMESEG_SIZE) != 0 ||
 		ACPI_FAILURE(AcpiTbChecksum((void *)table,
 		table->Header.Length)))
 			continue;
@@ -242,7 +242,7 @@ ia64_count_cpus(void)
 		IA64_PHYS_TO_RR7(xsdt->TableOffsetEntry[t]);
 
 		if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
-		ACPI_NAME_SIZE) != 0 ||
+		ACPI_NAMESEG_SIZE) != 0 ||
 		ACPI_FAILURE(AcpiTbChecksum((void *)table,
 			table->Header.Length)))
 			continue;

Index: src/sys/arch/ia64/ia64/mainbus.c
diff -u src/sys/arch/ia64/ia64/mainbus.c:1.10 src/sys/arch/ia64/ia64/mainbus.c:1.11
--- src/sys/arch/ia64/ia64/mainbus.c:1.10	Tue Jun 21 11:33:33 2016
+++ src/sys/arch/ia64/ia64/mainbus.c	Mon Apr 29 16:39:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.10 2016/06/21 11:33:33 nonaka Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.11 2019/04/29 16:39:58 scole Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.10 2016/06/21 11:33:33 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.11 2019/04/29 16:39:58 scole Exp $");
 
 #include "acpica.h"
 
@@ -95,7 +95,7 @@ mainbus_attach(device_t parent, device_t
 		IA64_PHYS_TO_RR7(xsdt->TableOffsetEntry[i]);
 
 		sig = table->Header.Signature;
-		if (strncmp(sig, ACPI_SIG_MADT, ACPI_NAME_SIZE) != 0)
+		if (strncmp(sig, ACPI_SIG_MADT, ACPI_NAMESEG_SIZE) != 0)
 			continue;
 		len = table->Header.Length;
 		if (ACPI_FAILURE(AcpiTbChecksum((void *)table, len)))



CVS commit: src/sys/arch/ia64

2019-04-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Mon Apr 29 16:39:58 UTC 2019

Modified Files:
src/sys/arch/ia64/acpi: madt.c
src/sys/arch/ia64/ia64: mainbus.c

Log Message:
Rename ACPI_NAME_SIZE -> ACPI_NAMESEG_SIZE with acpica update, see
src/sys/external/bsd/acpica/dist/changes.txt


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/acpi/madt.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/ia64/mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-04-19 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Apr 19 16:28:32 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
In map_vhpt(), read pmap_vhpt_log2size before any memory translation
instructions to avoid "Data Nested TLB faults" with GCC 7.4.0


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-04-19 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Apr 19 16:28:32 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
In map_vhpt(), read pmap_vhpt_log2size before any memory translation
instructions to avoid "Data Nested TLB faults" with GCC 7.4.0


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/ia64/machdep.c
diff -u src/sys/arch/ia64/ia64/machdep.c:1.42 src/sys/arch/ia64/ia64/machdep.c:1.43
--- src/sys/arch/ia64/ia64/machdep.c:1.42	Sat Apr  6 03:06:25 2019
+++ src/sys/arch/ia64/ia64/machdep.c	Fri Apr 19 16:28:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.42 2019/04/06 03:06:25 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.43 2019/04/19 16:28:32 scole Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -267,18 +267,24 @@ map_vhpt(uintptr_t vhpt)
 pt_entry_t pte;
 uint64_t psr;
 
+	/*
+	 * XXX read pmap_vhpt_log2size before any memory translation
+	 * instructions to avoid "Data Nested TLB faults".  Not
+	 * exactly sure why this is needed with GCC 7.4
+	 */
+	register uint64_t log2size = pmap_vhpt_log2size << 2;
+	
 pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY |
 		PTE_PL_KERN | PTE_AR_RW;
 pte |= vhpt & PTE_PPN_MASK;
 
-__asm __volatile("ptr.d %0,%1" :: "r"(vhpt),
-			 "r"(pmap_vhpt_log2size << 2));
+__asm __volatile("ptr.d %0,%1" :: "r"(vhpt), "r"(log2size));
 
 __asm __volatile("mov   %0=psr" : "=r"(psr));
 __asm __volatile("rsm   psr.ic|psr.i");
 ia64_srlz_i();
 ia64_set_ifa(vhpt);
-ia64_set_itir(pmap_vhpt_log2size << 2);
+	ia64_set_itir(log2size);
 ia64_srlz_d();
 __asm __volatile("itr.d dtr[%0]=%1" :: "r"(3), "r"(pte));
 __asm __volatile("mov   psr.l=%0" :: "r" (psr));



CVS commit: src/sys/arch/ia64

2019-04-03 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed Apr  3 21:03:06 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
add note about pmap.c compilation warnings


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.4 src/sys/arch/ia64/TODO:1.5
--- src/sys/arch/ia64/TODO:1.4	Wed Jan 30 22:53:22 2019
+++ src/sys/arch/ia64/TODO	Wed Apr  3 21:03:06 2019
@@ -15,6 +15,10 @@ What works:
 
 Tasks remaining, first couple seem most important:
 
+- pmap.c is getting compilation warnings (for gcc6 & gcc7) like
+  /var/tmp//cckQKcKn.s:7614: Warning: Use of 'st8' may violate RAW dependency 'RR#' (data)
+  ...
+  how to change compile flags for specific kernel file like "CFLAGS.pmap.c+= -O0" ?
 - context switching and forking appear unfinished,
   vm_machdep.c::cpu_lwp_fork() appears incomplete
 - pmap module, imported from freebsd but still needs more work and



CVS commit: src/sys/arch/ia64

2019-04-03 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed Apr  3 21:03:06 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
add note about pmap.c compilation warnings


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2019-03-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Mar 29 16:04:54 UTC 2019

Modified Files:
src/sys/arch/ia64/include: vmparam.h

Log Message:
Remove SGROWSIZ parameter which looks like it was imported from FreeBSD and not 
use with NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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.



CVS commit: src/sys/arch/ia64/include

2019-03-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Mar 29 16:04:54 UTC 2019

Modified Files:
src/sys/arch/ia64/include: vmparam.h

Log Message:
Remove SGROWSIZ parameter which looks like it was imported from FreeBSD and not 
use with NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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.10 src/sys/arch/ia64/include/vmparam.h:1.11
--- src/sys/arch/ia64/include/vmparam.h:1.10	Sat Apr  8 18:05:36 2017
+++ src/sys/arch/ia64/include/vmparam.h	Fri Mar 29 16:04:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.10 2017/04/08 18:05:36 scole Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.11 2019/03/29 16:04:54 scole Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -57,9 +57,6 @@
 #ifndef	MAXSSIZ
 #define	MAXSSIZ		(1<<28)			/* max stack size (256M) */
 #endif
-#ifndef SGROWSIZ
-#define SGROWSIZ	(128UL*1024)		/* amount to grow stack */
-#endif
 
 #define	IA64_VM_MINKERN_REGION	4
 



CVS commit: src/sys/arch/ia64

2019-01-30 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed Jan 30 22:53:22 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
RUMP building on ia64 now


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64

2019-01-30 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Wed Jan 30 22:53:22 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
RUMP building on ia64 now


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.3 src/sys/arch/ia64/TODO:1.4
--- src/sys/arch/ia64/TODO:1.3	Tue Jan 29 19:44:03 2019
+++ src/sys/arch/ia64/TODO	Wed Jan 30 22:53:22 2019
@@ -61,7 +61,6 @@ Tasks remaining, first couple seem most 
 - write console and/or X framebuffer driver.  freebsd has vgapci
   device that may be portable
 - add ia32 emulation, port from freebsd
-- add rump stuff/MKRUMP
 - create install EFI/cdrom/netbsd
 - fix ski to run on other archs beside i386, or at least amd64
 



CVS commit: src/sys/arch/ia64

2019-01-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue Jan 29 19:44:03 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
add more items


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/TODO

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/TODO
diff -u src/sys/arch/ia64/TODO:1.2 src/sys/arch/ia64/TODO:1.3
--- src/sys/arch/ia64/TODO:1.2	Wed Nov 14 20:13:14 2018
+++ src/sys/arch/ia64/TODO	Tue Jan 29 19:44:03 2019
@@ -32,14 +32,14 @@ Tasks remaining, first couple seem most 
 - implement ld.elf_so, MK_DYNAMICROOT
 - fix memory detection, on real hardware doesn't find all memory
 - implement interrupts (sacpi & pci), can be mostly from freebsd?
-- MKLINT and MKGDB for ia64?
+- MKGDB for ia64
 - implement fp[gs]etsticky, [make|get|set|swap]context
 - floating point, fenv functions were imported from freebsd, but haven't been tested
 - implement core_machdep.c
 - implement __cloneS ptrace.S sbrk.S shmat.S
 - implement kvm_ia64.c
 - implement pmc (performance monitoring counters) for ia64 pmc registers
-- cpuctl
+- implement ia64 md code for cpuctl, intrctl as needed
 - optional(?) mutex.h/lock_stubs.S, mutex_enter()/mutex_exit() __HAVE_MUTEX_STUBS
mutex_spin_enter()/mutex_spin_exit() __HAVE_SPIN_MUTEX_STUBS
 - rwlock.h rw_enter(),rw_exit(),rw_tryenter() __HAVE_RW_STUBS, implemented already?
@@ -63,6 +63,7 @@ Tasks remaining, first couple seem most 
 - add ia32 emulation, port from freebsd
 - add rump stuff/MKRUMP
 - create install EFI/cdrom/netbsd
+- fix ski to run on other archs beside i386, or at least amd64
 
 Pie in the sky
 - Xen and itanium!



CVS commit: src/sys/arch/ia64

2019-01-29 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue Jan 29 19:44:03 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
add more items


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/TODO

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-01-18 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Jan 18 18:47:16 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
Add DPRINTF function, use kstack variable for proc0 memory, reorder some 
functions so ci initialized before use


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/ia64/ia64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/ia64/machdep.c
diff -u src/sys/arch/ia64/ia64/machdep.c:1.40 src/sys/arch/ia64/ia64/machdep.c:1.41
--- src/sys/arch/ia64/ia64/machdep.c:1.40	Thu Nov 15 20:39:18 2018
+++ src/sys/arch/ia64/ia64/machdep.c	Fri Jan 18 18:47:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.40 2018/11/15 20:39:18 scole Exp $	*/
+/*	$NetBSD: machdep.c,v 1.41 2019/01/18 18:47:16 scole Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -119,6 +119,12 @@
 #include 
 #include 
 
+#ifdef DEBUG
+#define	DPRINTF(fmt, args...)	printf("%s: " fmt, __func__, ##args)
+#else
+#define	DPRINTF(fmt, args...)	((void)0)
+#endif
+ 
 /* the following is used externally (sysctl_hw) */
 char	machine[] = MACHINE;		/* from  */
 char	machine_arch[] = MACHINE_ARCH;	/* from  */
@@ -387,12 +393,6 @@ ia64_init(void)
 	vaddr_t v;
 
 	/* NO OUTPUT ALLOWED UNTIL FURTHER NOTICE */
-
-	/*
-	 * TODO: Disable interrupts, floating point etc.
-	 * Maybe flush cache and tlb
-	 */
-
 	ia64_set_fpsr(IA64_FPSR_DEFAULT);
 
 	/*
@@ -514,10 +514,8 @@ ia64_init(void)
 
 	for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) {
 
-#ifdef DEBUG
-		printf("MD %p: type %d pa 0x%lx cnt 0x%lx\n", md,
-		md->md_type, md->md_phys, md->md_pages);
-#endif
+		DPRINTF("MD %p: type %d pa 0x%lx cnt 0x%lx\n", md,
+			md->md_type, md->md_phys, md->md_pages);
 
 		pfn0 = ia64_btop(round_page(md->md_phys));
 		pfn1 = ia64_btop(trunc_page(md->md_phys + md->md_pages * 4096));
@@ -553,17 +551,15 @@ ia64_init(void)
 			 * Must compute the location of the kernel
 			 * within the segment.
 			 */
-#ifdef DEBUG
-			printf("Descriptor %p contains kernel\n", md);
-#endif
+			DPRINTF("Descriptor %p contains kernel\n", md);
+
 			if (pfn0 < kernstartpfn) {
 /*
  * There is a chunk before the kernel.
  */
-#ifdef DEBUG
-printf("Loading chunk before kernel: "
-   "0x%lx / 0x%lx\n", pfn0, kernstartpfn);
-#endif
+DPRINTF("Loading chunk before kernel: "
+	"0x%lx / 0x%lx\n", pfn0, kernstartpfn);
+
 uvm_page_physload(pfn0, kernstartpfn,
 pfn0, kernstartpfn, VM_FREELIST_DEFAULT);
 
@@ -572,10 +568,8 @@ ia64_init(void)
 /*
  * There is a chunk after the kernel.
  */
-#ifdef DEBUG
-printf("Loading chunk after kernel: "
-   "0x%lx / 0x%lx\n", kernendpfn, pfn1);
-#endif
+DPRINTF("Loading chunk after kernel: "
+	"0x%lx / 0x%lx\n", kernendpfn, pfn1);
 
 uvm_page_physload(kernendpfn, pfn1,
 kernendpfn, pfn1, VM_FREELIST_DEFAULT);
@@ -585,10 +579,8 @@ ia64_init(void)
 			/*
 			 * Just load this cluster as one chunk.
 			 */
-#ifdef DEBUG
-			printf("Loading descriptor %p: 0x%lx / 0x%lx\n",
-			md, pfn0, pfn1);
-#endif
+			DPRINTF("Loading descriptor %p: 0x%lx / 0x%lx\n",
+md, pfn0, pfn1);
 
 			uvm_page_physload(pfn0, pfn1, pfn0, pfn1,
 			VM_FREELIST_DEFAULT);
@@ -600,21 +592,16 @@ ia64_init(void)
 		panic("can't happen: system seems to have no memory!");
 
 	/*
-	 * Initialize the virtual memory system.
-	 */
-
-	pmap_bootstrap();
-
-	/*
 	 * Initialize error message buffer (at end of core).
 	 */
 	msgbufaddr = (void *) uvm_pageboot_alloc(MSGBUFSIZE);
 	initmsgbuf(msgbufaddr, MSGBUFSIZE);
 
 	/*
-	 * Init mapping for u page(s) for proc 0
+	 * Init mapping for u page(s) for proc 0.  use memory area
+	 * already set up in locore.S
 	 */
-	v = uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
+	v = (vaddr_t)
 	uvm_lwp_setuarea(, v);
 
 	/*
@@ -622,6 +609,8 @@ ia64_init(void)
 	 * and make lwp0's trapframe pointer point to it for sanity.
 	 */
 	lwp0.l_md.md_tf = (struct trapframe *)(v + UAREA_TF_OFFSET);
+	lwp0.l_md.md_tf->tf_length = sizeof(struct trapframe);
+	lwp0.l_md.md_tf->tf_flags = FRAME_SYSCALL;
 
 	lwp0.l_md.user_stack = NULL;
 	lwp0.l_md.user_stack_size = 0;
@@ -630,8 +619,6 @@ ia64_init(void)
 	pcb0->pcb_special.sp = v + UAREA_SP_OFFSET;
 	pcb0->pcb_special.bspstore = v + UAREA_BSPSTORE_OFFSET;
 	
-	mutex_init(>pcb_fpcpu_slock, MUTEX_DEFAULT, 0);
-
 	/*
 	 * Setup global data for the bootstrap cpu.
 	 */
@@ -643,9 +630,8 @@ ia64_init(void)
 	ia64_set_k4((uint64_t) ci);
 	ci->ci_cpuid = cpu_number();
 
-
 	/*
-	 * Initialise process context. XXX: This should really be in cpu_switch
+	 * Initialise process context. XXX: This should really be in cpu_switchto
 	 */
 	ci->ci_curlwp = 
 
@@ -662,6 +648,8 @@ ia64_init(void)
 	ia64_set_tpr(0);
 	ia64_srlz_d();
 
+	mutex_init(>pcb_fpcpu_slock, MUTEX_DEFAULT, 0);
+
 	/*
 	 * Save our current context so that we have a known (maybe 

CVS commit: src/sys/arch/ia64/ia64

2019-01-18 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Jan 18 18:47:16 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
Add DPRINTF function, use kstack variable for proc0 memory, reorder some 
functions so ci initialized before use


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/ia64/ia64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/ia64

2019-01-18 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Jan 18 18:03:06 UTC 2019

Modified Files:
src/sys/arch/ia64/ia64: vm_machdep.c

Log Message:
hopefully fix deadlock issue in cpu_switchto.  pointed out by  (Thanks!)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/ia64/vm_machdep.c
diff -u src/sys/arch/ia64/ia64/vm_machdep.c:1.15 src/sys/arch/ia64/ia64/vm_machdep.c:1.16
--- src/sys/arch/ia64/ia64/vm_machdep.c:1.15	Wed Nov 14 21:10:59 2018
+++ src/sys/arch/ia64/ia64/vm_machdep.c	Fri Jan 18 18:03:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.15 2018/11/14 21:10:59 scole Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.16 2019/01/18 18:03:06 scole Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -91,8 +91,9 @@ cpu_switchto(lwp_t *oldlwp, lwp_t *newlw
 		KASSERT(oldlwp == l);
 		swapctx(oldpcb, newpcb);
 	}
-	
-	return (oldlwp);
+
+	/* return oldlwp for the original thread that called cpu_switchto */
+	return ((lwp_t *)reg9);
 }
 
 /*
@@ -189,13 +190,12 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 		tf->tf_scratch.gr10 = 0;
 	}
 
-	tf->tf_scratch.gr2 = (unsigned long)FDESC_FUNC(func);
-	tf->tf_scratch.gr3 = (unsigned long)arg;
-
-	pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET;
-	pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline);
 	pcb2->pcb_special.bspstore = ua2 + UAREA_BSPSTORE_OFFSET + ndirty;
 	pcb2->pcb_special.pfs = 0;
+	pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET;
+	pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline);
+	tf->tf_scratch.gr2 = (unsigned long)FDESC_FUNC(func);
+	tf->tf_scratch.gr3 = (unsigned long)arg;
 
 	return;
 }



  1   2   3   4   >