From owner-freebsd-hackers Wed Sep 2 00:02:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA29203 for freebsd-hackers-outgoing; Wed, 2 Sep 1998 00:02:13 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (castles304.castles.com [208.214.167.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA29176 for ; Wed, 2 Sep 1998 00:02:06 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost [127.0.0.1]) by word.smith.net.au (8.9.1/8.8.8) with ESMTP id XAA01477; Tue, 1 Sep 1998 23:58:31 GMT (envelope-from mike@word.smith.net.au) Message-Id: <199809012358.XAA01477@word.smith.net.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Wilko Bulte cc: FreeBSD-hackers@FreeBSD.ORG (FreeBSD hackers list) Subject: Re: pci memory mapping In-reply-to: Your message of "Wed, 02 Sep 1998 00:05:04 +0200." <199809012205.AAA29093@yedi.iaf.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Sep 1998 23:58:30 +0000 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hi there, > > I'm trying to get a Mylex DAC960PD to work with a driver skeleton Ulf > wrote. As I have a different Mylex board than Ulf (a PD iso a PG) I need > to make some changes. > > For some reason the followin code in attach() fails: > > if (!pci_map_mem(config_id, PCI_MAP_REG_START, &mp->vbase, > &mp->pbase)) { > printf("myx%d: couldn't map memory\n", unit); > goto fail; > } Is PCI_MAP_REG_START the correct configuration register index for the memory-mapped region? It might help seeing the 'boot -v' output for this device from your system. > >From a previous post by Bill Paul I get the impression (...) that I might need > to enable memory mapping by doing a pci_conf_write(). But what params > do I feed pci_conf_write()? The config id, the register you want to write, and its value. You can determine these from the documentation for the PCI device you're talking to, or in some cases the PCI spec itself. > Interestingly enough for Ulf's board things work OK. Sounds like it defaults to enabling the memory-mapped region, where yours doesn't. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message