From owner-freebsd-new-bus Sat Jul 22 8:51:14 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from mout2.silyn-tek.de (mout2.silyn-tek.de [194.25.165.70]) by hub.freebsd.org (Postfix) with ESMTP id E46DF37C24E for ; Sat, 22 Jul 2000 08:51:06 -0700 (PDT) (envelope-from alex@big.endian.de) Received: from [192.168.32.34] (helo=mx2.silyn-tek.de) by mout2.silyn-tek.de with esmtp (Exim 3.13 #1) id 13G1YP-0007YJ-00 for new-bus@freebsd.org; Sat, 22 Jul 2000 17:51:05 +0200 Received: from p3e9c1151.dip0.t-ipconnect.de ([62.156.17.81] helo=neutron.cichlids.com) by mx2.silyn-tek.de with esmtp (Exim 3.13 #1) id 13G1YL-0001KV-00 for new-bus@freebsd.org; Sat, 22 Jul 2000 17:51:02 +0200 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by neutron.cichlids.com (Postfix) with ESMTP id 34994AB91 for ; Sat, 22 Jul 2000 17:52:53 +0200 (CEST) Received: by cichlids.cichlids.com (Postfix, from userid 1001) id 1062414BAE; Sat, 22 Jul 2000 17:51:13 +0200 (CEST) Date: Sat, 22 Jul 2000 17:51:12 +0200 To: new-bus@freebsd.org Subject: newbus replacement for kvtop() Message-ID: <20000722175112.A16931@cichlids.cichlids.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. From: alex@big.endian.de (Alexander Langer) Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! Today I ported the dev/ed driver to bus_space_(read|write) instead of outb/inb/outw/inw. My PCI card already works. However, I'm having problems with kvtop(), which is used by the sub-driver for the SMC cards. This one uses soemthing like: if (isa16bit) { if (sc->is790) { sc->wd_laar_proto = ed_readb(sc, sc->asic_addr + ED_WD_LAAR); } else { sc->wd_laar_proto = ED_WD_LAAR_L16EN | ((kvtop(sc->mem_start) >> 19) & ED_WD_LAAR_ADDRHI); } /* * Enable 16bit access */ ed_writeb(sc, sc->asic_addr + ED_WD_LAAR, sc->wd_laar_proto | ED_WD_LAAR_M16EN); sc->mem_start is set to the virtual address of the memory: if_ed.c: sc->mem_start = (caddr_t) rman_get_virtual(sc->mem_res); However, I tried to find a replacement myself, but couldn't find anything that could replace the call to kvtop() here. On the other hand, I could imagine that rman_get_start w/o the usage of kvtop() could be enough here. Could anyone point me to the right direction please? Thanks Alex -- cat: /home/alex/.sig: No such file or directory To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message