aboutsummaryrefslogtreecommitdiff
path: root/src/target/armv7a_mmu.c
AgeCommit message (Collapse)Author
2019-06-12armv7a_mmu: Add support for decoding Super SectionsFlorian Fainelli
The ARMv7-A architecture supports super sections which allows mapping physical addresses up to 40-bit into a 32-bit virtual address using the short descriptor format (see ARM DDI 0406C.c section B4.1.112 for details). Change-Id: I8e64d0e93e36ae7a7da7b7bf2a8342856bb044f1 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-on: http://openocd.zylin.com/5212 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2019-06-12armv7a_mmu: Do not restrict virtual addresses to uint32_tFlorian Fainelli
In preparation for adding super section decoding, do not restrict armv7a_mmu_translate_va_pa() to 32-bit virtual addresses since ARMv7-A processors with VMSA extensions (including LPAE) can issue wider physical addresses. Update casting to uint32_t where necessary. Change-Id: Id1c3d0d5ac324cbdc334259d9ea75fe4981671a1 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-on: http://openocd.zylin.com/5211 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2019-06-12armv7a_mmu: Remove armv7a_mmu_translate_va()Florian Fainelli
This function is not used anywhere in the tree, remove it, such that we only have a single function moving forward that might need to deal with short vs. long format specifics. Change-Id: I80e81cd7eba1e028d1afaeaedb675b46c0ca6fa1 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-on: http://openocd.zylin.com/5213 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2019-06-12armv7a_mmu: Check earlier for PAR readFlorian Fainelli
Check earlier that the read of the PAR register was successful instead of starting the decoding and then checking for an error reading that register. Change-Id: Id96c2b2f76d2d1c745fcfa55ad4c1e6db92106f9 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-on: http://openocd.zylin.com/5215 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2019-04-03armv7a_mmu: Remove warning on va = paFlorian Fainelli
Depending on how the MMU is configured it is possible to have a 1:1 mapping between virtual and physical addresses, thus making this warning bogus. We already check that the MMU is enabled in the caller: cortex_a_virt2phys(). Change-Id: I09f4c53ef933c8d1e268da5215a769449be014bc Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-on: http://openocd.zylin.com/5007 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Kamal Dasu <kdasu.kdev@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2018-12-12armv7a_mmu: s/LOG_ERROR/LOG_WARNING/ on address translation failureAntonio Borneo
When GDB analyses the status of the target it try to guess the current stack frame and issues few memory read. E.g. on ARM targets GDB uses R11 value as a potential frame-pointer and reads at the address pointed by R11. The address of such memory read is not always valid and can trigger an address translation failure. Replace LOG_ERROR with LOG_WARNING in case the virtual address does not have a hit in TTB; print the virtual address in the warning message and discriminate the two identical messages with [1]/[2]. Change-Id: I288b8cd26bec2543c4f1c16b7c06dc47d5d843d1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4602 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2018-11-08armv7a: ARMv7-A MMU toolsMatthias Welwarsky
factor out mmu-related code from armv7a.c, add a 'dump' command for page tables. Change-Id: Ic1ac3c645d7fd097e9d625c7c8302e7065875dd4 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/4327 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>