runtime check for omap-aes bus access permission (was: Re: 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot)
Matthijs van Duin
matthijsvanduin at gmail.com
Sat May 30 08:22:11 PDT 2015
On 29 May 2015 at 17:50, Tony Lindgren <tony at atomide.com> wrote:
> I believe some TI kernels use strongly-ordered mappings, mainline
> kernel does not. Which kernel version are you using?
Normally I periodically rebuild based on Robert C Nelson's -bone
kernel (but with heavily customized config). I also tried a plain
4.1.0-rc5-bone3, the generic 4.1.0-rc5-armv7-x0 (the most
vanilla-looking kernel I could find in my debian package list), and
for the heck of it also the classic 3.14.43-ti-r66.
In all cases I observed a synchronous bus error (dubiously reported as
"external abort on non-linefetch (0x1818)") on an AM335x with this
trivial test:
int main() {
int fd = open( "/dev/mem", O_RDWR | O_DSYNC );
if( fd < 0 ) return 1;
void *ptr = mmap( NULL, 4096, PROT_WRITE, MAP_SHARED, fd, 0x42000000 );
if( ptr == MAP_FAILED ) return 1;
*(volatile int *)ptr = 0;
return 0;
}
I even considered for a moment that maybe the AM335x has some "all
writes non-posted" thing enabled (which I think is available as a
switch on OMAP 4/5?). It seemed unlikely, but since most of my
exploration of interconnect behaviour was done on a DM814x, I
double-checked by performing the same write in a baremetal test
program (with that region configured Device-type in the MMU). As
expected, no data abort occurred, so writes most certainly are posted.
So I have trouble coming up with any explanation for this other than
the use of strongly-ordered mappings.
(Curiously BTW, omitting O_DSYNC made no difference.)
More information about the linux-arm-kernel
mailing list