[Cbe-oss-dev] GCC inline memcpy() from local store causes bad page fault
segher at kernel.crashing.org
Thu Mar 22 03:37:46 EST 2007
>> > I looked it up, and indeed both multiple load/store and
>> > sign extending load insns to cache-inhibited space cause
>> > an alignment exception.
>> Where does the architecture say that lha and/or lwa to cache-inhibited
>> space cause an alignment exception? I looked for that just now and
>> didn't find it.
> I don't think the Power architecture says it, though it say it could
> with cache-inhibited space in general.
I only see where it (2.03 is what I looked at) says that
for dcbz and larx/stcx. insns (in 6.5.8, Book III-S). Maybe
somewhere else it says certain implementations can generate
an alignment exception for some other conditions; I didn't
find where but I didn't look very hard. Certainly many CPUs
do so, perhaps a note needs to be added to the arch books.
> The Cell handbook says what
> the cell does and lha/lwa cause an alignment exception with
> cache-inhibited memory.
And with load/store string/multiple insns to CI space too.
For userland, we could fix all these by having the kernel
emulate the insns. Or compile the few affected userland
apps/libs with the right compiler flags (which means adding
a flag to disable lha/lwa generation). Or both. Which
solution is preferred?
More information about the cbe-oss-dev