Subject: Re: macppc 1.5Beta2 Install floppy dmesg & questions
To: Chris <talon16m@hotmail.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 11/07/2000 17:37:05
On Tue, 7 Nov 2000, Chris wrote:

> General notes/questions first:
>     this is a Rev.1 Beige G3/DT/233
>     ofb0 is an ATI XClaimVR 64 which is the system console
>     ofb1 is an ATI Rage II+ (the onboard V.C.), which is not connected
>     
>     Odd: The NetBSD console looks like it is stuck at 640x480 even though
> I'm running at 1024x768. It's almost like I'm working with an X-less xterm
> with no window manager :-) Is there anyway to change this back to the 1.4.x
> behavior of using the entire screen, or is this the way it's supposed to be
> unless set/compiled(!) to use 132xXX mode?

The same hardware worked different?

>     PLEASE fix the keyboard mapping wherever the problem is. Hitting the
> delete key (the one that should be labeled backspace) yields a ^? and I have
> to hit Control-H to backspace. The small square "actual" delete key doesn't
> seem to do anything, though since the arrow key mappings don't work either,
> it's hard to tell.

This setup only happens under X. I'm not sure why, and it annoys me.
Here's the script I use to fix things:

#! /bin/sh
xmodmap -e "keycode 59 = BackSpace"

>     The wdcX and wdX/cd0 lines in the dmesg mention that the controller
> supports DMA data transfer and the drives support DMA transfer, but no where
> does it say if it's actually using it. Can we add a line to the attachment
> routines saying what mode(s) we are using (similar to i386)?

Yep. See patch below.

>     Halting from a shell in the install drops me back into OFW correctly,
> but attempting to boot MacOS freezes the computer FWIW. Yes I know I should
> just restart, but anyway :)

You need to reset the machine. We don't preserve enough of OF's state for
it to be able to pick things back up.

Take care,

Bill

Index: dev/ic/wdc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/wdc.c,v
retrieving revision 1.92
diff -u -r1.92 wdc.c
--- dev/ic/wdc.c	2000/06/28 17:13:06	1.92
+++ dev/ic/wdc.c	2000/11/08 01:23:08
@@ -1590,3 +1590,27 @@
 		(void) (*adapter->_generic.scsipi_enable)(wdc, 0);
 	splx(s);
 }
+
+void
+wdc_print_modes(struct channel_softc *chp)
+{
+	int drive;
+	struct ata_drive_datas *drvp;
+
+	for (drive = 0; drive < 2; drive++) {
+		drvp = &chp->ch_drive[drive];
+		if ((drvp->drive_flags & DRIVE) == 0)
+			continue;
+		printf("%s(%s:%d:%d): using PIO mode %d",
+			drvp->drv_softc->dv_xname,
+			chp->wdc->sc_dev.dv_xname,
+			chp->channel, drive, drvp->PIO_mode);
+		if (drvp->drive_flags & DRIVE_DMA)
+			printf(", DMA mode %d", drvp->DMA_mode);
+		if (drvp->drive_flags & DRIVE_UDMA)
+			printf(", Ultra-DMA mode %d", drvp->UDMA_mode);
+		if (drvp->drive_flags & (DRIVE_DMA | DRIVE_UDMA))
+			printf(" (using DMA data transfers)");
+		printf("\n");
+	}
+}
Index: dev/ic/wdcvar.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/wdcvar.h,v
retrieving revision 1.25
diff -u -r1.25 wdcvar.h
--- dev/ic/wdcvar.h	2000/06/12 21:10:41	1.25
+++ dev/ic/wdcvar.h	2000/11/08 01:23:08
@@ -194,6 +194,8 @@
 void	wdc_delref __P((struct channel_softc *));
 void	wdc_kill_pending __P((struct channel_softc *));
 
+void	wdc_print_modes (struct channel_softc *);
+
 /*	
  * ST506 spec says that if READY or SEEKCMPLT go off, then the read or write
  * command is aborted.
Index: dev/pci/pciide.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide.c,v
retrieving revision 1.88
diff -u -r1.88 pciide.c
--- dev/pci/pciide.c	2000/10/04 09:34:09	1.88
+++ dev/pci/pciide.c	2000/11/08 01:23:11
@@ -1141,28 +1141,7 @@
 pciide_print_modes(cp)
 	struct pciide_channel *cp;
 {
-	struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
-	int drive;
-	struct channel_softc *chp;
-	struct ata_drive_datas *drvp;
-
-	chp = &cp->wdc_channel;
-	for (drive = 0; drive < 2; drive++) {
-		drvp = &chp->ch_drive[drive];
-		if ((drvp->drive_flags & DRIVE) == 0)
-			continue;
-		printf("%s(%s:%d:%d): using PIO mode %d",
-		    drvp->drv_softc->dv_xname,
-		    sc->sc_wdcdev.sc_dev.dv_xname,
-		    chp->channel, drive, drvp->PIO_mode);
-		if (drvp->drive_flags & DRIVE_DMA)
-			printf(", DMA mode %d", drvp->DMA_mode);
-		if (drvp->drive_flags & DRIVE_UDMA)
-			printf(", Ultra-DMA mode %d", drvp->UDMA_mode);
-		if (drvp->drive_flags & (DRIVE_DMA | DRIVE_UDMA))
-			printf(" (using DMA data transfers)");
-		printf("\n");
-	}
+	wdc_print_modes(&cp->wdc_channel);
 }
 
 void
Index: arch/macppc/dev/wdc_obio.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/wdc_obio.c,v
retrieving revision 1.10
diff -u -r1.10 wdc_obio.c
--- arch/macppc/dev/wdc_obio.c	2000/06/29 08:10:45	1.10
+++ arch/macppc/dev/wdc_obio.c	2000/11/08 01:23:13
@@ -204,6 +204,8 @@
 	/* modify DMA access timings */
 	if (use_dma)
 		adjust_timing(chp);
+
+	wdc_print_modes(chp);
 }
 
 /* Multiword DMA transfer timings */