From owner-freebsd-hackers Thu Sep 5 13:59:59 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A851437B401 for ; Thu, 5 Sep 2002 13:59:45 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CE0943E3B for ; Thu, 5 Sep 2002 13:59:44 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g85KxgGq010740; Thu, 5 Sep 2002 14:59:42 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 05 Sep 2002 14:59:36 -0600 (MDT) Message-Id: <20020905.145936.39157187.imp@bsdimp.com> To: bms@spc.org Cc: freebsd-hackers@freebsd.org Subject: Re: PCMCIA questions: mapping attribute and common memory? From: "M. Warner Losh" In-Reply-To: <20020905191546.GF15218@spc.org> References: <20020905191546.GF15218@spc.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020905191546.GF15218@spc.org> Bruce M Simpson writes: : How do I map in attribute and common memory blocks from a PCMCIA card? You generally don't map attribute memory. With one exception (the raylan cards), there's no hardware in the attribute memory section and it is just used to store the cis. : Is this done on my behalf by the pcic(4) driver? Yes. : Does it scan the CIS tuples for me and perform the appropriate allocations? Yes. : If so, how do I get at the resource? : If not, how would I go about doing this myself in the driver? bus_alloc_resource() : And what would I want to put in my driver's xxx_probe() routine? Ideally, you'd just match the OEM ID and vendor info of the card. Less ideally, you'd match the strings in the CIS. : I've been looking over the ray(4) and xe(4) drivers, which have given me : some hints, but I'd appreciate clarification. Those are the two worst ones to look at. Don't do what they do, as the ray(4) hardware is weird and the xe(4) driver was written before we could read the cis from the kernel. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message