Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 1997 14:16:27 -0500
From:      Brian McGovern <bmcgover@cisco.com>
To:        hackers@freebsd.org
Subject:   Question on mapping PCI memory...
Message-ID:  <199703101916.OAA15186@bmcgover-pc.cisco.com>

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

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




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