bdi
GDB
for BDI3000 (QorIQ P3/P4/P5)
User Manual
39
© Copyright 1997-2012 by ABATRON AG Switzerland
V 1.03
To debug the Linux kernel when MMU is enabled you may use the following load and startup se-
quence:
• Load the compressed linux image
• Set a hardware breakpoint with the Telnet at a point where MMU is enabled. For example at
"start_kernel".
BDI> BI 0xC0061550
• Start the code with GO at the Telnet
• The Linux kernel is decompressed and started
• The system should stop at the hardware breakpoint (e.g. at start_kernel)
• Disable the hardware breakpoint with the Telnet command CI.
• If not automatically done by the kernel, setup the page table pointers for the BDI.
• Start GDB with vmlinux as parameter
• Attach to the target
• Now you should be able to debug the Linux kernel
To setup the BDI page table information structure manually, set a hardware breakpoint at
"start_kernel" and use the Telnet to write the address of "swapper_pg_dir" to the appropriate place.
BDI>bi 0xc0061550
/* set breakpoint at start_kernel */
BDI>go
..
/* target stops at start_kernel */
BDI>ci
BDI>mm 0xf0 0xc00000f8
/* Let PTBASE point to an array of two pointers*/
BDI>mm 0xf8 0xc0057000
/* write address of swapper_pg_dir to first pointer */
BDI>mm 0xfc 0x00000000
/* clear second (user) pointer */