beautypg.com

Digilent Embedded Linux User Manual

Page 20

background image

Using Zynq with Linux

www.digilentinc.com

page 20 of 23

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Example 20.

Locating codes using GDB and XMD


Another good way to debug the kernel is to use a GDB remote protocol with the Xilinx Microprocessor
Debugger (XMD) via JTAG to debug a running kernel on a Zynq AP SoC based Digilent Board. In the
command line of the host PC, open XMD and connect to the Zynq board using the command:
xmd> connect arm hw.

Open another command line on your host PC, and run GDB using command: $gdb –nw vmlinux.
Then, under the GDB command prompt, connect to the port created by XMD (the default should be
localhost:1234) with the command: (gdb) target remote localhost:1234.

[ 0.990000] kernel BUG at arch/arm/mm/dma-mapping.c:254!
[ 0.990000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 0.990000] Modules linked in:
[ 0.990000] CPU: 1 Tainted: G W (3.3.0-digilent-12.07-zed-beta-dirty #3)
[ 0.990000] PC is at __dma_alloc+0x1c4/0x2f0
[ 0.990000] LR is at arm_vmregion_alloc+0xe0/0x110
[ 0.990000] pc : [] lr : [] psr: a0000013
[ 0.990000] sp : d8061da8 ip : 00384000 fp : c085f000
[ 0.990000] r10: d82436c0 r9 : c085f000 r8 : 00000005
[ 0.990000] r7 : 00000100 r6 : dfffc400 r5 : 00384000 r4 : fffc066f
[ 0.990000] r3 : fd600000 r2 : 00000000 r1 : 00000001 r0 : d82436c0
[ 0.990000] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 0.990000] Control: 18c5387d Table: 0000404a DAC: 00000015
[ 0.990000] Process kworker/1:0 (pid: 8, stack limit = 0xd80602f0)
[ 0.990000] Stack: (0xd8061da8 to 0xd8062000)
[ 0.990000] 1da0: c047d174 d8061e78 00000001 d8249f98 d8204800 d8249f40
[ 0.990000] 1dc0: d8204800 00384000 d8204800 00000000 00000004 00384000 00000000 c00161ac
[ 0.990000] 1de0: 00000447 00384000 d8249f98 c0190598 d8061e78 00000001 d837bdc0 c017cc00
[ 0.990000] 1e00: 00000500 000002d0 00000020 d8061e24 00000000 00000500 000002d0 34325258
[ 0.990000] 1e20: 00000000 00000000 00000000 00000000 00000000 00001400 00000000 00000000
[ 0.990000] 1e40: 00000000 00000000 00000000 00000000 00000000 d82c7340 d837bdc0 00000001
[ 0.990000] 1e60: 000002d0 00000500 00000001 d8061ecc d8204038 c017ad38 00000500 000002d0
[ 0.990000] 1e80: 00000500 000002d0 00000020 00000018 d837bdc0 00000001 d8204800 00000020
[ 0.990000] 1ea0: d8200d00 c017af94 00000000 c0093144 05d1745d d837bdc0 d8204800 00000001
[ 0.990000] 1ec0: 00000000 c0093210 c04801c4 00000000 d837bdc0 d8204800 00000020 00000000
[ 0.990000] 1ee0: 00000001 c09464e8 c0486d5c c017ca84 d8204800 d82c76c0 00000000 c04b2360
[ 0.990000] 1f00: c093a834 c0191390 d8061f10 c0184774 c093a5e0 00000001 00000000 c03dae33
[ 0.990000] 1f20: 00000000 d8204a50 00000001 00000000 c0486c68 00000000 c0486c68 00000000
[ 0.990000] 1f40: d8204800 d8204a50 00000000 c01861a4 d80bbe00 c0486c68 00000001 c04b2360
[ 0.990000] 1f60: d80179c0 c0946400 c0949c00 c01914c8 00000000 c00325e0 d80179c0 00000000
[ 0.990000] 1f80: c0486d60 d80179c0 c0946400 d80179d0 00000001 c0946400 00000000 00000009
[ 0.990000] 1fa0: 00000000 c0032be0 00000000 d804ff00 d80179c0 c0032a34 00000013 00000000
[ 0.990000] 1fc0: 00000000 c0035e94 c000dfcc 00000000 d80179c0 00000000 00000000 00000000
[ 0.990000] 1fe0: d8061fe0 d8061fe0 d804ff00 c0035e14 c000dfcc c000dfcc 65111104 16010002
[ 0.990000] [] (__dma_alloc+0x1c4/0x2f0) from []
(dma_alloc_writecombine+0x1c/0x24)
[ 0.990000] [] (dma_alloc_writecombine+0x1c/0x24) from []
(drm_gem_cma_create+0x4c/0xc8)
[ 0.990000] [] (drm_gem_cma_create+0x4c/0xc8) from []
(drm_fbdev_cma_probe+0xa8/0x20c)
[ 0.990000] [] (drm_fbdev_cma_probe+0xa8/0x20c) from []
(drm_fb_helper_single_fb_probe+0x190/0x278)
[ 0.990000] [] (drm_fb_helper_single_fb_probe+0x190/0x278) from []
(drm_fb_helper_initial_config+0x174/0x1b0)
[ 0.990000] [] (drm_fb_helper_initial_config+0x174/0x1b0) from []
(drm_fbdev_cma_init+0xa8/0xd4)
[ 0.990000] [] (drm_fbdev_cma_init+0xa8/0xd4) from []
(analog_drm_load+0x100/0x154)
[ 0.990000] [] (analog_drm_load+0x100/0x154) from []
(drm_get_platform_dev+0xe0/0x1bc)
[ 0.990000] [] (drm_get_platform_dev+0xe0/0x1bc) from []
(process_one_work+0x1d4/0x304)
[ 0.990000] [] (process_one_work+0x1d4/0x304) from []
(worker_thread+0x1ac/0x2c4)
[ 0.990000] [] (worker_thread+0x1ac/0x2c4) from [] (kthread+0x80/0x8c)
[ 0.990000] [] (kthread+0x80/0x8c) from [] (kernel_thread_exit+0x0/0x8)
[ 0.990000] Code: e0866107 e5964000 e3540000 0a000000 (e7f001f2)