Changeset d138a790 in rtems


Ignore:
Timestamp:
Feb 24, 2021, 12:12:27 PM (8 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d8bfa5a
Parents:
32b0d6f8
git-author:
Sebastian Huber <sebastian.huber@…> (02/24/21 12:12:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/24/21 12:32:35)
Message:

config: Adjust stack allocator initialization

Use the right system initialization step for the stack allocator
initialization. Do the stack allocator initialization before the
workspace initialization so that _Memory_Allocate() can be used to get
memory for the allocator.

Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/confdefs/wkspace.h

    r32b0d6f8 rd138a790  
    168168    RTEMS_SYSINIT_ITEM(
    169169      _Stack_Allocator_do_initialize,
    170       RTEMS_SYSINIT_DIRTY_MEMORY,
     170      RTEMS_SYSINIT_STACK_ALLOCATOR,
    171171      RTEMS_SYSINIT_ORDER_MIDDLE
    172172    );
  • cpukit/include/rtems/sysinit.h

    r32b0d6f8 rd138a790  
    3535#define RTEMS_SYSINIT_PER_CPU_DATA               000220
    3636#define RTEMS_SYSINIT_SBRK                       000240
     37#define RTEMS_SYSINIT_STACK_ALLOCATOR            000250
    3738#define RTEMS_SYSINIT_WORKSPACE                  000260
    3839#define RTEMS_SYSINIT_MALLOC                     000280
     
    4243#define RTEMS_SYSINIT_MP_EARLY                   000600
    4344#define RTEMS_SYSINIT_DATA_STRUCTURES            000700
    44 #define RTEMS_SYSINIT_STACK_ALLOCATOR            000780
    4545#define RTEMS_SYSINIT_MP                         000800
    4646#define RTEMS_SYSINIT_USER_EXTENSIONS            000900
  • cpukit/sapi/src/sysinitverbose.c

    r32b0d6f8 rd138a790  
    6262SYSINIT_VERBOSE( PER_CPU_DATA );
    6363SYSINIT_VERBOSE( SBRK );
     64SYSINIT_VERBOSE( STACK_ALLOCATOR );
    6465SYSINIT_VERBOSE( WORKSPACE );
    6566SYSINIT_VERBOSE( MALLOC );
     
    234235}
    235236
     237static void _Sysinit_Verbose_STACK_ALLOCATOR( void )
     238{
     239  if ( !SYSINIT_IS_ADJACENT( SBRK, STACK_ALLOCATOR ) ) {
     240    _Sysinit_Print_free_memory();
     241    printk( "sysinit: STACK_ALLOCATOR: done\n" );
     242  }
     243}
     244
    236245static void _Sysinit_Verbose_WORKSPACE( void )
    237246{
    238   if ( !SYSINIT_IS_ADJACENT( SBRK, WORKSPACE ) ) {
     247  if ( !SYSINIT_IS_ADJACENT( STACK_ALLOCATOR, WORKSPACE ) ) {
    239248    _Sysinit_Print_free_memory();
    240249    printk( "sysinit: WORKSPACE: done\n" );
Note: See TracChangeset for help on using the changeset viewer.