From owner-freebsd-hackers Mon Mar 10 11:17:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA16077 for hackers-outgoing; Mon, 10 Mar 1997 11:17:06 -0800 (PST) Received: from bmcgover-pc.cisco.com (bmcgover-pc.cisco.com [171.69.104.147]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA16069 for ; Mon, 10 Mar 1997 11:16:59 -0800 (PST) Received: from bmcgover-pc.cisco.com (localhost.cisco.com [127.0.0.1]) by bmcgover-pc.cisco.com (8.8.5/8.8.2) with ESMTP id OAA15186 for ; Mon, 10 Mar 1997 14:16:28 -0500 (EST) Message-Id: <199703101916.OAA15186@bmcgover-pc.cisco.com> To: hackers@freebsd.org Subject: Question on mapping PCI memory... Date: Mon, 10 Mar 1997 14:16:27 -0500 From: Brian McGovern Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Given that CYZ_PCI_BASE_ADDR1 is a PCI configuration register that holds the memory address (I am assuming physical for a entity that is sizeof (struct RUNTIME_9060) in size, what would be the appropriate C code for reading this register,and converting it to a virtual address so that I can memcpy to and from it? For extra worship points, how about doing the same for CYZ_PCI_BASE_ADDR2, which will be 512KB in size. I know that its a combination of pci_read_conf(), and pci_map_mem(). However, I've spent three days spinning my wheels, and I can't quite seem to get it right. As I've ripped most of my hair out at this point, I'd be very happy if someone who knew how such things worked could just doof slap me, show me, pat me on my back , and send me, once again, on my merry way. Calling me a moron for asking is also allowed :) Thanks. -Brian