RTEMS-6
Annotated Report
libblock
Sun Feb 28 12:42:00 2021

40011c3c <ramdisk_allocate>:                                                              
  void *area_begin,                                                                       
  uint32_t media_block_size,                                                              
  rtems_blkdev_bnum media_block_count,                                                    
  bool trace                                                                              
)                                                                                         
{                                                                                         
40011c3c:   fe010113            addi    sp,sp,-32                                         
40011c40:   00912a23            sw  s1,20(sp)                                             
40011c44:   01312623            sw  s3,12(sp)                                             
40011c48:   00050493            mv  s1,a0                                                 
40011c4c:   00058993            mv  s3,a1                                                 
  struct ramdisk *rd = calloc(1, sizeof(*rd));                                            
40011c50:   00100513            li  a0,1                                                  
40011c54:   01000593            li  a1,16                                                 
{                                                                                         
40011c58:   00812c23            sw  s0,24(sp)                                             
40011c5c:   01212823            sw  s2,16(sp)                                             
40011c60:   01412423            sw  s4,8(sp)                                              
40011c64:   00112e23            sw  ra,28(sp)                                             
40011c68:   00060913            mv  s2,a2                                                 
40011c6c:   00068a13            mv  s4,a3                                                 
  struct ramdisk *rd = calloc(1, sizeof(*rd));                                            
40011c70:   110000ef            jal ra,40011d80 <calloc>                                  
40011c74:   00050413            mv  s0,a0                                                 
                                                                                          
  if (rd == NULL) {                                                                       
40011c78:   02050063            beqz    a0,40011c98 <ramdisk_allocate+0x5c>               <== NEVER TAKEN
    return NULL;                                                                          
  }                                                                                       
                                                                                          
  if (area_begin == NULL) {                                                               
40011c7c:   04048063            beqz    s1,40011cbc <ramdisk_allocate+0x80>               
  }                                                                                       
  rd->block_size = media_block_size;                                                      
  rd->block_num = media_block_count;                                                      
  rd->area = area_begin;                                                                  
  rd->trace = trace;                                                                      
  rd->initialized = true;                                                                 
40011c80:   00100793            li  a5,1                                                  
  rd->block_size = media_block_size;                                                      
40011c84:   01342023            sw  s3,0(s0)                                              
  rd->block_num = media_block_count;                                                      
40011c88:   01242223            sw  s2,4(s0)                                              
  rd->area = area_begin;                                                                  
40011c8c:   00942423            sw  s1,8(s0)                                              
  rd->trace = trace;                                                                      
40011c90:   01440723            sb  s4,14(s0)                                             
  rd->initialized = true;                                                                 
40011c94:   00f40623            sb  a5,12(s0)                                             
                                                                                          
  return rd;                                                                              
}                                                                                         
40011c98:   01c12083            lw  ra,28(sp)                                             
40011c9c:   00040513            mv  a0,s0                                                 
40011ca0:   01812403            lw  s0,24(sp)                                             
40011ca4:   01412483            lw  s1,20(sp)                                             
40011ca8:   01012903            lw  s2,16(sp)                                             
40011cac:   00c12983            lw  s3,12(sp)                                             
40011cb0:   00812a03            lw  s4,8(sp)                                              
40011cb4:   02010113            addi    sp,sp,32                                          
40011cb8:   00008067            ret                                                       
    area_begin = calloc(media_block_count, media_block_size);                             
40011cbc:   00098593            mv  a1,s3                                                 
40011cc0:   00090513            mv  a0,s2                                                 
40011cc4:   0bc000ef            jal ra,40011d80 <calloc>                                  
40011cc8:   00050493            mv  s1,a0                                                 
    if (area_begin == NULL) {                                                             
40011ccc:   00050863            beqz    a0,40011cdc <ramdisk_allocate+0xa0>               <== NEVER TAKEN
    rd->malloced = true;                                                                  
40011cd0:   00100793            li  a5,1                                                  
40011cd4:   00f406a3            sb  a5,13(s0)                                             
40011cd8:   fa9ff06f            j   40011c80 <ramdisk_allocate+0x44>                      
      free(rd);                                                                           
40011cdc:   00040513            mv  a0,s0                                                 <== NOT EXECUTED
40011ce0:   8a8f00ef            jal ra,40001d88 <free>                                    <== NOT EXECUTED
      return NULL;                                                                        
40011ce4:   00000413            li  s0,0                                                  <== NOT EXECUTED
40011ce8:   fb1ff06f            j   40011c98 <ramdisk_allocate+0x5c>                      <== NOT EXECUTED
                                                                                          

400027d0 <ramdisk_free>: return rd; } void ramdisk_free(ramdisk *rd) { if (rd != NULL) {
400027d0:   04050663            beqz    a0,4000281c <ramdisk_free+0x4c>                   <== NEVER TAKEN
    if (rd->malloced) {                                                                   
400027d4:   00d54783            lbu a5,13(a0)                                             
{                                                                                         
400027d8:   ff010113            addi    sp,sp,-16                                         
400027dc:   00812423            sw  s0,8(sp)                                              
400027e0:   00112623            sw  ra,12(sp)                                             
400027e4:   00050413            mv  s0,a0                                                 
    if (rd->malloced) {                                                                   
400027e8:   00079c63            bnez    a5,40002800 <ramdisk_free+0x30>                   
      free(rd->area);                                                                     
    }                                                                                     
    free(rd);                                                                             
400027ec:   00040513            mv  a0,s0                                                 
  }                                                                                       
}                                                                                         
400027f0:   00812403            lw  s0,8(sp)                                              
400027f4:   00c12083            lw  ra,12(sp)                                             
400027f8:   01010113            addi    sp,sp,16                                          
    free(rd);                                                                             
400027fc:   2b40006f            j   40002ab0 <free>                                       
      free(rd->area);                                                                     
40002800:   00852503            lw  a0,8(a0)                                              
40002804:   2ac000ef            jal ra,40002ab0 <free>                                    
    free(rd);                                                                             
40002808:   00040513            mv  a0,s0                                                 
}                                                                                         
4000280c:   00812403            lw  s0,8(sp)                                              
40002810:   00c12083            lw  ra,12(sp)                                             
40002814:   01010113            addi    sp,sp,16                                          
    free(rd);                                                                             
40002818:   2980006f            j   40002ab0 <free>                                       
4000281c:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40002530 <ramdisk_initialize>: rtems_device_driver ramdisk_initialize( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void *arg RTEMS_UNUSED) {
40002530:   fb010113            addi    sp,sp,-80                                         
40002534:   03512a23            sw  s5,52(sp)                                             
40002538:   04912223            sw  s1,68(sp)                                             
     * This is allocating memory for a RAM disk which will persist for                    
     * the life of the system. RTEMS has no "de-initialize" driver call                   
     * so there is no corresponding free(r).  Coverity is correct that                    
     * it is never freed but this is not a problem.                                       
     */                                                                                   
    r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));                 
4000253c:   8dc1a483            lw  s1,-1828(gp) # 40020d1c <rtems_ramdisk_configuration_size>
40002540:   01000593            li  a1,16                                                 
{                                                                                         
40002544:   04112623            sw  ra,76(sp)                                             
    r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));                 
40002548:   00048513            mv  a0,s1                                                 
{                                                                                         
4000254c:   04812423            sw  s0,72(sp)                                             
40002550:   05212023            sw  s2,64(sp)                                             
40002554:   03312e23            sw  s3,60(sp)                                             
40002558:   03412c23            sw  s4,56(sp)                                             
4000255c:   03612823            sw  s6,48(sp)                                             
40002560:   03712623            sw  s7,44(sp)                                             
    r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));                 
40002564:   320000ef            jal ra,40002884 <calloc>                                  
    r->trace = false;                                                                     
40002568:   00050723            sb  zero,14(a0)                                           
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)                      
4000256c:   08048c63            beqz    s1,40002604 <ramdisk_initialize+0xd4>             <== NEVER TAKEN
    rtems_ramdisk_config *c = rtems_ramdisk_configuration;                                
40002570:   400204b7            lui s1,0x40020                                            
    {                                                                                     
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";                                      
40002574:   76656a37            lui s4,0x76656                                            
40002578:   616479b7            lui s3,0x61647                                            
4000257c:   00050413            mv  s0,a0                                                 
    rtems_ramdisk_config *c = rtems_ramdisk_configuration;                                
40002580:   6c048493            addi    s1,s1,1728 # 400206c0 <rtems_ramdisk_configuration>
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)                      
40002584:   00000913            li  s2,0                                                  
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";                                      
40002588:   42fa0a13            addi    s4,s4,1071 # 7665642f <RamEnd+0x3565642f>         
4000258c:   22f98993            addi    s3,s3,559 # 6164722f <RamEnd+0x2064722f>          
        {                                                                                 
            r->malloced = false;                                                          
            r->initialized = true;                                                        
            r->area = c->location;                                                        
        }                                                                                 
        rc = rtems_blkdev_create(name, c->block_size, c->block_num,                       
40002590:   40002bb7            lui s7,0x40002                                            
            r->initialized = true;                                                        
40002594:   00100b13            li  s6,1                                                  
        r->block_size = c->block_size;                                                    
40002598:   0004a583            lw  a1,0(s1)                                              
        r->block_num = c->block_num;                                                      
4000259c:   0044a603            lw  a2,4(s1)                                              
        if (c->location == NULL)                                                          
400025a0:   0084a703            lw  a4,8(s1)                                              
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";                                      
400025a4:   01312c23            sw  s3,24(sp)                                             
        name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;                                 
400025a8:   06190793            addi    a5,s2,97                                          
        r->block_size = c->block_size;                                                    
400025ac:   00b42023            sw  a1,0(s0)                                              
        r->block_num = c->block_num;                                                      
400025b0:   00c42223            sw  a2,4(s0)                                              
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";                                      
400025b4:   01412a23            sw  s4,20(sp)                                             
400025b8:   00010e23            sb  zero,28(sp)                                           
        name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;                                 
400025bc:   00f10da3            sb  a5,27(sp)                                             
        if (c->location == NULL)                                                          
400025c0:   08070063            beqz    a4,40002640 <ramdisk_initialize+0x110>            
            r->malloced = false;                                                          
400025c4:   000406a3            sb  zero,13(s0)                                           
            r->initialized = true;                                                        
400025c8:   01640623            sb  s6,12(s0)                                             
            r->area = c->location;                                                        
400025cc:   00e42423            sw  a4,8(s0)                                              
        rc = rtems_blkdev_create(name, c->block_size, c->block_num,                       
400025d0:   00040713            mv  a4,s0                                                 
400025d4:   66cb8693            addi    a3,s7,1644 # 4000266c <ramdisk_ioctl>             
400025d8:   01410513            addi    a0,sp,20                                          
400025dc:   d08ff0ef            jal ra,40001ae4 <rtems_blkdev_create>                     
                                 ramdisk_ioctl, r);                                       
        if (rc != RTEMS_SUCCESSFUL)                                                       
400025e0:   00050863            beqz    a0,400025f0 <ramdisk_initialize+0xc0>             <== ALWAYS TAKEN
        {                                                                                 
            if (r->malloced)                                                              
400025e4:   00d44783            lbu a5,13(s0)                                             <== NOT EXECUTED
400025e8:   04079663            bnez    a5,40002634 <ramdisk_initialize+0x104>            <== NOT EXECUTED
            {                                                                             
                free(r->area);                                                            
            }                                                                             
            r->initialized = false;                                                       
400025ec:   00040623            sb  zero,12(s0)                                           <== NOT EXECUTED
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)                      
400025f0:   8dc1a783            lw  a5,-1828(gp) # 40020d1c <rtems_ramdisk_configuration_size>
400025f4:   00190913            addi    s2,s2,1                                           
400025f8:   00c48493            addi    s1,s1,12                                          
400025fc:   01040413            addi    s0,s0,16                                          
40002600:   f8f96ce3            bltu    s2,a5,40002598 <ramdisk_initialize+0x68>          
        }                                                                                 
    }                                                                                     
    return RTEMS_SUCCESSFUL;                                                              
}                                                                                         
40002604:   04c12083            lw  ra,76(sp)                                             
40002608:   04812403            lw  s0,72(sp)                                             
4000260c:   04412483            lw  s1,68(sp)                                             
40002610:   04012903            lw  s2,64(sp)                                             
40002614:   03c12983            lw  s3,60(sp)                                             
40002618:   03812a03            lw  s4,56(sp)                                             
4000261c:   03412a83            lw  s5,52(sp)                                             
40002620:   03012b03            lw  s6,48(sp)                                             
40002624:   02c12b83            lw  s7,44(sp)                                             
40002628:   00000513            li  a0,0                                                  
4000262c:   05010113            addi    sp,sp,80                                          
40002630:   00008067            ret                                                       
                free(r->area);                                                            
40002634:   00842503            lw  a0,8(s0)                                              <== NOT EXECUTED
40002638:   478000ef            jal ra,40002ab0 <free>                                    <== NOT EXECUTED
4000263c:   fb1ff06f            j   400025ec <ramdisk_initialize+0xbc>                    <== NOT EXECUTED
            r->area = malloc(r->block_size * r->block_num);                               
40002640:   02c58533            mul a0,a1,a2                                              
            r->malloced = true;                                                           
40002644:   016406a3            sb  s6,13(s0)                                             
            r->area = malloc(r->block_size * r->block_num);                               
40002648:   00c12623            sw  a2,12(sp)                                             
4000264c:   00b12423            sw  a1,8(sp)                                              
40002650:   1b5000ef            jal ra,40003004 <malloc>                                  
40002654:   00a42423            sw  a0,8(s0)                                              
            if (r->area == NULL) /* No enough memory for this disk */                     
40002658:   00812583            lw  a1,8(sp)                                              
4000265c:   00c12603            lw  a2,12(sp)                                             
40002660:   f80506e3            beqz    a0,400025ec <ramdisk_initialize+0xbc>             <== NEVER TAKEN
                r->initialized = true;                                                    
40002664:   01640623            sb  s6,12(s0)                                             
40002668:   f69ff06f            j   400025d0 <ramdisk_initialize+0xa0>                    
                                                                                          

4000266c <ramdisk_ioctl>: return 0; } int ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) {
4000266c:   fe010113            addi    sp,sp,-32                                         
    struct ramdisk *rd = rtems_disk_get_driver_data(dd);                                  
                                                                                          
    switch (req)                                                                          
40002670:   20004737            lui a4,0x20004                                            
{                                                                                         
40002674:   01312623            sw  s3,12(sp)                                             
40002678:   00112e23            sw  ra,28(sp)                                             
4000267c:   00812c23            sw  s0,24(sp)                                             
40002680:   00912a23            sw  s1,20(sp)                                             
40002684:   01212823            sw  s2,16(sp)                                             
40002688:   01412423            sw  s4,8(sp)                                              
    switch (req)                                                                          
4000268c:   20770713            addi    a4,a4,519 # 20004207 <RamSize+0x1f004207>         
                                                                                          
static inline void *rtems_disk_get_driver_data(                                           
  const rtems_disk_device *dd                                                             
)                                                                                         
{                                                                                         
  return dd->driver_data;                                                                 
40002690:   03c52983            lw  s3,60(a0)                                             
40002694:   08e58c63            beq a1,a4,4000272c <ramdisk_ioctl+0xc0>                   
40002698:   c0184737            lui a4,0xc0184                                            
4000269c:   20170713            addi    a4,a4,513 # c0184201 <RamEnd+0x7f184201>          
400026a0:   0ce59263            bne a1,a4,40002764 <ramdisk_ioctl+0xf8>                   
    {                                                                                     
        case RTEMS_BLKIO_REQUEST:                                                         
        {                                                                                 
            rtems_blkdev_request *r = argp;                                               
                                                                                          
            switch (r->req)                                                               
400026a4:   00062903            lw  s2,0(a2)                                              
400026a8:   00060413            mv  s0,a2                                                 
400026ac:   0c090c63            beqz    s2,40002784 <ramdisk_ioctl+0x118>                 
400026b0:   00100793            li  a5,1                                                  
400026b4:   08f91063            bne s2,a5,40002734 <ramdisk_ioctl+0xc8>                   
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400026b8:   01062783            lw  a5,16(a2)                                             
    uint8_t *to = rd->area;                                                               
400026bc:   0089aa03            lw  s4,8(s3)                                              
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400026c0:   01860493            addi    s1,a2,24                                          
400026c4:   02078a63            beqz    a5,400026f8 <ramdisk_ioctl+0x8c>                  <== NEVER TAKEN
400026c8:   00000913            li  s2,0                                                  
        memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);                
400026cc:   0004a503            lw  a0,0(s1)                                              
400026d0:   0009a783            lw  a5,0(s3)                                              
400026d4:   0044a603            lw  a2,4(s1)                                              
400026d8:   0084a583            lw  a1,8(s1)                                              
400026dc:   02f50533            mul a0,a0,a5                                              
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400026e0:   00190913            addi    s2,s2,1                                           
400026e4:   01048493            addi    s1,s1,16                                          
        memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);                
400026e8:   00aa0533            add a0,s4,a0                                              
400026ec:   56c120ef            jal ra,40014c58 <memcpy>                                  
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400026f0:   01042783            lw  a5,16(s0)                                             
400026f4:   fcf96ce3            bltu    s2,a5,400026cc <ramdisk_ioctl+0x60>               
  (*req->done)(req, status);                                                              
400026f8:   00442783            lw  a5,4(s0)                                              
400026fc:   00040513            mv  a0,s0                                                 
40002700:   00000593            li  a1,0                                                  
40002704:   000780e7            jalr    a5                                                
            break;                                                                        
    }                                                                                     
                                                                                          
    errno = EINVAL;                                                                       
    return -1;                                                                            
}                                                                                         
40002708:   01c12083            lw  ra,28(sp)                                             
4000270c:   01812403            lw  s0,24(sp)                                             
40002710:   01412483            lw  s1,20(sp)                                             
40002714:   01012903            lw  s2,16(sp)                                             
40002718:   00c12983            lw  s3,12(sp)                                             
4000271c:   00812a03            lw  s4,8(sp)                                              
                    return ramdisk_write(rd, r);                                          
40002720:   00000513            li  a0,0                                                  
}                                                                                         
40002724:   02010113            addi    sp,sp,32                                          
40002728:   00008067            ret                                                       
            if (rd->free_at_delete_request) {                                             
4000272c:   00f9c783            lbu a5,15(s3)                                             
40002730:   08079a63            bnez    a5,400027c4 <ramdisk_ioctl+0x158>                 
    errno = EINVAL;                                                                       
40002734:   795110ef            jal ra,400146c8 <__errno>                                 
}                                                                                         
40002738:   01c12083            lw  ra,28(sp)                                             
4000273c:   01812403            lw  s0,24(sp)                                             
    errno = EINVAL;                                                                       
40002740:   01600793            li  a5,22                                                 
40002744:   00f52023            sw  a5,0(a0)                                              
}                                                                                         
40002748:   01412483            lw  s1,20(sp)                                             
4000274c:   01012903            lw  s2,16(sp)                                             
40002750:   00c12983            lw  s3,12(sp)                                             
40002754:   00812a03            lw  s4,8(sp)                                              
    return -1;                                                                            
40002758:   fff00513            li  a0,-1                                                 
}                                                                                         
4000275c:   02010113            addi    sp,sp,32                                          
40002760:   00008067            ret                                                       
40002764:   01812403            lw  s0,24(sp)                                             
40002768:   01c12083            lw  ra,28(sp)                                             
4000276c:   01412483            lw  s1,20(sp)                                             
40002770:   01012903            lw  s2,16(sp)                                             
40002774:   00c12983            lw  s3,12(sp)                                             
40002778:   00812a03            lw  s4,8(sp)                                              
4000277c:   02010113            addi    sp,sp,32                                          
            return rtems_blkdev_ioctl (dd, req, argp);                                    
40002780:   7690b06f            j   4000e6e8 <rtems_blkdev_ioctl>                         
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
40002784:   01062783            lw  a5,16(a2)                                             
    uint8_t *from = rd->area;                                                             
40002788:   0089aa03            lw  s4,8(s3)                                              
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
4000278c:   01860493            addi    s1,a2,24                                          
40002790:   f60784e3            beqz    a5,400026f8 <ramdisk_ioctl+0x8c>                  <== NEVER TAKEN
        memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);              
40002794:   0004a583            lw  a1,0(s1)                                              
40002798:   0009a783            lw  a5,0(s3)                                              
4000279c:   0044a603            lw  a2,4(s1)                                              
400027a0:   0084a503            lw  a0,8(s1)                                              
400027a4:   02f585b3            mul a1,a1,a5                                              
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400027a8:   00190913            addi    s2,s2,1                                           
400027ac:   01048493            addi    s1,s1,16                                          
        memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);              
400027b0:   00ba05b3            add a1,s4,a1                                              
400027b4:   4a4120ef            jal ra,40014c58 <memcpy>                                  
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)                               
400027b8:   01042783            lw  a5,16(s0)                                             
400027bc:   fcf96ce3            bltu    s2,a5,40002794 <ramdisk_ioctl+0x128>              
400027c0:   f39ff06f            j   400026f8 <ramdisk_ioctl+0x8c>                         
              ramdisk_free(rd);                                                           
400027c4:   00098513            mv  a0,s3                                                 
400027c8:   008000ef            jal ra,400027d0 <ramdisk_free>                            
400027cc:   f69ff06f            j   40002734 <ramdisk_ioctl+0xc8>                         
                                                                                          

40001a50 <ramdisk_register>: uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace, const char *disk ) {
40001a50:   fe010113            addi    sp,sp,-32                                         
40001a54:   00060713            mv  a4,a2                                                 
40001a58:   00912a23            sw  s1,20(sp)                                             
40001a5c:   01212823            sw  s2,16(sp)                                             
40001a60:   01312623            sw  s3,12(sp)                                             
40001a64:   00050493            mv  s1,a0                                                 
40001a68:   00058913            mv  s2,a1                                                 
40001a6c:   00068993            mv  s3,a3                                                 
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  ramdisk *rd = NULL;                                                                     
                                                                                          
  rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);                
40001a70:   00058613            mv  a2,a1                                                 
40001a74:   00070693            mv  a3,a4                                                 
40001a78:   00050593            mv  a1,a0                                                 
40001a7c:   00000513            li  a0,0                                                  
{                                                                                         
40001a80:   00112e23            sw  ra,28(sp)                                             
40001a84:   00812c23            sw  s0,24(sp)                                             
  rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);                
40001a88:   1b4100ef            jal ra,40011c3c <ramdisk_allocate>                        
  if (rd == NULL) {                                                                       
40001a8c:   04050263            beqz    a0,40001ad0 <ramdisk_register+0x80>               <== NEVER TAKEN
    return RTEMS_UNSATISFIED;                                                             
  }                                                                                       
                                                                                          
  sc = rtems_blkdev_create(                                                               
40001a90:   400126b7            lui a3,0x40012                                            
40001a94:   00050413            mv  s0,a0                                                 
40001a98:   00050713            mv  a4,a0                                                 
40001a9c:   ad868693            addi    a3,a3,-1320 # 40011ad8 <ramdisk_ioctl>            
40001aa0:   00090613            mv  a2,s2                                                 
40001aa4:   00048593            mv  a1,s1                                                 
40001aa8:   00098513            mv  a0,s3                                                 
40001aac:   6890f0ef            jal ra,40011934 <rtems_blkdev_create>                     
    media_block_size,                                                                     
    media_block_count,                                                                    
    ramdisk_ioctl,                                                                        
    rd                                                                                    
  );                                                                                      
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001ab0:   04051063            bnez    a0,40001af0 <ramdisk_register+0xa0>               <== NEVER TAKEN
                                                                                          
    return RTEMS_UNSATISFIED;                                                             
  }                                                                                       
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
}                                                                                         
40001ab4:   01c12083            lw  ra,28(sp)                                             
40001ab8:   01812403            lw  s0,24(sp)                                             
40001abc:   01412483            lw  s1,20(sp)                                             
40001ac0:   01012903            lw  s2,16(sp)                                             
40001ac4:   00c12983            lw  s3,12(sp)                                             
40001ac8:   02010113            addi    sp,sp,32                                          
40001acc:   00008067            ret                                                       
40001ad0:   01c12083            lw  ra,28(sp)                                             <== NOT EXECUTED
40001ad4:   01812403            lw  s0,24(sp)                                             <== NOT EXECUTED
40001ad8:   01412483            lw  s1,20(sp)                                             <== NOT EXECUTED
40001adc:   01012903            lw  s2,16(sp)                                             <== NOT EXECUTED
40001ae0:   00c12983            lw  s3,12(sp)                                             <== NOT EXECUTED
    return RTEMS_UNSATISFIED;                                                             
40001ae4:   00d00513            li  a0,13                                                 <== NOT EXECUTED
}                                                                                         
40001ae8:   02010113            addi    sp,sp,32                                          <== NOT EXECUTED
40001aec:   00008067            ret                                                       <== NOT EXECUTED
    ramdisk_free(rd);                                                                     
40001af0:   00040513            mv  a0,s0                                                 <== NOT EXECUTED
40001af4:   1f8100ef            jal ra,40011cec <ramdisk_free>                            <== NOT EXECUTED
    return RTEMS_UNSATISFIED;                                                             
40001af8:   00d00513            li  a0,13                                                 <== NOT EXECUTED
40001afc:   fb9ff06f            j   40001ab4 <ramdisk_register+0x64>                      <== NOT EXECUTED
                                                                                          

4000ddd4 <rtems_bdbuf_get>: {
4000ddd4:   fe010113            addi    sp,sp,-32                                         
4000ddd8:   01212823            sw  s2,16(sp)                                             
4000dddc:   40023937            lui s2,0x40023                                            
4000dde0:   08090913            addi    s2,s2,128 # 40023080 <bdbuf_cache+0x28>           
4000dde4:   00912a23            sw  s1,20(sp)                                             
4000dde8:   00050493            mv  s1,a0                                                 
4000ddec:   00090513            mv  a0,s2                                                 
4000ddf0:   00812c23            sw  s0,24(sp)                                             
4000ddf4:   01312623            sw  s3,12(sp)                                             
4000ddf8:   00112e23            sw  ra,28(sp)                                             
4000ddfc:   00058413            mv  s0,a1                                                 
4000de00:   00060993            mv  s3,a2                                                 
4000de04:   c8dfa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  if (block < dd->block_count)                                                            
4000de08:   0284a783            lw  a5,40(s1)                                             
4000de0c:   0af47063            bgeu    s0,a5,4000deac <rtems_bdbuf_get+0xd8>             
  if (dd->block_to_media_block_shift >= 0)                                                
4000de10:   0304a583            lw  a1,48(s1)                                             
4000de14:   0605c463            bltz    a1,4000de7c <rtems_bdbuf_get+0xa8>                <== NEVER TAKEN
    return block << dd->block_to_media_block_shift;                                       
4000de18:   00b41433            sll s0,s0,a1                                              
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;                   
4000de1c:   0184a583            lw  a1,24(s1)                                             
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);                             
4000de20:   00048513            mv  a0,s1                                                 
4000de24:   00b405b3            add a1,s0,a1                                              
4000de28:   be1ff0ef            jal ra,4000da08 <rtems_bdbuf_get_buffer_for_access>       
4000de2c:   00050413            mv  s0,a0                                                 
    switch (bd->state)                                                                    
4000de30:   02052503            lw  a0,32(a0)                                             
4000de34:   00200793            li  a5,2                                                  
4000de38:   08f50063            beq a0,a5,4000deb8 <rtems_bdbuf_get+0xe4>                 
4000de3c:   00700793            li  a5,7                                                  
4000de40:   04f51e63            bne a0,a5,4000de9c <rtems_bdbuf_get+0xc8>                 
  bd->state = state;                                                                      
4000de44:   00400793            li  a5,4                                                  
4000de48:   02f42023            sw  a5,32(s0)                                             
}                                                                                         
4000de4c:   00000493            li  s1,0                                                  
  _Mutex_Release( mutex );                                                                
4000de50:   00090513            mv  a0,s2                                                 
4000de54:   cadfa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000de58:   01c12083            lw  ra,28(sp)                                             
  *bd_ptr = bd;                                                                           
4000de5c:   0089a023            sw  s0,0(s3)                                              
}                                                                                         
4000de60:   01812403            lw  s0,24(sp)                                             
4000de64:   01012903            lw  s2,16(sp)                                             
4000de68:   00c12983            lw  s3,12(sp)                                             
4000de6c:   00048513            mv  a0,s1                                                 
4000de70:   01412483            lw  s1,20(sp)                                             
4000de74:   02010113            addi    sp,sp,32                                          
4000de78:   00008067            ret                                                       
      ((((uint64_t) block) * dd->block_size) / dd->media_block_size);                     
4000de7c:   0244a503            lw  a0,36(s1)                                             <== NOT EXECUTED
4000de80:   0204a603            lw  a2,32(s1)                                             <== NOT EXECUTED
4000de84:   00000693            li  a3,0                                                  <== NOT EXECUTED
4000de88:   02a435b3            mulhu   a1,s0,a0                                          <== NOT EXECUTED
4000de8c:   02a40533            mul a0,s0,a0                                              <== NOT EXECUTED
4000de90:   325050ef            jal ra,400139b4 <__udivdi3>                               <== NOT EXECUTED
4000de94:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
    return (rtems_blkdev_bnum)                                                            
4000de98:   f85ff06f            j   4000de1c <rtems_bdbuf_get+0x48>                       <== NOT EXECUTED
    switch (bd->state)                                                                    
4000de9c:   00100793            li  a5,1                                                  
4000dea0:   02f50463            beq a0,a5,4000dec8 <rtems_bdbuf_get+0xf4>                 
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2);              
4000dea4:   00a00593            li  a1,10                                                 <== NOT EXECUTED
4000dea8:   828fe0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
    sc = RTEMS_INVALID_ID;                                                                
4000deac:   00400493            li  s1,4                                                  <== NOT EXECUTED
  rtems_bdbuf_buffer *bd = NULL;                                                          
4000deb0:   00000413            li  s0,0                                                  <== NOT EXECUTED
4000deb4:   f9dff06f            j   4000de50 <rtems_bdbuf_get+0x7c>                       <== NOT EXECUTED
  bd->state = state;                                                                      
4000deb8:   00300793            li  a5,3                                                  
4000debc:   02f42023            sw  a5,32(s0)                                             
}                                                                                         
4000dec0:   00000493            li  s1,0                                                  
4000dec4:   f8dff06f            j   4000de50 <rtems_bdbuf_get+0x7c>                       
  bd->state = state;                                                                      
4000dec8:   00500793            li  a5,5                                                  
4000decc:   02f42023            sw  a5,32(s0)                                             
}                                                                                         
4000ded0:   00000493            li  s1,0                                                  
4000ded4:   f7dff06f            j   4000de50 <rtems_bdbuf_get+0x7c>                       
                                                                                          

4000ded8 <rtems_bdbuf_read>: {
4000ded8:   fe010113            addi    sp,sp,-32                                         
4000dedc:   01312623            sw  s3,12(sp)                                             
  _Mutex_Acquire( mutex );                                                                
4000dee0:   400239b7            lui s3,0x40023                                            
4000dee4:   05898993            addi    s3,s3,88 # 40023058 <bdbuf_cache>                 
4000dee8:   01612023            sw  s6,0(sp)                                              
4000deec:   02898b13            addi    s6,s3,40                                          
4000def0:   00812c23            sw  s0,24(sp)                                             
4000def4:   00050413            mv  s0,a0                                                 
4000def8:   000b0513            mv  a0,s6                                                 
4000defc:   01212823            sw  s2,16(sp)                                             
4000df00:   01412423            sw  s4,8(sp)                                              
4000df04:   00112e23            sw  ra,28(sp)                                             
4000df08:   00912a23            sw  s1,20(sp)                                             
4000df0c:   01512223            sw  s5,4(sp)                                              
4000df10:   00058913            mv  s2,a1                                                 
4000df14:   00060a13            mv  s4,a2                                                 
4000df18:   b79fa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  if (block < dd->block_count)                                                            
4000df1c:   02842783            lw  a5,40(s0)                                             
4000df20:   06f97463            bgeu    s2,a5,4000df88 <rtems_bdbuf_read+0xb0>            
  if (dd->block_to_media_block_shift >= 0)                                                
4000df24:   03042503            lw  a0,48(s0)                                             
    return block << dd->block_to_media_block_shift;                                       
4000df28:   00a917b3            sll a5,s2,a0                                              
  if (dd->block_to_media_block_shift >= 0)                                                
4000df2c:   02054e63            bltz    a0,4000df68 <rtems_bdbuf_read+0x90>               <== NEVER TAKEN
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;                   
4000df30:   01842583            lw  a1,24(s0)                                             
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);                             
4000df34:   00040513            mv  a0,s0                                                 
4000df38:   00b785b3            add a1,a5,a1                                              
4000df3c:   acdff0ef            jal ra,4000da08 <rtems_bdbuf_get_buffer_for_access>       
4000df40:   00050493            mv  s1,a0                                                 
    switch (bd->state)                                                                    
4000df44:   02052503            lw  a0,32(a0)                                             
4000df48:   00200793            li  a5,2                                                  
4000df4c:   14f50a63            beq a0,a5,4000e0a0 <rtems_bdbuf_read+0x1c8>               
4000df50:   00700793            li  a5,7                                                  
4000df54:   0ef50a63            beq a0,a5,4000e048 <rtems_bdbuf_read+0x170>               
4000df58:   00100793            li  a5,1                                                  
4000df5c:   06f50663            beq a0,a5,4000dfc8 <rtems_bdbuf_read+0xf0>                
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);              
4000df60:   00b00593            li  a1,11                                                 <== NOT EXECUTED
4000df64:   f6dfd0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
      ((((uint64_t) block) * dd->block_size) / dd->media_block_size);                     
4000df68:   02442503            lw  a0,36(s0)                                             <== NOT EXECUTED
4000df6c:   02042603            lw  a2,32(s0)                                             <== NOT EXECUTED
4000df70:   00000693            li  a3,0                                                  <== NOT EXECUTED
4000df74:   02a935b3            mulhu   a1,s2,a0                                          <== NOT EXECUTED
4000df78:   02a90533            mul a0,s2,a0                                              <== NOT EXECUTED
4000df7c:   239050ef            jal ra,400139b4 <__udivdi3>                               <== NOT EXECUTED
4000df80:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
    return (rtems_blkdev_bnum)                                                            
4000df84:   fadff06f            j   4000df30 <rtems_bdbuf_read+0x58>                      <== NOT EXECUTED
  rtems_bdbuf_buffer   *bd = NULL;                                                        
4000df88:   00000493            li  s1,0                                                  <== NOT EXECUTED
    sc = RTEMS_INVALID_ID;                                                                
4000df8c:   00400a93            li  s5,4                                                  <== NOT EXECUTED
  _Mutex_Release( mutex );                                                                
4000df90:   000b0513            mv  a0,s6                                                 
4000df94:   b6dfa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000df98:   01c12083            lw  ra,28(sp)                                             
4000df9c:   01812403            lw  s0,24(sp)                                             
  *bd_ptr = bd;                                                                           
4000dfa0:   009a2023            sw  s1,0(s4) # 1000 <_ISR_Stack_size>                     
}                                                                                         
4000dfa4:   01012903            lw  s2,16(sp)                                             
4000dfa8:   01412483            lw  s1,20(sp)                                             
4000dfac:   00c12983            lw  s3,12(sp)                                             
4000dfb0:   00812a03            lw  s4,8(sp)                                              
4000dfb4:   00012b03            lw  s6,0(sp)                                              
4000dfb8:   000a8513            mv  a0,s5                                                 
4000dfbc:   00412a83            lw  s5,4(sp)                                              
4000dfc0:   02010113            addi    sp,sp,32                                          
4000dfc4:   00008067            ret                                                       
        ++dd->stats.read_misses;                                                          
4000dfc8:   04842783            lw  a5,72(s0)                                             
  if (dd->read_ahead.trigger != block)                                                    
4000dfcc:   06c42703            lw  a4,108(s0)                                            
        ++dd->stats.read_misses;                                                          
4000dfd0:   00178793            addi    a5,a5,1                                           
4000dfd4:   04f42423            sw  a5,72(s0)                                             
  if (dd->read_ahead.trigger != block)                                                    
4000dfd8:   02e90663            beq s2,a4,4000e004 <rtems_bdbuf_read+0x12c>               
  return node->next == NULL;                                                              
4000dfdc:   06442783            lw  a5,100(s0)                                            
  if (rtems_bdbuf_is_read_ahead_active (dd))                                              
4000dfe0:   00078a63            beqz    a5,4000dff4 <rtems_bdbuf_read+0x11c>              <== ALWAYS TAKEN
  previous       = the_node->previous;                                                    
4000dfe4:   06842703            lw  a4,104(s0)                                            <== NOT EXECUTED
  next->previous = previous;                                                              
4000dfe8:   00e7a223            sw  a4,4(a5)                                              <== NOT EXECUTED
  previous->next = next;                                                                  
4000dfec:   00f72023            sw  a5,0(a4)                                              <== NOT EXECUTED
  node->next = NULL;                                                                      
4000dff0:   06042223            sw  zero,100(s0)                                          <== NOT EXECUTED
    dd->read_ahead.trigger = block + 1;                                                   
4000dff4:   00190713            addi    a4,s2,1                                           
    dd->read_ahead.next = block + 2;                                                      
4000dff8:   00290793            addi    a5,s2,2                                           
    dd->read_ahead.trigger = block + 1;                                                   
4000dffc:   06e42623            sw  a4,108(s0)                                            
    dd->read_ahead.next = block + 2;                                                      
4000e000:   06f42823            sw  a5,112(s0)                                            
        sc = rtems_bdbuf_execute_read_request (dd, bd, 1);                                
4000e004:   00100613            li  a2,1                                                  
4000e008:   00048593            mv  a1,s1                                                 
4000e00c:   00040513            mv  a0,s0                                                 
4000e010:   9b8ff0ef            jal ra,4000d1c8 <rtems_bdbuf_execute_read_request>        
4000e014:   00050a93            mv  s5,a0                                                 
        if (sc == RTEMS_SUCCESSFUL)                                                       
4000e018:   0a051263            bnez    a0,4000e0bc <rtems_bdbuf_read+0x1e4>              
  ++bd->group->users;                                                                     
4000e01c:   0284a703            lw  a4,40(s1)                                             
  next           = the_node->next;                                                        
4000e020:   0004a603            lw  a2,0(s1)                                              
  previous       = the_node->previous;                                                    
4000e024:   0044a683            lw  a3,4(s1)                                              
4000e028:   00c72783            lw  a5,12(a4)                                             
  bd->state = state;                                                                      
4000e02c:   00300593            li  a1,3                                                  
4000e030:   02b4a023            sw  a1,32(s1)                                             
  next->previous = previous;                                                              
4000e034:   00d62223            sw  a3,4(a2)                                              
  previous->next = next;                                                                  
4000e038:   00c6a023            sw  a2,0(a3)                                              
  ++bd->group->users;                                                                     
4000e03c:   00178793            addi    a5,a5,1                                           
4000e040:   00f72623            sw  a5,12(a4)                                             
}                                                                                         
4000e044:   01c0006f            j   4000e060 <rtems_bdbuf_read+0x188>                     
        ++dd->stats.read_hits;                                                            
4000e048:   04442783            lw  a5,68(s0)                                             
}                                                                                         
4000e04c:   00000a93            li  s5,0                                                  
        ++dd->stats.read_hits;                                                            
4000e050:   00178793            addi    a5,a5,1                                           
4000e054:   04f42223            sw  a5,68(s0)                                             
  bd->state = state;                                                                      
4000e058:   00400793            li  a5,4                                                  
4000e05c:   02f4a023            sw  a5,32(s1)                                             
  if (bdbuf_cache.read_ahead_task != 0                                                    
4000e060:   0dc9a503            lw  a0,220(s3)                                            
4000e064:   f20506e3            beqz    a0,4000df90 <rtems_bdbuf_read+0xb8>               
      && dd->read_ahead.trigger == block                                                  
4000e068:   06c42783            lw  a5,108(s0)                                            
4000e06c:   f2f912e3            bne s2,a5,4000df90 <rtems_bdbuf_read+0xb8>                
      && !rtems_bdbuf_is_read_ahead_active (dd))                                          
4000e070:   06442783            lw  a5,100(s0)                                            
4000e074:   f0079ee3            bnez    a5,4000df90 <rtems_bdbuf_read+0xb8>               <== NEVER TAKEN
    if (rtems_chain_is_empty (chain))                                                     
4000e078:   0e09a783            lw  a5,224(s3)                                            
4000e07c:   0e498913            addi    s2,s3,228                                         
4000e080:   05278263            beq a5,s2,4000e0c4 <rtems_bdbuf_read+0x1ec>               
  old_last = tail->previous;                                                              
4000e084:   0e89a783            lw  a5,232(s3)                                            
    rtems_chain_append_unprotected (chain, &dd->read_ahead.node);                         
4000e088:   06440713            addi    a4,s0,100                                         
  the_node->next = tail;                                                                  
4000e08c:   07242223            sw  s2,100(s0)                                            
  tail->previous = the_node;                                                              
4000e090:   0ee9a423            sw  a4,232(s3)                                            
  old_last->next = the_node;                                                              
4000e094:   00e7a023            sw  a4,0(a5)                                              
  the_node->previous = old_last;                                                          
4000e098:   06f42423            sw  a5,104(s0)                                            
4000e09c:   ef5ff06f            j   4000df90 <rtems_bdbuf_read+0xb8>                      
        ++dd->stats.read_hits;                                                            
4000e0a0:   04442783            lw  a5,68(s0)                                             
}                                                                                         
4000e0a4:   00000a93            li  s5,0                                                  
        ++dd->stats.read_hits;                                                            
4000e0a8:   00178793            addi    a5,a5,1                                           
4000e0ac:   04f42223            sw  a5,68(s0)                                             
  bd->state = state;                                                                      
4000e0b0:   00300793            li  a5,3                                                  
4000e0b4:   02f4a023            sw  a5,32(s1)                                             
}                                                                                         
4000e0b8:   fa9ff06f            j   4000e060 <rtems_bdbuf_read+0x188>                     
          bd = NULL;                                                                      
4000e0bc:   00000493            li  s1,0                                                  
4000e0c0:   fa1ff06f            j   4000e060 <rtems_bdbuf_read+0x188>                     
      sc = rtems_event_send (bdbuf_cache.read_ahead_task,                                 
4000e0c4:   00200593            li  a1,2                                                  
4000e0c8:   684010ef            jal ra,4000f74c <rtems_event_send>                        
      if (sc != RTEMS_SUCCESSFUL)                                                         
4000e0cc:   fa050ce3            beqz    a0,4000e084 <rtems_bdbuf_read+0x1ac>              <== ALWAYS TAKEN
        rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);                                 
4000e0d0:   00500513            li  a0,5                                                  <== NOT EXECUTED
4000e0d4:   de9fd0ef            jal ra,4000bebc <rtems_bdbuf_fatal>                       <== NOT EXECUTED
                                                                                          

4000e0d8 <rtems_bdbuf_release>: if (bd == NULL)
4000e0d8:   0e050663            beqz    a0,4000e1c4 <rtems_bdbuf_release+0xec>            <== NEVER TAKEN
{                                                                                         
4000e0dc:   ff010113            addi    sp,sp,-16                                         
4000e0e0:   00912223            sw  s1,4(sp)                                              
  _Mutex_Acquire( mutex );                                                                
4000e0e4:   400234b7            lui s1,0x40023                                            
4000e0e8:   05848493            addi    s1,s1,88 # 40023058 <bdbuf_cache>                 
4000e0ec:   01212023            sw  s2,0(sp)                                              
4000e0f0:   02848913            addi    s2,s1,40                                          
4000e0f4:   00812423            sw  s0,8(sp)                                              
4000e0f8:   00050413            mv  s0,a0                                                 
4000e0fc:   00090513            mv  a0,s2                                                 
4000e100:   00112623            sw  ra,12(sp)                                             
4000e104:   98dfa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  switch (bd->state)                                                                      
4000e108:   02042503            lw  a0,32(s0)                                             
4000e10c:   00400793            li  a5,4                                                  
4000e110:   08f50a63            beq a0,a5,4000e1a4 <rtems_bdbuf_release+0xcc>             
4000e114:   02a7fe63            bgeu    a5,a0,4000e150 <rtems_bdbuf_release+0x78>         
4000e118:   ffb50793            addi    a5,a0,-5                                          
4000e11c:   00100713            li  a4,1                                                  
4000e120:   0af76663            bltu    a4,a5,4000e1cc <rtems_bdbuf_release+0xf4>         
      rtems_bdbuf_discard_buffer_after_access (bd);                                       
4000e124:   00040513            mv  a0,s0                                                 
4000e128:   9bcfe0ef            jal ra,4000c2e4 <rtems_bdbuf_discard_buffer_after_access> 
  _Mutex_Release( mutex );                                                                
4000e12c:   00090513            mv  a0,s2                                                 
4000e130:   9d1fa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000e134:   00c12083            lw  ra,12(sp)                                             
4000e138:   00812403            lw  s0,8(sp)                                              
4000e13c:   00412483            lw  s1,4(sp)                                              
4000e140:   00012903            lw  s2,0(sp)                                              
  return RTEMS_SUCCESSFUL;                                                                
4000e144:   00000513            li  a0,0                                                  
}                                                                                         
4000e148:   01010113            addi    sp,sp,16                                          
4000e14c:   00008067            ret                                                       
  switch (bd->state)                                                                      
4000e150:   00300793            li  a5,3                                                  
4000e154:   06f51c63            bne a0,a5,4000e1cc <rtems_bdbuf_release+0xf4>             
  --bd->group->users;                                                                     
4000e158:   02842683            lw  a3,40(s0)                                             
  old_last = tail->previous;                                                              
4000e15c:   0684a703            lw  a4,104(s1)                                            
  if (bd->waiters)                                                                        
4000e160:   02442603            lw  a2,36(s0)                                             
  --bd->group->users;                                                                     
4000e164:   00c6a783            lw  a5,12(a3)                                             
  the_node->next = tail;                                                                  
4000e168:   06448593            addi    a1,s1,100                                         
4000e16c:   fff78793            addi    a5,a5,-1                                          
4000e170:   00f6a623            sw  a5,12(a3)                                             
  bd->state = state;                                                                      
4000e174:   00200793            li  a5,2                                                  
4000e178:   02f42023            sw  a5,32(s0)                                             
4000e17c:   00b42023            sw  a1,0(s0)                                              
  tail->previous = the_node;                                                              
4000e180:   0684a423            sw  s0,104(s1)                                            
  old_last->next = the_node;                                                              
4000e184:   00872023            sw  s0,0(a4)                                              
  the_node->previous = old_last;                                                          
4000e188:   00e42223            sw  a4,4(s0)                                              
  if (bd->waiters)                                                                        
4000e18c:   02060263            beqz    a2,4000e1b0 <rtems_bdbuf_release+0xd8>            
  if (waiters->count > 0)                                                                 
4000e190:   0844a783            lw  a5,132(s1)                                            
4000e194:   f8078ce3            beqz    a5,4000e12c <rtems_bdbuf_release+0x54>            
  _Condition_Broadcast( condition_variable );                                             
4000e198:   08848513            addi    a0,s1,136                                         
4000e19c:   209010ef            jal ra,4000fba4 <_Condition_Broadcast>                    
}                                                                                         
4000e1a0:   f8dff06f            j   4000e12c <rtems_bdbuf_release+0x54>                   
      rtems_bdbuf_add_to_modified_list_after_access (bd);                                 
4000e1a4:   00040513            mv  a0,s0                                                 
4000e1a8:   ae9ff0ef            jal ra,4000dc90 <rtems_bdbuf_add_to_modified_list_after_access>
      break;                                                                              
4000e1ac:   f81ff06f            j   4000e12c <rtems_bdbuf_release+0x54>                   
  if (waiters->count > 0)                                                                 
4000e1b0:   0b44a783            lw  a5,180(s1)                                            
4000e1b4:   f6078ce3            beqz    a5,4000e12c <rtems_bdbuf_release+0x54>            
  _Condition_Broadcast( condition_variable );                                             
4000e1b8:   0b848513            addi    a0,s1,184                                         
4000e1bc:   1e9010ef            jal ra,4000fba4 <_Condition_Broadcast>                    
}                                                                                         
4000e1c0:   f6dff06f            j   4000e12c <rtems_bdbuf_release+0x54>                   
    return RTEMS_INVALID_ADDRESS;                                                         
4000e1c4:   00900513            li  a0,9                                                  <== NOT EXECUTED
}                                                                                         
4000e1c8:   00008067            ret                                                       <== NOT EXECUTED
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);                
4000e1cc:   00900593            li  a1,9                                                  <== NOT EXECUTED
4000e1d0:   d01fd0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
                                                                                          

4000e1d4 <rtems_bdbuf_release_modified>: if (bd == NULL)
4000e1d4:   08050063            beqz    a0,4000e254 <rtems_bdbuf_release_modified+0x80>   <== NEVER TAKEN
{                                                                                         
4000e1d8:   ff010113            addi    sp,sp,-16                                         
4000e1dc:   00912223            sw  s1,4(sp)                                              
  _Mutex_Acquire( mutex );                                                                
4000e1e0:   400234b7            lui s1,0x40023                                            
4000e1e4:   08048493            addi    s1,s1,128 # 40023080 <bdbuf_cache+0x28>           
4000e1e8:   00812423            sw  s0,8(sp)                                              
4000e1ec:   00050413            mv  s0,a0                                                 
4000e1f0:   00048513            mv  a0,s1                                                 
4000e1f4:   00112623            sw  ra,12(sp)                                             
4000e1f8:   899fa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  switch (bd->state)                                                                      
4000e1fc:   02042503            lw  a0,32(s0)                                             
4000e200:   00500793            li  a5,5                                                  
4000e204:   02a7fa63            bgeu    a5,a0,4000e238 <rtems_bdbuf_release_modified+0x64>
4000e208:   00600793            li  a5,6                                                  
4000e20c:   02f51a63            bne a0,a5,4000e240 <rtems_bdbuf_release_modified+0x6c>    
      rtems_bdbuf_discard_buffer_after_access (bd);                                       
4000e210:   00040513            mv  a0,s0                                                 
4000e214:   8d0fe0ef            jal ra,4000c2e4 <rtems_bdbuf_discard_buffer_after_access> 
  _Mutex_Release( mutex );                                                                
4000e218:   00048513            mv  a0,s1                                                 
4000e21c:   8e5fa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000e220:   00c12083            lw  ra,12(sp)                                             
4000e224:   00812403            lw  s0,8(sp)                                              
4000e228:   00412483            lw  s1,4(sp)                                              
  return RTEMS_SUCCESSFUL;                                                                
4000e22c:   00000513            li  a0,0                                                  
}                                                                                         
4000e230:   01010113            addi    sp,sp,16                                          
4000e234:   00008067            ret                                                       
  switch (bd->state)                                                                      
4000e238:   00200793            li  a5,2                                                  
4000e23c:   00a7e663            bltu    a5,a0,4000e248 <rtems_bdbuf_release_modified+0x74>
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);                
4000e240:   00d00593            li  a1,13                                                 <== NOT EXECUTED
4000e244:   c8dfd0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
      rtems_bdbuf_add_to_modified_list_after_access (bd);                                 
4000e248:   00040513            mv  a0,s0                                                 
4000e24c:   a45ff0ef            jal ra,4000dc90 <rtems_bdbuf_add_to_modified_list_after_access>
      break;                                                                              
4000e250:   fc9ff06f            j   4000e218 <rtems_bdbuf_release_modified+0x44>          
    return RTEMS_INVALID_ADDRESS;                                                         
4000e254:   00900513            li  a0,9                                                  <== NOT EXECUTED
}                                                                                         
4000e258:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

4000e4ec <rtems_bdbuf_set_block_size>: {
4000e4ec:   fe010113            addi    sp,sp,-32                                         
4000e4f0:   00812c23            sw  s0,24(sp)                                             
4000e4f4:   00912a23            sw  s1,20(sp)                                             
4000e4f8:   00112e23            sw  ra,28(sp)                                             
4000e4fc:   01212823            sw  s2,16(sp)                                             
4000e500:   01312623            sw  s3,12(sp)                                             
4000e504:   01412423            sw  s4,8(sp)                                              
4000e508:   00050493            mv  s1,a0                                                 
4000e50c:   00058413            mv  s0,a1                                                 
  if (sync)                                                                               
4000e510:   0e061263            bnez    a2,4000e5f4 <rtems_bdbuf_set_block_size+0x108>    
  _Mutex_Acquire( mutex );                                                                
4000e514:   40023937            lui s2,0x40023                                            
4000e518:   05890913            addi    s2,s2,88 # 40023058 <bdbuf_cache>                 
4000e51c:   02890993            addi    s3,s2,40                                          
4000e520:   00098513            mv  a0,s3                                                 
4000e524:   d6cfa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
    sc = RTEMS_INVALID_NUMBER;                                                            
4000e528:   00a00a13            li  s4,10                                                 
  if (block_size > 0)                                                                     
4000e52c:   02041863            bnez    s0,4000e55c <rtems_bdbuf_set_block_size+0x70>     
  _Mutex_Release( mutex );                                                                
4000e530:   00098513            mv  a0,s3                                                 
4000e534:   dccfa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000e538:   01c12083            lw  ra,28(sp)                                             
4000e53c:   01812403            lw  s0,24(sp)                                             
4000e540:   01412483            lw  s1,20(sp)                                             
4000e544:   01012903            lw  s2,16(sp)                                             
4000e548:   00c12983            lw  s3,12(sp)                                             
4000e54c:   000a0513            mv  a0,s4                                                 
4000e550:   00812a03            lw  s4,8(sp)                                              
4000e554:   02010113            addi    sp,sp,32                                          
4000e558:   00008067            ret                                                       
  if (size > bdbuf_config.buffer_max)                                                     
4000e55c:   4001e7b7            lui a5,0x4001e                                            
4000e560:   4e078793            addi    a5,a5,1248 # 4001e4e0 <rtems_bdbuf_configuration> 
4000e564:   0287a703            lw  a4,40(a5)                                             
4000e568:   fc8764e3            bltu    a4,s0,4000e530 <rtems_bdbuf_set_block_size+0x44>  
  bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;                             
4000e56c:   0247a703            lw  a4,36(a5)                                             
4000e570:   fff40793            addi    a5,s0,-1                                          
4000e574:   02e7d7b3            divu    a5,a5,a4                                          
  for (bds_per_size = 1;                                                                  
4000e578:   00178713            addi    a4,a5,1                                           
4000e57c:   08078463            beqz    a5,4000e604 <rtems_bdbuf_set_block_size+0x118>    
4000e580:   00100793            li  a5,1                                                  
       bds_per_size <<= 1)                                                                
4000e584:   00179793            slli    a5,a5,0x1                                         
  for (bds_per_size = 1;                                                                  
4000e588:   fee7eee3            bltu    a5,a4,4000e584 <rtems_bdbuf_set_block_size+0x98>  
  return bdbuf_cache.max_bds_per_group / bds_per_size;                                    
4000e58c:   02092703            lw  a4,32(s2)                                             
4000e590:   02f75533            divu    a0,a4,a5                                          
    if (bds_per_group != 0)                                                               
4000e594:   06f76463            bltu    a4,a5,4000e5fc <rtems_bdbuf_set_block_size+0x110> 
      uint32_t media_blocks_per_block = block_size / dd->media_block_size;                
4000e598:   0204a583            lw  a1,32(s1)                                             
      while ((one << block_to_media_block_shift) < media_blocks_per_block)                
4000e59c:   00100793            li  a5,1                                                  
      uint32_t media_blocks_per_block = block_size / dd->media_block_size;                
4000e5a0:   02b456b3            divu    a3,s0,a1                                          
      while ((one << block_to_media_block_shift) < media_blocks_per_block)                
4000e5a4:   06d7f463            bgeu    a5,a3,4000e60c <rtems_bdbuf_set_block_size+0x120> 
      int block_to_media_block_shift = 0;                                                 
4000e5a8:   00000793            li  a5,0                                                  
      while ((one << block_to_media_block_shift) < media_blocks_per_block)                
4000e5ac:   00100613            li  a2,1                                                  
        ++block_to_media_block_shift;                                                     
4000e5b0:   00178793            addi    a5,a5,1                                           
      while ((one << block_to_media_block_shift) < media_blocks_per_block)                
4000e5b4:   00f61733            sll a4,a2,a5                                              
4000e5b8:   fed76ce3            bltu    a4,a3,4000e5b0 <rtems_bdbuf_set_block_size+0xc4>  
      if ((dd->media_block_size << block_to_media_block_shift) != block_size)             
4000e5bc:   00f595b3            sll a1,a1,a5                                              
4000e5c0:   00b40463            beq s0,a1,4000e5c8 <rtems_bdbuf_set_block_size+0xdc>      
        block_to_media_block_shift = -1;                                                  
4000e5c4:   fff00793            li  a5,-1                                                 <== NOT EXECUTED
      dd->block_count = dd->size / media_blocks_per_block;                                
4000e5c8:   01c4a703            lw  a4,28(s1)                                             
      dd->media_blocks_per_block = media_blocks_per_block;                                
4000e5cc:   02d4a623            sw  a3,44(s1)                                             
      dd->bds_per_group = bds_per_group;                                                  
4000e5d0:   02a4aa23            sw  a0,52(s1)                                             
      dd->block_count = dd->size / media_blocks_per_block;                                
4000e5d4:   02d756b3            divu    a3,a4,a3                                          
      dd->block_size = block_size;                                                        
4000e5d8:   0284a223            sw  s0,36(s1)                                             
      dd->block_to_media_block_shift = block_to_media_block_shift;                        
4000e5dc:   02f4a823            sw  a5,48(s1)                                             
      rtems_bdbuf_do_purge_dev (dd);                                                      
4000e5e0:   00048513            mv  a0,s1                                                 
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
4000e5e4:   00000a13            li  s4,0                                                  
      dd->block_count = dd->size / media_blocks_per_block;                                
4000e5e8:   02d4a423            sw  a3,40(s1)                                             
      rtems_bdbuf_do_purge_dev (dd);                                                      
4000e5ec:   dd1fd0ef            jal ra,4000c3bc <rtems_bdbuf_do_purge_dev>                
4000e5f0:   f41ff06f            j   4000e530 <rtems_bdbuf_set_block_size+0x44>            
    rtems_bdbuf_syncdev (dd);                                                             
4000e5f4:   df9ff0ef            jal ra,4000e3ec <rtems_bdbuf_syncdev>                     
4000e5f8:   f1dff06f            j   4000e514 <rtems_bdbuf_set_block_size+0x28>            
    sc = RTEMS_INVALID_NUMBER;                                                            
4000e5fc:   00a00a13            li  s4,10                                                 <== NOT EXECUTED
4000e600:   f31ff06f            j   4000e530 <rtems_bdbuf_set_block_size+0x44>            <== NOT EXECUTED
  for (bds_per_size = 1;                                                                  
4000e604:   00100793            li  a5,1                                                  
4000e608:   f85ff06f            j   4000e58c <rtems_bdbuf_set_block_size+0xa0>            
      int block_to_media_block_shift = 0;                                                 
4000e60c:   00000793            li  a5,0                                                  
4000e610:   fb1ff06f            j   4000e5c0 <rtems_bdbuf_set_block_size+0xd4>            
                                                                                          

4000e25c <rtems_bdbuf_sync>: if (bd == NULL)
4000e25c:   14050463            beqz    a0,4000e3a4 <rtems_bdbuf_sync+0x148>              <== NEVER TAKEN
{                                                                                         
4000e260:   fe010113            addi    sp,sp,-32                                         
4000e264:   00912a23            sw  s1,20(sp)                                             
  _Mutex_Acquire( mutex );                                                                
4000e268:   400234b7            lui s1,0x40023                                            
4000e26c:   05848493            addi    s1,s1,88 # 40023058 <bdbuf_cache>                 
4000e270:   01212823            sw  s2,16(sp)                                             
4000e274:   02848913            addi    s2,s1,40                                          
4000e278:   00812c23            sw  s0,24(sp)                                             
4000e27c:   00050413            mv  s0,a0                                                 
4000e280:   00090513            mv  a0,s2                                                 
4000e284:   00112e23            sw  ra,28(sp)                                             
4000e288:   01312623            sw  s3,12(sp)                                             
4000e28c:   01412423            sw  s4,8(sp)                                              
4000e290:   01512223            sw  s5,4(sp)                                              
4000e294:   ffcfa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  switch (bd->state)                                                                      
4000e298:   02042503            lw  a0,32(s0)                                             
4000e29c:   00500793            li  a5,5                                                  
4000e2a0:   04a7f263            bgeu    a5,a0,4000e2e4 <rtems_bdbuf_sync+0x88>            
4000e2a4:   00600793            li  a5,6                                                  
4000e2a8:   04f51263            bne a0,a5,4000e2ec <rtems_bdbuf_sync+0x90>                
      rtems_bdbuf_discard_buffer_after_access (bd);                                       
4000e2ac:   00040513            mv  a0,s0                                                 
4000e2b0:   834fe0ef            jal ra,4000c2e4 <rtems_bdbuf_discard_buffer_after_access> 
  _Mutex_Release( mutex );                                                                
4000e2b4:   00090513            mv  a0,s2                                                 
4000e2b8:   849fa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000e2bc:   01c12083            lw  ra,28(sp)                                             
4000e2c0:   01812403            lw  s0,24(sp)                                             
4000e2c4:   01412483            lw  s1,20(sp)                                             
4000e2c8:   01012903            lw  s2,16(sp)                                             
4000e2cc:   00c12983            lw  s3,12(sp)                                             
4000e2d0:   00812a03            lw  s4,8(sp)                                              
4000e2d4:   00412a83            lw  s5,4(sp)                                              
  return RTEMS_SUCCESSFUL;                                                                
4000e2d8:   00000513            li  a0,0                                                  
}                                                                                         
4000e2dc:   02010113            addi    sp,sp,32                                          
4000e2e0:   00008067            ret                                                       
  switch (bd->state)                                                                      
4000e2e4:   00200793            li  a5,2                                                  
4000e2e8:   00a7e663            bltu    a5,a0,4000e2f4 <rtems_bdbuf_sync+0x98>            
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);                
4000e2ec:   00c00593            li  a1,12                                                 <== NOT EXECUTED
4000e2f0:   be1fd0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
  old_last = tail->previous;                                                              
4000e2f4:   0804a783            lw  a5,128(s1)                                            
  the_node->next = tail;                                                                  
4000e2f8:   07c48713            addi    a4,s1,124                                         
  bd->state = state;                                                                      
4000e2fc:   00800693            li  a3,8                                                  
4000e300:   00e42023            sw  a4,0(s0)                                              
4000e304:   02d42023            sw  a3,32(s0)                                             
  tail->previous = the_node;                                                              
4000e308:   0884a023            sw  s0,128(s1)                                            
  if (bd->waiters)                                                                        
4000e30c:   02442703            lw  a4,36(s0)                                             
  old_last->next = the_node;                                                              
4000e310:   0087a023            sw  s0,0(a5)                                              
  the_node->previous = old_last;                                                          
4000e314:   00f42223            sw  a5,4(s0)                                              
4000e318:   00070663            beqz    a4,4000e324 <rtems_bdbuf_sync+0xc8>               
  if (waiters->count > 0)                                                                 
4000e31c:   0844a783            lw  a5,132(s1)                                            
4000e320:   06079c63            bnez    a5,4000e398 <rtems_bdbuf_sync+0x13c>              
  rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,                           
4000e324:   0004a503            lw  a0,0(s1)                                              
4000e328:   00400593            li  a1,4                                                  
4000e32c:   420010ef            jal ra,4000f74c <rtems_event_send>                        
  if (sc != RTEMS_SUCCESSFUL)                                                             
4000e330:   0a051663            bnez    a0,4000e3dc <rtems_bdbuf_sync+0x180>              <== NEVER TAKEN
    switch (bd->state)                                                                    
4000e334:   00700a13            li  s4,7                                                  
4000e338:   00200993            li  s3,2                                                  
        rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);                             
4000e33c:   09c48a93            addi    s5,s1,156                                         
    switch (bd->state)                                                                    
4000e340:   02042503            lw  a0,32(s0)                                             
4000e344:   00aa6863            bltu    s4,a0,4000e354 <rtems_bdbuf_sync+0xf8>            
4000e348:   02051263            bnez    a0,4000e36c <rtems_bdbuf_sync+0x110>              <== ALWAYS TAKEN
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);              
4000e34c:   01000593            li  a1,16                                                 <== NOT EXECUTED
4000e350:   b81fd0ef            jal ra,4000bed0 <rtems_bdbuf_fatal_with_state>            <== NOT EXECUTED
    switch (bd->state)                                                                    
4000e354:   ff850793            addi    a5,a0,-8                                          
4000e358:   fef9eae3            bltu    s3,a5,4000e34c <rtems_bdbuf_sync+0xf0>            
        rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);                             
4000e35c:   000a8593            mv  a1,s5                                                 
4000e360:   00040513            mv  a0,s0                                                 
4000e364:   ef5fd0ef            jal ra,4000c258 <rtems_bdbuf_wait>                        
        break;                                                                            
4000e368:   fd9ff06f            j   4000e340 <rtems_bdbuf_sync+0xe4>                      
  if (bd->waiters == 0                                                                    
4000e36c:   02442783            lw  a5,36(s0)                                             
4000e370:   f40792e3            bnez    a5,4000e2b4 <rtems_bdbuf_sync+0x58>               
          || bd->state == RTEMS_BDBUF_STATE_EMPTY))                                       
4000e374:   fff50793            addi    a5,a0,-1                                          
        && (bd->state == RTEMS_BDBUF_STATE_CACHED                                         
4000e378:   00100713            li  a4,1                                                  
4000e37c:   f2f76ce3            bltu    a4,a5,4000e2b4 <rtems_bdbuf_sync+0x58>            
    if (bd->state == RTEMS_BDBUF_STATE_EMPTY)                                             
4000e380:   02e50663            beq a0,a4,4000e3ac <rtems_bdbuf_sync+0x150>               
  if (waiters->count > 0)                                                                 
4000e384:   0b44a783            lw  a5,180(s1)                                            
4000e388:   f20786e3            beqz    a5,4000e2b4 <rtems_bdbuf_sync+0x58>               
  _Condition_Broadcast( condition_variable );                                             
4000e38c:   0b848513            addi    a0,s1,184                                         
4000e390:   015010ef            jal ra,4000fba4 <_Condition_Broadcast>                    
}                                                                                         
4000e394:   f21ff06f            j   4000e2b4 <rtems_bdbuf_sync+0x58>                      
  _Condition_Broadcast( condition_variable );                                             
4000e398:   08848513            addi    a0,s1,136                                         
4000e39c:   009010ef            jal ra,4000fba4 <_Condition_Broadcast>                    
}                                                                                         
4000e3a0:   f85ff06f            j   4000e324 <rtems_bdbuf_sync+0xc8>                      
    return RTEMS_INVALID_ADDRESS;                                                         
4000e3a4:   00900513            li  a0,9                                                  <== NOT EXECUTED
}                                                                                         
4000e3a8:   00008067            ret                                                       <== NOT EXECUTED
  if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)                                
4000e3ac:   01842583            lw  a1,24(s0)                                             
4000e3b0:   01442503            lw  a0,20(s0)                                             
4000e3b4:   b45fd0ef            jal ra,4000bef8 <rtems_bdbuf_avl_remove.constprop.0.isra.0>
4000e3b8:   02051663            bnez    a0,4000e3e4 <rtems_bdbuf_sync+0x188>              <== NEVER TAKEN
  before_node           = after_node->next;                                               
4000e3bc:   0604a783            lw  a5,96(s1)                                             
  the_node->previous    = after_node;                                                     
4000e3c0:   06048713            addi    a4,s1,96                                          
  bd->state = state;                                                                      
4000e3c4:   02042023            sw  zero,32(s0)                                           
4000e3c8:   00e42223            sw  a4,4(s0)                                              
  after_node->next      = the_node;                                                       
4000e3cc:   0684a023            sw  s0,96(s1)                                             
  the_node->next        = before_node;                                                    
4000e3d0:   00f42023            sw  a5,0(s0)                                              
  before_node->previous = the_node;                                                       
4000e3d4:   0087a223            sw  s0,4(a5)                                              
}                                                                                         
4000e3d8:   fadff06f            j   4000e384 <rtems_bdbuf_sync+0x128>                     
    rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);                                      
4000e3dc:   00700513            li  a0,7                                                  <== NOT EXECUTED
4000e3e0:   addfd0ef            jal ra,4000bebc <rtems_bdbuf_fatal>                       <== NOT EXECUTED
4000e3e4:   02042503            lw  a0,32(s0)                                             <== NOT EXECUTED
4000e3e8:   e61fd0ef            jal ra,4000c248 <rtems_bdbuf_remove_from_tree.part.0.isra.0><== NOT EXECUTED
                                                                                          

4000e3ec <rtems_bdbuf_syncdev>: {
4000e3ec:   fd010113            addi    sp,sp,-48                                         
4000e3f0:   02812423            sw  s0,40(sp)                                             
  _Mutex_Acquire( mutex );                                                                
4000e3f4:   40023437            lui s0,0x40023                                            
4000e3f8:   05840413            addi    s0,s0,88 # 40023058 <bdbuf_cache>                 
4000e3fc:   03212023            sw  s2,32(sp)                                             
4000e400:   03c40913            addi    s2,s0,60                                          
4000e404:   02912223            sw  s1,36(sp)                                             
4000e408:   00050493            mv  s1,a0                                                 
4000e40c:   00090513            mv  a0,s2                                                 
4000e410:   02112623            sw  ra,44(sp)                                             
4000e414:   01312e23            sw  s3,28(sp)                                             
4000e418:   e78fa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
4000e41c:   02840993            addi    s3,s0,40                                          
4000e420:   00098513            mv  a0,s3                                                 
4000e424:   e6cfa0ef            jal ra,40008a90 <_Mutex_Acquire>                          
  bdbuf_cache.sync_active    = true;                                                      
4000e428:   00100793            li  a5,1                                                  
4000e42c:   04f40823            sb  a5,80(s0)                                             
  bdbuf_cache.sync_requester = rtems_task_self ();                                        
4000e430:   668010ef            jal ra,4000fa98 <rtems_task_self>                         
4000e434:   00050793            mv  a5,a0                                                 
  rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,                           
4000e438:   00042503            lw  a0,0(s0)                                              
4000e43c:   00400593            li  a1,4                                                  
  bdbuf_cache.sync_requester = rtems_task_self ();                                        
4000e440:   04f42a23            sw  a5,84(s0)                                             
  bdbuf_cache.sync_device    = dd;                                                        
4000e444:   04942c23            sw  s1,88(s0)                                             
  rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,                           
4000e448:   304010ef            jal ra,4000f74c <rtems_event_send>                        
  if (sc != RTEMS_SUCCESSFUL)                                                             
4000e44c:   04051663            bnez    a0,4000e498 <rtems_bdbuf_syncdev+0xac>            <== NEVER TAKEN
  _Mutex_Release( mutex );                                                                
4000e450:   00098513            mv  a0,s3                                                 
4000e454:   eacfa0ef            jal ra,40008b00 <_Mutex_Release>                          
  return rtems_event_system_receive(                                                      
4000e458:   00c10693            addi    a3,sp,12                                          
4000e45c:   00000613            li  a2,0                                                  
4000e460:   00000593            li  a1,0                                                  
4000e464:   80000537            lui a0,0x80000                                            
4000e468:   434010ef            jal ra,4000f89c <rtems_event_system_receive>              
  if (sc != RTEMS_SUCCESSFUL)                                                             
4000e46c:   02051a63            bnez    a0,4000e4a0 <rtems_bdbuf_syncdev+0xb4>            <== NEVER TAKEN
4000e470:   00090513            mv  a0,s2                                                 
4000e474:   e8cfa0ef            jal ra,40008b00 <_Mutex_Release>                          
}                                                                                         
4000e478:   02c12083            lw  ra,44(sp)                                             
4000e47c:   02812403            lw  s0,40(sp)                                             
4000e480:   02412483            lw  s1,36(sp)                                             
4000e484:   02012903            lw  s2,32(sp)                                             
4000e488:   01c12983            lw  s3,28(sp)                                             
4000e48c:   00000513            li  a0,0                                                  
4000e490:   03010113            addi    sp,sp,48                                          
4000e494:   00008067            ret                                                       
    rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);                                      
4000e498:   00700513            li  a0,7                                                  <== NOT EXECUTED
4000e49c:   a21fd0ef            jal ra,4000bebc <rtems_bdbuf_fatal>                       <== NOT EXECUTED
    rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT);                                
4000e4a0:   01600513            li  a0,22                                                 <== NOT EXECUTED
4000e4a4:   a19fd0ef            jal ra,4000bebc <rtems_bdbuf_fatal>                       <== NOT EXECUTED
                                                                                          

400006a8 <rtems_bdpart_create>: const rtems_bdpart_format *format, rtems_bdpart_partition *pt, const unsigned *dist, size_t count ) {
400006a8:   fd010113            addi    sp,sp,-48                                         
400006ac:   02812423            sw  s0,40(sp)                                             
400006b0:   02112623            sw  ra,44(sp)                                             
400006b4:   02912223            sw  s1,36(sp)                                             
400006b8:   03212023            sw  s2,32(sp)                                             
400006bc:   01312e23            sw  s3,28(sp)                                             
400006c0:   01412c23            sw  s4,24(sp)                                             
400006c4:   01512a23            sw  s5,20(sp)                                             
400006c8:   00070413            mv  s0,a4                                                 
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  bool dos_compatibility = format != NULL                                                 
    && format->type == RTEMS_BDPART_FORMAT_MBR                                            
    && format->mbr.dos_compatibility;                                                     
400006cc:   16058263            beqz    a1,40000830 <rtems_bdpart_create+0x188>           <== NEVER TAKEN
    && format->type == RTEMS_BDPART_FORMAT_MBR                                            
400006d0:   0005a783            lw  a5,0(a1)                                              
400006d4:   00058913            mv  s2,a1                                                 
400006d8:   00060993            mv  s3,a2                                                 
400006dc:   00068493            mv  s1,a3                                                 
400006e0:   12078e63            beqz    a5,4000081c <rtems_bdpart_create+0x174>           <== ALWAYS TAKEN
    && format->mbr.dos_compatibility;                                                     
400006e4:   00000a13            li  s4,0                                                  <== NOT EXECUTED
  rtems_blkdev_bnum disk_end = 0;                                                         
  rtems_blkdev_bnum pos = 0;                                                              
  rtems_blkdev_bnum dist_sum = 0;                                                         
  rtems_blkdev_bnum record_space =                                                        
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
400006e8:   00100a93            li  s5,1                                                  <== NOT EXECUTED
400006ec:   00012623            sw  zero,12(sp)                                           
  rtems_blkdev_bnum overhead = 0;                                                         
  rtems_blkdev_bnum free_space = 0;                                                       
  size_t i = 0;                                                                           
                                                                                          
  /* Check if we have something to do */                                                  
  if (count == 0) {                                                                       
400006f0:   10040263            beqz    s0,400007f4 <rtems_bdpart_create+0x14c>           <== NEVER TAKEN
    /* Nothing to do */                                                                   
    return RTEMS_SUCCESSFUL;                                                              
  }                                                                                       
                                                                                          
  /* Check parameter */                                                                   
  if (format == NULL || pt == NULL || dist == NULL) {                                     
400006f4:   14098063            beqz    s3,40000834 <rtems_bdpart_create+0x18c>           <== NEVER TAKEN
400006f8:   12048e63            beqz    s1,40000834 <rtems_bdpart_create+0x18c>           <== NEVER TAKEN
    return RTEMS_INVALID_ADDRESS;                                                         
  }                                                                                       
                                                                                          
  /* Get disk data */                                                                     
  sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);                     
400006fc:   00c10693            addi    a3,sp,12                                          
40000700:   00000613            li  a2,0                                                  
40000704:   00000593            li  a1,0                                                  
40000708:   4f4000ef            jal ra,40000bfc <rtems_bdpart_get_disk_data>              
  if (sc != RTEMS_SUCCESSFUL) {                                                           
4000070c:   0e051663            bnez    a0,400007f8 <rtems_bdpart_create+0x150>           <== NEVER TAKEN
                                                                                          
  /* Get distribution sum and check for overflow */                                       
  for (i = 0; i < count; ++i) {                                                           
    unsigned prev_sum = dist_sum;                                                         
                                                                                          
    dist_sum += dist [i];                                                                 
40000710:   0004a883            lw  a7,0(s1)                                              
                                                                                          
    if (dist_sum < prev_sum) {                                                            
40000714:   00448313            addi    t1,s1,4                                           
    dist_sum += dist [i];                                                                 
40000718:   00088813            mv  a6,a7                                                 
4000071c:   01c0006f            j   40000738 <rtems_bdpart_create+0x90>                   
40000720:   00032883            lw  a7,0(t1)                                              
40000724:   00078513            mv  a0,a5                                                 
    if (dist_sum < prev_sum) {                                                            
40000728:   00430313            addi    t1,t1,4                                           
    dist_sum += dist [i];                                                                 
4000072c:   010887b3            add a5,a7,a6                                              
    if (dist_sum < prev_sum) {                                                            
40000730:   1107e663            bltu    a5,a6,4000083c <rtems_bdpart_create+0x194>        
40000734:   00078813            mv  a6,a5                                                 
  for (i = 0; i < count; ++i) {                                                           
40000738:   00150793            addi    a5,a0,1                                           
      return RTEMS_INVALID_NUMBER;                                                        
    }                                                                                     
                                                                                          
    if (dist [i] == 0) {                                                                  
4000073c:   10088063            beqz    a7,4000083c <rtems_bdpart_create+0x194>           <== NEVER TAKEN
  for (i = 0; i < count; ++i) {                                                           
40000740:   fef410e3            bne s0,a5,40000720 <rtems_bdpart_create+0x78>             
      return RTEMS_INVALID_NUMBER;                                                        
    }                                                                                     
  }                                                                                       
                                                                                          
  /* Check format */                                                                      
  if (format->type != RTEMS_BDPART_FORMAT_MBR) {                                          
40000744:   00092703            lw  a4,0(s2)                                              
40000748:   10071e63            bnez    a4,40000864 <rtems_bdpart_create+0x1bc>           <== NEVER TAKEN
    return RTEMS_NOT_IMPLEMENTED;                                                         
  }                                                                                       
                                                                                          
  /* Align end of disk on cylinder boundary if necessary */                               
  if (dos_compatibility) {                                                                
    disk_end -= (disk_end % record_space);                                                
4000074c:   00c12f83            lw  t6,12(sp)                                             
  if (dos_compatibility) {                                                                
40000750:   0e0a1a63            bnez    s4,40000844 <rtems_bdpart_create+0x19c>           <== ALWAYS TAKEN
                                                                                          
  /*                                                                                      
   * In case we need an extended partition and logical partitions we have to              
   * account for the space of each EBR.                                                   
   */                                                                                     
  if (count > 4) {                                                                        
40000754:   00400713            li  a4,4                                                  <== NOT EXECUTED
40000758:   000a8e13            mv  t3,s5                                                 <== NOT EXECUTED
4000075c:   00f77663            bgeu    a4,a5,40000768 <rtems_bdpart_create+0xc0>         <== NOT EXECUTED
    overhead += (count - 3) * record_space;                                               
40000760:   fff50e13            addi    t3,a0,-1                                          <== NOT EXECUTED
40000764:   035e0e33            mul t3,t3,s5                                              <== NOT EXECUTED
  if (dos_compatibility) {                                                                
    overhead += (count - 1) * record_space;                                               
  }                                                                                       
                                                                                          
  /* Check disk space */                                                                  
  if ((overhead + count) > disk_end) {                                                    
40000768:   00fe0733            add a4,t3,a5                                              
4000076c:   10efe663            bltu    t6,a4,40000878 <rtems_bdpart_create+0x1d0>        
                                                                                          
  /* Begin of first primary partition */                                                  
  pos = record_space;                                                                     
                                                                                          
  /* Space for partitions */                                                              
  free_space = disk_end - overhead;                                                       
40000770:   41cf8e33            sub t3,t6,t3                                              
                                                                                          
  for (i = 0; i < count; ++i) {                                                           
40000774:   00098313            mv  t1,s3                                                 
40000778:   00000613            li  a2,0                                                  
  free_space = disk_end - overhead;                                                       
4000077c:   000a8593            mv  a1,s5                                                 
                                                                                          
    /* Align partition upwards */                                                         
    s += record_space - (s % record_space);                                               
                                                                                          
    /* Reserve space for the EBR if necessary */                                          
    if (count > 4 && i > 2) {                                                             
40000780:   00400f13            li  t5,4                                                  
40000784:   00200293            li  t0,2                                                  
40000788:   0080006f            j   40000790 <rtems_bdpart_create+0xe8>                   
4000078c:   000e8613            mv  a2,t4                                                 
    rtems_blkdev_bnum s = free_space * dist [i];                                          
40000790:   0004a683            lw  a3,0(s1)                                              
  for (i = 0; i < count; ++i) {                                                           
40000794:   00160e93            addi    t4,a2,1                                           
40000798:   00448493            addi    s1,s1,4                                           
    rtems_blkdev_bnum s = free_space * dist [i];                                          
4000079c:   03c688b3            mul a7,a3,t3                                              
      s = 1;                                                                              
400007a0:   00100713            li  a4,1                                                  
    if (s < free_space || s < dist [i]) {                                                 
400007a4:   09c8ec63            bltu    a7,t3,4000083c <rtems_bdpart_create+0x194>        
400007a8:   08d8ea63            bltu    a7,a3,4000083c <rtems_bdpart_create+0x194>        
    if (s == 0) {                                                                         
400007ac:   0108e463            bltu    a7,a6,400007b4 <rtems_bdpart_create+0x10c>        
    s /= dist_sum;                                                                        
400007b0:   0308d733            divu    a4,a7,a6                                          
    s += record_space - (s % record_space);                                               
400007b4:   035776b3            remu    a3,a4,s5                                          
400007b8:   01570733            add a4,a4,s5                                              
400007bc:   40d70733            sub a4,a4,a3                                              
    if (count > 4 && i > 2) {                                                             
400007c0:   00ff7663            bgeu    t5,a5,400007cc <rtems_bdpart_create+0x124>        
400007c4:   00c2f463            bgeu    t0,a2,400007cc <rtems_bdpart_create+0x124>        
      pos += record_space;                                                                
400007c8:   015585b3            add a1,a1,s5                                              
    }                                                                                     
                                                                                          
    /* Partition begin and end */                                                         
    p->begin = pos;                                                                       
400007cc:   00b32023            sw  a1,0(t1)                                              
    pos += s;                                                                             
400007d0:   00e585b3            add a1,a1,a4                                              
    p->end = pos;                                                                         
400007d4:   00b32223            sw  a1,4(t1)                                              
  for (i = 0; i < count; ++i) {                                                           
400007d8:   03030313            addi    t1,t1,48                                          
400007dc:   fac518e3            bne a0,a2,4000078c <rtems_bdpart_create+0xe4>             
  }                                                                                       
                                                                                          
  /* Expand the last partition to the disk end */                                         
  pt [count - 1].end = disk_end;                                                          
400007e0:   00179613            slli    a2,a5,0x1                                         
400007e4:   00f60633            add a2,a2,a5                                              
400007e8:   00461613            slli    a2,a2,0x4                                         
400007ec:   00c98633            add a2,s3,a2                                              
400007f0:   fdf62a23            sw  t6,-44(a2)                                            
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
400007f4:   00000513            li  a0,0                                                  
}                                                                                         
400007f8:   02c12083            lw  ra,44(sp)                                             
400007fc:   02812403            lw  s0,40(sp)                                             
40000800:   02412483            lw  s1,36(sp)                                             
40000804:   02012903            lw  s2,32(sp)                                             
40000808:   01c12983            lw  s3,28(sp)                                             
4000080c:   01812a03            lw  s4,24(sp)                                             
40000810:   01412a83            lw  s5,20(sp)                                             
40000814:   03010113            addi    sp,sp,48                                          
40000818:   00008067            ret                                                       
    && format->mbr.dos_compatibility;                                                     
4000081c:   0085c783            lbu a5,8(a1)                                              
40000820:   ec0782e3            beqz    a5,400006e4 <rtems_bdpart_create+0x3c>            <== NEVER TAKEN
40000824:   00100a13            li  s4,1                                                  
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
40000828:   03f00a93            li  s5,63                                                 
4000082c:   ec1ff06f            j   400006ec <rtems_bdpart_create+0x44>                   
  if (count == 0) {                                                                       
40000830:   fc0702e3            beqz    a4,400007f4 <rtems_bdpart_create+0x14c>           <== NOT EXECUTED
    return RTEMS_INVALID_ADDRESS;                                                         
40000834:   00900513            li  a0,9                                                  <== NOT EXECUTED
40000838:   fc1ff06f            j   400007f8 <rtems_bdpart_create+0x150>                  <== NOT EXECUTED
      return RTEMS_INVALID_NUMBER;                                                        
4000083c:   00a00513            li  a0,10                                                 <== NOT EXECUTED
40000840:   fb9ff06f            j   400007f8 <rtems_bdpart_create+0x150>                  <== NOT EXECUTED
    disk_end -= (disk_end % record_space);                                                
40000844:   035ff6b3            remu    a3,t6,s5                                          
  if (count > 4) {                                                                        
40000848:   00400713            li  a4,4                                                  
    disk_end -= (disk_end % record_space);                                                
4000084c:   40df8fb3            sub t6,t6,a3                                              
  if (count > 4) {                                                                        
40000850:   00f76e63            bltu    a4,a5,4000086c <rtems_bdpart_create+0x1c4>        
40000854:   000a8713            mv  a4,s5                                                 <== NOT EXECUTED
    overhead += (count - 1) * record_space;                                               
40000858:   03550e33            mul t3,a0,s5                                              
4000085c:   00ee0e33            add t3,t3,a4                                              
40000860:   f09ff06f            j   40000768 <rtems_bdpart_create+0xc0>                   
    return RTEMS_NOT_IMPLEMENTED;                                                         
40000864:   01800513            li  a0,24                                                 <== NOT EXECUTED
40000868:   f91ff06f            j   400007f8 <rtems_bdpart_create+0x150>                  <== NOT EXECUTED
    overhead += (count - 3) * record_space;                                               
4000086c:   fff50713            addi    a4,a0,-1                                          
40000870:   03570733            mul a4,a4,s5                                              
  if (dos_compatibility) {                                                                
40000874:   fe5ff06f            j   40000858 <rtems_bdpart_create+0x1b0>                  
    return RTEMS_IO_ERROR;                                                                
40000878:   01b00513            li  a0,27                                                 <== NOT EXECUTED
4000087c:   f7dff06f            j   400007f8 <rtems_bdpart_create+0x150>                  <== NOT EXECUTED
                                                                                          

40000880 <rtems_bdpart_dump>: { uuid_unparse_lower( type, str); } void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count) {
40000880:   f9010113            addi    sp,sp,-112                                        
40000884:   06812423            sw  s0,104(sp)                                            
40000888:   00050413            mv  s0,a0                                                 
  size_t i = 0;                                                                           
                                                                                          
  printf(                                                                                 
4000088c:   4001e537            lui a0,0x4001e                                            
{                                                                                         
40000890:   07212023            sw  s2,96(sp)                                             
  printf(                                                                                 
40000894:   6e450513            addi    a0,a0,1764 # 4001e6e4 <test_state_strings+0x50>   
{                                                                                         
40000898:   00058913            mv  s2,a1                                                 
4000089c:   06112623            sw  ra,108(sp)                                            
400008a0:   06912223            sw  s1,100(sp)                                            
400008a4:   05312e23            sw  s3,92(sp)                                             
400008a8:   05412c23            sw  s4,88(sp)                                             
400008ac:   05512a23            sw  s5,84(sp)                                             
400008b0:   05612823            sw  s6,80(sp)                                             
400008b4:   05712623            sw  s7,76(sp)                                             
  printf(                                                                                 
400008b8:   de1ff0ef            jal ra,40000698 <__wrap_puts>                             
    "------------+------------+-----------------------------------------------------\n"   
    " BEGIN      | LAST       | TYPE\n"                                                   
    "------------+------------+-----------------------------------------------------\n"   
  );                                                                                      
                                                                                          
  for (i = 0; i < count; ++i) {                                                           
400008bc:   0a090863            beqz    s2,4000096c <rtems_bdpart_dump+0xec>              <== NEVER TAKEN
          break;                                                                          
        case RTEMS_BDPART_MBR_FAT_32_LBA:                                                 
          type = "FAT 32 LBA";                                                            
          break;                                                                          
        case RTEMS_BDPART_MBR_DATA:                                                       
          type = "DATA";                                                                  
400008c0:   4001ea37            lui s4,0x4001e                                            
400008c4:   4001fab7            lui s5,0x4001f                                            
          type = "FAT 12";                                                                
400008c8:   4001ebb7            lui s7,0x4001e                                            
          type = "FAT 32 LBA";                                                            
400008cc:   4001eb37            lui s6,0x4001e                                            
400008d0:   00840413            addi    s0,s0,8                                           
  for (i = 0; i < count; ++i) {                                                           
400008d4:   00000493            li  s1,0                                                  
400008d8:   4001f9b7            lui s3,0x4001f                                            
          type = "DATA";                                                                  
400008dc:   6dca0a13            addi    s4,s4,1756 # 4001e6dc <test_state_strings+0x48>   
400008e0:   844a8a93            addi    s5,s5,-1980 # 4001e844 <test_state_strings+0x1b0> 
          type = "FAT 12";                                                                
400008e4:   6acb8b93            addi    s7,s7,1708 # 4001e6ac <test_state_strings+0x18>   
          type = "FAT 32 LBA";                                                            
400008e8:   6c8b0b13            addi    s6,s6,1736 # 4001e6c8 <test_state_strings+0x34>   
    if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {                        
400008ec:   00b10593            addi    a1,sp,11                                          
400008f0:   00040513            mv  a0,s0                                                 
    uint8_t type_mbr = 0;                                                                 
400008f4:   000105a3            sb  zero,11(sp)                                           
    if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {                        
400008f8:   2d0000ef            jal ra,40000bc8 <rtems_bdpart_to_mbr_partition_type>      
400008fc:   0c050663            beqz    a0,400009c8 <rtems_bdpart_dump+0x148>             <== NEVER TAKEN
      switch (type_mbr) {                                                                 
40000900:   00b14783            lbu a5,11(sp)                                             
40000904:   00e00713            li  a4,14                                                 
40000908:   00f76e63            bltu    a4,a5,40000924 <rtems_bdpart_dump+0xa4>           
4000090c:   02078263            beqz    a5,40000930 <rtems_bdpart_dump+0xb0>              <== NEVER TAKEN
40000910:   02f76063            bltu    a4,a5,40000930 <rtems_bdpart_dump+0xb0>           
40000914:   00279713            slli    a4,a5,0x2                                         
40000918:   01570733            add a4,a4,s5                                              
4000091c:   00072703            lw  a4,0(a4)                                              
40000920:   00070067            jr  a4                                                    
40000924:   0da00713            li  a4,218                                                <== NOT EXECUTED
          type = "DATA";                                                                  
40000928:   000a0693            mv  a3,s4                                                 <== NOT EXECUTED
      switch (type_mbr) {                                                                 
4000092c:   02e78063            beq a5,a4,4000094c <rtems_bdpart_dump+0xcc>               <== NOT EXECUTED
          break;                                                                          
        default:                                                                          
          snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);          
40000930:   4001f637            lui a2,0x4001f                                            <== NOT EXECUTED
40000934:   00078693            mv  a3,a5                                                 <== NOT EXECUTED
40000938:   82460613            addi    a2,a2,-2012 # 4001e824 <test_state_strings+0x190> <== NOT EXECUTED
4000093c:   03400593            li  a1,52                                                 <== NOT EXECUTED
40000940:   00c10513            addi    a0,sp,12                                          <== NOT EXECUTED
40000944:   6a4140ef            jal ra,40014fe8 <snprintf>                                <== NOT EXECUTED
          type = type_buffer;                                                             
40000948:   00c10693            addi    a3,sp,12                                          <== NOT EXECUTED
    } else {                                                                              
      rtems_bdpart_type_to_string( p->type, type_buffer);                                 
      type = type_buffer;                                                                 
    }                                                                                     
                                                                                          
    printf(                                                                               
4000094c:   ffc42603            lw  a2,-4(s0)                                             
40000950:   ff842583            lw  a1,-8(s0)                                             
40000954:   83098513            addi    a0,s3,-2000 # 4001e830 <test_state_strings+0x19c> 
40000958:   fff60613            addi    a2,a2,-1                                          
  for (i = 0; i < count; ++i) {                                                           
4000095c:   00148493            addi    s1,s1,1                                           
    printf(                                                                               
40000960:   cf1ff0ef            jal ra,40000650 <__wrap_printf>                           
  for (i = 0; i < count; ++i) {                                                           
40000964:   03040413            addi    s0,s0,48                                          
40000968:   f89912e3            bne s2,s1,400008ec <rtems_bdpart_dump+0x6c>               
      type                                                                                
    );                                                                                    
  }                                                                                       
                                                                                          
  puts( "------------+------------+-----------------------------------------------------");
}                                                                                         
4000096c:   06812403            lw  s0,104(sp)                                            
40000970:   06c12083            lw  ra,108(sp)                                            
40000974:   06412483            lw  s1,100(sp)                                            
40000978:   06012903            lw  s2,96(sp)                                             
4000097c:   05c12983            lw  s3,92(sp)                                             
40000980:   05812a03            lw  s4,88(sp)                                             
40000984:   05412a83            lw  s5,84(sp)                                             
40000988:   05012b03            lw  s6,80(sp)                                             
4000098c:   04c12b83            lw  s7,76(sp)                                             
  puts( "------------+------------+-----------------------------------------------------");
40000990:   4001e537            lui a0,0x4001e                                            
40000994:   7d450513            addi    a0,a0,2004 # 4001e7d4 <test_state_strings+0x140>  
}                                                                                         
40000998:   07010113            addi    sp,sp,112                                         
  puts( "------------+------------+-----------------------------------------------------");
4000099c:   cfdff06f            j   40000698 <__wrap_puts>                                
          type = "FAT 16 LBA";                                                            
400009a0:   4001e6b7            lui a3,0x4001e                                            <== NOT EXECUTED
400009a4:   6b468693            addi    a3,a3,1716 # 4001e6b4 <test_state_strings+0x20>   <== NOT EXECUTED
          break;                                                                          
400009a8:   fa5ff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     <== NOT EXECUTED
          type = "FAT 32 LBA";                                                            
400009ac:   000b0693            mv  a3,s6                                                 <== NOT EXECUTED
          break;                                                                          
400009b0:   f9dff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     <== NOT EXECUTED
          type = "FAT 32";                                                                
400009b4:   4001e6b7            lui a3,0x4001e                                            
400009b8:   6d468693            addi    a3,a3,1748 # 4001e6d4 <test_state_strings+0x40>   
          break;                                                                          
400009bc:   f91ff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     
          type = "FAT 12";                                                                
400009c0:   000b8693            mv  a3,s7                                                 <== NOT EXECUTED
400009c4:   f89ff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     <== NOT EXECUTED
  uuid_unparse_lower( type, str);                                                         
400009c8:   00c10593            addi    a1,sp,12                                          <== NOT EXECUTED
400009cc:   00040513            mv  a0,s0                                                 <== NOT EXECUTED
400009d0:   4ac060ef            jal ra,40006e7c <uuid_unparse_lower>                      <== NOT EXECUTED
      type = type_buffer;                                                                 
400009d4:   00c10693            addi    a3,sp,12                                          <== NOT EXECUTED
400009d8:   f75ff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     <== NOT EXECUTED
      switch (type_mbr) {                                                                 
400009dc:   4001e6b7            lui a3,0x4001e                                            <== NOT EXECUTED
400009e0:   6c068693            addi    a3,a3,1728 # 4001e6c0 <test_state_strings+0x2c>   <== NOT EXECUTED
400009e4:   f69ff06f            j   4000094c <rtems_bdpart_dump+0xcc>                     <== NOT EXECUTED
                                                                                          

40000bfc <rtems_bdpart_get_disk_data>: {
40000bfc:   fd010113            addi    sp,sp,-48                                         
40000c00:   01412c23            sw  s4,24(sp)                                             
40000c04:   00058a13            mv  s4,a1                                                 
  fd = open( disk_name, O_RDWR);                                                          
40000c08:   00200593            li  a1,2                                                  
{                                                                                         
40000c0c:   02912223            sw  s1,36(sp)                                             
40000c10:   03212023            sw  s2,32(sp)                                             
40000c14:   01312e23            sw  s3,28(sp)                                             
40000c18:   02112623            sw  ra,44(sp)                                             
40000c1c:   02812423            sw  s0,40(sp)                                             
40000c20:   00060993            mv  s3,a2                                                 
40000c24:   00068493            mv  s1,a3                                                 
  rtems_disk_device *dd = NULL;                                                           
40000c28:   00012623            sw  zero,12(sp)                                           
  fd = open( disk_name, O_RDWR);                                                          
40000c2c:   429020ef            jal ra,40003854 <open>                                    
    sc = RTEMS_INVALID_NAME;                                                              
40000c30:   00300913            li  s2,3                                                  
  if (fd < 0) {                                                                           
40000c34:   04054663            bltz    a0,40000c80 <rtems_bdpart_get_disk_data+0x84>     <== NEVER TAKEN
40000c38:   400445b7            lui a1,0x40044                                            
40000c3c:   00c10613            addi    a2,sp,12                                          
40000c40:   20958593            addi    a1,a1,521 # 40044209 <WorkAreaBase+0x1e7c9>       
40000c44:   00050413            mv  s0,a0                                                 
40000c48:   07c020ef            jal ra,40002cc4 <ioctl>                                   
  if (rv != 0) {                                                                          
40000c4c:   04051c63            bnez    a0,40000ca4 <rtems_bdpart_get_disk_data+0xa8>     <== NEVER TAKEN
  disk_begin = dd->start;                                                                 
40000c50:   00c12783            lw  a5,12(sp)                                             
  if (block_size < RTEMS_BDPART_BLOCK_SIZE) {                                             
40000c54:   1ff00713            li  a4,511                                                
  *disk_end = dd->size;                                                                   
40000c58:   01c7a683            lw  a3,28(a5)                                             
  disk_begin = dd->start;                                                                 
40000c5c:   0187a903            lw  s2,24(a5)                                             
  *disk_end = dd->size;                                                                   
40000c60:   00d4a023            sw  a3,0(s1)                                              
  if (block_size < RTEMS_BDPART_BLOCK_SIZE) {                                             
40000c64:   0247a683            lw  a3,36(a5)                                             
40000c68:   04d77663            bgeu    a4,a3,40000cb4 <rtems_bdpart_get_disk_data+0xb8>  
  if (disk_begin != 0) {                                                                  
40000c6c:   04091463            bnez    s2,40000cb4 <rtems_bdpart_get_disk_data+0xb8>     <== NEVER TAKEN
  if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {                       
40000c70:   020a0c63            beqz    s4,40000ca8 <rtems_bdpart_get_disk_data+0xac>     
40000c74:   02098a63            beqz    s3,40000ca8 <rtems_bdpart_get_disk_data+0xac>     <== NEVER TAKEN
    *fd_ptr = fd;                                                                         
40000c78:   008a2023            sw  s0,0(s4)                                              
    *dd_ptr = dd;                                                                         
40000c7c:   00f9a023            sw  a5,0(s3)                                              
}                                                                                         
40000c80:   02c12083            lw  ra,44(sp)                                             
40000c84:   02812403            lw  s0,40(sp)                                             
40000c88:   02412483            lw  s1,36(sp)                                             
40000c8c:   01c12983            lw  s3,28(sp)                                             
40000c90:   01812a03            lw  s4,24(sp)                                             
40000c94:   00090513            mv  a0,s2                                                 
40000c98:   02012903            lw  s2,32(sp)                                             
40000c9c:   03010113            addi    sp,sp,48                                          
40000ca0:   00008067            ret                                                       
    sc = RTEMS_INVALID_NAME;                                                              
40000ca4:   00300913            li  s2,3                                                  <== NOT EXECUTED
    close( fd);                                                                           
40000ca8:   00040513            mv  a0,s0                                                 
40000cac:   421010ef            jal ra,400028cc <close>                                   
40000cb0:   fd1ff06f            j   40000c80 <rtems_bdpart_get_disk_data+0x84>            
    sc = RTEMS_IO_ERROR;                                                                  
40000cb4:   01b00913            li  s2,27                                                 <== NOT EXECUTED
40000cb8:   ff1ff06f            j   40000ca8 <rtems_bdpart_get_disk_data+0xac>            <== NOT EXECUTED
                                                                                          

40000cbc <rtems_bdpart_read>: const char *disk_name, rtems_bdpart_format *format, rtems_bdpart_partition *pt, size_t *count ) {
40000cbc:   fc010113            addi    sp,sp,-64                                         
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  rtems_status_code esc = RTEMS_SUCCESSFUL;                                               
  rtems_bdbuf_buffer *block = NULL;                                                       
  rtems_bdpart_partition *p = pt - 1;                                                     
40000cc0:   fd060793            addi    a5,a2,-48                                         
{                                                                                         
40000cc4:   02912a23            sw  s1,52(sp)                                             
40000cc8:   03212823            sw  s2,48(sp)                                             
40000ccc:   03312623            sw  s3,44(sp)                                             
40000cd0:   03412423            sw  s4,40(sp)                                             
40000cd4:   02112e23            sw  ra,60(sp)                                             
40000cd8:   02812c23            sw  s0,56(sp)                                             
40000cdc:   03512223            sw  s5,36(sp)                                             
40000ce0:   03612023            sw  s6,32(sp)                                             
  rtems_bdbuf_buffer *block = NULL;                                                       
40000ce4:   00012423            sw  zero,8(sp)                                            
  rtems_bdpart_partition *p = pt - 1;                                                     
40000ce8:   00f12623            sw  a5,12(sp)                                             
{                                                                                         
40000cec:   00060913            mv  s2,a2                                                 
40000cf0:   00068993            mv  s3,a3                                                 
40000cf4:   00058a13            mv  s4,a1                                                 
40000cf8:   00060493            mv  s1,a2                                                 
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);                
40000cfc:   00068c63            beqz    a3,40000d14 <rtems_bdpart_read+0x58>              <== NEVER TAKEN
40000d00:   0006a783            lw  a5,0(a3)                                              
40000d04:   00179493            slli    s1,a5,0x1                                         
40000d08:   00f484b3            add s1,s1,a5                                              
40000d0c:   00449493            slli    s1,s1,0x4                                         
40000d10:   009604b3            add s1,a2,s1                                              
  rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */                          
  rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */                       
  rtems_blkdev_bnum disk_end = 0;                                                         
  size_t i = 0;                                                                           
  const uint8_t *data = NULL;                                                             
  int fd = -1;                                                                            
40000d14:   fff00793            li  a5,-1                                                 
  rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */                          
40000d18:   00012823            sw  zero,16(sp)                                           
  rtems_blkdev_bnum disk_end = 0;                                                         
40000d1c:   00012a23            sw  zero,20(sp)                                           
  int fd = -1;                                                                            
40000d20:   00f12c23            sw  a5,24(sp)                                             
  rtems_disk_device *dd = NULL;                                                           
40000d24:   00012e23            sw  zero,28(sp)                                           
                                                                                          
  /* Check parameter */                                                                   
  if (format == NULL || pt == NULL || count == NULL) {                                    
40000d28:   080a0263            beqz    s4,40000dac <rtems_bdpart_read+0xf0>              <== NEVER TAKEN
40000d2c:   08090063            beqz    s2,40000dac <rtems_bdpart_read+0xf0>              <== NEVER TAKEN
40000d30:   06098e63            beqz    s3,40000dac <rtems_bdpart_read+0xf0>              <== NEVER TAKEN
    return RTEMS_INVALID_ADDRESS;                                                         
  }                                                                                       
                                                                                          
  /* Set count to a save value */                                                         
  *count = 0;                                                                             
40000d34:   0009a023            sw  zero,0(s3)                                            
                                                                                          
  /* Get disk data */                                                                     
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
40000d38:   01410693            addi    a3,sp,20                                          
40000d3c:   01c10613            addi    a2,sp,28                                          
40000d40:   01810593            addi    a1,sp,24                                          
40000d44:   eb9ff0ef            jal ra,40000bfc <rtems_bdpart_get_disk_data>              
40000d48:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40000d4c:   02050863            beqz    a0,40000d7c <rtems_bdpart_read+0xc0>              <== ALWAYS TAKEN
  if (block != NULL) {                                                                    
    rtems_bdbuf_release( block);                                                          
  }                                                                                       
                                                                                          
  return esc;                                                                             
}                                                                                         
40000d50:   03c12083            lw  ra,60(sp)                                             
40000d54:   00040513            mv  a0,s0                                                 
40000d58:   03812403            lw  s0,56(sp)                                             
40000d5c:   03412483            lw  s1,52(sp)                                             
40000d60:   03012903            lw  s2,48(sp)                                             
40000d64:   02c12983            lw  s3,44(sp)                                             
40000d68:   02812a03            lw  s4,40(sp)                                             
40000d6c:   02412a83            lw  s5,36(sp)                                             
40000d70:   02012b03            lw  s6,32(sp)                                             
40000d74:   04010113            addi    sp,sp,64                                          
40000d78:   00008067            ret                                                       
  sc = rtems_bdpart_read_record( dd, 0, &block);                                          
40000d7c:   01c12503            lw  a0,28(sp)                                             
40000d80:   00810613            addi    a2,sp,8                                           
40000d84:   00000593            li  a1,0                                                  
40000d88:   d8dff0ef            jal ra,40000b14 <rtems_bdpart_read_record>                
40000d8c:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40000d90:   02050263            beqz    a0,40000db4 <rtems_bdpart_read+0xf8>              <== ALWAYS TAKEN
  if (fd >= 0) {                                                                          
40000d94:   01812783            lw  a5,24(sp)                                             
40000d98:   1807d063            bgez    a5,40000f18 <rtems_bdpart_read+0x25c>             <== ALWAYS TAKEN
  if (block != NULL) {                                                                    
40000d9c:   00812503            lw  a0,8(sp)                                              <== NOT EXECUTED
40000da0:   fa0508e3            beqz    a0,40000d50 <rtems_bdpart_read+0x94>              <== NOT EXECUTED
    rtems_bdbuf_release( block);                                                          
40000da4:   3340d0ef            jal ra,4000e0d8 <rtems_bdbuf_release>                     
40000da8:   fa9ff06f            j   40000d50 <rtems_bdpart_read+0x94>                     
    return RTEMS_INVALID_ADDRESS;                                                         
40000dac:   00900413            li  s0,9                                                  <== NOT EXECUTED
40000db0:   fa1ff06f            j   40000d50 <rtems_bdpart_read+0x94>                     <== NOT EXECUTED
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;                                 
40000db4:   00812783            lw  a5,8(sp)                                              
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);                      
40000db8:   01010693            addi    a3,sp,16                                          
40000dbc:   00048613            mv  a2,s1                                                 
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;                                 
40000dc0:   01c7ab03            lw  s6,28(a5)                                             
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);                      
40000dc4:   00c10593            addi    a1,sp,12                                          
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;                                 
40000dc8:   1beb0a93            addi    s5,s6,446                                         
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);                      
40000dcc:   000a8513            mv  a0,s5                                                 
40000dd0:   c19ff0ef            jal ra,400009e8 <rtems_bdpart_read_mbr_partition>         
40000dd4:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40000dd8:   fa051ee3            bnez    a0,40000d94 <rtems_bdpart_read+0xd8>              <== NEVER TAKEN
  if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {                
40000ddc:   00c12703            lw  a4,12(sp)                                             
40000de0:   0ee00793            li  a5,238                                                
40000de4:   00874703            lbu a4,8(a4)                                              
40000de8:   14f70663            beq a4,a5,40000f34 <rtems_bdpart_read+0x278>              
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID                                       
40000dec:   00812783            lw  a5,8(sp)                                              
  format->type = RTEMS_BDPART_FORMAT_MBR;                                                 
40000df0:   000a2023            sw  zero,0(s4)                                            
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID                                       
40000df4:   01c7a703            lw  a4,28(a5)                                             
40000df8:   1bb70793            addi    a5,a4,443                                         
40000dfc:   1b770713            addi    a4,a4,439                                         
    value = (value << 8) + data [i];                                                      
40000e00:   0007c683            lbu a3,0(a5)                                              
40000e04:   00841513            slli    a0,s0,0x8                                         
  for (i = 3; i >= 0; --i) {                                                              
40000e08:   fff78793            addi    a5,a5,-1                                          
    value = (value << 8) + data [i];                                                      
40000e0c:   00a68433            add s0,a3,a0                                              
  for (i = 3; i >= 0; --i) {                                                              
40000e10:   fef718e3            bne a4,a5,40000e00 <rtems_bdpart_read+0x144>              
  format->mbr.dos_compatibility = true;                                                   
40000e14:   00100793            li  a5,1                                                  
  format->mbr.disk_id = rtems_uint32_from_little_endian(                                  
40000e18:   008a2223            sw  s0,4(s4)                                              
  format->mbr.dos_compatibility = true;                                                   
40000e1c:   00fa0423            sb  a5,8(s4)                                              
  for (i = 1; i < 4; ++i) {                                                               
40000e20:   1eeb0b13            addi    s6,s6,494                                         
    data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;                                            
40000e24:   010a8a93            addi    s5,s5,16                                          
    sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);                    
40000e28:   01010693            addi    a3,sp,16                                          
40000e2c:   00048613            mv  a2,s1                                                 
40000e30:   00c10593            addi    a1,sp,12                                          
40000e34:   000a8513            mv  a0,s5                                                 
40000e38:   bb1ff0ef            jal ra,400009e8 <rtems_bdpart_read_mbr_partition>         
40000e3c:   00050413            mv  s0,a0                                                 
    if (sc != RTEMS_SUCCESSFUL) {                                                         
40000e40:   f4051ae3            bnez    a0,40000d94 <rtems_bdpart_read+0xd8>              <== NEVER TAKEN
  for (i = 1; i < 4; ++i) {                                                               
40000e44:   ff6a90e3            bne s5,s6,40000e24 <rtems_bdpart_read+0x168>              
  ebr = ep_begin;                                                                         
40000e48:   01012a03            lw  s4,16(sp)                                             
  while (ebr != 0) {                                                                      
40000e4c:   100a0063            beqz    s4,40000f4c <rtems_bdpart_read+0x290>             <== NEVER TAKEN
  if (type == RTEMS_BDPART_MBR_EXTENDED) {                                                
40000e50:   00500a93            li  s5,5                                                  
    sc = rtems_bdpart_read_record( dd, ebr, &block);                                      
40000e54:   01c12503            lw  a0,28(sp)                                             
40000e58:   00810613            addi    a2,sp,8                                           
40000e5c:   000a0593            mv  a1,s4                                                 
40000e60:   cb5ff0ef            jal ra,40000b14 <rtems_bdpart_read_record>                
    if (sc != RTEMS_SUCCESSFUL) {                                                         
40000e64:   0c051c63            bnez    a0,40000f3c <rtems_bdpart_read+0x280>             <== NEVER TAKEN
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,                                    
40000e68:   00812783            lw  a5,8(sp)                                              
    sc = rtems_bdpart_read_mbr_partition(                                                 
40000e6c:   00000693            li  a3,0                                                  
40000e70:   00048613            mv  a2,s1                                                 
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,                                    
40000e74:   01c7a503            lw  a0,28(a5)                                             
    sc = rtems_bdpart_read_mbr_partition(                                                 
40000e78:   00c10593            addi    a1,sp,12                                          
40000e7c:   1be50513            addi    a0,a0,446                                         
40000e80:   b69ff0ef            jal ra,400009e8 <rtems_bdpart_read_mbr_partition>         
40000e84:   00050793            mv  a5,a0                                                 
    if (sc != RTEMS_SUCCESSFUL) {                                                         
40000e88:   0a051e63            bnez    a0,40000f44 <rtems_bdpart_read+0x288>             <== NEVER TAKEN
    tmp = p->begin + ebr;                                                                 
40000e8c:   00c12603            lw  a2,12(sp)                                             
40000e90:   00062703            lw  a4,0(a2)                                              
40000e94:   014706b3            add a3,a4,s4                                              
    if (tmp > p->begin) {                                                                 
40000e98:   08d77a63            bgeu    a4,a3,40000f2c <rtems_bdpart_read+0x270>          
    tmp = p->end + ebr;                                                                   
40000e9c:   00462703            lw  a4,4(a2)                                              
      p->begin = tmp;                                                                     
40000ea0:   00d62023            sw  a3,0(a2)                                              
    tmp = p->end + ebr;                                                                   
40000ea4:   01470a33            add s4,a4,s4                                              
    if (tmp > p->end) {                                                                   
40000ea8:   09477263            bgeu    a4,s4,40000f2c <rtems_bdpart_read+0x270>          
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1                                     
40000eac:   00812503            lw  a0,8(sp)                                              
      p->end = tmp;                                                                       
40000eb0:   01462223            sw  s4,4(a2)                                              
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1                                     
40000eb4:   01c52803            lw  a6,28(a0)                                             
40000eb8:   1d980713            addi    a4,a6,473                                         
40000ebc:   1d580593            addi    a1,a6,469                                         
    value = (value << 8) + data [i];                                                      
40000ec0:   00074683            lbu a3,0(a4)                                              
40000ec4:   00879793            slli    a5,a5,0x8                                         
  for (i = 3; i >= 0; --i) {                                                              
40000ec8:   fff70713            addi    a4,a4,-1                                          
    value = (value << 8) + data [i];                                                      
40000ecc:   00f687b3            add a5,a3,a5                                              
  for (i = 3; i >= 0; --i) {                                                              
40000ed0:   fee598e3            bne a1,a4,40000ec0 <rtems_bdpart_read+0x204>              
  if (type == RTEMS_BDPART_MBR_EXTENDED) {                                                
40000ed4:   1d284703            lbu a4,466(a6)                                            
40000ed8:   03570263            beq a4,s5,40000efc <rtems_bdpart_read+0x240>              
  *count = (size_t) (p - pt + 1);                                                         
40000edc:   412607b3            sub a5,a2,s2                                              
40000ee0:   aaaab737            lui a4,0xaaaab                                            
40000ee4:   4047d793            srai    a5,a5,0x4                                         
40000ee8:   aab70713            addi    a4,a4,-1365 # aaaaaaab <RamEnd+0x69aaaaab>        
40000eec:   02e787b3            mul a5,a5,a4                                              
40000ef0:   00178793            addi    a5,a5,1                                           
40000ef4:   00f9a023            sw  a5,0(s3)                                              
40000ef8:   e9dff06f            j   40000d94 <rtems_bdpart_read+0xd8>                     
    if (ebr != 0) {                                                                       
40000efc:   fe0780e3            beqz    a5,40000edc <rtems_bdpart_read+0x220>             <== NEVER TAKEN
      tmp = ebr + ep_begin;                                                               
40000f00:   01012a03            lw  s4,16(sp)                                             
40000f04:   01478a33            add s4,a5,s4                                              
      if (tmp > ebr) {                                                                    
40000f08:   f547e6e3            bltu    a5,s4,40000e54 <rtems_bdpart_read+0x198>          
  if (fd >= 0) {                                                                          
40000f0c:   01812783            lw  a5,24(sp)                                             <== NOT EXECUTED
        esc = RTEMS_IO_ERROR;                                                             
40000f10:   01b00413            li  s0,27                                                 <== NOT EXECUTED
  if (fd >= 0) {                                                                          
40000f14:   e807c8e3            bltz    a5,40000da4 <rtems_bdpart_read+0xe8>              <== NOT EXECUTED
    close( fd);                                                                           
40000f18:   00078513            mv  a0,a5                                                 
40000f1c:   1b1010ef            jal ra,400028cc <close>                                   
  if (block != NULL) {                                                                    
40000f20:   00812503            lw  a0,8(sp)                                              
40000f24:   e80510e3            bnez    a0,40000da4 <rtems_bdpart_read+0xe8>              <== ALWAYS TAKEN
40000f28:   e29ff06f            j   40000d50 <rtems_bdpart_read+0x94>                     <== NOT EXECUTED
      esc = RTEMS_IO_ERROR;                                                               
40000f2c:   01b00413            li  s0,27                                                 <== NOT EXECUTED
40000f30:   e65ff06f            j   40000d94 <rtems_bdpart_read+0xd8>                     <== NOT EXECUTED
    esc = RTEMS_NOT_IMPLEMENTED;                                                          
40000f34:   01800413            li  s0,24                                                 <== NOT EXECUTED
40000f38:   e5dff06f            j   40000d94 <rtems_bdpart_read+0xd8>                     <== NOT EXECUTED
40000f3c:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
40000f40:   e55ff06f            j   40000d94 <rtems_bdpart_read+0xd8>                     <== NOT EXECUTED
40000f44:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
40000f48:   e4dff06f            j   40000d94 <rtems_bdpart_read+0xd8>                     <== NOT EXECUTED
  *count = (size_t) (p - pt + 1);                                                         
40000f4c:   00c12603            lw  a2,12(sp)                                             <== NOT EXECUTED
40000f50:   f8dff06f            j   40000edc <rtems_bdpart_read+0x220>                    <== NOT EXECUTED
                                                                                          

40000f54 <rtems_bdpart_register>: rtems_status_code rtems_bdpart_register( const char *disk_name, const rtems_bdpart_partition *pt, size_t count ) {
40000f54:   fc010113            addi    sp,sp,-64                                         
40000f58:   02812c23            sw  s0,56(sp)                                             
40000f5c:   03412423            sw  s4,40(sp)                                             
  rtems_status_code esc = RTEMS_SUCCESSFUL;                                               
  rtems_blkdev_bnum disk_end = 0;                                                         
  char *logical_disk_name = NULL;                                                         
  char *logical_disk_marker = NULL;                                                       
  size_t i = 0;                                                                           
  int fd = -1;                                                                            
40000f60:   fff00793            li  a5,-1                                                 
{                                                                                         
40000f64:   00058413            mv  s0,a1                                                 
40000f68:   00060a13            mv  s4,a2                                                 
  rtems_disk_device *dd = NULL;                                                           
                                                                                          
  /* Get disk data */                                                                     
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
40000f6c:   00410693            addi    a3,sp,4                                           
40000f70:   00c10613            addi    a2,sp,12                                          
40000f74:   00810593            addi    a1,sp,8                                           
{                                                                                         
40000f78:   03212823            sw  s2,48(sp)                                             
40000f7c:   03612023            sw  s6,32(sp)                                             
40000f80:   02112e23            sw  ra,60(sp)                                             
40000f84:   02912a23            sw  s1,52(sp)                                             
40000f88:   03312623            sw  s3,44(sp)                                             
40000f8c:   03512223            sw  s5,36(sp)                                             
40000f90:   01712e23            sw  s7,28(sp)                                             
40000f94:   01812c23            sw  s8,24(sp)                                             
40000f98:   00050913            mv  s2,a0                                                 
  rtems_blkdev_bnum disk_end = 0;                                                         
40000f9c:   00012223            sw  zero,4(sp)                                            
  int fd = -1;                                                                            
40000fa0:   00f12423            sw  a5,8(sp)                                              
  rtems_disk_device *dd = NULL;                                                           
40000fa4:   00012623            sw  zero,12(sp)                                           
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
40000fa8:   c55ff0ef            jal ra,40000bfc <rtems_bdpart_get_disk_data>              
40000fac:   00050b13            mv  s6,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40000fb0:   02050c63            beqz    a0,40000fe8 <rtems_bdpart_register+0x94>          <== ALWAYS TAKEN
                                                                                          
  free( logical_disk_name);                                                               
  close( fd);                                                                             
                                                                                          
  return esc;                                                                             
}                                                                                         
40000fb4:   03c12083            lw  ra,60(sp)                                             
40000fb8:   03812403            lw  s0,56(sp)                                             
40000fbc:   03412483            lw  s1,52(sp)                                             
40000fc0:   03012903            lw  s2,48(sp)                                             
40000fc4:   02c12983            lw  s3,44(sp)                                             
40000fc8:   02812a03            lw  s4,40(sp)                                             
40000fcc:   02412a83            lw  s5,36(sp)                                             
40000fd0:   01c12b83            lw  s7,28(sp)                                             
40000fd4:   01812c03            lw  s8,24(sp)                                             
40000fd8:   000b0513            mv  a0,s6                                                 
40000fdc:   02012b03            lw  s6,32(sp)                                             
40000fe0:   04010113            addi    sp,sp,64                                          
40000fe4:   00008067            ret                                                       
  size_t disk_name_size = strlen( disk_name);                                             
40000fe8:   00090513            mv  a0,s2                                                 
40000fec:   5a8140ef            jal ra,40015594 <strlen>                                  
40000ff0:   00050993            mv  s3,a0                                                 
  char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);           
40000ff4:   00450513            addi    a0,a0,4                                           
40000ff8:   00c020ef            jal ra,40003004 <malloc>                                  
40000ffc:   00050a93            mv  s5,a0                                                 
  if (logical_disk_name != NULL) {                                                        
40001000:   06050663            beqz    a0,4000106c <rtems_bdpart_register+0x118>         <== NEVER TAKEN
    memcpy( logical_disk_name, disk_name, disk_name_size);                                
40001004:   00098613            mv  a2,s3                                                 
40001008:   00090593            mv  a1,s2                                                 
4000100c:   44d130ef            jal ra,40014c58 <memcpy>                                  
    *marker = logical_disk_name + disk_name_size;                                         
40001010:   013a89b3            add s3,s5,s3                                              
  for (i = 0; i < count; ++i) {                                                           
40001014:   00000493            li  s1,0                                                  
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
40001018:   4001fbb7            lui s7,0x4001f                                            
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {                                                   
4000101c:   00300c13            li  s8,3                                                  
40001020:   01c0006f            j   4000103c <rtems_bdpart_register+0xe8>                 
    sc = rtems_blkdev_create_partition(                                                   
40001024:   00042603            lw  a2,0(s0)                                              
40001028:   00442683            lw  a3,4(s0)                                              
    if (sc != RTEMS_SUCCESSFUL) {                                                         
4000102c:   03040413            addi    s0,s0,48                                          
    sc = rtems_blkdev_create_partition(                                                   
40001030:   40c686b3            sub a3,a3,a2                                              
40001034:   391000ef            jal ra,40001bc4 <rtems_blkdev_create_partition>           
    if (sc != RTEMS_SUCCESSFUL) {                                                         
40001038:   04051463            bnez    a0,40001080 <rtems_bdpart_register+0x12c>         <== NEVER TAKEN
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
4000103c:   890b8613            addi    a2,s7,-1904 # 4001e890 <RTEMS_BDPART_MBR_MASTER_TYPE+0x10>
40001040:   00400593            li  a1,4                                                  
40001044:   00098513            mv  a0,s3                                                 
  for (i = 0; i < count; ++i) {                                                           
40001048:   03448263            beq s1,s4,4000106c <rtems_bdpart_register+0x118>          
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
4000104c:   00148493            addi    s1,s1,1                                           
40001050:   00048693            mv  a3,s1                                                 
40001054:   795130ef            jal ra,40014fe8 <snprintf>                                
40001058:   00050793            mv  a5,a0                                                 
    sc = rtems_blkdev_create_partition(                                                   
4000105c:   00090593            mv  a1,s2                                                 
40001060:   000a8513            mv  a0,s5                                                 
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {                                                   
40001064:   fcfc50e3            bge s8,a5,40001024 <rtems_bdpart_register+0xd0>           
    sc = RTEMS_INVALID_NAME;                                                              
40001068:   00300b13            li  s6,3                                                  <== NOT EXECUTED
  free( logical_disk_name);                                                               
4000106c:   000a8513            mv  a0,s5                                                 
40001070:   241010ef            jal ra,40002ab0 <free>                                    
  close( fd);                                                                             
40001074:   00812503            lw  a0,8(sp)                                              
40001078:   055010ef            jal ra,400028cc <close>                                   
  return esc;                                                                             
4000107c:   f39ff06f            j   40000fb4 <rtems_bdpart_register+0x60>                 
40001080:   00050b13            mv  s6,a0                                                 <== NOT EXECUTED
40001084:   fe9ff06f            j   4000106c <rtems_bdpart_register+0x118>                <== NOT EXECUTED
                                                                                          

40001088 <rtems_bdpart_register_from_disk>: rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name) {
40001088:   cd010113            addi    sp,sp,-816                                        
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  rtems_bdpart_format format;                                                             
  rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];                         
  size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;                                      
4000108c:   01000793            li  a5,16                                                 
                                                                                          
  /* Read partitions */                                                                   
  sc = rtems_bdpart_read( disk_name, &format, pt, &count);                                
40001090:   00810693            addi    a3,sp,8                                           
40001094:   02010613            addi    a2,sp,32                                          
40001098:   00c10593            addi    a1,sp,12                                          
{                                                                                         
4000109c:   32812423            sw  s0,808(sp)                                            
400010a0:   32112623            sw  ra,812(sp)                                            
400010a4:   00050413            mv  s0,a0                                                 
  size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;                                      
400010a8:   00f12423            sw  a5,8(sp)                                              
  sc = rtems_bdpart_read( disk_name, &format, pt, &count);                                
400010ac:   c11ff0ef            jal ra,40000cbc <rtems_bdpart_read>                       
  if (sc != RTEMS_SUCCESSFUL) {                                                           
400010b0:   00051a63            bnez    a0,400010c4 <rtems_bdpart_register_from_disk+0x3c><== NEVER TAKEN
    return sc;                                                                            
  }                                                                                       
                                                                                          
  /* Register partitions */                                                               
  return rtems_bdpart_register( disk_name, pt, count);                                    
400010b4:   00812603            lw  a2,8(sp)                                              
400010b8:   02010593            addi    a1,sp,32                                          
400010bc:   00040513            mv  a0,s0                                                 
400010c0:   e95ff0ef            jal ra,40000f54 <rtems_bdpart_register>                   
}                                                                                         
400010c4:   32c12083            lw  ra,812(sp)                                            
400010c8:   32812403            lw  s0,808(sp)                                            
400010cc:   33010113            addi    sp,sp,816                                         
400010d0:   00008067            ret                                                       
                                                                                          

400010d4 <rtems_bdpart_unregister>: rtems_status_code rtems_bdpart_unregister( const char *disk_name, const rtems_bdpart_partition *pt RTEMS_UNUSED, size_t count ) {
400010d4:   fd010113            addi    sp,sp,-48                                         
400010d8:   03212023            sw  s2,32(sp)                                             
  rtems_status_code esc = RTEMS_SUCCESSFUL;                                               
  rtems_blkdev_bnum disk_end = 0;                                                         
  char *logical_disk_name = NULL;                                                         
  char *logical_disk_marker = NULL;                                                       
  size_t i = 0;                                                                           
  int fd = -1;                                                                            
400010dc:   fff00793            li  a5,-1                                                 
{                                                                                         
400010e0:   00060913            mv  s2,a2                                                 
  rtems_disk_device *dd = NULL;                                                           
                                                                                          
  /* Get disk data */                                                                     
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
400010e4:   00410693            addi    a3,sp,4                                           
400010e8:   00c10613            addi    a2,sp,12                                          
400010ec:   00810593            addi    a1,sp,8                                           
{                                                                                         
400010f0:   02812423            sw  s0,40(sp)                                             
400010f4:   01412c23            sw  s4,24(sp)                                             
400010f8:   02112623            sw  ra,44(sp)                                             
400010fc:   02912223            sw  s1,36(sp)                                             
40001100:   01312e23            sw  s3,28(sp)                                             
40001104:   01512a23            sw  s5,20(sp)                                             
40001108:   01612823            sw  s6,16(sp)                                             
4000110c:   00050413            mv  s0,a0                                                 
  rtems_blkdev_bnum disk_end = 0;                                                         
40001110:   00012223            sw  zero,4(sp)                                            
  int fd = -1;                                                                            
40001114:   00f12423            sw  a5,8(sp)                                              
  rtems_disk_device *dd = NULL;                                                           
40001118:   00012623            sw  zero,12(sp)                                           
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
4000111c:   ae1ff0ef            jal ra,40000bfc <rtems_bdpart_get_disk_data>              
40001120:   00050a13            mv  s4,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001124:   02050863            beqz    a0,40001154 <rtems_bdpart_unregister+0x80>        <== ALWAYS TAKEN
                                                                                          
  free( logical_disk_name);                                                               
  close( fd);                                                                             
                                                                                          
  return esc;                                                                             
}                                                                                         
40001128:   02c12083            lw  ra,44(sp)                                             
4000112c:   02812403            lw  s0,40(sp)                                             
40001130:   02412483            lw  s1,36(sp)                                             
40001134:   02012903            lw  s2,32(sp)                                             
40001138:   01c12983            lw  s3,28(sp)                                             
4000113c:   01412a83            lw  s5,20(sp)                                             
40001140:   01012b03            lw  s6,16(sp)                                             
40001144:   000a0513            mv  a0,s4                                                 
40001148:   01812a03            lw  s4,24(sp)                                             
4000114c:   03010113            addi    sp,sp,48                                          
40001150:   00008067            ret                                                       
  size_t disk_name_size = strlen( disk_name);                                             
40001154:   00040513            mv  a0,s0                                                 
40001158:   43c140ef            jal ra,40015594 <strlen>                                  
4000115c:   00050493            mv  s1,a0                                                 
  char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);           
40001160:   00450513            addi    a0,a0,4                                           
40001164:   6a1010ef            jal ra,40003004 <malloc>                                  
40001168:   00050993            mv  s3,a0                                                 
  if (logical_disk_name != NULL) {                                                        
4000116c:   04050c63            beqz    a0,400011c4 <rtems_bdpart_unregister+0xf0>        <== NEVER TAKEN
    memcpy( logical_disk_name, disk_name, disk_name_size);                                
40001170:   00048613            mv  a2,s1                                                 
40001174:   00040593            mv  a1,s0                                                 
40001178:   2e1130ef            jal ra,40014c58 <memcpy>                                  
    *marker = logical_disk_name + disk_name_size;                                         
4000117c:   009984b3            add s1,s3,s1                                              
  for (i = 0; i < count; ++i) {                                                           
40001180:   00000413            li  s0,0                                                  
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
40001184:   4001fab7            lui s5,0x4001f                                            
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {                                                   
40001188:   00300b13            li  s6,3                                                  
4000118c:   00c0006f            j   40001198 <rtems_bdpart_unregister+0xc4>               
    rv = unlink( logical_disk_name);                                                      
40001190:   335030ef            jal ra,40004cc4 <unlink>                                  
    if (rv != 0) {                                                                        
40001194:   02051863            bnez    a0,400011c4 <rtems_bdpart_unregister+0xf0>        <== NEVER TAKEN
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
40001198:   890a8613            addi    a2,s5,-1904 # 4001e890 <RTEMS_BDPART_MBR_MASTER_TYPE+0x10>
4000119c:   00400593            li  a1,4                                                  
400011a0:   00048513            mv  a0,s1                                                 
  for (i = 0; i < count; ++i) {                                                           
400011a4:   03240063            beq s0,s2,400011c4 <rtems_bdpart_unregister+0xf0>         
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);            
400011a8:   00140413            addi    s0,s0,1                                           
400011ac:   00040693            mv  a3,s0                                                 
400011b0:   639130ef            jal ra,40014fe8 <snprintf>                                
400011b4:   00050793            mv  a5,a0                                                 
    rv = unlink( logical_disk_name);                                                      
400011b8:   00098513            mv  a0,s3                                                 
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {                                                   
400011bc:   fcfb5ae3            bge s6,a5,40001190 <rtems_bdpart_unregister+0xbc>         
    sc = RTEMS_INVALID_NAME;                                                              
400011c0:   00300a13            li  s4,3                                                  <== NOT EXECUTED
  free( logical_disk_name);                                                               
400011c4:   00098513            mv  a0,s3                                                 
400011c8:   0e9010ef            jal ra,40002ab0 <free>                                    
  close( fd);                                                                             
400011cc:   00812503            lw  a0,8(sp)                                              
400011d0:   6fc010ef            jal ra,400028cc <close>                                   
  return esc;                                                                             
400011d4:   f55ff06f            j   40001128 <rtems_bdpart_unregister+0x54>               
                                                                                          

4000128c <rtems_bdpart_write>: const char *disk_name, const rtems_bdpart_format *format, const rtems_bdpart_partition *pt, size_t count ) {
4000128c:   fb010113            addi    sp,sp,-80                                         
40001290:   03312e23            sw  s3,60(sp)                                             
40001294:   04112623            sw  ra,76(sp)                                             
40001298:   04812423            sw  s0,72(sp)                                             
4000129c:   04912223            sw  s1,68(sp)                                             
400012a0:   05212023            sw  s2,64(sp)                                             
400012a4:   03412c23            sw  s4,56(sp)                                             
400012a8:   03512a23            sw  s5,52(sp)                                             
400012ac:   03612823            sw  s6,48(sp)                                             
400012b0:   03712623            sw  s7,44(sp)                                             
400012b4:   03812423            sw  s8,40(sp)                                             
400012b8:   00068993            mv  s3,a3                                                 
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  rtems_status_code esc = RTEMS_SUCCESSFUL;                                               
  bool dos_compatibility = format != NULL                                                 
    && format->type == RTEMS_BDPART_FORMAT_MBR                                            
    && format->mbr.dos_compatibility;                                                     
400012bc:   12058063            beqz    a1,400013dc <rtems_bdpart_write+0x150>            <== NEVER TAKEN
    && format->type == RTEMS_BDPART_FORMAT_MBR                                            
400012c0:   0005a783            lw  a5,0(a1)                                              
400012c4:   00058a13            mv  s4,a1                                                 
400012c8:   00060a93            mv  s5,a2                                                 
400012cc:   0e079263            bnez    a5,400013b0 <rtems_bdpart_write+0x124>            <== NEVER TAKEN
    && format->mbr.dos_compatibility;                                                     
400012d0:   0085c783            lbu a5,8(a1)                                              
400012d4:   0c078e63            beqz    a5,400013b0 <rtems_bdpart_write+0x124>            <== NEVER TAKEN
  rtems_blkdev_bnum record_space =                                                        
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
  size_t ppc = 0; /* Primary partition count */                                           
  size_t i = 0;                                                                           
  uint8_t *data = NULL;                                                                   
  int fd = -1;                                                                            
400012d8:   fff00793            li  a5,-1                                                 
  rtems_bdbuf_buffer *block = NULL;                                                       
400012dc:   00012823            sw  zero,16(sp)                                           
  rtems_blkdev_bnum disk_end = 0;                                                         
400012e0:   00012a23            sw  zero,20(sp)                                           
  int fd = -1;                                                                            
400012e4:   00f12c23            sw  a5,24(sp)                                             
  rtems_disk_device *dd = NULL;                                                           
400012e8:   00012e23            sw  zero,28(sp)                                           
                                                                                          
  /* Check if we have something to do */                                                  
  if (count == 0) {                                                                       
400012ec:   0e068a63            beqz    a3,400013e0 <rtems_bdpart_write+0x154>            <== NEVER TAKEN
    && format->mbr.dos_compatibility;                                                     
400012f0:   00100913            li  s2,1                                                  
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
400012f4:   03f00493            li  s1,63                                                 
    /* Nothing to do */                                                                   
    return RTEMS_SUCCESSFUL;                                                              
  }                                                                                       
                                                                                          
  /* Check parameter */                                                                   
  if (format == NULL || pt == NULL) {                                                     
400012f8:   0c0a8e63            beqz    s5,400013d4 <rtems_bdpart_write+0x148>            <== NEVER TAKEN
    return RTEMS_INVALID_ADDRESS;                                                         
  }                                                                                       
                                                                                          
  /* Get disk data */                                                                     
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);                       
400012fc:   01410693            addi    a3,sp,20                                          
40001300:   01c10613            addi    a2,sp,28                                          
40001304:   01810593            addi    a1,sp,24                                          
40001308:   8f5ff0ef            jal ra,40000bfc <rtems_bdpart_get_disk_data>              
4000130c:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001310:   0c051a63            bnez    a0,400013e4 <rtems_bdpart_write+0x158>            <== NEVER TAKEN
    return sc;                                                                            
  }                                                                                       
                                                                                          
  /* Align end of disk on cylinder boundary if necessary */                               
  if (dos_compatibility) {                                                                
    disk_end -= (disk_end % record_space);                                                
40001314:   01412803            lw  a6,20(sp)                                             
  if (dos_compatibility) {                                                                
40001318:   10091063            bnez    s2,40001418 <rtems_bdpart_write+0x18c>            <== ALWAYS TAKEN
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
4000131c:   000a8793            mv  a5,s5                                                 
  /* Check that we have a consistent partition table */                                   
  for (i = 0; i < count; ++i) {                                                           
    const rtems_bdpart_partition *p = pt + i;                                             
                                                                                          
    /* Check that begin and end are proper within the disk */                             
    if (p->begin >= disk_end || p->end > disk_end) {                                      
40001320:   0007a703            lw  a4,0(a5)                                              
40001324:   07077863            bgeu    a4,a6,40001394 <rtems_bdpart_write+0x108>         
40001328:   0047a503            lw  a0,4(a5)                                              
4000132c:   06a86463            bltu    a6,a0,40001394 <rtems_bdpart_write+0x108>         
      esc = RTEMS_INVALID_NUMBER;                                                         
      goto cleanup;                                                                       
    }                                                                                     
                                                                                          
    /* Check that begin and end are valid */                                              
    if (p->begin >= p->end) {                                                             
40001330:   06a77263            bgeu    a4,a0,40001394 <rtems_bdpart_write+0x108>         
      esc = RTEMS_INVALID_NUMBER;                                                         
      goto cleanup;                                                                       
    }                                                                                     
                                                                                          
    /* Check that partitions do not overlap */                                            
    if (i > 0 && pt [i - 1].end > p->begin) {                                             
40001334:   00040663            beqz    s0,40001340 <rtems_bdpart_write+0xb4>             
40001338:   fd47a503            lw  a0,-44(a5)                                            
4000133c:   04a76c63            bltu    a4,a0,40001394 <rtems_bdpart_write+0x108>         
  for (i = 0; i < count; ++i) {                                                           
40001340:   00140413            addi    s0,s0,1                                           
40001344:   03078793            addi    a5,a5,48                                          
40001348:   fd346ce3            bltu    s0,s3,40001320 <rtems_bdpart_write+0x94>          
      goto cleanup;                                                                       
    }                                                                                     
  }                                                                                       
                                                                                          
  /* Check format */                                                                      
  if (format->type != RTEMS_BDPART_FORMAT_MBR) {                                          
4000134c:   000a2b03            lw  s6,0(s4)                                              
    esc = RTEMS_NOT_IMPLEMENTED;                                                          
40001350:   01800413            li  s0,24                                                 
  if (format->type != RTEMS_BDPART_FORMAT_MBR) {                                          
40001354:   040b1263            bnez    s6,40001398 <rtems_bdpart_write+0x10c>            <== NEVER TAKEN
   * Set primary partition count.  If we have more than four partitions we need           
   * an extended partition which will contain the partitions of number four and           
   * above as logical partitions.  If we have four or less partitions we can              
   * use the primary partition table.                                                     
   */                                                                                     
  ppc = count <= 4 ? count : 3;                                                           
40001358:   00400793            li  a5,4                                                  
4000135c:   0d37fe63            bgeu    a5,s3,40001438 <rtems_bdpart_write+0x1ac>         
                                                                                          
  /*                                                                                      
   * Check that the first primary partition starts at head one and sector one             
   * under the virtual one head and 63 sectors geometry if necessary.                     
   */                                                                                     
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {              
40001360:   34091463            bnez    s2,400016a8 <rtems_bdpart_write+0x41c>            <== ALWAYS TAKEN
40001364:   00199613            slli    a2,s3,0x1                                         
40001368:   01360633            add a2,a2,s3                                              
4000136c:   00461613            slli    a2,a2,0x4                                         
40001370:   090a8793            addi    a5,s5,144                                         
40001374:   00ca8633            add a2,s5,a2                                              
40001378:   0080006f            j   40001380 <rtems_bdpart_write+0xf4>                    
   * Each logical partition is described via one EBR preceding the partition.             
   * The space for the EBR and maybe some space which is needed for DOS                   
   * compatibility resides between the partitions.  So there have to be gaps of           
   * the appropriate size between the partitions.                                         
   */                                                                                     
  for (i = ppc; i < count; ++i) {                                                         
4000137c:   0cc78c63            beq a5,a2,40001454 <rtems_bdpart_write+0x1c8>             
    if ((pt [i].begin - pt [i - 1].end) < record_space) {                                 
40001380:   0007a703            lw  a4,0(a5)                                              
40001384:   fd47a683            lw  a3,-44(a5)                                            
  for (i = ppc; i < count; ++i) {                                                         
40001388:   03078793            addi    a5,a5,48                                          
    if ((pt [i].begin - pt [i - 1].end) < record_space) {                                 
4000138c:   40d70733            sub a4,a4,a3                                              
40001390:   fe9776e3            bgeu    a4,s1,4000137c <rtems_bdpart_write+0xf0>          
      esc = RTEMS_INVALID_NUMBER;                                                         
40001394:   00a00413            li  s0,10                                                 <== NOT EXECUTED
    }                                                                                     
  }                                                                                       
                                                                                          
cleanup:                                                                                  
                                                                                          
  if (fd >= 0) {                                                                          
40001398:   01812503            lw  a0,24(sp)                                             
4000139c:   08055663            bgez    a0,40001428 <rtems_bdpart_write+0x19c>            <== ALWAYS TAKEN
    close( fd);                                                                           
  }                                                                                       
                                                                                          
  if (block != NULL) {                                                                    
400013a0:   01012503            lw  a0,16(sp)                                             <== NOT EXECUTED
400013a4:   04050063            beqz    a0,400013e4 <rtems_bdpart_write+0x158>            <== NOT EXECUTED
    rtems_bdbuf_sync( block);                                                             
400013a8:   6b50c0ef            jal ra,4000e25c <rtems_bdbuf_sync>                        
400013ac:   0380006f            j   400013e4 <rtems_bdpart_write+0x158>                   
  int fd = -1;                                                                            
400013b0:   fff00793            li  a5,-1                                                 <== NOT EXECUTED
  rtems_bdbuf_buffer *block = NULL;                                                       
400013b4:   00012823            sw  zero,16(sp)                                           <== NOT EXECUTED
  rtems_blkdev_bnum disk_end = 0;                                                         
400013b8:   00012a23            sw  zero,20(sp)                                           <== NOT EXECUTED
  int fd = -1;                                                                            
400013bc:   00f12c23            sw  a5,24(sp)                                             <== NOT EXECUTED
  rtems_disk_device *dd = NULL;                                                           
400013c0:   00012e23            sw  zero,28(sp)                                           <== NOT EXECUTED
  if (count == 0) {                                                                       
400013c4:   00098e63            beqz    s3,400013e0 <rtems_bdpart_write+0x154>            <== NOT EXECUTED
    && format->mbr.dos_compatibility;                                                     
400013c8:   00000913            li  s2,0                                                  <== NOT EXECUTED
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;                               
400013cc:   00100493            li  s1,1                                                  <== NOT EXECUTED
  if (format == NULL || pt == NULL) {                                                     
400013d0:   f20a96e3            bnez    s5,400012fc <rtems_bdpart_write+0x70>             <== NOT EXECUTED
    return RTEMS_INVALID_ADDRESS;                                                         
400013d4:   00900413            li  s0,9                                                  <== NOT EXECUTED
400013d8:   00c0006f            j   400013e4 <rtems_bdpart_write+0x158>                   <== NOT EXECUTED
  if (count == 0) {                                                                       
400013dc:   fe069ce3            bnez    a3,400013d4 <rtems_bdpart_write+0x148>            <== NOT EXECUTED
    return RTEMS_SUCCESSFUL;                                                              
400013e0:   00000413            li  s0,0                                                  <== NOT EXECUTED
  }                                                                                       
                                                                                          
  return esc;                                                                             
}                                                                                         
400013e4:   04c12083            lw  ra,76(sp)                                             
400013e8:   00040513            mv  a0,s0                                                 
400013ec:   04812403            lw  s0,72(sp)                                             
400013f0:   04412483            lw  s1,68(sp)                                             
400013f4:   04012903            lw  s2,64(sp)                                             
400013f8:   03c12983            lw  s3,60(sp)                                             
400013fc:   03812a03            lw  s4,56(sp)                                             
40001400:   03412a83            lw  s5,52(sp)                                             
40001404:   03012b03            lw  s6,48(sp)                                             
40001408:   02c12b83            lw  s7,44(sp)                                             
4000140c:   02812c03            lw  s8,40(sp)                                             
40001410:   05010113            addi    sp,sp,80                                          
40001414:   00008067            ret                                                       
    disk_end -= (disk_end % record_space);                                                
40001418:   029877b3            remu    a5,a6,s1                                          
4000141c:   40f80833            sub a6,a6,a5                                              
40001420:   01012a23            sw  a6,20(sp)                                             
40001424:   ef9ff06f            j   4000131c <rtems_bdpart_write+0x90>                    
    close( fd);                                                                           
40001428:   4a4010ef            jal ra,400028cc <close>                                   
  if (block != NULL) {                                                                    
4000142c:   01012503            lw  a0,16(sp)                                             
40001430:   f6051ce3            bnez    a0,400013a8 <rtems_bdpart_write+0x11c>            <== ALWAYS TAKEN
40001434:   fb1ff06f            j   400013e4 <rtems_bdpart_write+0x158>                   <== NOT EXECUTED
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {              
40001438:   00090a63            beqz    s2,4000144c <rtems_bdpart_write+0x1c0>            <== NOT EXECUTED
4000143c:   000aa703            lw  a4,0(s5)                                              <== NOT EXECUTED
40001440:   03f00793            li  a5,63                                                 <== NOT EXECUTED
      esc = RTEMS_INVALID_NUMBER;                                                         
40001444:   00a00413            li  s0,10                                                 <== NOT EXECUTED
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {              
40001448:   f4f718e3            bne a4,a5,40001398 <rtems_bdpart_write+0x10c>             <== NOT EXECUTED
4000144c:   00098913            mv  s2,s3                                                 <== NOT EXECUTED
40001450:   0080006f            j   40001458 <rtems_bdpart_write+0x1cc>                   <== NOT EXECUTED
40001454:   00300913            li  s2,3                                                  
40001458:   008a8413            addi    s0,s5,8                                           
    if (p->flags > 0xffU) {                                                               
4000145c:   0ff00b93            li  s7,255                                                
    if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {                           
40001460:   00040513            mv  a0,s0                                                 
40001464:   00f10593            addi    a1,sp,15                                          
    uint8_t type = 0;                                                                     
40001468:   000107a3            sb  zero,15(sp)                                           
    if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {                           
4000146c:   f5cff0ef            jal ra,40000bc8 <rtems_bdpart_to_mbr_partition_type>      
  for (i = 0; i < count; ++i) {                                                           
40001470:   001b0b13            addi    s6,s6,1                                           
    if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {                           
40001474:   22050663            beqz    a0,400016a0 <rtems_bdpart_write+0x414>            <== NEVER TAKEN
    if (p->flags > 0xffU) {                                                               
40001478:   02442783            lw  a5,36(s0)                                             
4000147c:   22079263            bnez    a5,400016a0 <rtems_bdpart_write+0x414>            <== NEVER TAKEN
40001480:   02042783            lw  a5,32(s0)                                             
  for (i = 0; i < count; ++i) {                                                           
40001484:   03040413            addi    s0,s0,48                                          
    if (p->flags > 0xffU) {                                                               
40001488:   20fbec63            bltu    s7,a5,400016a0 <rtems_bdpart_write+0x414>         
  for (i = 0; i < count; ++i) {                                                           
4000148c:   fd3b6ae3            bltu    s6,s3,40001460 <rtems_bdpart_write+0x1d4>         
  sc = rtems_bdpart_new_record( dd, 0, &block);                                           
40001490:   01c12503            lw  a0,28(sp)                                             
40001494:   01010613            addi    a2,sp,16                                          
40001498:   00000593            li  a1,0                                                  
4000149c:   d3dff0ef            jal ra,400011d8 <rtems_bdpart_new_record>                 
400014a0:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
400014a4:   ee051ae3            bnez    a0,40001398 <rtems_bdpart_write+0x10c>            <== NEVER TAKEN
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID                                       
400014a8:   01012603            lw  a2,16(sp)                                             
  rtems_uint32_to_little_endian(                                                          
400014ac:   004a2683            lw  a3,4(s4)                                              
400014b0:   00491713            slli    a4,s2,0x4                                         
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID                                       
400014b4:   01c62783            lw  a5,28(a2)                                             
{                                                                                         
  int i;                                                                                  
                                                                                          
  for (i = 0; i < 4; ++i) {                                                               
    data [i] = (uint8_t) value;                                                           
    value >>= 8;                                                                          
400014b8:   0086d813            srli    a6,a3,0x8                                         
400014bc:   0106d513            srli    a0,a3,0x10                                        
400014c0:   0186d593            srli    a1,a3,0x18                                        
    data [i] = (uint8_t) value;                                                           
400014c4:   1ad78c23            sb  a3,440(a5)                                            
400014c8:   1b078ca3            sb  a6,441(a5)                                            
400014cc:   1aa78d23            sb  a0,442(a5)                                            
400014d0:   1ab78da3            sb  a1,443(a5)                                            
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;                                 
400014d4:   01c62f83            lw  t6,28(a2)                                             
400014d8:   1be70713            addi    a4,a4,446                                         
400014dc:   000a8693            mv  a3,s5                                                 
400014e0:   1bef8793            addi    a5,t6,446                                         
  for (i = 0; i < ppc; ++i) {                                                             
400014e4:   00ef8fb3            add t6,t6,a4                                              
    rtems_bdpart_write_mbr_partition(                                                     
400014e8:   0006a603            lw  a2,0(a3)                                              
400014ec:   0046a703            lw  a4,4(a3)                                              
400014f0:   0086c503            lbu a0,8(a3)                                              
400014f4:   0286c583            lbu a1,40(a3)                                             
400014f8:   40c70733            sub a4,a4,a2                                              
    value >>= 8;                                                                          
400014fc:   00865f13            srli    t5,a2,0x8                                         
40001500:   01065e93            srli    t4,a2,0x10                                        
40001504:   01865e13            srli    t3,a2,0x18                                        
40001508:   00875313            srli    t1,a4,0x8                                         
4000150c:   01075893            srli    a7,a4,0x10                                        
40001510:   01875813            srli    a6,a4,0x18                                        
    data [i] = (uint8_t) value;                                                           
40001514:   00c78423            sb  a2,8(a5)                                              
40001518:   01e784a3            sb  t5,9(a5)                                              
4000151c:   01d78523            sb  t4,10(a5)                                             
40001520:   01c785a3            sb  t3,11(a5)                                             
40001524:   00e78623            sb  a4,12(a5)                                             
40001528:   006786a3            sb  t1,13(a5)                                             
4000152c:   01178723            sb  a7,14(a5)                                             
40001530:   010787a3            sb  a6,15(a5)                                             
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;                                             
40001534:   00a78223            sb  a0,4(a5)                                              
  data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;                                           
40001538:   00b78023            sb  a1,0(a5)                                              
    data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;                                            
4000153c:   01078793            addi    a5,a5,16                                          
  for (i = 0; i < ppc; ++i) {                                                             
40001540:   03068693            addi    a3,a3,48                                          
40001544:   fbf792e3            bne a5,t6,400014e8 <rtems_bdpart_write+0x25c>             
  if (ppc != count) {                                                                     
40001548:   e52988e3            beq s3,s2,40001398 <rtems_bdpart_write+0x10c>             
    rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;                           
4000154c:   00191713            slli    a4,s2,0x1                                         
40001550:   01270733            add a4,a4,s2                                              
40001554:   00471713            slli    a4,a4,0x4                                         
40001558:   00ea8ab3            add s5,s5,a4                                              
    rtems_bdpart_write_mbr_partition(                                                     
4000155c:   01412703            lw  a4,20(sp)                                             
    rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;                           
40001560:   000aaa03            lw  s4,0(s5)                                              
  data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;                                           
40001564:   00078023            sb  zero,0(a5)                                            
    rtems_bdpart_write_mbr_partition(                                                     
40001568:   00e48733            add a4,s1,a4                                              
4000156c:   41470733            sub a4,a4,s4                                              
    rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;                           
40001570:   409a06b3            sub a3,s4,s1                                              
    value >>= 8;                                                                          
40001574:   00875513            srli    a0,a4,0x8                                         
40001578:   01075593            srli    a1,a4,0x10                                        
4000157c:   01875613            srli    a2,a4,0x18                                        
40001580:   0086d313            srli    t1,a3,0x8                                         
40001584:   0106d893            srli    a7,a3,0x10                                        
40001588:   0186d813            srli    a6,a3,0x18                                        
    data [i] = (uint8_t) value;                                                           
4000158c:   00e78623            sb  a4,12(a5)                                             
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;                                             
40001590:   00500713            li  a4,5                                                  
40001594:   00d78423            sb  a3,8(a5)                                              
40001598:   006784a3            sb  t1,9(a5)                                              
4000159c:   01178523            sb  a7,10(a5)                                             
400015a0:   010785a3            sb  a6,11(a5)                                             
400015a4:   00a786a3            sb  a0,13(a5)                                             
400015a8:   00b78723            sb  a1,14(a5)                                             
400015ac:   00c787a3            sb  a2,15(a5)                                             
400015b0:   00e78223            sb  a4,4(a5)                                              
    for (i = ppc; i < count; ++i) {                                                       
400015b4:   df3972e3            bgeu    s2,s3,40001398 <rtems_bdpart_write+0x10c>         
      ebr = p->begin - record_space;                                                      
400015b8:   000aa583            lw  a1,0(s5)                                              
400015bc:   000a8c13            mv  s8,s5                                                 
400015c0:   00090b93            mv  s7,s2                                                 
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;                                             
400015c4:   00500b13            li  s6,5                                                  
      sc = rtems_bdpart_new_record( dd, ebr, &block);                                     
400015c8:   01c12503            lw  a0,28(sp)                                             
400015cc:   409585b3            sub a1,a1,s1                                              
400015d0:   01010613            addi    a2,sp,16                                          
400015d4:   c05ff0ef            jal ra,400011d8 <rtems_bdpart_new_record>                 
    for (i = ppc; i < count; ++i) {                                                       
400015d8:   001b8b93            addi    s7,s7,1                                           
      if (sc != RTEMS_SUCCESSFUL) {                                                       
400015dc:   0c051e63            bnez    a0,400016b8 <rtems_bdpart_write+0x42c>            <== NEVER TAKEN
        block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,                                  
400015e0:   01012683            lw  a3,16(sp)                                             
      rtems_bdpart_write_mbr_partition(                                                   
400015e4:   000aa503            lw  a0,0(s5)                                              
400015e8:   004aa703            lw  a4,4(s5)                                              
400015ec:   008ac583            lbu a1,8(s5)                                              
400015f0:   028ac603            lbu a2,40(s5)                                             
        block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,                                  
400015f4:   01c6a783            lw  a5,28(a3)                                             
      rtems_bdpart_write_mbr_partition(                                                   
400015f8:   40a70733            sub a4,a4,a0                                              
    value >>= 8;                                                                          
400015fc:   00875893            srli    a7,a4,0x8                                         
40001600:   01075813            srli    a6,a4,0x10                                        
40001604:   01875513            srli    a0,a4,0x18                                        
    data [i] = (uint8_t) value;                                                           
40001608:   1c978323            sb  s1,454(a5)                                            
4000160c:   1c0783a3            sb  zero,455(a5)                                          
40001610:   1c078423            sb  zero,456(a5)                                          
40001614:   1c0784a3            sb  zero,457(a5)                                          
40001618:   1ce78523            sb  a4,458(a5)                                            
4000161c:   1d1785a3            sb  a7,459(a5)                                            
40001620:   1d078623            sb  a6,460(a5)                                            
40001624:   1ca786a3            sb  a0,461(a5)                                            
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;                                             
40001628:   1cb78123            sb  a1,450(a5)                                            
  data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;                                           
4000162c:   1ac78f23            sb  a2,446(a5)                                            
    for (i = ppc; i < count; ++i) {                                                       
40001630:   d77984e3            beq s3,s7,40001398 <rtems_bdpart_write+0x10c>             
        rtems_blkdev_bnum begin = p->begin - record_space;                                
40001634:   030c2583            lw  a1,48(s8)                                             
40001638:   030a8a93            addi    s5,s5,48                                          
      if (i > ppc) {                                                                      
4000163c:   05797e63            bgeu    s2,s7,40001698 <rtems_bdpart_write+0x40c>         
        rtems_bdpart_write_mbr_partition(                                                 
40001640:   01412703            lw  a4,20(sp)                                             
          block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,                                
40001644:   01c6a783            lw  a5,28(a3)                                             
        rtems_bdpart_write_mbr_partition(                                                 
40001648:   414586b3            sub a3,a1,s4                                              
4000164c:   00e48733            add a4,s1,a4                                              
40001650:   40b70733            sub a4,a4,a1                                              
    value >>= 8;                                                                          
40001654:   01075593            srli    a1,a4,0x10                                        
40001658:   0086d313            srli    t1,a3,0x8                                         
4000165c:   0106d893            srli    a7,a3,0x10                                        
40001660:   0186d813            srli    a6,a3,0x18                                        
40001664:   00875513            srli    a0,a4,0x8                                         
40001668:   01875613            srli    a2,a4,0x18                                        
    data [i] = (uint8_t) value;                                                           
4000166c:   1cd78b23            sb  a3,470(a5)                                            
40001670:   1c678ba3            sb  t1,471(a5)                                            
40001674:   1d178c23            sb  a7,472(a5)                                            
40001678:   1d078ca3            sb  a6,473(a5)                                            
4000167c:   1ce78d23            sb  a4,474(a5)                                            
40001680:   1ca78da3            sb  a0,475(a5)                                            
40001684:   1cb78e23            sb  a1,476(a5)                                            
40001688:   1cc78ea3            sb  a2,477(a5)                                            
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;                                             
4000168c:   1d678923            sb  s6,466(a5)                                            
  data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;                                           
40001690:   1c078723            sb  zero,462(a5)                                          
      ebr = p->begin - record_space;                                                      
40001694:   030c2583            lw  a1,48(s8)                                             
40001698:   030c0c13            addi    s8,s8,48                                          
4000169c:   f2dff06f            j   400015c8 <rtems_bdpart_write+0x33c>                   
      goto cleanup;                                                                       
400016a0:   00400413            li  s0,4                                                  <== NOT EXECUTED
400016a4:   cf5ff06f            j   40001398 <rtems_bdpart_write+0x10c>                   <== NOT EXECUTED
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {              
400016a8:   000aa703            lw  a4,0(s5)                                              
400016ac:   03f00793            li  a5,63                                                 
400016b0:   caf70ae3            beq a4,a5,40001364 <rtems_bdpart_write+0xd8>              
400016b4:   ce1ff06f            j   40001394 <rtems_bdpart_write+0x108>                   <== NOT EXECUTED
400016b8:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
400016bc:   cddff06f            j   40001398 <rtems_bdpart_write+0x10c>                   <== NOT EXECUTED
                                                                                          

40001bc4 <rtems_blkdev_create_partition>: const char *partition, const char *parent_block_device, rtems_blkdev_bnum media_block_begin, rtems_blkdev_bnum media_block_count ) {
40001bc4:   f7010113            addi    sp,sp,-144                                        
40001bc8:   00058713            mv  a4,a1                                                 
40001bcc:   07412c23            sw  s4,120(sp)                                            
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  int fd = open(parent_block_device, O_RDWR);                                             
40001bd0:   00200593            li  a1,2                                                  
{                                                                                         
40001bd4:   00050a13            mv  s4,a0                                                 
  int fd = open(parent_block_device, O_RDWR);                                             
40001bd8:   00070513            mv  a0,a4                                                 
{                                                                                         
40001bdc:   08912223            sw  s1,132(sp)                                            
40001be0:   09212023            sw  s2,128(sp)                                            
40001be4:   07312e23            sw  s3,124(sp)                                            
40001be8:   08112623            sw  ra,140(sp)                                            
40001bec:   08812423            sw  s0,136(sp)                                            
40001bf0:   07512a23            sw  s5,116(sp)                                            
40001bf4:   07612823            sw  s6,112(sp)                                            
40001bf8:   00060993            mv  s3,a2                                                 
40001bfc:   00068913            mv  s2,a3                                                 
  int fd = open(parent_block_device, O_RDWR);                                             
40001c00:   455010ef            jal ra,40003854 <open>                                    
                                                                                          
    if (sc != RTEMS_SUCCESSFUL) {                                                         
      close(fd);                                                                          
    }                                                                                     
  } else {                                                                                
    sc = RTEMS_INVALID_ID;                                                                
40001c04:   00400493            li  s1,4                                                  
  if (fd >= 0) {                                                                          
40001c08:   02054a63            bltz    a0,40001c3c <rtems_blkdev_create_partition+0x78>  
    rv = fstat(fd, &st);                                                                  
40001c0c:   00810593            addi    a1,sp,8                                           
40001c10:   00050413            mv  s0,a0                                                 
40001c14:   78d000ef            jal ra,40002ba0 <fstat>                                   
    if (rv == 0 && S_ISBLK(st.st_mode)) {                                                 
40001c18:   04051863            bnez    a0,40001c68 <rtems_blkdev_create_partition+0xa4>  <== NEVER TAKEN
40001c1c:   01812703            lw  a4,24(sp)                                             
40001c20:   0000fab7            lui s5,0xf                                                
40001c24:   000067b7            lui a5,0x6                                                
40001c28:   00eafab3            and s5,s5,a4                                              
      sc = RTEMS_INVALID_NODE;                                                            
40001c2c:   01500493            li  s1,21                                                 
    if (rv == 0 && S_ISBLK(st.st_mode)) {                                                 
40001c30:   04fa8063            beq s5,a5,40001c70 <rtems_blkdev_create_partition+0xac>   
      close(fd);                                                                          
40001c34:   00040513            mv  a0,s0                                                 
40001c38:   495000ef            jal ra,400028cc <close>                                   
  }                                                                                       
                                                                                          
  return sc;                                                                              
}                                                                                         
40001c3c:   08c12083            lw  ra,140(sp)                                            
40001c40:   08812403            lw  s0,136(sp)                                            
40001c44:   08012903            lw  s2,128(sp)                                            
40001c48:   07c12983            lw  s3,124(sp)                                            
40001c4c:   07812a03            lw  s4,120(sp)                                            
40001c50:   07412a83            lw  s5,116(sp)                                            
40001c54:   07012b03            lw  s6,112(sp)                                            
40001c58:   00048513            mv  a0,s1                                                 
40001c5c:   08412483            lw  s1,132(sp)                                            
40001c60:   09010113            addi    sp,sp,144                                         
40001c64:   00008067            ret                                                       
      sc = RTEMS_INVALID_NODE;                                                            
40001c68:   01500493            li  s1,21                                                 <== NOT EXECUTED
40001c6c:   fc9ff06f            j   40001c34 <rtems_blkdev_create_partition+0x70>         <== NOT EXECUTED
40001c70:   400445b7            lui a1,0x40044                                            
40001c74:   00410613            addi    a2,sp,4                                           
40001c78:   20958593            addi    a1,a1,521 # 40044209 <WorkAreaBase+0x1e7c9>       
40001c7c:   00040513            mv  a0,s0                                                 
40001c80:   044010ef            jal ra,40002cc4 <ioctl>                                   
        sc = RTEMS_NOT_IMPLEMENTED;                                                       
40001c84:   01800493            li  s1,24                                                 
      if (rv == 0) {                                                                      
40001c88:   fa0516e3            bnez    a0,40001c34 <rtems_blkdev_create_partition+0x70>  
        rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));                            
40001c8c:   08000513            li  a0,128                                                
40001c90:   374010ef            jal ra,40003004 <malloc>                                  
40001c94:   00050b13            mv  s6,a0                                                 
          sc = RTEMS_NO_MEMORY;                                                           
40001c98:   01a00493            li  s1,26                                                 
        if (ctx != NULL) {                                                                
40001c9c:   f8050ce3            beqz    a0,40001c34 <rtems_blkdev_create_partition+0x70>  
          sc = rtems_disk_init_log(                                                       
40001ca0:   00412583            lw  a1,4(sp)                                              
40001ca4:   00090693            mv  a3,s2                                                 
40001ca8:   00098613            mv  a2,s3                                                 
40001cac:   10c000ef            jal ra,40001db8 <rtems_disk_init_log>                     
40001cb0:   00050493            mv  s1,a0                                                 
          if (sc == RTEMS_SUCCESSFUL) {                                                   
40001cb4:   02051a63            bnez    a0,40001ce8 <rtems_blkdev_create_partition+0x124> 
            rv = IMFS_make_generic_node(                                                  
40001cb8:   4001f637            lui a2,0x4001f                                            
40001cbc:   000b0693            mv  a3,s6                                                 
40001cc0:   89460613            addi    a2,a2,-1900 # 4001e894 <rtems_blkdev_imfs_control>
40001cc4:   1ffa8593            addi    a1,s5,511 # f1ff <bsp_section_bss_size+0xc547>    
40001cc8:   000a0513            mv  a0,s4                                                 
            ctx->fd = fd;                                                                 
40001ccc:   068b2c23            sw  s0,120(s6)                                            
            rv = IMFS_make_generic_node(                                                  
40001cd0:   751030ef            jal ra,40005c20 <IMFS_make_generic_node>                  
            if (rv != 0) {                                                                
40001cd4:   f60504e3            beqz    a0,40001c3c <rtems_blkdev_create_partition+0x78>  
              free(ctx);                                                                  
40001cd8:   000b0513            mv  a0,s6                                                 
40001cdc:   5d5000ef            jal ra,40002ab0 <free>                                    
              sc = RTEMS_UNSATISFIED;                                                     
40001ce0:   00d00493            li  s1,13                                                 
40001ce4:   f51ff06f            j   40001c34 <rtems_blkdev_create_partition+0x70>         
            free(ctx);                                                                    
40001ce8:   000b0513            mv  a0,s6                                                 
40001cec:   5c5000ef            jal ra,40002ab0 <free>                                    
    if (sc != RTEMS_SUCCESSFUL) {                                                         
40001cf0:   f45ff06f            j   40001c34 <rtems_blkdev_create_partition+0x70>         
                                                                                          

40000ce4 <rtems_blkdev_generic_ioctl>: { rtems_libio_ioctl_args_t *args = arg; rtems_libio_t *iop = args->iop; rtems_disk_device *dd = iop->data1; if (args->command != RTEMS_BLKIO_REQUEST)
40000ce4:   00462583            lw  a1,4(a2)                                              
{                                                                                         
40000ce8:   ff010113            addi    sp,sp,-16                                         
    if (args->command != RTEMS_BLKIO_REQUEST)                                             
40000cec:   c01847b7            lui a5,0xc0184                                            
{                                                                                         
40000cf0:   00812423            sw  s0,8(sp)                                              
40000cf4:   00112623            sw  ra,12(sp)                                             
    if (args->command != RTEMS_BLKIO_REQUEST)                                             
40000cf8:   20178793            addi    a5,a5,513 # c0184201 <RamEnd+0x7f184201>          
{                                                                                         
40000cfc:   00060413            mv  s0,a2                                                 
    if (args->command != RTEMS_BLKIO_REQUEST)                                             
40000d00:   02f58863            beq a1,a5,40000d30 <rtems_blkdev_generic_ioctl+0x4c>      
    rtems_disk_device *dd = iop->data1;                                                   
40000d04:   00062783            lw  a5,0(a2)                                              
    {                                                                                     
        args->ioctl_return = dd->ioctl(dd,                                                
40000d08:   00862603            lw  a2,8(a2)                                              
    rtems_disk_device *dd = iop->data1;                                                   
40000d0c:   02c7a503            lw  a0,44(a5)                                             
        args->ioctl_return = dd->ioctl(dd,                                                
40000d10:   03852783            lw  a5,56(a0)                                             
40000d14:   000780e7            jalr    a5                                                
40000d18:   00a42623            sw  a0,12(s0)                                             
         */                                                                               
        args->ioctl_return = -1;                                                          
    }                                                                                     
                                                                                          
    return RTEMS_SUCCESSFUL;                                                              
}                                                                                         
40000d1c:   00c12083            lw  ra,12(sp)                                             
40000d20:   00812403            lw  s0,8(sp)                                              
40000d24:   00000513            li  a0,0                                                  
40000d28:   01010113            addi    sp,sp,16                                          
40000d2c:   00008067            ret                                                       
40000d30:   00c12083            lw  ra,12(sp)                                             <== NOT EXECUTED
40000d34:   00812403            lw  s0,8(sp)                                              <== NOT EXECUTED
        args->ioctl_return = -1;                                                          
40000d38:   fff00793            li  a5,-1                                                 <== NOT EXECUTED
40000d3c:   00f62623            sw  a5,12(a2)                                             <== NOT EXECUTED
}                                                                                         
40000d40:   00000513            li  a0,0                                                  <== NOT EXECUTED
40000d44:   01010113            addi    sp,sp,16                                          <== NOT EXECUTED
40000d48:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40000a14 <rtems_blkdev_generic_read>: void * arg) { rtems_status_code rc = RTEMS_SUCCESSFUL; rtems_libio_rw_args_t *args = arg; rtems_libio_t *iop = args->iop; rtems_disk_device *dd = iop->data1;
40000a14:   00062783            lw  a5,0(a2)                                              <== NOT EXECUTED
{                                                                                         
40000a18:   fc010113            addi    sp,sp,-64                                         <== NOT EXECUTED
40000a1c:   01712e23            sw  s7,28(sp)                                             <== NOT EXECUTED
    rtems_disk_device *dd = iop->data1;                                                   
40000a20:   02c7ab83            lw  s7,44(a5)                                             <== NOT EXECUTED
{                                                                                         
40000a24:   03212823            sw  s2,48(sp)                                             <== NOT EXECUTED
40000a28:   03312623            sw  s3,44(sp)                                             <== NOT EXECUTED
    uint32_t block_size = dd->block_size;                                                 
    char *buf = args->buffer;                                                             
    uint32_t count = args->count;                                                         
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000a2c:   00862903            lw  s2,8(a2)                                              <== NOT EXECUTED
40000a30:   00c62983            lw  s3,12(a2)                                             <== NOT EXECUTED
{                                                                                         
40000a34:   03612023            sw  s6,32(sp)                                             <== NOT EXECUTED
    uint32_t block_size = dd->block_size;                                                 
40000a38:   024bab03            lw  s6,36(s7)                                             <== NOT EXECUTED
{                                                                                         
40000a3c:   02912a23            sw  s1,52(sp)                                             <== NOT EXECUTED
40000a40:   03412423            sw  s4,40(sp)                                             <== NOT EXECUTED
    uint32_t count = args->count;                                                         
40000a44:   01462483            lw  s1,20(a2)                                             <== NOT EXECUTED
    char *buf = args->buffer;                                                             
40000a48:   01062a03            lw  s4,16(a2)                                             <== NOT EXECUTED
{                                                                                         
40000a4c:   03512223            sw  s5,36(sp)                                             <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000a50:   00000693            li  a3,0                                                  <== NOT EXECUTED
{                                                                                         
40000a54:   00060a93            mv  s5,a2                                                 <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000a58:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40000a5c:   000b0613            mv  a2,s6                                                 <== NOT EXECUTED
40000a60:   00090513            mv  a0,s2                                                 <== NOT EXECUTED
{                                                                                         
40000a64:   02112e23            sw  ra,60(sp)                                             <== NOT EXECUTED
40000a68:   02812c23            sw  s0,56(sp)                                             <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000a6c:   7050f0ef            jal ra,40010970 <__divdi3>                                <== NOT EXECUTED
40000a70:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
    uint32_t blkofs = (uint32_t) (args->offset % block_size);                             
40000a74:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40000a78:   000b0613            mv  a2,s6                                                 <== NOT EXECUTED
40000a7c:   00000693            li  a3,0                                                  <== NOT EXECUTED
40000a80:   00090513            mv  a0,s2                                                 <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000a84:   00078993            mv  s3,a5                                                 <== NOT EXECUTED
    uint32_t blkofs = (uint32_t) (args->offset % block_size);                             
40000a88:   3d4100ef            jal ra,40010e5c <__moddi3>                                <== NOT EXECUTED
                                                                                          
    args->bytes_moved = 0;                                                                
40000a8c:   000aae23            sw  zero,28(s5)                                           <== NOT EXECUTED
                                                                                          
    while (count > 0)                                                                     
40000a90:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
40000a94:   04049863            bnez    s1,40000ae4 <rtems_blkdev_generic_read+0xd0>      <== NOT EXECUTED
40000a98:   09c0006f            j   40000b34 <rtems_blkdev_generic_read+0x120>            <== NOT EXECUTED
40000a9c:   0124f463            bgeu    s1,s2,40000aa4 <rtems_blkdev_generic_read+0x90>   <== NOT EXECUTED
40000aa0:   00048913            mv  s2,s1                                                 <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
            break;                                                                        
        copy = block_size - blkofs;                                                       
        if (copy > count)                                                                 
            copy = count;                                                                 
        memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);                              
40000aa4:   00c12783            lw  a5,12(sp)                                             <== NOT EXECUTED
40000aa8:   00090613            mv  a2,s2                                                 <== NOT EXECUTED
        rc = rtems_bdbuf_release(diskbuf);                                                
        args->bytes_moved += copy;                                                        
        if (rc != RTEMS_SUCCESSFUL)                                                       
            break;                                                                        
        count -= copy;                                                                    
40000aac:   412484b3            sub s1,s1,s2                                              <== NOT EXECUTED
        memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);                              
40000ab0:   01c7a583            lw  a1,28(a5)                                             <== NOT EXECUTED
        buf += copy;                                                                      
40000ab4:   012a0a33            add s4,s4,s2                                              <== NOT EXECUTED
        blkofs = 0;                                                                       
        block++;                                                                          
40000ab8:   00198993            addi    s3,s3,1                                           <== NOT EXECUTED
        memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);                              
40000abc:   008585b3            add a1,a1,s0                                              <== NOT EXECUTED
40000ac0:   555110ef            jal ra,40012814 <memcpy>                                  <== NOT EXECUTED
        rc = rtems_bdbuf_release(diskbuf);                                                
40000ac4:   00c12503            lw  a0,12(sp)                                             <== NOT EXECUTED
40000ac8:   14c0b0ef            jal ra,4000bc14 <rtems_bdbuf_release>                     <== NOT EXECUTED
        args->bytes_moved += copy;                                                        
40000acc:   01caa783            lw  a5,28(s5)                                             <== NOT EXECUTED
        rc = rtems_bdbuf_release(diskbuf);                                                
40000ad0:   00050413            mv  s0,a0                                                 <== NOT EXECUTED
        args->bytes_moved += copy;                                                        
40000ad4:   012787b3            add a5,a5,s2                                              <== NOT EXECUTED
40000ad8:   00faae23            sw  a5,28(s5)                                             <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000adc:   06051063            bnez    a0,40000b3c <rtems_blkdev_generic_read+0x128>     <== NOT EXECUTED
    while (count > 0)                                                                     
40000ae0:   04048a63            beqz    s1,40000b34 <rtems_blkdev_generic_read+0x120>     <== NOT EXECUTED
        rc = rtems_bdbuf_read(dd, block, &diskbuf);                                       
40000ae4:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40000ae8:   00c10613            addi    a2,sp,12                                          <== NOT EXECUTED
40000aec:   000b8513            mv  a0,s7                                                 <== NOT EXECUTED
40000af0:   7250a0ef            jal ra,4000ba14 <rtems_bdbuf_read>                        <== NOT EXECUTED
40000af4:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
        copy = block_size - blkofs;                                                       
40000af8:   408b0933            sub s2,s6,s0                                              <== NOT EXECUTED
        memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);                              
40000afc:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000b00:   f8078ee3            beqz    a5,40000a9c <rtems_blkdev_generic_read+0x88>      <== NOT EXECUTED
    }                                                                                     
                                                                                          
    return rc;                                                                            
}                                                                                         
40000b04:   03c12083            lw  ra,60(sp)                                             <== NOT EXECUTED
40000b08:   03812403            lw  s0,56(sp)                                             <== NOT EXECUTED
40000b0c:   03412483            lw  s1,52(sp)                                             <== NOT EXECUTED
40000b10:   03012903            lw  s2,48(sp)                                             <== NOT EXECUTED
40000b14:   02c12983            lw  s3,44(sp)                                             <== NOT EXECUTED
40000b18:   02812a03            lw  s4,40(sp)                                             <== NOT EXECUTED
40000b1c:   02412a83            lw  s5,36(sp)                                             <== NOT EXECUTED
40000b20:   02012b03            lw  s6,32(sp)                                             <== NOT EXECUTED
40000b24:   01c12b83            lw  s7,28(sp)                                             <== NOT EXECUTED
40000b28:   00078513            mv  a0,a5                                                 <== NOT EXECUTED
40000b2c:   04010113            addi    sp,sp,64                                          <== NOT EXECUTED
40000b30:   00008067            ret                                                       <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000b34:   00000793            li  a5,0                                                  <== NOT EXECUTED
40000b38:   fcdff06f            j   40000b04 <rtems_blkdev_generic_read+0xf0>             <== NOT EXECUTED
40000b3c:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
    return rc;                                                                            
40000b40:   fc5ff06f            j   40000b04 <rtems_blkdev_generic_read+0xf0>             <== NOT EXECUTED
                                                                                          

40000b44 <rtems_blkdev_generic_write>: void * arg) { rtems_status_code rc = RTEMS_SUCCESSFUL; rtems_libio_rw_args_t *args = arg; rtems_libio_t *iop = args->iop; rtems_disk_device *dd = iop->data1;
40000b44:   00062783            lw  a5,0(a2)                                              <== NOT EXECUTED
{                                                                                         
40000b48:   fc010113            addi    sp,sp,-64                                         <== NOT EXECUTED
40000b4c:   03612023            sw  s6,32(sp)                                             <== NOT EXECUTED
    rtems_disk_device *dd = iop->data1;                                                   
40000b50:   02c7ab03            lw  s6,44(a5)                                             <== NOT EXECUTED
{                                                                                         
40000b54:   03512223            sw  s5,36(sp)                                             <== NOT EXECUTED
40000b58:   01812c23            sw  s8,24(sp)                                             <== NOT EXECUTED
    uint32_t block_size = dd->block_size;                                                 
40000b5c:   024b2a83            lw  s5,36(s6)                                             <== NOT EXECUTED
    char *buf = args->buffer;                                                             
    uint32_t count = args->count;                                                         
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000b60:   00862c03            lw  s8,8(a2)                                              <== NOT EXECUTED
{                                                                                         
40000b64:   01912a23            sw  s9,20(sp)                                             <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000b68:   00c62c83            lw  s9,12(a2)                                             <== NOT EXECUTED
{                                                                                         
40000b6c:   02912a23            sw  s1,52(sp)                                             <== NOT EXECUTED
40000b70:   03312623            sw  s3,44(sp)                                             <== NOT EXECUTED
    uint32_t count = args->count;                                                         
40000b74:   01462483            lw  s1,20(a2)                                             <== NOT EXECUTED
    char *buf = args->buffer;                                                             
40000b78:   01062983            lw  s3,16(a2)                                             <== NOT EXECUTED
{                                                                                         
40000b7c:   03412423            sw  s4,40(sp)                                             <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000b80:   00000693            li  a3,0                                                  <== NOT EXECUTED
{                                                                                         
40000b84:   00060a13            mv  s4,a2                                                 <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000b88:   000c0513            mv  a0,s8                                                 <== NOT EXECUTED
40000b8c:   000a8613            mv  a2,s5                                                 <== NOT EXECUTED
40000b90:   000c8593            mv  a1,s9                                                 <== NOT EXECUTED
{                                                                                         
40000b94:   02112e23            sw  ra,60(sp)                                             <== NOT EXECUTED
40000b98:   03212823            sw  s2,48(sp)                                             <== NOT EXECUTED
40000b9c:   02812c23            sw  s0,56(sp)                                             <== NOT EXECUTED
40000ba0:   01712e23            sw  s7,28(sp)                                             <== NOT EXECUTED
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);            
40000ba4:   5cd0f0ef            jal ra,40010970 <__divdi3>                                <== NOT EXECUTED
40000ba8:   00050913            mv  s2,a0                                                 <== NOT EXECUTED
    uint32_t blkofs = (uint32_t) (args->offset % block_size);                             
40000bac:   000a8613            mv  a2,s5                                                 <== NOT EXECUTED
40000bb0:   00000693            li  a3,0                                                  <== NOT EXECUTED
40000bb4:   000c0513            mv  a0,s8                                                 <== NOT EXECUTED
40000bb8:   000c8593            mv  a1,s9                                                 <== NOT EXECUTED
40000bbc:   2a0100ef            jal ra,40010e5c <__moddi3>                                <== NOT EXECUTED
                                                                                          
    args->bytes_moved = 0;                                                                
40000bc0:   000a2e23            sw  zero,28(s4)                                           <== NOT EXECUTED
                                                                                          
    while (count > 0)                                                                     
40000bc4:   0a048e63            beqz    s1,40000c80 <rtems_blkdev_generic_write+0x13c>    <== NOT EXECUTED
40000bc8:   00050b93            mv  s7,a0                                                 <== NOT EXECUTED
    {                                                                                     
        rtems_bdbuf_buffer *diskbuf;                                                      
        uint32_t            copy;                                                         
                                                                                          
        if ((blkofs == 0) && (count >= block_size))                                       
40000bcc:   06050263            beqz    a0,40000c30 <rtems_blkdev_generic_write+0xec>     <== NOT EXECUTED
            rc = rtems_bdbuf_get(dd, block, &diskbuf);                                    
        else                                                                              
            rc = rtems_bdbuf_read(dd, block, &diskbuf);                                   
40000bd0:   00c10613            addi    a2,sp,12                                          <== NOT EXECUTED
40000bd4:   00090593            mv  a1,s2                                                 <== NOT EXECUTED
40000bd8:   000b0513            mv  a0,s6                                                 <== NOT EXECUTED
40000bdc:   6390a0ef            jal ra,4000ba14 <rtems_bdbuf_read>                        <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000be0:   06051663            bnez    a0,40000c4c <rtems_blkdev_generic_write+0x108>    <== NOT EXECUTED
            break;                                                                        
                                                                                          
        copy = block_size - blkofs;                                                       
40000be4:   417a8433            sub s0,s5,s7                                              <== NOT EXECUTED
        if (copy > count)                                                                 
40000be8:   0084f463            bgeu    s1,s0,40000bf0 <rtems_blkdev_generic_write+0xac>  <== NOT EXECUTED
40000bec:   00048413            mv  s0,s1                                                 <== NOT EXECUTED
            copy = count;                                                                 
        memcpy((char *)diskbuf->buffer + blkofs, buf, copy);                              
40000bf0:   00c12783            lw  a5,12(sp)                                             <== NOT EXECUTED
40000bf4:   00040613            mv  a2,s0                                                 <== NOT EXECUTED
40000bf8:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40000bfc:   01c7a503            lw  a0,28(a5)                                             <== NOT EXECUTED
40000c00:   01750533            add a0,a0,s7                                              <== NOT EXECUTED
40000c04:   411110ef            jal ra,40012814 <memcpy>                                  <== NOT EXECUTED
        args->bytes_moved += copy;                                                        
40000c08:   01ca2783            lw  a5,28(s4)                                             <== NOT EXECUTED
                                                                                          
        rc = rtems_bdbuf_release_modified(diskbuf);                                       
40000c0c:   00c12503            lw  a0,12(sp)                                             <== NOT EXECUTED
        args->bytes_moved += copy;                                                        
40000c10:   008787b3            add a5,a5,s0                                              <== NOT EXECUTED
40000c14:   00fa2e23            sw  a5,28(s4)                                             <== NOT EXECUTED
        rc = rtems_bdbuf_release_modified(diskbuf);                                       
40000c18:   0f80b0ef            jal ra,4000bd10 <rtems_bdbuf_release_modified>            <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000c1c:   02051863            bnez    a0,40000c4c <rtems_blkdev_generic_write+0x108>    <== NOT EXECUTED
            break;                                                                        
                                                                                          
        count -= copy;                                                                    
40000c20:   408484b3            sub s1,s1,s0                                              <== NOT EXECUTED
        buf += copy;                                                                      
40000c24:   008989b3            add s3,s3,s0                                              <== NOT EXECUTED
        blkofs = 0;                                                                       
        block++;                                                                          
40000c28:   00190913            addi    s2,s2,1                                           <== NOT EXECUTED
    while (count > 0)                                                                     
40000c2c:   04048a63            beqz    s1,40000c80 <rtems_blkdev_generic_write+0x13c>    <== NOT EXECUTED
40000c30:   00000b93            li  s7,0                                                  <== NOT EXECUTED
        if ((blkofs == 0) && (count >= block_size))                                       
40000c34:   f954eee3            bltu    s1,s5,40000bd0 <rtems_blkdev_generic_write+0x8c>  <== NOT EXECUTED
            rc = rtems_bdbuf_get(dd, block, &diskbuf);                                    
40000c38:   00c10613            addi    a2,sp,12                                          <== NOT EXECUTED
40000c3c:   00090593            mv  a1,s2                                                 <== NOT EXECUTED
40000c40:   000b0513            mv  a0,s6                                                 <== NOT EXECUTED
40000c44:   4cd0a0ef            jal ra,4000b910 <rtems_bdbuf_get>                         <== NOT EXECUTED
        if (rc != RTEMS_SUCCESSFUL)                                                       
40000c48:   f8050ee3            beqz    a0,40000be4 <rtems_blkdev_generic_write+0xa0>     <== NOT EXECUTED
    }                                                                                     
                                                                                          
    return rc;                                                                            
}                                                                                         
40000c4c:   03c12083            lw  ra,60(sp)                                             <== NOT EXECUTED
40000c50:   03812403            lw  s0,56(sp)                                             <== NOT EXECUTED
40000c54:   03412483            lw  s1,52(sp)                                             <== NOT EXECUTED
40000c58:   03012903            lw  s2,48(sp)                                             <== NOT EXECUTED
40000c5c:   02c12983            lw  s3,44(sp)                                             <== NOT EXECUTED
40000c60:   02812a03            lw  s4,40(sp)                                             <== NOT EXECUTED
40000c64:   02412a83            lw  s5,36(sp)                                             <== NOT EXECUTED
40000c68:   02012b03            lw  s6,32(sp)                                             <== NOT EXECUTED
40000c6c:   01c12b83            lw  s7,28(sp)                                             <== NOT EXECUTED
40000c70:   01812c03            lw  s8,24(sp)                                             <== NOT EXECUTED
40000c74:   01412c83            lw  s9,20(sp)                                             <== NOT EXECUTED
40000c78:   04010113            addi    sp,sp,64                                          <== NOT EXECUTED
40000c7c:   00008067            ret                                                       <== NOT EXECUTED
            rc = rtems_bdbuf_get(dd, block, &diskbuf);                                    
40000c80:   00000513            li  a0,0                                                  <== NOT EXECUTED
40000c84:   fc9ff06f            j   40000c4c <rtems_blkdev_generic_write+0x108>           <== NOT EXECUTED
                                                                                          

4000e6e8 <rtems_blkdev_ioctl>: #include <rtems/blkdev.h> #include <rtems/bdbuf.h> int rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) {
4000e6e8:   ff010113            addi    sp,sp,-16                                         
    rtems_status_code  sc;                                                                
    int                rc = 0;                                                            
                                                                                          
    switch (req)                                                                          
4000e6ec:   400447b7            lui a5,0x40044                                            
{                                                                                         
4000e6f0:   00112623            sw  ra,12(sp)                                             
    switch (req)                                                                          
4000e6f4:   20b78693            addi    a3,a5,523 # 4004420b <WorkAreaBase+0x1e7cb>       
4000e6f8:   02b6ec63            bltu    a3,a1,4000e730 <rtems_blkdev_ioctl+0x48>          
4000e6fc:   20178793            addi    a5,a5,513                                         
4000e700:   04b7fe63            bgeu    a5,a1,4000e75c <rtems_blkdev_ioctl+0x74>          
4000e704:   bffbc7b7            lui a5,0xbffbc                                            
4000e708:   dfe78793            addi    a5,a5,-514 # bffbbdfe <RamEnd+0x7efbbdfe>         
4000e70c:   00f587b3            add a5,a1,a5                                              
4000e710:   00900693            li  a3,9                                                  
4000e714:   08f6ea63            bltu    a3,a5,4000e7a8 <rtems_blkdev_ioctl+0xc0>          
4000e718:   4001f5b7            lui a1,0x4001f                                            
4000e71c:   00279793            slli    a5,a5,0x2                                         
4000e720:   01c58593            addi    a1,a1,28 # 4001f01c <_Thread_queue_Operations_priority_inherit+0xe4>
4000e724:   00b787b3            add a5,a5,a1                                              
4000e728:   0007a783            lw  a5,0(a5)                                              
4000e72c:   00078067            jr  a5                                                    
4000e730:   800447b7            lui a5,0x80044                                            
4000e734:   20478793            addi    a5,a5,516 # 80044204 <RamEnd+0x3f044204>          
4000e738:   06f59863            bne a1,a5,4000e7a8 <rtems_blkdev_ioctl+0xc0>              
        case RTEMS_BLKIO_GETBLKSIZE:                                                      
            *(uint32_t *) argp = dd->block_size;                                          
            break;                                                                        
                                                                                          
        case RTEMS_BLKIO_SETBLKSIZE:                                                      
            sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp, true);                
4000e73c:   00062583            lw  a1,0(a2)                                              
4000e740:   00100613            li  a2,1                                                  
4000e744:   da9ff0ef            jal ra,4000e4ec <rtems_bdbuf_set_block_size>              
            if (sc != RTEMS_SUCCESSFUL) {                                                 
4000e748:   04051663            bnez    a0,4000e794 <rtems_blkdev_ioctl+0xac>             <== NEVER TAKEN
    int                rc = 0;                                                            
4000e74c:   00000513            li  a0,0                                                  
            rc = -1;                                                                      
            break;                                                                        
    }                                                                                     
                                                                                          
    return rc;                                                                            
}                                                                                         
4000e750:   00c12083            lw  ra,12(sp)                                             
4000e754:   01010113            addi    sp,sp,16                                          
4000e758:   00008067            ret                                                       
    switch (req)                                                                          
4000e75c:   200047b7            lui a5,0x20004                                            
4000e760:   20a78713            addi    a4,a5,522 # 2000420a <RamSize+0x1f00420a>         
4000e764:   0ce58663            beq a1,a4,4000e830 <rtems_blkdev_ioctl+0x148>             
4000e768:   20c78713            addi    a4,a5,524                                         
4000e76c:   00e59c63            bne a1,a4,4000e784 <rtems_blkdev_ioctl+0x9c>              
            rtems_bdbuf_reset_device_stats(dd);                                           
4000e770:   f2dff0ef            jal ra,4000e69c <rtems_bdbuf_reset_device_stats>          
}                                                                                         
4000e774:   00c12083            lw  ra,12(sp)                                             
    int                rc = 0;                                                            
4000e778:   00000513            li  a0,0                                                  
}                                                                                         
4000e77c:   01010113            addi    sp,sp,16                                          
4000e780:   00008067            ret                                                       
    switch (req)                                                                          
4000e784:   20678793            addi    a5,a5,518                                         
4000e788:   02f59063            bne a1,a5,4000e7a8 <rtems_blkdev_ioctl+0xc0>              
            sc = rtems_bdbuf_syncdev(dd);                                                 
4000e78c:   c61ff0ef            jal ra,4000e3ec <rtems_bdbuf_syncdev>                     
            if (sc != RTEMS_SUCCESSFUL) {                                                 
4000e790:   fa050ee3            beqz    a0,4000e74c <rtems_blkdev_ioctl+0x64>             <== ALWAYS TAKEN
                errno = EIO;                                                              
4000e794:   735050ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
4000e798:   00500793            li  a5,5                                                  <== NOT EXECUTED
4000e79c:   00f52023            sw  a5,0(a0) # 80000000 <RamEnd+0x3f000000>               <== NOT EXECUTED
                rc = -1;                                                                  
4000e7a0:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
4000e7a4:   fadff06f            j   4000e750 <rtems_blkdev_ioctl+0x68>                    <== NOT EXECUTED
            errno = EINVAL;                                                               
4000e7a8:   721050ef            jal ra,400146c8 <__errno>                                 
}                                                                                         
4000e7ac:   00c12083            lw  ra,12(sp)                                             
            errno = EINVAL;                                                               
4000e7b0:   01600793            li  a5,22                                                 
4000e7b4:   00f52023            sw  a5,0(a0)                                              
            rc = -1;                                                                      
4000e7b8:   fff00513            li  a0,-1                                                 
}                                                                                         
4000e7bc:   01010113            addi    sp,sp,16                                          
4000e7c0:   00008067            ret                                                       
            *(uint32_t *) argp = dd->media_block_size;                                    
4000e7c4:   02052783            lw  a5,32(a0)                                             
}                                                                                         
4000e7c8:   00c12083            lw  ra,12(sp)                                             
    int                rc = 0;                                                            
4000e7cc:   00000513            li  a0,0                                                  
            *(uint32_t *) argp = dd->media_block_size;                                    
4000e7d0:   00f62023            sw  a5,0(a2)                                              
}                                                                                         
4000e7d4:   01010113            addi    sp,sp,16                                          
4000e7d8:   00008067            ret                                                       
            *(uint32_t *) argp = dd->block_size;                                          
4000e7dc:   02452783            lw  a5,36(a0)                                             
}                                                                                         
4000e7e0:   00c12083            lw  ra,12(sp)                                             
    int                rc = 0;                                                            
4000e7e4:   00000513            li  a0,0                                                  
            *(uint32_t *) argp = dd->block_size;                                          
4000e7e8:   00f62023            sw  a5,0(a2)                                              
}                                                                                         
4000e7ec:   01010113            addi    sp,sp,16                                          
4000e7f0:   00008067            ret                                                       
            *(rtems_blkdev_bnum *) argp = dd->size;                                       
4000e7f4:   01c52783            lw  a5,28(a0)                                             
}                                                                                         
4000e7f8:   00c12083            lw  ra,12(sp)                                             
    int                rc = 0;                                                            
4000e7fc:   00000513            li  a0,0                                                  
            *(rtems_blkdev_bnum *) argp = dd->size;                                       
4000e800:   00f62023            sw  a5,0(a2)                                              
}                                                                                         
4000e804:   01010113            addi    sp,sp,16                                          
4000e808:   00008067            ret                                                       
4000e80c:   00c12083            lw  ra,12(sp)                                             
            *(rtems_disk_device **) argp = dd;                                            
4000e810:   00a62023            sw  a0,0(a2)                                              
    int                rc = 0;                                                            
4000e814:   00000513            li  a0,0                                                  
}                                                                                         
4000e818:   01010113            addi    sp,sp,16                                          
4000e81c:   00008067            ret                                                       
            rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);                
4000e820:   00060593            mv  a1,a2                                                 
4000e824:   df1ff0ef            jal ra,4000e614 <rtems_bdbuf_get_device_stats>            
    int                rc = 0;                                                            
4000e828:   00000513            li  a0,0                                                  
4000e82c:   f25ff06f            j   4000e750 <rtems_blkdev_ioctl+0x68>                    
            rtems_bdbuf_purge_dev(dd);                                                    
4000e830:   c79ff0ef            jal ra,4000e4a8 <rtems_bdbuf_purge_dev>                   
}                                                                                         
4000e834:   00c12083            lw  ra,12(sp)                                             
    int                rc = 0;                                                            
4000e838:   00000513            li  a0,0                                                  
}                                                                                         
4000e83c:   01010113            addi    sp,sp,16                                          
4000e840:   00008067            ret                                                       
                                                                                          

40001304 <rtems_disk_create_log>: {
40001304:   fc010113            addi    sp,sp,-64                                         
40001308:   03612023            sw  s6,32(sp)                                             
  _Mutex_Acquire( mutex );                                                                
4000130c:   40015b37            lui s6,0x40015                                            
40001310:   02912a23            sw  s1,52(sp)                                             
40001314:   01912a23            sw  s9,20(sp)                                             
40001318:   00050493            mv  s1,a0                                                 
4000131c:   2a8b0513            addi    a0,s6,680 # 400152a8 <diskdevs_mutex>             
40001320:   02812c23            sw  s0,56(sp)                                             
40001324:   03212823            sw  s2,48(sp)                                             
40001328:   03312623            sw  s3,44(sp)                                             
4000132c:   03412423            sw  s4,40(sp)                                             
40001330:   03512223            sw  s5,36(sp)                                             
40001334:   01812c23            sw  s8,24(sp)                                             
40001338:   01a12823            sw  s10,16(sp)                                            
4000133c:   00070a93            mv  s5,a4                                                 
40001340:   00078c13            mv  s8,a5                                                 
40001344:   02112e23            sw  ra,60(sp)                                             
40001348:   01712e23            sw  s7,28(sp)                                             
4000134c:   00058993            mv  s3,a1                                                 
40001350:   00060413            mv  s0,a2                                                 
40001354:   00068a13            mv  s4,a3                                                 
40001358:   00080d13            mv  s10,a6                                                
  rtems_disk_device *dd = NULL;                                                           
4000135c:   00012423            sw  zero,8(sp)                                            
  char *alloc_name = NULL;                                                                
40001360:   00012623            sw  zero,12(sp)                                           
  if (major < disktab_size && disktab != NULL) {                                          
40001364:   8a418c93            addi    s9,gp,-1884 # 40015734 <disktab_size>             
40001368:   7d0050ef            jal ra,40006b38 <_Mutex_Acquire>                          
4000136c:   000ca783            lw  a5,0(s9)                                              
  diskdevs_protected = true;                                                              
40001370:   89c18913            addi    s2,gp,-1892 # 4001572c <diskdevs_protected>       
40001374:   00100713            li  a4,1                                                  
40001378:   00e90023            sb  a4,0(s2)                                              
  if (major < disktab_size && disktab != NULL) {                                          
4000137c:   12f47863            bgeu    s0,a5,400014ac <rtems_disk_create_log+0x1a8>      
40001380:   8a018b93            addi    s7,gp,-1888 # 40015730 <disktab>                  
40001384:   000ba783            lw  a5,0(s7)                                              
40001388:   12078263            beqz    a5,400014ac <rtems_disk_create_log+0x1a8>         <== NEVER TAKEN
    rtems_disk_device_table *dtab = disktab + major;                                      
4000138c:   00341413            slli    s0,s0,0x3                                         
40001390:   00878433            add s0,a5,s0                                              
    if (minor < dtab->size && dtab->minor != NULL) {                                      
40001394:   00442783            lw  a5,4(s0)                                              
40001398:   10fa7a63            bgeu    s4,a5,400014ac <rtems_disk_create_log+0x1a8>      
4000139c:   00042783            lw  a5,0(s0)                                              
400013a0:   10078663            beqz    a5,400014ac <rtems_disk_create_log+0x1a8>         <== NEVER TAKEN
      rtems_disk_device *dd = dtab->minor [minor];                                        
400013a4:   002a1a13            slli    s4,s4,0x2                                         
400013a8:   01478a33            add s4,a5,s4                                              
400013ac:   000a2a03            lw  s4,0(s4)                                              
  if (phys_dd == NULL) {                                                                  
400013b0:   0e0a0e63            beqz    s4,400014ac <rtems_disk_create_log+0x1a8>         
  sc = create_disk(dev, name, &dd, &alloc_name);                                          
400013b4:   00c10713            addi    a4,sp,12                                          
400013b8:   00810693            addi    a3,sp,8                                           
400013bc:   000d0613            mv  a2,s10                                                
400013c0:   00048513            mv  a0,s1                                                 
400013c4:   00098593            mv  a1,s3                                                 
400013c8:   9f1ff0ef            jal ra,40000db8 <create_disk>                             
400013cc:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
400013d0:   04051063            bnez    a0,40001410 <rtems_disk_create_log+0x10c>         
  sc = rtems_disk_init_log(                                                               
400013d4:   00812503            lw  a0,8(sp)                                              
400013d8:   000c0693            mv  a3,s8                                                 
400013dc:   000a8613            mv  a2,s5                                                 
400013e0:   000a0593            mv  a1,s4                                                 
400013e4:   548000ef            jal ra,4000192c <rtems_disk_init_log>                     
  ++phys_dd->uses;                                                                        
400013e8:   014a2703            lw  a4,20(s4)                                             
  dd->dev = dev;                                                                          
400013ec:   00812783            lw  a5,8(sp)                                              
  dd->name = alloc_name;                                                                  
400013f0:   00c12683            lw  a3,12(sp)                                             
  ++phys_dd->uses;                                                                        
400013f4:   00170713            addi    a4,a4,1                                           
  dd->dev = dev;                                                                          
400013f8:   0097a023            sw  s1,0(a5)                                              
400013fc:   0137a223            sw  s3,4(a5)                                              
  dd->name = alloc_name;                                                                  
40001400:   00d7a823            sw  a3,16(a5)                                             
  ++phys_dd->uses;                                                                        
40001404:   00ea2a23            sw  a4,20(s4)                                             
  sc = rtems_disk_init_log(                                                               
40001408:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
4000140c:   04051663            bnez    a0,40001458 <rtems_disk_create_log+0x154>         
  _Mutex_Release( mutex );                                                                
40001410:   2a8b0513            addi    a0,s6,680                                         
  diskdevs_protected = false;                                                             
40001414:   00090023            sb  zero,0(s2)                                            
40001418:   790050ef            jal ra,40006ba8 <_Mutex_Release>                          
}                                                                                         
4000141c:   03c12083            lw  ra,60(sp)                                             
40001420:   00040513            mv  a0,s0                                                 
40001424:   03812403            lw  s0,56(sp)                                             
40001428:   03412483            lw  s1,52(sp)                                             
4000142c:   03012903            lw  s2,48(sp)                                             
40001430:   02c12983            lw  s3,44(sp)                                             
40001434:   02812a03            lw  s4,40(sp)                                             
40001438:   02412a83            lw  s5,36(sp)                                             
4000143c:   02012b03            lw  s6,32(sp)                                             
40001440:   01c12b83            lw  s7,28(sp)                                             
40001444:   01812c03            lw  s8,24(sp)                                             
40001448:   01412c83            lw  s9,20(sp)                                             
4000144c:   01012d03            lw  s10,16(sp)                                            
40001450:   04010113            addi    sp,sp,64                                          
40001454:   00008067            ret                                                       
    dd->ioctl = null_handler;                                                             
40001458:   40001737            lui a4,0x40001                                            
  if (major < disktab_size && disktab != NULL) {                                          
4000145c:   000ca683            lw  a3,0(s9)                                              
    dd->ioctl = null_handler;                                                             
40001460:   db070713            addi    a4,a4,-592 # 40000db0 <null_handler>              
40001464:   02e7ac23            sw  a4,56(a5)                                             
  if (major < disktab_size && disktab != NULL) {                                          
40001468:   fad4f4e3            bgeu    s1,a3,40001410 <rtems_disk_create_log+0x10c>      
4000146c:   000ba783            lw  a5,0(s7)                                              
40001470:   fa0780e3            beqz    a5,40001410 <rtems_disk_create_log+0x10c>         <== NEVER TAKEN
    rtems_disk_device_table *dtab = disktab + major;                                      
40001474:   00349493            slli    s1,s1,0x3                                         
40001478:   009784b3            add s1,a5,s1                                              
    if (minor < dtab->size && dtab->minor != NULL) {                                      
4000147c:   0044a783            lw  a5,4(s1)                                              
40001480:   f8f9f8e3            bgeu    s3,a5,40001410 <rtems_disk_create_log+0x10c>      
40001484:   0004a783            lw  a5,0(s1)                                              
40001488:   f80784e3            beqz    a5,40001410 <rtems_disk_create_log+0x10c>         <== NEVER TAKEN
      rtems_disk_device *dd = dtab->minor [minor];                                        
4000148c:   00299993            slli    s3,s3,0x2                                         
40001490:   013789b3            add s3,a5,s3                                              
40001494:   0009a503            lw  a0,0(s3)                                              
  if (dd == NULL) {                                                                       
40001498:   f6050ce3            beqz    a0,40001410 <rtems_disk_create_log+0x10c>         <== NEVER TAKEN
  dd->deleted = true;                                                                     
4000149c:   00100793            li  a5,1                                                  
400014a0:   04f50023            sb  a5,64(a0)                                             
  rtems_disk_cleanup(dd);                                                                 
400014a4:   b49ff0ef            jal ra,40000fec <rtems_disk_cleanup.constprop.0>          
  return RTEMS_SUCCESSFUL;                                                                
400014a8:   f69ff06f            j   40001410 <rtems_disk_create_log+0x10c>                
400014ac:   2a8b0513            addi    a0,s6,680                                         
  diskdevs_protected = false;                                                             
400014b0:   00090023            sb  zero,0(s2)                                            
    return RTEMS_INVALID_ID;                                                              
400014b4:   00400413            li  s0,4                                                  
400014b8:   6f0050ef            jal ra,40006ba8 <_Mutex_Release>                          
400014bc:   f61ff06f            j   4000141c <rtems_disk_create_log+0x118>                
                                                                                          

400011a4 <rtems_disk_create_phys>: {
400011a4:   fc010113            addi    sp,sp,-64                                         
400011a8:   02112e23            sw  ra,60(sp)                                             
400011ac:   02812c23            sw  s0,56(sp)                                             
400011b0:   02912a23            sw  s1,52(sp)                                             
400011b4:   03212823            sw  s2,48(sp)                                             
400011b8:   03312623            sw  s3,44(sp)                                             
400011bc:   03412423            sw  s4,40(sp)                                             
400011c0:   03512223            sw  s5,36(sp)                                             
400011c4:   03612023            sw  s6,32(sp)                                             
400011c8:   01712e23            sw  s7,28(sp)                                             
400011cc:   01812c23            sw  s8,24(sp)                                             
400011d0:   01912a23            sw  s9,20(sp)                                             
  rtems_disk_device *dd = NULL;                                                           
400011d4:   00012423            sw  zero,8(sp)                                            
  char *alloc_name = NULL;                                                                
400011d8:   00012623            sw  zero,12(sp)                                           
  if (handler == NULL) {                                                                  
400011dc:   12070063            beqz    a4,400012fc <rtems_disk_create_phys+0x158>        
  mutex->_Queue._name = name;                                                             
}                                                                                         
                                                                                          
static __inline void rtems_mutex_lock( rtems_mutex *mutex )                               
{                                                                                         
  _Mutex_Acquire( mutex );                                                                
400011e0:   40015bb7            lui s7,0x40015                                            
400011e4:   00050493            mv  s1,a0                                                 
400011e8:   2a8b8513            addi    a0,s7,680 # 400152a8 <diskdevs_mutex>             
400011ec:   00080413            mv  s0,a6                                                 
400011f0:   00070993            mv  s3,a4                                                 
400011f4:   00058913            mv  s2,a1                                                 
400011f8:   00060a93            mv  s5,a2                                                 
400011fc:   00068b13            mv  s6,a3                                                 
40001200:   00078c93            mv  s9,a5                                                 
40001204:   135050ef            jal ra,40006b38 <_Mutex_Acquire>                          
  sc = create_disk(dev, name, &dd, &alloc_name);                                          
40001208:   00040613            mv  a2,s0                                                 
  diskdevs_protected = true;                                                              
4000120c:   89c18a13            addi    s4,gp,-1892 # 4001572c <diskdevs_protected>       
40001210:   00100c13            li  s8,1                                                  
  sc = create_disk(dev, name, &dd, &alloc_name);                                          
40001214:   00c10713            addi    a4,sp,12                                          
40001218:   00810693            addi    a3,sp,8                                           
4000121c:   00048513            mv  a0,s1                                                 
40001220:   00090593            mv  a1,s2                                                 
  diskdevs_protected = true;                                                              
40001224:   018a0023            sb  s8,0(s4)                                              
  sc = create_disk(dev, name, &dd, &alloc_name);                                          
40001228:   b91ff0ef            jal ra,40000db8 <create_disk>                             
4000122c:   00050413            mv  s0,a0                                                 
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001230:   02051c63            bnez    a0,40001268 <rtems_disk_create_phys+0xc4>         
  sc = rtems_disk_init_phys(                                                              
40001234:   00812503            lw  a0,8(sp)                                              
40001238:   000c8713            mv  a4,s9                                                 
4000123c:   00098693            mv  a3,s3                                                 
40001240:   000b0613            mv  a2,s6                                                 
40001244:   000a8593            mv  a1,s5                                                 
40001248:   620000ef            jal ra,40001868 <rtems_disk_init_phys>                    
  dd->dev = dev;                                                                          
4000124c:   00812783            lw  a5,8(sp)                                              
  dd->name = alloc_name;                                                                  
40001250:   00c12703            lw  a4,12(sp)                                             
  sc = rtems_disk_init_phys(                                                              
40001254:   00050413            mv  s0,a0                                                 
  dd->dev = dev;                                                                          
40001258:   0097a023            sw  s1,0(a5)                                              
4000125c:   0127a223            sw  s2,4(a5)                                              
  dd->name = alloc_name;                                                                  
40001260:   00e7a823            sw  a4,16(a5)                                             
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001264:   04051463            bnez    a0,400012ac <rtems_disk_create_phys+0x108>        
}                                                                                         
                                                                                          
static __inline void rtems_mutex_unlock( rtems_mutex *mutex )                             
{                                                                                         
  _Mutex_Release( mutex );                                                                
40001268:   2a8b8513            addi    a0,s7,680                                         
  diskdevs_protected = false;                                                             
4000126c:   000a0023            sb  zero,0(s4)                                            
40001270:   139050ef            jal ra,40006ba8 <_Mutex_Release>                          
}                                                                                         
40001274:   03c12083            lw  ra,60(sp)                                             
40001278:   00040513            mv  a0,s0                                                 
4000127c:   03812403            lw  s0,56(sp)                                             
40001280:   03412483            lw  s1,52(sp)                                             
40001284:   03012903            lw  s2,48(sp)                                             
40001288:   02c12983            lw  s3,44(sp)                                             
4000128c:   02812a03            lw  s4,40(sp)                                             
40001290:   02412a83            lw  s5,36(sp)                                             
40001294:   02012b03            lw  s6,32(sp)                                             
40001298:   01c12b83            lw  s7,28(sp)                                             
4000129c:   01812c03            lw  s8,24(sp)                                             
400012a0:   01412c83            lw  s9,20(sp)                                             
400012a4:   04010113            addi    sp,sp,64                                          
400012a8:   00008067            ret                                                       
  if (major < disktab_size && disktab != NULL) {                                          
400012ac:   8a41a683            lw  a3,-1884(gp) # 40015734 <disktab_size>                
    dd->ioctl = null_handler;                                                             
400012b0:   40001737            lui a4,0x40001                                            
400012b4:   db070713            addi    a4,a4,-592 # 40000db0 <null_handler>              
400012b8:   02e7ac23            sw  a4,56(a5)                                             
  if (major < disktab_size && disktab != NULL) {                                          
400012bc:   fad4f6e3            bgeu    s1,a3,40001268 <rtems_disk_create_phys+0xc4>      
400012c0:   8a01a783            lw  a5,-1888(gp) # 40015730 <disktab>                     
400012c4:   fa0782e3            beqz    a5,40001268 <rtems_disk_create_phys+0xc4>         <== NEVER TAKEN
    rtems_disk_device_table *dtab = disktab + major;                                      
400012c8:   00349493            slli    s1,s1,0x3                                         
400012cc:   009784b3            add s1,a5,s1                                              
    if (minor < dtab->size && dtab->minor != NULL) {                                      
400012d0:   0044a783            lw  a5,4(s1)                                              
400012d4:   f8f97ae3            bgeu    s2,a5,40001268 <rtems_disk_create_phys+0xc4>      
400012d8:   0004a783            lw  a5,0(s1)                                              
400012dc:   f80786e3            beqz    a5,40001268 <rtems_disk_create_phys+0xc4>         <== NEVER TAKEN
      rtems_disk_device *dd = dtab->minor [minor];                                        
400012e0:   00291913            slli    s2,s2,0x2                                         
400012e4:   01278933            add s2,a5,s2                                              
400012e8:   00092503            lw  a0,0(s2)                                              
disk_delete_locked(dev_t dev)                                                             
{                                                                                         
  rtems_disk_device *dd = NULL;                                                           
                                                                                          
  dd = get_disk_entry(dev, true);                                                         
  if (dd == NULL) {                                                                       
400012ec:   f6050ee3            beqz    a0,40001268 <rtems_disk_create_phys+0xc4>         <== NEVER TAKEN
    return RTEMS_INVALID_ID;                                                              
  }                                                                                       
                                                                                          
  dd->deleted = true;                                                                     
400012f0:   05850023            sb  s8,64(a0)                                             
  rtems_disk_cleanup(dd);                                                                 
400012f4:   cf9ff0ef            jal ra,40000fec <rtems_disk_cleanup.constprop.0>          
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
400012f8:   f71ff06f            j   40001268 <rtems_disk_create_phys+0xc4>                
    return RTEMS_INVALID_ADDRESS;                                                         
400012fc:   00900413            li  s0,9                                                  
40001300:   f75ff06f            j   40001274 <rtems_disk_create_phys+0xd0>                
                                                                                          

400014c0 <rtems_disk_delete>: } rtems_status_code rtems_disk_delete(dev_t dev) {
400014c0:   fe010113            addi    sp,sp,-32                                         
400014c4:   01312623            sw  s3,12(sp)                                             
  _Mutex_Acquire( mutex );                                                                
400014c8:   400159b7            lui s3,0x40015                                            
400014cc:   00812c23            sw  s0,24(sp)                                             
400014d0:   00050413            mv  s0,a0                                                 
400014d4:   2a898513            addi    a0,s3,680 # 400152a8 <diskdevs_mutex>             
400014d8:   00912a23            sw  s1,20(sp)                                             
400014dc:   01412423            sw  s4,8(sp)                                              
400014e0:   00112e23            sw  ra,28(sp)                                             
400014e4:   01212823            sw  s2,16(sp)                                             
400014e8:   00058a13            mv  s4,a1                                                 
400014ec:   64c050ef            jal ra,40006b38 <_Mutex_Acquire>                          
  if (major < disktab_size && disktab != NULL) {                                          
400014f0:   8a41a783            lw  a5,-1884(gp) # 40015734 <disktab_size>                
  diskdevs_protected = true;                                                              
400014f4:   89c18493            addi    s1,gp,-1892 # 4001572c <diskdevs_protected>       
400014f8:   00100713            li  a4,1                                                  
400014fc:   00e48023            sb  a4,0(s1)                                              
  if (major < disktab_size && disktab != NULL) {                                          
40001500:   06f47a63            bgeu    s0,a5,40001574 <rtems_disk_delete+0xb4>           
40001504:   8a01a783            lw  a5,-1888(gp) # 40015730 <disktab>                     
40001508:   06078663            beqz    a5,40001574 <rtems_disk_delete+0xb4>              <== NEVER TAKEN
    rtems_disk_device_table *dtab = disktab + major;                                      
4000150c:   00341413            slli    s0,s0,0x3                                         
40001510:   00878433            add s0,a5,s0                                              
    if (minor < dtab->size && dtab->minor != NULL) {                                      
40001514:   00442783            lw  a5,4(s0)                                              
    return RTEMS_INVALID_ID;                                                              
40001518:   00400913            li  s2,4                                                  
    if (minor < dtab->size && dtab->minor != NULL) {                                      
4000151c:   02fa7463            bgeu    s4,a5,40001544 <rtems_disk_delete+0x84>           
40001520:   00042783            lw  a5,0(s0)                                              
40001524:   02078063            beqz    a5,40001544 <rtems_disk_delete+0x84>              <== NEVER TAKEN
      rtems_disk_device *dd = dtab->minor [minor];                                        
40001528:   002a1593            slli    a1,s4,0x2                                         
4000152c:   00b785b3            add a1,a5,a1                                              
40001530:   0005a503            lw  a0,0(a1)                                              
  if (dd == NULL) {                                                                       
40001534:   00050863            beqz    a0,40001544 <rtems_disk_delete+0x84>              <== NEVER TAKEN
  dd->deleted = true;                                                                     
40001538:   04e50023            sb  a4,64(a0)                                             
  rtems_disk_cleanup(dd);                                                                 
4000153c:   ab1ff0ef            jal ra,40000fec <rtems_disk_cleanup.constprop.0>          
  return RTEMS_SUCCESSFUL;                                                                
40001540:   00000913            li  s2,0                                                  
  _Mutex_Release( mutex );                                                                
40001544:   2a898513            addi    a0,s3,680                                         
  diskdevs_protected = false;                                                             
40001548:   00048023            sb  zero,0(s1)                                            
4000154c:   65c050ef            jal ra,40006ba8 <_Mutex_Release>                          
  disk_lock();                                                                            
  sc = disk_delete_locked(dev);                                                           
  disk_unlock();                                                                          
                                                                                          
  return sc;                                                                              
}                                                                                         
40001550:   01c12083            lw  ra,28(sp)                                             
40001554:   01812403            lw  s0,24(sp)                                             
40001558:   01412483            lw  s1,20(sp)                                             
4000155c:   00c12983            lw  s3,12(sp)                                             
40001560:   00812a03            lw  s4,8(sp)                                              
40001564:   00090513            mv  a0,s2                                                 
40001568:   01012903            lw  s2,16(sp)                                             
4000156c:   02010113            addi    sp,sp,32                                          
40001570:   00008067            ret                                                       
    return RTEMS_INVALID_ID;                                                              
40001574:   00400913            li  s2,4                                                  <== NOT EXECUTED
40001578:   fcdff06f            j   40001544 <rtems_disk_delete+0x84>                     <== NOT EXECUTED
                                                                                          

400017ac <rtems_disk_io_done>: rtems_status_code rtems_disk_io_done(void) {
400017ac:   fe010113            addi    sp,sp,-32                                         
400017b0:   01312623            sw  s3,12(sp)                                             
  rtems_device_major_number major = 0;                                                    
  rtems_device_minor_number minor = 0;                                                    
                                                                                          
  for (major = 0; major < disktab_size; ++major) {                                        
400017b4:   8a418993            addi    s3,gp,-1884 # 40015734 <disktab_size>             
400017b8:   0009a783            lw  a5,0(s3)                                              
{                                                                                         
400017bc:   01412423            sw  s4,8(sp)                                              
400017c0:   00812c23            sw  s0,24(sp)                                             
    rtems_disk_device_table *dtab = disktab + major;                                      
400017c4:   8a018a13            addi    s4,gp,-1888 # 40015730 <disktab>                  
{                                                                                         
400017c8:   00112e23            sw  ra,28(sp)                                             
400017cc:   00912a23            sw  s1,20(sp)                                             
400017d0:   01212823            sw  s2,16(sp)                                             
    rtems_disk_device_table *dtab = disktab + major;                                      
400017d4:   000a2403            lw  s0,0(s4)                                              
  for (major = 0; major < disktab_size; ++major) {                                        
400017d8:   04078e63            beqz    a5,40001834 <rtems_disk_io_done+0x88>             <== NEVER TAKEN
400017dc:   00000913            li  s2,0                                                  
    rtems_disk_device_table *dtab = disktab + major;                                      
400017e0:   00391493            slli    s1,s2,0x3                                         
400017e4:   009404b3            add s1,s0,s1                                              
                                                                                          
    for (minor = 0; minor < dtab->size; ++minor) {                                        
400017e8:   0044a683            lw  a3,4(s1)                                              
      rtems_disk_device *dd = dtab->minor [minor];                                        
400017ec:   0004a703            lw  a4,0(s1)                                              
    for (minor = 0; minor < dtab->size; ++minor) {                                        
400017f0:   02068863            beqz    a3,40001820 <rtems_disk_io_done+0x74>             
400017f4:   00000413            li  s0,0                                                  
      rtems_disk_device *dd = dtab->minor [minor];                                        
400017f8:   00241793            slli    a5,s0,0x2                                         
400017fc:   00f707b3            add a5,a4,a5                                              
40001800:   0007a503            lw  a0,0(a5)                                              
    for (minor = 0; minor < dtab->size; ++minor) {                                        
40001804:   00140413            addi    s0,s0,1                                           
                                                                                          
      if (dd != NULL) {                                                                   
40001808:   00050863            beqz    a0,40001818 <rtems_disk_io_done+0x6c>             <== ALWAYS TAKEN
        free_disk_device(dd);                                                             
4000180c:   f88ff0ef            jal ra,40000f94 <free_disk_device>                        <== NOT EXECUTED
40001810:   0044a683            lw  a3,4(s1)                                              <== NOT EXECUTED
      }                                                                                   
    }                                                                                     
    free(dtab->minor);                                                                    
40001814:   0004a703            lw  a4,0(s1)                                              <== NOT EXECUTED
    for (minor = 0; minor < dtab->size; ++minor) {                                        
40001818:   fed460e3            bltu    s0,a3,400017f8 <rtems_disk_io_done+0x4c>          
  }                                                                                       
  free(disktab);                                                                          
4000181c:   000a2403            lw  s0,0(s4)                                              
    free(dtab->minor);                                                                    
40001820:   00070513            mv  a0,a4                                                 
40001824:   6cc000ef            jal ra,40001ef0 <free>                                    
  for (major = 0; major < disktab_size; ++major) {                                        
40001828:   0009a783            lw  a5,0(s3)                                              
4000182c:   00190913            addi    s2,s2,1                                           
40001830:   faf968e3            bltu    s2,a5,400017e0 <rtems_disk_io_done+0x34>          
  free(disktab);                                                                          
40001834:   00040513            mv  a0,s0                                                 
40001838:   6b8000ef            jal ra,40001ef0 <free>                                    
                                                                                          
  disktab = NULL;                                                                         
  disktab_size = 0;                                                                       
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
}                                                                                         
4000183c:   01c12083            lw  ra,28(sp)                                             
40001840:   01812403            lw  s0,24(sp)                                             
  disktab = NULL;                                                                         
40001844:   000a2023            sw  zero,0(s4)                                            
  disktab_size = 0;                                                                       
40001848:   0009a023            sw  zero,0(s3)                                            
}                                                                                         
4000184c:   01412483            lw  s1,20(sp)                                             
40001850:   01012903            lw  s2,16(sp)                                             
40001854:   00c12983            lw  s3,12(sp)                                             
40001858:   00812a03            lw  s4,8(sp)                                              
4000185c:   00000513            li  a0,0                                                  
40001860:   02010113            addi    sp,sp,32                                          
40001864:   00008067            ret                                                       
                                                                                          

40001724 <rtems_disk_io_initialize>: } } rtems_status_code rtems_disk_io_initialize(void) {
40001724:   ff010113            addi    sp,sp,-16                                         
40001728:   00812423            sw  s0,8(sp)                                              
  rtems_status_code sc = RTEMS_SUCCESSFUL;                                                
  rtems_device_major_number size = DISKTAB_INITIAL_SIZE;                                  
                                                                                          
  if (disktab_size > 0) {                                                                 
4000172c:   8a418413            addi    s0,gp,-1884 # 40015734 <disktab_size>             
40001730:   00042783            lw  a5,0(s0)                                              
{                                                                                         
40001734:   00112623            sw  ra,12(sp)                                             
40001738:   00912223            sw  s1,4(sp)                                              
    return RTEMS_SUCCESSFUL;                                                              
4000173c:   00000513            li  a0,0                                                  
  if (disktab_size > 0) {                                                                 
40001740:   00078c63            beqz    a5,40001758 <rtems_disk_io_initialize+0x34>       <== ALWAYS TAKEN
  }                                                                                       
                                                                                          
  disktab_size = size;                                                                    
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
}                                                                                         
40001744:   00c12083            lw  ra,12(sp)                                             <== NOT EXECUTED
40001748:   00812403            lw  s0,8(sp)                                              <== NOT EXECUTED
4000174c:   00412483            lw  s1,4(sp)                                              <== NOT EXECUTED
40001750:   01010113            addi    sp,sp,16                                          <== NOT EXECUTED
40001754:   00008067            ret                                                       <== NOT EXECUTED
  disktab = calloc(size, sizeof(rtems_disk_device_table));                                
40001758:   00800593            li  a1,8                                                  
4000175c:   00800513            li  a0,8                                                  
40001760:   56c000ef            jal ra,40001ccc <calloc>                                  
40001764:   8a018493            addi    s1,gp,-1888 # 40015730 <disktab>                  
40001768:   00a4a023            sw  a0,0(s1)                                              
  if (disktab == NULL) {                                                                  
4000176c:   02050c63            beqz    a0,400017a4 <rtems_disk_io_initialize+0x80>       <== NEVER TAKEN
  sc = rtems_bdbuf_init();                                                                
40001770:   1680a0ef            jal ra,4000b8d8 <rtems_bdbuf_init>                        
  if (sc != RTEMS_SUCCESSFUL) {                                                           
40001774:   02051063            bnez    a0,40001794 <rtems_disk_io_initialize+0x70>       <== NEVER TAKEN
  disktab_size = size;                                                                    
40001778:   00800793            li  a5,8                                                  
}                                                                                         
4000177c:   00c12083            lw  ra,12(sp)                                             
  disktab_size = size;                                                                    
40001780:   00f42023            sw  a5,0(s0)                                              
}                                                                                         
40001784:   00812403            lw  s0,8(sp)                                              
40001788:   00412483            lw  s1,4(sp)                                              
4000178c:   01010113            addi    sp,sp,16                                          
40001790:   00008067            ret                                                       
    free(disktab);                                                                        
40001794:   0004a503            lw  a0,0(s1)                                              <== NOT EXECUTED
40001798:   758000ef            jal ra,40001ef0 <free>                                    <== NOT EXECUTED
    return RTEMS_UNSATISFIED;                                                             
4000179c:   00d00513            li  a0,13                                                 <== NOT EXECUTED
400017a0:   fa5ff06f            j   40001744 <rtems_disk_io_initialize+0x20>              <== NOT EXECUTED
    return RTEMS_NO_MEMORY;                                                               
400017a4:   01a00513            li  a0,26                                                 <== NOT EXECUTED
400017a8:   f9dff06f            j   40001744 <rtems_disk_io_initialize+0x20>              <== NOT EXECUTED
                                                                                          

4000157c <rtems_disk_obtain>: rtems_disk_device * rtems_disk_obtain(dev_t dev) {
4000157c:   fe010113            addi    sp,sp,-32                                         
40001580:   00112e23            sw  ra,28(sp)                                             
40001584:   00812c23            sw  s0,24(sp)                                             
40001588:   00912a23            sw  s1,20(sp)                                             
4000158c:   01212823            sw  s2,16(sp)                                             
40001590:   01312623            sw  s3,12(sp)                                             
                                                                                          
static inline uint32_t riscv_interrupt_disable( void )                                    
{                                                                                         
  unsigned long mstatus;                                                                  
                                                                                          
  __asm__ volatile (                                                                      
40001594:   30047973            csrrci  s2,mstatus,8                                      
    "csrrc %0, mstatus, " RTEMS_XSTRING( RISCV_MSTATUS_MIE ) :                            
      "=&r" ( mstatus )                                                                   
  );                                                                                      
                                                                                          
  return mstatus & RISCV_MSTATUS_MIE;                                                     
40001598:   00897913            andi    s2,s2,8                                           
  rtems_disk_device *dd = NULL;                                                           
  rtems_interrupt_lock_context lock_context;                                              
                                                                                          
  rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);                            
  if (!diskdevs_protected) {                                                              
4000159c:   89c18413            addi    s0,gp,-1892 # 4001572c <diskdevs_protected>       
400015a0:   00044783            lbu a5,0(s0)                                              
400015a4:   0ff7f793            andi    a5,a5,255                                         
400015a8:   02079a63            bnez    a5,400015dc <rtems_disk_obtain+0x60>              <== NEVER TAKEN
    /* Frequent and quickest case */                                                      
    dd = get_disk_entry(dev, false);                                                      
400015ac:   00000613            li  a2,0                                                  
400015b0:   f9cff0ef            jal ra,40000d4c <get_disk_entry>                          
400015b4:   00050493            mv  s1,a0                                                 
}                                                                                         
                                                                                          
static inline void riscv_interrupt_enable( uint32_t level )                               
{                                                                                         
  __asm__ volatile ( "csrrs zero, mstatus, %0" : : "r" ( level ) );                       
400015b8:   30092073            csrs    mstatus,s2                                        
    dd = get_disk_entry(dev, false);                                                      
    disk_unlock();                                                                        
  }                                                                                       
                                                                                          
  return dd;                                                                              
}                                                                                         
400015bc:   01c12083            lw  ra,28(sp)                                             
400015c0:   01812403            lw  s0,24(sp)                                             
400015c4:   01012903            lw  s2,16(sp)                                             
400015c8:   00c12983            lw  s3,12(sp)                                             
400015cc:   00048513            mv  a0,s1                                                 
400015d0:   01412483            lw  s1,20(sp)                                             
400015d4:   02010113            addi    sp,sp,32                                          
400015d8:   00008067            ret                                                       
400015dc:   00050993            mv  s3,a0                                                 <== NOT EXECUTED
400015e0:   00058493            mv  s1,a1                                                 <== NOT EXECUTED
400015e4:   30092073            csrs    mstatus,s2                                        <== NOT EXECUTED
  _Mutex_Acquire( mutex );                                                                
400015e8:   40015937            lui s2,0x40015                                            <== NOT EXECUTED
400015ec:   2a890513            addi    a0,s2,680 # 400152a8 <diskdevs_mutex>             <== NOT EXECUTED
400015f0:   548050ef            jal ra,40006b38 <_Mutex_Acquire>                          <== NOT EXECUTED
    dd = get_disk_entry(dev, false);                                                      
400015f4:   00048593            mv  a1,s1                                                 <== NOT EXECUTED
  diskdevs_protected = true;                                                              
400015f8:   00100793            li  a5,1                                                  <== NOT EXECUTED
    dd = get_disk_entry(dev, false);                                                      
400015fc:   00000613            li  a2,0                                                  <== NOT EXECUTED
40001600:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
  diskdevs_protected = true;                                                              
40001604:   00f40023            sb  a5,0(s0)                                              <== NOT EXECUTED
    dd = get_disk_entry(dev, false);                                                      
40001608:   f44ff0ef            jal ra,40000d4c <get_disk_entry>                          <== NOT EXECUTED
4000160c:   00050493            mv  s1,a0                                                 <== NOT EXECUTED
  _Mutex_Release( mutex );                                                                
40001610:   2a890513            addi    a0,s2,680                                         <== NOT EXECUTED
  diskdevs_protected = false;                                                             
40001614:   00040023            sb  zero,0(s0)                                            <== NOT EXECUTED
40001618:   590050ef            jal ra,40006ba8 <_Mutex_Release>                          <== NOT EXECUTED
}                                                                                         
4000161c:   01c12083            lw  ra,28(sp)                                             <== NOT EXECUTED
40001620:   01812403            lw  s0,24(sp)                                             <== NOT EXECUTED
40001624:   01012903            lw  s2,16(sp)                                             <== NOT EXECUTED
40001628:   00c12983            lw  s3,12(sp)                                             <== NOT EXECUTED
4000162c:   00048513            mv  a0,s1                                                 <== NOT EXECUTED
40001630:   01412483            lw  s1,20(sp)                                             <== NOT EXECUTED
40001634:   02010113            addi    sp,sp,32                                          <== NOT EXECUTED
40001638:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

4000163c <rtems_disk_release>: rtems_status_code rtems_disk_release(rtems_disk_device *dd) {
4000163c:   fe010113            addi    sp,sp,-32                                         
40001640:   00812c23            sw  s0,24(sp)                                             
40001644:   00912a23            sw  s1,20(sp)                                             
  rtems_interrupt_lock_context lock_context;                                              
  dev_t dev = dd->dev;                                                                    
40001648:   00052403            lw  s0,0(a0)                                              
4000164c:   00452483            lw  s1,4(a0)                                              
{                                                                                         
40001650:   00112e23            sw  ra,28(sp)                                             
40001654:   01212823            sw  s2,16(sp)                                             
40001658:   01312623            sw  s3,12(sp)                                             
  __asm__ volatile (                                                                      
4000165c:   30047773            csrrci  a4,mstatus,8                                      
  unsigned uses = 0;                                                                      
  bool deleted = false;                                                                   
                                                                                          
  rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);                            
  uses = --dd->uses;                                                                      
40001660:   01452783            lw  a5,20(a0)                                             
  deleted = dd->deleted;                                                                  
40001664:   04054683            lbu a3,64(a0)                                             
  uses = --dd->uses;                                                                      
40001668:   fff78793            addi    a5,a5,-1                                          
4000166c:   00f52a23            sw  a5,20(a0)                                             
  return mstatus & RISCV_MSTATUS_MIE;                                                     
40001670:   00877713            andi    a4,a4,8                                           
  __asm__ volatile ( "csrrs zero, mstatus, %0" : : "r" ( level ) );                       
40001674:   30072073            csrs    mstatus,a4                                        
  rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);                            
                                                                                          
  if (uses == 0 && deleted) {                                                             
40001678:   00079463            bnez    a5,40001680 <rtems_disk_release+0x44>             
4000167c:   02069263            bnez    a3,400016a0 <rtems_disk_release+0x64>             
    rtems_disk_delete(dev);                                                               
  }                                                                                       
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
}                                                                                         
40001680:   01c12083            lw  ra,28(sp)                                             
40001684:   01812403            lw  s0,24(sp)                                             
40001688:   01412483            lw  s1,20(sp)                                             
4000168c:   01012903            lw  s2,16(sp)                                             
40001690:   00c12983            lw  s3,12(sp)                                             
40001694:   00000513            li  a0,0                                                  
40001698:   02010113            addi    sp,sp,32                                          
4000169c:   00008067            ret                                                       
  _Mutex_Acquire( mutex );                                                                
400016a0:   400159b7            lui s3,0x40015                                            
400016a4:   2a898513            addi    a0,s3,680 # 400152a8 <diskdevs_mutex>             
400016a8:   490050ef            jal ra,40006b38 <_Mutex_Acquire>                          
  if (major < disktab_size && disktab != NULL) {                                          
400016ac:   8a41a783            lw  a5,-1884(gp) # 40015734 <disktab_size>                
  diskdevs_protected = true;                                                              
400016b0:   89c18913            addi    s2,gp,-1892 # 4001572c <diskdevs_protected>       
400016b4:   00100713            li  a4,1                                                  
400016b8:   00e90023            sb  a4,0(s2)                                              
  if (major < disktab_size && disktab != NULL) {                                          
400016bc:   02f47e63            bgeu    s0,a5,400016f8 <rtems_disk_release+0xbc>          
400016c0:   8a01a783            lw  a5,-1888(gp) # 40015730 <disktab>                     
400016c4:   02078a63            beqz    a5,400016f8 <rtems_disk_release+0xbc>             <== NEVER TAKEN
    rtems_disk_device_table *dtab = disktab + major;                                      
400016c8:   00341413            slli    s0,s0,0x3                                         
400016cc:   00878433            add s0,a5,s0                                              
    if (minor < dtab->size && dtab->minor != NULL) {                                      
400016d0:   00442783            lw  a5,4(s0)                                              
400016d4:   02f4f263            bgeu    s1,a5,400016f8 <rtems_disk_release+0xbc>          
400016d8:   00042783            lw  a5,0(s0)                                              
400016dc:   00078e63            beqz    a5,400016f8 <rtems_disk_release+0xbc>             <== NEVER TAKEN
      rtems_disk_device *dd = dtab->minor [minor];                                        
400016e0:   00249493            slli    s1,s1,0x2                                         
400016e4:   009784b3            add s1,a5,s1                                              
400016e8:   0004a503            lw  a0,0(s1)                                              
  if (dd == NULL) {                                                                       
400016ec:   00050663            beqz    a0,400016f8 <rtems_disk_release+0xbc>             <== NEVER TAKEN
  dd->deleted = true;                                                                     
400016f0:   04e50023            sb  a4,64(a0)                                             
  rtems_disk_cleanup(dd);                                                                 
400016f4:   8f9ff0ef            jal ra,40000fec <rtems_disk_cleanup.constprop.0>          
  _Mutex_Release( mutex );                                                                
400016f8:   2a898513            addi    a0,s3,680                                         
  diskdevs_protected = false;                                                             
400016fc:   00090023            sb  zero,0(s2)                                            
40001700:   4a8050ef            jal ra,40006ba8 <_Mutex_Release>                          
}                                                                                         
40001704:   01c12083            lw  ra,28(sp)                                             
40001708:   01812403            lw  s0,24(sp)                                             
4000170c:   01412483            lw  s1,20(sp)                                             
40001710:   01012903            lw  s2,16(sp)                                             
40001714:   00c12983            lw  s3,12(sp)                                             
40001718:   00000513            li  a0,0                                                  
4000171c:   02010113            addi    sp,sp,32                                          
40001720:   00008067            ret                                                       
                                                                                          

40003cb4 <rtems_fdisk_initialize>: */ rtems_device_driver rtems_fdisk_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void* arg RTEMS_UNUSED) {
40003cb4:   fa010113            addi    sp,sp,-96                                         
40003cb8:   05412423            sw  s4,72(sp)                                             
40003cbc:   00050a13            mv  s4,a0                                                 
  rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);                            
40003cc0:   20000513            li  a0,512                                                
{                                                                                         
40003cc4:   04112e23            sw  ra,92(sp)                                             
40003cc8:   04812c23            sw  s0,88(sp)                                             
40003ccc:   04912a23            sw  s1,84(sp)                                             
40003cd0:   05212823            sw  s2,80(sp)                                             
40003cd4:   05312623            sw  s3,76(sp)                                             
40003cd8:   05512223            sw  s5,68(sp)                                             
40003cdc:   05612023            sw  s6,64(sp)                                             
40003ce0:   03712e23            sw  s7,60(sp)                                             
40003ce4:   03812c23            sw  s8,56(sp)                                             
40003ce8:   03912a23            sw  s9,52(sp)                                             
40003cec:   03a12823            sw  s10,48(sp)                                            
40003cf0:   03b12623            sw  s11,44(sp)                                            
40003cf4:   01412023            sw  s4,0(sp)                                              
  rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);                            
40003cf8:   559000ef            jal ra,40004a50 <malloc>                                  
40003cfc:   92a1a223            sw  a0,-1756(gp) # 400313c4 <rtems_fdisk_crc16_factor>    
  if (!rtems_fdisk_crc16_factor)                                                          
40003d00:   40050e63            beqz    a0,4000411c <rtems_fdisk_initialize+0x468>        <== NEVER TAKEN
      v = v & 1 ? (v >> 1) ^ pattern : v >> 1;                                            
40003d04:   ffff8637            lui a2,0xffff8                                            
40003d08:   00000593            li  a1,0                                                  
40003d0c:   40860613            addi    a2,a2,1032 # ffff8408 <RamEnd+0xbeff8408>         
  for (b = 0; b < 256; b++)                                                               
40003d10:   10000893            li  a7,256                                                
    uint16_t v = b;                                                                       
40003d14:   01059793            slli    a5,a1,0x10                                        
40003d18:   0107d793            srli    a5,a5,0x10                                        
  for (b = 0; b < 256; b++)                                                               
40003d1c:   00800c93            li  s9,8                                                  
      v = v & 1 ? (v >> 1) ^ pattern : v >> 1;                                            
40003d20:   0017f713            andi    a4,a5,1                                           
40003d24:   0017d793            srli    a5,a5,0x1                                         
    for (i = 8; i--;)                                                                     
40003d28:   fffc8c93            addi    s9,s9,-1                                          
      v = v & 1 ? (v >> 1) ^ pattern : v >> 1;                                            
40003d2c:   00c7c6b3            xor a3,a5,a2                                              
40003d30:   00070663            beqz    a4,40003d3c <rtems_fdisk_initialize+0x88>         
40003d34:   01069793            slli    a5,a3,0x10                                        
40003d38:   0107d793            srli    a5,a5,0x10                                        
    for (i = 8; i--;)                                                                     
40003d3c:   fe0c92e3            bnez    s9,40003d20 <rtems_fdisk_initialize+0x6c>         
    rtems_fdisk_crc16_factor[b] = v & 0xffff;                                             
40003d40:   00f51023            sh  a5,0(a0)                                              
  for (b = 0; b < 256; b++)                                                               
40003d44:   00158593            addi    a1,a1,1                                           
40003d48:   00250513            addi    a0,a0,2                                           
40003d4c:   fd1594e3            bne a1,a7,40003d14 <rtems_fdisk_initialize+0x60>          
                                                                                          
  sc = rtems_fdisk_crc16_gen_factors (0x8408);                                            
  if (sc != RTEMS_SUCCESSFUL)                                                             
      return sc;                                                                          
                                                                                          
  fd = calloc (rtems_flashdisk_configuration_size, sizeof (*fd));                         
40003d50:   8e41a483            lw  s1,-1820(gp) # 40031384 <rtems_flashdisk_configuration_size>
40003d54:   08400593            li  a1,132                                                
40003d58:   00048513            mv  a0,s1                                                 
40003d5c:   498000ef            jal ra,400041f4 <calloc>                                  
40003d60:   00050413            mv  s0,a0                                                 
  if (!fd)                                                                                
40003d64:   3a050c63            beqz    a0,4000411c <rtems_fdisk_initialize+0x468>        <== NEVER TAKEN
    return RTEMS_NO_MEMORY;                                                               
                                                                                          
  for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++)         
40003d68:   26048863            beqz    s1,40003fd8 <rtems_fdisk_initialize+0x324>        <== NEVER TAKEN
  {                                                                                       
    char     name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";                               
40003d6c:   76656bb7            lui s7,0x76656                                            
40003d70:   42fb8793            addi    a5,s7,1071 # 7665642f <RamEnd+0x3565642f>         
40003d74:   64646b37            lui s6,0x64646                                            
40003d78:   00f12223            sw  a5,4(sp)                                              
static __inline void                                                                      
_Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name)                 
{                                                                                         
    struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name);                        
                                                                                          
    *_mutex = _init;                                                                      
40003d7c:   4002cab7            lui s5,0x4002c                                            
40003d80:   62fb0793            addi    a5,s6,1583 # 6464662f <RamEnd+0x2364662f>         
  const rtems_flashdisk_config* c = rtems_flashdisk_configuration;                        
40003d84:   4002b937            lui s2,0x4002b                                            
    char     name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";                               
40003d88:   00f12423            sw  a5,8(sp)                                              
40003d8c:   f7ca8793            addi    a5,s5,-132 # 4002bf7c <__func__.6+0xab4>          
  for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++)         
40003d90:   00000993            li  s3,0                                                  
  const rtems_flashdisk_config* c = rtems_flashdisk_configuration;                        
40003d94:   11090913            addi    s2,s2,272 # 4002b110 <rtems_flashdisk_configuration>
40003d98:   00f12623            sw  a5,12(sp)                                             
    char     name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";                               
40003d9c:   06100593            li  a1,97                                                 
40003da0:   00b11e23            sh  a1,28(sp)                                             
40003da4:   00412583            lw  a1,4(sp)                                              
                                                                                          
    name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;                             
                                                                                          
    fd->major              = major;                                                       
    fd->minor              = minor;                                                       
    fd->flags              = c->flags;                                                    
40003da8:   00c92603            lw  a2,12(s2)                                             
    fd->compact_segs       = c->compact_segs;                                             
40003dac:   01492683            lw  a3,20(s2)                                             
    char     name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";                               
40003db0:   00b12a23            sw  a1,20(sp)                                             
40003db4:   00812583            lw  a1,8(sp)                                              
    fd->avail_compact_segs = c->avail_compact_segs;                                       
40003db8:   01892703            lw  a4,24(s2)                                             
    fd->block_size         = c->block_size;                                               
40003dbc:   00092d83            lw  s11,0(s2)                                             
    fd->unavail_blocks     = c->unavail_blocks;                                           
40003dc0:   01092483            lw  s1,16(s2)                                             
    fd->info_level         = c->info_level;                                               
40003dc4:   01c92783            lw  a5,28(s2)                                             
    char     name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";                               
40003dc8:   00b12c23            sw  a1,24(sp)                                             
    fd->major              = major;                                                       
40003dcc:   00012583            lw  a1,0(sp)                                              
                                                                                          
    for (device = 0; device < c->device_count; device++)                                  
40003dd0:   00492a83            lw  s5,4(s2)                                              
    name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;                             
40003dd4:   01310ea3            sb  s3,29(sp)                                             
    fd->major              = major;                                                       
40003dd8:   00b42023            sw  a1,0(s0)                                              
    fd->minor              = minor;                                                       
40003ddc:   01342223            sw  s3,4(s0)                                              
    fd->flags              = c->flags;                                                    
40003de0:   00c42423            sw  a2,8(s0)                                              
    fd->compact_segs       = c->compact_segs;                                             
40003de4:   00d42623            sw  a3,12(s0)                                             
    fd->avail_compact_segs = c->avail_compact_segs;                                       
40003de8:   00e42823            sw  a4,16(s0)                                             
    fd->block_size         = c->block_size;                                               
40003dec:   01b42a23            sw  s11,20(s0)                                            
    fd->unavail_blocks     = c->unavail_blocks;                                           
40003df0:   02942023            sw  s1,32(s0)                                             
    fd->info_level         = c->info_level;                                               
40003df4:   06f42e23            sw  a5,124(s0)                                            
    for (device = 0; device < c->device_count; device++)                                  
40003df8:   260a8063            beqz    s5,40004058 <rtems_fdisk_initialize+0x3a4>        <== NEVER TAKEN
40003dfc:   00892303            lw  t1,8(s2)                                              
40003e00:   001a9e13            slli    t3,s5,0x1                                         
40003e04:   015e0e33            add t3,t3,s5                                              
40003e08:   002e1e13            slli    t3,t3,0x2                                         
40003e0c:   006e0e33            add t3,t3,t1                                              
    uint32_t blocks = 0;                                                                  
40003e10:   00000a13            li  s4,0                                                  
  for (s = 0; s < dd->segment_count; s++)                                                 
40003e14:   00032783            lw  a5,0(t1)                                              
40003e18:   04078863            beqz    a5,40003e68 <rtems_fdisk_initialize+0x1b4>        <== NEVER TAKEN
40003e1c:   00432683            lw  a3,4(t1)                                              
40003e20:   00179513            slli    a0,a5,0x1                                         
40003e24:   00f50533            add a0,a0,a5                                              
40003e28:   00251513            slli    a0,a0,0x2                                         
40003e2c:   00d50533            add a0,a0,a3                                              
  uint32_t count = 0;                                                                     
40003e30:   00000593            li  a1,0                                                  
  return sd->size / page_size;                                                            
40003e34:   0086a783            lw  a5,8(a3)                                              
       rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;                          
40003e38:   0006de83            lhu t4,0(a3)                                              
  for (s = 0; s < dd->segment_count; s++)                                                 
40003e3c:   00c68693            addi    a3,a3,12                                          
  return sd->size / page_size;                                                            
40003e40:   03b7d7b3            divu    a5,a5,s11                                         
  uint32_t bytes = pages * sizeof (rtems_fdisk_page_desc);                                
40003e44:   00379713            slli    a4,a5,0x3                                         
  return ((bytes - 1) / page_size) + 1;                                                   
40003e48:   fff70713            addi    a4,a4,-1                                          
40003e4c:   03b75733            divu    a4,a4,s11                                         
      (rtems_fdisk_pages_in_segment (sd, page_size) -                                     
40003e50:   fff78793            addi    a5,a5,-1                                          
40003e54:   40e787b3            sub a5,a5,a4                                              
       rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;                          
40003e58:   03d787b3            mul a5,a5,t4                                              
    count +=                                                                              
40003e5c:   00f585b3            add a1,a1,a5                                              
  for (s = 0; s < dd->segment_count; s++)                                                 
40003e60:   fcd51ae3            bne a0,a3,40003e34 <rtems_fdisk_initialize+0x180>         
      blocks += rtems_fdisk_blocks_in_device (&c->devices[device],                        
40003e64:   00ba0a33            add s4,s4,a1                                              
    for (device = 0; device < c->device_count; device++)                                  
40003e68:   00c30313            addi    t1,t1,12                                          
40003e6c:   fbc314e3            bne t1,t3,40003e14 <rtems_fdisk_initialize+0x160>         
                                              c->block_size);                             
                                                                                          
    /*                                                                                    
     * One copy buffer of a page size.                                                    
     */                                                                                   
    fd->copy_buffer = malloc (c->block_size);                                             
40003e70:   000d8513            mv  a0,s11                                                
40003e74:   3dd000ef            jal ra,40004a50 <malloc>                                  
40003e78:   06a42c23            sw  a0,120(s0)                                            
    if (!fd->copy_buffer)                                                                 
40003e7c:   2a050463            beqz    a0,40004124 <rtems_fdisk_initialize+0x470>        <== NEVER TAKEN
      return RTEMS_NO_MEMORY;                                                             
                                                                                          
    fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));                         
40003e80:   00800593            li  a1,8                                                  
40003e84:   000a0513            mv  a0,s4                                                 
40003e88:   36c000ef            jal ra,400041f4 <calloc>                                  
40003e8c:   00a42c23            sw  a0,24(s0)                                             
    if (!fd->blocks)                                                                      
40003e90:   28050a63            beqz    a0,40004124 <rtems_fdisk_initialize+0x470>        <== NEVER TAKEN
      return RTEMS_NO_MEMORY;                                                             
                                                                                          
    fd->block_count = blocks;                                                             
                                                                                          
    fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));              
40003e94:   00c00593            li  a1,12                                                 
40003e98:   000a8513            mv  a0,s5                                                 
    fd->block_count = blocks;                                                             
40003e9c:   01442e23            sw  s4,28(s0)                                             
    fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));              
40003ea0:   354000ef            jal ra,400041f4 <calloc>                                  
40003ea4:   02a42623            sw  a0,44(s0)                                             
    if (!fd->devices)                                                                     
40003ea8:   26050e63            beqz    a0,40004124 <rtems_fdisk_initialize+0x470>        <== NEVER TAKEN
      return RTEMS_NO_MEMORY;                                                             
                                                                                          
    rtems_mutex_init (&fd->lock, "Flash Disk");                                           
                                                                                          
    sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks,            
40003eac:   400037b7            lui a5,0x40003                                            
40003eb0:   afc78693            addi    a3,a5,-1284 # 40002afc <rtems_fdisk_ioctl>        
40003eb4:   00c12783            lw  a5,12(sp)                                             
40003eb8:   409a0633            sub a2,s4,s1                                              
40003ebc:   00040713            mv  a4,s0                                                 
40003ec0:   000d8593            mv  a1,s11                                                
40003ec4:   01410513            addi    a0,sp,20                                          
40003ec8:   06042223            sw  zero,100(s0)                                          
40003ecc:   06042423            sw  zero,104(s0)                                          
40003ed0:   06042623            sw  zero,108(s0)                                          
40003ed4:   06042823            sw  zero,112(s0)                                          
40003ed8:   06f42a23            sw  a5,116(s0)                                            
40003edc:   5b90c0ef            jal ra,40010c94 <rtems_blkdev_create>                     
40003ee0:   00050493            mv  s1,a0                                                 
                             rtems_fdisk_ioctl, fd);                                      
    if (sc != RTEMS_SUCCESSFUL)                                                           
40003ee4:   16051e63            bnez    a0,40004060 <rtems_fdisk_initialize+0x3ac>        <== NEVER TAKEN
      free (fd->devices);                                                                 
      rtems_fdisk_error ("disk create phy failed");                                       
      return sc;                                                                          
    }                                                                                     
                                                                                          
    for (device = 0; device < c->device_count; device++)                                  
40003ee8:   00492483            lw  s1,4(s2)                                              
40003eec:   0a048a63            beqz    s1,40003fa0 <rtems_fdisk_initialize+0x2ec>        <== NEVER TAKEN
40003ef0:   00892a83            lw  s5,8(s2)                                              
40003ef4:   02c42a03            lw  s4,44(s0)                                             
40003ef8:   00000d13            li  s10,0                                                 
  for (segment = 0; segment < dd->segment_count; segment++)                               
40003efc:   000aab03            lw  s6,0(s5)                                              
40003f00:   100b0c63            beqz    s6,40004018 <rtems_fdisk_initialize+0x364>        <== NEVER TAKEN
40003f04:   004aad83            lw  s11,4(s5)                                             
40003f08:   001b1313            slli    t1,s6,0x1                                         
40003f0c:   01630333            add t1,t1,s6                                              
40003f10:   00231313            slli    t1,t1,0x2                                         
40003f14:   01b30bb3            add s7,t1,s11                                             
    count += dd->segments[segment].count;                                                 
40003f18:   000d8793            mv  a5,s11                                                
  uint32_t count = 0;                                                                     
40003f1c:   00000b13            li  s6,0                                                  
    count += dd->segments[segment].count;                                                 
40003f20:   0007d703            lhu a4,0(a5)                                              
  for (segment = 0; segment < dd->segment_count; segment++)                               
40003f24:   00c78793            addi    a5,a5,12                                          
    count += dd->segments[segment].count;                                                 
40003f28:   00eb0b33            add s6,s6,a4                                              
  for (segment = 0; segment < dd->segment_count; segment++)                               
40003f2c:   fefb9ae3            bne s7,a5,40003f20 <rtems_fdisk_initialize+0x26c>         
      uint32_t                 segment_count;                                             
      uint32_t                 segment;                                                   
                                                                                          
      segment_count = rtems_fdisk_count_segments (&c->devices[device]);                   
                                                                                          
      fd->devices[device].segments = calloc (segment_count,                               
40003f30:   03000593            li  a1,48                                                 
40003f34:   000b0513            mv  a0,s6                                                 
40003f38:   2bc000ef            jal ra,400041f4 <calloc>                                  
40003f3c:   00aa2023            sw  a0,0(s4)                                              
                                             sizeof (rtems_fdisk_segment_ctl));           
      if (!fd->devices[device].segments)                                                  
40003f40:   0e050663            beqz    a0,4000402c <rtems_fdisk_initialize+0x378>        <== NEVER TAKEN
        const rtems_fdisk_segment_desc* sd;                                               
        uint32_t                        seg_segment;                                      
                                                                                          
        sd = &c->devices[device].segments[segment];                                       
                                                                                          
        for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)               
40003f44:   000dd683            lhu a3,0(s11)                                             
40003f48:   02068c63            beqz    a3,40003f80 <rtems_fdisk_initialize+0x2cc>        <== NEVER TAKEN
40003f4c:   00000713            li  a4,0                                                  
40003f50:   00050793            mv  a5,a0                                                 
        {                                                                                 
          sc->descriptor = sd;                                                            
          sc->device     = device;                                                        
          sc->segment    = seg_segment;                                                   
40003f54:   00e7a623            sw  a4,12(a5)                                             
          sc->descriptor = sd;                                                            
40003f58:   01b7a223            sw  s11,4(a5)                                             
          sc->device     = device;                                                        
40003f5c:   01a7a423            sw  s10,8(a5)                                             
          sc->erased     = 0;                                                             
40003f60:   0207a623            sw  zero,44(a5)                                           
        for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)               
40003f64:   00170713            addi    a4,a4,1                                           
40003f68:   03078793            addi    a5,a5,48                                          
40003f6c:   fed714e3            bne a4,a3,40003f54 <rtems_fdisk_initialize+0x2a0>         
40003f70:   00171793            slli    a5,a4,0x1                                         
40003f74:   00e78733            add a4,a5,a4                                              
40003f78:   00471713            slli    a4,a4,0x4                                         
40003f7c:   00e50533            add a0,a0,a4                                              
      for (segment = 0; segment < c->devices[device].segment_count; segment++)            
40003f80:   00cd8d93            addi    s11,s11,12                                        
40003f84:   fdbb90e3            bne s7,s11,40003f44 <rtems_fdisk_initialize+0x290>        
        }                                                                                 
      }                                                                                   
                                                                                          
      fd->devices[device].segment_count = segment_count;                                  
      fd->devices[device].descriptor    = &c->devices[device];                            
40003f88:   015a2423            sw  s5,8(s4)                                              
      fd->devices[device].segment_count = segment_count;                                  
40003f8c:   016a2223            sw  s6,4(s4)                                              
    for (device = 0; device < c->device_count; device++)                                  
40003f90:   001d0d13            addi    s10,s10,1                                         
40003f94:   00ca8a93            addi    s5,s5,12                                          
40003f98:   00ca0a13            addi    s4,s4,12                                          
40003f9c:   f69d10e3            bne s10,s1,40003efc <rtems_fdisk_initialize+0x248>        
    }                                                                                     
                                                                                          
    fd->device_count = c->device_count;                                                   
                                                                                          
    ret = rtems_fdisk_recover_block_mappings (fd);                                        
40003fa0:   00040513            mv  a0,s0                                                 
    fd->device_count = c->device_count;                                                   
40003fa4:   02942823            sw  s1,48(s0)                                             
    ret = rtems_fdisk_recover_block_mappings (fd);                                        
40003fa8:   f6cfe0ef            jal ra,40002714 <rtems_fdisk_recover_block_mappings>      
40003fac:   00050d93            mv  s11,a0                                                
    if (ret)                                                                              
40003fb0:   0c051e63            bnez    a0,4000408c <rtems_fdisk_initialize+0x3d8>        <== NEVER TAKEN
      rtems_fdisk_error ("recovery of disk failed: %s (%d)",                              
                         strerror (ret), ret);                                            
      return ret;                                                                         
    }                                                                                     
                                                                                          
    ret = rtems_fdisk_compact (fd);                                                       
40003fb4:   00040513            mv  a0,s0                                                 
40003fb8:   cbcfe0ef            jal ra,40002474 <rtems_fdisk_compact>                     
40003fbc:   00050d93            mv  s11,a0                                                
    if (ret)                                                                              
40003fc0:   10051a63            bnez    a0,400040d4 <rtems_fdisk_initialize+0x420>        <== NEVER TAKEN
  for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++)         
40003fc4:   8e41a783            lw  a5,-1820(gp) # 40031384 <rtems_flashdisk_configuration_size>
40003fc8:   00198993            addi    s3,s3,1                                           
40003fcc:   02090913            addi    s2,s2,32                                          
40003fd0:   08440413            addi    s0,s0,132                                         
40003fd4:   dcf9e4e3            bltu    s3,a5,40003d9c <rtems_fdisk_initialize+0xe8>      
      return ret;                                                                         
    }                                                                                     
  }                                                                                       
                                                                                          
  return RTEMS_SUCCESSFUL;                                                                
}                                                                                         
40003fd8:   05c12083            lw  ra,92(sp)                                             
40003fdc:   05812403            lw  s0,88(sp)                                             
40003fe0:   05412483            lw  s1,84(sp)                                             
40003fe4:   05012903            lw  s2,80(sp)                                             
40003fe8:   04c12983            lw  s3,76(sp)                                             
40003fec:   04812a03            lw  s4,72(sp)                                             
40003ff0:   04412a83            lw  s5,68(sp)                                             
40003ff4:   04012b03            lw  s6,64(sp)                                             
40003ff8:   03c12b83            lw  s7,60(sp)                                             
40003ffc:   03812c03            lw  s8,56(sp)                                             
40004000:   03012d03            lw  s10,48(sp)                                            
40004004:   02c12d83            lw  s11,44(sp)                                            
40004008:   000c8513            mv  a0,s9                                                 
4000400c:   03412c83            lw  s9,52(sp)                                             
40004010:   06010113            addi    sp,sp,96                                          
40004014:   00008067            ret                                                       
      fd->devices[device].segments = calloc (segment_count,                               
40004018:   03000593            li  a1,48                                                 <== NOT EXECUTED
4000401c:   00000513            li  a0,0                                                  <== NOT EXECUTED
40004020:   1d4000ef            jal ra,400041f4 <calloc>                                  <== NOT EXECUTED
40004024:   00aa2023            sw  a0,0(s4)                                              <== NOT EXECUTED
      if (!fd->devices[device].segments)                                                  
40004028:   f60510e3            bnez    a0,40003f88 <rtems_fdisk_initialize+0x2d4>        <== NOT EXECUTED
        unlink (name);                                                                    
4000402c:   01410513            addi    a0,sp,20                                          <== NOT EXECUTED
40004030:   139020ef            jal ra,40006968 <unlink>                                  <== NOT EXECUTED
        free (fd->copy_buffer);                                                           
40004034:   07842503            lw  a0,120(s0)                                            <== NOT EXECUTED
        return RTEMS_NO_MEMORY;                                                           
40004038:   01a00493            li  s1,26                                                 <== NOT EXECUTED
      return RTEMS_NO_MEMORY;                                                             
4000403c:   00048c93            mv  s9,s1                                                 <== NOT EXECUTED
        free (fd->copy_buffer);                                                           
40004040:   4bc000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
        free (fd->blocks);                                                                
40004044:   01842503            lw  a0,24(s0)                                             <== NOT EXECUTED
40004048:   4b4000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
        free (fd->devices);                                                               
4000404c:   02c42503            lw  a0,44(s0)                                             <== NOT EXECUTED
40004050:   4ac000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
        return RTEMS_NO_MEMORY;                                                           
40004054:   f85ff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
    uint32_t blocks = 0;                                                                  
40004058:   00000a13            li  s4,0                                                  <== NOT EXECUTED
4000405c:   e15ff06f            j   40003e70 <rtems_fdisk_initialize+0x1bc>               <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
40004060:   07842503            lw  a0,120(s0)                                            <== NOT EXECUTED
      return RTEMS_NO_MEMORY;                                                             
40004064:   00048c93            mv  s9,s1                                                 <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
40004068:   494000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->blocks);                                                                  
4000406c:   01842503            lw  a0,24(s0)                                             <== NOT EXECUTED
40004070:   48c000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->devices);                                                                 
40004074:   02c42503            lw  a0,44(s0)                                             <== NOT EXECUTED
40004078:   484000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      rtems_fdisk_error ("disk create phy failed");                                       
4000407c:   4002c537            lui a0,0x4002c                                            <== NOT EXECUTED
40004080:   f8850513            addi    a0,a0,-120 # 4002bf88 <__func__.6+0xac0>          <== NOT EXECUTED
40004084:   f28fd0ef            jal ra,400017ac <rtems_fdisk_error>                       <== NOT EXECUTED
      return sc;                                                                          
40004088:   f51ff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
      unlink (name);                                                                      
4000408c:   01410513            addi    a0,sp,20                                          <== NOT EXECUTED
40004090:   0d9020ef            jal ra,40006968 <unlink>                                  <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
40004094:   07842503            lw  a0,120(s0)                                            <== NOT EXECUTED
      return ret;                                                                         
40004098:   000d8493            mv  s1,s11                                                <== NOT EXECUTED
      return RTEMS_NO_MEMORY;                                                             
4000409c:   00048c93            mv  s9,s1                                                 <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
400040a0:   45c000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->blocks);                                                                  
400040a4:   01842503            lw  a0,24(s0)                                             <== NOT EXECUTED
400040a8:   454000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->devices);                                                                 
400040ac:   02c42503            lw  a0,44(s0)                                             <== NOT EXECUTED
400040b0:   44c000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      rtems_fdisk_error ("recovery of disk failed: %s (%d)",                              
400040b4:   000d8513            mv  a0,s11                                                <== NOT EXECUTED
400040b8:   7951d0ef            jal ra,4002204c <strerror>                                <== NOT EXECUTED
400040bc:   00050593            mv  a1,a0                                                 <== NOT EXECUTED
400040c0:   4002c537            lui a0,0x4002c                                            <== NOT EXECUTED
400040c4:   000d8613            mv  a2,s11                                                <== NOT EXECUTED
400040c8:   fa050513            addi    a0,a0,-96 # 4002bfa0 <__func__.6+0xad8>           <== NOT EXECUTED
400040cc:   ee0fd0ef            jal ra,400017ac <rtems_fdisk_error>                       <== NOT EXECUTED
      return ret;                                                                         
400040d0:   f09ff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
      unlink (name);                                                                      
400040d4:   01410513            addi    a0,sp,20                                          <== NOT EXECUTED
400040d8:   091020ef            jal ra,40006968 <unlink>                                  <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
400040dc:   07842503            lw  a0,120(s0)                                            <== NOT EXECUTED
      return ret;                                                                         
400040e0:   000d8493            mv  s1,s11                                                <== NOT EXECUTED
      return RTEMS_NO_MEMORY;                                                             
400040e4:   00048c93            mv  s9,s1                                                 <== NOT EXECUTED
      free (fd->copy_buffer);                                                             
400040e8:   414000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->blocks);                                                                  
400040ec:   01842503            lw  a0,24(s0)                                             <== NOT EXECUTED
400040f0:   40c000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      free (fd->devices);                                                                 
400040f4:   02c42503            lw  a0,44(s0)                                             <== NOT EXECUTED
400040f8:   404000ef            jal ra,400044fc <free>                                    <== NOT EXECUTED
      rtems_fdisk_error ("compacting of disk failed: %s (%d)",                            
400040fc:   000d8513            mv  a0,s11                                                <== NOT EXECUTED
40004100:   74d1d0ef            jal ra,4002204c <strerror>                                <== NOT EXECUTED
40004104:   00050593            mv  a1,a0                                                 <== NOT EXECUTED
40004108:   4002c537            lui a0,0x4002c                                            <== NOT EXECUTED
4000410c:   000d8613            mv  a2,s11                                                <== NOT EXECUTED
40004110:   fc450513            addi    a0,a0,-60 # 4002bfc4 <__func__.6+0xafc>           <== NOT EXECUTED
40004114:   e98fd0ef            jal ra,400017ac <rtems_fdisk_error>                       <== NOT EXECUTED
      return ret;                                                                         
40004118:   ec1ff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
    return RTEMS_NO_MEMORY;                                                               
4000411c:   01a00c93            li  s9,26                                                 <== NOT EXECUTED
40004120:   eb9ff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
      return RTEMS_NO_MEMORY;                                                             
40004124:   01a00493            li  s1,26                                                 <== NOT EXECUTED
40004128:   00048c93            mv  s9,s1                                                 <== NOT EXECUTED
4000412c:   eadff06f            j   40003fd8 <rtems_fdisk_initialize+0x324>               <== NOT EXECUTED
                                                                                          

400023f4 <rtems_ide_part_table_initialize>: * RTEMS_NO_MEMOTY if cannot have not enough memory, * RTEMS_INTERNAL_ERROR if other error occurs. */ rtems_status_code rtems_ide_part_table_initialize(const char *dev_name) {
400023f4:   fc010113            addi    sp,sp,-64                                         
400023f8:   03312623            sw  s3,44(sp)                                             
    rtems_part_desc_t          *part_desc;                                                
                                                                                          
    /* logical device name /dev/hdxyy */                                                  
    char                        name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];            
                                                                                          
    disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));               
400023fc:   11c00593            li  a1,284                                                
{                                                                                         
40002400:   00050993            mv  s3,a0                                                 
    disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));               
40002404:   00100513            li  a0,1                                                  
{                                                                                         
40002408:   02112e23            sw  ra,60(sp)                                             
4000240c:   02812c23            sw  s0,56(sp)                                             
40002410:   02912a23            sw  s1,52(sp)                                             
40002414:   03212823            sw  s2,48(sp)                                             
40002418:   03412423            sw  s4,40(sp)                                             
4000241c:   03512223            sw  s5,36(sp)                                             
40002420:   03612023            sw  s6,32(sp)                                             
40002424:   01712e23            sw  s7,28(sp)                                             
40002428:   01812c23            sw  s8,24(sp)                                             
    disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));               
4000242c:   458000ef            jal ra,40002884 <calloc>                                  
    if (disk_desc == NULL)                                                                
40002430:   0e050c63            beqz    a0,40002528 <rtems_ide_part_table_initialize+0x134><== NEVER TAKEN
    {                                                                                     
        return RTEMS_NO_MEMORY;                                                           
    }                                                                                     
                                                                                          
    /* get partition table */                                                             
    rc = partition_table_get(dev_name, disk_desc);                                        
40002434:   00050593            mv  a1,a0                                                 
40002438:   00050a93            mv  s5,a0                                                 
4000243c:   00098513            mv  a0,s3                                                 
40002440:   d8dff0ef            jal ra,400021cc <partition_table_get>                     
40002444:   00050b93            mv  s7,a0                                                 
    if (rc != RTEMS_SUCCESSFUL)                                                           
40002448:   0a051263            bnez    a0,400024ec <rtems_ide_part_table_initialize+0xf8><== NEVER TAKEN
        free(disk_desc);                                                                  
        return rc;                                                                        
    }                                                                                     
                                                                                          
    /* create logical disks on the physical one */                                        
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)                     
4000244c:   01caa783            lw  a5,28(s5)                                             
40002450:   020a8a13            addi    s4,s5,32                                          
40002454:   08f05263            blez    a5,400024d8 <rtems_ide_part_table_initialize+0xe4><== NEVER TAKEN
40002458:   000a0493            mv  s1,s4                                                 
4000245c:   00000413            li  s0,0                                                  
40002460:   4001fb37            lui s6,0x4001f                                            
                                                                                          
        rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start,              
                                           part_desc->size);                              
        if (rc != RTEMS_SUCCESSFUL)                                                       
        {                                                                                 
            fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);         
40002464:   4001fc37            lui s8,0x4001f                                            
40002468:   0100006f            j   40002478 <rtems_ide_part_table_initialize+0x84>       
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)                     
4000246c:   01caa783            lw  a5,28(s5)                                             
40002470:   00448493            addi    s1,s1,4                                           
40002474:   06f45263            bge s0,a5,400024d8 <rtems_ide_part_table_initialize+0xe4> 
        sprintf(name, "%s%d", dev_name, part_num + 1);                                    
40002478:   00140413            addi    s0,s0,1                                           
4000247c:   8e4b0593            addi    a1,s6,-1820 # 4001e8e4 <rtems_blkdev_imfs_node+0x40>
40002480:   00040693            mv  a3,s0                                                 
40002484:   00098613            mv  a2,s3                                                 
40002488:   00010513            mv  a0,sp                                                 
4000248c:   465120ef            jal ra,400150f0 <sprintf>                                 
        part_desc = disk_desc->partitions[part_num];                                      
40002490:   0004a783            lw  a5,0(s1)                                              
        rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start,              
40002494:   00098593            mv  a1,s3                                                 
40002498:   00010513            mv  a0,sp                                                 
        if (part_desc == NULL)                                                            
4000249c:   fc0788e3            beqz    a5,4000246c <rtems_ide_part_table_initialize+0x78>
        rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start,              
400024a0:   0087a683            lw  a3,8(a5)                                              
400024a4:   0047a603            lw  a2,4(a5)                                              
400024a8:   f1cff0ef            jal ra,40001bc4 <rtems_blkdev_create_partition>           
400024ac:   00050913            mv  s2,a0                                                 
        if (rc != RTEMS_SUCCESSFUL)                                                       
400024b0:   fa050ee3            beqz    a0,4000246c <rtems_ide_part_table_initialize+0x78><== ALWAYS TAKEN
            fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);         
400024b4:   8c4fe0ef            jal ra,40000578 <__getreent>                              <== NOT EXECUTED
400024b8:   00852503            lw  a0,8(a0)                                              <== NOT EXECUTED
400024bc:   00090693            mv  a3,s2                                                 <== NOT EXECUTED
400024c0:   00010613            mv  a2,sp                                                 <== NOT EXECUTED
400024c4:   8ecc0593            addi    a1,s8,-1812 # 4001e8ec <rtems_blkdev_imfs_node+0x48><== NOT EXECUTED
400024c8:   4a0120ef            jal ra,40014968 <fprintf>                                 <== NOT EXECUTED
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)                     
400024cc:   01caa783            lw  a5,28(s5)                                             <== NOT EXECUTED
400024d0:   00448493            addi    s1,s1,4                                           <== NOT EXECUTED
400024d4:   faf442e3            blt s0,a5,40002478 <rtems_ide_part_table_initialize+0x84> <== NOT EXECUTED
400024d8:   030a8493            addi    s1,s5,48                                          
        partition_free(disk_desc->partitions[part_num]);                                  
400024dc:   000a2503            lw  a0,0(s4)                                              
    for (part_num = 0;                                                                    
400024e0:   004a0a13            addi    s4,s4,4                                           
        partition_free(disk_desc->partitions[part_num]);                                  
400024e4:   9adff0ef            jal ra,40001e90 <partition_free>                          
    for (part_num = 0;                                                                    
400024e8:   fe9a1ae3            bne s4,s1,400024dc <rtems_ide_part_table_initialize+0xe8> 
    free(disk_desc);                                                                      
400024ec:   000a8513            mv  a0,s5                                                 
400024f0:   5c0000ef            jal ra,40002ab0 <free>                                    
    }                                                                                     
                                                                                          
    partition_table_free(disk_desc);                                                      
                                                                                          
    return RTEMS_SUCCESSFUL;                                                              
}                                                                                         
400024f4:   03c12083            lw  ra,60(sp)                                             
400024f8:   03812403            lw  s0,56(sp)                                             
400024fc:   03412483            lw  s1,52(sp)                                             
40002500:   03012903            lw  s2,48(sp)                                             
40002504:   02c12983            lw  s3,44(sp)                                             
40002508:   02812a03            lw  s4,40(sp)                                             
4000250c:   02412a83            lw  s5,36(sp)                                             
40002510:   02012b03            lw  s6,32(sp)                                             
40002514:   01812c03            lw  s8,24(sp)                                             
40002518:   000b8513            mv  a0,s7                                                 
4000251c:   01c12b83            lw  s7,28(sp)                                             
40002520:   04010113            addi    sp,sp,64                                          
40002524:   00008067            ret                                                       
        return RTEMS_NO_MEMORY;                                                           
40002528:   01a00b93            li  s7,26                                                 <== NOT EXECUTED
4000252c:   fc9ff06f            j   400024f4 <rtems_ide_part_table_initialize+0x100>      <== NOT EXECUTED
                                                                                          

400011d0 <rtems_sparse_disk_create_and_register>: {
400011d0:   fe010113            addi    sp,sp,-32                                         
400011d4:   00912a23            sw  s1,20(sp)                                             
400011d8:   00060493            mv  s1,a2                                                 
                                + key_table_size + data_size;                             
400011dc:   00858613            addi    a2,a1,8                                           
400011e0:   02960633            mul a2,a2,s1                                              
{                                                                                         
400011e4:   01212823            sw  s2,16(sp)                                             
400011e8:   00050913            mv  s2,a0                                                 
400011ec:   00812c23            sw  s0,24(sp)                                             
400011f0:   01312623            sw  s3,12(sp)                                             
400011f4:   01412423            sw  s4,8(sp)                                              
400011f8:   00112e23            sw  ra,28(sp)                                             
400011fc:   00058413            mv  s0,a1                                                 
40001200:   00068993            mv  s3,a3                                                 
40001204:   00070a13            mv  s4,a4                                                 
  rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(                             
40001208:   02c60513            addi    a0,a2,44                                          
4000120c:   654000ef            jal ra,40001860 <malloc>                                  
  if ( sparse_disk != NULL ) {                                                            
40001210:   04050263            beqz    a0,40001254 <rtems_sparse_disk_create_and_register+0x84><== NEVER TAKEN
    sc = rtems_sparse_disk_register(                                                      
40001214:   00040613            mv  a2,s0                                                 
}                                                                                         
40001218:   01812403            lw  s0,24(sp)                                             
4000121c:   01c12083            lw  ra,28(sp)                                             
40001220:   00050593            mv  a1,a0                                                 
    sc = rtems_sparse_disk_register(                                                      
40001224:   000a0793            mv  a5,s4                                                 
40001228:   00098713            mv  a4,s3                                                 
}                                                                                         
4000122c:   00812a03            lw  s4,8(sp)                                              
40001230:   00c12983            lw  s3,12(sp)                                             
    sc = rtems_sparse_disk_register(                                                      
40001234:   00048693            mv  a3,s1                                                 
40001238:   00090513            mv  a0,s2                                                 
}                                                                                         
4000123c:   01412483            lw  s1,20(sp)                                             
40001240:   01012903            lw  s2,16(sp)                                             
    sc = rtems_sparse_disk_register(                                                      
40001244:   40001837            lui a6,0x40001                                            
40001248:   ddc80813            addi    a6,a6,-548 # 40000ddc <rtems_sparse_disk_free>    
}                                                                                         
4000124c:   02010113            addi    sp,sp,32                                          
    sc = rtems_sparse_disk_register(                                                      
40001250:   e31ff06f            j   40001080 <rtems_sparse_disk_register>                 
}                                                                                         
40001254:   01c12083            lw  ra,28(sp)                                             <== NOT EXECUTED
40001258:   01812403            lw  s0,24(sp)                                             <== NOT EXECUTED
4000125c:   01412483            lw  s1,20(sp)                                             <== NOT EXECUTED
40001260:   01012903            lw  s2,16(sp)                                             <== NOT EXECUTED
40001264:   00c12983            lw  s3,12(sp)                                             <== NOT EXECUTED
40001268:   00812a03            lw  s4,8(sp)                                              <== NOT EXECUTED
4000126c:   01a00513            li  a0,26                                                 <== NOT EXECUTED
40001270:   02010113            addi    sp,sp,32                                          <== NOT EXECUTED
40001274:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40001080 <rtems_sparse_disk_register>: uint8_t fill_pattern, rtems_sparse_disk_delete_handler sparse_disk_delete ) { rtems_status_code sc; if ( blocks_with_buffer <= media_block_count ) {
40001080:   00d77663            bgeu    a4,a3,4000108c <rtems_sparse_disk_register+0xc>   
        sparse_disk_ioctl,                                                                
        sparse_disk                                                                       
      );                                                                                  
    }                                                                                     
  } else {                                                                                
    sc = RTEMS_INVALID_NUMBER;                                                            
40001084:   00a00513            li  a0,10                                                 <== NOT EXECUTED
  }                                                                                       
                                                                                          
  return sc;                                                                              
}                                                                                         
40001088:   00008067            ret                                                       <== NOT EXECUTED
{                                                                                         
4000108c:   fd010113            addi    sp,sp,-48                                         
40001090:   02912223            sw  s1,36(sp)                                             
40001094:   02112623            sw  ra,44(sp)                                             
40001098:   02812423            sw  s0,40(sp)                                             
4000109c:   03212023            sw  s2,32(sp)                                             
400010a0:   01312e23            sw  s3,28(sp)                                             
400010a4:   01412c23            sw  s4,24(sp)                                             
400010a8:   01512a23            sw  s5,20(sp)                                             
400010ac:   01612823            sw  s6,16(sp)                                             
400010b0:   01712623            sw  s7,12(sp)                                             
400010b4:   01812423            sw  s8,8(sp)                                              
400010b8:   00058493            mv  s1,a1                                                 
  if ( NULL == sd )                                                                       
400010bc:   0e058063            beqz    a1,4000119c <rtems_sparse_disk_register+0x11c>    <== NEVER TAKEN
  size_t const key_table_size = blocks_with_buffer                                        
400010c0:   00369a13            slli    s4,a3,0x3                                         
  memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );                        
400010c4:   02ca0413            addi    s0,s4,44                                          
400010c8:   00060913            mv  s2,a2                                                 
400010cc:   00000593            li  a1,0                                                  
400010d0:   00040613            mv  a2,s0                                                 
400010d4:   00050b93            mv  s7,a0                                                 
400010d8:   00048513            mv  a0,s1                                                 
400010dc:   00078b13            mv  s6,a5                                                 
400010e0:   00068993            mv  s3,a3                                                 
400010e4:   00070a93            mv  s5,a4                                                 
400010e8:   00080c13            mv  s8,a6                                                 
400010ec:   0851a0ef            jal ra,4001b970 <memset>                                  
  memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),            
400010f0:   03298633            mul a2,s3,s2                                              
400010f4:   00848433            add s0,s1,s0                                              
  sd->fill_pattern = fill_pattern;                                                        
400010f8:   03648223            sb  s6,36(s1)                                             
  memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),            
400010fc:   000b0593            mv  a1,s6                                                 
40001100:   00040513            mv  a0,s0                                                 
40001104:   06d1a0ef            jal ra,4001b970 <memset>                                  
static __inline void                                                                      
_Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name)                 
{                                                                                         
    struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name);                        
                                                                                          
    *_mutex = _init;                                                                      
40001108:   400257b7            lui a5,0x40025                                            
  data                  += sizeof( rtems_sparse_disk );                                   
4000110c:   02c48713            addi    a4,s1,44                                          
40001110:   59478793            addi    a5,a5,1428 # 40025594 <test_state_strings+0x14>   
  sd->delete_handler = sparse_disk_delete;                                                
40001114:   0384a023            sw  s8,32(s1)                                             
40001118:   0004a023            sw  zero,0(s1)                                            
4000111c:   0004a223            sw  zero,4(s1)                                            
40001120:   0004a423            sw  zero,8(s1)                                            
40001124:   0004a623            sw  zero,12(s1)                                           
40001128:   00f4a823            sw  a5,16(s1)                                             
  sd->blocks_with_buffer = blocks_with_buffer;                                            
4000112c:   0134aa23            sw  s3,20(s1)                                             
  sd->key_table          = (rtems_sparse_disk_key *) data;                                
40001130:   02e4a423            sw  a4,40(s1)                                             
  for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {                  
40001134:   00098e63            beqz    s3,40001150 <rtems_sparse_disk_register+0xd0>     <== NEVER TAKEN
40001138:   00048793            mv  a5,s1                                                 
4000113c:   009a06b3            add a3,s4,s1                                              
    sd->key_table[i].data = data;                                                         
40001140:   0287a823            sw  s0,48(a5)                                             
  for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {                  
40001144:   00878793            addi    a5,a5,8                                           
40001148:   01240433            add s0,s0,s2                                              
4000114c:   fef69ae3            bne a3,a5,40001140 <rtems_sparse_disk_register+0xc0>      
}                                                                                         
40001150:   02812403            lw  s0,40(sp)                                             
  sd->media_block_size = media_block_size;                                                
40001154:   0124ae23            sw  s2,28(s1)                                             
}                                                                                         
40001158:   02c12083            lw  ra,44(sp)                                             
4000115c:   01c12983            lw  s3,28(sp)                                             
40001160:   01812a03            lw  s4,24(sp)                                             
40001164:   01012b03            lw  s6,16(sp)                                             
40001168:   00812c03            lw  s8,8(sp)                                              
      sc = rtems_blkdev_create(                                                           
4000116c:   00048713            mv  a4,s1                                                 
40001170:   000a8613            mv  a2,s5                                                 
}                                                                                         
40001174:   02412483            lw  s1,36(sp)                                             
40001178:   01412a83            lw  s5,20(sp)                                             
      sc = rtems_blkdev_create(                                                           
4000117c:   00090593            mv  a1,s2                                                 
40001180:   000b8513            mv  a0,s7                                                 
}                                                                                         
40001184:   02012903            lw  s2,32(sp)                                             
40001188:   00c12b83            lw  s7,12(sp)                                             
      sc = rtems_blkdev_create(                                                           
4000118c:   400016b7            lui a3,0x40001                                            
40001190:   de068693            addi    a3,a3,-544 # 40000de0 <sparse_disk_ioctl>         
}                                                                                         
40001194:   03010113            addi    sp,sp,48                                          
      sc = rtems_blkdev_create(                                                           
40001198:   0cd0a06f            j   4000ba64 <rtems_blkdev_create>                        
}                                                                                         
4000119c:   02c12083            lw  ra,44(sp)                                             <== NOT EXECUTED
400011a0:   02812403            lw  s0,40(sp)                                             <== NOT EXECUTED
400011a4:   02412483            lw  s1,36(sp)                                             <== NOT EXECUTED
400011a8:   02012903            lw  s2,32(sp)                                             <== NOT EXECUTED
400011ac:   01c12983            lw  s3,28(sp)                                             <== NOT EXECUTED
400011b0:   01812a03            lw  s4,24(sp)                                             <== NOT EXECUTED
400011b4:   01412a83            lw  s5,20(sp)                                             <== NOT EXECUTED
400011b8:   01012b03            lw  s6,16(sp)                                             <== NOT EXECUTED
400011bc:   00c12b83            lw  s7,12(sp)                                             <== NOT EXECUTED
400011c0:   00812c03            lw  s8,8(sp)                                              <== NOT EXECUTED
    return RTEMS_INVALID_ADDRESS;                                                         
400011c4:   00900513            li  a0,9                                                  <== NOT EXECUTED
}                                                                                         
400011c8:   03010113            addi    sp,sp,48                                          <== NOT EXECUTED
400011cc:   00008067            ret                                                       <== NOT EXECUTED