Strange problem - RTEMS globals memory offset?

Kenneth J. Peters Kenneth.J.Peters at jpl.nasa.gov
Fri Jun 15 18:13:10 UTC 2007


I'm observing a strange problem in an system with custom hardware and 
a slightly modified sparc BSP (Sparc erc32-based) with RTEMS 4.6.6. 
It may not be an RTEMS problem at all, but it is mysterious enough 
that I could use some extra ideas.

The basic observations are that the executable image (built from C 
code) ends with a bunch of RTEMS global variables (partial symbol 
table below, showing which ones). The image size has grown, and we 
observe some bad application behavior, that looks rather like some 
sort of intermittent IRQ error (missing interrupts, maybe taking too 
long to respond or execute, not entirely clear yet). However, I've 
determined that changing the linker command file to move the RTEMS 
globals a little farther up in memory makes the problem go away. 
Moving farther up in memory makes the problem come back. Moving 
farther again, the problem goes away.

I have checked that the heap and stack are not colliding, and a 
variety of other things (such as the word alignment remaining the 
same). My basic question to the list is whether there is some RTEMS 
structure that needs to be aligned on a large memory boundary (like 
2048 bytes), or needs to be an aligned offset from start of code or 
the trap table or something.

Again, this could be some weird hardware issue (though memory tests 
pass), not RTEMS at all. But suggestions are welcome.

Thanks,
Ken Peters
Ken.Peters at jpl.nasa.gov

>020977a4 g     O .bss   00000028 BSP_RTEMS_Configuration
>020977cc g     O .bss   00000004 bsp_isr_level
>020977d0 g     O .bss   00000028 Cpu_table
>020977f8 g     O .bss   0000003c BSP_Configuration
>02097834 g     O .bss   00000004 CPU_SPARC_CLICKS_PER_TICK
>02097838 g     O .bss   00000004 rtems_clock_minor
>0209783c g     O .bss   00000004 Old_ticker
>02097840 g     O .bss   00000004 Clock_driver_ticks
>02097930 g     O .bss   00000004 rtems_progname
>02097934 g     O .bss   00000004 rtems_panic_in_progress
>02097940 g     O .bss   00000004 _IO_Number_of_drivers
>02097944 g     O .bss   00000004 _Configuration_MP_table
>02097948 g     O .bss   00000004 _TOD_Ticks_per_second
>0209794c g     O .bss   00000004 _Thread_Ready_chain
>02097950 g     O .bss   00000004 _Thread_Ticks_per_timeslice
>02097954 g     O .bss   00000004 _CPU_Interrupt_stack_high
>02097958 g     O .bss   00000014 _Objects_Information_table
>02097970 g     O .bss   00000088 _Thread_BSP_context
>020979f8 g     O .bss   00000004 _Thread_Dispatch_disable_level
>020979fc g     O .bss   0000000c _User_extensions_Switches_list
>02097a08 g     O .bss   00000004 _CPU_Interrupt_stack_low
>02097a0c g     O .bss   00000028 _CPU_Table
>02097a34 g     O .bss   00000004 _TOD_Is_set
>02097a38 g     O .bss   00000004 _Objects_Maximum_nodes
>02097a3c g     O .bss   0000000c _Internal_Objects
>02097a48 g     O .bss   0000001c _Workspace_Area
>02097a64 g     O .bss   00000004 _ISR_Vector_table
>02097a68 g     O .bss   0000004c _Extension_Information
>02097ab4 g     O .bss   00000004 _IO_Driver_name_table
>02097ab8 g     O .bss   00000004 _Thread_Allocated_fp
>02097abc g     O .bss   00000004 _Thread_libc_reent
>02097ac0 g     O .bss   00000004 _Thread_Heir
>02097ac4 g     O .bss   00000004 _Objects_Local_node
>02097ac8 g     O .bss   00000004 _Configuration_Table
>02097acc g     O .bss   00000004 _ISR_Nest_level
>02097ad0 g     O .bss   00000004 _Thread_Maximum_extensions
>02097ad4 g     O .bss   00000004 _Thread_Do_post_task_switch_extension
>02097ad8 g     O .bss   00000002 _Priority_Major_bit_map
>02097adc g     O .bss   00000004 _RTEMS_Allocator_Mutex
>02097ae0 g     O .bss   00000004 _Watchdog_Sync_level
>02097ae4 g     O .bss   00000004 _TOD_Seconds_since_epoch
>02097ae8 g     O .bss   00000004 _Thread_Executing
>02097aec g     O .bss   00000004 _Debug_Level
>02097af0 g     O .bss   00000004 _Context_Switch_necessary
>02097af4 g     O .bss   0000000c _Watchdog_Seconds_chain
>02097b00 g     O .bss   0000000c _Watchdog_Ticks_chain
>02097b0c g     O .bss   00000028 _TOD_Seconds_watchdog
>02097b34 g     O .bss   00000004 _System_state_Is_multiprocessing
>02097b38 g     O .bss   0000004c _API_Mutex_Information
>02097b90 g     O .bss   00000020 _Priority_Bit_map
>02097bb0 g     O .bss   00000004 _Watchdog_Sync_count
>02097bb4 g     O .bss   00000004 _Watchdog_Ticks_since_boot
>02097bb8 g     O .bss   00000004 _ISR_Signals_to_thread_executing
>02097bbc g     O .bss   0000001c _TOD_Current
>02097bd8 g     O .bss   00000004 _IO_Number_of_devices
>02097bdc g     O .bss   00000004 rtems_ada_self
>02097be0 g     O .bss   0000004c _Thread_Internal_information
>02097c2c g     O .bss   00000004 _TOD_Microseconds_per_tick
>02097c30 g     O .bss   00000004 _System_state_Current
>02097c34 g     O .bss   00000004 _IO_Driver_address_table
>02097c38 g     O .bss   00000004 _Thread_Idle
>02097c40 g     O .bss   00000088 _CPU_Null_fp_context
>02097cc8 g     O .bss   0000000c Internal_errors_What_happened
>02097cd4 g     O .bss   0000000c _User_extensions_List
>02097ce0 g     O .bss   0000000c _API_extensions_List
>02097cec g     O .bss   00000004 rtems_libio_iops
>02097cf0 g     O .bss   00000004 rtems_libio_iop_freelist
>02097cf4 g     O .bss   00000004 rtems_libio_semaphore
>02097cf8 g     O .bss   00000004 RTEMS_Malloc_Heap
>02097cfc g     O .bss   00000004 RTEMS_Malloc_Sbrk_amount
>02097d00 g     O .bss   0000000c RTEMS_Malloc_GC_list
>02097d10 g     O .bss   00000380 libc_global_reent
>02098090 g     O .bss   00000004 libc_reentrant
>02098094 g     O .bss   0000004c _Region_Information
>020980e0 g     O .bss   00000004 _RTEMS_tasks_User_initialization_tasks
>020980e4 g     O .bss   0000004c _Timer_Information
>02098130 g     O .bss   0000004c _Dual_ported_memory_Information
>0209817c g     O .bss   00000028 _RTEMS_Objects
>020981a4 g     O .bss   0000004c _Semaphore_Information
>020981f0 g     O .bss   0000004c _RTEMS_tasks_Information
>0209823c g     O .bss   00000004 _Timer_Server
>02098240 g     O .bss   0000004c _Message_queue_Information
>0209828c g     O .bss   00000004 _RTEMS_tasks_Number_of_initialization_tasks
>02098290 g     O .bss   0000004c _Partition_Information
>020982dc g     O .bss   00000004 _Event_Sync_state
>020982e0 g     O .bss   0000004c _Rate_monotonic_Information
>0209832c g     O .bss   00000004 rtems_termios_ttyMutex
>02098330 g     O .bss   00000004 rtems_termios_ttyTail
>02098334 g     O .bss   00000004 rtems_termios_ttyHead
>02098338 g     O .bss   00000040 rtems_global_user_env
>02098378 g     O .bss   0000000c rtems_filesystem_mount_table_control
>02098384 g       .bss   00000000 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20070615/7dd87b59/attachment-0001.html>


More information about the users mailing list