* Re: Bus arbitration on Alpha
@ 1997-09-26 18:23 Ivan Passos
0 siblings, 0 replies; 2+ messages in thread
From: Ivan Passos @ 1997-09-26 18:23 UTC (permalink / raw)
James R. Shipman wrote:
>
> Be careful about caching with memory mapped I/O. Many times reading
> or writing registers causes side effects (like clearing status bits).
> If you don't turn off caching (or turn on guarding) for these
> registers you can get hit by cache line fetches for nearby address'.
> ie) the program accesses 0x0100 and the cache fetches a line from
> 0x100 to 0x120 or such. If you have memory mapped registers in that
> range which do something when you read them you get burned. Same for
> writes.
>
> Power PC has a "guarding" attribute which tells the cache not to
> touch memory which you didn't specifically ask for. I don't know
> about alpha.
Ok, that's a possibility. I have two questions:
- When I declare a variable as volatile (which I do for all pointers
to hardware), shouldn't caching be disable for this piece of code?
- Does anybody there know about the Alpha specs in regards to the
caching issue Jim is talking about ?
Regards,
--
*******************************************************************
Cyclades Corporation Tel.: (510)770-9727 ext. 202
Ivan Passos E-mail : mailto:ivan@cyclades.com
Software Engineer WWW : http://www.cyclades.com
*******************************************************************
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <342BFDAD.9F705899@cyclades.com>]
* Re: Bus arbitration on Alpha
[not found] <342BFDAD.9F705899@cyclades.com>
@ 1997-09-28 4:45 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1997-09-28 4:45 UTC (permalink / raw)
> Ok, that's a possibility. I have two questions:
>
> - When I declare a variable as volatile (which I do for all pointers
> to hardware), shouldn't caching be disable for this piece of code?
No. Volatile is actually a bad way to go about this; you
really need explicit memory synchronization primitives.
Unfortunately, there are no such explicit architecture
independant macros for such in the kernel currently. What
there is is hidden behind the in/out/read/write macros.
There is also an mb() floating about the alpha asm headers.
> - Does anybody there know about the Alpha specs in regards to the
> caching issue Jim is talking about ?
Please see the Alpha AXP Architecture Handbook (available as
pdf from ftp.digital.com), sections 5.2 (Physical Address space
characteristics) and 5.6 (Read/Write Ordering).
What it may boil down to is that unless you issue an explicit
mb(), your writes may be sitting in a queue waiting for either
bus time, or to be coelesed with other writes to the same line.
So the card may not have seen the write before the read, so it
may not be in the state you think it is in.
It is really hard to say without seeing the actual code and
knowing what the card will tolerate.
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-09-28 4:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-09-26 18:23 Bus arbitration on Alpha Ivan Passos
[not found] <342BFDAD.9F705899@cyclades.com>
1997-09-28 4:45 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox