i.MX8QXP Lauterbach MMU setup

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

i.MX8QXP Lauterbach MMU setup

Contributor I


Try to run Trace32/Lauterbach for imx8qxp running Linux.

I currently am using:

; Declare the MMU format to the debugger
; - table format is "LINUX"
; - table base address is at label "swapper_pg_dir"
; - kernel address translation
; Map the virtual kernel symbols to physical addresses to give
; the debugger access to it before CPU MMU is initialized

print "initializing debugger MMU..."
MMU.FORMAT LINUX swapper_pg_dir 0xFFFFFFC000000000--0xFFFFFFDF00000000 0x0000000080000000

; prepare debugger translation
TRANSLATION.COMMON 0xFFFFFFBF00000000--0ffffffffffffffff ; common area for kernel and processes
TRANSLATION.TableWalk ON ; debugger uses a table walk to decode virtual addresses
TRANSlation.ON ; switch on debugger(!) address translation

; Initialize Linux Awareness

; Note that the Linux awareness needs the kernel symbols to work

PRINT "initializing multitask support..."
MENU.ReProgram ~~/eldon/linux/linux-3.x/linux ; loads Linux menu (linux.men)
TASK.CONFIG ~~/eldon/linux/linux-3.x/linux3 ; loads Linux awareness (linux.t32)

However this gives error looking up kernel structures when I try to load kernel awareness.


Thanks for any suggetsions.


0 Kudos
1 Reply

Contributor V

You need to make sure that the kernel has been compiled with debug info enabled. Please check page 16 of the following document for more info:


MMU.FORMAT LINUX swapper_pg_dir 0xFFFFFFC000000000--0xFFFFFFDF00000000 0x0000000080000000

The used addresses and format could be wrong:

Format: if CONFIG_SWAP is set then please use LINUXSWAP3, use otherwise LINUX

For the addresses, you can use

MMU.FORMAT <format> swapper_pg_dir_text--(_end-1) <_text_phys_addr>

You can find <_text_phys_addr> with the command MMU.List PageTable _text

    TRANSLATION.COMMON 0xFFFFFFBF00000000--0ffffffffffffffff

use instead TRANSLATION.COMMON 0xF000000000000000--0ffffffffffffffff 
Alternatively, you can use the script ~~/demo/<arm|arm64>/kernel/linux/board/generic-template/detect_translation.cmm to detect the settings.
0 Kudos