WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [xenppc-unstable] [ppc] Add an IRQ Keyhandler to trap to the HW

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [ppc] Add an IRQ Keyhandler to trap to the HW probe.
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Jul 2006 10:50:40 +0000
Delivery-date: Thu, 06 Jul 2006 03:58:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID be9fe905334a4b9bcc6238d0490630449077e2c5
# Parent  4f8c0d9515591fe945ec288d4322792d58d24f86
[ppc] Add an IRQ Keyhandler to trap to the HW probe.

When using a HW probe, such as RiscWatch, randomly attaching to the
running system can land you in any number of address spaces, such as
user, kernel, Hypervisor.  The debugger can then do nasty things to
what ever mode happens to be running.

This patch registers the '^' character for the purpose of contacting
the HW probe while in the Hypervisor.  Once the machine has stopped
and you attach with your debugger you will be in hw_probe_attn() and
you can either add 4 to your PC or in GDB use the "return" command to
immediately exit this function.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/ppc/setup.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -r 4f8c0d951559 -r be9fe905334a xen/arch/ppc/setup.c
--- a/xen/arch/ppc/setup.c      Wed Jul 05 09:13:42 2006 -0400
+++ b/xen/arch/ppc/setup.c      Thu Jul 06 06:39:09 2006 -0400
@@ -32,6 +32,7 @@
 #include <xen/domain.h>
 #include <xen/gdbstub.h>
 #include <xen/symbols.h>
+#include <xen/keyhandler.h>
 #include <public/version.h>
 #include <asm/processor.h>
 #include <asm/desc.h>
@@ -107,6 +108,14 @@ static void __init do_initcalls(void)
     }
 }
 
+static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+{
+    /* To continue the probe will step over the ATTN instruction.  The
+     * NOP is there to make sure there is something sane to "step
+     * over" to. */
+    asm volatile(".long 0x00000200; nop");
+}
+
 static void __init start_of_day(void)
 {
     struct domain *idle_domain;
@@ -125,6 +134,11 @@ static void __init start_of_day(void)
     cpu_set(0, cpu_sibling_map[0]);
 
     initialize_keytable();
+    /* Register another key that will allow for the the Harware Probe
+     * to be contacted, this works with RiscWatch probes and should
+     * work with Chronos and FSPs */
+    register_irq_keyhandler('^', hw_probe_attn,   "Trap to Hardware Probe");
+
     timer_init();
     serial_init_postirq();
     do_initcalls();

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [ppc] Add an IRQ Keyhandler to trap to the HW probe., Xen patchbot-xenppc-unstable <=