=============================================================================== 00000454 <_Barrier_Manager_initialization>: #include #include void _Barrier_Manager_initialization(void) { } 454: e12fff1e bx lr =============================================================================== 0000b980 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; b980: e59f3138 ldr r3, [pc, #312] ; bac0 <_CORE_mutex_Seize_interrupt_trylock+0x140> b984: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; b988: e3a02000 mov r2, #0 b98c: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { b990: e590c050 ldr ip, [r0, #80] ; 0x50 b994: e15c0002 cmp ip, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { b998: e92d4070 push {r4, r5, r6, lr} b99c: 0a00000e beq b9dc <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; b9a0: e5802050 str r2, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; b9a4: e590c048 ldr ip, [r0, #72] ; 0x48 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; b9a8: e5935008 ldr r5, [r3, #8] the_mutex->nest_count = 1; b9ac: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || b9b0: e35c0002 cmp ip, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; b9b4: e5805060 str r5, [r0, #96] ; 0x60 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; b9b8: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; b9bc: e5804054 str r4, [r0, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || b9c0: 0a00000a beq b9f0 <_CORE_mutex_Seize_interrupt_trylock+0x70> b9c4: e35c0003 cmp ip, #3 b9c8: 0a000019 beq ba34 <_CORE_mutex_Seize_interrupt_trylock+0xb4> b9cc: e5913000 ldr r3, [r1] b9d0: e129f003 msr CPSR_fc, r3 b9d4: e3a00000 mov r0, #0 b9d8: e8bd8070 pop {r4, r5, r6, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { b9dc: e590205c ldr r2, [r0, #92] ; 0x5c b9e0: e1530002 cmp r3, r2 b9e4: 0a000008 beq ba0c <_CORE_mutex_Seize_interrupt_trylock+0x8c> b9e8: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } b9ec: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; b9f0: e593201c ldr r2, [r3, #28] b9f4: e2822001 add r2, r2, #1 b9f8: e583201c str r2, [r3, #28] b9fc: e5913000 ldr r3, [r1] ba00: e129f003 msr CPSR_fc, r3 ba04: e3a00000 mov r0, #0 ba08: e8bd8070 pop {r4, r5, r6, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ba0c: e5902040 ldr r2, [r0, #64] ; 0x40 ba10: e3520000 cmp r2, #0 ba14: 1a000017 bne ba78 <_CORE_mutex_Seize_interrupt_trylock+0xf8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ba18: e5903054 ldr r3, [r0, #84] ; 0x54 ba1c: e2833001 add r3, r3, #1 ba20: e5803054 str r3, [r0, #84] ; 0x54 ba24: e5913000 ldr r3, [r1] ba28: e129f003 msr CPSR_fc, r3 ba2c: e3a00000 mov r0, #0 ba30: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ba34: e593c01c ldr ip, [r3, #28] ba38: e08c5004 add r5, ip, r4 ba3c: e583501c str r5, [r3, #28] { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; ba40: e5935014 ldr r5, [r3, #20] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ba44: e590604c ldr r6, [r0, #76] ; 0x4c current = executing->current_priority; if ( current == ceiling ) { ba48: e1560005 cmp r6, r5 ba4c: 0affffde beq b9cc <_CORE_mutex_Seize_interrupt_trylock+0x4c> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { ba50: 3a00000d bcc ba8c <_CORE_mutex_Seize_interrupt_trylock+0x10c> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ba54: e3a05006 mov r5, #6 ba58: e5835034 str r5, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ ba5c: e5802054 str r2, [r0, #84] ; 0x54 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; ba60: e5804050 str r4, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ ba64: e583c01c str ip, [r3, #28] ba68: e5913000 ldr r3, [r1] ba6c: e129f003 msr CPSR_fc, r3 ba70: e3a00000 mov r0, #0 ba74: e8bd8070 pop {r4, r5, r6, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ba78: e3520001 cmp r2, #1 ba7c: 1affffd9 bne b9e8 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ba80: e3a02002 mov r2, #2 <== NOT EXECUTED ba84: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED ba88: eaffffcf b b9cc <_CORE_mutex_Seize_interrupt_trylock+0x4c> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ba8c: e59f3030 ldr r3, [pc, #48] ; bac4 <_CORE_mutex_Seize_interrupt_trylock+0x144> ba90: e5932000 ldr r2, [r3] ba94: e2822001 add r2, r2, #1 ba98: e5832000 str r2, [r3] ba9c: e5913000 ldr r3, [r1] baa0: e129f003 msr CPSR_fc, r3 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( baa4: e3a02000 mov r2, #0 baa8: e590104c ldr r1, [r0, #76] ; 0x4c baac: e590005c ldr r0, [r0, #92] ; 0x5c bab0: ebffedfb bl 72a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); bab4: ebffef65 bl 7850 <_Thread_Enable_dispatch> bab8: e3a00000 mov r0, #0 babc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00000458 <_Dual_ported_memory_Manager_initialization>: #include #include void _Dual_ported_memory_Manager_initialization(void) { } 458: e12fff1e bx lr =============================================================================== 0000045c <_Event_Manager_initialization>: #include #include void _Event_Manager_initialization(void) { } 45c: e12fff1e bx lr =============================================================================== 00000478 <_Extension_Manager_initialization>: #include #include void _Extension_Manager_initialization(void) { } 478: e12fff1e bx lr =============================================================================== 0000bb3c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} bb40: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; bb44: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb48: e24dd01c sub sp, sp, #28 bb4c: e1a05001 mov r5, r1 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { bb50: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb54: e1a07000 mov r7, r0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { bb58: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb5c: e1a0b003 mov fp, r3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; bb60: e590a008 ldr sl, [r0, #8] Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; bb64: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { bb68: 2a000076 bcs bd48 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { bb6c: e3530000 cmp r3, #0 bb70: 1a000072 bne bd40 <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bb74: e157000a cmp r7, sl bb78: 03a06000 moveq r6, #0 bb7c: 0a000074 beq bd54 <_Heap_Allocate_aligned_with_boundary+0x218> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bb80: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bb84: e2651004 rsb r1, r5, #4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bb88: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bb8c: e3a06000 mov r6, #0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bb90: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bb94: e58d1014 str r1, [sp, #20] bb98: ea000004 b bbb0 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { bb9c: e3540000 cmp r4, #0 bba0: 1a000059 bne bd0c <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next; bba4: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bba8: e157000a cmp r7, sl bbac: 0a000068 beq bd54 <_Heap_Allocate_aligned_with_boundary+0x218> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { bbb0: e59a9004 ldr r9, [sl, #4] bbb4: e59d2000 ldr r2, [sp] bbb8: e1520009 cmp r2, r9 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; bbbc: e2866001 add r6, r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { bbc0: 2afffff7 bcs bba4 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { bbc4: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; bbc8: 028a4008 addeq r4, sl, #8 bbcc: 0afffff2 beq bb9c <_Heap_Allocate_aligned_with_boundary+0x60> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bbd0: e59d1014 ldr r1, [sp, #20] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; bbd4: e3c99001 bic r9, r9, #1 bbd8: e08a9009 add r9, sl, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; bbdc: e5973014 ldr r3, [r7, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bbe0: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bbe4: e0814009 add r4, r1, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; bbe8: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bbec: e1a00004 mov r0, r4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bbf0: e0633002 rsb r3, r3, r2 bbf4: e1a01008 mov r1, r8 bbf8: e0839009 add r9, r3, r9 bbfc: eb002f7d bl 179f8 <__umodsi3> bc00: e0604004 rsb r4, r0, r4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; bc04: e28a3008 add r3, sl, #8 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { bc08: e1590004 cmp r9, r4 bc0c: e58d3008 str r3, [sp, #8] bc10: 2a000003 bcs bc24 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bc14: e1a00009 mov r0, r9 bc18: e1a01008 mov r1, r8 bc1c: eb002f75 bl 179f8 <__umodsi3> bc20: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { bc24: e35b0000 cmp fp, #0 bc28: 0a000025 beq bcc4 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; bc2c: e0849005 add r9, r4, r5 bc30: e1a00009 mov r0, r9 bc34: e1a0100b mov r1, fp bc38: eb002f6e bl 179f8 <__umodsi3> bc3c: e0600009 rsb r0, r0, r9 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { bc40: e1590000 cmp r9, r0 bc44: 93a03000 movls r3, #0 bc48: 83a03001 movhi r3, #1 bc4c: e1540000 cmp r4, r0 bc50: 23a03000 movcs r3, #0 bc54: e3530000 cmp r3, #0 bc58: 0a000019 beq bcc4 <_Heap_Allocate_aligned_with_boundary+0x188> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; bc5c: e59d1008 ldr r1, [sp, #8] bc60: e0819005 add r9, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { bc64: e1590000 cmp r9, r0 bc68: 958d6018 strls r6, [sp, #24] bc6c: 9a000002 bls bc7c <_Heap_Allocate_aligned_with_boundary+0x140> bc70: eaffffcb b bba4 <_Heap_Allocate_aligned_with_boundary+0x68> bc74: e1590000 cmp r9, r0 bc78: 8a000037 bhi bd5c <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; bc7c: e0654000 rsb r4, r5, r0 bc80: e1a01008 mov r1, r8 bc84: e1a00004 mov r0, r4 bc88: eb002f5a bl 179f8 <__umodsi3> bc8c: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; bc90: e0846005 add r6, r4, r5 bc94: e1a00006 mov r0, r6 bc98: e1a0100b mov r1, fp bc9c: eb002f55 bl 179f8 <__umodsi3> bca0: e0600006 rsb r0, r0, r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { bca4: e1560000 cmp r6, r0 bca8: 93a03000 movls r3, #0 bcac: 83a03001 movhi r3, #1 bcb0: e1540000 cmp r4, r0 bcb4: 23a03000 movcs r3, #0 bcb8: e3530000 cmp r3, #0 bcbc: 1affffec bne bc74 <_Heap_Allocate_aligned_with_boundary+0x138> bcc0: e59d6018 ldr r6, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { bcc4: e59d2008 ldr r2, [sp, #8] bcc8: e1520004 cmp r2, r4 bccc: 8affffb4 bhi bba4 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; bcd0: e59d100c ldr r1, [sp, #12] bcd4: e1a00004 mov r0, r4 bcd8: eb002f46 bl 179f8 <__umodsi3> bcdc: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 bce0: e28998ff add r9, r9, #16711680 ; 0xff0000 bce4: e2899cff add r9, r9, #65280 ; 0xff00 bce8: e28990f8 add r9, r9, #248 ; 0xf8 bcec: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { bcf0: e59d1004 ldr r1, [sp, #4] bcf4: e0603009 rsb r3, r0, r9 bcf8: e1590000 cmp r9, r0 bcfc: 11510003 cmpne r1, r3 bd00: 8affffa7 bhi bba4 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { bd04: e3540000 cmp r4, #0 bd08: 0affffa5 beq bba4 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; bd0c: e597304c ldr r3, [r7, #76] ; 0x4c bd10: e0833006 add r3, r3, r6 bd14: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); bd18: e1a0100a mov r1, sl bd1c: e1a03005 mov r3, r5 bd20: e1a00007 mov r0, r7 bd24: e1a02004 mov r2, r4 bd28: ebffead7 bl 688c <_Heap_Block_allocate> bd2c: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; bd30: e5973044 ldr r3, [r7, #68] ; 0x44 bd34: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; bd38: 35876044 strcc r6, [r7, #68] ; 0x44 bd3c: ea000002 b bd4c <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { bd40: e1550003 cmp r5, r3 bd44: 9a000006 bls bd64 <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; bd48: e3a00000 mov r0, #0 } return (void *) alloc_begin; } bd4c: e28dd01c add sp, sp, #28 bd50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bd54: e3a00000 mov r0, #0 bd58: eafffff4 b bd30 <_Heap_Allocate_aligned_with_boundary+0x1f4> bd5c: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED bd60: eaffff8f b bba4 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { bd64: e3580000 cmp r8, #0 bd68: 01a08002 moveq r8, r2 bd6c: eaffff80 b bb74 <_Heap_Allocate_aligned_with_boundary+0x38> =============================================================================== 0000763c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 763c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 7640: e59f35dc ldr r3, [pc, #1500] ; 7c24 <_Heap_Walk+0x5e8> uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 7644: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 7648: e5933000 ldr r3, [r3] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 764c: e59f25d4 ldr r2, [pc, #1492] ; 7c28 <_Heap_Walk+0x5ec> 7650: e59fa5d4 ldr sl, [pc, #1492] ; 7c2c <_Heap_Walk+0x5f0> 7654: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 7658: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 765c: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 7660: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7664: e24dd03c sub sp, sp, #60 ; 0x3c 7668: e1a04000 mov r4, r0 766c: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 7670: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 7674: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 7678: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 767c: e5905020 ldr r5, [r0, #32] Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 7680: 0a000002 beq 7690 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7684: e3a00001 mov r0, #1 block = next_block; } return true; } 7688: e28dd03c add sp, sp, #60 ; 0x3c 768c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 7690: e5900018 ldr r0, [r0, #24] 7694: e594101c ldr r1, [r4, #28] 7698: e2842008 add r2, r4, #8 769c: e892000c ldm r2, {r2, r3} 76a0: e59dc024 ldr ip, [sp, #36] ; 0x24 76a4: e98d0003 stmib sp, {r0, r1} 76a8: e58d2014 str r2, [sp, #20] 76ac: e58d3018 str r3, [sp, #24] 76b0: e59f2578 ldr r2, [pc, #1400] ; 7c30 <_Heap_Walk+0x5f4> 76b4: e58db000 str fp, [sp] 76b8: e58d500c str r5, [sp, #12] 76bc: e58dc010 str ip, [sp, #16] 76c0: e1a00008 mov r0, r8 76c4: e3a01000 mov r1, #0 76c8: e59d3020 ldr r3, [sp, #32] 76cc: e1a0e00f mov lr, pc 76d0: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 76d4: e59d2020 ldr r2, [sp, #32] 76d8: e3520000 cmp r2, #0 76dc: 0a000032 beq 77ac <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 76e0: e59d3020 ldr r3, [sp, #32] 76e4: e2139003 ands r9, r3, #3 76e8: 1a000036 bne 77c8 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 76ec: e1a0000b mov r0, fp 76f0: e59d1020 ldr r1, [sp, #32] 76f4: ebffe547 bl c18 <__umodsi3> 76f8: e2506000 subs r6, r0, #0 76fc: 1a000038 bne 77e4 <_Heap_Walk+0x1a8> ); return false; } if ( 7700: e2850008 add r0, r5, #8 7704: e59d1020 ldr r1, [sp, #32] 7708: ebffe542 bl c18 <__umodsi3> 770c: e2509000 subs r9, r0, #0 7710: 1a00003b bne 7804 <_Heap_Walk+0x1c8> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7714: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 7718: e2176001 ands r6, r7, #1 771c: 0a000040 beq 7824 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 7720: e5953000 ldr r3, [r5] 7724: e59dc020 ldr ip, [sp, #32] 7728: e15c0003 cmp ip, r3 772c: 1a000016 bne 778c <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 7730: e59d2024 ldr r2, [sp, #36] ; 0x24 7734: e5923004 ldr r3, [r2, #4] 7738: e3c33001 bic r3, r3, #1 773c: e0823003 add r3, r2, r3 7740: e5939004 ldr r9, [r3, #4] 7744: e2199001 ands r9, r9, #1 7748: 0a000114 beq 7ba0 <_Heap_Walk+0x564> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 774c: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7750: e5943010 ldr r3, [r4, #16] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7754: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7758: e58d3028 str r3, [sp, #40] ; 0x28 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 775c: 0a00006e beq 791c <_Heap_Walk+0x2e0> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7760: e5942020 ldr r2, [r4, #32] RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7764: e1520009 cmp r2, r9 7768: 9a000034 bls 7840 <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 776c: e1a00008 mov r0, r8 7770: e1a03009 mov r3, r9 7774: e3a01001 mov r1, #1 7778: e59f24b4 ldr r2, [pc, #1204] ; 7c34 <_Heap_Walk+0x5f8> 777c: e1a0e00f mov lr, pc 7780: e12fff1a bx sl 7784: e3a00000 mov r0, #0 7788: eaffffbe b 7688 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 778c: e1a00008 mov r0, r8 7790: e58dc000 str ip, [sp] 7794: e3a01001 mov r1, #1 7798: e59f2498 ldr r2, [pc, #1176] ; 7c38 <_Heap_Walk+0x5fc> 779c: e1a0e00f mov lr, pc 77a0: e12fff1a bx sl 77a4: e1a00009 mov r0, r9 77a8: eaffffb6 b 7688 <_Heap_Walk+0x4c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 77ac: e1a00008 mov r0, r8 77b0: e3a01001 mov r1, #1 77b4: e59f2480 ldr r2, [pc, #1152] ; 7c3c <_Heap_Walk+0x600> 77b8: e1a0e00f mov lr, pc 77bc: e12fff1a bx sl 77c0: e59d0020 ldr r0, [sp, #32] 77c4: eaffffaf b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 77c8: e1a00008 mov r0, r8 77cc: e3a01001 mov r1, #1 77d0: e59f2468 ldr r2, [pc, #1128] ; 7c40 <_Heap_Walk+0x604> 77d4: e1a0e00f mov lr, pc 77d8: e12fff1a bx sl 77dc: e3a00000 mov r0, #0 77e0: eaffffa8 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 77e4: e1a00008 mov r0, r8 77e8: e1a0300b mov r3, fp 77ec: e3a01001 mov r1, #1 77f0: e59f244c ldr r2, [pc, #1100] ; 7c44 <_Heap_Walk+0x608> 77f4: e1a0e00f mov lr, pc 77f8: e12fff1a bx sl 77fc: e1a00009 mov r0, r9 7800: eaffffa0 b 7688 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 7804: e1a00008 mov r0, r8 7808: e1a03005 mov r3, r5 780c: e3a01001 mov r1, #1 7810: e59f2430 ldr r2, [pc, #1072] ; 7c48 <_Heap_Walk+0x60c> 7814: e1a0e00f mov lr, pc 7818: e12fff1a bx sl 781c: e1a00006 mov r0, r6 7820: eaffff98 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7824: e1a00008 mov r0, r8 7828: e3a01001 mov r1, #1 782c: e59f2418 ldr r2, [pc, #1048] ; 7c4c <_Heap_Walk+0x610> 7830: e1a0e00f mov lr, pc 7834: e12fff1a bx sl 7838: e1a00006 mov r0, r6 783c: eaffff91 b 7688 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 7840: e594c024 ldr ip, [r4, #36] ; 0x24 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7844: e159000c cmp r9, ip && (uintptr_t) block <= (uintptr_t) heap->last_block; 7848: e58dc02c str ip, [sp, #44] ; 0x2c RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 784c: 8affffc6 bhi 776c <_Heap_Walk+0x130> ); return false; } if ( 7850: e2890008 add r0, r9, #8 7854: e1a01003 mov r1, r3 7858: e58d201c str r2, [sp, #28] 785c: ebffe4ed bl c18 <__umodsi3> 7860: e3500000 cmp r0, #0 7864: e59d201c ldr r2, [sp, #28] 7868: 1a0000d3 bne 7bbc <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 786c: e5993004 ldr r3, [r9, #4] 7870: e3c33001 bic r3, r3, #1 7874: e0893003 add r3, r9, r3 7878: e5933004 ldr r3, [r3, #4] 787c: e3130001 tst r3, #1 7880: 1a0000df bne 7c04 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 7884: e599c00c ldr ip, [r9, #12] 7888: e15c0004 cmp ip, r4 788c: 1a0000d3 bne 7be0 <_Heap_Walk+0x5a4> 7890: e58d7030 str r7, [sp, #48] ; 0x30 7894: e58db034 str fp, [sp, #52] ; 0x34 7898: e59d702c ldr r7, [sp, #44] ; 0x2c 789c: e59db028 ldr fp, [sp, #40] ; 0x28 78a0: e58d502c str r5, [sp, #44] ; 0x2c 78a4: e58d6038 str r6, [sp, #56] ; 0x38 78a8: e1a0500c mov r5, ip 78ac: e58d4028 str r4, [sp, #40] ; 0x28 78b0: e1a06002 mov r6, r2 78b4: ea000011 b 7900 <_Heap_Walk+0x2c4> 78b8: e1560009 cmp r6, r9 78bc: 8affffaa bhi 776c <_Heap_Walk+0x130> 78c0: e1590007 cmp r9, r7 ); return false; } if ( 78c4: e2890008 add r0, r9, #8 78c8: e1a0100b mov r1, fp 78cc: 8affffa6 bhi 776c <_Heap_Walk+0x130> 78d0: ebffe4d0 bl c18 <__umodsi3> 78d4: e3500000 cmp r0, #0 78d8: 1a0000b7 bne 7bbc <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 78dc: e5993004 ldr r3, [r9, #4] 78e0: e3c33001 bic r3, r3, #1 78e4: e0833009 add r3, r3, r9 78e8: e5933004 ldr r3, [r3, #4] 78ec: e3130001 tst r3, #1 78f0: 1a0000c3 bne 7c04 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 78f4: e599200c ldr r2, [r9, #12] 78f8: e1540002 cmp r4, r2 78fc: 1a0000b6 bne 7bdc <_Heap_Walk+0x5a0> (*printer)( 7900: e1a04009 mov r4, r9 return false; } prev_block = free_block; free_block = free_block->next; 7904: e5999008 ldr r9, [r9, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7908: e1550009 cmp r5, r9 790c: 1affffe9 bne 78b8 <_Heap_Walk+0x27c> 7910: e28d4028 add r4, sp, #40 ; 0x28 7914: e89408b0 ldm r4, {r4, r5, r7, fp} 7918: e59d6038 ldr r6, [sp, #56] ; 0x38 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 791c: e59d3024 ldr r3, [sp, #36] ; 0x24 7920: e1530005 cmp r3, r5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7924: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7928: 0affff55 beq 7684 <_Heap_Walk+0x48> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 792c: e3c77001 bic r7, r7, #1 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 7930: e21610ff ands r1, r6, #255 ; 0xff RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7934: e0876005 add r6, r7, r5 7938: 0a000012 beq 7988 <_Heap_Walk+0x34c> (*printer)( 793c: e1a03005 mov r3, r5 7940: e58d7000 str r7, [sp] 7944: e1a00008 mov r0, r8 7948: e3a01000 mov r1, #0 794c: e59f22fc ldr r2, [pc, #764] ; 7c50 <_Heap_Walk+0x614> 7950: e1a0e00f mov lr, pc 7954: e12fff1a bx sl RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7958: e5943020 ldr r3, [r4, #32] 795c: e1530006 cmp r3, r6 7960: 9a000013 bls 79b4 <_Heap_Walk+0x378> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 7964: e1a00008 mov r0, r8 7968: e58d6000 str r6, [sp] 796c: e1a03005 mov r3, r5 7970: e3a01001 mov r1, #1 7974: e59f22d8 ldr r2, [pc, #728] ; 7c54 <_Heap_Walk+0x618> 7978: e1a0e00f mov lr, pc 797c: e12fff1a bx sl 7980: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 7984: eaffff3f b 7688 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7988: e58d7000 str r7, [sp] 798c: e5953000 ldr r3, [r5] 7990: e1a00008 mov r0, r8 7994: e58d3004 str r3, [sp, #4] 7998: e59f22b8 ldr r2, [pc, #696] ; 7c58 <_Heap_Walk+0x61c> 799c: e1a03005 mov r3, r5 79a0: e1a0e00f mov lr, pc 79a4: e12fff1a bx sl 79a8: e5943020 ldr r3, [r4, #32] 79ac: e1530006 cmp r3, r6 79b0: 8affffeb bhi 7964 <_Heap_Walk+0x328> 79b4: e5943024 ldr r3, [r4, #36] ; 0x24 79b8: e1530006 cmp r3, r6 79bc: 3affffe8 bcc 7964 <_Heap_Walk+0x328> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 79c0: e1a00007 mov r0, r7 79c4: e59d1020 ldr r1, [sp, #32] 79c8: ebffe492 bl c18 <__umodsi3> 79cc: e2509000 subs r9, r0, #0 79d0: 1a000055 bne 7b2c <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 79d4: e59d2028 ldr r2, [sp, #40] ; 0x28 79d8: e1520007 cmp r2, r7 79dc: 8a00005b bhi 7b50 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin ) { 79e0: e1550006 cmp r5, r6 79e4: 2a000064 bcs 7b7c <_Heap_Walk+0x540> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 79e8: e5963004 ldr r3, [r6, #4] 79ec: e3130001 tst r3, #1 79f0: 1a000036 bne 7ad0 <_Heap_Walk+0x494> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 79f4: e595b004 ldr fp, [r5, #4] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 79f8: e595200c ldr r2, [r5, #12] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 79fc: e5943008 ldr r3, [r4, #8] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7a00: e3cb7001 bic r7, fp, #1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7a04: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 7a08: e594100c ldr r1, [r4, #12] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7a0c: e0859007 add r9, r5, r7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7a10: 059f0244 ldreq r0, [pc, #580] ; 7c5c <_Heap_Walk+0x620> 7a14: 0a000003 beq 7a28 <_Heap_Walk+0x3ec> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7a18: e59f3240 ldr r3, [pc, #576] ; 7c60 <_Heap_Walk+0x624> 7a1c: e1520004 cmp r2, r4 7a20: e59f023c ldr r0, [pc, #572] ; 7c64 <_Heap_Walk+0x628> 7a24: 11a00003 movne r0, r3 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7a28: e5953008 ldr r3, [r5, #8] 7a2c: e1510003 cmp r1, r3 7a30: 059f1230 ldreq r1, [pc, #560] ; 7c68 <_Heap_Walk+0x62c> 7a34: 0a000003 beq 7a48 <_Heap_Walk+0x40c> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 7a38: e59fc220 ldr ip, [pc, #544] ; 7c60 <_Heap_Walk+0x624> 7a3c: e1530004 cmp r3, r4 7a40: e59f1224 ldr r1, [pc, #548] ; 7c6c <_Heap_Walk+0x630> 7a44: 11a0100c movne r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7a48: e58d2000 str r2, [sp] 7a4c: e98d0009 stmib sp, {r0, r3} 7a50: e58d100c str r1, [sp, #12] 7a54: e1a03005 mov r3, r5 7a58: e1a00008 mov r0, r8 7a5c: e3a01000 mov r1, #0 7a60: e59f2208 ldr r2, [pc, #520] ; 7c70 <_Heap_Walk+0x634> 7a64: e1a0e00f mov lr, pc 7a68: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7a6c: e5993000 ldr r3, [r9] 7a70: e1570003 cmp r7, r3 7a74: 0a00000a beq 7aa4 <_Heap_Walk+0x468> (*printer)( 7a78: e58d3004 str r3, [sp, #4] 7a7c: e1a00008 mov r0, r8 7a80: e58d7000 str r7, [sp] 7a84: e58d9008 str r9, [sp, #8] 7a88: e1a03005 mov r3, r5 7a8c: e3a01001 mov r1, #1 7a90: e59f21dc ldr r2, [pc, #476] ; 7c74 <_Heap_Walk+0x638> 7a94: e1a0e00f mov lr, pc 7a98: e12fff1a bx sl 7a9c: e3a00000 mov r0, #0 7aa0: eafffef8 b 7688 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 7aa4: e21b9001 ands r9, fp, #1 7aa8: 0a000017 beq 7b0c <_Heap_Walk+0x4d0> 7aac: e5943008 ldr r3, [r4, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 7ab0: e1530004 cmp r3, r4 7ab4: 1a000003 bne 7ac8 <_Heap_Walk+0x48c> 7ab8: ea00000b b 7aec <_Heap_Walk+0x4b0> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 7abc: e5933008 ldr r3, [r3, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 7ac0: e1530004 cmp r3, r4 7ac4: 0a000008 beq 7aec <_Heap_Walk+0x4b0> if ( free_block == block ) { 7ac8: e1530005 cmp r3, r5 7acc: 1afffffa bne 7abc <_Heap_Walk+0x480> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7ad0: e59d2024 ldr r2, [sp, #36] ; 0x24 7ad4: e1520006 cmp r2, r6 7ad8: 0afffee9 beq 7684 <_Heap_Walk+0x48> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7adc: e5967004 ldr r7, [r6, #4] 7ae0: e1a05006 mov r5, r6 7ae4: e2076001 and r6, r7, #1 7ae8: eaffff8f b 792c <_Heap_Walk+0x2f0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7aec: e1a00008 mov r0, r8 7af0: e1a03005 mov r3, r5 7af4: e3a01001 mov r1, #1 7af8: e59f2178 ldr r2, [pc, #376] ; 7c78 <_Heap_Walk+0x63c> 7afc: e1a0e00f mov lr, pc 7b00: e12fff1a bx sl 7b04: e3a00000 mov r0, #0 7b08: eafffede b 7688 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 7b0c: e1a00008 mov r0, r8 7b10: e1a03005 mov r3, r5 7b14: e3a01001 mov r1, #1 7b18: e59f215c ldr r2, [pc, #348] ; 7c7c <_Heap_Walk+0x640> 7b1c: e1a0e00f mov lr, pc 7b20: e12fff1a bx sl 7b24: e1a00009 mov r0, r9 7b28: eafffed6 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 7b2c: e1a00008 mov r0, r8 7b30: e58d7000 str r7, [sp] 7b34: e1a03005 mov r3, r5 7b38: e3a01001 mov r1, #1 7b3c: e59f213c ldr r2, [pc, #316] ; 7c80 <_Heap_Walk+0x644> 7b40: e1a0e00f mov lr, pc 7b44: e12fff1a bx sl 7b48: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7b4c: eafffecd b 7688 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 7b50: e58d2004 str r2, [sp, #4] 7b54: e1a00008 mov r0, r8 7b58: e1a0b002 mov fp, r2 7b5c: e58d7000 str r7, [sp] 7b60: e1a03005 mov r3, r5 7b64: e3a01001 mov r1, #1 7b68: e59f2114 ldr r2, [pc, #276] ; 7c84 <_Heap_Walk+0x648> 7b6c: e1a0e00f mov lr, pc 7b70: e12fff1a bx sl 7b74: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 7b78: eafffec2 b 7688 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 7b7c: e1a00008 mov r0, r8 7b80: e58d6000 str r6, [sp] 7b84: e1a03005 mov r3, r5 7b88: e3a01001 mov r1, #1 7b8c: e59f20f4 ldr r2, [pc, #244] ; 7c88 <_Heap_Walk+0x64c> 7b90: e1a0e00f mov lr, pc 7b94: e12fff1a bx sl 7b98: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7b9c: eafffeb9 b 7688 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 7ba0: e1a00008 mov r0, r8 7ba4: e3a01001 mov r1, #1 7ba8: e59f20dc ldr r2, [pc, #220] ; 7c8c <_Heap_Walk+0x650> 7bac: e1a0e00f mov lr, pc 7bb0: e12fff1a bx sl 7bb4: e1a00009 mov r0, r9 7bb8: eafffeb2 b 7688 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 7bbc: e1a00008 mov r0, r8 7bc0: e1a03009 mov r3, r9 7bc4: e3a01001 mov r1, #1 7bc8: e59f20c0 ldr r2, [pc, #192] ; 7c90 <_Heap_Walk+0x654> 7bcc: e1a0e00f mov lr, pc 7bd0: e12fff1a bx sl 7bd4: e3a00000 mov r0, #0 7bd8: eafffeaa b 7688 <_Heap_Walk+0x4c> ); return false; } if ( free_block->prev != prev_block ) { 7bdc: e1a0c002 mov ip, r2 (*printer)( 7be0: e1a00008 mov r0, r8 7be4: e58dc000 str ip, [sp] 7be8: e1a03009 mov r3, r9 7bec: e3a01001 mov r1, #1 7bf0: e59f209c ldr r2, [pc, #156] ; 7c94 <_Heap_Walk+0x658> 7bf4: e1a0e00f mov lr, pc 7bf8: e12fff1a bx sl 7bfc: e3a00000 mov r0, #0 7c00: eafffea0 b 7688 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 7c04: e1a00008 mov r0, r8 7c08: e1a03009 mov r3, r9 7c0c: e3a01001 mov r1, #1 7c10: e59f2080 ldr r2, [pc, #128] ; 7c98 <_Heap_Walk+0x65c> 7c14: e1a0e00f mov lr, pc 7c18: e12fff1a bx sl 7c1c: e3a00000 mov r0, #0 7c20: eafffe98 b 7688 <_Heap_Walk+0x4c> =============================================================================== 00000460 <_Message_queue_Manager_initialization>: #include #include void _Message_queue_Manager_initialization(void) { } 460: e12fff1e bx lr =============================================================================== 00006afc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6afc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6b00: e5908034 ldr r8, [r0, #52] ; 0x34 6b04: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 6b08: e24dd014 sub sp, sp, #20 6b0c: e1a05000 mov r5, r0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 6b10: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6b14: 0a00009c beq 6d8c <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 6b18: e1d091b4 ldrh r9, [r0, #20] 6b1c: e1d0a1b0 ldrh sl, [r0, #16] 6b20: e1a01009 mov r1, r9 6b24: e1a0000a mov r0, sl 6b28: eb00436e bl 178e8 <__aeabi_uidiv> 6b2c: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6b30: e1b03823 lsrs r3, r3, #16 6b34: 01a01009 moveq r1, r9 6b38: 01a06007 moveq r6, r7 6b3c: 01a04003 moveq r4, r3 6b40: 0a00000f beq 6b84 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 6b44: e5984000 ldr r4, [r8] 6b48: e3540000 cmp r4, #0 6b4c: 11a01009 movne r1, r9 6b50: 11a06007 movne r6, r7 6b54: 13a04000 movne r4, #0 6b58: 01a01009 moveq r1, r9 6b5c: 01a06007 moveq r6, r7 6b60: 1a000003 bne 6b74 <_Objects_Extend_information+0x78> 6b64: ea000006 b 6b84 <_Objects_Extend_information+0x88> <== NOT EXECUTED 6b68: e7982104 ldr r2, [r8, r4, lsl #2] 6b6c: e3520000 cmp r2, #0 6b70: 0a000003 beq 6b84 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6b74: e2844001 add r4, r4, #1 6b78: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 6b7c: e0866009 add r6, r6, r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6b80: 8afffff8 bhi 6b68 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 6b84: e08aa001 add sl, sl, r1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 6b88: e35a0801 cmp sl, #65536 ; 0x10000 6b8c: 2a000064 bcs 6d24 <_Objects_Extend_information+0x228> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { 6b90: e5d50012 ldrb r0, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6b94: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 6b98: e3500000 cmp r0, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6b9c: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 6ba0: 1a000061 bne 6d2c <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 6ba4: e58d3000 str r3, [sp] 6ba8: eb000809 bl 8bd4 <_Workspace_Allocate_or_fatal_error> 6bac: e59d3000 ldr r3, [sp] 6bb0: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 6bb4: e1d521b0 ldrh r2, [r5, #16] 6bb8: e1560002 cmp r6, r2 6bbc: 3a000038 bcc 6ca4 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 6bc0: e283c001 add ip, r3, #1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 6bc4: e08c008c add r0, ip, ip, lsl #1 6bc8: e08a0000 add r0, sl, r0 6bcc: e0800007 add r0, r0, r7 6bd0: e1a00100 lsl r0, r0, #2 6bd4: e88d1008 stm sp, {r3, ip} 6bd8: eb000809 bl 8c04 <_Workspace_Allocate> if ( !object_blocks ) { 6bdc: e250b000 subs fp, r0, #0 6be0: e89d1008 ldm sp, {r3, ip} 6be4: 0a00006e beq 6da4 <_Objects_Extend_information+0x2a8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 6be8: e1d521b0 ldrh r2, [r5, #16] 6bec: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6bf0: e08b818c add r8, fp, ip, lsl #3 6bf4: e08bc10c add ip, fp, ip, lsl #2 6bf8: 3a000051 bcc 6d44 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6bfc: e3570000 cmp r7, #0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6c00: 13a02000 movne r2, #0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 6c04: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c08: 0a000003 beq 6c1c <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 6c0c: e7881102 str r1, [r8, r2, lsl #2] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c10: e2822001 add r2, r2, #1 6c14: e1570002 cmp r7, r2 6c18: 8afffffb bhi 6c0c <_Objects_Extend_information+0x110> 6c1c: e1a03103 lsl r3, r3, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 6c20: e1d511b4 ldrh r1, [r5, #20] 6c24: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c28: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6c2c: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 6c30: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c34: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 6c38: 2a000005 bcs 6c54 <_Objects_Extend_information+0x158> 6c3c: e0882106 add r2, r8, r6, lsl #2 6c40: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 6c44: e2833001 add r3, r3, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6c48: e1510003 cmp r1, r3 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6c4c: e4820004 str r0, [r2], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6c50: 8afffffb bhi 6c44 <_Objects_Extend_information+0x148> 6c54: e10f3000 mrs r3, CPSR 6c58: e3832080 orr r2, r3, #128 ; 0x80 6c5c: e129f002 msr CPSR_fc, r2 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6c60: e5952000 ldr r2, [r5] 6c64: e1d510b4 ldrh r1, [r5, #4] 6c68: e1a02c02 lsl r2, r2, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6c6c: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 6c70: e3822801 orr r2, r2, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6c74: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 6c78: e1822d81 orr r2, r2, r1, lsl #27 6c7c: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 6c80: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 6c84: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 6c88: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6c8c: e585200c str r2, [r5, #12] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6c90: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 6c94: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6c98: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 6c9c: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 6ca0: 1b0007dd blne 8c1c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6ca4: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6ca8: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cac: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6cb0: e1a01009 mov r1, r9 6cb4: e1a00007 mov r0, r7 6cb8: e1d521b4 ldrh r2, [r5, #20] 6cbc: e5953018 ldr r3, [r5, #24] 6cc0: eb0012e7 bl b864 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cc4: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6cc8: e2858020 add r8, r5, #32 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6ccc: ea000008 b 6cf4 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 6cd0: e5952000 ldr r2, [r5] 6cd4: e1d5c0b4 ldrh ip, [r5, #4] 6cd8: e1a02c02 lsl r2, r2, #24 6cdc: e3822801 orr r2, r2, #65536 ; 0x10000 6ce0: e1822d8c orr r2, r2, ip, lsl #27 6ce4: e1822006 orr r2, r2, r6 6ce8: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6cec: ebfffcf2 bl 60bc <_Chain_Append> index++; 6cf0: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6cf4: e1a00007 mov r0, r7 6cf8: ebfffd03 bl 610c <_Chain_Get> 6cfc: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6d00: e1a01003 mov r1, r3 6d04: e1a00008 mov r0, r8 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6d08: 1afffff0 bne 6cd0 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d0c: e1d531b4 ldrh r3, [r5, #20] information->inactive = 6d10: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d14: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 6d18: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d1c: e7813004 str r3, [r1, r4] information->inactive = 6d20: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 6d24: e28dd014 add sp, sp, #20 6d28: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 6d2c: e58d3000 str r3, [sp] 6d30: eb0007b3 bl 8c04 <_Workspace_Allocate> if ( !new_object_block ) 6d34: e2509000 subs r9, r0, #0 6d38: e59d3000 ldr r3, [sp] 6d3c: 1affff9c bne 6bb4 <_Objects_Extend_information+0xb8> 6d40: eafffff7 b 6d24 <_Objects_Extend_information+0x228> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 6d44: e1a03103 lsl r3, r3, #2 6d48: e1a02003 mov r2, r3 6d4c: e5951034 ldr r1, [r5, #52] ; 0x34 6d50: e88d1008 stm sp, {r3, ip} 6d54: eb001f67 bl eaf8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 6d58: e89d1008 ldm sp, {r3, ip} 6d5c: e1a0000c mov r0, ip 6d60: e1a02003 mov r2, r3 6d64: e5951030 ldr r1, [r5, #48] ; 0x30 6d68: eb001f62 bl eaf8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6d6c: e1d521b0 ldrh r2, [r5, #16] 6d70: e0872002 add r2, r7, r2 6d74: e1a02102 lsl r2, r2, #2 6d78: e1a00008 mov r0, r8 6d7c: e595101c ldr r1, [r5, #28] 6d80: eb001f5c bl eaf8 6d84: e89d1008 ldm sp, {r3, ip} 6d88: eaffffa4 b 6c20 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6d8c: e1a04008 mov r4, r8 6d90: e1d0a1b0 ldrh sl, [r0, #16] 6d94: e1d011b4 ldrh r1, [r0, #20] 6d98: e1a06007 mov r6, r7 6d9c: e1a03008 mov r3, r8 6da0: eaffff77 b 6b84 <_Objects_Extend_information+0x88> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 6da4: e1a00009 mov r0, r9 6da8: eb00079b bl 8c1c <_Workspace_Free> return; 6dac: eaffffdc b 6d24 <_Objects_Extend_information+0x228> =============================================================================== 00000464 <_Partition_Manager_initialization>: #include #include void _Partition_Manager_initialization(void) { } 464: e12fff1e bx lr =============================================================================== 00000474 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { } 474: e12fff1e bx lr =============================================================================== 00000468 <_Region_Manager_initialization>: #include #include void _Region_Manager_initialization(void) { } 468: e12fff1e bx lr =============================================================================== 00007dd4 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 7dd4: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 7dd8: e92d05f0 push {r4, r5, r6, r7, r8, sl} _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7ddc: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7de0: e281503c add r5, r1, #60 ; 0x3c 7de4: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7de8: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 7dec: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7df0: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7df4: e3a05000 mov r5, #0 7df8: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 7dfc: e5814040 str r4, [r1, #64] ; 0x40 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7e00: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 7e04: e5906038 ldr r6, [r0, #56] ; 0x38 7e08: 159fa178 ldrne sl, [pc, #376] ; 7f88 <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 7e0c: 1a00001c bne 7e84 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 7e10: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7e14: e10f8000 mrs r8, CPSR 7e18: e3884080 orr r4, r8, #128 ; 0x80 7e1c: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 7e20: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7e24: e154000a cmp r4, sl 7e28: 1a000009 bne 7e54 <_Thread_queue_Enqueue_priority+0x80> 7e2c: ea000052 b 7f7c <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7e30: e10f7000 mrs r7, CPSR 7e34: e129f008 msr CPSR_fc, r8 7e38: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7e3c: e5947010 ldr r7, [r4, #16] 7e40: e1160007 tst r6, r7 7e44: 0a000033 beq 7f18 <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 7e48: e5944000 ldr r4, [r4] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7e4c: e154000a cmp r4, sl 7e50: 0a000002 beq 7e60 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 7e54: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 7e58: e1530005 cmp r3, r5 7e5c: 8afffff3 bhi 7e30 <_Thread_queue_Enqueue_priority+0x5c> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7e60: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 7e64: e590c030 ldr ip, [r0, #48] ; 0x30 7e68: e35c0001 cmp ip, #1 7e6c: 0a00002b beq 7f20 <_Thread_queue_Enqueue_priority+0x14c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 7e70: e5826000 str r6, [r2] return the_thread_queue->sync_state; 7e74: e1a0000c mov r0, ip } 7e78: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 7e7c: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7e80: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 7e84: e5da5000 ldrb r5, [sl] 7e88: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7e8c: e10f8000 mrs r8, CPSR 7e90: e3884080 orr r4, r8, #128 ; 0x80 7e94: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 7e98: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7e9c: e154000c cmp r4, ip 7ea0: 1a000009 bne 7ecc <_Thread_queue_Enqueue_priority+0xf8> 7ea4: ea00000b b 7ed8 <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7ea8: e10f7000 mrs r7, CPSR 7eac: e129f008 msr CPSR_fc, r8 7eb0: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7eb4: e5947010 ldr r7, [r4, #16] 7eb8: e1160007 tst r6, r7 7ebc: 0affffef beq 7e80 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 7ec0: e5944004 ldr r4, [r4, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7ec4: e154000c cmp r4, ip 7ec8: 0a000002 beq 7ed8 <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 7ecc: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 7ed0: e1530005 cmp r3, r5 7ed4: 3afffff3 bcc 7ea8 <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7ed8: e590c030 ldr ip, [r0, #48] ; 0x30 7edc: e35c0001 cmp ip, #1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7ee0: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7ee4: 1affffe1 bne 7e70 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7ee8: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7eec: e3a03000 mov r3, #0 7ef0: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7ef4: 0a000016 beq 7f54 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7ef8: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7efc: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f00: e5810044 str r0, [r1, #68] ; 0x44 next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 7f04: e5841000 str r1, [r4] next_node->previous = the_node; 7f08: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7f0c: e129f008 msr CPSR_fc, r8 7f10: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f14: eaffffd7 b 7e78 <_Thread_queue_Enqueue_priority+0xa4> 7f18: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 7f1c: eaffffbc b 7e14 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7f20: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7f24: e3a03000 mov r3, #0 7f28: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7f2c: 0a000008 beq 7f54 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7f30: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7f34: e5814000 str r4, [r1] the_node->previous = previous_node; 7f38: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f3c: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7f40: e5831000 str r1, [r3] search_node->previous = the_node; 7f44: e5841004 str r1, [r4, #4] 7f48: e129f008 msr CPSR_fc, r8 7f4c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f50: eaffffc8 b 7e78 <_Thread_queue_Enqueue_priority+0xa4> 7f54: e284403c add r4, r4, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 7f58: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7f5c: e5814000 str r4, [r1] the_node->previous = previous_node; 7f60: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f64: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7f68: e5831000 str r1, [r3] search_node->previous = the_node; 7f6c: e5841004 str r1, [r4, #4] 7f70: e129f006 msr CPSR_fc, r6 7f74: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f78: eaffffbe b 7e78 <_Thread_queue_Enqueue_priority+0xa4> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7f7c: e1a06008 mov r6, r8 7f80: e3e05000 mvn r5, #0 7f84: eaffffb6 b 7e64 <_Thread_queue_Enqueue_priority+0x90> =============================================================================== 00000470 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { } 470: e12fff1e bx lr =============================================================================== 00016a3c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 16a3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 16a40: e24dd024 sub sp, sp, #36 ; 0x24 16a44: e28d700c add r7, sp, #12 16a48: e28d2018 add r2, sp, #24 16a4c: e1a04000 mov r4, r0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 16a50: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 16a54: e282a004 add sl, r2, #4 16a58: e2872004 add r2, r7, #4 16a5c: e58d2000 str r2, [sp] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 16a60: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 16a64: e28d0018 add r0, sp, #24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 16a68: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; 16a6c: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16a70: e2842008 add r2, r4, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16a74: e2843040 add r3, r4, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 16a78: e58da018 str sl, [sp, #24] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 16a7c: e58d0020 str r0, [sp, #32] 16a80: e58d7014 str r7, [sp, #20] 16a84: e59f91a0 ldr r9, [pc, #416] ; 16c2c <_Timer_server_Body+0x1f0> 16a88: e59fb1a0 ldr fp, [pc, #416] ; 16c30 <_Timer_server_Body+0x1f4> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16a8c: e58d2008 str r2, [sp, #8] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16a90: e58d3004 str r3, [sp, #4] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16a94: e2846030 add r6, r4, #48 ; 0x30 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16a98: e2848068 add r8, r4, #104 ; 0x68 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 16a9c: e28d0018 add r0, sp, #24 16aa0: e5840078 str r0, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 16aa4: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 16aa8: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16aac: e1a00006 mov r0, r6 16ab0: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 16ab4: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16ab8: e1a02007 mov r2, r7 16abc: eb00109c bl 1ad34 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 16ac0: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 16ac4: e5941074 ldr r1, [r4, #116] ; 0x74 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 16ac8: e1550001 cmp r5, r1 16acc: 8a000022 bhi 16b5c <_Timer_server_Body+0x120> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 16ad0: 3a000018 bcc 16b38 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 16ad4: e5845074 str r5, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 16ad8: e5940078 ldr r0, [r4, #120] ; 0x78 16adc: eb000240 bl 173e4 <_Chain_Get> if ( timer == NULL ) { 16ae0: e3500000 cmp r0, #0 16ae4: 0a00000b beq 16b18 <_Timer_server_Body+0xdc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 16ae8: e5903038 ldr r3, [r0, #56] ; 0x38 16aec: e3530001 cmp r3, #1 16af0: 0a000015 beq 16b4c <_Timer_server_Body+0x110> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 16af4: e3530003 cmp r3, #3 16af8: 1afffff6 bne 16ad8 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 16afc: e2801010 add r1, r0, #16 16b00: e1a00008 mov r0, r8 16b04: eb0010b9 bl 1adf0 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 16b08: e5940078 ldr r0, [r4, #120] ; 0x78 16b0c: eb000234 bl 173e4 <_Chain_Get> if ( timer == NULL ) { 16b10: e3500000 cmp r0, #0 16b14: 1afffff3 bne 16ae8 <_Timer_server_Body+0xac> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 16b18: e10f2000 mrs r2, CPSR 16b1c: e3823080 orr r3, r2, #128 ; 0x80 16b20: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 16b24: e59d3018 ldr r3, [sp, #24] 16b28: e15a0003 cmp sl, r3 16b2c: 0a00000f beq 16b70 <_Timer_server_Body+0x134> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 16b30: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 16b34: eaffffda b 16aa4 <_Timer_server_Body+0x68> <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 16b38: e0652001 rsb r2, r5, r1 16b3c: e1a00008 mov r0, r8 16b40: e3a01001 mov r1, #1 16b44: eb00104b bl 1ac78 <_Watchdog_Adjust> 16b48: eaffffe1 b 16ad4 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 16b4c: e2801010 add r1, r0, #16 16b50: e1a00006 mov r0, r6 16b54: eb0010a5 bl 1adf0 <_Watchdog_Insert> 16b58: eaffffde b 16ad8 <_Timer_server_Body+0x9c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16b5c: e0611005 rsb r1, r1, r5 16b60: e1a00008 mov r0, r8 16b64: e1a02007 mov r2, r7 16b68: eb001071 bl 1ad34 <_Watchdog_Adjust_to_chain> 16b6c: eaffffd8 b 16ad4 <_Timer_server_Body+0x98> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 16b70: e5840078 str r0, [r4, #120] ; 0x78 16b74: e129f002 msr CPSR_fc, r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 16b78: e59d300c ldr r3, [sp, #12] 16b7c: e59d2000 ldr r2, [sp] 16b80: e1520003 cmp r2, r3 16b84: 159d5000 ldrne r5, [sp] 16b88: 1a00000a bne 16bb8 <_Timer_server_Body+0x17c> 16b8c: ea000011 b 16bd8 <_Timer_server_Body+0x19c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 16b90: e5932000 ldr r2, [r3] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 16b94: e3a00000 mov r0, #0 the_chain->first = new_first; 16b98: e58d200c str r2, [sp, #12] 16b9c: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 16ba0: e5827004 str r7, [r2, #4] 16ba4: e129f001 msr CPSR_fc, r1 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 16ba8: e2830020 add r0, r3, #32 16bac: e8900003 ldm r0, {r0, r1} 16bb0: e1a0e00f mov lr, pc 16bb4: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 16bb8: e10f1000 mrs r1, CPSR 16bbc: e3813080 orr r3, r1, #128 ; 0x80 16bc0: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 16bc4: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 16bc8: e1550003 cmp r5, r3 16bcc: 1affffef bne 16b90 <_Timer_server_Body+0x154> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 16bd0: e129f001 msr CPSR_fc, r1 16bd4: eaffffb0 b 16a9c <_Timer_server_Body+0x60> } } else { ts->active = false; 16bd8: e3a02000 mov r2, #0 16bdc: e5c4207c strb r2, [r4, #124] ; 0x7c 16be0: e59f004c ldr r0, [pc, #76] ; 16c34 <_Timer_server_Body+0x1f8> 16be4: e5903000 ldr r3, [r0] 16be8: e2833001 add r3, r3, #1 16bec: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 16bf0: e3a01008 mov r1, #8 16bf4: e5940000 ldr r0, [r4] 16bf8: eb000db2 bl 1a2c8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 16bfc: e1a00004 mov r0, r4 16c00: ebffff61 bl 1698c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 16c04: e1a00004 mov r0, r4 16c08: ebffff75 bl 169e4 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 16c0c: eb000aff bl 19810 <_Thread_Enable_dispatch> ts->active = true; 16c10: e3a02001 mov r2, #1 16c14: e5c4207c strb r2, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16c18: e59d0008 ldr r0, [sp, #8] 16c1c: eb0010d4 bl 1af74 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16c20: e59d0004 ldr r0, [sp, #4] 16c24: eb0010d2 bl 1af74 <_Watchdog_Remove> 16c28: eaffff9b b 16a9c <_Timer_server_Body+0x60> =============================================================================== 0000a858 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a858: e92d41f0 push {r4, r5, r6, r7, r8, lr} a85c: e1a04000 mov r4, r0 a860: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a864: e10f3000 mrs r3, CPSR a868: e3832080 orr r2, r3, #128 ; 0x80 a86c: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a870: e1a07000 mov r7, r0 a874: e4972004 ldr r2, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { a878: e1520007 cmp r2, r7 a87c: 0a000018 beq a8e4 <_Watchdog_Adjust+0x8c> switch ( direction ) { a880: e3510000 cmp r1, #0 a884: 1a000018 bne a8ec <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a888: e3550000 cmp r5, #0 a88c: 0a000014 beq a8e4 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a890: e5926010 ldr r6, [r2, #16] a894: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a898: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { a89c: 2a000005 bcs a8b8 <_Watchdog_Adjust+0x60> a8a0: ea000018 b a908 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a8a4: e0555006 subs r5, r5, r6 a8a8: 0a00000d beq a8e4 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a8ac: e5926010 ldr r6, [r2, #16] a8b0: e1560005 cmp r6, r5 a8b4: 8a000013 bhi a908 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a8b8: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a8bc: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a8c0: e1a00004 mov r0, r4 a8c4: eb00009e bl ab44 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a8c8: e10f3000 mrs r3, CPSR a8cc: e3832080 orr r2, r3, #128 ; 0x80 a8d0: e129f002 msr CPSR_fc, r2 a8d4: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a8d8: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); a8dc: e1a02001 mov r2, r1 a8e0: 1affffef bne a8a4 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a8e4: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a8e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a8ec: e3510001 cmp r1, #1 a8f0: 1afffffb bne a8e4 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a8f4: e5921010 ldr r1, [r2, #16] a8f8: e0815005 add r5, r1, r5 a8fc: e5825010 str r5, [r2, #16] a900: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a904: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; a908: e0655006 rsb r5, r5, r6 a90c: e5825010 str r5, [r2, #16] break; a910: eafffff3 b a8e4 <_Watchdog_Adjust+0x8c> =============================================================================== 000071f0 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 71f0: e59f3148 ldr r3, [pc, #328] ; 7340 71f4: e593c000 ldr ip, [r3] rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 71f8: e59f3144 ldr r3, [pc, #324] ; 7344 if ( rtems_interrupt_is_in_progress() ) 71fc: e35c0000 cmp ip, #0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 7200: e92d4010 push {r4, lr} 7204: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 7208: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) 720c: 13a00012 movne r0, #18 7210: 18bd8010 popne {r4, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 7214: e3520000 cmp r2, #0 7218: 0a00003d beq 7314 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 721c: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 7220: e5820000 str r0, [r2] if ( driver_table == NULL ) 7224: 0a00003a beq 7314 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7228: e591c000 ldr ip, [r1] 722c: e35c0000 cmp ip, #0 7230: 0a000034 beq 7308 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 7234: e1500004 cmp r0, r4 7238: 93a0000a movls r0, #10 723c: 98bd8010 popls {r4, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 7240: e59f0100 ldr r0, [pc, #256] ; 7348 7244: e590c000 ldr ip, [r0] 7248: e28cc001 add ip, ip, #1 724c: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 7250: e3540000 cmp r4, #0 7254: 1a000020 bne 72dc static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 7258: e593e000 ldr lr, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 725c: e35e0000 cmp lr, #0 7260: 0a00002d beq 731c 7264: e59f30e0 ldr r3, [pc, #224] ; 734c 7268: e593c000 ldr ip, [r3] 726c: e1a0300c mov r3, ip 7270: ea000003 b 7284 7274: e2844001 add r4, r4, #1 7278: e15e0004 cmp lr, r4 727c: e2833018 add r3, r3, #24 7280: 9a000005 bls 729c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7284: e5930000 ldr r0, [r3] 7288: e3500000 cmp r0, #0 728c: 1afffff8 bne 7274 7290: e5930004 ldr r0, [r3, #4] 7294: e3500000 cmp r0, #0 7298: 1afffff5 bne 7274 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 729c: e15e0004 cmp lr, r4 72a0: 10843084 addne r3, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 72a4: e5824000 str r4, [r2] if ( m != n ) 72a8: 108cc183 addne ip, ip, r3, lsl #3 72ac: 0a00001b beq 7320 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 72b0: e1a0e001 mov lr, r1 72b4: e8be000f ldm lr!, {r0, r1, r2, r3} 72b8: e8ac000f stmia ip!, {r0, r1, r2, r3} 72bc: e89e0003 ldm lr, {r0, r1} 72c0: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 72c4: eb000680 bl 8ccc <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 72c8: e3a01000 mov r1, #0 72cc: e1a00004 mov r0, r4 72d0: e1a02001 mov r2, r1 } 72d4: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 72d8: ea0021bb b f9cc _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 72dc: e59f3068 ldr r3, [pc, #104] ; 734c 72e0: e084c084 add ip, r4, r4, lsl #1 72e4: e5933000 ldr r3, [r3] 72e8: e1a0c18c lsl ip, ip, #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 72ec: e793000c ldr r0, [r3, ip] 72f0: e3500000 cmp r0, #0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 72f4: e083c00c add ip, r3, ip static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 72f8: 0a00000b beq 732c major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 72fc: eb000672 bl 8ccc <_Thread_Enable_dispatch> 7300: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; 7304: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7308: e591c004 ldr ip, [r1, #4] 730c: e35c0000 cmp ip, #0 7310: 1affffc7 bne 7234 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 7314: e3a00009 mov r0, #9 } 7318: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 731c: e5824000 str r4, [r2] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 7320: eb000669 bl 8ccc <_Thread_Enable_dispatch> 7324: e3a00005 mov r0, #5 return sc; 7328: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 732c: e59c3004 ldr r3, [ip, #4] 7330: e3530000 cmp r3, #0 7334: 1afffff0 bne 72fc if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 7338: e5824000 str r4, [r2] 733c: eaffffdb b 72b0