From owner-freebsd-current Wed Jul 25 6: 1:43 2001 Delivered-To: freebsd-current@freebsd.org Received: from po4.wam.umd.edu (po4.wam.umd.edu [128.8.10.166]) by hub.freebsd.org (Postfix) with ESMTP id 6566337B407 for ; Wed, 25 Jul 2001 06:01:33 -0700 (PDT) (envelope-from culverk@wam.umd.edu) Received: from rac2.wam.umd.edu (IDENT:root@rac2.wam.umd.edu [128.8.10.142]) by po4.wam.umd.edu (8.9.3/8.9.3) with ESMTP id JAA14772 for ; Wed, 25 Jul 2001 09:01:31 -0400 (EDT) Received: from rac2.wam.umd.edu (IDENT:sendmail@localhost [127.0.0.1]) by rac2.wam.umd.edu (8.9.3/8.9.3) with SMTP id JAA15003 for ; Wed, 25 Jul 2001 09:01:30 -0400 (EDT) Received: from localhost (culverk@localhost) by rac2.wam.umd.edu (8.9.3/8.9.3) with ESMTP id JAA14999 for ; Wed, 25 Jul 2001 09:01:30 -0400 (EDT) X-Authentication-Warning: rac2.wam.umd.edu: culverk owned process doing -bs Date: Wed, 25 Jul 2001 09:01:30 -0400 (EDT) From: Kenneth Wayne Culver To: freebsd-current@FreeBSD.ORG Subject: Re: driver writing newbie In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 25 Jul 2001, Kenneth Wayne Culver wrote: > Sorry to post to this forum, but I'm not getting any replies from -hackers > or -questions, and I've looked at the webpages on writing device drivers, > as well as several other drivers. Here's my problem/question/whatever... > > I am writing a driver right now for the Hardware monitoring features of > the via686a and via686b south bridge chips. I have documentation and have > looked at the linux driver to see how things are done. My problem is that > I've got the chip probing, and I have the pci_read_config telling me that > my device needs a memory port (what's wierd is that I had to use the base > register value of the chip instead of PCIR_COMMAND in pci_read_config to > get it to tell me that it wanted me to set up a port instead of mem which > is 0x70) So I set up the regid as 0x10 (PCIR_MAPS) as outlined in the I meant above that the base register is 0x70 for my chip... > webpage, and SYS_RES_IOPORT as I found in the pci driver for the es137x > sound chip. I've also tried several combinations. So far the only thing I > havn't tried is setting the regid to 0x10 (PCIR_MAPS) and using > SYS_RES_MEMORY instead of SYS_RES_IOPORT (all these combinations are for > use in bus_alloc_resource). The thing is everything I've tried fails to > work, so I can't attach my driver because it won't map the resources. > > Can anyone suggest other things I could try to make this work right? > > Ken > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message