Subject: Re: NetBSD/pc98
To: None <>
From: KIYOHARA Takashi <>
List: tech-kern
Date: 08/23/2006 01:13:16
Hi! Tsutsui-san,

From: Izumi Tsutsui <>
Date: Tue, 22 Aug 2006 23:47:40 +0900

> > IMHO can't support on ne(4) currently, because some boards do the map
> > distorted. It is necessary the handlers as each registers.  (like wdc(4))
> Are these variants really NE2000 compatible? Or just using dp8390?
> If they are not real NE2000, we should have different attachment
> like sys/arch/mac68k/nubus/if_ae_nubus.c, so that you can handle
> weird mappings by sc_reg_map[] in struct dp8390_softc.

The position of each register is the same.  Perhaps, the address pin of
the board has been changed.  And, FreeBSD guys is calling the function
isa_alloc_resourcev() for this. This is a function that exists for PC98. 

(see ed98_alloc_port().)

For instance, LA98 is mapped in base-address + 0x?000. 

  /* LA/T-98, LD-BDN, PC-9801-77, SB-9801 */
  static	    bus_addr_t ed98_ioaddr_la98[] = {
	    0x0000, 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x6000, 0x7000,
	    0x8000, 0x9000, 0xa000, 0xb000, 0xc000, 0xd000, 0xe000, 0xf000,
	    0x0100  /* for NEC 77(see below) */

> Anyway, I'm afraid using flags in MD attachments might cause conflicts
> against MI ne(4) driver.

hmm... ;-<

> > > - isn't it better to attach legacy devices (dcom, pic, wdc etc.)
> > >   at cbus (which is a dumb bus anyway) rather than mainbus?
> > >   I have a handmade two port dcom cbus board..
> > 
> > dcom_mainbus use the system-port.  However dcom at cbus not use system-
> > port (PORT C). In addition, the mainbus of PC-98x1 does mapped a device
> > different in the address of the even number and the odd number.  However,
> > the map of cbus device is done perhaps linear. (not support yet. ;-)
> Ah, I just remember the system-port of pc98.
> I admit it's okay to have different attachment from cbus for such
> devices, but how about having some pseudo bus like intio rather than
> using mainbus directly?

I use attribute 'pc98peripheral' and 'pc98clitical'.  Should I prepare
the bus besides this?