Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 1997 14:47:08 -0600 (CST)
From:      Mark Tinguely <tinguely@plains.nodak.edu>
To:        bmcgover@cisco.com, hackers@freebsd.org
Subject:   Re: Question on mapping PCI memory...
Message-ID:  <199703102047.OAA23607@plains.nodak.edu>

next in thread | raw e-mail | index | archive | help
what is the PCI memory register? most have them at 0x10, and you do:

        pci_map_mem(tag, PCI_MAP_REG_START, &(XXX->virt_baseaddr),
                               &(XXX->phys_baseaddr));

(note: PCI_MAP_REG_START is defined in the PCI header files as 0x10).

but if it also has an I/O address, then it would more like:

#define MY_PCI_MAP_REG_START (PCI_MAP_REG_START+4)
        pci_map_mem(tag, MY_PCI_MAP_REG_START, &(XXX->virt_baseaddr),
                               &(XXX->phys_baseaddr));

you need to look at the PCI register description to see where your card's
memory register is set.

once the above command is done, you use the "virt_baseaddr" for kernel
references.

--mark.



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