Changeset 7d1acc03 in rtems


Ignore:
Timestamp:
Sep 24, 2018, 7:15:10 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c56721c
Parents:
4221d93
git-author:
Sebastian Huber <sebastian.huber@…> (09/24/18 07:15:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/24/18 07:16:31)
Message:

stackchk: Fix interrupt stack preparation

We have to prepare the interrupt stack of each processor.

Update #3459.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/stackchk/check.c

    r4221d93 r7d1acc03  
    496496}
    497497
    498 static void Stack_check_Prepare_interrupt_stack( void )
    499 {
    500   uint32_t      cpu_self_index;
     498static void Stack_check_Prepare_interrupt_stacks( void )
     499{
    501500  Stack_Control stack;
    502 
    503   cpu_self_index = _SMP_Get_current_processor();
     501  uint32_t      cpu_index;
     502  uint32_t      cpu_max;
     503
    504504  stack.size = rtems_configuration_get_interrupt_stack_size();
    505   stack.area = _Addresses_Add_offset(
    506     _Configuration_Interrupt_stack_area_begin,
    507     cpu_self_index * stack.size
    508   );
    509   Stack_check_Add_sanity_pattern( &stack );
     505  stack.area = _Configuration_Interrupt_stack_area_begin;
     506  cpu_max = rtems_configuration_get_maximum_processors();
     507
     508  for ( cpu_index = 0; cpu_index < cpu_max; ++cpu_index ) {
     509    Stack_check_Add_sanity_pattern( &stack );
     510    stack.area = _Addresses_Add_offset( stack.area, stack.size );
     511  }
    510512}
    511513
    512514RTEMS_SYSINIT_ITEM(
    513   Stack_check_Prepare_interrupt_stack,
     515  Stack_check_Prepare_interrupt_stacks,
    514516  RTEMS_SYSINIT_BSP_WORK_AREAS,
    515517  RTEMS_SYSINIT_ORDER_SECOND
Note: See TracChangeset for help on using the changeset viewer.