Date: Tue, 12 Mar 1996 08:40:13 -0600 From: "Eric L. Hernes" <erich@lodgenet.com> To: "Yaser K. Doleh" <yaser@doleh.com> Cc: msmith@atrad.adelaide.edu.au (Michael Smith), freebsd-hackers@freebsd.org Subject: Re: First attempt to write a device driver Message-ID: <199603121440.IAA22255@jake.lodgenet.com> In-Reply-To: Your message of "Mon, 11 Mar 1996 19:54:06 EST." <199603120054.TAA05485@doleh.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"Yaser K. Doleh" writes: > >I have one more questions which I could not figure out by looking at the >source. > >The card have 64K shared memory which can be mapped into the machine >address space. I can map 16K, 32K or the whole 64K into the address >space. My question is how can I find an empty slot in the area 640 - 1MB >that I can map this memory into. The driver must choose the location >and set a register in the Token Ring card to tell it >where to map the memory. > just pick one that doesn't conflict with your other devices. Some of the old digiboard PC/8e's use a 64k shared memory segment, which must be aligned on a 64k boundary. legal values for this card are 0x[abcde]0000, however 0x[abc]0000 all or partially conflict with most video cards, which leaves 0x[de]0000. >My second question is "Do I use pmap_mapdev function ?" > dunno, for the digi, you do and `outb' to turn on the segment and set pointers into the area. One thing that you should be aware of is that in your probe/attach functions is the id->id_maddr given to you is a kernel virtual address, not a physical address; you can get the physical, given a virtual via ``physaddr=kvtop(id->id_maddr)'' > >Michael Smith said in a letter >> >> Make sure the above is in your config, make sure you have interrupts >> enabled on the card. >> > >It must be the card not sending any interrupts. I guess I have to RTFM >that IBM manual again. > I've got a card with led's that light up when the various interrupts and drq lines are triggered. It's excellent for making sure the card is really generating the interrupts; or else you're really `flying blind' > >Thanks, I'll check it out. > >Very truly yours >Yaser Doleh >Yaser@Doleh.Com > eric. -- erich@lodgenet.com erich@rrnet.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603121440.IAA22255>