From owner-freebsd-current Wed Jul 25 5:55:10 2001 Delivered-To: freebsd-current@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id 445DE37B408 for ; Wed, 25 Jul 2001 05:54:58 -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 po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id IAA09733 for ; Wed, 25 Jul 2001 08:54:53 -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 IAA13346 for ; Wed, 25 Jul 2001 08:54:53 -0400 (EDT) Received: from localhost (culverk@localhost) by rac2.wam.umd.edu (8.9.3/8.9.3) with ESMTP id IAA13342 for ; Wed, 25 Jul 2001 08:54:53 -0400 (EDT) X-Authentication-Warning: rac2.wam.umd.edu: culverk owned process doing -bs Date: Wed, 25 Jul 2001 08:54:53 -0400 (EDT) From: Kenneth Wayne Culver To: freebsd-current@freebsd.org Subject: driver writing newbie 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 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 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