Subject: ofb console problem and some questions
To: None <port-macppc@netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: port-macppc
Date: 12/05/2006 21:26:18
Hi,

I recently upgraded my beige G3 (open firmware 2.4) to -current.

The console doesn't work anymore, it only displays half a line (the
upper parts of the characters) at the bottom of the display.

The following change fixes this and the console works as before:

-------------------
RCS file:
/net/swamp/zeug/netbsd-rsync/main/src/sys/arch/macppc/dev/ofb_cons.c,v
retrieving revision 1.1
diff -u -p -r1.1 ofb_cons.c
--- ofb_cons.c  8 Nov 2006 01:25:10 -0000       1.1
+++ ofb_cons.c  5 Dec 2006 18:33:55 -0000
@@ -101,6 +101,7 @@ ofb_cnattach()
 
        /* get current cursor position */
        OF_interpret("line#", 1, &crow);
+       if (crow) crow--;
 
        /* move (rom monitor) cursor to the lowest line - 1 */
        OF_interpret("#lines 2 - to line#", 0);
-------------------

I did this change from some guts feeling that crow might not return
the current position as written in the comment, but the total number
of lines. (Which thinking about it now doesn't really make sense,
given the different character heights of the ofb console and the
NetBSD console fonts.)

Now the questions:

- can I somehow run this "line#" command from the ofb console to see
  what it returns?

- can I read the variables of a running kernel? I wrote the crow
  value into a global kernel variable to get its value. Then I tried
  to crash the kernel to get a kernel dump. This didn't work (no
  kernel dump), probably because my swap space is a bit smaller than
  the machine's memory. How would I read the variables of a live
  kernel, given that I have a netbsd.gdb file with all the symbols?

regards,
chris