Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 1997 02:53:13 +1000
From:      Mike Smith <mike@smith.net.au>
To:        BRUN Philippe <philippe.brun@eurocontrol.fr>
Cc:        FREEBSD <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: Arinc device driver kvtop problem 
Message-ID:  <199709101653.CAA04895@word.smith.net.au>
In-Reply-To: Your message of "Wed, 10 Sep 1997 18:01:00 PDT." <34174307@brteec1> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709101653.CAA04895>