From owner-freebsd-hackers Tue Mar 12 07:07:56 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA20126 for hackers-outgoing; Tue, 12 Mar 1996 07:07:56 -0800 (PST) Received: from bacall.lodgenet.com ([205.138.147.242]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA20108 for ; Tue, 12 Mar 1996 07:07:51 -0800 (PST) Received: (from mail@localhost) by bacall.lodgenet.com (8.6.12/8.6.12) id JAA04187 for ; Tue, 12 Mar 1996 09:02:58 -0600 Received: from tserv.lodgenet.com(204.124.120.10) by bacall via smap (V1.3) id sma004185; Tue Mar 12 09:02:40 1996 Received: from jake.lodgenet.com (jake.lodgenet.com [204.124.120.30]) by tserv.lodgenet.com (8.6.12/8.6.12) with ESMTP id IAA08757; Tue, 12 Mar 1996 08:29:12 -0600 Received: from localhost (localhost [127.0.0.1]) by jake.lodgenet.com (8.7.4/8.6.12) with SMTP id IAA22255; Tue, 12 Mar 1996 08:40:14 -0600 (CST) Message-Id: <199603121440.IAA22255@jake.lodgenet.com> X-Authentication-Warning: jake.lodgenet.com: Host localhost [127.0.0.1] didn't use HELO protocol X-Mailer: exmh version 1.6.2 7/18/95 To: "Yaser K. Doleh" cc: msmith@atrad.adelaide.edu.au (Michael Smith), freebsd-hackers@freebsd.org Subject: Re: First attempt to write a device driver In-reply-to: Your message of "Mon, 11 Mar 1996 19:54:06 EST." <199603120054.TAA05485@doleh.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Mar 1996 08:40:13 -0600 From: "Eric L. Hernes" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk "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