From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,6a6068428ab68f38 X-Google-Attributes: gid1164f8,public From: ivie@cc.usu.edu (Roger Ivie) Subject: Re: Dense/Sparse mapping of PCI device on Alpha Date: 1996/08/27 Message-ID: <1996Aug27.100236.84241@cc.usu.edu>#1/1 X-Deja-AN: 176804164 references: organization: Utah State University newsgroups: comp.sys.dec In article , Timothy Miller writes: > I've got a card on a PCI bus in a Dec Alpha box (2100) that gets mapped > into sparse I/O space, which is not what I want. Has anyone had any success > with remapping a device from sparse into dense? Is there any way to trick > the system into putting it into dense in the first place? The PCI prefetch > bit is not set on the PCI interface, but we need it to be. Any ideas? Mapping the device into dense space is simply a matter of figuring out the address you need to use, allocating pages, and mapping them over the address. My 21072 data books are elsewhere at the moment, so I can't be terribly specific. My memory may also be faulty. IIRC, the Alpha's memory space is roughly divided into "quadrants". One quadrant is reserved for cacheable memory; the system memory lives here. Physical addresses such as 0.xxxx.xxxx are in the cacheable quadrant. One quadrant is reserved for non-cacheable memory. This quadrant can be used for things like video memory. The 21072 CSRs also live in this quadrant. Addresses such as 1.xxxx.xxxx are in the non-cacheable memory quadrant. One quadrant is reserved for dense PCI addressing. This is the quadrant you need to use. Addresses such as 2.xxxx.xxxx are in the dense quadrant. One quadrant is reserved for sparse PCI addressing. Addresses such as 3.xxxx.xxxx are in the sparse PCI quadrant. You should be able to calculate the dense space physical address by taking the sparse physical address, subtracting 2.0000.0000, shifting right by 5 bits, and adding 3.0000.0000. Allocate a page and map it over the dense address and you're done. I don't know how to do that under OSF/1. There are a variety of ways to do it under VMS depending on your circumstances. Since I don't have my 21072 book handy, I can't point you at the prefetch bit. Bear in mind that if there's a bridge between you and the processor's PCI interface, you may need to set a prefetch bit in the bridge as well. I also don't have my 21050 data book handy, nor would I know how to find the bridge in the first place... -- -------------------------+--------------------------------------------- Roger Ivie | "Irony can be pretty ironic sometimes." ivie@cc.usu.edu | -- Frank Drebin http://cc.usu.edu/~ivie/ |