Dear Everyone.
I solved callout_debug_xxxxx.S and I looked at another kernel debugging
message like the below log.
What happens?
Unfortunately, I don't know where is the problem ?
Please help me.
Best regards.
Pusik.
Brief description of my CPU and Board.
CPU Core : ARM926EJ-S 32-bit RISC
CPU Cache: 16KB I-Cache, 16KB D-Cache
CPU Clock : 141MHz
CPU interrupt sources : 29 ea
Timers : 32-bit timer 2 ea
NOR Flash : 1MB (base address = 0x0000_0000)
SDRAM : 32MB (base address = 0x1000_0000)
----------------------------------------------------------------------------
---------------------------------
QNX IPL for JAGUAR
Commands:
s: load image serially using sendnto
f: load image from flash
ipl> send image now...
Download complete, calling image_scan...
Found image, calling image_setup...
image_scan return : 10400000
signature : 0x00FF7EEB
version : 0x00000001
flags1 : 0x00000001
flags2 : 0x00000000
header_size : 0x00000100
machine : 0x00000028
startup_vaddr : 0x10801B80
paddr_bias : 0x00000000
image_paddr : 0x10800000
ram_paddr : 0x10800000
ram_size : 0x0018C004
startup_size : 0x00021108
stored_size : 0x0018C004
imagefs_paddr : 0x00000000
imagefs_size : 0x0016AEFC
preboot_size : 0x00000000
zero0 : 0x00000000
image setup complete, calling image_start...
init_raminfo
add_ram start=0x10000000, size=0x02000000
lsp.asinfo.size=0x00000000
1
as_add_containing start=268435456, end=301989887, attr=00000007, name=ram,
conta
iner=memory
2
add_mem(10000000,02000000)
alloc_ram(0x10821108,0x0016aefc,0x00000001) => 0x10821108
add_mem(1098c004,01673ffc)
find_ram(size=0x00008000, align=0x00001000, colour=0x00000000,
mask=0x00000000)
Addr=0x10000000
jaguar2_cpu_freq: F_in=32768000
alloc_ram(0x10800000,0x0018c004,0x00000001) => 0x10800000
alloc_ram(0xffffffff,0x00004000,0x00004000) => find_ram(size=0x00004000,
align=0x00004000, colour=0x00000000, mask=0x00000000)
Addr=0x10008000
add_mem(1000c000,007f4000)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000c000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000d000
init_intrinfo
add_interrupt_array size=52, incr=52
add_interrupt
init_qtime
init_cpuinfo
Dcache: 512x32 WB
Icache: 512x32
arm926 rev 5 141MHz
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000e000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000f000
init_hwinfo
add_typed_string 0x00000005=jaguar2
init_system_private
add_typed_string 0x00000002=localhost
load_ifs done
as_find memory done
as_add imagefs done
as_add startup done
as_add bootram done
Find boot process 0 (inode 3758096386)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10010000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10011000
Load boot process '/proc/boot/procnto-instr'
boot_pgm[276963328].base=0x100001f4
boot_pgm[4261570292].entry=0x00000000
memmove done
option: c
reserved_size=0
smp_hook_rtn done
mdriver_hook done
as_add_containing start=268435456, end=268468223, attr=00000007,
name=sysram, container=ram
as_add_containing start=268509184, end=276824063, attr=00000007,
name=sysram, container=ram
as_add_containing start=278446084, end=301989887, attr=00000007,
name=sysram, container=ram
add_system done
alloc_syspage_memory
output_callouts(1) done
callouts_size=0x00000290
spsize=0x00000790
cpu_alloc_syspage_memory cpupagep=0x00000007, syspagep=0x00000000,
spsize=0x00000790
alloc_ram(addr=0xffffffff, size=0x000007b0, align=0x00001000)
alloc_ram(0xffffffff,0x000007b0,0x00001000) => find_ram(size=0x000007b0,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10012000
cpu_alloc_syspage_memory cpupage_paddr=0x10012790, syspage_paddr=0x10012000
INIT_ENTRY(system_private) done
INIT_ENTRY(meminfo) done
INIT_ENTRY(asinfo) done
INIT_ENTRY(hwinfo) done
INIT_ENTRY(cpuinfo) done
INIT_ENTRY(cacheattr) done
INIT_ENTRY(qtime) done
INIT_ENTRY(callout) done
INIT_ENTRY(callin) done
INIT_ENTRY(typed_strings) done
INIT_ENTRY(strings) done
INIT_ENTRY(intrinfo) done
INIT_ENTRY(smp) done
INIT_ENTRY(pminfo) done
INIT_ENTRY(mdriver) done
memset cpu=0x1081fbc8, size=0x00000020
[cpu:0] startup_memory_map done
[cpu:0] memmove done
[cpu:0] startup_memory_unmap done
output_callouts(0) done
alloc_syspage_memory done
jtag_store_syspage_addr done
Header size=0x0000009c, Total Size=0x00000480, #Cpu=1, Type=4
Section:system_private offset:0x000001d8 size:0x00000068
syspage ptr user:fc404000 kernel:fc404000
cpupage ptr user:fc404790 kernel:fc404790 spacing:32
kdebug info:00000000 callback:00000000
boot pgms: idx=0
0) base paddr:10822000 start addr:fe0266f4
ramsize:00000000 pagesize:00001000
Section:qtime offset:0x00000148 size:0x00000048
boot:00000000 CPS:000000000219df50 rate/scale:28368794/-15 intr:17
Section:callout offset:0x000000a0 size:0x00000048
reboot:fc404604 power:fc404620
timer_load:fc404634 reload:fc404684 value:fc404698
0) display:fc4046b0 poll:fc4046d4 break:fc4046f8
1) display:00000000 poll:00000000 break:00000000
Section:cpuinfo offset:0x00000190 size:0x00000020
0) cpu:41069265 flags:40000000 speed:0000008d cache i/d:1/0 name:48
Section:cacheattr offset:0x00000440 size:0x00000040
0) flags:32 size:0020 #lines:0200 control:fc4044bc next:255
1) flags:11 size:0020 #lines:0200 control:fc404510 next:255
Section:meminfo offset:0x00000480 size:0x00000000
Section:asinfo offset:0x00000300 size:0x00000100
0000) 0000000000000000-00000000ffffffff o:ffff a:0010 p:100 c:00000000
n:21
0020) 0000000010000000-0000000011ffffff o:0000 a:0017 p:100 c:00000000
n:28
0040) 0000000010821108-000000001098c003 o:0000 a:0005 p:100 c:00000000
n:55
0060) 0000000010800000-0000000010821107 o:0000 a:0007 p:100 c:00000000
n:63
0080) 0000000010821108-000000001098c003 o:0000 a:0007 p:100 c:00000000
n:71
00a0) 0000000010000000-0000000010007fff o:0020 a:0007 p:100 c:00000000
n:79
00c0) 00000000100127b0-00000000107fffff o:0020 a:0007 p:100 c:00000000
n:79
00e0) 000000001098c004-0000000011ffffff o:0020 a:0007 p:100 c:00000000
n:79
Section:hwinfo offset:0x000002b8 size:0x00000048
0) size:3 tag:3 isize:3, iname:0, owner:65535, kids:1
12) size:3 tag:17 isize:3, iname:9, owner:0, kids:1
24) size:3 tag:3 isize:3, iname:32, owner:12, kids:1
36) size:4 tag:41 isize:4, iname:36, owner:24, kids:0
00 00 00 00
Section:typed_strings offset:0x00000240 size:0x00000020
off:0 type:5 string:'jaguar2'
off:12 type:2 string:'localhost'
Section:strings offset:0x00000260 size:0x00000058
[0]'hw' [3]'Group' [9]'unknown' [17]'Bus' [21]'memory' [28]'ram' [32]'rtc'
[36]'NONE' [41]'Device' [48]'arm926' [55]'imagefs' [63]'startup'
[71]'bootram' [79]'sysram'
Section:intrinfo offset:0x00000400 size:0x00000040
0) vector_base:00000000, #vectors:32, cascade_vector:7fffffff
cpu_intr_base:00000000, cpu_intr_stride:0, flags:0000
id => flags:8000, size:0050, rtn:fc404540
eoi => flags:9000, size:002c, rtn:fc404590
mask:fc4045bc, unmask:fc4045e0, config:00000000
Section:smp offset:0x00000480 size:0x00000000
Section:pminfo offset:0x00000480 size:0x00000000
Section:mdriver offset:0x00000480 size:0x00000000
Section:boxinfo offset:0x000001b0 size:0x00000028
hw_flags:00000000
Section:cpu offset:0x00000128 size:0x00000020
page_flush:fc404480 page_flush_deferred:fc4044b8
upte_ro:00000aae upte_rw:00000ffe
kpte_ro:0000000e kpte_rw:0000055e
mask_nc:0000000c
System page at phys:10012000 user:fc404000 kern:fc404000
Starting next program at vfe0266f4
Shutdown[0,0] S/C/F=4/1/1 C/D=fe006950/fe062490 state(c0)= now lock
QNX Version 6.3.2 Release 2006/03/16-14:15:55EST
[0]PID-TID=1-1? P/T FL=00018001/09000040
[0]ASPACE=>NULL
armle context[fe061278]:
0000: fc404000 fc404148 200000d3 00000000 200000d3 00000001 00000002
fe065cbc
0020: fe065c68 fe065c28 fe06238c fe0612d0 fe0625e0 fe0612bc fe03ac18
fc404174
0040: 200000d3
instruction[fc404174]:
f1 ff ff ff 00 00 00 00 01 00 00 00 b2 07 00 00 00 00 00 00 00 00 00 00 00
00
stack[fe0612bc]:
0000: fe060320 fe050a9c fe061304 fe0612d4 fe04e404 fe050a64 fe04e070
fe060320
0020: fe060320 fe065c28 0000001a 0000003f fe061278 fe065c28 fe06238c
fe06131c
0040: fe061308 fe03aedc fe04e098 108206e0 fe0266f4 1000bfe8 fe061320
00051078
0060: fe03ae1c 000003ff fc43e000 000000c8 00000001 00000000 00000000
fe06133c
QNX Porting problem on ARM926EJ-S-based SoC platform
Re: QNX Porting problem on ARM926EJ-S-based SoC platform
Hello.
I got some information of my status by TRACE32 ARM ICD.
The below assembler code is my status.
I guess that there is some problem in callout_reboot_xxxxx.S but I need some
hint.
Actually, I don't want to use WatchDog scheme.
Please give me a hint.
Best regards.
Pusik.
{ Tabs: 4 }
SR:4002:FE029180 QueryObjectDone: mov r12,r13
stmdb r13!,{r11-r12,r14,pc}
sub r11,r12,#0x4
mov r3,#0x0
str r3,[r0,#0x1C0]
ldmdb r11,{r11,r13,pc}
SR:4002:FE029198 reboot: mov
r12,r13
stmdb r13!,{r4,r11-r12,r14,pc}
sub r11,r12,#0x4
mov r4,r0
ldr r2,0xFE0291DC
ldr r3,[r2]
orr r3,r3,#0x40
str r3,[r2]
bl 0xFE03BC44 ; cpu_reboot
ldr r3,0xFE0291E0
ldr r2,[r3]
ldr r3,0xFE0291E4
ldr r0,[r3]
mov r1,r4
mov r14,pc
ldr pc,[r2]
ldmdb r11,{r4,r11,r13,pc}
cdp2 p4,0x0,c2,c6,c12,0x4
cdp2 p5,0x0,c2,c6,c4,0x7
cdp2 p3,0x0,c2,c6,c0,0x4
SR:4002:FE0291E8 RebootSystem: mov r12,r13
stmdb r13!,{r4,r11-r12,r14,pc}
sub r11,r12,#0x4
mov r4,r0
ldr r3,0xFE029220 ; r3 = 0xFE06248C
ldr r3,[r3] ; r3 = data[0xFE06248C]
= 0x000000C0
cmp r3,#0x0
bne 0xFE029214
ldr r0,0xFE029224 ; r0 = 0xFE029198
mov r1,r4
bl 0xFE057210 ; __Ring0
SR:4002:FE029214 mov
r0,r4
bl 0xFE029198 ; reboot
TRACE32 stop hear --> b
0xFE02921C
SR:4002:FE029220 FE06248C cdp2
p4,0x0,c2,c6,c12,0x4
SR:4002:FE029224 FE029198 mcr2
p1,0x0,r9,c2,c8,0x4
SR:4002:FE029228 E91BA810 ldmdb
r11,{r4,r11,r13,pc}
SR:4002:FE02922C kerext_stack_cont: mov
r12,r13
stmdb r13!,{r4-r5,r11-r12,r14,pc}
SR:4002:FE06248C 000000C0
The below code is my callout_reboot_jaguar2.S file.
/*
* -----------------------------------------------------------------------
* Routine to patch callout code
*
* On entry:
* r0 - physical address of syspage
* r1 - virtual address of syspage
* r2 - offset from start of syspage to start of the callout routine
* r3 - offset from start of syspage to read/write data used by
callout
* -----------------------------------------------------------------------
*/
patch_reboot:
stmdb sp!,{r4,lr}
add r4, r0, r2
// address of callout routine
/*
* Map Watchdog Timer registers
*/
mov r0, #0x10
ldr r1, Lpaddr
bl callout_io_map
/*
* Patch the callout routine
*/
CALLOUT_PATCH r4, r0, r1, r2, ip
ldmia sp!,{r4,pc}
Lpaddr: .word J2_WDT_CTRL
CALLOUT_START(reboot_jaguar2, 0, patch_reboot)
/*
* Get the Watchdog Timer base address (patched)
*/
mov ip, #0x000000ff
orr ip, ip, #0x0000ff00
orr ip, ip, #0x00ff0000
orr ip, ip, #0xff000000
// Store the address of J2_WDT_CTRL at ip
ldr r1, [ip, #0]
orr r1, r1, #0x03 /* enable wdt, and enable
reset at terminal count */
str r1, [ip, #0]
CALLOUT_END(reboot_jaguar2)
This is a part of code in startup's main.c code.
const struct callout_slot callouts[] = {
{ CALLOUT_SLOT( reboot, _jaguar2 ) },
};
From: openqnx-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openqnx-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Pusik
Park
Sent: Monday, February 18, 2008 10:22 PM
To: openqnx-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Openqnx-developer] QNX Porting problem on ARM926EJ-S-based SoC
platform
Dear Everyone.
I solved callout_debug_xxxxx.S and I looked at another kernel debugging
message like the below log.
What happens?
Unfortunately, I don't know where is the problem ?
Please help me.
Best regards.
Pusik.
Brief description of my CPU and Board.
CPU Core : ARM926EJ-S 32-bit RISC
CPU Cache: 16KB I-Cache, 16KB D-Cache
CPU Clock : 141MHz
CPU interrupt sources : 29 ea
Timers : 32-bit timer 2 ea
NOR Flash : 1MB (base address = 0x0000_0000)
SDRAM : 32MB (base address = 0x1000_0000)
----------------------------------------------------------------------------
---------------------------------
QNX IPL for JAGUAR
Commands:
s: load image serially using sendnto
f: load image from flash
ipl> send image now...
Download complete, calling image_scan...
Found image, calling image_setup...
image_scan return : 10400000
signature : 0x00FF7EEB
version : 0x00000001
flags1 : 0x00000001
flags2 : 0x00000000
header_size : 0x00000100
machine : 0x00000028
startup_vaddr : 0x10801B80
paddr_bias : 0x00000000
image_paddr : 0x10800000
ram_paddr : 0x10800000
ram_size : 0x0018C004
startup_size : 0x00021108
stored_size : 0x0018C004
imagefs_paddr : 0x00000000
imagefs_size : 0x0016AEFC
preboot_size : 0x00000000
zero0 : 0x00000000
image setup complete, calling image_start...
init_raminfo
add_ram start=0x10000000, size=0x02000000
lsp.asinfo.size=0x00000000
1
as_add_containing start=268435456, end=301989887, attr=00000007, name=ram,
conta
iner=memory
2
add_mem(10000000,02000000)
alloc_ram(0x10821108,0x0016aefc,0x00000001) => 0x10821108
add_mem(1098c004,01673ffc)
find_ram(size=0x00008000, align=0x00001000, colour=0x00000000,
mask=0x00000000)
Addr=0x10000000
jaguar2_cpu_freq: F_in=32768000
alloc_ram(0x10800000,0x0018c004,0x00000001) => 0x10800000
alloc_ram(0xffffffff,0x00004000,0x00004000) => find_ram(size=0x00004000,
align=0x00004000, colour=0x00000000, mask=0x00000000)
Addr=0x10008000
add_mem(1000c000,007f4000)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000c000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000d000
init_intrinfo
add_interrupt_array size=52, incr=52
add_interrupt
init_qtime
init_cpuinfo
Dcache: 512x32 WB
Icache: 512x32
arm926 rev 5 141MHz
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000e000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000f000
init_hwinfo
add_typed_string 0x00000005=jaguar2
init_system_private
add_typed_string 0x00000002=localhost
load_ifs done
as_find memory done
as_add imagefs done
as_add startup done
as_add bootram done
Find boot process 0 (inode 3758096386)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10010000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10011000
Load boot process '/proc/boot/procnto-instr'
boot_pgm[276963328].base=0x100001f4
boot_pgm[4261570292].entry=0x00000000
memmove done
option: c
reserved_size=0
smp_hook_rtn done
mdriver_hook done
as_add_containing start=268435456, end=268468223, attr=00000007,
name=sysram, container=ram
as_add_containing start=268509184, end=276824063, attr=00000007,
name=sysram, container=ram
as_add_containing start=278446084, end=301989887, attr=00000007,
name=sysram, container=ram
add_system done
alloc_syspage_memory
output_callouts(1) done
callouts_size=0x00000290
spsize=0x00000790
cpu_alloc_syspage_memory cpupagep=0x00000007, syspagep=0x00000000,
spsize=0x00000790
alloc_ram(addr=0xffffffff, size=0x000007b0, align=0x00001000)
alloc_ram(0xffffffff,0x000007b0,0x00001000) => find_ram(size=0x000007b0,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10012000
cpu_alloc_syspage_memory cpupage_paddr=0x10012790, syspage_paddr=0x10012000
INIT_ENTRY(system_private) done
INIT_ENTRY(meminfo) done
INIT_ENTRY(asinfo) done
INIT_ENTRY(hwinfo) done
INIT_ENTRY(cpuinfo) done
INIT_ENTRY(cacheattr) done
INIT_ENTRY(qtime) done
INIT_ENTRY(callout) done
INIT_ENTRY(callin) done
INIT_ENTRY(typed_strings) done
INIT_ENTRY(strings) done
INIT_ENTRY(intrinfo) done
INIT_ENTRY(smp) done
INIT_ENTRY(pminfo) done
INIT_ENTRY(mdriver) done
memset cpu=0x1081fbc8, size=0x00000020
[cpu:0] startup_memory_map done
[cpu:0] memmove done
[cpu:0] startup_memory_unmap done
output_callouts(0) done
alloc_syspage_memory done
jtag_store_syspage_addr done
Header size=0x0000009c, Total Size=0x00000480, #Cpu=1, Type=4
Section:system_private offset:0x000001d8 size:0x00000068
syspage ptr user:fc404000 kernel:fc404000
cpupage ptr user:fc404790 kernel:fc404790 spacing:32
kdebug info:00000000 callback:00000000
boot pgms: idx=0
0) base paddr:10822000 start addr:fe0266f4
ramsize:00000000 pagesize:00001000
Section:qtime offset:0x00000148 size:0x00000048
boot:00000000 CPS:000000000219df50 rate/scale:28368794/-15 intr:17
Section:callout offset:0x000000a0 size:0x00000048
reboot:fc404604 power:fc404620
timer_load:fc404634 reload:fc404684 value:fc404698
0) display:fc4046b0 poll:fc4046d4 break:fc4046f8
1) display:00000000 poll:00000000 break:00000000
Section:cpuinfo offset:0x00000190 size:0x00000020
0) cpu:41069265 flags:40000000 speed:0000008d cache i/d:1/0 name:48
Section:cacheattr offset:0x00000440 size:0x00000040
0) flags:32 size:0020 #lines:0200 control:fc4044bc next:255
1) flags:11 size:0020 #lines:0200 control:fc404510 next:255
Section:meminfo offset:0x00000480 size:0x00000000
Section:asinfo offset:0x00000300 size:0x00000100
0000) 0000000000000000-00000000ffffffff o:ffff a:0010 p:100 c:00000000
n:21
0020) 0000000010000000-0000000011ffffff o:0000 a:0017 p:100 c:00000000
n:28
0040) 0000000010821108-000000001098c003 o:0000 a:0005 p:100 c:00000000
n:55
0060) 0000000010800000-0000000010821107 o:0000 a:0007 p:100 c:00000000
n:63
0080) 0000000010821108-000000001098c003 o:0000 a:0007 p:100 c:00000000
n:71
00a0) 0000000010000000-0000000010007fff o:0020 a:0007 p:100 c:00000000
n:79
00c0) 00000000100127b0-00000000107fffff o:0020 a:0007 p:100 c:00000000
n:79
00e0) 000000001098c004-0000000011ffffff o:0020 a:0007 p:100 c:00000000
n:79
Section:hwinfo offset:0x000002b8 size:0x00000048
0) size:3 tag:3 isize:3, iname:0, owner:65535, kids:1
12) size:3 tag:17 isize:3, iname:9, owner:0, kids:1
24) size:3 tag:3 isize:3, iname:32, owner:12, kids:1
36) size:4 tag:41 isize:4, iname:36, owner:24, kids:0
00 00 00 00
Section:typed_strings offset:0x00000240 size:0x00000020
off:0 type:5 string:'jaguar2'
off:12 type:2 string:'localhost'
Section:strings offset:0x00000260 size:0x00000058
[0]'hw' [3]'Group' [9]'unknown' [17]'Bus' [21]'memory' [28]'ram' [32]'rtc'
[36]'NONE' [41]'Device' [48]'arm926' [55]'imagefs' [63]'startup'
[71]'bootram' [79]'sysram'
Section:intrinfo offset:0x00000400 size:0x00000040
0) vector_base:00000000, #vectors:32, cascade_vector:7fffffff
cpu_intr_base:00000000, cpu_intr_stride:0, flags:0000
id => flags:8000, size:0050, rtn:fc404540
eoi => flags:9000, size:002c, rtn:fc404590
mask:fc4045bc, unmask:fc4045e0, config:00000000
Section:smp offset:0x00000480 size:0x00000000
Section:pminfo offset:0x00000480 size:0x00000000
Section:mdriver offset:0x00000480 size:0x00000000
Section:boxinfo offset:0x000001b0 size:0x00000028
hw_flags:00000000
Section:cpu offset:0x00000128 size:0x00000020
page_flush:fc404480 page_flush_deferred:fc4044b8
upte_ro:00000aae upte_rw:00000ffe
kpte_ro:0000000e kpte_rw:0000055e
mask_nc:0000000c
System page at phys:10012000 user:fc404000 kern:fc404000
Starting next program at vfe0266f4
Shutdown[0,0] S/C/F=4/1/1 C/D=fe006950/fe062490 state(c0)= now lock
QNX Version 6.3.2 Release 2006/03/16-14:15:55EST
[0]PID-TID=1-1? P/T FL=00018001/09000040
[0]ASPACE=>NULL
armle context[fe061278]:
0000: fc404000 fc404148 200000d3 00000000 200000d3 00000001 00000002
fe065cbc
0020: fe065c68 fe065c28 fe06238c fe0612d0 fe0625e0 fe0612bc fe03ac18
fc404174
0040: 200000d3
instruction[fc404174]:
f1 ff ff ff 00 00 00 00 01 00 00 00 b2 07 00 00 00 00 00 00 00 00 00 00 00
00
stack[fe0612bc]:
0000: fe060320 fe050a9c fe061304 fe0612d4 fe04e404 fe050a64 fe04e070
fe060320
0020: fe060320 fe065c28 0000001a 0000003f fe061278 fe065c28 fe06238c
fe06131c
0040: fe061308 fe03aedc fe04e098 108206e0 fe0266f4 1000bfe8 fe061320
00051078
0060: fe03ae1c 000003ff fc43e000 000000c8 00000001 00000000 00000000
fe06133c
I got some information of my status by TRACE32 ARM ICD.
The below assembler code is my status.
I guess that there is some problem in callout_reboot_xxxxx.S but I need some
hint.
Actually, I don't want to use WatchDog scheme.
Please give me a hint.
Best regards.
Pusik.
{ Tabs: 4 }
SR:4002:FE029180 QueryObjectDone: mov r12,r13
stmdb r13!,{r11-r12,r14,pc}
sub r11,r12,#0x4
mov r3,#0x0
str r3,[r0,#0x1C0]
ldmdb r11,{r11,r13,pc}
SR:4002:FE029198 reboot: mov
r12,r13
stmdb r13!,{r4,r11-r12,r14,pc}
sub r11,r12,#0x4
mov r4,r0
ldr r2,0xFE0291DC
ldr r3,[r2]
orr r3,r3,#0x40
str r3,[r2]
bl 0xFE03BC44 ; cpu_reboot
ldr r3,0xFE0291E0
ldr r2,[r3]
ldr r3,0xFE0291E4
ldr r0,[r3]
mov r1,r4
mov r14,pc
ldr pc,[r2]
ldmdb r11,{r4,r11,r13,pc}
cdp2 p4,0x0,c2,c6,c12,0x4
cdp2 p5,0x0,c2,c6,c4,0x7
cdp2 p3,0x0,c2,c6,c0,0x4
SR:4002:FE0291E8 RebootSystem: mov r12,r13
stmdb r13!,{r4,r11-r12,r14,pc}
sub r11,r12,#0x4
mov r4,r0
ldr r3,0xFE029220 ; r3 = 0xFE06248C
ldr r3,[r3] ; r3 = data[0xFE06248C]
= 0x000000C0
cmp r3,#0x0
bne 0xFE029214
ldr r0,0xFE029224 ; r0 = 0xFE029198
mov r1,r4
bl 0xFE057210 ; __Ring0
SR:4002:FE029214 mov
r0,r4
bl 0xFE029198 ; reboot
TRACE32 stop hear --> b
0xFE02921C
SR:4002:FE029220 FE06248C cdp2
p4,0x0,c2,c6,c12,0x4
SR:4002:FE029224 FE029198 mcr2
p1,0x0,r9,c2,c8,0x4
SR:4002:FE029228 E91BA810 ldmdb
r11,{r4,r11,r13,pc}
SR:4002:FE02922C kerext_stack_cont: mov
r12,r13
stmdb r13!,{r4-r5,r11-r12,r14,pc}
SR:4002:FE06248C 000000C0
The below code is my callout_reboot_jaguar2.S file.
/*
* -----------------------------------------------------------------------
* Routine to patch callout code
*
* On entry:
* r0 - physical address of syspage
* r1 - virtual address of syspage
* r2 - offset from start of syspage to start of the callout routine
* r3 - offset from start of syspage to read/write data used by
callout
* -----------------------------------------------------------------------
*/
patch_reboot:
stmdb sp!,{r4,lr}
add r4, r0, r2
// address of callout routine
/*
* Map Watchdog Timer registers
*/
mov r0, #0x10
ldr r1, Lpaddr
bl callout_io_map
/*
* Patch the callout routine
*/
CALLOUT_PATCH r4, r0, r1, r2, ip
ldmia sp!,{r4,pc}
Lpaddr: .word J2_WDT_CTRL
CALLOUT_START(reboot_jaguar2, 0, patch_reboot)
/*
* Get the Watchdog Timer base address (patched)
*/
mov ip, #0x000000ff
orr ip, ip, #0x0000ff00
orr ip, ip, #0x00ff0000
orr ip, ip, #0xff000000
// Store the address of J2_WDT_CTRL at ip
ldr r1, [ip, #0]
orr r1, r1, #0x03 /* enable wdt, and enable
reset at terminal count */
str r1, [ip, #0]
CALLOUT_END(reboot_jaguar2)
This is a part of code in startup's main.c code.
const struct callout_slot callouts[] = {
{ CALLOUT_SLOT( reboot, _jaguar2 ) },
};
From: openqnx-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openqnx-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Pusik
Park
Sent: Monday, February 18, 2008 10:22 PM
To: openqnx-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Openqnx-developer] QNX Porting problem on ARM926EJ-S-based SoC
platform
Dear Everyone.
I solved callout_debug_xxxxx.S and I looked at another kernel debugging
message like the below log.
What happens?
Unfortunately, I don't know where is the problem ?
Please help me.
Best regards.
Pusik.
Brief description of my CPU and Board.
CPU Core : ARM926EJ-S 32-bit RISC
CPU Cache: 16KB I-Cache, 16KB D-Cache
CPU Clock : 141MHz
CPU interrupt sources : 29 ea
Timers : 32-bit timer 2 ea
NOR Flash : 1MB (base address = 0x0000_0000)
SDRAM : 32MB (base address = 0x1000_0000)
----------------------------------------------------------------------------
---------------------------------
QNX IPL for JAGUAR
Commands:
s: load image serially using sendnto
f: load image from flash
ipl> send image now...
Download complete, calling image_scan...
Found image, calling image_setup...
image_scan return : 10400000
signature : 0x00FF7EEB
version : 0x00000001
flags1 : 0x00000001
flags2 : 0x00000000
header_size : 0x00000100
machine : 0x00000028
startup_vaddr : 0x10801B80
paddr_bias : 0x00000000
image_paddr : 0x10800000
ram_paddr : 0x10800000
ram_size : 0x0018C004
startup_size : 0x00021108
stored_size : 0x0018C004
imagefs_paddr : 0x00000000
imagefs_size : 0x0016AEFC
preboot_size : 0x00000000
zero0 : 0x00000000
image setup complete, calling image_start...
init_raminfo
add_ram start=0x10000000, size=0x02000000
lsp.asinfo.size=0x00000000
1
as_add_containing start=268435456, end=301989887, attr=00000007, name=ram,
conta
iner=memory
2
add_mem(10000000,02000000)
alloc_ram(0x10821108,0x0016aefc,0x00000001) => 0x10821108
add_mem(1098c004,01673ffc)
find_ram(size=0x00008000, align=0x00001000, colour=0x00000000,
mask=0x00000000)
Addr=0x10000000
jaguar2_cpu_freq: F_in=32768000
alloc_ram(0x10800000,0x0018c004,0x00000001) => 0x10800000
alloc_ram(0xffffffff,0x00004000,0x00004000) => find_ram(size=0x00004000,
align=0x00004000, colour=0x00000000, mask=0x00000000)
Addr=0x10008000
add_mem(1000c000,007f4000)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000c000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000d000
init_intrinfo
add_interrupt_array size=52, incr=52
add_interrupt
init_qtime
init_cpuinfo
Dcache: 512x32 WB
Icache: 512x32
arm926 rev 5 141MHz
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000e000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x1000f000
init_hwinfo
add_typed_string 0x00000005=jaguar2
init_system_private
add_typed_string 0x00000002=localhost
load_ifs done
as_find memory done
as_add imagefs done
as_add startup done
as_add bootram done
Find boot process 0 (inode 3758096386)
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10010000
alloc_ram(0xffffffff,0x00001000,0x00001000) => find_ram(size=0x00001000,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10011000
Load boot process '/proc/boot/procnto-instr'
boot_pgm[276963328].base=0x100001f4
boot_pgm[4261570292].entry=0x00000000
memmove done
option: c
reserved_size=0
smp_hook_rtn done
mdriver_hook done
as_add_containing start=268435456, end=268468223, attr=00000007,
name=sysram, container=ram
as_add_containing start=268509184, end=276824063, attr=00000007,
name=sysram, container=ram
as_add_containing start=278446084, end=301989887, attr=00000007,
name=sysram, container=ram
add_system done
alloc_syspage_memory
output_callouts(1) done
callouts_size=0x00000290
spsize=0x00000790
cpu_alloc_syspage_memory cpupagep=0x00000007, syspagep=0x00000000,
spsize=0x00000790
alloc_ram(addr=0xffffffff, size=0x000007b0, align=0x00001000)
alloc_ram(0xffffffff,0x000007b0,0x00001000) => find_ram(size=0x000007b0,
align=0x00001000, colour=0x00000000, mask=0x00000000)
Addr=0x10012000
cpu_alloc_syspage_memory cpupage_paddr=0x10012790, syspage_paddr=0x10012000
INIT_ENTRY(system_private) done
INIT_ENTRY(meminfo) done
INIT_ENTRY(asinfo) done
INIT_ENTRY(hwinfo) done
INIT_ENTRY(cpuinfo) done
INIT_ENTRY(cacheattr) done
INIT_ENTRY(qtime) done
INIT_ENTRY(callout) done
INIT_ENTRY(callin) done
INIT_ENTRY(typed_strings) done
INIT_ENTRY(strings) done
INIT_ENTRY(intrinfo) done
INIT_ENTRY(smp) done
INIT_ENTRY(pminfo) done
INIT_ENTRY(mdriver) done
memset cpu=0x1081fbc8, size=0x00000020
[cpu:0] startup_memory_map done
[cpu:0] memmove done
[cpu:0] startup_memory_unmap done
output_callouts(0) done
alloc_syspage_memory done
jtag_store_syspage_addr done
Header size=0x0000009c, Total Size=0x00000480, #Cpu=1, Type=4
Section:system_private offset:0x000001d8 size:0x00000068
syspage ptr user:fc404000 kernel:fc404000
cpupage ptr user:fc404790 kernel:fc404790 spacing:32
kdebug info:00000000 callback:00000000
boot pgms: idx=0
0) base paddr:10822000 start addr:fe0266f4
ramsize:00000000 pagesize:00001000
Section:qtime offset:0x00000148 size:0x00000048
boot:00000000 CPS:000000000219df50 rate/scale:28368794/-15 intr:17
Section:callout offset:0x000000a0 size:0x00000048
reboot:fc404604 power:fc404620
timer_load:fc404634 reload:fc404684 value:fc404698
0) display:fc4046b0 poll:fc4046d4 break:fc4046f8
1) display:00000000 poll:00000000 break:00000000
Section:cpuinfo offset:0x00000190 size:0x00000020
0) cpu:41069265 flags:40000000 speed:0000008d cache i/d:1/0 name:48
Section:cacheattr offset:0x00000440 size:0x00000040
0) flags:32 size:0020 #lines:0200 control:fc4044bc next:255
1) flags:11 size:0020 #lines:0200 control:fc404510 next:255
Section:meminfo offset:0x00000480 size:0x00000000
Section:asinfo offset:0x00000300 size:0x00000100
0000) 0000000000000000-00000000ffffffff o:ffff a:0010 p:100 c:00000000
n:21
0020) 0000000010000000-0000000011ffffff o:0000 a:0017 p:100 c:00000000
n:28
0040) 0000000010821108-000000001098c003 o:0000 a:0005 p:100 c:00000000
n:55
0060) 0000000010800000-0000000010821107 o:0000 a:0007 p:100 c:00000000
n:63
0080) 0000000010821108-000000001098c003 o:0000 a:0007 p:100 c:00000000
n:71
00a0) 0000000010000000-0000000010007fff o:0020 a:0007 p:100 c:00000000
n:79
00c0) 00000000100127b0-00000000107fffff o:0020 a:0007 p:100 c:00000000
n:79
00e0) 000000001098c004-0000000011ffffff o:0020 a:0007 p:100 c:00000000
n:79
Section:hwinfo offset:0x000002b8 size:0x00000048
0) size:3 tag:3 isize:3, iname:0, owner:65535, kids:1
12) size:3 tag:17 isize:3, iname:9, owner:0, kids:1
24) size:3 tag:3 isize:3, iname:32, owner:12, kids:1
36) size:4 tag:41 isize:4, iname:36, owner:24, kids:0
00 00 00 00
Section:typed_strings offset:0x00000240 size:0x00000020
off:0 type:5 string:'jaguar2'
off:12 type:2 string:'localhost'
Section:strings offset:0x00000260 size:0x00000058
[0]'hw' [3]'Group' [9]'unknown' [17]'Bus' [21]'memory' [28]'ram' [32]'rtc'
[36]'NONE' [41]'Device' [48]'arm926' [55]'imagefs' [63]'startup'
[71]'bootram' [79]'sysram'
Section:intrinfo offset:0x00000400 size:0x00000040
0) vector_base:00000000, #vectors:32, cascade_vector:7fffffff
cpu_intr_base:00000000, cpu_intr_stride:0, flags:0000
id => flags:8000, size:0050, rtn:fc404540
eoi => flags:9000, size:002c, rtn:fc404590
mask:fc4045bc, unmask:fc4045e0, config:00000000
Section:smp offset:0x00000480 size:0x00000000
Section:pminfo offset:0x00000480 size:0x00000000
Section:mdriver offset:0x00000480 size:0x00000000
Section:boxinfo offset:0x000001b0 size:0x00000028
hw_flags:00000000
Section:cpu offset:0x00000128 size:0x00000020
page_flush:fc404480 page_flush_deferred:fc4044b8
upte_ro:00000aae upte_rw:00000ffe
kpte_ro:0000000e kpte_rw:0000055e
mask_nc:0000000c
System page at phys:10012000 user:fc404000 kern:fc404000
Starting next program at vfe0266f4
Shutdown[0,0] S/C/F=4/1/1 C/D=fe006950/fe062490 state(c0)= now lock
QNX Version 6.3.2 Release 2006/03/16-14:15:55EST
[0]PID-TID=1-1? P/T FL=00018001/09000040
[0]ASPACE=>NULL
armle context[fe061278]:
0000: fc404000 fc404148 200000d3 00000000 200000d3 00000001 00000002
fe065cbc
0020: fe065c68 fe065c28 fe06238c fe0612d0 fe0625e0 fe0612bc fe03ac18
fc404174
0040: 200000d3
instruction[fc404174]:
f1 ff ff ff 00 00 00 00 01 00 00 00 b2 07 00 00 00 00 00 00 00 00 00 00 00
00
stack[fe0612bc]:
0000: fe060320 fe050a9c fe061304 fe0612d4 fe04e404 fe050a64 fe04e070
fe060320
0020: fe060320 fe065c28 0000001a 0000003f fe061278 fe065c28 fe06238c
fe06131c
0040: fe061308 fe03aedc fe04e098 108206e0 fe0266f4 1000bfe8 fe061320
00051078
0060: fe03ae1c 000003ff fc43e000 000000c8 00000001 00000000 00000000
fe06133c