Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Sep 1998 23:58:30 +0000
From:      Mike Smith <mike@smith.net.au>
To:        Wilko Bulte <wilko@yedi.iaf.nl>
Cc:        FreeBSD-hackers@FreeBSD.ORG (FreeBSD hackers list)
Subject:   Re: pci memory mapping 
Message-ID:  <199809012358.XAA01477@word.smith.net.au>
In-Reply-To: Your message of "Wed, 02 Sep 1998 00:05:04 %2B0200." <199809012205.AAA29093@yedi.iaf.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809012358.XAA01477>