Date: Thu, 22 Oct 1998 01:22:21 -0400 (EDT) From: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> To: freebsd-hackers@FreeBSD.ORG Subject: pci_map_mem() Message-ID: <8q=g4Ba00YUq1Eb0g0@andrew.cmu.edu>
next in thread | raw e-mail | index | archive | help
I'm working on a device driver and have been running into a bit of vaugeness over the pci_map_mem interface. From what I've gathered: pci_map_mem(pci tag, reg, vaddr, paddr) where reg is the base address register and vaddr and paddr will be set to the address space allocated. paddr would be the address of the page boundary? I wrote some code with these assuptions in mind which boiled down to this: if(!pci_map_mem(tag, 0x10, &va, &pa)) return; regbase = va + REG_OFFSET; regbase[REG10] = 0x03; That last operation dumped me into ddb ;) Where am I going wrong? I'm under the assumption that a successful pci_map_mem maps all the memory the card requests (so I shouldn't fall off), and also makes that memory immediately accessible to me. TIA 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?8q=g4Ba00YUq1Eb0g0>
