From owner-freebsd-hackers Wed Oct 21 22:23:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA28708 for freebsd-hackers-outgoing; Wed, 21 Oct 1998 22:23:47 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from po6.andrew.cmu.edu (PO6.ANDREW.CMU.EDU [128.2.10.106]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA28703 for ; Wed, 21 Oct 1998 22:23:46 -0700 (PDT) (envelope-from tcrimi+@andrew.cmu.edu) Received: (from postman@localhost) by po6.andrew.cmu.edu (8.8.5/8.8.2) id BAA22814 for freebsd-hackers@freebsd.org; Thu, 22 Oct 1998 01:23:17 -0400 (EDT) Received: via switchmail; Thu, 22 Oct 1998 01:23:17 -0400 (EDT) Received: from unix14.andrew.cmu.edu via qmail ID ; Thu, 22 Oct 1998 01:22:22 -0400 (EDT) Received: from unix14.andrew.cmu.edu via qmail ID ; Thu, 22 Oct 1998 01:22:21 -0400 (EDT) Received: from mms.4.60.Jun.27.1996.03.02.53.sun4.51.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.unix14.andrew.cmu.edu.sun4m.54 via MS.5.6.unix14.andrew.cmu.edu.sun4_51; Thu, 22 Oct 1998 01:22:21 -0400 (EDT) Message-ID: <8q=g4Ba00YUq1Eb0g0@andrew.cmu.edu> Date: Thu, 22 Oct 1998 01:22:21 -0400 (EDT) From: Thomas Valentino Crimi To: freebsd-hackers@FreeBSD.ORG Subject: pci_map_mem() Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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