PERFORCE change 39890 for review

Marcel Moolenaar marcel at FreeBSD.org
Fri Oct 17 20:15:29 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=39890

Change 39890 by marcel at marcel_nfs on 2003/10/17 20:14:58

	IFC @39883

Affected files ...

.. //depot/projects/vm/alpha/alpha/trap.c#2 integrate
.. //depot/projects/vm/amd64/amd64/exception.S#2 integrate
.. //depot/projects/vm/amd64/amd64/trap.c#2 integrate
.. //depot/projects/vm/amd64/amd64/uma_machdep.c#1 branch
.. //depot/projects/vm/amd64/include/frame.h#2 integrate
.. //depot/projects/vm/amd64/include/signal.h#2 integrate
.. //depot/projects/vm/amd64/include/ucontext.h#2 integrate
.. //depot/projects/vm/cam/scsi/scsi_cd.c#2 integrate
.. //depot/projects/vm/cam/scsi/scsi_da.c#2 integrate
.. //depot/projects/vm/compat/linprocfs/linprocfs.c#2 integrate
.. //depot/projects/vm/compat/linux/linux_socket.c#2 integrate
.. //depot/projects/vm/conf/files#2 integrate
.. //depot/projects/vm/conf/files.amd64#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/Makefile#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx.h#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_context.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_env.h#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_self.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_step.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_step.h#1 branch
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_trace.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_trace.h#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_ttrace.c#2 integrate
.. //depot/projects/vm/contrib/ia64/libuwx/src/uwx_uinfo.c#2 integrate
.. //depot/projects/vm/contrib/ipfilter/netinet/ip_fil.c#2 integrate
.. //depot/projects/vm/crypto/blowfish/bf_ecb.c#1 branch
.. //depot/projects/vm/crypto/blowfish/blowfish.h#2 integrate
.. //depot/projects/vm/crypto/cast128/cast128.c#2 integrate
.. //depot/projects/vm/crypto/cast128/cast128.h#2 integrate
.. //depot/projects/vm/crypto/cast128/cast128_subkey.h#2 delete
.. //depot/projects/vm/crypto/cast128/cast128sb.h#1 branch
.. //depot/projects/vm/crypto/rijndael/boxes-fst.dat#2 delete
.. //depot/projects/vm/crypto/rijndael/rijndael-alg-fst.c#2 integrate
.. //depot/projects/vm/crypto/rijndael/rijndael-alg-fst.h#2 integrate
.. //depot/projects/vm/crypto/rijndael/rijndael-api-fst.c#2 integrate
.. //depot/projects/vm/crypto/rijndael/rijndael-api-fst.h#2 integrate
.. //depot/projects/vm/crypto/rijndael/rijndael_local.h#2 integrate
.. //depot/projects/vm/dev/aac/aac.c#2 integrate
.. //depot/projects/vm/dev/aac/aacreg.h#2 integrate
.. //depot/projects/vm/dev/amr/amr.c#2 integrate
.. //depot/projects/vm/dev/amr/amr_disk.c#2 integrate
.. //depot/projects/vm/dev/amr/amrvar.h#2 integrate
.. //depot/projects/vm/dev/an/if_an_pccard.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-all.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-card.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-disk.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-dma.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-lowlevel.c#2 integrate
.. //depot/projects/vm/dev/ata/ata-queue.c#2 integrate
.. //depot/projects/vm/dev/ata/atapi-cd.c#2 integrate
.. //depot/projects/vm/dev/ath/if_ath.c#2 integrate
.. //depot/projects/vm/dev/ath/if_ath_pci.c#2 integrate
.. //depot/projects/vm/dev/ath/if_athvar.h#2 integrate
.. //depot/projects/vm/dev/cardbus/cardbus_cis.c#2 integrate
.. //depot/projects/vm/dev/cardbus/cardbus_cis.h#2 integrate
.. //depot/projects/vm/dev/ciss/ciss.c#2 integrate
.. //depot/projects/vm/dev/ed/if_ed.c#2 integrate
.. //depot/projects/vm/dev/ed/if_ed_cbus.c#2 integrate
.. //depot/projects/vm/dev/ed/if_ed_isa.c#2 integrate
.. //depot/projects/vm/dev/ed/if_edreg.h#2 integrate
.. //depot/projects/vm/dev/ed/if_edvar.h#2 integrate
.. //depot/projects/vm/dev/em/if_em.c#2 integrate
.. //depot/projects/vm/dev/em/if_em.h#2 integrate
.. //depot/projects/vm/dev/exca/exca.c#2 integrate
.. //depot/projects/vm/dev/hifn/hifn7751.c#2 integrate
.. //depot/projects/vm/dev/hifn/hifn7751reg.h#2 integrate
.. //depot/projects/vm/dev/hifn/hifn7751var.h#2 integrate
.. //depot/projects/vm/dev/kbd/atkbd.c#2 integrate
.. //depot/projects/vm/dev/owi/if_owi.c#2 integrate
.. //depot/projects/vm/dev/pccard/card_if.m#2 integrate
.. //depot/projects/vm/dev/pccard/pccard.c#2 integrate
.. //depot/projects/vm/dev/pccard/pccard_cis.c#2 integrate
.. //depot/projects/vm/dev/pccard/pccard_cis.h#1 branch
.. //depot/projects/vm/dev/pccard/pccard_cis_quirks.c#2 integrate
.. //depot/projects/vm/dev/pccard/pccarddevs#2 integrate
.. //depot/projects/vm/dev/pccard/pccarddevs.h#2 integrate
.. //depot/projects/vm/dev/pccard/pccardreg.h#2 integrate
.. //depot/projects/vm/dev/pci/pci_user.c#2 integrate
.. //depot/projects/vm/dev/sio/sio_pccard.c#2 integrate
.. //depot/projects/vm/dev/sound/pci/au88x0.c#2 integrate
.. //depot/projects/vm/dev/sound/pci/au88x0.h#2 integrate
.. //depot/projects/vm/dev/sound/pcm/ac97.c#2 integrate
.. //depot/projects/vm/dev/uart/uart_bus_pccard.c#2 integrate
.. //depot/projects/vm/dev/usb/ugen.c#2 integrate
.. //depot/projects/vm/dev/usb/usbdevs#2 integrate
.. //depot/projects/vm/dev/usb/usbdevs.h#2 integrate
.. //depot/projects/vm/dev/usb/usbdevs_data.h#2 integrate
.. //depot/projects/vm/dev/xe/if_xe.c#2 integrate
.. //depot/projects/vm/dev/xe/if_xe_pccard.c#2 integrate
.. //depot/projects/vm/dev/xe/if_xereg.h#2 integrate
.. //depot/projects/vm/dev/xe/if_xevar.h#2 integrate
.. //depot/projects/vm/fs/specfs/spec_vnops.c#2 integrate
.. //depot/projects/vm/geom/bde/g_bde.h#2 integrate
.. //depot/projects/vm/geom/bde/g_bde_lock.c#2 integrate
.. //depot/projects/vm/geom/geom_dev.c#2 integrate
.. //depot/projects/vm/geom/geom_event.c#2 integrate
.. //depot/projects/vm/i386/i386/locore.s#2 integrate
.. //depot/projects/vm/i386/i386/machdep.c#2 integrate
.. //depot/projects/vm/i386/i386/trap.c#2 integrate
.. //depot/projects/vm/i386/ibcs2/ibcs2_misc.c#2 integrate
.. //depot/projects/vm/i386/ibcs2/ibcs2_signal.c#2 integrate
.. //depot/projects/vm/i386/ibcs2/ibcs2_socksys.c#2 integrate
.. //depot/projects/vm/i386/ibcs2/ibcs2_util.c#2 integrate
.. //depot/projects/vm/i386/ibcs2/ibcs2_util.h#2 integrate
.. //depot/projects/vm/i386/ibcs2/imgact_coff.c#2 integrate
.. //depot/projects/vm/i386/isa/apic_vector.s#2 integrate
.. //depot/projects/vm/i386/isa/isa_compat.c#2 integrate
.. //depot/projects/vm/ia64/ia64/machdep.c#2 integrate
.. //depot/projects/vm/ia64/ia64/trap.c#2 integrate
.. //depot/projects/vm/ia64/ia64/unwind.c#2 integrate
.. //depot/projects/vm/kern/kern_clock.c#2 integrate
.. //depot/projects/vm/kern/kern_idle.c#2 integrate
.. //depot/projects/vm/kern/kern_poll.c#2 integrate
.. //depot/projects/vm/kern/kern_proc.c#2 integrate
.. //depot/projects/vm/kern/kern_sig.c#2 integrate
.. //depot/projects/vm/kern/kern_switch.c#2 integrate
.. //depot/projects/vm/kern/kern_synch.c#2 integrate
.. //depot/projects/vm/kern/sched_4bsd.c#2 integrate
.. //depot/projects/vm/kern/sched_ule.c#2 integrate
.. //depot/projects/vm/kern/subr_bus.c#2 integrate
.. //depot/projects/vm/kern/subr_disk.c#2 integrate
.. //depot/projects/vm/kern/subr_kobj.c#2 integrate
.. //depot/projects/vm/kern/sys_pipe.c#2 integrate
.. //depot/projects/vm/kern/sys_process.c#2 integrate
.. //depot/projects/vm/kern/tty_cons.c#2 integrate
.. //depot/projects/vm/kern/vfs_bio.c#2 integrate
.. //depot/projects/vm/kern/vfs_subr.c#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/h4/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/hci/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/l2cap/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/socket/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/ubt/Makefile#2 integrate
.. //depot/projects/vm/modules/netgraph/bluetooth/ubtbcmfw/Makefile#2 integrate
.. //depot/projects/vm/net/if.c#2 integrate
.. //depot/projects/vm/net/if_ethersubr.c#2 integrate
.. //depot/projects/vm/net/if_var.h#2 integrate
.. //depot/projects/vm/net/net_osdep.c#2 integrate
.. //depot/projects/vm/net/pfkeyv2.h#2 integrate
.. //depot/projects/vm/net/route.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_crypto.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_input.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_ioctl.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_ioctl.h#2 integrate
.. //depot/projects/vm/net80211/ieee80211_node.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_node.h#2 integrate
.. //depot/projects/vm/net80211/ieee80211_output.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_proto.c#2 integrate
.. //depot/projects/vm/net80211/ieee80211_var.h#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/drivers/ubt/ng_ubt.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/hci/ng_hci_cmds.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/hci/ng_hci_evnt.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/hci/ng_hci_misc.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/hci/ng_hci_misc.h#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/hci/ng_hci_ulpi.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/l2cap/ng_l2cap_misc.h#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/socket/ng_btsocket.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#2 integrate
.. //depot/projects/vm/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#2 integrate
.. //depot/projects/vm/netinet/icmp6.h#2 integrate
.. //depot/projects/vm/netinet/in_gif.c#2 integrate
.. //depot/projects/vm/netinet/in_gif.h#2 integrate
.. //depot/projects/vm/netinet/in_rmx.c#2 integrate
.. //depot/projects/vm/netinet/ip_dummynet.c#2 integrate
.. //depot/projects/vm/netinet/ip_fw2.c#2 integrate
.. //depot/projects/vm/netinet/ip_input.c#2 integrate
.. //depot/projects/vm/netinet/ip_var.h#2 integrate
.. //depot/projects/vm/netinet/tcp_input.c#2 integrate
.. //depot/projects/vm/netinet6/ah.h#2 integrate
.. //depot/projects/vm/netinet6/ah6.h#2 integrate
.. //depot/projects/vm/netinet6/ah_aesxcbcmac.c#1 branch
.. //depot/projects/vm/netinet6/ah_aesxcbcmac.h#1 branch
.. //depot/projects/vm/netinet6/ah_core.c#2 integrate
.. //depot/projects/vm/netinet6/ah_input.c#2 integrate
.. //depot/projects/vm/netinet6/ah_output.c#2 integrate
.. //depot/projects/vm/netinet6/dest6.c#2 integrate
.. //depot/projects/vm/netinet6/esp.h#2 integrate
.. //depot/projects/vm/netinet6/esp_aesctr.c#1 branch
.. //depot/projects/vm/netinet6/esp_aesctr.h#1 branch
.. //depot/projects/vm/netinet6/esp_core.c#2 integrate
.. //depot/projects/vm/netinet6/esp_input.c#2 integrate
.. //depot/projects/vm/netinet6/esp_output.c#2 integrate
.. //depot/projects/vm/netinet6/esp_rijndael.c#2 integrate
.. //depot/projects/vm/netinet6/esp_rijndael.h#2 integrate
.. //depot/projects/vm/netinet6/frag6.c#2 integrate
.. //depot/projects/vm/netinet6/icmp6.c#2 integrate
.. //depot/projects/vm/netinet6/in6.c#2 integrate
.. //depot/projects/vm/netinet6/in6.h#2 integrate
.. //depot/projects/vm/netinet6/in6_cksum.c#2 integrate
.. //depot/projects/vm/netinet6/in6_gif.c#2 integrate
.. //depot/projects/vm/netinet6/in6_gif.h#2 integrate
.. //depot/projects/vm/netinet6/in6_ifattach.c#2 integrate
.. //depot/projects/vm/netinet6/in6_pcb.c#2 integrate
.. //depot/projects/vm/netinet6/in6_proto.c#2 integrate
.. //depot/projects/vm/netinet6/in6_rmx.c#2 integrate
.. //depot/projects/vm/netinet6/in6_src.c#2 integrate
.. //depot/projects/vm/netinet6/in6_var.h#2 integrate
.. //depot/projects/vm/netinet6/ip6_forward.c#2 integrate
.. //depot/projects/vm/netinet6/ip6_fw.c#2 integrate
.. //depot/projects/vm/netinet6/ip6_fw.h#2 integrate
.. //depot/projects/vm/netinet6/ip6_input.c#2 integrate
.. //depot/projects/vm/netinet6/ip6_mroute.c#2 integrate
.. //depot/projects/vm/netinet6/ip6_output.c#2 integrate
.. //depot/projects/vm/netinet6/ip6_var.h#2 integrate
.. //depot/projects/vm/netinet6/ip6protosw.h#2 integrate
.. //depot/projects/vm/netinet6/ipcomp_core.c#2 integrate
.. //depot/projects/vm/netinet6/ipcomp_input.c#2 integrate
.. //depot/projects/vm/netinet6/ipsec.c#2 integrate
.. //depot/projects/vm/netinet6/ipsec.h#2 integrate
.. //depot/projects/vm/netinet6/mld6.c#2 integrate
.. //depot/projects/vm/netinet6/mld6_var.h#2 integrate
.. //depot/projects/vm/netinet6/nd6.c#2 integrate
.. //depot/projects/vm/netinet6/nd6.h#2 integrate
.. //depot/projects/vm/netinet6/nd6_nbr.c#2 integrate
.. //depot/projects/vm/netinet6/nd6_rtr.c#2 integrate
.. //depot/projects/vm/netinet6/raw_ip6.c#2 integrate
.. //depot/projects/vm/netinet6/scope6.c#2 integrate
.. //depot/projects/vm/netinet6/scope6_var.h#2 integrate
.. //depot/projects/vm/netinet6/udp6_usrreq.c#2 integrate
.. //depot/projects/vm/netkey/key_var.h#2 integrate
.. //depot/projects/vm/pc98/i386/machdep.c#2 integrate
.. //depot/projects/vm/pci/if_ti.c#2 integrate
.. //depot/projects/vm/sparc64/sparc64/trap.c#2 integrate
.. //depot/projects/vm/sys/bus.h#2 integrate
.. //depot/projects/vm/sys/conf.h#2 integrate
.. //depot/projects/vm/sys/cons.h#2 integrate
.. //depot/projects/vm/sys/domain.h#2 integrate
.. //depot/projects/vm/sys/endian.h#2 integrate
.. //depot/projects/vm/sys/kernel.h#2 integrate
.. //depot/projects/vm/sys/kobj.h#2 integrate
.. //depot/projects/vm/sys/mutex.h#2 integrate
.. //depot/projects/vm/sys/param.h#2 integrate
.. //depot/projects/vm/sys/ptrace.h#2 integrate
.. //depot/projects/vm/sys/sched.h#2 integrate
.. //depot/projects/vm/tools/makeobjops.awk#2 integrate
.. //depot/projects/vm/ufs/ffs/ffs_snapshot.c#2 integrate
.. //depot/projects/vm/vm/vm_fault.c#2 integrate

Differences ...

==== //depot/projects/vm/alpha/alpha/trap.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.116 2003/08/22 07:20:25 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.117 2003/10/09 10:17:15 robert Exp $");
 
 /* #include "opt_fix_unaligned_vax_fp.h" */
 #include "opt_ddb.h"
@@ -45,6 +45,7 @@
 #include <sys/smp.h>
 #include <sys/vmmeter.h>
 #include <sys/sysent.h>
+#include <sys/signalvar.h>
 #include <sys/syscall.h>
 #include <sys/pioctl.h>
 #include <vm/vm.h>
@@ -729,6 +730,8 @@
 
 		STOPEVENT(p, S_SCE, (callp->sy_narg & SYF_ARGMASK));
 
+		PTRACESTOP_SC(p, td, S_PT_SCE);
+
 		error = (*callp->sy_call)(td, args + hidden);
 	}
 
@@ -775,6 +778,8 @@
 	 */
 	STOPEVENT(p, S_SCX, code);
 
+	PTRACESTOP_SC(p, td, S_PT_SCX);
+
 #ifdef DIAGNOSTIC
 	cred_free_thread(td);
 #endif

==== //depot/projects/vm/amd64/amd64/exception.S#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.112 2003/09/22 22:54:14 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.113 2003/10/15 02:04:52 peter Exp $
  */
 
 #include <machine/asmacros.h>
@@ -228,7 +228,7 @@
 	movq	%rsp,PCPU(SCRATCH_RSP)
 	movq	common_tss+COMMON_TSS_RSP0,%rsp
 	/* Now emulate a trapframe. Make the 8 byte alignment odd for call. */
-	subq	$TF_SIZE+8,%rsp
+	subq	$TF_SIZE,%rsp
 	/* defer TF_RSP till we have a spare register */
 	movq	%r11,TF_RFLAGS(%rsp)
 	movq	%rcx,TF_RIP(%rsp)	/* %rcx original value is in %r10 */

==== //depot/projects/vm/amd64/amd64/trap.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.264 2003/09/22 22:52:46 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.266 2003/10/15 02:04:52 peter Exp $");
 
 /*
  * AMD64 Trap and System call handling
@@ -55,6 +55,7 @@
 #include <sys/systm.h>
 #include <sys/proc.h>
 #include <sys/pioctl.h>
+#include <sys/ptrace.h>
 #include <sys/kernel.h>
 #include <sys/ktr.h>
 #include <sys/lock.h>
@@ -257,6 +258,9 @@
 		default:
 			ucode = code + BUS_SEGM_FAULT ;
 			i = SIGBUS;
+printf("trap %d: pid %d err %p eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rbp %p, rsi %p, rdi %p\n", type, p->p_pid, (void *)frame.tf_err,
+(void *)frame.tf_addr, (void *)frame.tf_rip, (void *)frame.tf_rax, (void *)frame.tf_rbx, (void *)frame.tf_rcx, (void *)frame.tf_rdx, (void *)frame.tf_rsp, (void *)frame.tf_rbp, (void *)frame.tf_rsi, (void *)frame.tf_rdi);
+
 			break;
 
 		case T_PAGEFLT:		/* page fault */
@@ -541,6 +545,12 @@
 		return (-1);
 	}
 
+printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rbp %p, rsi %p, rdi %p\n", p->p_pid,
+			frame->tf_err & PGEX_U ? "user" : "supervisor",
+			frame->tf_err & PGEX_W ? "write" : "read",
+			frame->tf_err & PGEX_P ? "protection violation" : "page not present",
+(void *)eva, (void *)frame->tf_rip, (void *)frame->tf_rax, (void *)frame->tf_rbx, (void *)frame->tf_rcx, (void *)frame->tf_rdx, (void *)frame->tf_rsp, (void *)frame->tf_rbp, (void *)frame->tf_rsi, (void *)frame->tf_rdi);
+
 	return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
 }
 
@@ -740,6 +750,8 @@
 
 		STOPEVENT(p, S_SCE, narg);
 
+		PTRACESTOP_SC(p, td, S_PT_SCE);
+
 		error = (*callp->sy_call)(td, argp);
 	}
 
@@ -808,6 +820,8 @@
 	 */
 	STOPEVENT(p, S_SCX, code);
 
+	PTRACESTOP_SC(p, td, S_PT_SCX);
+
 #ifdef DIAGNOSTIC
 	cred_free_thread(td);
 #endif

==== //depot/projects/vm/amd64/include/frame.h#2 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)frame.h	5.2 (Berkeley) 1/18/91
- * $FreeBSD: src/sys/amd64/include/frame.h,v 1.24 2003/05/12 18:33:19 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/frame.h,v 1.25 2003/10/15 02:04:52 peter Exp $
  */
 
 #ifndef _MACHINE_FRAME_H_
@@ -69,6 +69,7 @@
 	register_t	tf_r15;
 	register_t	tf_trapno;
 	register_t	tf_addr;
+	register_t	tf_flags;
 	/* below portion defined in hardware */
 	register_t	tf_err;
 	register_t	tf_rip;
@@ -98,6 +99,7 @@
 	register_t	if_r15;
 	register_t	:64;		/* compat with trap frame - trapno */
 	register_t	:64;		/* compat with trap frame - addr */
+	register_t	:64;		/* compat with trap frame - flags */
 	register_t	:64;		/* compat with trap frame - err */
 	/* below portion defined in hardware */
 	register_t	if_rip;
@@ -127,6 +129,7 @@
 	register_t	cf_r15;
 	register_t	:64;		/* compat with trap frame - trapno */
 	register_t	:64;		/* compat with trap frame - addr */
+	register_t	:64;		/* compat with trap frame - flags */
 	register_t	:64;		/* compat with trap frame - err */
 	/* below portion defined in hardware */
 	register_t	cf_rip;

==== //depot/projects/vm/amd64/include/signal.h#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)signal.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/amd64/include/signal.h,v 1.23 2003/09/08 18:31:48 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/signal.h,v 1.24 2003/10/15 02:04:52 peter Exp $
  */
 
 #ifndef _MACHINE_SIGNAL_H_
@@ -91,6 +91,7 @@
 	long	sc_r15;
 	long	sc_trapno;
 	long	sc_addr;
+	long	sc_flags;
 	long	sc_err;
 	long	sc_rip;
 	long	sc_cs;
@@ -104,9 +105,8 @@
 	 */
 	long	sc_fpformat;
 	long	sc_ownedfp;
-	long	sc_spare1[1];
 	long	sc_fpstate[64] __aligned(16);
-	long	sc_spare2[8];
+	long	sc_spare[8];
 };
 #endif /* __BSD_VISIBLE */
 

==== //depot/projects/vm/amd64/include/ucontext.h#2 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.15 2003/10/01 01:08:04 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.16 2003/10/15 02:04:52 peter Exp $
  */
 
 #ifndef _MACHINE_UCONTEXT_H_
@@ -55,6 +55,7 @@
 	__register_t	mc_r15;
 	__register_t	mc_trapno;
 	__register_t	mc_addr;
+	__register_t	mc_flags;
 	__register_t	mc_err;
 	__register_t	mc_rip;
 	__register_t	mc_cs;
@@ -70,12 +71,11 @@
 #define	_MC_FPOWNED_FPU		0x20001	/* FP state came from FPU */
 #define	_MC_FPOWNED_PCB		0x20002	/* FP state came from PCB */
 	long	mc_ownedfp;
-	long	mc_spare1[1];		/* align mc_fpstate to 16 bytes */
 	/*
 	 * See <machine/npx.h> for the internals of mc_fpstate[].
 	 */
 	long	mc_fpstate[64] __aligned(16);
-	long	mc_spare2[8];
+	long	mc_spare[8];
 } mcontext_t;
 
 #endif /* !_MACHINE_UCONTEXT_H_ */

==== //depot/projects/vm/cam/scsi/scsi_cd.c#2 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.85 2003/10/06 10:39:13 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.86 2003/10/07 14:46:59 thomas Exp $");
 
 #include "opt_cd.h"
 
@@ -92,17 +92,18 @@
 } cd_quirks;
 
 typedef enum {
-	CD_FLAG_INVALID		= 0x001,
-	CD_FLAG_NEW_DISC	= 0x002,
-	CD_FLAG_DISC_LOCKED	= 0x004,
-	CD_FLAG_DISC_REMOVABLE	= 0x008,
-	CD_FLAG_TAGGED_QUEUING	= 0x010,
-	CD_FLAG_CHANGER		= 0x040,
-	CD_FLAG_ACTIVE		= 0x080,
-	CD_FLAG_SCHED_ON_COMP	= 0x100,
-	CD_FLAG_RETRY_UA	= 0x200,
-	CD_FLAG_VALID_MEDIA	= 0x400,
-	CD_FLAG_VALID_TOC	= 0x800
+	CD_FLAG_INVALID		= 0x0001,
+	CD_FLAG_NEW_DISC	= 0x0002,
+	CD_FLAG_DISC_LOCKED	= 0x0004,
+	CD_FLAG_DISC_REMOVABLE	= 0x0008,
+	CD_FLAG_TAGGED_QUEUING	= 0x0010,
+	CD_FLAG_CHANGER		= 0x0040,
+	CD_FLAG_ACTIVE		= 0x0080,
+	CD_FLAG_SCHED_ON_COMP	= 0x0100,
+	CD_FLAG_RETRY_UA	= 0x0200,
+	CD_FLAG_VALID_MEDIA	= 0x0400,
+	CD_FLAG_VALID_TOC	= 0x0800,
+	CD_FLAG_SCTX_INIT	= 0x1000
 } cd_flags;
 
 typedef enum {
@@ -421,7 +422,8 @@
 	xpt_print_path(periph->path);
 	printf("removing device entry\n");
 
-	if (sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
+	if ((softc->flags & CD_FLAG_SCTX_INIT) != 0
+	    && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
 		xpt_print_path(periph->path);
 		printf("can't remove sysctl context\n");
 	}
@@ -581,6 +583,7 @@
 	mtx_lock(&Giant);
 
 	sysctl_ctx_init(&softc->sysctl_ctx);
+	softc->flags |= CD_FLAG_SCTX_INIT;
 	softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
 		SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO,
 		tmpstr2, CTLFLAG_RD, 0, tmpstr);

==== //depot/projects/vm/cam/scsi/scsi_da.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.159 2003/09/04 01:01:20 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.160 2003/10/08 07:12:30 thomas Exp $");
 
 #ifdef _KERNEL
 #include "opt_da.h"
@@ -89,7 +89,8 @@
 	DA_FLAG_NEED_OTAG	= 0x020,
 	DA_FLAG_WENT_IDLE	= 0x040,
 	DA_FLAG_RETRY_UA	= 0x080,
-	DA_FLAG_OPEN		= 0x100
+	DA_FLAG_OPEN		= 0x100,
+	DA_FLAG_SCTX_INIT	= 0x200
 } da_flags;
 
 typedef enum {
@@ -838,7 +839,8 @@
 	/*
 	 * If we can't free the sysctl tree, oh well...
 	 */
-	if (sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
+	if ((softc->flags & DA_FLAG_SCTX_INIT) != 0
+	    && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
 		xpt_print_path(periph->path);
 		printf("can't remove sysctl context\n");
 	}
@@ -925,6 +927,7 @@
 
 	mtx_lock(&Giant);
 	sysctl_ctx_init(&softc->sysctl_ctx);
+	softc->flags |= DA_FLAG_SCTX_INIT;
 	softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
 		SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
 		CTLFLAG_RD, 0, tmpstr);

==== //depot/projects/vm/compat/linprocfs/linprocfs.c#2 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.75 2003/09/30 13:35:19 des Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.76 2003/10/08 18:05:59 gallatin Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -413,7 +413,7 @@
 static int
 linprocfs_dostat(PFS_FILL_ARGS)
 {
-	unsigned int olen, plen;
+	size_t olen, plen;
 	int name[2];
 	int i, ncpu;
 

==== //depot/projects/vm/compat/linux/linux_socket.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.42 2003/06/10 21:27:39 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.43 2003/10/11 15:08:32 iwasaki Exp $");
 
 /* XXX we use functions that might not exist. */
 #include "opt_compat.h"
@@ -225,6 +225,17 @@
 }
 
 static int
+bsd_to_linux_sockopt_level(int level)
+{
+
+	switch (level) {
+	case SOL_SOCKET:
+		return (LINUX_SOL_SOCKET);
+	}
+	return (level);
+}
+
+static int
 linux_to_bsd_ip_sockopt(int opt)
 {
 
@@ -995,9 +1006,9 @@
 	} */ bsd_args;
 	struct msghdr msg;
 	struct msghdr *nmsg = NULL;
+	struct cmsghdr *cmsg;
 	int error;
-	int level;
-	caddr_t control;
+	caddr_t sg;
 
 	if ((error = copyin(args, &linux_args, sizeof(linux_args))))
 		return (error);
@@ -1006,54 +1017,39 @@
 	if (error)
 		return (error);
 
-	if (msg.msg_name) {
+	sg = stackgap_init();
+	nmsg = (struct msghdr *)stackgap_alloc(&sg, sizeof(struct msghdr));
+	if (nmsg == NULL)
+		return (ENOMEM);
+
+	bcopy(&msg, nmsg, sizeof(struct msghdr));
+
+	if (msg.msg_name != NULL) {
 		struct sockaddr *sa;
-		caddr_t sg = stackgap_init();
 
-		nmsg = (struct msghdr *) stackgap_alloc(&sg,
-		    sizeof(struct msghdr));
-		if (!nmsg)
-			return (ENOMEM);
-
 		error = linux_sa_get(&sg, &sa,
 		    (struct osockaddr *) msg.msg_name, &msg.msg_namelen);
 		if (error)
 			return (error);
 
-		msg.msg_name = (struct sockaddr *) sa;
-		error = copyout(&msg, nmsg, sizeof(struct msghdr));
-		if (error)
-			return (error);
+		nmsg->msg_name = sa;
 	}
 
-	error = copyin(&linux_args.msg->msg_control, &control,
-	    sizeof(caddr_t));
-	if (error)
-		return (error);
+	if (msg.msg_control != NULL) {
+		nmsg->msg_control = (struct cmsghdr *)stackgap_alloc(&sg,
+		    msg.msg_controllen);
+		if (nmsg->msg_control == NULL)
+			return (ENOMEM);
 
-	if (control == NULL)
-		goto done;
+		bcopy(msg.msg_control, nmsg->msg_control, msg.msg_controllen);
+		cmsg = (struct cmsghdr*)nmsg->msg_control;
 
-	error = copyin(&((struct cmsghdr*)control)->cmsg_level, &level,
-	    sizeof(int));
-	if (error)
-		return (error);
+		cmsg->cmsg_level = linux_to_bsd_sockopt_level(cmsg->cmsg_level);
+	}
 
-	if (level == 1) {
-		/*
-		 * Linux thinks that SOL_SOCKET is 1; we know
-		 * that it's really 0xffff, of course.
-		 */
-		level = SOL_SOCKET;
-		error = copyout(&level,
-		    &((struct cmsghdr *)control)->cmsg_level, sizeof(int));
-		if (error)
-			return (error);
-	}
-done:
 	bsd_args.s = linux_args.s;
 	bsd_args.msg = (caddr_t)nmsg;
-	bsd_args.flags = linux_args.flags;
+	bsd_args.flags = linux_to_bsd_msg_flags(linux_args.flags);
 	return (sendmsg(td, &bsd_args));
 }
 
@@ -1073,6 +1069,7 @@
 		int	flags;
 	} */ bsd_args;
 	struct msghdr msg;
+	struct cmsghdr *cmsg;
 	int error;
 
 	if ((error = copyin(args, &linux_args, sizeof(linux_args))))
@@ -1085,6 +1082,11 @@
 	if (error)
 		return (error);
 
+	if (bsd_args.msg->msg_control != NULL) {
+		cmsg = (struct cmsghdr*)bsd_args.msg->msg_control;
+		cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level);
+	}
+
 	error = copyin(linux_args.msg, &msg, sizeof(msg));
 	if (error)
 		return (error);

==== //depot/projects/vm/conf/files#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.828 2003/10/01 15:13:29 ume Exp $
+# $FreeBSD: src/sys/conf/files,v 1.834 2003/10/15 08:53:04 phk Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -201,12 +201,14 @@
 contrib/ipfilter/netinet/ip_proxy.c	optional ipfilter inet
 contrib/ipfilter/netinet/ip_state.c	optional ipfilter inet
 contrib/ipfilter/netinet/mlfk_ipl.c	optional ipfilter inet
+crypto/blowfish/bf_ecb.c	optional ipsec ipsec_esp
 crypto/blowfish/bf_skey.c	optional ipsec ipsec_esp
 crypto/cast128/cast128.c	optional ipsec ipsec_esp
 crypto/des/des_ecb.c	optional ipsec ipsec_esp
 crypto/des/des_setkey.c	optional ipsec ipsec_esp
-crypto/rijndael/rijndael-alg-fst.c	optional ipsec ipsec_esp
-crypto/rijndael/rijndael-api-fst.c	optional ipsec ipsec_esp
+crypto/rijndael/rijndael-alg-fst.c	optional ipsec
+crypto/rijndael/rijndael-api-fst.c	optional ipsec
+opencrypto/rmd160.c		optional ipsec
 crypto/sha1.c		optional ipsec
 crypto/sha2/sha2.c	optional ipsec
 ddb/db_access.c		optional ddb
@@ -947,6 +949,9 @@
 geom/bde/g_bde_crypt.c		optional geom_bde
 geom/bde/g_bde_lock.c		optional geom_bde
 geom/bde/g_bde_work.c		optional geom_bde
+crypto/rijndael/rijndael-alg-fst.c	optional geom_bde
+crypto/rijndael/rijndael-api-fst.c	optional geom_bde
+crypto/sha2/sha2.c		optional geom_bde
 geom/geom_aes.c		optional geom_aes
 geom/geom_apple.c	optional geom_apple
 geom/geom_bsd.c		optional geom_bsd
@@ -972,8 +977,6 @@
 geom/geom_sunlabel.c	optional geom_sunlabel
 geom/geom_sunlabel_enc.c	optional geom_sunlabel
 geom/geom_vol_ffs.c	optional geom_vol
-crypto/rijndael/rijndael-alg-fst.c	optional geom
-crypto/rijndael/rijndael-api-fst.c	optional geom
 gnu/ext2fs/ext2_alloc.c		optional ext2fs \
 	warning "kernel contains GPL contaminated ext2fs filesystem"
 gnu/ext2fs/ext2_balloc.c	optional ext2fs
@@ -1435,10 +1438,12 @@
 netinet/tcp_timer.c	optional inet
 netinet/tcp_usrreq.c	optional inet
 netinet/udp_usrreq.c	optional inet
+netinet6/ah_aesxcbcmac.c	optional ipsec
 netinet6/ah_core.c	optional ipsec
 netinet6/ah_input.c	optional ipsec
 netinet6/ah_output.c	optional ipsec
 netinet6/dest6.c	optional inet6
+netinet6/esp_aesctr.c	optional ipsec ipsec_esp
 netinet6/esp_core.c	optional ipsec ipsec_esp
 netinet6/esp_input.c	optional ipsec ipsec_esp
 netinet6/esp_output.c	optional ipsec ipsec_esp

==== //depot/projects/vm/conf/files.amd64#2 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.23 2003/09/06 23:23:25 marcel Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.24 2003/10/14 05:51:31 alc Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -73,6 +73,7 @@
 amd64/amd64/sys_machdep.c	standard
 amd64/amd64/trap.c		standard
 amd64/amd64/tsc.c		standard
+amd64/amd64/uma_machdep.c	standard
 amd64/amd64/vm_machdep.c	standard
 amd64/amd64/in_cksum.c		optional inet
 

==== //depot/projects/vm/contrib/ia64/libuwx/src/Makefile#2 (text+ko) ====

@@ -8,11 +8,11 @@
 AR = ar
 RANLIB = :
 
+OTHERCFLAGS =
 # OTHERCFLAGS = -DUWX_TRACE_ENABLE	# Enables trace output
 # OTHERCFLAGS = +DD64			# Builds 64-bit library
-OTHERCFLAGS =
 
-CFLAGS = +W944 -O $(OTHERCFLAGS)
+CFLAGS = -O $(OTHERCFLAGS)
 
 OBJS =		uwx_bstream.o uwx_context.o uwx_env.o uwx_scoreboard.o \
 		uwx_step.o uwx_str.o uwx_swap.o uwx_trace.o uwx_uinfo.o \
@@ -36,7 +36,7 @@
 
 uwx_bstream.o:	uwx.h uwx_env.h uwx_bstream.h
 
-uwx_context.o:	uwx.h uwx_env.h uwx_scoreboard.h uwx_trace.h
+uwx_context.o:	uwx.h uwx_env.h uwx_scoreboard.h uwx_step.h uwx_trace.h
 
 uwx_env.o:	uwx.h uwx_env.h uwx_scoreboard.h uwx_str.h uwx_trace.h
 

==== //depot/projects/vm/contrib/ia64/libuwx/src/uwx.h#2 (text+ko) ====

@@ -208,18 +208,26 @@
 #define UWX_REG_CFM		3	/* cfm (no spill info) */
 #define UWX_REG_RP		4	/* rp (pseudo-register) */
 #define UWX_REG_PSP		5	/* psp (pseudo-register) */
-#define UWX_REG_PFS		6	/* ar.pfs */
+#define UWX_REG_PFS		6	/* pfs (pseudo-register) */
 #define UWX_REG_PREDS		7	/* p0 - p63 */
 #define UWX_REG_PRIUNAT		8	/* primary unat (pseudo-register) */
-#define UWX_REG_BSPSTORE	9	/* ar.bspstore */
-#define UWX_REG_RNAT		10	/* ar.rnat */
-#define UWX_REG_UNAT		11	/* ar.unat */
-#define UWX_REG_FPSR		12	/* ar.fpsr */
-#define UWX_REG_LC		13	/* ar.lc */
+#define UWX_REG_AR_PFS		9	/* ar.pfs */
+#define UWX_REG_AR_BSPSTORE	10	/* ar.bspstore */
+#define UWX_REG_AR_RNAT		11	/* ar.rnat */
+#define UWX_REG_AR_UNAT		12	/* ar.unat */
+#define UWX_REG_AR_FPSR		13	/* ar.fpsr */
+#define UWX_REG_AR_LC		14	/* ar.lc */
 #define UWX_REG_GR(gr)		(0x100 | (gr))
 #define UWX_REG_FR(fr)		(0x200 | (fr))
 #define UWX_REG_BR(br)		(0x300 | (br))
 
+/* for backwards compatibility with previous releases... */
+#define UWX_REG_BSPSTORE	UWX_REG_AR_BSPSTORE
+#define UWX_REG_RNAT		UWX_REG_AR_RNAT
+#define UWX_REG_UNAT		UWX_REG_AR_UNAT
+#define UWX_REG_FPSR		UWX_REG_AR_FPSR
+#define UWX_REG_LC		UWX_REG_AR_LC
+
 /* Values corresponding to UWX_KEY_SPILL keys indicate the disposition */
 /* of the spilled register -- either in the memory stack or in another */
 /* register. The PSP register may also have a disposition of "SPPLUS", */

==== //depot/projects/vm/contrib/ia64/libuwx/src/uwx_context.c#2 (text+ko) ====

@@ -23,6 +23,7 @@
 #include "uwx_env.h"
 #include "uwx_context.h"
 #include "uwx_scoreboard.h"
+#include "uwx_step.h"
 #include "uwx_trace.h"
 
 int uwx_init_context(
@@ -46,6 +47,7 @@
     for (i = 0; i < NPRESERVEDGR; i++)
 	env->context.gr[i] = 0;
     env->context.valid_regs = VALID_BASIC4;
+    env->context.valid_frs = 0;
     env->rstate = 0;
     (void)uwx_init_history(env);
     return UWX_OK;
@@ -64,8 +66,17 @@
 
     status = UWX_OK;
 
+    if (regid == UWX_REG_GR(12))
+	regid = UWX_REG_SP;
     if (regid < NSPECIALREG && (env->context.valid_regs & (1 << regid)))
 	*valp = env->context.special[regid];
+    else if (regid == UWX_REG_PSP || regid == UWX_REG_RP ||
+					regid == UWX_REG_PFS) {
+	status = uwx_restore_markers(env);
+	if (status != UWX_OK)
+	    return status;
+	*valp = env->context.special[regid];
+    }
     else if (regid >= UWX_REG_GR(4) && regid <= UWX_REG_GR(7) &&
 		(env->context.valid_regs &
 		    (1 << (regid - UWX_REG_GR(4) + VALID_GR_SHIFT))) )
@@ -94,13 +105,13 @@
 		(env->context.valid_regs &
 		    (1 << (regid - UWX_REG_BR(1) + VALID_BR_SHIFT))) )
 	*valp = env->context.br[regid - UWX_REG_BR(1)];
-    else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_BR(5) &&
-		(env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) {
+    else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_FR(5) &&
+	    (env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) {
 	valp[0] = env->context.fr[regid - UWX_REG_FR(2)].part0;
 	valp[1] = env->context.fr[regid - UWX_REG_FR(2)].part1;
     }
-    else if (regid >= UWX_REG_FR(16) && regid <= UWX_REG_BR(31) &&
-		(env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) {
+    else if (regid >= UWX_REG_FR(16) && regid <= UWX_REG_FR(31) &&
+	    (env->context.valid_frs & (1 << (regid - UWX_REG_FR(16) + 4))) ) {
 	valp[0] = env->context.fr[regid - UWX_REG_FR(16) + 4].part0;
 	valp[1] = env->context.fr[regid - UWX_REG_FR(16) + 4].part1;
     }
@@ -114,7 +125,7 @@
 	if (n != DWORDSZ)
 	    status = UWX_ERR_COPYIN_REG;
     }
-    else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_BR(127)) {
+    else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_FR(127)) {
 	if (env->copyin == 0)
 	    return UWX_ERR_NOCALLBACKS;
 	n = (*env->copyin)(UWX_COPYIN_REG, (char *)valp,
@@ -170,7 +181,7 @@
 	natcollp = bsp | 0x01f8;
 	if (natcollp >= bsp)
 	    n = (*env->copyin)(UWX_COPYIN_REG, (char *)&natcoll,
-			(uint64_t)UWX_REG_RNAT, DWORDSZ, env->cb_token);
+			(uint64_t)UWX_REG_AR_RNAT, DWORDSZ, env->cb_token);
 	else
 	    n = (*env->copyin)(UWX_COPYIN_RSTACK, (char *)&natcoll,
 			bsp, DWORDSZ, env->cb_token);
@@ -197,6 +208,8 @@
 
     status = UWX_OK;
 
+    if (regid == UWX_REG_GR(12))
+	regid = UWX_REG_SP;
     if (regid < NSPECIALREG)
 	*dispp = env->history.special[regid];
     else if (regid >= UWX_REG_GR(4) && regid <= UWX_REG_GR(7))
@@ -233,6 +246,8 @@
     if (env == 0)
 	return UWX_ERR_NOENV;
 
+    if (regid == UWX_REG_GR(12))
+	regid = UWX_REG_SP;
     if (regid < NSPECIALREG) {
 	env->context.special[regid] = val;
 	env->context.valid_regs |= 1 << regid;

==== //depot/projects/vm/contrib/ia64/libuwx/src/uwx_env.h#2 (text+ko) ====

@@ -39,7 +39,7 @@
 
 #define NSCOREBOARDS	8	/* Initial allocation of scoreboards */
 
-#define NSPECIALREG	14
+#define NSPECIALREG	16	/* Must be even, so FRs are aligned */
 #define NPRESERVEDGR	4
 #define NPRESERVEDBR	5
 #define NPRESERVEDFR	20
@@ -61,7 +61,8 @@
 #define VALID_GR_SHIFT	NSPECIALREG
 #define VALID_BR_SHIFT	(NSPECIALREG + NPRESERVEDGR)
 
-#define VALID_BASIC4	0x0f	/* IP, SP, BSP, PFS */
+#define VALID_BASIC4	0x0f	/* IP, SP, BSP, CFM */
+#define VALID_MARKERS	0x70	/* RP, PSP, PFS */
 
 struct uwx_history {
     uint64_t special[NSPECIALREG];

==== //depot/projects/vm/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 (text+ko) ====

@@ -63,8 +63,8 @@
 	sb->rstate[i] = UWX_DISP_NONE;
     sb->rstate[SBREG_RP] = UWX_DISP_REG(UWX_REG_BR(0));
     sb->rstate[SBREG_PSP] = UWX_DISP_SPPLUS(0);
-    sb->rstate[SBREG_PFS] = UWX_DISP_REG(UWX_REG_PFS);
-    sb->rstate[SBREG_PRIUNAT] = UWX_DISP_REG(UWX_REG_UNAT);
+    sb->rstate[SBREG_PFS] = UWX_DISP_REG(UWX_REG_AR_PFS);
+    sb->rstate[SBREG_PRIUNAT] = UWX_DISP_REG(UWX_REG_AR_UNAT);
     sb->label = 0;
     return sb;
 }


>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list