Unable to run run-time loaded code on ZedBoard

Patrick Gauvin pggauvin at gmail.com
Sat Nov 14 23:36:21 UTC 2015


Pavel,

Sorry for the delay, but I tried your refined approach:

> If the area is smaller than cache size then
> use use of regions operations should take shorter
> and generally means less unrelated latencies to unrelated code/data
>
>  void rtems_cache_flush_multiple_data_lines( const void *, size_t );
>
>  void rtems_cache_invalidate_multiple_instruction_lines( const void *, size_t );

I cheated a little since I knew the addresses and lengths from the RTL
trace output ("rtl: loading: .text -> 0x213148 (88)"), but adding

  rtems_cache_invalidate_multiple_instruction_lines((void *)0x213148, 88);
  rtems_cache_flush_multiple_data_lines((void *)0x213148, 88);

before calling the loaded function resulted in the dl01 test running
successfully. At least for dl01, only the .text section needed
attention.

I also tried with the
rtems_cache_invalidate_multiple_instruction_lines call omitted, and it
still worked. However, leaving out the
rtems_cache_flush_multiple_data_lines call causes it to fail.

For reference, here is the full RTL trace output for the load:

rtl: loading '/dl-o1.o'
rtl: alloc: new: OBJECT addr=0x20b230 size=9
rtl: alloc: del: OBJECT addr=0x0
rtl: alloc: new: OBJECT addr=0x212e38 size=136
rtl: alloc: new: OBJECT addr=0x20b248 size=9
rtl: alloc: new: OBJECT addr=0x20b260 size=9
rtl: alloc: new: OBJECT addr=0x212ec8 size=56
rtl: alloc: new: OBJECT addr=0x20b278 size=6
rtl: sect: 1 : .text
rtl: alloc: new: OBJECT addr=0x212f08 size=56
rtl: alloc: new: OBJECT addr=0x212f48 size=10
rtl: sect: 2 : .rel.text
rtl: alloc: new: OBJECT addr=0x212f60 size=56
rtl: alloc: new: OBJECT addr=0x212fa0 size=6
rtl: sect: 3 : .data
rtl: alloc: new: OBJECT addr=0x212fb0 size=56
rtl: alloc: new: OBJECT addr=0x212ff0 size=5
rtl: sect: 4 : .bss
rtl: alloc: new: OBJECT addr=0x213000 size=56
rtl: alloc: new: OBJECT addr=0x213040 size=8
rtl: sect: 5 : .rodata
rtl: unsupported section:  7: type=1879048195 flags=00
rtl: alloc: new: OBJECT addr=0x213050 size=56
rtl: alloc: new: OBJECT addr=0x213090 size=10
rtl: sect: 8 : .shstrtab
rtl: alloc: new: OBJECT addr=0x2130a8 size=56
rtl: alloc: new: OBJECT addr=0x2130e8 size=8
rtl: sect: 9 : .symtab
rtl: alloc: new: OBJECT addr=0x2130f8 size=56
rtl: alloc: new: OBJECT addr=0x213138 size=8
rtl: sect: 10: .strtab
rtl: alloc: new: READ_EXEC addr=0x213148 size=92
rtl: alloc: new: READ addr=0x2131b0 size=65
rtl: alloc: new: READ_WRITE addr=0x213200 size=1
rtl: load sect: text  - b:0x213148 s:92 a:4
rtl: load sect: const - b:0x2131b0 s:65 a:4
rtl: load sect: data  - b:0x213200 s:1 a:1
rtl: load sect: bss   - b:0x0 s:0 a:1
rtl: loading: .text -> 0x213148 (88)
rtl: loading: .rodata -> 0x2131b0 (64)
rtl: alloc: new: SYMBOL addr=0x213210 size=121
rtl: alloc: new: SYMBOL addr=0x213298 size=31
rtl: sym:add:6  name:9 :$d                   bind:0  type:0
val:0x2131b0 sect:5 size:0
rtl: sym:add:7  name:12:.LC0                 bind:0  type:0
val:0x2131b0 sect:5 size:0
rtl: sym:add:8  name:17:.LC1                 bind:0  type:0
val:0x2131d0 sect:5 size:0
rtl: sym:add:9  name:22:.LC2                 bind:0  type:0
val:0x2131e4 sect:5 size:0
rtl: sym:add:10 name:27:$t                   bind:0  type:0
val:0x213148 sect:1 size:0
rtl: sym:add:13 name:30:rtems_main           bind:1  type:2
val:0x213149 sect:1 size:88
rtl: relocation: .rel.text, syms:.symtab
rtl: rel: sym:.LC0(7 )=002131b0 type:47 off:0000000a
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x10b0f243 @ 0x213152 in /dl-o1.o
rtl: rel: sym:.LC0(7 )=002131b0 type:48 off:0000000e
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x21f2c0 @ 0x213156 in /dl-o1.o
rtl: rel: sym:.LC1(8 )=002131d0 type:47 off:00000014
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x12d0f243 @ 0x21315c in /dl-o1.o
rtl: rel: sym:.LC1(8 )=002131d0 type:48 off:00000018
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x221f2c0 @ 0x213160 in /dl-o1.o
rtl: rel: sym:printf(14)=001196a9 type:10 off:0000001c
rtl: THM_CALL/JUMP24 0xfaa0f706 @ 0x213164 in /dl-o1.o
rtl: rel: sym:.LC2(9 )=002131e4 type:47 off:00000030
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x10e4f243 @ 0x213178 in /dl-o1.o
rtl: rel: sym:.LC2(9 )=002131e4 type:48 off:00000034
rtl: THM_MOVT_ABS/THM_MOVW_ABS_NC 0x21f2c0 @ 0x21317c in /dl-o1.o
rtl: rel: sym:printf(14)=001196a9 type:10 off:0000003c
rtl: THM_CALL/JUMP24 0xfa90f706 @ 0x213184 in /dl-o1.o
rtl: alloc: del: SYMBOL addr=0x213210
rtl: alloc: new: OBJECT addr=0x213210 size=84
rtl: linkmap_add
rtl: unresolv: global resolve


More information about the users mailing list