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

Re: Bootloading Problems on E250



On Tue, Jan 24, 2006 at 11:44:21AM -0500, Jesse Kempf wrote:
> I have a Sun E250 that was decommissioned over the summer (it had  
> been running Solaris 9) that I want to put back into service running  
> FreeBSD 6. I've had no end of problems yet.
> Firstly, I'd tried booting from a 6-RELEASE CD. That doesn't work.  
> The next approach I took was to use an old Ultra60 to build the  
> latest STABLE code onto a hard drive which I can pop into my E250.  
> Here's what happens when I stick the drive into the E250 and try to  
> boot from it:
> 
> RSC Alert: Host System has Reset
> 
> 
> Sun (TM) Enterprise 250 (2 X UltraSPARC-II 400MHz), No Keyboard
> OpenBoot 3.28, 1024 MB memory installed, Serial #12853310.
> Ethernet address 8:0:20:c4:20:3e, Host ID: 80c4203e.
> 
> 
> 
> Rebooting with command: boot /pci_(_at_)_1f,4000/scsi_(_at_)_3/disk_(_at_)_0,0:a
> Boot device: /pci_(_at_)_1f,4000/scsi_(_at_)_3/disk_(_at_)_0,0:a  File and args:
>  >> FreeBSD/sparc64 boot block
>     Boot path:   /pci_(_at_)_1f,4000/scsi_(_at_)_3/disk_(_at_)_0,0:a
>     Boot loader: /boot/loader
> Consoles: Open Firmware console
> 
> FreeBSD/sparc64 bootstrap loader, Revision 1.0
> (root@, Tue Jan 24 05:53:27 EST 2006)
> bootpath="/pci_(_at_)_1f,4000/scsi_(_at_)_3/disk_(_at_)_0,0:a"
> Loading /boot/defaults/loader.conf
> /boot/kernel/kernel data=0x46d208+0x5bbe8 syms=[0x8+0x626e8+0x8+0x52af4]
> 
> Hit [Enter] to boot immediately, or any other key for command prompt.
> Booting [/boot/kernel/kernel]...
> nothing to autoload yet.
> jumping to kernel entry at 0xc0048000.
> 
> RSC Alert: Host System has Reset
> 
> Clearly the E250 is not as "fully supported" as the hardware docs  
> indicate.

Depends on the definition of "fully supported", I'm not happy with
it either...

> Where do I begin trying to fix this problem?

So far FreeBSD doesn't support using RSCs as console (which you
apparently try to do). AFAICT Sun basically uses two RSC variants,
the one only found in E250 and the other one found in E280R,
Netra T4, etc. The attached patch adds support for these. It should
work just fine with the E250 RSC if you additionally enable ttyu2
in /etc/ttys. I'd expect it to also work with the other variant
but I didn't have time to actually give it a try so far. In
order to apply the patch to FreeBSD 6 you'll probably need to
grab uart_cpu_sparc64.c from HEAD first (just differs in USIII
support) or resolve the possible conflict manually. In order to
configure the RSC from an OS you'll need to revert to using
rscadm(1M) under Solaris though.

Marius


-- 
This mail was scanned by AntiVir Milter.
This product is licensed for non-commercial use.
See www.antivir.de for details.
Index: uart_cpu_sparc64.c
===================================================================
RCS file: /mnt/futile/usr/data/bsd/cvs/fbsd/src/sys/dev/uart/uart_cpu_sparc64.c,v
retrieving revision 1.21
diff -u -r1.21 uart_cpu_sparc64.c
--- uart_cpu_sparc64.c	15 Aug 2005 20:58:36 -0000	1.21
+++ uart_cpu_sparc64.c	21 Jan 2006 01:47:53 -0000
@@ -45,12 +46,18 @@
 static struct bus_space_tag bst_store[3];
 
 /*
- * Determine which channel of a SCC a device referenced by an alias is.
- * The information present in the OF device tree only allows to do this
- * for "ttyX" aliases. If a device is a channel of a SCC its property
- * in the /aliases node looks like one of these:
+ * Determine which channel of a SCC a device referenced by a full device
+ * path or as an alias is (in the latter case we try to look up the device
+ * path via the /aliases node).
+ * Only the device paths of devices which are used for TTYs really allow
+ * to this as they look like these (taken from /aliases nodes):
  * ttya:  '/central/fhc/zs_(_at_)_0,902000:a'
  * ttyc:  '/pci_(_at_)_1f,0/pci_(_at_)_1,1/ebus_(_at_)_1/se_(_at_)_14,400000:a'
+ * Additionally, for device paths of SCCs which are connected to a RSC
+ * (Remote System Control) device we can hardcode the appropriate channel.
+ * Such device paths look like these:
+ * rsc:   '/pci_(_at_)_1f,4000/ebus_(_at_)_1/se_(_at_)_14,200000:ssp'
+ * ttyc:  '/pci_(_at_)_1f,4000/ebus_(_at_)_1/se_(_at_)_14,200000:ssp'
  */
 static int
 uart_cpu_channel(char *dev)
@@ -58,15 +65,20 @@
 	char alias[64];
 	phandle_t aliases;
 	int len;
+	const char *p;
 
 	strcpy(alias, dev);
 	if ((aliases = OF_finddevice("/aliases")) != -1)
-		OF_getprop(aliases, dev, alias, sizeof(alias));
+		(void)OF_getprop(aliases, dev, alias, sizeof(alias));
 	len = strlen(alias);
-	if (len < 2 || alias[len - 2] != ':' || alias[len - 1] < 'a' ||
-	    alias[len - 1] > 'b')
+	if ((p = rindex(alias, ':')) == NULL)
 		return (0);
-	return (alias[len - 1] - 'a' + 1);
+	p++;
+	if (p - alias == len - 1 && (*p == 'a' || *p == 'b'))
+		return (*p - 'a' + 1);
+	if (strcmp(p, "ssp") == 0)
+		return (1);
+	return (0);
 }
 
 int
@@ -185,6 +197,7 @@
 	phandle_t input, options;
 	bus_addr_t addr;
 	int baud, bits, error, space, stop;
+	const char *rsc;
 	char flag, par;
 
 	if ((options = OF_finddevice("/options")) == -1)
@@ -214,6 +227,9 @@
 		return (ENXIO);
 	if (OF_getprop(input, "compatible", compat, sizeof(compat)) == -1)
 		compat[0] = '\0';
+ 	rsc = NULL;
+	if (!strcmp(compat, "rsc-console"))
+		rsc = compat + sizeof("rsc-console");
 	di->bas.regshft = 0;
 	di->bas.rclk = 0;
 	if (!strcmp(buf, "se") || !strcmp(compat, "sab82532")) {
@@ -238,7 +254,8 @@
 		di->bas.regshft = 1;
 		addr += 4 - 4 * (di->bas.chan - 1);
 	} else if (!strcmp(buf, "su") || !strcmp(buf, "su_pnp") ||
-	    !strcmp(compat, "su") || !strcmp(compat, "su16550")) {
+	    !strcmp(compat, "su") || !strcmp(compat, "su16550") ||
+	    !strcmp(rsc, "su16550")) {
 		di->ops = uart_ns8250_ops;
 		di->bas.chan = 0;
 	} else
@@ -251,13 +268,16 @@
 	/* Get the line settings. */
 	if (devtype == UART_DEV_KEYBOARD)
 		di->baudrate = 1200;
+	else if (rsc)
+		di->baudrate = 115200;
 	else
 		di->baudrate = 9600;
 	di->databits = 8;
 	di->stopbits = 1;
 	di->parity = UART_PARITY_NONE;
 	snprintf(buf, sizeof(buf), "%s-mode", dev);
-	if (OF_getprop(options, buf, buf, sizeof(buf)) == -1)
+	if (OF_getprop(options, buf, buf, sizeof(buf)) == -1 &&
+	    OF_getprop(input, "ssp-console-modes", buf, sizeof(buf)) == -1)
 		return (0);
 	if (sscanf(buf, "%d,%d,%c,%d,%c", &baud, &bits, &par, &stop, &flag)
 	    != 5)

_______________________________________________
freebsd-sparc64_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
To unsubscribe, send any mail to "freebsd-sparc64-unsubscribe_(_at_)_freebsd_(_dot_)_org"

Visit your host, monkey.org