Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/ia64/ia64 Add IA64_VEC_SPECULATION into trap(). Fro...



details:   https://anonhg.NetBSD.org/src/rev/cdecb06f8c4b
branches:  trunk
changeset: 783736:cdecb06f8c4b
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sun Jan 06 11:25:13 2013 +0000

description:
Add IA64_VEC_SPECULATION into trap(). From FreeBSD.

diffstat:

 sys/arch/ia64/ia64/trap.c |  24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r 562c9cf5ec01 -r cdecb06f8c4b sys/arch/ia64/ia64/trap.c
--- a/sys/arch/ia64/ia64/trap.c Sun Jan 06 07:04:48 2013 +0000
+++ b/sys/arch/ia64/ia64/trap.c Sun Jan 06 11:25:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.10 2012/02/19 21:06:12 rmind Exp $ */
+/* $NetBSD: trap.c,v 1.11 2013/01/06 11:25:13 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2005 Marcel Moolenaar
@@ -61,7 +61,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.10 2012/02/19 21:06:12 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.11 2013/01/06 11:25:13 kiyohara Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -549,6 +549,21 @@
 
 /* XXX: Fill in the rest */
 
+       case IA64_VEC_SPECULATION:
+               /*
+                * The branching behaviour of the chk instruction is not
+                * implemented by the processor. All we need to do is
+                * compute the target address of the branch and make sure
+                * that control is transfered to that address.
+                * We should do this in the IVT table and not by entring
+                * the kernel...
+                */
+               tf->tf_special.iip += tf->tf_special.ifa << 4;
+               tf->tf_special.psr &= ~IA64_PSR_RI;
+               goto out;
+
+/* XXX: Fill in the rest */
+
        case IA64_VEC_DEBUG:
        case IA64_VEC_SINGLE_STEP_TRAP:
                tf->tf_special.psr &= ~IA64_PSR_SS;
@@ -575,14 +590,9 @@
        ksi.ksi_code = ucode;
        trapsignal(l, &ksi);
 
-#if 1
 out:
-#endif
-
        if (user) {
                mi_userret(l);
        }
-
-
        return;
 }



Home | Main Index | Thread Index | Old Index