From owner-freebsd-hackers Wed Sep 10 10:25:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA14690 for hackers-outgoing; Wed, 10 Sep 1997 10:25:30 -0700 (PDT) Received: from word.smith.net.au (ppp20.portal.net.au [202.12.71.120]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA14684 for ; Wed, 10 Sep 1997 10:25:22 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id CAA04895; Thu, 11 Sep 1997 02:53:17 +1000 (EST) Message-Id: <199709101653.CAA04895@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: BRUN Philippe cc: FREEBSD Subject: Re: Arinc device driver kvtop problem In-reply-to: Your message of "Wed, 10 Sep 1997 18:01:00 PDT." <34174307@brteec1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Sep 1997 02:53:13 +1000 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I would like read and write using the arinc card mapped at 0xF00000 > I wrote the driver > This address can't change. > > my config : > device arinc at isa ? port 0x300 irq 5 iomem 0xf00000 iosiz 65536 vector > accintr > > In config_isadev_c when the kernel calls kvtop(isdp->id_maddr) > id_maddr = 0xf0f00000 writes panic ..... > how can i access this iomem addres in my driver This is outside the "ISA hole", and means that you can't use the iomem approach. You will have trouble with the card on systems that have 16M or more of memory and don't support the hole-at-15M option. Until recently, FreeBSD didn't support main memory being fragmented (if I remeber correctly). If you are running -current, all that remains is to arrange (when your driver starts) for the nominated address range to be reserved for your driver. You can probably arrange this using contigmalloc, eg. : contigmalloc(0x10000, M_DEVBUF, M_NOWAIT, 0xf00000, 0xf10000, 0, 0) (see sys/vm/vm_page.c) There may be better ways to do this. Yipe. I've just realised that you must be writing a driver for an ATR card. That's Really Scary. 8) mike