linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* armv7 + lpae broken in 4.1.12+ ?
@ 2015-11-26 23:26 Brad Parker
  2015-11-26 23:37 ` Russell King - ARM Linux
  2015-11-27  9:36 ` Will Deacon
  0 siblings, 2 replies; 7+ messages in thread
From: Brad Parker @ 2015-11-26 23:26 UTC (permalink / raw)
  To: linux-arm-kernel

I was recently building a 4.1.12 kernel for a generic V7 platform with 
LPAE.   I could not get it to boot and then discovered two things:

- the early printk code in tty/serial call ioremap very early and it 
fails because there's no heap
- the code in proc-v7-3level.S/cpu_v7_set_pte_ext doesn't work

The printk issue is no big deal.  The pte issue is more important.

I found that the pte entries were garbage, which really confused me.  I 
finally discovered that the code in proc-v7-3level.S expects data in r0, 
r2 & r3, but in fact it comes in on r0, r1 & r2.

My guess is that this is some vestige of the change made to 
cpu_v7_switch_mm() some time ago to make the PA a 64 bit value (hence 
using r0,r1).  But this change was not made to cpu_v7_set_pte_ext, so it 
writes garbage.

lol.  I guess I'm the only one who turns on LPAE for v7 cpu's...

The simple fix is to add "mov r3, r2; mov r2,r1" at the begining of 
cpu_v7_set_pte_ext(), but that's a hack (but it does solve the problem 
and the kernel boots).

I suspect the "right thing" is to make the prototype for 
cpu_v7_set_pte_ext() in proc-fns.h use a phys_addr_t but I have not 
tried that yet.

Can someone confirm that what I am seeing is correct?

-brad

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-27 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 23:26 armv7 + lpae broken in 4.1.12+ ? Brad Parker
2015-11-26 23:37 ` Russell King - ARM Linux
2015-11-27  9:36 ` Will Deacon
2015-11-27 15:55   ` Brad Parker
2015-11-27 16:06     ` Russell King - ARM Linux
2015-11-27 17:02       ` Brad Parker
2015-11-27 17:09         ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).