Daniel S. Chivers <email@example.com> wrote:
I have mmap_device_memory()'d some registers for a device but it seems that
the device isn’t receiving the values all the time. ie… the cache isn’t
I read in the mmap_device_memory doc that PPC may have to use eieio(). I
can’t find documentation on this. I blindly put the call after my writes
and it didn’t seem to help.
I also tried mmap_device_io() with the in* out* calls. I got similiar
This code works on x86 as is. But shows this behavior on PPC. (yes,
byteswapping is taken care of).
How can I flush this cache? And what is eieio()?
Isn’t that what Old MacDonald said down on his farm? Try grep eieio
/usr/include// and you’ll see that there is an inline assembly call for
eieio on the various platforms. Looks like eieio is an assembly instruction
on ppc (the equivalent on mips is “sync”). I don’t have the ppc definition
but on mips it’s “load/store barrier” It looks like it’s for multi-processor
(and non-strongly ordered) machines to ensure that all load/stores done before
the sync will be seen before any load/store started afterwards. Man, this
“See Mips Run” is a cool book…
As far as your application is concerned, I’m not sure if this will take care
of flushing between device memory…it looks to me like it’s only for
memory accesses between CPU’s and pipelines.
“Computer science is no more about computers than astronomy is about telescopes”