iMX6 MMU Page Tables v7 or v5?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 MMU Page Tables v7 or v5?

1,986 Views
adrianthewlis
Contributor III

I am implementing MMU support on iMX6Q, and have run into a curious and confusing situation.

To get things going quickly, I had grabbed some code I developed for ARMv5 MMU as a starting point, knowing I'd have to tweak it quite a bit. It was basically working, but I was starting to have trouble with memory allocation and decided I had better read the ARMv7 docs and see what needed to be fixed.

To my confusion, the page-table implemented as ARMv5 with sub-pages are working! even though SCTRL bit 23 is 1, meaning they shouldn't. Whereas when I try to implement page-tables as per ARMv7 document, everything locks up.

What MMU version is the iMX6Q running? All the Cortex-A9 doc says it should be ARMv7, but it is behaving like ARMv5, which should not even be possible. Anybody know what the story is?

Labels (1)
Tags (2)
5 Replies

1,267 Views
BiyongSUN
NXP Employee
NXP Employee

You don't know i.MX6Q is arm cortexA9,  do you?

0 Kudos
Reply

1,267 Views
art
NXP Employee
NXP Employee

Yes, i.MX6Q is based on the ARM Cortex-A9 cores.

Artur

0 Kudos
Reply

1,267 Views
art
NXP Employee
NXP Employee

For the information and software examples on how to deal with the i.MX6Quad processor's MMU, please refer to the code of the i.MX6 Series Platform SDK bare metal software, available for free download on the i.MX6Quad Software&Tools web page:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fpsp=1&tab=Design_Tools_Tab


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,267 Views
adrianthewlis
Contributor III

Went back through the SDK example, and noticed that DACR was being set to 0x55555555... noticed that I had set mine to 0xffffffff which is Management not Client. That was causing everything else to behave incorrectly, and covering another mistake I had made.

Set DACR correctly, which uncovered the other boo boo, and now everything is working as expected... ARMv7!

Boy, do I feel like a doofus!

Thanks for the help Artur!

0 Kudos
Reply

1,267 Views
adrianthewlis
Contributor III

I have the SDK, but the MMU example only utilizes 1Mbyte section entries, not page tables, which allow memory management down to the level of 4kbyte pages. Its the page tables where I am running into the problem.

I have been poring over the ARMv7 architecture manual, and it documents the ARMv5 page tables with sub-pages, but doesn't document any means for enabling them on ARMv7.

0 Kudos
Reply