RTEMS-6
Annotated Report
sapi
Sun Feb 28 12:24:12 2021

4000709c <_IO_Initialize_all_drivers>:                                                    
#include <rtems/ioimpl.h>                                                                 
                                                                                          
bool _IO_All_drivers_initialized;                                                         
                                                                                          
void _IO_Initialize_all_drivers( void )                                                   
{                                                                                         
4000709c:   ff010113            addi    sp,sp,-16                                         
400070a0:   00912223            sw  s1,4(sp)                                              
   rtems_device_major_number major;                                                       
                                                                                          
   _IO_All_drivers_initialized = true;                                                    
                                                                                          
   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )                             
400070a4:   8681a483            lw  s1,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
   _IO_All_drivers_initialized = true;                                                    
400070a8:   00100713            li  a4,1                                                  
{                                                                                         
400070ac:   00112623            sw  ra,12(sp)                                             
400070b0:   00812423            sw  s0,8(sp)                                              
   _IO_All_drivers_initialized = true;                                                    
400070b4:   92e18423            sb  a4,-1752(gp) # 40020d68 <_IO_All_drivers_initialized> 
   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )                             
400070b8:   02048063            beqz    s1,400070d8 <_IO_Initialize_all_drivers+0x3c>     
400070bc:   00000413            li  s0,0                                                  
     (void) rtems_io_initialize( major, 0, NULL );                                        
400070c0:   00040513            mv  a0,s0                                                 
400070c4:   00000613            li  a2,0                                                  
   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )                             
400070c8:   00140413            addi    s0,s0,1                                           
     (void) rtems_io_initialize( major, 0, NULL );                                        
400070cc:   00000593            li  a1,0                                                  
400070d0:   01c000ef            jal ra,400070ec <rtems_io_initialize>                     
   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )                             
400070d4:   fe9416e3            bne s0,s1,400070c0 <_IO_Initialize_all_drivers+0x24>      
}                                                                                         
400070d8:   00c12083            lw  ra,12(sp)                                             
400070dc:   00812403            lw  s0,8(sp)                                              
400070e0:   00412483            lw  s1,4(sp)                                              
400070e4:   01010113            addi    sp,sp,16                                          
400070e8:   00008067            ret                                                       
                                                                                          

4000483c <rtems_chain_get_with_wait>: rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) {
4000483c:   fd010113            addi    sp,sp,-48                                         
40004840:   02912223            sw  s1,36(sp)                                             
40004844:   03212023            sw  s2,32(sp)                                             
40004848:   01312e23            sw  s3,28(sp)                                             
4000484c:   01412c23            sw  s4,24(sp)                                             
40004850:   02112623            sw  ra,44(sp)                                             
40004854:   02812423            sw  s0,40(sp)                                             
40004858:   00050993            mv  s3,a0                                                 
4000485c:   00058913            mv  s2,a1                                                 
40004860:   00060493            mv  s1,a2                                                 
40004864:   00068a13            mv  s4,a3                                                 
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  rtems_chain_node *node = NULL;                                                          
                                                                                          
  while (                                                                                 
    sc == RTEMS_SUCCESSFUL                                                                
      && (node = rtems_chain_get( chain )) == NULL                                        
40004868:   00098513            mv  a0,s3                                                 
4000486c:   0a0000ef            jal ra,4000490c <rtems_chain_get>                         
40004870:   00050413            mv  s0,a0                                                 
  ) {                                                                                     
    rtems_event_set out;                                                                  
    sc = rtems_event_receive(                                                             
40004874:   00c10693            addi    a3,sp,12                                          
40004878:   00048613            mv  a2,s1                                                 
4000487c:   00000593            li  a1,0                                                  
40004880:   00090513            mv  a0,s2                                                 
      && (node = rtems_chain_get( chain )) == NULL                                        
40004884:   02041863            bnez    s0,400048b4 <rtems_chain_get_with_wait+0x78>      
    sc = rtems_event_receive(                                                             
40004888:   aadff0ef            jal ra,40004334 <rtems_event_receive>                     
  while (                                                                                 
4000488c:   fc050ee3            beqz    a0,40004868 <rtems_chain_get_with_wait+0x2c>      <== NEVER TAKEN
      timeout,                                                                            
      &out                                                                                
    );                                                                                    
  }                                                                                       
                                                                                          
  *node_ptr = node;                                                                       
40004890:   008a2023            sw  s0,0(s4)                                              
                                                                                          
  return sc;                                                                              
}                                                                                         
40004894:   02c12083            lw  ra,44(sp)                                             
40004898:   02812403            lw  s0,40(sp)                                             
4000489c:   02412483            lw  s1,36(sp)                                             
400048a0:   02012903            lw  s2,32(sp)                                             
400048a4:   01c12983            lw  s3,28(sp)                                             
400048a8:   01812a03            lw  s4,24(sp)                                             
400048ac:   03010113            addi    sp,sp,48                                          
400048b0:   00008067            ret                                                       
400048b4:   00000513            li  a0,0                                                  
400048b8:   fd9ff06f            j   40004890 <rtems_chain_get_with_wait+0x54>             
                                                                                          

40004d04 <rtems_configuration_get_maximum_barriers>: return information->objects_per_block != 0;
40004d04:   400147b7            lui a5,0x40014                                            
40004d08:   0c878793            addi    a5,a5,200 # 400140c8 <_Barrier_Information>       
40004d0c:   0127d503            lhu a0,18(a5)                                             
#include <rtems/rtems/timerimpl.h>                                                        
#include <rtems/score/objectimpl.h>                                                       
                                                                                          
static uint32_t get_config_max( const Objects_Information *info )                         
{                                                                                         
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004d10:   00051663            bnez    a0,40004d1c <rtems_configuration_get_maximum_barriers+0x18><== NEVER TAKEN
 */                                                                                       
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(                                  
  Objects_Id id                                                                           
)                                                                                         
{                                                                                         
  return                                                                                  
40004d14:   0007d503            lhu a0,0(a5)                                              
}                                                                                         
                                                                                          
uint32_t rtems_configuration_get_maximum_barriers( void )                                 
{                                                                                         
    return get_config_max( &_Barrier_Information );                                       
}                                                                                         
40004d18:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004d1c:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004d20:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004d24:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

4000c624 <rtems_configuration_get_maximum_extensions>:
4000c624:   400277b7            lui a5,0x40027                                            <== NOT EXECUTED
4000c628:   41078793            addi    a5,a5,1040 # 40027410 <_Extension_Information>    <== NOT EXECUTED
4000c62c:   0127d503            lhu a0,18(a5)                                             <== NOT EXECUTED
    if ( _Objects_Is_auto_extend( info ) ) {                                              
4000c630:   00051663            bnez    a0,4000c63c <rtems_configuration_get_maximum_extensions+0x18><== NOT EXECUTED
4000c634:   0007d503            lhu a0,0(a5)                                              <== NOT EXECUTED
                                                                                          
uint32_t rtems_configuration_get_maximum_extensions( void )                               
{                                                                                         
    return get_config_max( &_Extension_Information );                                     
}                                                                                         
4000c638:   00008067            ret                                                       <== NOT EXECUTED
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
4000c63c:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
4000c640:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
4000c644:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004d28 <rtems_configuration_get_maximum_message_queues>:
40004d28:   400147b7            lui a5,0x40014                                            
40004d2c:   12878793            addi    a5,a5,296 # 40014128 <_Message_queue_Information> 
40004d30:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004d34:   00051663            bnez    a0,40004d40 <rtems_configuration_get_maximum_message_queues+0x18><== NEVER TAKEN
40004d38:   0007d503            lhu a0,0(a5)                                              
}                                                                                         
                                                                                          
uint32_t rtems_configuration_get_maximum_message_queues( void )                           
{                                                                                         
    return get_config_max( &_Message_queue_Information );                                 
}                                                                                         
40004d3c:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004d40:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004d44:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004d48:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004d4c <rtems_configuration_get_maximum_partitions>:
40004d4c:   400147b7            lui a5,0x40014                                            
40004d50:   15878793            addi    a5,a5,344 # 40014158 <_Partition_Information>     
40004d54:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004d58:   00051663            bnez    a0,40004d64 <rtems_configuration_get_maximum_partitions+0x18><== NEVER TAKEN
40004d5c:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_partitions( void )                               
{                                                                                         
    return get_config_max( &_Partition_Information );                                     
}                                                                                         
40004d60:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004d64:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004d68:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004d6c:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004d70 <rtems_configuration_get_maximum_periods>:
40004d70:   400147b7            lui a5,0x40014                                            
40004d74:   18878793            addi    a5,a5,392 # 40014188 <_Rate_monotonic_Information>
40004d78:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004d7c:   00051663            bnez    a0,40004d88 <rtems_configuration_get_maximum_periods+0x18><== NEVER TAKEN
40004d80:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_periods( void )                                  
{                                                                                         
    return get_config_max( &_Rate_monotonic_Information );                                
}                                                                                         
40004d84:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004d88:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004d8c:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004d90:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004d94 <rtems_configuration_get_maximum_ports>:
40004d94:   400147b7            lui a5,0x40014                                            
40004d98:   0f878793            addi    a5,a5,248 # 400140f8 <_Dual_ported_memory_Information>
40004d9c:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004da0:   00051663            bnez    a0,40004dac <rtems_configuration_get_maximum_ports+0x18><== NEVER TAKEN
40004da4:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_ports( void )                                    
{                                                                                         
    return get_config_max( &_Dual_ported_memory_Information );                            
}                                                                                         
40004da8:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004dac:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004db0:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004db4:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004db8 <rtems_configuration_get_maximum_regions>:
40004db8:   400147b7            lui a5,0x40014                                            
40004dbc:   1b878793            addi    a5,a5,440 # 400141b8 <_Region_Information>        
40004dc0:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004dc4:   00051663            bnez    a0,40004dd0 <rtems_configuration_get_maximum_regions+0x18><== NEVER TAKEN
40004dc8:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_regions( void )                                  
{                                                                                         
    return get_config_max( &_Region_Information );                                        
}                                                                                         
40004dcc:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004dd0:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004dd4:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004dd8:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004ddc <rtems_configuration_get_maximum_semaphores>:
40004ddc:   400147b7            lui a5,0x40014                                            
40004de0:   21878793            addi    a5,a5,536 # 40014218 <_Semaphore_Information>     
40004de4:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004de8:   00051663            bnez    a0,40004df4 <rtems_configuration_get_maximum_semaphores+0x18><== NEVER TAKEN
40004dec:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_semaphores( void )                               
{                                                                                         
    return get_config_max( &_Semaphore_Information );                                     
}                                                                                         
40004df0:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004df4:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004df8:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004dfc:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004e24 <rtems_configuration_get_maximum_tasks>:
40004e24:   400147b7            lui a5,0x40014                                            
40004e28:   e2478793            addi    a5,a5,-476 # 40013e24 <_RTEMS_tasks_Information>  
40004e2c:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004e30:   00051663            bnez    a0,40004e3c <rtems_configuration_get_maximum_tasks+0x18><== NEVER TAKEN
40004e34:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_tasks( void )                                    
{                                                                                         
    return get_config_max( &_RTEMS_tasks_Information.Objects );                           
}                                                                                         
40004e38:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004e3c:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004e40:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004e44:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40004e00 <rtems_configuration_get_maximum_timers>:
40004e00:   400147b7            lui a5,0x40014                                            
40004e04:   1e878793            addi    a5,a5,488 # 400141e8 <_Timer_Information>         
40004e08:   0127d503            lhu a0,18(a5)                                             
    if ( _Objects_Is_auto_extend( info ) ) {                                              
40004e0c:   00051663            bnez    a0,40004e18 <rtems_configuration_get_maximum_timers+0x18><== NEVER TAKEN
40004e10:   0007d503            lhu a0,0(a5)                                              
                                                                                          
uint32_t rtems_configuration_get_maximum_timers( void )                                   
{                                                                                         
    return get_config_max( &_Timer_Information );                                         
}                                                                                         
40004e14:   00008067            ret                                                       
        return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;                         
40004e18:   800007b7            lui a5,0x80000                                            <== NOT EXECUTED
40004e1c:   00f56533            or  a0,a0,a5                                              <== NOT EXECUTED
40004e20:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

4000fad8 <rtems_initialize_executive>: RTEMS_SYSINIT_IDLE_THREADS, RTEMS_SYSINIT_ORDER_MIDDLE ); void rtems_initialize_executive(void) {
4000fad8:   ff010113            addi    sp,sp,-16                                         
4000fadc:   00912223            sw  s1,4(sp)                                              
  const rtems_sysinit_item *item;                                                         
                                                                                          
  /* Invoke the registered system initialization handlers */                              
  RTEMS_LINKER_SET_FOREACH( _Sysinit, item ) {                                            
4000fae0:   400204b7            lui s1,0x40020                                            
{                                                                                         
4000fae4:   00812423            sw  s0,8(sp)                                              
4000fae8:   00112623            sw  ra,12(sp)                                             
                                                                                          
RTEMS_INLINE_ROUTINE uintptr_t _Linker_set_Obfuscate( const void *ptr )                   
{                                                                                         
  uintptr_t addr;                                                                         
                                                                                          
  addr = (uintptr_t) ptr;                                                                 
4000faec:   40020437            lui s0,0x40020                                            
  RTEMS_LINKER_SET_FOREACH( _Sysinit, item ) {                                            
4000faf0:   5f448493            addi    s1,s1,1524 # 400205f4 <_Copyright_Notice>         
  RTEMS_OBFUSCATE_VARIABLE( addr );                                                       
4000faf4:   5b440413            addi    s0,s0,1460 # 400205b4 <_Linker_set__Sysinit__Workspace_Initialize>
4000faf8:   00848a63            beq s1,s0,4000fb0c <rtems_initialize_executive+0x34>      
    ( *item->handler )();                                                                 
4000fafc:   00042783            lw  a5,0(s0)                                              
  RTEMS_LINKER_SET_FOREACH( _Sysinit, item ) {                                            
4000fb00:   00440413            addi    s0,s0,4                                           
    ( *item->handler )();                                                                 
4000fb04:   000780e7            jalr    a5                                                
  RTEMS_LINKER_SET_FOREACH( _Sysinit, item ) {                                            
4000fb08:   fe941ae3            bne s0,s1,4000fafc <rtems_initialize_executive+0x24>      
4000fb0c:   00200713            li  a4,2                                                  
4000fb10:   92e1aa23            sw  a4,-1740(gp) # 40020d74 <_System_state_Current>       
                                                                                          
  _System_state_Set( SYSTEM_STATE_UP );                                                   
                                                                                          
  _SMP_Request_start_multitasking();                                                      
                                                                                          
  _Thread_Start_multitasking();                                                           
4000fb14:   111010ef            jal ra,40011424 <_Thread_Start_multitasking>              
                                                                                          

400119d4 <rtems_io_close>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
400119d4:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
400119d8:   02e57863            bgeu    a0,a4,40011a08 <rtems_io_close+0x34>              
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].close_entry;                                  
400119dc:   00151713            slli    a4,a0,0x1                                         
400119e0:   00a70733            add a4,a4,a0                                              
400119e4:   400207b7            lui a5,0x40020                                            
400119e8:   00371713            slli    a4,a4,0x3                                         
400119ec:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
400119f0:   00e787b3            add a5,a5,a4                                              
400119f4:   0087a783            lw  a5,8(a5)                                              
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
400119f8:   00078463            beqz    a5,40011a00 <rtems_io_close+0x2c>                 
400119fc:   00078067            jr  a5                                                    
40011a00:   00000513            li  a0,0                                                  
}                                                                                         
40011a04:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40011a08:   00a00513            li  a0,10                                                 
40011a0c:   00008067            ret                                                       
                                                                                          

40011a10 <rtems_io_control>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
40011a10:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
40011a14:   02e57863            bgeu    a0,a4,40011a44 <rtems_io_control+0x34>            
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].control_entry;                                
40011a18:   00151713            slli    a4,a0,0x1                                         
40011a1c:   00a70733            add a4,a4,a0                                              
40011a20:   400207b7            lui a5,0x40020                                            
40011a24:   00371713            slli    a4,a4,0x3                                         
40011a28:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
40011a2c:   00e787b3            add a5,a5,a4                                              
40011a30:   0147a783            lw  a5,20(a5)                                             
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
40011a34:   00078463            beqz    a5,40011a3c <rtems_io_control+0x2c>               
40011a38:   00078067            jr  a5                                                    
40011a3c:   00000513            li  a0,0                                                  
}                                                                                         
40011a40:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40011a44:   00a00513            li  a0,10                                                 
40011a48:   00008067            ret                                                       
                                                                                          

400070ec <rtems_io_initialize>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
400070ec:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
400070f0:   02e57863            bgeu    a0,a4,40007120 <rtems_io_initialize+0x34>         
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].initialization_entry;                         
400070f4:   00151713            slli    a4,a0,0x1                                         
400070f8:   00a70733            add a4,a4,a0                                              
400070fc:   400207b7            lui a5,0x40020                                            
40007100:   00371713            slli    a4,a4,0x3                                         
40007104:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
40007108:   00e787b3            add a5,a5,a4                                              
4000710c:   0007a783            lw  a5,0(a5)                                              
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
40007110:   00078463            beqz    a5,40007118 <rtems_io_initialize+0x2c>            
40007114:   00078067            jr  a5                                                    
40007118:   00000513            li  a0,0                                                  
}                                                                                         
4000711c:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40007120:   00a00513            li  a0,10                                                 
40007124:   00008067            ret                                                       
                                                                                          

40011a4c <rtems_io_open>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
40011a4c:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
40011a50:   02e57863            bgeu    a0,a4,40011a80 <rtems_io_open+0x34>               
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].open_entry;                                   
40011a54:   00151713            slli    a4,a0,0x1                                         
40011a58:   00a70733            add a4,a4,a0                                              
40011a5c:   400207b7            lui a5,0x40020                                            
40011a60:   00371713            slli    a4,a4,0x3                                         
40011a64:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
40011a68:   00e787b3            add a5,a5,a4                                              
40011a6c:   0047a783            lw  a5,4(a5)                                              
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
40011a70:   00078463            beqz    a5,40011a78 <rtems_io_open+0x2c>                  
40011a74:   00078067            jr  a5                                                    
40011a78:   00000513            li  a0,0                                                  
}                                                                                         
40011a7c:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40011a80:   00a00513            li  a0,10                                                 
40011a84:   00008067            ret                                                       
                                                                                          

40011a88 <rtems_io_read>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
40011a88:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
40011a8c:   02e57863            bgeu    a0,a4,40011abc <rtems_io_read+0x34>               
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].read_entry;                                   
40011a90:   00151713            slli    a4,a0,0x1                                         
40011a94:   00a70733            add a4,a4,a0                                              
40011a98:   400207b7            lui a5,0x40020                                            
40011a9c:   00371713            slli    a4,a4,0x3                                         
40011aa0:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
40011aa4:   00e787b3            add a5,a5,a4                                              
40011aa8:   00c7a783            lw  a5,12(a5)                                             
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
40011aac:   00078463            beqz    a5,40011ab4 <rtems_io_read+0x2c>                  
40011ab0:   00078067            jr  a5                                                    
40011ab4:   00000513            li  a0,0                                                  
}                                                                                         
40011ab8:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40011abc:   00a00513            li  a0,10                                                 
40011ac0:   00008067            ret                                                       
                                                                                          

40005de0 <rtems_io_register_driver>: 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 ) {
40005de0:   fe010113            addi    sp,sp,-32                                         
40005de4:   01412423            sw  s4,8(sp)                                              
  rtems_device_major_number major_limit = _IO_Number_of_drivers;                          
40005de8:   40015a37            lui s4,0x40015                                            
{                                                                                         
40005dec:   00812c23            sw  s0,24(sp)                                             
40005df0:   00912a23            sw  s1,20(sp)                                             
40005df4:   01212823            sw  s2,16(sp)                                             
40005df8:   01312623            sw  s3,12(sp)                                             
40005dfc:   00112e23            sw  ra,28(sp)                                             
  rtems_device_major_number major_limit = _IO_Number_of_drivers;                          
40005e00:   690a2983            lw  s3,1680(s4) # 40015690 <_IO_Number_of_drivers>        
{                                                                                         
40005e04:   00050413            mv  s0,a0                                                 
40005e08:   00058493            mv  s1,a1                                                 
40005e0c:   00060913            mv  s2,a2                                                 
  ISR_lock_Context lock_context;                                                          
                                                                                          
  if ( rtems_interrupt_is_in_progress() )                                                 
40005e10:   2cd000ef            jal ra,400068dc <_ISR_Is_in_progress>                     
40005e14:   04051863            bnez    a0,40005e64 <rtems_io_register_driver+0x84>       
    return RTEMS_CALLED_FROM_ISR;                                                         
                                                                                          
  if ( registered_major == NULL )                                                         
40005e18:   06090c63            beqz    s2,40005e90 <rtems_io_register_driver+0xb0>       
    return RTEMS_INVALID_ADDRESS;                                                         
                                                                                          
  /* Set it to an invalid value */                                                        
  *registered_major = major_limit;                                                        
40005e1c:   01392023            sw  s3,0(s2)                                              
                                                                                          
  if ( driver_table == NULL )                                                             
40005e20:   06048863            beqz    s1,40005e90 <rtems_io_register_driver+0xb0>       
  return table->initialization_entry == NULL && table->open_entry == NULL;                
40005e24:   0004a783            lw  a5,0(s1)                                              
40005e28:   06078063            beqz    a5,40005e88 <rtems_io_register_driver+0xa8>       
    return RTEMS_INVALID_ADDRESS;                                                         
                                                                                          
  if ( rtems_io_is_empty_table( driver_table ) )                                          
    return RTEMS_INVALID_ADDRESS;                                                         
                                                                                          
  if ( major >= major_limit )                                                             
40005e2c:   15347463            bgeu    s0,s3,40005f74 <rtems_io_register_driver+0x194>   
  __asm__ volatile (                                                                      
40005e30:   300475f3            csrrci  a1,mstatus,8                                      
  return mstatus & RISCV_MSTATUS_MIE;                                                     
40005e34:   0085f593            andi    a1,a1,8                                           
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  _IO_Driver_registration_acquire( &lock_context );                                       
                                                                                          
  if ( major == 0 ) {                                                                     
40005e38:   10040063            beqz    s0,40005f38 <rtems_io_register_driver+0x158>      
      _IO_Driver_registration_release( &lock_context );                                   
      return sc;                                                                          
    }                                                                                     
    major = *registered_major;                                                            
  } else {                                                                                
    rtems_driver_address_table *const table = _IO_Driver_address_table + major;           
40005e3c:   00141693            slli    a3,s0,0x1                                         
40005e40:   00868633            add a2,a3,s0                                              
40005e44:   00361613            slli    a2,a2,0x3                                         
40005e48:   5cc18713            addi    a4,gp,1484 # 4001645c <_IO_Driver_address_table>  
40005e4c:   00c707b3            add a5,a4,a2                                              
  return table->initialization_entry == NULL && table->open_entry == NULL;                
40005e50:   0007a603            lw  a2,0(a5)                                              
40005e54:   06060063            beqz    a2,40005eb4 <rtems_io_register_driver+0xd4>       
  __asm__ volatile ( "csrrs zero, mstatus, %0" : : "r" ( level ) );                       
40005e58:   3005a073            csrs    mstatus,a1                                        
                                                                                          
    if ( !rtems_io_is_empty_table( table ) ) {                                            
      _IO_Driver_registration_release( &lock_context );                                   
      return RTEMS_RESOURCE_IN_USE;                                                       
40005e5c:   00c00513            li  a0,12                                                 
40005e60:   0080006f            j   40005e68 <rtems_io_register_driver+0x88>              
    return RTEMS_CALLED_FROM_ISR;                                                         
40005e64:   01200513            li  a0,18                                                 
    /* The driver will be initialized together with all other drivers                     
     * in a later stage by _IO_Initialize_all_drivers().                                  
     */                                                                                   
    return RTEMS_SUCCESSFUL;                                                              
  }                                                                                       
}                                                                                         
40005e68:   01c12083            lw  ra,28(sp)                                             
40005e6c:   01812403            lw  s0,24(sp)                                             
40005e70:   01412483            lw  s1,20(sp)                                             
40005e74:   01012903            lw  s2,16(sp)                                             
40005e78:   00c12983            lw  s3,12(sp)                                             
40005e7c:   00812a03            lw  s4,8(sp)                                              
40005e80:   02010113            addi    sp,sp,32                                          
40005e84:   00008067            ret                                                       
  return table->initialization_entry == NULL && table->open_entry == NULL;                
40005e88:   0044a783            lw  a5,4(s1)                                              
40005e8c:   fa0790e3            bnez    a5,40005e2c <rtems_io_register_driver+0x4c>       
}                                                                                         
40005e90:   01c12083            lw  ra,28(sp)                                             
40005e94:   01812403            lw  s0,24(sp)                                             
40005e98:   01412483            lw  s1,20(sp)                                             
40005e9c:   01012903            lw  s2,16(sp)                                             
40005ea0:   00c12983            lw  s3,12(sp)                                             
40005ea4:   00812a03            lw  s4,8(sp)                                              
    return RTEMS_INVALID_ADDRESS;                                                         
40005ea8:   00900513            li  a0,9                                                  
}                                                                                         
40005eac:   02010113            addi    sp,sp,32                                          
40005eb0:   00008067            ret                                                       
  return table->initialization_entry == NULL && table->open_entry == NULL;                
40005eb4:   0047a783            lw  a5,4(a5)                                              
40005eb8:   fa0790e3            bnez    a5,40005e58 <rtems_io_register_driver+0x78>       
    *registered_major = major;                                                            
40005ebc:   00892023            sw  s0,0(s2)                                              
  _IO_Driver_address_table [major] = *driver_table;                                       
40005ec0:   0004ae03            lw  t3,0(s1)                                              
40005ec4:   0044a303            lw  t1,4(s1)                                              
40005ec8:   0084a883            lw  a7,8(s1)                                              
40005ecc:   00c4a803            lw  a6,12(s1)                                             
40005ed0:   0104a503            lw  a0,16(s1)                                             
40005ed4:   0144a603            lw  a2,20(s1)                                             
40005ed8:   008687b3            add a5,a3,s0                                              
40005edc:   00379793            slli    a5,a5,0x3                                         
40005ee0:   00f707b3            add a5,a4,a5                                              
40005ee4:   01c7a023            sw  t3,0(a5)                                              
40005ee8:   0067a223            sw  t1,4(a5)                                              
40005eec:   0117a423            sw  a7,8(a5)                                              
40005ef0:   0107a623            sw  a6,12(a5)                                             
40005ef4:   00a7a823            sw  a0,16(a5)                                             
40005ef8:   00c7aa23            sw  a2,20(a5)                                             
40005efc:   3005a073            csrs    mstatus,a1                                        
  if ( _IO_All_drivers_initialized ) {                                                    
40005f00:   8bc1c783            lbu a5,-1860(gp) # 4001574c <_IO_All_drivers_initialized> 
    return RTEMS_SUCCESSFUL;                                                              
40005f04:   00000513            li  a0,0                                                  
  if ( _IO_All_drivers_initialized ) {                                                    
40005f08:   f60780e3            beqz    a5,40005e68 <rtems_io_register_driver+0x88>       
    return rtems_io_initialize( major, 0, NULL );                                         
40005f0c:   00040513            mv  a0,s0                                                 
}                                                                                         
40005f10:   01812403            lw  s0,24(sp)                                             
40005f14:   01c12083            lw  ra,28(sp)                                             
40005f18:   01412483            lw  s1,20(sp)                                             
40005f1c:   01012903            lw  s2,16(sp)                                             
40005f20:   00c12983            lw  s3,12(sp)                                             
40005f24:   00812a03            lw  s4,8(sp)                                              
    return rtems_io_initialize( major, 0, NULL );                                         
40005f28:   00000613            li  a2,0                                                  
40005f2c:   00000593            li  a1,0                                                  
}                                                                                         
40005f30:   02010113            addi    sp,sp,32                                          
    return rtems_io_initialize( major, 0, NULL );                                         
40005f34:   e71ff06f            j   40005da4 <rtems_io_initialize>                        
  rtems_device_major_number n = _IO_Number_of_drivers;                                    
40005f38:   690a2603            lw  a2,1680(s4)                                           
  for ( m = 0; m < n; ++m ) {                                                             
40005f3c:   06060663            beqz    a2,40005fa8 <rtems_io_register_driver+0x1c8>      
40005f40:   5cc18713            addi    a4,gp,1484 # 4001645c <_IO_Driver_address_table>  
40005f44:   5cc18793            addi    a5,gp,1484 # 4001645c <_IO_Driver_address_table>  
40005f48:   0100006f            j   40005f58 <rtems_io_register_driver+0x178>             
40005f4c:   00140413            addi    s0,s0,1                                           
40005f50:   01878793            addi    a5,a5,24                                          
40005f54:   04860263            beq a2,s0,40005f98 <rtems_io_register_driver+0x1b8>       
  return table->initialization_entry == NULL && table->open_entry == NULL;                
40005f58:   0007a683            lw  a3,0(a5)                                              
40005f5c:   fe0698e3            bnez    a3,40005f4c <rtems_io_register_driver+0x16c>      
40005f60:   0047a683            lw  a3,4(a5)                                              
40005f64:   fe0694e3            bnez    a3,40005f4c <rtems_io_register_driver+0x16c>      
  *major = m;                                                                             
40005f68:   00892023            sw  s0,0(s2)                                              
  if ( m != n )                                                                           
40005f6c:   00141693            slli    a3,s0,0x1                                         
40005f70:   f51ff06f            j   40005ec0 <rtems_io_register_driver+0xe0>              
}                                                                                         
40005f74:   01c12083            lw  ra,28(sp)                                             
40005f78:   01812403            lw  s0,24(sp)                                             
40005f7c:   01412483            lw  s1,20(sp)                                             
40005f80:   01012903            lw  s2,16(sp)                                             
40005f84:   00c12983            lw  s3,12(sp)                                             
40005f88:   00812a03            lw  s4,8(sp)                                              
    return RTEMS_INVALID_NUMBER;                                                          
40005f8c:   00a00513            li  a0,10                                                 
}                                                                                         
40005f90:   02010113            addi    sp,sp,32                                          
40005f94:   00008067            ret                                                       
  *major = m;                                                                             
40005f98:   00c92023            sw  a2,0(s2)                                              
40005f9c:   3005a073            csrs    mstatus,a1                                        
  return RTEMS_TOO_MANY;                                                                  
40005fa0:   00500513            li  a0,5                                                  
      return sc;                                                                          
40005fa4:   ec5ff06f            j   40005e68 <rtems_io_register_driver+0x88>              
  *major = m;                                                                             
40005fa8:   00092023            sw  zero,0(s2)                                            
  if ( m != n )                                                                           
40005fac:   ff1ff06f            j   40005f9c <rtems_io_register_driver+0x1bc>             
                                                                                          

40005fb0 <rtems_io_unregister_driver>: #include <string.h> rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) {
40005fb0:   ff010113            addi    sp,sp,-16                                         
40005fb4:   00812423            sw  s0,8(sp)                                              
40005fb8:   00112623            sw  ra,12(sp)                                             
40005fbc:   00050413            mv  s0,a0                                                 
  if ( rtems_interrupt_is_in_progress() )                                                 
40005fc0:   11d000ef            jal ra,400068dc <_ISR_Is_in_progress>                     
40005fc4:   06051863            bnez    a0,40006034 <rtems_io_unregister_driver+0x84>     
    return RTEMS_CALLED_FROM_ISR;                                                         
                                                                                          
  if ( major < _IO_Number_of_drivers ) {                                                  
40005fc8:   400157b7            lui a5,0x40015                                            
40005fcc:   6907a783            lw  a5,1680(a5) # 40015690 <_IO_Number_of_drivers>        
    _IO_Driver_registration_release( &lock_context );                                     
                                                                                          
    return RTEMS_SUCCESSFUL;                                                              
  }                                                                                       
                                                                                          
  return RTEMS_UNSATISFIED;                                                               
40005fd0:   00d00513            li  a0,13                                                 
  if ( major < _IO_Number_of_drivers ) {                                                  
40005fd4:   00f46a63            bltu    s0,a5,40005fe8 <rtems_io_unregister_driver+0x38>  
}                                                                                         
40005fd8:   00c12083            lw  ra,12(sp)                                             
40005fdc:   00812403            lw  s0,8(sp)                                              
40005fe0:   01010113            addi    sp,sp,16                                          
40005fe4:   00008067            ret                                                       
  __asm__ volatile (                                                                      
40005fe8:   300477f3            csrrci  a5,mstatus,8                                      
      &_IO_Driver_address_table[major],                                                   
40005fec:   00141513            slli    a0,s0,0x1                                         
40005ff0:   00850433            add s0,a0,s0                                              
40005ff4:   5cc18713            addi    a4,gp,1484 # 4001645c <_IO_Driver_address_table>  
40005ff8:   00341413            slli    s0,s0,0x3                                         
40005ffc:   00e40433            add s0,s0,a4                                              
    memset(                                                                               
40006000:   00042023            sw  zero,0(s0)                                            
40006004:   00042223            sw  zero,4(s0)                                            
40006008:   00042423            sw  zero,8(s0)                                            
4000600c:   00042623            sw  zero,12(s0)                                           
40006010:   00042823            sw  zero,16(s0)                                           
40006014:   00042a23            sw  zero,20(s0)                                           
  return mstatus & RISCV_MSTATUS_MIE;                                                     
40006018:   0087f793            andi    a5,a5,8                                           
  __asm__ volatile ( "csrrs zero, mstatus, %0" : : "r" ( level ) );                       
4000601c:   3007a073            csrs    mstatus,a5                                        
}                                                                                         
40006020:   00c12083            lw  ra,12(sp)                                             
40006024:   00812403            lw  s0,8(sp)                                              
    return RTEMS_SUCCESSFUL;                                                              
40006028:   00000513            li  a0,0                                                  
}                                                                                         
4000602c:   01010113            addi    sp,sp,16                                          
40006030:   00008067            ret                                                       
40006034:   00c12083            lw  ra,12(sp)                                             
40006038:   00812403            lw  s0,8(sp)                                              
    return RTEMS_CALLED_FROM_ISR;                                                         
4000603c:   01200513            li  a0,18                                                 
}                                                                                         
40006040:   01010113            addi    sp,sp,16                                          
40006044:   00008067            ret                                                       
                                                                                          

40011ac4 <rtems_io_write>: void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
40011ac4:   8681a703            lw  a4,-1944(gp) # 40020ca8 <_IO_Number_of_drivers>       
40011ac8:   02e57863            bgeu    a0,a4,40011af8 <rtems_io_write+0x34>              
    return RTEMS_INVALID_NUMBER;                                                          
                                                                                          
  callout = _IO_Driver_address_table[major].write_entry;                                  
40011acc:   00151713            slli    a4,a0,0x1                                         
40011ad0:   00a70733            add a4,a4,a0                                              
40011ad4:   400207b7            lui a5,0x40020                                            
40011ad8:   00371713            slli    a4,a4,0x3                                         
40011adc:   63078793            addi    a5,a5,1584 # 40020630 <_IO_Driver_address_table>  
40011ae0:   00e787b3            add a5,a5,a4                                              
40011ae4:   0107a783            lw  a5,16(a5)                                             
  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;                    
40011ae8:   00078463            beqz    a5,40011af0 <rtems_io_write+0x2c>                 
40011aec:   00078067            jr  a5                                                    
40011af0:   00000513            li  a0,0                                                  
}                                                                                         
40011af4:   00008067            ret                                                       
    return RTEMS_INVALID_NUMBER;                                                          
40011af8:   00a00513            li  a0,10                                                 
40011afc:   00008067            ret                                                       
                                                                                          

40003f0c <rtems_rbheap_allocate>: void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment;
40003f0c:   01c52783            lw  a5,28(a0)                                             
  uintptr_t excess = value % alignment;                                                   
40003f10:   02f5f733            remu    a4,a1,a5                                          
  if (excess > 0) {                                                                       
40003f14:   00070e63            beqz    a4,40003f30 <rtems_rbheap_allocate+0x24>          
  uintptr_t aligned_size = align_up(alignment, size);                                     
                                                                                          
  if (size > 0 && size <= aligned_size) {                                                 
40003f18:   00058863            beqz    a1,40003f28 <rtems_rbheap_allocate+0x1c>          <== NEVER TAKEN
    value += alignment - excess;                                                          
40003f1c:   00b787b3            add a5,a5,a1                                              
40003f20:   40e787b3            sub a5,a5,a4                                              
  if (size > 0 && size <= aligned_size) {                                                 
40003f24:   0cb7fa63            bgeu    a5,a1,40003ff8 <rtems_rbheap_allocate+0xec>       
  void *ptr = NULL;                                                                       
40003f28:   00000513            li  a0,0                                                  
      }                                                                                   
    }                                                                                     
  }                                                                                       
                                                                                          
  return ptr;                                                                             
}                                                                                         
40003f2c:   00008067            ret                                                       
  if (size > 0 && size <= aligned_size) {                                                 
40003f30:   fe058ce3            beqz    a1,40003f28 <rtems_rbheap_allocate+0x1c>          
{                                                                                         
40003f34:   fd010113            addi    sp,sp,-48                                         
40003f38:   02812423            sw  s0,40(sp)                                             
  return _Chain_Immutable_head( the_chain )->next;                                        
40003f3c:   00052403            lw  s0,0(a0)                                              
40003f40:   02112623            sw  ra,44(sp)                                             
40003f44:   02912223            sw  s1,36(sp)                                             
40003f48:   03212023            sw  s2,32(sp)                                             
40003f4c:   01312e23            sw  s3,28(sp)                                             
40003f50:   01412c23            sw  s4,24(sp)                                             
  return &the_chain->Tail.Node;                                                           
40003f54:   00450713            addi    a4,a0,4                                           
  while (current != tail && big_enough == NULL) {                                         
40003f58:   06e40e63            beq s0,a4,40003fd4 <rtems_rbheap_allocate+0xc8>           
    if (free_chunk->size >= size) {                                                       
40003f5c:   01c42483            lw  s1,28(s0)                                             
  return the_node->next;                                                                  
40003f60:   00042783            lw  a5,0(s0)                                              
40003f64:   00b4fc63            bgeu    s1,a1,40003f7c <rtems_rbheap_allocate+0x70>       
  while (current != tail && big_enough == NULL) {                                         
40003f68:   06f70663            beq a4,a5,40003fd4 <rtems_rbheap_allocate+0xc8>           
40003f6c:   00078413            mv  s0,a5                                                 <== NOT EXECUTED
    if (free_chunk->size >= size) {                                                       
40003f70:   01c42483            lw  s1,28(s0)                                             <== NOT EXECUTED
40003f74:   00042783            lw  a5,0(s0)                                              <== NOT EXECUTED
40003f78:   feb4e8e3            bltu    s1,a1,40003f68 <rtems_rbheap_allocate+0x5c>       <== NOT EXECUTED
      if (free_size > aligned_size) {                                                     
40003f7c:   0895e263            bltu    a1,s1,40004000 <rtems_rbheap_allocate+0xf4>       
  previous       = the_node->previous;                                                    
40003f80:   00442703            lw  a4,4(s0)                                              
        ptr = (void *) free_chunk->begin;                                                 
40003f84:   01842503            lw  a0,24(s0)                                             
}                                                                                         
40003f88:   02c12083            lw  ra,44(sp)                                             
  next->previous = previous;                                                              
40003f8c:   00e7a223            sw  a4,4(a5)                                              
  previous->next = next;                                                                  
40003f90:   00f72023            sw  a5,0(a4)                                              
  node->next = NULL;                                                                      
40003f94:   00042023            sw  zero,0(s0)                                            
40003f98:   02812403            lw  s0,40(sp)                                             
40003f9c:   02412483            lw  s1,36(sp)                                             
40003fa0:   02012903            lw  s2,32(sp)                                             
40003fa4:   01c12983            lw  s3,28(sp)                                             
40003fa8:   01812a03            lw  s4,24(sp)                                             
40003fac:   03010113            addi    sp,sp,48                                          
40003fb0:   00008067            ret                                                       
    (*control->extend_descriptors)(control);                                              
40003fb4:   02052783            lw  a5,32(a0)                                             
40003fb8:   00b12623            sw  a1,12(sp)                                             
40003fbc:   00a12423            sw  a0,8(sp)                                              
40003fc0:   000780e7            jalr    a5                                                
  return _Chain_Immutable_head( the_chain )->next;                                        
40003fc4:   00812503            lw  a0,8(sp)                                              
  if ( !_Chain_Is_empty(the_chain))                                                       
40003fc8:   00c12583            lw  a1,12(sp)                                             
  return _Chain_Immutable_head( the_chain )->next;                                        
40003fcc:   00c52903            lw  s2,12(a0)                                             
  if ( !_Chain_Is_empty(the_chain))                                                       
40003fd0:   05299063            bne s3,s2,40004010 <rtems_rbheap_allocate+0x104>          
}                                                                                         
40003fd4:   02c12083            lw  ra,44(sp)                                             
40003fd8:   02812403            lw  s0,40(sp)                                             
40003fdc:   02412483            lw  s1,36(sp)                                             
40003fe0:   02012903            lw  s2,32(sp)                                             
40003fe4:   01c12983            lw  s3,28(sp)                                             
40003fe8:   01812a03            lw  s4,24(sp)                                             
  void *ptr = NULL;                                                                       
40003fec:   00000513            li  a0,0                                                  
}                                                                                         
40003ff0:   03010113            addi    sp,sp,48                                          
40003ff4:   00008067            ret                                                       
40003ff8:   00078593            mv  a1,a5                                                 
40003ffc:   f39ff06f            j   40003f34 <rtems_rbheap_allocate+0x28>                 
  return _Chain_Immutable_head( the_chain )->next;                                        
40004000:   00c52903            lw  s2,12(a0)                                             
  return &the_chain->Tail.Node;                                                           
40004004:   01050993            addi    s3,a0,16                                          
40004008:   00c50a13            addi    s4,a0,12                                          
  if ( !_Chain_Is_empty(the_chain))                                                       
4000400c:   fb3904e3            beq s2,s3,40003fb4 <rtems_rbheap_allocate+0xa8>           
  new_first = old_first->next;                                                            
40004010:   00092783            lw  a5,0(s2)                                              
          uintptr_t new_free_size = free_size - aligned_size;                             
40004014:   40b484b3            sub s1,s1,a1                                              
  rtems_rbtree_insert(tree, &chunk->tree_node, chunk_compare, true);                      
40004018:   40004637            lui a2,0x40004                                            
  head->next = new_first;                                                                 
4000401c:   00f52623            sw  a5,12(a0)                                             
  new_first->previous = head;                                                             
40004020:   0147a223            sw  s4,4(a5)                                              
          new_chunk->begin = free_chunk->begin + new_free_size;                           
40004024:   01842783            lw  a5,24(s0)                                             
          free_chunk->size = new_free_size;                                               
40004028:   00942e23            sw  s1,28(s0)                                             
          new_chunk->size = aligned_size;                                                 
4000402c:   00b92e23            sw  a1,28(s2)                                             
          new_chunk->begin = free_chunk->begin + new_free_size;                           
40004030:   009784b3            add s1,a5,s1                                              
40004034:   00992c23            sw  s1,24(s2)                                             
  node->next = NULL;                                                                      
40004038:   00092023            sw  zero,0(s2)                                            
  rtems_rbtree_insert(tree, &chunk->tree_node, chunk_compare, true);                      
4000403c:   00890593            addi    a1,s2,8                                           
40004040:   00100693            li  a3,1                                                  
40004044:   d9860613            addi    a2,a2,-616 # 40003d98 <chunk_compare>             
40004048:   01850513            addi    a0,a0,24                                          
4000404c:   2b0000ef            jal ra,400042fc <rtems_rbtree_insert>                     
}                                                                                         
40004050:   02c12083            lw  ra,44(sp)                                             
40004054:   02812403            lw  s0,40(sp)                                             
          ptr = (void *) new_chunk->begin;                                                
40004058:   01892503            lw  a0,24(s2)                                             
}                                                                                         
4000405c:   02412483            lw  s1,36(sp)                                             
40004060:   02012903            lw  s2,32(sp)                                             
40004064:   01c12983            lw  s3,28(sp)                                             
40004068:   01812a03            lw  s4,24(sp)                                             
4000406c:   03010113            addi    sp,sp,48                                          
40004070:   00008067            ret                                                       
                                                                                          

40003db0 <rtems_rbheap_initialize>: uintptr_t area_size, uintptr_t alignment, rtems_rbheap_extend_descriptors extend_descriptors, void *handler_arg ) {
40003db0:   fe010113            addi    sp,sp,-32                                         
40003db4:   00812c23            sw  s0,24(sp)                                             
40003db8:   01212823            sw  s2,16(sp)                                             
40003dbc:   00112e23            sw  ra,28(sp)                                             
40003dc0:   00912a23            sw  s1,20(sp)                                             
40003dc4:   01312623            sw  s3,12(sp)                                             
40003dc8:   01412423            sw  s4,8(sp)                                              
                                                                                          
  /*                                                                                      
   * Ensure that the alignment is at least two, so that we can keep                       
   * chunk_compare() that simple.                                                         
   */                                                                                     
  alignment = alignment < 2 ? 2 : alignment;                                              
40003dcc:   00200813            li  a6,2                                                  
{                                                                                         
40003dd0:   00050413            mv  s0,a0                                                 
  uintptr_t begin = (uintptr_t) area_begin;                                               
40003dd4:   00058913            mv  s2,a1                                                 
  uintptr_t end = begin + area_size;                                                      
40003dd8:   00c58633            add a2,a1,a2                                              
  alignment = alignment < 2 ? 2 : alignment;                                              
40003ddc:   0106f463            bgeu    a3,a6,40003de4 <rtems_rbheap_initialize+0x34>     
40003de0:   00200693            li  a3,2                                                  <== NOT EXECUTED
  uintptr_t excess = value % alignment;                                                   
40003de4:   02d5f833            remu    a6,a1,a3                                          
  if (excess > 0) {                                                                       
40003de8:   02080c63            beqz    a6,40003e20 <rtems_rbheap_initialize+0x70>        
      insert_into_tree(chunk_tree, first);                                                
    } else {                                                                              
      sc = RTEMS_NO_MEMORY;                                                               
    }                                                                                     
  } else {                                                                                
    sc = RTEMS_INVALID_ADDRESS;                                                           
40003dec:   00900513            li  a0,9                                                  
  if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {             
40003df0:   00c5f863            bgeu    a1,a2,40003e00 <rtems_rbheap_initialize+0x50>     
    value += alignment - excess;                                                          
40003df4:   00d58933            add s2,a1,a3                                              
40003df8:   41090933            sub s2,s2,a6                                              
  if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {             
40003dfc:   02b97463            bgeu    s2,a1,40003e24 <rtems_rbheap_initialize+0x74>     
  }                                                                                       
                                                                                          
  return sc;                                                                              
}                                                                                         
40003e00:   01c12083            lw  ra,28(sp)                                             
40003e04:   01812403            lw  s0,24(sp)                                             
40003e08:   01412483            lw  s1,20(sp)                                             
40003e0c:   01012903            lw  s2,16(sp)                                             
40003e10:   00c12983            lw  s3,12(sp)                                             
40003e14:   00812a03            lw  s4,8(sp)                                              
40003e18:   02010113            addi    sp,sp,32                                          
40003e1c:   00008067            ret                                                       
  if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {             
40003e20:   0cc5f063            bgeu    a1,a2,40003ee0 <rtems_rbheap_initialize+0x130>    
  uintptr_t excess = value % alignment;                                                   
40003e24:   02d674b3            remu    s1,a2,a3                                          
    sc = RTEMS_INVALID_ADDRESS;                                                           
40003e28:   00900513            li  a0,9                                                  
  return value - excess;                                                                  
40003e2c:   409604b3            sub s1,a2,s1                                              
  if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {             
40003e30:   fc9978e3            bgeu    s2,s1,40003e00 <rtems_rbheap_initialize+0x50>     
  return &the_chain->Tail.Node;                                                           
40003e34:   00440613            addi    a2,s0,4                                           
  return &the_chain->Head.Node;                                                           
40003e38:   00c40a13            addi    s4,s0,12                                          
  return &the_chain->Tail.Node;                                                           
40003e3c:   01040993            addi    s3,s0,16                                          
    (*control->extend_descriptors)(control);                                              
40003e40:   00040513            mv  a0,s0                                                 
  head->next = tail;                                                                      
40003e44:   00c42023            sw  a2,0(s0)                                              
  head->previous = NULL;                                                                  
40003e48:   00042223            sw  zero,4(s0)                                            
  tail->previous = head;                                                                  
40003e4c:   00842423            sw  s0,8(s0)                                              
  head->next = tail;                                                                      
40003e50:   01342623            sw  s3,12(s0)                                             
  head->previous = NULL;                                                                  
40003e54:   00042823            sw  zero,16(s0)                                           
  tail->previous = head;                                                                  
40003e58:   01442a23            sw  s4,20(s0)                                             
 */                                                                                       
RTEMS_INLINE_ROUTINE void _RBTree_Initialize_empty(                                       
  RBTree_Control *the_rbtree                                                              
)                                                                                         
{                                                                                         
  RB_INIT( the_rbtree );                                                                  
40003e5c:   00042c23            sw  zero,24(s0)                                           
    control->alignment = alignment;                                                       
40003e60:   00d42e23            sw  a3,28(s0)                                             
    control->handler_arg = handler_arg;                                                   
40003e64:   02f42223            sw  a5,36(s0)                                             
    control->extend_descriptors = extend_descriptors;                                     
40003e68:   02e42023            sw  a4,32(s0)                                             
    (*control->extend_descriptors)(control);                                              
40003e6c:   000700e7            jalr    a4                                                
  return _Chain_Immutable_head( the_chain )->next;                                        
40003e70:   00c42583            lw  a1,12(s0)                                             
    rtems_rbtree_control *chunk_tree = &control->chunk_tree;                              
40003e74:   01840513            addi    a0,s0,24                                          
  if ( !_Chain_Is_empty(the_chain))                                                       
40003e78:   08b98663            beq s3,a1,40003f04 <rtems_rbheap_initialize+0x154>        
  new_first = old_first->next;                                                            
40003e7c:   0005a703            lw  a4,0(a1)                                              
  before_node           = after_node->next;                                               
40003e80:   00042783            lw  a5,0(s0)                                              
      first->size = aligned_end - aligned_begin;                                          
40003e84:   41248633            sub a2,s1,s2                                              
  head->next = new_first;                                                                 
40003e88:   00e42623            sw  a4,12(s0)                                             
  new_first->previous = head;                                                             
40003e8c:   01472223            sw  s4,4(a4)                                              
      first->begin = aligned_begin;                                                       
40003e90:   0125ac23            sw  s2,24(a1)                                             
      first->size = aligned_end - aligned_begin;                                          
40003e94:   00c5ae23            sw  a2,28(a1)                                             
  the_node->previous    = after_node;                                                     
40003e98:   0085a223            sw  s0,4(a1)                                              
  after_node->next      = the_node;                                                       
40003e9c:   00b42023            sw  a1,0(s0)                                              
  the_node->next        = before_node;                                                    
40003ea0:   00f5a023            sw  a5,0(a1)                                              
  rtems_rbtree_insert(tree, &chunk->tree_node, chunk_compare, true);                      
40003ea4:   40004637            lui a2,0x40004                                            
  before_node->previous = the_node;                                                       
40003ea8:   00b7a223            sw  a1,4(a5)                                              
40003eac:   00100693            li  a3,1                                                  
40003eb0:   d9860613            addi    a2,a2,-616 # 40003d98 <chunk_compare>             
40003eb4:   00858593            addi    a1,a1,8                                           
40003eb8:   444000ef            jal ra,400042fc <rtems_rbtree_insert>                     
}                                                                                         
40003ebc:   01c12083            lw  ra,28(sp)                                             
40003ec0:   01812403            lw  s0,24(sp)                                             
40003ec4:   01412483            lw  s1,20(sp)                                             
40003ec8:   01012903            lw  s2,16(sp)                                             
40003ecc:   00c12983            lw  s3,12(sp)                                             
40003ed0:   00812a03            lw  s4,8(sp)                                              
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
40003ed4:   00000513            li  a0,0                                                  
}                                                                                         
40003ed8:   02010113            addi    sp,sp,32                                          
40003edc:   00008067            ret                                                       
40003ee0:   01c12083            lw  ra,28(sp)                                             
40003ee4:   01812403            lw  s0,24(sp)                                             
40003ee8:   01412483            lw  s1,20(sp)                                             
40003eec:   01012903            lw  s2,16(sp)                                             
40003ef0:   00c12983            lw  s3,12(sp)                                             
40003ef4:   00812a03            lw  s4,8(sp)                                              
    sc = RTEMS_INVALID_ADDRESS;                                                           
40003ef8:   00900513            li  a0,9                                                  
}                                                                                         
40003efc:   02010113            addi    sp,sp,32                                          
40003f00:   00008067            ret                                                       
      sc = RTEMS_NO_MEMORY;                                                               
40003f04:   01a00513            li  a0,26                                                 
  return sc;                                                                              
40003f08:   ef9ff06f            j   40003e00 <rtems_rbheap_initialize+0x50>               
                                                                                          

4000426c <rtems_rbtree_find>: const rtems_rbtree_control *the_rbtree, const rtems_rbtree_node *the_node, rtems_rbtree_compare compare, bool is_unique ) {
4000426c:   fe010113            addi    sp,sp,-32                                         
40004270:   00812c23            sw  s0,24(sp)                                             
  return RB_ROOT( the_rbtree );                                                           
40004274:   00052403            lw  s0,0(a0)                                              
40004278:   00112e23            sw  ra,28(sp)                                             
4000427c:   00912a23            sw  s1,20(sp)                                             
40004280:   01212823            sw  s2,16(sp)                                             
40004284:   01312623            sw  s3,12(sp)                                             
40004288:   01412423            sw  s4,8(sp)                                              
  rtems_rbtree_node *iter_node = rtems_rbtree_root( the_rbtree );                         
  rtems_rbtree_node *found = NULL;                                                        
                                                                                          
  while ( iter_node != NULL ) {                                                           
4000428c:   06040463            beqz    s0,400042f4 <rtems_rbtree_find+0x88>              <== NEVER TAKEN
40004290:   00058493            mv  s1,a1                                                 
40004294:   00060913            mv  s2,a2                                                 
40004298:   00068993            mv  s3,a3                                                 
  rtems_rbtree_node *found = NULL;                                                        
4000429c:   00000a13            li  s4,0                                                  
    rtems_rbtree_compare_result compare_result =                                          
      ( *compare )( the_node, iter_node );                                                
400042a0:   00040593            mv  a1,s0                                                 
400042a4:   00048513            mv  a0,s1                                                 
400042a8:   000900e7            jalr    s2                                                
                                                                                          
    if ( rtems_rbtree_is_equal( compare_result ) ) {                                      
400042ac:   02051c63            bnez    a0,400042e4 <rtems_rbtree_find+0x78>              
400042b0:   00040a13            mv  s4,s0                                                 
      found = iter_node;                                                                  
                                                                                          
      if ( is_unique )                                                                    
400042b4:   00099663            bnez    s3,400042c0 <rtems_rbtree_find+0x54>              
  return RB_LEFT( the_node, Node );                                                       
400042b8:   00042403            lw  s0,0(s0)                                              
  while ( iter_node != NULL ) {                                                           
400042bc:   fe0412e3            bnez    s0,400042a0 <rtems_rbtree_find+0x34>              
      iter_node = rtems_rbtree_left( iter_node );                                         
    }                                                                                     
  }                                                                                       
                                                                                          
  return found;                                                                           
}                                                                                         
400042c0:   01c12083            lw  ra,28(sp)                                             
400042c4:   01812403            lw  s0,24(sp)                                             
400042c8:   01412483            lw  s1,20(sp)                                             
400042cc:   01012903            lw  s2,16(sp)                                             
400042d0:   00c12983            lw  s3,12(sp)                                             
400042d4:   000a0513            mv  a0,s4                                                 
400042d8:   00812a03            lw  s4,8(sp)                                              
400042dc:   02010113            addi    sp,sp,32                                          
400042e0:   00008067            ret                                                       
    if ( rtems_rbtree_is_greater( compare_result ) ) {                                    
400042e4:   fca05ae3            blez    a0,400042b8 <rtems_rbtree_find+0x4c>              
  return RB_RIGHT( the_node, Node );                                                      
400042e8:   00442403            lw  s0,4(s0)                                              
  while ( iter_node != NULL ) {                                                           
400042ec:   fa041ae3            bnez    s0,400042a0 <rtems_rbtree_find+0x34>              
400042f0:   fd1ff06f            j   400042c0 <rtems_rbtree_find+0x54>                     
  rtems_rbtree_node *found = NULL;                                                        
400042f4:   00000a13            li  s4,0                                                  <== NOT EXECUTED
400042f8:   fc9ff06f            j   400042c0 <rtems_rbtree_find+0x54>                     <== NOT EXECUTED
                                                                                          

40004f08 <rtems_rbtree_initialize>:
40004f08:   00052023            sw  zero,0(a0)                                            
  rtems_rbtree_initialize_empty( the_rbtree );                                            
                                                                                          
  count = number_nodes;                                                                   
  next = starting_address;                                                                
                                                                                          
  while ( count-- ) {                                                                     
40004f0c:   08068663            beqz    a3,40004f98 <rtems_rbtree_initialize+0x90>        <== NEVER TAKEN
{                                                                                         
40004f10:   fe010113            addi    sp,sp,-32                                         
40004f14:   00812c23            sw  s0,24(sp)                                             
40004f18:   00912a23            sw  s1,20(sp)                                             
40004f1c:   01212823            sw  s2,16(sp)                                             
40004f20:   01312623            sw  s3,12(sp)                                             
40004f24:   01412423            sw  s4,8(sp)                                              
40004f28:   01512223            sw  s5,4(sp)                                              
40004f2c:   01612023            sw  s6,0(sp)                                              
40004f30:   00112e23            sw  ra,28(sp)                                             
40004f34:   00050913            mv  s2,a0                                                 
40004f38:   00058993            mv  s3,a1                                                 
40004f3c:   00060413            mv  s0,a2                                                 
40004f40:   00070a13            mv  s4,a4                                                 
40004f44:   00078a93            mv  s5,a5                                                 
40004f48:   fff68493            addi    s1,a3,-1 # 3fff <bsp_section_bss_size+0x1657>     
  while ( count-- ) {                                                                     
40004f4c:   fff00b13            li  s6,-1                                                 
    rtems_rbtree_insert( the_rbtree, next, compare, is_unique );                          
40004f50:   00040593            mv  a1,s0                                                 
40004f54:   000a8693            mv  a3,s5                                                 
40004f58:   00098613            mv  a2,s3                                                 
40004f5c:   00090513            mv  a0,s2                                                 
  while ( count-- ) {                                                                     
40004f60:   fff48493            addi    s1,s1,-1                                          
    rtems_rbtree_insert( the_rbtree, next, compare, is_unique );                          
40004f64:   0c8000ef            jal ra,4000502c <rtems_rbtree_insert>                     
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (                                        
  const void *base,                                                                       
  uintptr_t   offset                                                                      
)                                                                                         
{                                                                                         
  return (void *)((uintptr_t)base + offset);                                              
40004f68:   01440433            add s0,s0,s4                                              
  while ( count-- ) {                                                                     
40004f6c:   ff6492e3            bne s1,s6,40004f50 <rtems_rbtree_initialize+0x48>         
    next = (rtems_rbtree_node *) _Addresses_Add_offset( next, node_size );                
  }                                                                                       
}                                                                                         
40004f70:   01c12083            lw  ra,28(sp)                                             
40004f74:   01812403            lw  s0,24(sp)                                             
40004f78:   01412483            lw  s1,20(sp)                                             
40004f7c:   01012903            lw  s2,16(sp)                                             
40004f80:   00c12983            lw  s3,12(sp)                                             
40004f84:   00812a03            lw  s4,8(sp)                                              
40004f88:   00412a83            lw  s5,4(sp)                                              
40004f8c:   00012b03            lw  s6,0(sp)                                              
40004f90:   02010113            addi    sp,sp,32                                          
40004f94:   00008067            ret                                                       
40004f98:   00008067            ret                                                       <== NOT EXECUTED