Subject: Re: ISA/IDE on Image
To: None <pnuli@mediaone.net>
From: Noriyuki Soda <soda@sra.co.jp>
List: port-arc
Date: 08/09/2000 06:27:38
Prasad V Nuli <pnuli@mediaone.net> wrote:
> 	I am using the NEC IMAGE RISC Station with 1.4U build of the software.
> I am trying to enable the ISA IDE interface support in the kernel. At present
> it is not enabled in the generic kernel and it does not see the IDE Drives.
> 	What switches do I have to enable in the config file to include
> the ISA/IDE drive support ?

First of all, you have to use NetBSD-1.5_ALPHA (NetBSD-current via ftp/sup)
or NetBSD-1.5D (main trunk via anoncvs) for ISA IDE support on jazz based
machines like NEC Image RISCstation. Because NetBSD-1.4U/arc doesn't 
support ISA IDE on those machines.

Also, please apply the following patch. I believe this patch resolve
a problem that commands dump core on -current.
------------------------------------------------------------------------
Index: sys/arch/arc/arc/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arc/arc/machdep.c,v
retrieving revision 1.39
diff -u -r1.39 machdep.c
--- machdep.c	2000/06/17 07:29:06	1.39
+++ machdep.c	2000/08/08 21:04:47
@@ -748,6 +748,19 @@
 		mips_L2CachePresent = 1;
 		mips_L2CacheSize = 128 * 1024;
 #endif
+		/*
+		 * if page zero in the idle loop is enabled,
+		 * commands dump core due to incoherent cache.
+		 */
+		vm_page_zero_enable = FALSE; /* XXX - should be enabled */
+		break;
+	case DESKSTATION_RPC44:
+	case DESKSTATION_TYNE:
+	case SNI_RM200:
+	case ALGOR_P4032:
+	case ALGOR_P5064:
+		/* XXX - use safe default, since those are not tested. */
+		vm_page_zero_enable = FALSE; /* XXX - should be enabled */
 		break;
 	case NEC_R94:
 		mips_L2CacheSize = 512 * 1024;
------------------------------------------------------------------------

I've committed this patch on main trunk, and will commit on netbsd-1-5
branch, too.

The necessary config options for ISA IDE are follows:
------------------------------------------------------------------------
# ISA ST506, ESDI, and IDE controllers
# Use flags 0x01 if you want to try to use 32bits data I/O (the driver will
# fall back to 16bits I/O if 32bits I/O are not functional).
# Some controllers pass the initial 32bit test, but will fail later.
# XXX - should be configured
wdc0		at isa? port 0x1f0 irq 14 flags 0x00
wdc1		at isa? port 0x170 irq 15 flags 0x00

# IDE drives
# Flags are used only with controllers that support DMA operations
# and mode settings (e.g. some pciide controllers)
# The lowest order four bits (rightmost digit) of the flags define the PIO
# mode to use, the next set of four bits the DMA mode and the third set the
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
# to use, and the last bit must be 1 for this setting to be used.
# For DMA and UDMA, 0xf (1111) means 'disable'.
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
# (0xc=1100, 0xa=1010, 0xf=1111)
# 0x0000 means "use whatever the drive claims to support".
# XXX - should be configured
wd*		at wdc? channel ? drive ? flags 0x0000

# ATAPI bus support
atapibus*	at wdc? channel ?

#### ATAPI bus devices

# flags have the same meaning as for IDE drives.
cd*		at atapibus? drive ? flags 0x0000	# ATAPI CD-ROM drives
sd*		at atapibus? drive ? flags 0x0000	# ATAPI disk drives
uk*		at atapibus? drive ? flags 0x0000	# ATAPI unknown
------------------------------------------------------------------------
--
soda