* Dense/Sparse mapping of PCI device on Alpha
@ 1996-08-26 4:00 Timothy Miller
1996-08-27 4:00 ` Roger Ivie
1996-09-04 4:00 ` Fred Kleinsorge
0 siblings, 2 replies; 5+ messages in thread
From: Timothy Miller @ 1996-08-26 4:00 UTC (permalink / raw)
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?
--
---------------------------------------------------------------------------
Timothy Miller, millert@grad.csee.usf.edu Theoretical Linguistics
http://www.csee.usf.edu/~millert Music Theory, Computer Engineering
---------------------------------------------------------------------------
Cunning linguists are very skilled with their tongues.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Dense/Sparse mapping of PCI device on Alpha
1996-08-26 4:00 Dense/Sparse mapping of PCI device on Alpha Timothy Miller
@ 1996-08-27 4:00 ` Roger Ivie
1996-09-04 4:00 ` zrepachol
1996-09-04 4:00 ` Fred Kleinsorge
1 sibling, 1 reply; 5+ messages in thread
From: Roger Ivie @ 1996-08-27 4:00 UTC (permalink / raw)
In article <Pine.SOL.3.95.960826181532.16754A-100000@babbage>, Timothy Miller <millert@csee.usf.edu> 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/ |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Dense/Sparse mapping of PCI device on Alpha
1996-08-27 4:00 ` Roger Ivie
@ 1996-09-04 4:00 ` zrepachol
0 siblings, 0 replies; 5+ messages in thread
From: zrepachol @ 1996-09-04 4:00 UTC (permalink / raw)
In Article <1996Aug27.100236.84241@cc.usu.edu>
ivie@cc.usu.edu (Roger Ivie) writes:
>In article <Pine.SOL.3.95.960826181532.16754A-100000@babbage>, Timothy Miller <millert@csee.usf.edu> writes:
>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...
http://www.digital.com/info/semiconductor.
Demolish a forrest and all will be revealed ;)
BTW, the alpha ARM and update are there as well.
~Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Dense/Sparse mapping of PCI device on Alpha
1996-08-26 4:00 Dense/Sparse mapping of PCI device on Alpha Timothy Miller
1996-08-27 4:00 ` Roger Ivie
@ 1996-09-04 4:00 ` Fred Kleinsorge
1996-09-13 4:00 ` Fred Kleinsorge
1 sibling, 1 reply; 5+ messages in thread
From: Fred Kleinsorge @ 1996-09-04 4:00 UTC (permalink / raw)
Timothy Miller wrote:
>
> 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?
>
If you are using OpenVMS or UNIX, it can't be done with the current firmware.
Because the amount of sparse and dense address space were not the same on the
AlphaServers, the hardware group chose to not overlap the address spaces. The
firmware looks at the attributes in the PCI config space to see if the memory
is prefetchable, if it is - you get dense space - it assumes that longword reads
and writes have no side effects. If it isn't you get sparse space to give you
partial word I/O.
On *AlphaStations*, you can figure out how to permute the PA and get both a valid
dense space address *and* a valid sparse space address for the _same_ memory address
range. You can't on an AlphaServer. Been there. Tried that. I wrote much of the
low-end graphics code and attempt to overmap the frame buffer in both spaces for
performance reasons.
Now. If you can figure out what dense address space range is free (and you really
can't because apparently felt the need to make this available) - you could simply
fabricate a dense space address, and override the PA by writing the new PA into the
PCI config space for the device.
The only other alternative is to convince the hardware group to change the firmware
and overlap the dense and sparse spaces, even though they are not symetric (the choice
of how to map these spaces is done by the firmware at power up).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Dense/Sparse mapping of PCI device on Alpha
1996-09-04 4:00 ` Fred Kleinsorge
@ 1996-09-13 4:00 ` Fred Kleinsorge
0 siblings, 0 replies; 5+ messages in thread
From: Fred Kleinsorge @ 1996-09-13 4:00 UTC (permalink / raw)
Fred Kleinsorge wrote:
>
> Because the amount of sparse and dense address space were not the same on the
> AlphaServers, the hardware group chose to not overlap the address spaces. The
>
I'd like to modify the above. It is not as clear cut as AlphaStations versus AlphaServers,
as time has gone on the decision has been made on a platform basis. So for instance, the
AlphaServer 4100 does overlap the address spaces.
I think the answer to the specific question was to change the PCI config space value to
indicate prefetchable memory - and you will get dense space.
If you want to create multiple mappings, you should use the O/S calls to map the address
space with the proper granularity and then make sure and check the status from the call
to make sure that it worked! That is, do not assume that any address can be mapped in
both of the spaces. This is what the low-end servers on OpenVMS do - they attempt to map
sparse and dense, but understand that they may need to punt on dense access to the
frame buffer - based on the return from O/S call (in OpenVMS it's IOC$MAP_IO) that
creates the virtual mapping.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-09-13 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-26 4:00 Dense/Sparse mapping of PCI device on Alpha Timothy Miller
1996-08-27 4:00 ` Roger Ivie
1996-09-04 4:00 ` zrepachol
1996-09-04 4:00 ` Fred Kleinsorge
1996-09-13 4:00 ` Fred Kleinsorge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox