Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2001 13:01:46 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: HEADS UP: loader broken
Message-ID:  <15121.13050.442921.467470@grasshopper.cs.duke.edu>
In-Reply-To: <XFMail.010525163719.jhb@FreeBSD.org>
References:  <XFMail.010525163719.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

I'd suggest anybody in a position to debug this apply the following
patch to main.c that I got from DFR a few months back.  It sets up
a trap handler which halts the machine.  You'll need to grab
the SP from the SRM console & manually grovel through it for  PS, PC,
GP, A0, A1, A2.

Eg: 

>>>e sp
gpr:               1E (   R30) 0000000020045D30

You'd then do:

>>> e -n 6 20045d30

to get PS, PC, GP, A0, A1, A2

Drew

Index: alpha/common/main.c
===================================================================
RCS file: /home/ncvs/src/sys/boot/alpha/common/main.c,v
retrieving revision 1.13
diff -u -r1.13 main.c
--- alpha/common/main.c	2000/10/25 23:36:01	1.13
+++ alpha/common/main.c	2000/10/26 23:13:07
@@ -108,6 +108,24 @@
     }
 }
 
+static void
+entMM(u_int64_t a0, u_int64_t a1, u_int64_t a2)
+{
+    alpha_pal_halt();
+}
+
+static void
+setup_kgp()
+{
+    register u_int64_t gp __asm__("$29");
+    register u_int64_t a0 __asm__("$16") = gp;
+    __asm__ __volatile__ (
+	"call_pal 0x37 #PAL_OSF1_wrkgp"
+	: "=r" (a0)
+	: "0" (a0)
+	: "$1", "$22", "$23", "$24", "$25");
+}
+
 int
 main(void)
 {
@@ -140,6 +158,10 @@
 
     /* switch to OSF pal code. */
     OSFpal();
+
+    setup_kgp();
+    alpha_pal_wrent(entMM, ALPHA_KENTRY_MM);
+
 
     /*
      * Initialise the block cache

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15121.13050.442921.467470>