Subject: Re: Q: bootstrapping a "virgin" RaQ 1?
To: Patrick M. Hausen <hausen@punkt.de>
From: None <marius@alchemy.franken.de>
List: port-cobalt
Date: 07/07/2002 15:14:09
--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jul 03, 2002 at 10:00:15AM +0200, Patrick M. Hausen wrote:
> Hi all!
> 
> I started to experiment with NetBSD/Cobalt lately and
> now I'm kind of stuck in the installation process.
> 
> Setting up my FreeBSD machine as a server to netboot
> the RaQ and have it run from NFS root was painless as
> can be - so now I'm running NetBSD 1.5.2. Great ;-)
> 
> The problem is getting the OS on that bloody hard disk.
> 
> 1. boot netbsd.GENERIC.gz -> trigger DMA "bug", system hangs

this is due to cobalt 2700 hardware (raq1/qube1) not being dma coherent

> 
> 2. boot netbsd.GENERIC.noatadma.gz -> system is running fine from
>    NFS root
> 
> 3. fdisk -> panic
> 

this happens on all cobalt mips models under netbsd when ata dma is
disabled for reasons unknown to me; maybe this is fixed on -current,
don't know

you could netboot your raq1 with nbsd 1.5.2 and recompile a kernel with
the attached patch applied (bus.c is located in src/sys/arch/cobalt/cobalt)
_and_ ata dma enabled; afterwards you should be able to fdisk and install
nbsd with that kernel
note that the patch is quite hackish (more like proof of concept), a
proper fix would be to let the kernel detect what cobalt hardware it 
is running on and use coherent dma accordingly


--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bus.c.diff"

--- bus.c.orig	Sun Jul  7 14:46:57 2002
+++ bus.c	Sun Jul  7 14:51:56 2002
@@ -331,6 +331,7 @@
 		map->dm_mapsize = buflen;
 		map->dm_nsegs = seg + 1;
 
+#if 0
 		/*
 		 * For linear buffers, we support marking the mapping
 		 * as COHERENT.
@@ -340,6 +341,7 @@
 		if (buf >= (void *)MIPS_KSEG1_START &&
 		    buf < (void *)MIPS_KSEG2_START)
 			map->_dm_flags |= COBALT_DMAMAP_COHERENT;
+#endif
 	}
 	return error;
 }

--jI8keyz6grp/JLjh--