Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Dec 2002 10:47:13 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 22215 for review
Message-ID:  <200212121847.gBCIlDhI059409@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=22215

Change 22215 by marcel@marcel_nfs on 2002/12/12 10:47:10

	Fill in rclk and baud in the sio_consdata structure. We have
	this readily available in the HCDP table. Note that our rclk
	is 16*pclock. The HCDP documentation states that the pseudo
	clock is 115200 by default.
	While here, fix braino: You cannot expect to reconstruct a
	single 64-bit out of 2 32-bit parts by shifting the MSB part
	8 bits to the left. Duh...

Affected files ...

.. //depot/projects/ia64/sys/ia64/ia64/sio_machdep.c#2 edit

Differences ...

==== //depot/projects/ia64/sys/ia64/ia64/sio_machdep.c#2 (text+ko) ====

@@ -50,16 +50,21 @@
 int sio_get_console(struct sio_consdata *cd)
 {
 	struct dig64_hcdp_table *tbl;
-	u_int64_t addr;
 
 	tbl = (struct dig64_hcdp_table*)sio_map(bootinfo.bi_hcdp, 7);
 	if (tbl == NULL)
 		return (ENXIO);
 
-	addr = tbl->entry->address.addr_high;
-	addr = (addr << 8) + tbl->entry->address.addr_low;
-	cd->addr = addr;
+	cd->addr = tbl->entry->address.addr_high;
+	cd->addr = (cd->addr << 32) + tbl->entry->address.addr_low;
+	if (tbl->entry->address.addr_space == 0)
+		(void)sio_map(cd->addr, 6);
 	cd->type = (tbl->entry->address.addr_space == 0)
 	    ? IA64_BUS_SPACE_MEM : IA64_BUS_SPACE_IO;
+	cd->rclk = (tbl->entry->pclock) ? tbl->entry->pclock : 115200L;
+	cd->rclk <<= 4;				/* rclk = 16 * pclock */
+	cd->baud = tbl->entry->baud_high;
+	cd->baud = (cd->baud << 32) + tbl->entry->baud_low;
+
 	return (0);
 }

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




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