RTEMS-5
Annotated Report
Fri Aug 10 13:55:02 2018

40018cc0 <ramdisk_allocate>:
                                         
  void *area_begin,
                                                  
  uint32_t media_block_size,
                                         
  rtems_blkdev_bnum media_block_count,
                               
  bool trace
                                                         
)
                                                                    
{
                                                                    
40018cc0:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  struct ramdisk *rd = calloc(1, sizeof(*rd));
                       
40018cc4:	92 10 20 10 	mov  0x10, %o1
                                
40018cc8:	7f ff b5 a4 	call  40006358 <calloc>
                       
40018ccc:	90 10 20 01 	mov  1, %o0
                                   

                                                                     
  if (rd == NULL) {
                                                  
40018cd0:	ba 92 20 00 	orcc  %o0, 0, %i5
                             
40018cd4:	02 80 00 0b 	be  40018d00 <ramdisk_allocate+0x40>
          <== NEVER TAKEN
40018cd8:	80 a6 20 00 	cmp  %i0, 0
                                   
    return NULL;
                                                     
  }
                                                                  

                                                                     
  if (area_begin == NULL) {
                                          
40018cdc:	02 80 00 0b 	be  40018d08 <ramdisk_allocate+0x48>
          <== ALWAYS TAKEN
40018ce0:	92 10 00 19 	mov  %i1, %o1
                                 

                                                                     
      return NULL;
                                                   
    }
                                                                
    rd->malloced = true;
                                             
  } else {
                                                           
    rd->malloced = false;
                                            
40018ce4:	c0 2f 60 0d 	clrb  [ %i5 + 0xd ]
                           <== NOT EXECUTED
  }
                                                                  
  rd->block_size = media_block_size;
                                 
  rd->block_num = media_block_count;
                                 
  rd->area = area_begin;
                                             
  rd->trace = trace;
                                                 
  rd->initialized = true;
                                            
40018ce8:	82 10 20 01 	mov  1, %g1
                                   <== NOT EXECUTED
  rd->block_size = media_block_size;
                                 
40018cec:	f2 27 40 00 	st  %i1, [ %i5 ]
                              
  rd->block_num = media_block_count;
                                 
40018cf0:	f4 27 60 04 	st  %i2, [ %i5 + 4 ]
                          
  rd->area = area_begin;
                                             
40018cf4:	f0 27 60 08 	st  %i0, [ %i5 + 8 ]
                          
  rd->trace = trace;
                                                 
40018cf8:	f6 2f 60 0e 	stb  %i3, [ %i5 + 0xe ]
                       
  rd->initialized = true;
                                            
40018cfc:	c2 2f 60 0c 	stb  %g1, [ %i5 + 0xc ]
                       

                                                                     
  return rd;
                                                         
}
                                                                    
40018d00:	81 c7 e0 08 	ret 
                                          
40018d04:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        
    area_begin = calloc(media_block_count, media_block_size);
        
40018d08:	7f ff b5 94 	call  40006358 <calloc>
                       
40018d0c:	90 10 00 1a 	mov  %i2, %o0
                                 
    if (area_begin == NULL) {
                                        
40018d10:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
40018d14:	02 80 00 04 	be  40018d24 <ramdisk_allocate+0x64>
          <== NEVER TAKEN
40018d18:	82 10 20 01 	mov  1, %g1
                                   
40018d1c:	10 bf ff f4 	b  40018cec <ramdisk_allocate+0x2c>
           
40018d20:	c2 2f 60 0d 	stb  %g1, [ %i5 + 0xd ]
                       
      free(rd);
                                                      
40018d24:	90 10 00 1d 	mov  %i5, %o0
                                 <== NOT EXECUTED
40018d28:	7f ff b6 2c 	call  400065d8 <free>
                         <== NOT EXECUTED
40018d2c:	ba 10 20 00 	clr  %i5
                                      <== NOT EXECUTED
      return NULL;
                                                   
40018d30:	30 bf ff f4 	b,a   40018d00 <ramdisk_allocate+0x40>
        <== NOT EXECUTED

                                                                     

4000fb04 <ramdisk_free>: return rd; } void ramdisk_free(ramdisk *rd) {
4000fb04:	9d e3 bf a0 	save  %sp, -96, %sp
                           <== NOT EXECUTED
  if (rd != NULL) {
                                                  
4000fb08:	80 a6 20 00 	cmp  %i0, 0
                                   <== NOT EXECUTED
4000fb0c:	02 80 00 0c 	be  4000fb3c <ramdisk_free+0x38>
              <== NOT EXECUTED
4000fb10:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
    if (rd->malloced) {
                                              
4000fb14:	c2 0e 20 0d 	ldub  [ %i0 + 0xd ], %g1
                      <== NOT EXECUTED
4000fb18:	80 a0 60 00 	cmp  %g1, 0
                                   <== NOT EXECUTED
4000fb1c:	12 80 00 04 	bne  4000fb2c <ramdisk_free+0x28>
             <== NOT EXECUTED
4000fb20:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
      free(rd->area);
                                                
    }
                                                                
    free(rd);
                                                        
4000fb24:	7f ff dd 97 	call  40007180 <free>
                         <== NOT EXECUTED
4000fb28:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
      free(rd->area);
                                                
4000fb2c:	7f ff dd 95 	call  40007180 <free>
                         <== NOT EXECUTED
4000fb30:	d0 06 20 08 	ld  [ %i0 + 8 ], %o0
                          <== NOT EXECUTED
    free(rd);
                                                        
4000fb34:	7f ff dd 93 	call  40007180 <free>
                         <== NOT EXECUTED
4000fb38:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
  }
                                                                  
}
                                                                    
4000fb3c:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000fb40:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
	...
                                                                 

                                                                     

4000f858 <ramdisk_initialize>: rtems_device_driver ramdisk_initialize( rtems_device_major_number major, rtems_device_minor_number minor RTEMS_UNUSED, void *arg RTEMS_UNUSED) {
4000f858:	9d e3 bf 80 	save  %sp, -128, %sp
                          
    rtems_device_minor_number i;
                                     
    rtems_ramdisk_config *c = rtems_ramdisk_configuration;
           
    struct ramdisk *r;
                                               
    rtems_status_code rc;
                                            

                                                                     
    rc = rtems_disk_io_initialize();
                                 
4000f85c:	7f ff d5 e2 	call  40004fe4 <rtems_disk_io_initialize>
     
4000f860:	01 00 00 00 	nop 
                                          
    if (rc != RTEMS_SUCCESSFUL)
                                      
4000f864:	80 a2 20 00 	cmp  %o0, 0
                                   
4000f868:	02 80 00 04 	be  4000f878 <ramdisk_initialize+0x20>
        <== ALWAYS TAKEN
4000f86c:	33 10 00 94 	sethi  %hi(0x40025000), %i1
                   
            }
                                                        
            r->initialized = false;
                                  
        }
                                                            
    }
                                                                
    return RTEMS_SUCCESSFUL;
                                         
}
                                                                    
4000f870:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000f874:	91 e8 00 08 	restore  %g0, %o0, %o0
                        <== NOT EXECUTED
    r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));

4000f878:	f8 06 60 84 	ld  [ %i1 + 0x84 ], %i4
                       
4000f87c:	92 10 20 10 	mov  0x10, %o1
                                
4000f880:	7f ff dd bb 	call  40006f6c <calloc>
                       
4000f884:	90 10 00 1c 	mov  %i4, %o0
                                 
    r->trace = false;
                                                
4000f888:	c0 2a 20 0e 	clrb  [ %o0 + 0xe ]
                           
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
 
4000f88c:	80 a7 20 00 	cmp  %i4, 0
                                   
4000f890:	02 80 00 32 	be  4000f958 <ramdisk_initialize+0x100>
       <== NEVER TAKEN
4000f894:	ba 10 00 08 	mov  %o0, %i5
                                 
    rtems_ramdisk_config *c = rtems_ramdisk_configuration;
           
4000f898:	39 10 00 94 	sethi  %hi(0x40025000), %i4
                   
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";
                 
4000f89c:	21 0b d9 19 	sethi  %hi(0x2f646400), %l0
                   
4000f8a0:	23 0b dc 99 	sethi  %hi(0x2f726400), %l1
                   
        rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,

4000f8a4:	25 10 00 3e 	sethi  %hi(0x4000f800), %l2
                   
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
 
4000f8a8:	b4 10 20 61 	mov  0x61, %i2
                                
    rtems_ramdisk_config *c = rtems_ramdisk_configuration;
           
4000f8ac:	b8 17 20 88 	or  %i4, 0x88, %i4
                            
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
 
4000f8b0:	b6 10 20 00 	clr  %i3
                                      
4000f8b4:	b2 16 60 84 	or  %i1, 0x84, %i1
                            
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";
                 
4000f8b8:	a0 14 21 76 	or  %l0, 0x176, %l0
                           
4000f8bc:	a2 14 60 61 	or  %l1, 0x61, %l1
                            
        rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,

4000f8c0:	a8 07 bf f0 	add  %fp, -16, %l4
                            
4000f8c4:	a4 14 a1 a0 	or  %l2, 0x1a0, %l2
                           
            r->initialized = true;
                                   
4000f8c8:	a6 10 20 01 	mov  1, %l3
                                   
        r->block_size = c->block_size;
                               
4000f8cc:	d4 07 00 00 	ld  [ %i4 ], %o2
                              
        r->block_num = c->block_num;
                                 
4000f8d0:	d6 07 20 04 	ld  [ %i4 + 4 ], %o3
                          
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";
                 
4000f8d4:	e0 3f bf f0 	std  %l0, [ %fp + -16 ]
                       
        name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;
            
4000f8d8:	f4 2f bf f7 	stb  %i2, [ %fp + -9 ]
                        
        r->block_size = c->block_size;
                               
4000f8dc:	d4 27 40 00 	st  %o2, [ %i5 ]
                              
        r->block_num = c->block_num;
                                 
4000f8e0:	d6 27 60 04 	st  %o3, [ %i5 + 4 ]
                          
        char name [] = RAMDISK_DEVICE_BASE_NAME "a";
                 
4000f8e4:	c0 2f bf f8 	clrb  [ %fp + -8 ]
                            
        if (c->location == NULL)
                                     
4000f8e8:	c2 07 20 08 	ld  [ %i4 + 8 ], %g1
                          
4000f8ec:	80 a0 60 00 	cmp  %g1, 0
                                   
4000f8f0:	22 80 00 21 	be,a   4000f974 <ramdisk_initialize+0x11c>
    
4000f8f4:	e6 2f 60 0d 	stb  %l3, [ %i5 + 0xd ]
                       
            r->malloced = false;
                                     
4000f8f8:	c0 2f 60 0d 	clrb  [ %i5 + 0xd ]
                           
            r->initialized = true;
                                   
4000f8fc:	e6 2f 60 0c 	stb  %l3, [ %i5 + 0xc ]
                       
            r->area = c->location;
                                   
4000f900:	c2 27 60 08 	st  %g1, [ %i5 + 8 ]
                          
        rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,

4000f904:	9a 10 00 1d 	mov  %i5, %o5
                                 
4000f908:	e8 23 a0 5c 	st  %l4, [ %sp + 0x5c ]
                       
4000f90c:	92 10 00 1b 	mov  %i3, %o1
                                 
4000f910:	98 10 00 12 	mov  %l2, %o4
                                 
4000f914:	7f ff d4 fd 	call  40004d08 <rtems_disk_create_phys>
       
4000f918:	90 10 00 18 	mov  %i0, %o0
                                 
        if (rc != RTEMS_SUCCESSFUL)
                                  
4000f91c:	80 a2 20 00 	cmp  %o0, 0
                                   
4000f920:	22 80 00 08 	be,a   4000f940 <ramdisk_initialize+0xe8>
     <== ALWAYS TAKEN
4000f924:	b6 06 e0 01 	inc  %i3
                                      
            if (r->malloced)
                                         
4000f928:	c2 0f 60 0d 	ldub  [ %i5 + 0xd ], %g1
                      <== NOT EXECUTED
4000f92c:	80 a0 60 00 	cmp  %g1, 0
                                   <== NOT EXECUTED
4000f930:	12 80 00 0d 	bne  4000f964 <ramdisk_initialize+0x10c>
      <== NOT EXECUTED
4000f934:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
            r->initialized = false;
                                  
4000f938:	c0 2f 60 0c 	clrb  [ %i5 + 0xc ]
                           <== NOT EXECUTED
    for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
 
4000f93c:	b6 06 e0 01 	inc  %i3
                                      <== NOT EXECUTED
4000f940:	c2 06 40 00 	ld  [ %i1 ], %g1
                              
4000f944:	b8 07 20 0c 	add  %i4, 0xc, %i4
                            
4000f948:	ba 07 60 10 	add  %i5, 0x10, %i5
                           
4000f94c:	80 a0 40 1b 	cmp  %g1, %i3
                                 
4000f950:	18 bf ff df 	bgu  4000f8cc <ramdisk_initialize+0x74>
       
4000f954:	b4 06 a0 01 	inc  %i2
                                      
    return RTEMS_SUCCESSFUL;
                                         
4000f958:	90 10 20 00 	clr  %o0
                                      
}
                                                                    
4000f95c:	81 c7 e0 08 	ret 
                                          
4000f960:	91 e8 00 08 	restore  %g0, %o0, %o0
                        
                free(r->area);
                                       
4000f964:	7f ff de 07 	call  40007180 <free>
                         <== NOT EXECUTED
4000f968:	d0 07 60 08 	ld  [ %i5 + 8 ], %o0
                          <== NOT EXECUTED
            r->initialized = false;
                                  
4000f96c:	10 bf ff f4 	b  4000f93c <ramdisk_initialize+0xe4>
         <== NOT EXECUTED
4000f970:	c0 2f 60 0c 	clrb  [ %i5 + 0xc ]
                           <== NOT EXECUTED
            r->area = malloc(r->block_size * r->block_num);
          
4000f974:	90 5a 80 0b 	smul  %o2, %o3, %o0
                           
4000f978:	d6 27 bf e8 	st  %o3, [ %fp + -24 ]
                        
4000f97c:	7f ff df ed 	call  40007930 <malloc>
                       
4000f980:	d4 27 bf ec 	st  %o2, [ %fp + -20 ]
                        
4000f984:	d0 27 60 08 	st  %o0, [ %i5 + 8 ]
                          
            if (r->area == NULL) /* No enough memory for this disk */

4000f988:	80 a2 20 00 	cmp  %o0, 0
                                   
4000f98c:	d4 07 bf ec 	ld  [ %fp + -20 ], %o2
                        
4000f990:	02 bf ff ea 	be  4000f938 <ramdisk_initialize+0xe0>
        <== NEVER TAKEN
4000f994:	d6 07 bf e8 	ld  [ %fp + -24 ], %o3
                        
4000f998:	10 bf ff db 	b  4000f904 <ramdisk_initialize+0xac>
         
4000f99c:	e6 2f 60 0c 	stb  %l3, [ %i5 + 0xc ]
                       

                                                                     

4000f9a0 <ramdisk_ioctl>: return 0; } int ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) {
4000f9a0:	9d e3 bf a0 	save  %sp, -96, %sp
                           
    struct ramdisk *rd = rtems_disk_get_driver_data(dd);
             

                                                                     
    switch (req)
                                                     
4000f9a4:	03 08 00 10 	sethi  %hi(0x20004000), %g1
                   
{
                                                                    
4000f9a8:	ba 10 00 1a 	mov  %i2, %i5
                                 
    switch (req)
                                                     
4000f9ac:	82 10 62 07 	or  %g1, 0x207, %g1
                           
4000f9b0:	80 a6 40 01 	cmp  %i1, %g1
                                 
4000f9b4:	02 80 00 28 	be  4000fa54 <ramdisk_ioctl+0xb4>
             
4000f9b8:	f6 06 20 3c 	ld  [ %i0 + 0x3c ], %i3
                       
4000f9bc:	03 30 06 10 	sethi  %hi(0xc0184000), %g1
                   
4000f9c0:	82 10 62 01 	or  %g1, 0x201, %g1	! c0184201 <RAM_END+0x7fd84201>

4000f9c4:	80 a6 40 01 	cmp  %i1, %g1
                                 
4000f9c8:	12 80 00 21 	bne  4000fa4c <ramdisk_ioctl+0xac>
            
4000f9cc:	01 00 00 00 	nop 
                                          
    {
                                                                
        case RTEMS_BLKIO_REQUEST:
                                    
        {
                                                            
            rtems_blkdev_request *r = argp;
                          

                                                                     
            switch (r->req)
                                          
4000f9d0:	c2 06 80 00 	ld  [ %i2 ], %g1
                              
4000f9d4:	80 a0 60 00 	cmp  %g1, 0
                                   
4000f9d8:	02 80 00 2f 	be  4000fa94 <ramdisk_ioctl+0xf4>
             
4000f9dc:	80 a0 60 01 	cmp  %g1, 1
                                   
4000f9e0:	12 80 00 27 	bne  4000fa7c <ramdisk_ioctl+0xdc>
            <== NEVER TAKEN
4000f9e4:	01 00 00 00 	nop 
                                          
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
          
4000f9e8:	c2 06 a0 10 	ld  [ %i2 + 0x10 ], %g1
                       
4000f9ec:	f2 06 e0 08 	ld  [ %i3 + 8 ], %i1
                          
4000f9f0:	80 a0 60 00 	cmp  %g1, 0
                                   
4000f9f4:	02 80 00 0f 	be  4000fa30 <ramdisk_ioctl+0x90>
             <== NEVER TAKEN
4000f9f8:	b8 06 a0 18 	add  %i2, 0x18, %i4
                           
4000f9fc:	b4 10 20 00 	clr  %i2
                                      
        memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);

4000fa00:	d0 07 00 00 	ld  [ %i4 ], %o0
                              
4000fa04:	c2 06 c0 00 	ld  [ %i3 ], %g1
                              
4000fa08:	d4 07 20 04 	ld  [ %i4 + 4 ], %o2
                          
4000fa0c:	d2 07 20 08 	ld  [ %i4 + 8 ], %o1
                          
4000fa10:	90 5a 00 01 	smul  %o0, %g1, %o0
                           
4000fa14:	40 00 17 01 	call  40015618 <memcpy>
                       
4000fa18:	90 06 40 08 	add  %i1, %o0, %o0
                            
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
          
4000fa1c:	c2 07 60 10 	ld  [ %i5 + 0x10 ], %g1
                       
4000fa20:	b4 06 a0 01 	inc  %i2
                                      
4000fa24:	80 a6 80 01 	cmp  %i2, %g1
                                 
4000fa28:	0a bf ff f6 	bcs  4000fa00 <ramdisk_ioctl+0x60>
            
4000fa2c:	b8 07 20 10 	add  %i4, 0x10, %i4
                           
  (*req->done)(req, status);
                                         
4000fa30:	c2 07 60 04 	ld  [ %i5 + 4 ], %g1
                          
4000fa34:	92 10 20 00 	clr  %o1
                                      
4000fa38:	90 10 00 1d 	mov  %i5, %o0
                                 
4000fa3c:	9f c0 40 00 	call  %g1
                                     
4000fa40:	b0 10 20 00 	clr  %i0
                                      
            {
                                                        
                case RTEMS_BLKDEV_REQ_READ:
                          
                    return ramdisk_read(rd, r);
                      

                                                                     
                case RTEMS_BLKDEV_REQ_WRITE:
                         
                    return ramdisk_write(rd, r);
                     
4000fa44:	81 c7 e0 08 	ret 
                                          
4000fa48:	81 e8 00 00 	restore 
                                      
              ramdisk_free(rd);
                                      
            }
                                                        
            break;
                                                   

                                                                     
        default:
                                                     
            return rtems_blkdev_ioctl (dd, req, argp);
               
4000fa4c:	40 00 0b df 	call  400129c8 <rtems_blkdev_ioctl>
           
4000fa50:	81 e8 00 00 	restore 
                                      
            if (rd->free_at_delete_request) {
                        
4000fa54:	c2 0e e0 0f 	ldub  [ %i3 + 0xf ], %g1
                      
4000fa58:	80 a0 60 00 	cmp  %g1, 0
                                   
4000fa5c:	12 80 00 22 	bne  4000fae4 <ramdisk_ioctl+0x144>
           <== NEVER TAKEN
4000fa60:	01 00 00 00 	nop 
                                          
            break;
                                                   
    }
                                                                

                                                                     
    errno = EINVAL;
                                                  
4000fa64:	40 00 15 19 	call  40014ec8 <__errno>
                      
4000fa68:	b0 10 3f ff 	mov  -1, %i0	! ffffffff <RAM_END+0xbfbfffff>
  
4000fa6c:	82 10 20 16 	mov  0x16, %g1
                                
4000fa70:	c2 22 00 00 	st  %g1, [ %o0 ]
                              
    return -1;
                                                       
}
                                                                    
4000fa74:	81 c7 e0 08 	ret 
                                          
4000fa78:	81 e8 00 00 	restore 
                                      
                    errno = EINVAL;
                                  
4000fa7c:	40 00 15 13 	call  40014ec8 <__errno>
                      <== NOT EXECUTED
4000fa80:	b0 10 3f ff 	mov  -1, %i0
                                  <== NOT EXECUTED
4000fa84:	82 10 20 16 	mov  0x16, %g1
                                <== NOT EXECUTED
4000fa88:	c2 22 00 00 	st  %g1, [ %o0 ]
                              <== NOT EXECUTED
                    return -1;
                                       
4000fa8c:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000fa90:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
          
4000fa94:	c2 06 a0 10 	ld  [ %i2 + 0x10 ], %g1
                       
4000fa98:	f2 06 e0 08 	ld  [ %i3 + 8 ], %i1
                          
4000fa9c:	80 a0 60 00 	cmp  %g1, 0
                                   
4000faa0:	02 bf ff e4 	be  4000fa30 <ramdisk_ioctl+0x90>
             <== NEVER TAKEN
4000faa4:	b8 06 a0 18 	add  %i2, 0x18, %i4
                           
4000faa8:	b4 10 20 00 	clr  %i2
                                      
        memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);

4000faac:	d2 07 00 00 	ld  [ %i4 ], %o1
                              
4000fab0:	c2 06 c0 00 	ld  [ %i3 ], %g1
                              
4000fab4:	d4 07 20 04 	ld  [ %i4 + 4 ], %o2
                          
4000fab8:	d0 07 20 08 	ld  [ %i4 + 8 ], %o0
                          
4000fabc:	92 5a 40 01 	smul  %o1, %g1, %o1
                           
4000fac0:	40 00 16 d6 	call  40015618 <memcpy>
                       
4000fac4:	92 06 40 09 	add  %i1, %o1, %o1
                            
    for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
          
4000fac8:	c2 07 60 10 	ld  [ %i5 + 0x10 ], %g1
                       
4000facc:	b4 06 a0 01 	inc  %i2
                                      
4000fad0:	80 a6 80 01 	cmp  %i2, %g1
                                 
4000fad4:	0a bf ff f6 	bcs  4000faac <ramdisk_ioctl+0x10c>
           <== NEVER TAKEN
4000fad8:	b8 07 20 10 	add  %i4, 0x10, %i4
                           
4000fadc:	10 bf ff d6 	b  4000fa34 <ramdisk_ioctl+0x94>
              
4000fae0:	c2 07 60 04 	ld  [ %i5 + 4 ], %g1
                          
              ramdisk_free(rd);
                                      
4000fae4:	40 00 00 08 	call  4000fb04 <ramdisk_free>
                 <== NOT EXECUTED
4000fae8:	90 10 00 1b 	mov  %i3, %o0
                                 <== NOT EXECUTED
    errno = EINVAL;
                                                  
4000faec:	40 00 14 f7 	call  40014ec8 <__errno>
                      <== NOT EXECUTED
4000faf0:	b0 10 3f ff 	mov  -1, %i0
                                  <== NOT EXECUTED
4000faf4:	82 10 20 16 	mov  0x16, %g1
                                <== NOT EXECUTED
4000faf8:	c2 22 00 00 	st  %g1, [ %o0 ]
                              <== NOT EXECUTED
}
                                                                    
4000fafc:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000fb00:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED

                                                                     

40036cd8 <ramdisk_ops>: 40036cd8: 00 00 00 00 40 00 40 f4 40 00 41 20 40 00 3e f8 ....@.@.@.A @.>. 40036ce8: 40 00 3f e4 40 00 41 38 0a 0a 2a 2a 2a 20 42 45 @.?.@.A8..*** BE 40036cf8: 47 49 4e 20 4f 46 20 54 45 53 54 20 25 73 20 2a GIN OF TEST %s * 40036d08: 2a 2a 0a 2a 2a 2a 20 54 45 53 54 20 56 45 52 53 **.*** TEST VERS 40036d18: 49 4f 4e 3a 20 25 73 0a 2a 2a 2a 20 54 45 53 54 ION: %s.*** TEST 40036d28: 20 53 54 41 54 45 3a 20 25 73 0a 2a 2a 2a 20 54 STATE: %s.*** T 40036d38: 45 53 54 20 42 55 49 4c 44 3a 20 52 54 45 4d 53 EST BUILD: RTEMS 40036d48: 5f 4e 45 54 57 4f 52 4b 49 4e 47 20 52 54 45 4d _NETWORKING RTEM 40036d58: 53 5f 50 4f 53 49 58 5f 41 50 49 0a 2a 2a 2a 20 S_POSIX_API.*** 40036d68: 54 45 53 54 20 54 4f 4f 4c 53 3a 20 37 2e 33 2e TEST TOOLS: 7.3. 40036d78: 30 20 32 30 31 38 30 31 32 35 20 28 52 54 45 4d 0 20180125 (RTEM 40036d88: 53 20 35 2c 20 52 53 42 20 32 35 66 34 64 62 30 S 5, RSB 25f4db0 40036d98: 39 63 38 35 61 35 32 66 62 31 36 34 30 61 32 39 9c85a52fb1640a29 40036da8: 66 39 62 64 63 32 64 65 38 63 32 37 36 38 39 38 f9bdc2de8c276898 40036db8: 38 2c 20 4e 65 77 6c 69 62 20 33 2e 30 2e 30 29 8, Newlib 3.0.0) 40036dc8: 0a 00 00 00 00 00 00 00 0a 2a 2a 2a 20 45 4e 44 .........*** END 40036dd8: 20 4f 46 20 54 45 53 54 20 25 73 20 2a 2a 2a 0a OF TEST %s ***. 40036de8: 0a 00 00 00 00 00 00 00 45 58 50 45 43 54 45 44 ........EXPECTED 40036df8: 2d 50 41 53 53 00 00 00 45 58 50 45 43 54 45 44 -PASS...EXPECTED 40036e08: 2d 46 41 49 4c 00 00 00 55 53 45 52 5f 49 4e 50 -FAIL...USER_INP 40036e18: 55 54 00 00 00 00 00 00 49 4e 44 45 54 45 52 4d UT......INDETERM 40036e28: 49 4e 41 54 45 00 00 00 42 45 4e 43 48 4d 41 52 INATE...BENCHMAR 40036e38: 4b 00 00 00 K...
4000ec24 <ramdisk_register>: rtems_blkdev_bnum media_block_count, bool trace, const char *disk, dev_t *dev_ptr ) {
4000ec24:	9d e3 bf 90 	save  %sp, -112, %sp
                          
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
  rtems_device_major_number major = 0;
                               
  ramdisk *rd = NULL;
                                                
  dev_t dev = 0;
                                                     

                                                                     
  sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
            
4000ec28:	90 10 20 00 	clr  %o0
                                      
  rtems_device_major_number major = 0;
                               
4000ec2c:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
            
4000ec30:	94 07 bf fc 	add  %fp, -4, %o2
                             
4000ec34:	13 10 00 87 	sethi  %hi(0x40021c00), %o1
                   
  if (sc != RTEMS_SUCCESSFUL) {
                                      
    return RTEMS_UNSATISFIED;
                                        
4000ec38:	ba 10 20 0d 	mov  0xd, %i5
                                 
  sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
            
4000ec3c:	40 00 23 d2 	call  40017b84 <rtems_io_register_driver>
     
4000ec40:	92 12 61 18 	or  %o1, 0x118, %o1
                           
  if (sc != RTEMS_SUCCESSFUL) {
                                      
4000ec44:	80 a2 20 00 	cmp  %o0, 0
                                   
4000ec48:	12 80 00 16 	bne  4000eca0 <ramdisk_register+0x7c>
         <== NEVER TAKEN
4000ec4c:	96 10 00 1a 	mov  %i2, %o3
                                 
  }
                                                                  

                                                                     
  rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);

4000ec50:	94 10 00 19 	mov  %i1, %o2
                                 
4000ec54:	40 00 28 1b 	call  40018cc0 <ramdisk_allocate>
             
4000ec58:	92 10 00 18 	mov  %i0, %o1
                                 
  if (rd == NULL) {
                                                  
4000ec5c:	b4 92 20 00 	orcc  %o0, 0, %i2
                             
4000ec60:	02 80 00 12 	be  4000eca8 <ramdisk_register+0x84>
          <== NEVER TAKEN
4000ec64:	9a 10 00 1a 	mov  %i2, %o5
                                 
    return RTEMS_UNSATISFIED;
                                        
  }
                                                                  

                                                                     
  dev = rtems_filesystem_make_dev_t(major, 0);
                       

                                                                     
  sc = rtems_disk_create_phys(
                                       
4000ec68:	f6 23 a0 5c 	st  %i3, [ %sp + 0x5c ]
                       
  temp.__overlay.major = _major;
                                     
4000ec6c:	f6 07 bf fc 	ld  [ %fp + -4 ], %i3
                         
4000ec70:	96 10 00 19 	mov  %i1, %o3
                                 
4000ec74:	19 10 00 62 	sethi  %hi(0x40018800), %o4
                   
4000ec78:	94 10 00 18 	mov  %i0, %o2
                                 
4000ec7c:	98 13 23 5c 	or  %o4, 0x35c, %o4
                           
4000ec80:	90 10 00 1b 	mov  %i3, %o0
                                 
4000ec84:	7f ff d7 07 	call  400048a0 <rtems_disk_create_phys>
       
4000ec88:	92 10 20 00 	clr  %o1
                                      
    media_block_count,
                                               
    ramdisk_ioctl,
                                                   
    rd,
                                                              
    disk
                                                             
  );
                                                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
4000ec8c:	ba 92 20 00 	orcc  %o0, 0, %i5
                             
4000ec90:	12 80 00 09 	bne  4000ecb4 <ramdisk_register+0x90>
         <== NEVER TAKEN
4000ec94:	01 00 00 00 	nop 
                                          
    rtems_io_unregister_driver(major);
                               

                                                                     
    return RTEMS_UNSATISFIED;
                                        
  }
                                                                  

                                                                     
  *dev_ptr = dev;
                                                    
4000ec98:	f6 27 00 00 	st  %i3, [ %i4 ]
                              
4000ec9c:	c0 27 20 04 	clr  [ %i4 + 4 ]
                              

                                                                     
  return RTEMS_SUCCESSFUL;
                                           
}
                                                                    
4000eca0:	81 c7 e0 08 	ret 
                                          
4000eca4:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        
    rtems_io_unregister_driver(major);
                               
4000eca8:	7f ff e8 85 	call  40008ebc <rtems_io_unregister_driver>
   <== NOT EXECUTED
4000ecac:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         <== NOT EXECUTED
    return RTEMS_UNSATISFIED;
                                        
4000ecb0:	30 bf ff fc 	b,a   4000eca0 <ramdisk_register+0x7c>
        <== NOT EXECUTED
    ramdisk_free(rd);
                                                
4000ecb4:	40 00 28 20 	call  40018d34 <ramdisk_free>
                 <== NOT EXECUTED
4000ecb8:	90 10 00 1a 	mov  %i2, %o0
                                 <== NOT EXECUTED
    rtems_io_unregister_driver(major);
                               
4000ecbc:	7f ff e8 80 	call  40008ebc <rtems_io_unregister_driver>
   <== NOT EXECUTED
4000ecc0:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         <== NOT EXECUTED
    return RTEMS_UNSATISFIED;
                                        
4000ecc4:	10 bf ff f7 	b  4000eca0 <ramdisk_register+0x7c>
           <== NOT EXECUTED
4000ecc8:	ba 10 20 0d 	mov  0xd, %i5
                                 <== NOT EXECUTED

                                                                     

40012168 <rtems_bdbuf_get>: {
40012168:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  _Mutex_Acquire( mutex );
                                           
4001216c:	3b 10 00 99 	sethi  %hi(0x40026400), %i5
                   
40012170:	7f ff e5 ff 	call  4000b96c <_Mutex_Acquire>
               
40012174:	90 17 60 04 	or  %i5, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  if (block < dd->block_count)
                                       
40012178:	c2 06 20 28 	ld  [ %i0 + 0x28 ], %g1
                       
4001217c:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012180:	1a 80 00 2d 	bcc  40012234 <rtems_bdbuf_get+0xcc>
          <== NEVER TAKEN
40012184:	b8 10 20 00 	clr  %i4
                                      
  if (dd->block_to_media_block_shift >= 0)
                           
40012188:	d2 06 20 30 	ld  [ %i0 + 0x30 ], %o1
                       
4001218c:	80 a2 60 00 	cmp  %o1, 0
                                   
40012190:	06 80 00 16 	bl  400121e8 <rtems_bdbuf_get+0x80>
           <== NEVER TAKEN
40012194:	93 2e 40 09 	sll  %i1, %o1, %o1
                            
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;

40012198:	c2 06 20 18 	ld  [ %i0 + 0x18 ], %g1
                       
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
        
4001219c:	90 10 00 18 	mov  %i0, %o0
                                 
400121a0:	7f ff fc 27 	call  4001123c <rtems_bdbuf_get_buffer_for_access>

400121a4:	92 02 40 01 	add  %o1, %g1, %o1
                            
400121a8:	b8 10 00 08 	mov  %o0, %i4
                                 
    switch (bd->state)
                                               
400121ac:	d0 02 20 20 	ld  [ %o0 + 0x20 ], %o0
                       
400121b0:	80 a2 20 02 	cmp  %o0, 2
                                   
400121b4:	02 80 00 1d 	be  40012228 <rtems_bdbuf_get+0xc0>
           
400121b8:	82 10 20 03 	mov  3, %g1
                                   
400121bc:	80 a2 20 07 	cmp  %o0, 7
                                   
400121c0:	12 80 00 23 	bne  4001224c <rtems_bdbuf_get+0xe4>
          
400121c4:	80 a2 20 01 	cmp  %o0, 1
                                   
  bd->state = state;
                                                 
400121c8:	82 10 20 04 	mov  4, %g1
                                   
400121cc:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       
400121d0:	b0 10 20 00 	clr  %i0
                                      
  _Mutex_Release( mutex );
                                           
400121d4:	7f ff e6 02 	call  4000b9dc <_Mutex_Release>
               
400121d8:	90 17 60 04 	or  %i5, 4, %o0
                               
  *bd_ptr = bd;
                                                      
400121dc:	f8 26 80 00 	st  %i4, [ %i2 ]
                              
}
                                                                    
400121e0:	81 c7 e0 08 	ret 
                                          
400121e4:	81 e8 00 00 	restore 
                                      
      ((((uint64_t) block) * dd->block_size) / dd->media_block_size);

400121e8:	d0 06 20 24 	ld  [ %i0 + 0x24 ], %o0
                       <== NOT EXECUTED
400121ec:	d6 06 20 20 	ld  [ %i0 + 0x20 ], %o3
                       <== NOT EXECUTED
400121f0:	92 56 40 08 	umul  %i1, %o0, %o1
                           <== NOT EXECUTED
400121f4:	91 40 00 00 	rd  %y, %o0
                                   <== NOT EXECUTED
400121f8:	40 00 3f 9d 	call  4002206c <__udivdi3>
                    <== NOT EXECUTED
400121fc:	94 10 20 00 	clr  %o2
                                      <== NOT EXECUTED
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;

40012200:	c2 06 20 18 	ld  [ %i0 + 0x18 ], %g1
                       <== NOT EXECUTED
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
        
40012204:	92 02 40 01 	add  %o1, %g1, %o1
                            <== NOT EXECUTED
40012208:	7f ff fc 0d 	call  4001123c <rtems_bdbuf_get_buffer_for_access>
<== NOT EXECUTED
4001220c:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
40012210:	b8 10 00 08 	mov  %o0, %i4
                                 <== NOT EXECUTED
    switch (bd->state)
                                               
40012214:	d0 02 20 20 	ld  [ %o0 + 0x20 ], %o0
                       <== NOT EXECUTED
40012218:	80 a2 20 02 	cmp  %o0, 2
                                   <== NOT EXECUTED
4001221c:	12 bf ff e9 	bne  400121c0 <rtems_bdbuf_get+0x58>
          <== NOT EXECUTED
40012220:	80 a2 20 07 	cmp  %o0, 7
                                   <== NOT EXECUTED
  bd->state = state;
                                                 
40012224:	82 10 20 03 	mov  3, %g1
                                   <== NOT EXECUTED
40012228:	b0 10 20 00 	clr  %i0
                                      
4001222c:	10 bf ff ea 	b  400121d4 <rtems_bdbuf_get+0x6c>
            
40012230:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       
40012234:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
40012238:	7f ff e5 e9 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
4001223c:	b0 10 20 04 	mov  4, %i0
                                   <== NOT EXECUTED
  *bd_ptr = bd;
                                                      
40012240:	f8 26 80 00 	st  %i4, [ %i2 ]
                              <== NOT EXECUTED
}
                                                                    
40012244:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012248:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    switch (bd->state)
                                               
4001224c:	02 80 00 04 	be  4001225c <rtems_bdbuf_get+0xf4>
           <== ALWAYS TAKEN
40012250:	82 10 20 05 	mov  5, %g1
                                   
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2);

40012254:	7f ff f7 ce 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
40012258:	92 10 20 0a 	mov  0xa, %o1
                                 <== NOT EXECUTED
  bd->state = state;
                                                 
4001225c:	b0 10 20 00 	clr  %i0
                                      
40012260:	10 bf ff dd 	b  400121d4 <rtems_bdbuf_get+0x6c>
            
40012264:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       

                                                                     

40012268 <rtems_bdbuf_read>: {
40012268:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  _Mutex_Acquire( mutex );
                                           
4001226c:	37 10 00 99 	sethi  %hi(0x40026400), %i3
                   
40012270:	7f ff e5 bf 	call  4000b96c <_Mutex_Acquire>
               
40012274:	90 16 e0 04 	or  %i3, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  if (block < dd->block_count)
                                       
40012278:	c2 06 20 28 	ld  [ %i0 + 0x28 ], %g1
                       
4001227c:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012280:	1a 80 00 41 	bcc  40012384 <rtems_bdbuf_read+0x11c>
        <== NEVER TAKEN
40012284:	ba 10 00 18 	mov  %i0, %i5
                                 
  if (dd->block_to_media_block_shift >= 0)
                           
40012288:	d2 06 20 30 	ld  [ %i0 + 0x30 ], %o1
                       
4001228c:	80 a2 60 00 	cmp  %o1, 0
                                   
40012290:	06 80 00 27 	bl  4001232c <rtems_bdbuf_read+0xc4>
          <== NEVER TAKEN
40012294:	93 2e 40 09 	sll  %i1, %o1, %o1
                            
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;

40012298:	c2 07 60 18 	ld  [ %i5 + 0x18 ], %g1
                       
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
        
4001229c:	90 10 00 1d 	mov  %i5, %o0
                                 
400122a0:	7f ff fb e7 	call  4001123c <rtems_bdbuf_get_buffer_for_access>

400122a4:	92 02 40 01 	add  %o1, %g1, %o1
                            
400122a8:	b8 10 00 08 	mov  %o0, %i4
                                 
    switch (bd->state)
                                               
400122ac:	d0 02 20 20 	ld  [ %o0 + 0x20 ], %o0
                       
400122b0:	80 a2 20 02 	cmp  %o0, 2
                                   
400122b4:	22 80 00 2e 	be,a   4001236c <rtems_bdbuf_read+0x104>
      
400122b8:	c2 07 60 44 	ld  [ %i5 + 0x44 ], %g1
                       
400122bc:	80 a2 20 07 	cmp  %o0, 7
                                   
400122c0:	12 80 00 38 	bne  400123a0 <rtems_bdbuf_read+0x138>
        
400122c4:	80 a2 20 01 	cmp  %o0, 1
                                   
        ++dd->stats.read_hits;
                                       
400122c8:	c2 07 60 44 	ld  [ %i5 + 0x44 ], %g1
                       
400122cc:	82 00 60 01 	inc  %g1
                                      
400122d0:	c2 27 60 44 	st  %g1, [ %i5 + 0x44 ]
                       
  bd->state = state;
                                                 
400122d4:	82 10 20 04 	mov  4, %g1
                                   
400122d8:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       
400122dc:	b0 10 20 00 	clr  %i0
                                      
  if (bdbuf_cache.read_ahead_task != 0
                               
400122e0:	21 10 00 98 	sethi  %hi(0x40026000), %l0
                   
400122e4:	a0 14 23 dc 	or  %l0, 0x3dc, %l0	! 400263dc <bdbuf_cache>
  
400122e8:	d0 04 20 dc 	ld  [ %l0 + 0xdc ], %o0
                       
400122ec:	80 a2 20 00 	cmp  %o0, 0
                                   
400122f0:	02 80 00 0a 	be  40012318 <rtems_bdbuf_read+0xb0>
          <== ALWAYS TAKEN
400122f4:	01 00 00 00 	nop 
                                          
      && dd->read_ahead.trigger == block
                             
400122f8:	c2 07 60 6c 	ld  [ %i5 + 0x6c ], %g1
                       <== NOT EXECUTED
400122fc:	80 a6 40 01 	cmp  %i1, %g1
                                 <== NOT EXECUTED
40012300:	12 80 00 06 	bne  40012318 <rtems_bdbuf_read+0xb0>
         <== NOT EXECUTED
40012304:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
      && !rtems_bdbuf_is_read_ahead_active (dd))
                     
40012308:	c2 07 60 64 	ld  [ %i5 + 0x64 ], %g1
                       <== NOT EXECUTED
4001230c:	80 a0 60 00 	cmp  %g1, 0
                                   <== NOT EXECUTED
40012310:	22 80 00 4c 	be,a   40012440 <rtems_bdbuf_read+0x1d8>
      <== NOT EXECUTED
40012314:	c2 04 20 e0 	ld  [ %l0 + 0xe0 ], %g1
                       <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
40012318:	7f ff e5 b1 	call  4000b9dc <_Mutex_Release>
               
4001231c:	90 16 e0 04 	or  %i3, 4, %o0
                               
  *bd_ptr = bd;
                                                      
40012320:	f8 26 80 00 	st  %i4, [ %i2 ]
                              
}
                                                                    
40012324:	81 c7 e0 08 	ret 
                                          
40012328:	81 e8 00 00 	restore 
                                      
      ((((uint64_t) block) * dd->block_size) / dd->media_block_size);

4001232c:	d0 06 20 24 	ld  [ %i0 + 0x24 ], %o0
                       <== NOT EXECUTED
40012330:	d6 06 20 20 	ld  [ %i0 + 0x20 ], %o3
                       <== NOT EXECUTED
40012334:	92 56 40 08 	umul  %i1, %o0, %o1
                           <== NOT EXECUTED
40012338:	91 40 00 00 	rd  %y, %o0
                                   <== NOT EXECUTED
4001233c:	40 00 3f 4c 	call  4002206c <__udivdi3>
                    <== NOT EXECUTED
40012340:	94 10 20 00 	clr  %o2
                                      <== NOT EXECUTED
    *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;

40012344:	c2 07 60 18 	ld  [ %i5 + 0x18 ], %g1
                       <== NOT EXECUTED
    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
        
40012348:	92 02 40 01 	add  %o1, %g1, %o1
                            <== NOT EXECUTED
4001234c:	7f ff fb bc 	call  4001123c <rtems_bdbuf_get_buffer_for_access>
<== NOT EXECUTED
40012350:	90 10 00 1d 	mov  %i5, %o0
                                 <== NOT EXECUTED
40012354:	b8 10 00 08 	mov  %o0, %i4
                                 <== NOT EXECUTED
    switch (bd->state)
                                               
40012358:	d0 02 20 20 	ld  [ %o0 + 0x20 ], %o0
                       <== NOT EXECUTED
4001235c:	80 a2 20 02 	cmp  %o0, 2
                                   <== NOT EXECUTED
40012360:	12 bf ff d8 	bne  400122c0 <rtems_bdbuf_read+0x58>
         <== NOT EXECUTED
40012364:	80 a2 20 07 	cmp  %o0, 7
                                   <== NOT EXECUTED
        ++dd->stats.read_hits;
                                       
40012368:	c2 07 60 44 	ld  [ %i5 + 0x44 ], %g1
                       <== NOT EXECUTED
4001236c:	82 00 60 01 	inc  %g1
                                      
40012370:	c2 27 60 44 	st  %g1, [ %i5 + 0x44 ]
                       
  bd->state = state;
                                                 
40012374:	b0 10 20 00 	clr  %i0
                                      
40012378:	82 10 20 03 	mov  3, %g1
                                   
4001237c:	10 bf ff d9 	b  400122e0 <rtems_bdbuf_read+0x78>
           
40012380:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       
  rtems_bdbuf_buffer   *bd = NULL;
                                   
40012384:	b8 10 20 00 	clr  %i4
                                      <== NOT EXECUTED
40012388:	90 16 e0 04 	or  %i3, 4, %o0
                               <== NOT EXECUTED
4001238c:	7f ff e5 94 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40012390:	b0 10 20 04 	mov  4, %i0
                                   <== NOT EXECUTED
  *bd_ptr = bd;
                                                      
40012394:	f8 26 80 00 	st  %i4, [ %i2 ]
                              <== NOT EXECUTED
}
                                                                    
40012398:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4001239c:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    switch (bd->state)
                                               
400123a0:	22 80 00 04 	be,a   400123b0 <rtems_bdbuf_read+0x148>
      <== ALWAYS TAKEN
400123a4:	c2 07 60 48 	ld  [ %i5 + 0x48 ], %g1
                       
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);

400123a8:	7f ff f7 79 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
400123ac:	92 10 20 0b 	mov  0xb, %o1
                                 <== NOT EXECUTED
        ++dd->stats.read_misses;
                                     
400123b0:	82 00 60 01 	inc  %g1
                                      
400123b4:	c2 27 60 48 	st  %g1, [ %i5 + 0x48 ]
                       
  if (dd->read_ahead.trigger != block)
                               
400123b8:	c2 07 60 6c 	ld  [ %i5 + 0x6c ], %g1
                       
400123bc:	80 a6 40 01 	cmp  %i1, %g1
                                 
400123c0:	02 80 00 0f 	be  400123fc <rtems_bdbuf_read+0x194>
         
400123c4:	94 10 20 01 	mov  1, %o2
                                   
400123c8:	c2 07 60 64 	ld  [ %i5 + 0x64 ], %g1
                       
  if (rtems_bdbuf_is_read_ahead_active (dd))
                         
400123cc:	80 a0 60 00 	cmp  %g1, 0
                                   
400123d0:	02 80 00 07 	be  400123ec <rtems_bdbuf_read+0x184>
         <== ALWAYS TAKEN
400123d4:	84 06 60 01 	add  %i1, 1, %g2
                              
  previous       = the_node->previous;
                               
400123d8:	c4 07 60 68 	ld  [ %i5 + 0x68 ], %g2
                       <== NOT EXECUTED
  next->previous = previous;
                                         
400123dc:	c4 20 60 04 	st  %g2, [ %g1 + 4 ]
                          <== NOT EXECUTED
  previous->next = next;
                                             
400123e0:	c2 20 80 00 	st  %g1, [ %g2 ]
                              <== NOT EXECUTED
  node->next = NULL;
                                                 
400123e4:	c0 27 60 64 	clr  [ %i5 + 0x64 ]
                           <== NOT EXECUTED
    dd->read_ahead.trigger = block + 1;
                              
400123e8:	84 06 60 01 	add  %i1, 1, %g2
                              <== NOT EXECUTED
    dd->read_ahead.next = block + 2;
                                 
400123ec:	82 06 60 02 	add  %i1, 2, %g1
                              
    dd->read_ahead.trigger = block + 1;
                              
400123f0:	c4 27 60 6c 	st  %g2, [ %i5 + 0x6c ]
                       
    dd->read_ahead.next = block + 2;
                                 
400123f4:	c2 27 60 70 	st  %g1, [ %i5 + 0x70 ]
                       
        sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
           
400123f8:	94 10 20 01 	mov  1, %o2
                                   
400123fc:	92 10 00 1c 	mov  %i4, %o1
                                 
40012400:	7f ff fd 67 	call  4001199c <rtems_bdbuf_execute_read_request>

40012404:	90 10 00 1d 	mov  %i5, %o0
                                 
        if (sc == RTEMS_SUCCESSFUL)
                                  
40012408:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
4001240c:	32 bf ff b5 	bne,a   400122e0 <rtems_bdbuf_read+0x78>
      <== NEVER TAKEN
40012410:	b8 10 20 00 	clr  %i4
                                      <== NOT EXECUTED
  next           = the_node->next;
                                   
40012414:	c8 07 00 00 	ld  [ %i4 ], %g4
                              
  previous       = the_node->previous;
                               
40012418:	c6 07 20 04 	ld  [ %i4 + 4 ], %g3
                          
  bd->state = state;
                                                 
4001241c:	82 10 20 03 	mov  3, %g1
                                   
40012420:	c2 27 20 20 	st  %g1, [ %i4 + 0x20 ]
                       
40012424:	c4 07 20 28 	ld  [ %i4 + 0x28 ], %g2
                       
  next->previous = previous;
                                         
40012428:	c6 21 20 04 	st  %g3, [ %g4 + 4 ]
                          
  ++bd->group->users;
                                                
4001242c:	c2 00 a0 0c 	ld  [ %g2 + 0xc ], %g1
                        
  previous->next = next;
                                             
40012430:	c8 20 c0 00 	st  %g4, [ %g3 ]
                              
40012434:	82 00 60 01 	inc  %g1
                                      
40012438:	10 bf ff aa 	b  400122e0 <rtems_bdbuf_read+0x78>
           
4001243c:	c2 20 a0 0c 	st  %g1, [ %g2 + 0xc ]
                        
    if (rtems_chain_is_empty (chain))
                                
40012440:	b2 04 20 e4 	add  %l0, 0xe4, %i1
                           <== NOT EXECUTED
40012444:	80 a0 40 19 	cmp  %g1, %i1
                                 <== NOT EXECUTED
40012448:	02 80 00 09 	be  4001246c <rtems_bdbuf_read+0x204>
         <== NOT EXECUTED
4001244c:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
  old_last = tail->previous;
                                         
40012450:	c2 04 20 e8 	ld  [ %l0 + 0xe8 ], %g1
                       <== NOT EXECUTED
  the_node->next = tail;
                                             
40012454:	f2 27 60 64 	st  %i1, [ %i5 + 0x64 ]
                       <== NOT EXECUTED
    rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
    
40012458:	84 07 60 64 	add  %i5, 0x64, %g2
                           <== NOT EXECUTED
  tail->previous = the_node;
                                         
4001245c:	c4 24 20 e8 	st  %g2, [ %l0 + 0xe8 ]
                       <== NOT EXECUTED
  old_last->next = the_node;
                                         
40012460:	c4 20 40 00 	st  %g2, [ %g1 ]
                              <== NOT EXECUTED
  the_node->previous = old_last;
                                     
40012464:	10 bf ff ad 	b  40012318 <rtems_bdbuf_read+0xb0>
           <== NOT EXECUTED
40012468:	c2 27 60 68 	st  %g1, [ %i5 + 0x68 ]
                       <== NOT EXECUTED
      sc = rtems_event_send (bdbuf_cache.read_ahead_task,
            
4001246c:	40 00 05 46 	call  40013984 <rtems_event_send>
             <== NOT EXECUTED
40012470:	92 10 20 02 	mov  2, %o1
                                   <== NOT EXECUTED
      if (sc != RTEMS_SUCCESSFUL)
                                    
40012474:	80 a2 20 00 	cmp  %o0, 0
                                   <== NOT EXECUTED
40012478:	22 bf ff f7 	be,a   40012454 <rtems_bdbuf_read+0x1ec>
      <== NOT EXECUTED
4001247c:	c2 04 20 e8 	ld  [ %l0 + 0xe8 ], %g1
                       <== NOT EXECUTED
        rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);
            
40012480:	7f ff f7 2c 	call  40010130 <rtems_bdbuf_fatal>
            <== NOT EXECUTED
40012484:	90 10 20 05 	mov  5, %o0
                                   <== NOT EXECUTED
40012488:	01 00 00 00 	nop 
                                          <== NOT EXECUTED

                                                                     

4001248c <rtems_bdbuf_release>: {
4001248c:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  if (bd == NULL)
                                                    
40012490:	80 a6 20 00 	cmp  %i0, 0
                                   
40012494:	02 80 00 2f 	be  40012550 <rtems_bdbuf_release+0xc4>
       <== NEVER TAKEN
40012498:	01 00 00 00 	nop 
                                          
  _Mutex_Acquire( mutex );
                                           
4001249c:	3b 10 00 99 	sethi  %hi(0x40026400), %i5
                   
400124a0:	7f ff e5 33 	call  4000b96c <_Mutex_Acquire>
               
400124a4:	90 17 60 04 	or  %i5, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  switch (bd->state)
                                                 
400124a8:	d0 06 20 20 	ld  [ %i0 + 0x20 ], %o0
                       
400124ac:	80 a2 20 04 	cmp  %o0, 4
                                   
400124b0:	02 80 00 21 	be  40012534 <rtems_bdbuf_release+0xa8>
       
400124b4:	01 00 00 00 	nop 
                                          
400124b8:	18 80 00 28 	bgu  40012558 <rtems_bdbuf_release+0xcc>
      <== NEVER TAKEN
400124bc:	80 a2 20 06 	cmp  %o0, 6
                                   
400124c0:	80 a2 20 03 	cmp  %o0, 3
                                   
400124c4:	12 80 00 35 	bne  40012598 <rtems_bdbuf_release+0x10c>
     <== NEVER TAKEN
400124c8:	01 00 00 00 	nop 
                                          
400124cc:	c4 06 20 28 	ld  [ %i0 + 0x28 ], %g2
                       
  --bd->group->users;
                                                
400124d0:	c2 00 a0 0c 	ld  [ %g2 + 0xc ], %g1
                        
400124d4:	82 00 7f ff 	add  %g1, -1, %g1
                             
400124d8:	c2 20 a0 0c 	st  %g1, [ %g2 + 0xc ]
                        
  bd->state = state;
                                                 
400124dc:	82 10 20 02 	mov  2, %g1
                                   
  old_last = tail->previous;
                                         
400124e0:	11 10 00 98 	sethi  %hi(0x40026000), %o0
                   
400124e4:	c2 26 20 20 	st  %g1, [ %i0 + 0x20 ]
                       
400124e8:	90 12 23 dc 	or  %o0, 0x3dc, %o0
                           
400124ec:	c2 02 20 68 	ld  [ %o0 + 0x68 ], %g1
                       
  the_node->next = tail;
                                             
400124f0:	84 02 20 64 	add  %o0, 0x64, %g2
                           
400124f4:	c4 26 00 00 	st  %g2, [ %i0 ]
                              
  tail->previous = the_node;
                                         
400124f8:	f0 22 20 68 	st  %i0, [ %o0 + 0x68 ]
                       
  old_last->next = the_node;
                                         
400124fc:	f0 20 40 00 	st  %i0, [ %g1 ]
                              
  the_node->previous = old_last;
                                     
40012500:	c2 26 20 04 	st  %g1, [ %i0 + 4 ]
                          
  if (bd->waiters)
                                                   
40012504:	c2 06 20 24 	ld  [ %i0 + 0x24 ], %g1
                       
40012508:	80 a0 60 00 	cmp  %g1, 0
                                   
4001250c:	22 80 00 1c 	be,a   4001257c <rtems_bdbuf_release+0xf0>
    <== ALWAYS TAKEN
40012510:	c2 02 20 b4 	ld  [ %o0 + 0xb4 ], %g1
                       
  if (waiters->count > 0)
                                            
40012514:	c2 02 20 84 	ld  [ %o0 + 0x84 ], %g1
                       <== NOT EXECUTED
40012518:	80 a0 60 00 	cmp  %g1, 0
                                   <== NOT EXECUTED
4001251c:	22 80 00 09 	be,a   40012540 <rtems_bdbuf_release+0xb4>
    <== NOT EXECUTED
40012520:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
  _Condition_Broadcast( condition_variable );
                        
40012524:	40 00 07 0c 	call  40014154 <_Condition_Broadcast>
         <== NOT EXECUTED
40012528:	90 02 20 88 	add  %o0, 0x88, %o0
                           <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
4001252c:	10 80 00 05 	b  40012540 <rtems_bdbuf_release+0xb4>
        <== NOT EXECUTED
40012530:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
      rtems_bdbuf_add_to_modified_list_after_access (bd);
            
40012534:	7f ff f8 c1 	call  40010838 <rtems_bdbuf_add_to_modified_list_after_access>

40012538:	90 10 00 18 	mov  %i0, %o0
                                 
4001253c:	90 17 60 04 	or  %i5, 4, %o0
                               
40012540:	7f ff e5 27 	call  4000b9dc <_Mutex_Release>
               
40012544:	b0 10 20 00 	clr  %i0
                                      
  return RTEMS_SUCCESSFUL;
                                           
40012548:	81 c7 e0 08 	ret 
                                          
4001254c:	81 e8 00 00 	restore 
                                      
}
                                                                    
40012550:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012554:	91 e8 20 09 	restore  %g0, 9, %o0
                          <== NOT EXECUTED
  switch (bd->state)
                                                 
40012558:	18 80 00 10 	bgu  40012598 <rtems_bdbuf_release+0x10c>
     <== NOT EXECUTED
4001255c:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
      rtems_bdbuf_discard_buffer_after_access (bd);
                  
40012560:	7f ff fe d6 	call  400120b8 <rtems_bdbuf_discard_buffer_after_access>
<== NOT EXECUTED
40012564:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
40012568:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
4001256c:	7f ff e5 1c 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40012570:	b0 10 20 00 	clr  %i0
                                      <== NOT EXECUTED
  return RTEMS_SUCCESSFUL;
                                           
40012574:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012578:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
  if (waiters->count > 0)
                                            
4001257c:	80 a0 60 00 	cmp  %g1, 0
                                   
40012580:	22 bf ff f0 	be,a   40012540 <rtems_bdbuf_release+0xb4>
    <== ALWAYS TAKEN
40012584:	90 17 60 04 	or  %i5, 4, %o0
                               
  _Condition_Broadcast( condition_variable );
                        
40012588:	40 00 06 f3 	call  40014154 <_Condition_Broadcast>
         <== NOT EXECUTED
4001258c:	90 02 20 b8 	add  %o0, 0xb8, %o0
                           <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
40012590:	10 bf ff ec 	b  40012540 <rtems_bdbuf_release+0xb4>
        <== NOT EXECUTED
40012594:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);

40012598:	7f ff f6 fd 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
4001259c:	92 10 20 09 	mov  9, %o1
                                   <== NOT EXECUTED
400125a0:	01 00 00 00 	nop 
                                          <== NOT EXECUTED

                                                                     

400125a4 <rtems_bdbuf_release_modified>: {
400125a4:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  if (bd == NULL)
                                                    
400125a8:	80 a6 20 00 	cmp  %i0, 0
                                   
400125ac:	02 80 00 1b 	be  40012618 <rtems_bdbuf_release_modified+0x74>
<== NEVER TAKEN
400125b0:	01 00 00 00 	nop 
                                          
  _Mutex_Acquire( mutex );
                                           
400125b4:	3b 10 00 99 	sethi  %hi(0x40026400), %i5
                   
400125b8:	7f ff e4 ed 	call  4000b96c <_Mutex_Acquire>
               
400125bc:	90 17 60 04 	or  %i5, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  switch (bd->state)
                                                 
400125c0:	d0 06 20 20 	ld  [ %i0 + 0x20 ], %o0
                       
400125c4:	80 a2 20 03 	cmp  %o0, 3
                                   
400125c8:	0a 80 00 16 	bcs  40012620 <rtems_bdbuf_release_modified+0x7c>
<== NEVER TAKEN
400125cc:	80 a2 20 05 	cmp  %o0, 5
                                   
400125d0:	08 80 00 0b 	bleu  400125fc <rtems_bdbuf_release_modified+0x58>
<== ALWAYS TAKEN
400125d4:	80 a2 20 06 	cmp  %o0, 6
                                   
400125d8:	12 80 00 12 	bne  40012620 <rtems_bdbuf_release_modified+0x7c>
<== NOT EXECUTED
400125dc:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
      rtems_bdbuf_discard_buffer_after_access (bd);
                  
400125e0:	7f ff fe b6 	call  400120b8 <rtems_bdbuf_discard_buffer_after_access>
<== NOT EXECUTED
400125e4:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
400125e8:	90 17 60 04 	or  %i5, 4, %o0
                               <== NOT EXECUTED
400125ec:	7f ff e4 fc 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
400125f0:	b0 10 20 00 	clr  %i0
                                      <== NOT EXECUTED
  return RTEMS_SUCCESSFUL;
                                           
400125f4:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400125f8:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
      rtems_bdbuf_add_to_modified_list_after_access (bd);
            
400125fc:	7f ff f8 8f 	call  40010838 <rtems_bdbuf_add_to_modified_list_after_access>

40012600:	90 10 00 18 	mov  %i0, %o0
                                 
40012604:	90 17 60 04 	or  %i5, 4, %o0
                               
40012608:	7f ff e4 f5 	call  4000b9dc <_Mutex_Release>
               
4001260c:	b0 10 20 00 	clr  %i0
                                      
  return RTEMS_SUCCESSFUL;
                                           
40012610:	81 c7 e0 08 	ret 
                                          
40012614:	81 e8 00 00 	restore 
                                      
}
                                                                    
40012618:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4001261c:	91 e8 20 09 	restore  %g0, 9, %o0
                          <== NOT EXECUTED
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);

40012620:	7f ff f6 db 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
40012624:	92 10 20 0d 	mov  0xd, %o1
                                 <== NOT EXECUTED
40012628:	01 00 00 00 	nop 
                                          <== NOT EXECUTED

                                                                     

40012838 <rtems_bdbuf_set_block_size>: {
40012838:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  if (sync)
                                                          
4001283c:	80 a6 a0 00 	cmp  %i2, 0
                                   
40012840:	12 80 00 48 	bne  40012960 <rtems_bdbuf_set_block_size+0x128>

40012844:	ba 10 00 18 	mov  %i0, %i5
                                 
  _Mutex_Acquire( mutex );
                                           
40012848:	39 10 00 99 	sethi  %hi(0x40026400), %i4
                   
4001284c:	7f ff e4 48 	call  4000b96c <_Mutex_Acquire>
               
40012850:	90 17 20 04 	or  %i4, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  if (block_size > 0)
                                                
40012854:	80 a6 60 00 	cmp  %i1, 0
                                   
40012858:	02 80 00 3e 	be  40012950 <rtems_bdbuf_set_block_size+0x118>
<== NEVER TAKEN
4001285c:	b0 10 20 0a 	mov  0xa, %i0
                                 
  if (size > bdbuf_config.buffer_max)
                                
40012860:	03 10 00 8a 	sethi  %hi(0x40022800), %g1
                   
40012864:	82 10 63 68 	or  %g1, 0x368, %g1	! 40022b68 <rtems_bdbuf_configuration>

40012868:	c4 00 60 28 	ld  [ %g1 + 0x28 ], %g2
                       
4001286c:	80 a6 40 02 	cmp  %i1, %g2
                                 
40012870:	18 80 00 38 	bgu  40012950 <rtems_bdbuf_set_block_size+0x118>

40012874:	86 06 7f ff 	add  %i1, -1, %g3
                             
  bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
        
40012878:	81 80 20 00 	wr  %g0, %y
                                   
4001287c:	c4 00 60 24 	ld  [ %g1 + 0x24 ], %g2
                       
40012880:	01 00 00 00 	nop 
                                          
40012884:	01 00 00 00 	nop 
                                          
40012888:	84 70 c0 02 	udiv  %g3, %g2, %g2
                           
4001288c:	84 00 a0 01 	inc  %g2
                                      
  for (bds_per_size = 1;
                                             
40012890:	80 a0 a0 01 	cmp  %g2, 1
                                   
40012894:	08 80 00 06 	bleu  400128ac <rtems_bdbuf_set_block_size+0x74>

40012898:	82 10 20 01 	mov  1, %g1
                                   
       bds_per_size <<= 1)
                                           
4001289c:	83 28 60 01 	sll  %g1, 1, %g1
                              
  for (bds_per_size = 1;
                                             
400128a0:	80 a0 80 01 	cmp  %g2, %g1
                                 
400128a4:	38 bf ff ff 	bgu,a   400128a0 <rtems_bdbuf_set_block_size+0x68>

400128a8:	83 28 60 01 	sll  %g1, 1, %g1
                              
  return bdbuf_cache.max_bds_per_group / bds_per_size;
               
400128ac:	05 10 00 98 	sethi  %hi(0x40026000), %g2
                   
400128b0:	81 80 20 00 	wr  %g0, %y
                                   
400128b4:	f4 00 a3 fc 	ld  [ %g2 + 0x3fc ], %i2
                      
400128b8:	01 00 00 00 	nop 
                                          
400128bc:	01 00 00 00 	nop 
                                          
400128c0:	b4 76 80 01 	udiv  %i2, %g1, %i2
                           
    if (bds_per_group != 0)
                                          
400128c4:	80 a6 a0 00 	cmp  %i2, 0
                                   
400128c8:	02 80 00 22 	be  40012950 <rtems_bdbuf_set_block_size+0x118>
<== NEVER TAKEN
400128cc:	b0 10 20 0a 	mov  0xa, %i0
                                 
      uint32_t media_blocks_per_block = block_size / dd->media_block_size;

400128d0:	f6 07 60 20 	ld  [ %i5 + 0x20 ], %i3
                       
400128d4:	81 80 20 00 	wr  %g0, %y
                                   
400128d8:	01 00 00 00 	nop 
                                          
400128dc:	01 00 00 00 	nop 
                                          
400128e0:	01 00 00 00 	nop 
                                          
400128e4:	86 76 40 1b 	udiv  %i1, %i3, %g3
                           
      while ((one << block_to_media_block_shift) < media_blocks_per_block)

400128e8:	80 a0 e0 01 	cmp  %g3, 1
                                   
400128ec:	08 80 00 09 	bleu  40012910 <rtems_bdbuf_set_block_size+0xd8>

400128f0:	82 10 20 00 	clr  %g1
                                      
400128f4:	88 10 20 01 	mov  1, %g4
                                   
        ++block_to_media_block_shift;
                                
400128f8:	82 00 60 01 	inc  %g1
                                      
      while ((one << block_to_media_block_shift) < media_blocks_per_block)

400128fc:	85 29 00 01 	sll  %g4, %g1, %g2
                            
40012900:	80 a0 80 03 	cmp  %g2, %g3
                                 
40012904:	2a bf ff fe 	bcs,a   400128fc <rtems_bdbuf_set_block_size+0xc4>

40012908:	82 00 60 01 	inc  %g1
                                      
4001290c:	b7 2e c0 01 	sll  %i3, %g1, %i3
                            
      if ((dd->media_block_size << block_to_media_block_shift) != block_size)

40012910:	80 a6 40 1b 	cmp  %i1, %i3
                                 
40012914:	32 80 00 02 	bne,a   4001291c <rtems_bdbuf_set_block_size+0xe4>
<== NEVER TAKEN
40012918:	82 10 3f ff 	mov  -1, %g1
                                  <== NOT EXECUTED
      dd->block_count = dd->size / media_blocks_per_block;
           
4001291c:	81 80 20 00 	wr  %g0, %y
                                   
40012920:	c4 07 60 1c 	ld  [ %i5 + 0x1c ], %g2
                       
40012924:	01 00 00 00 	nop 
                                          
40012928:	01 00 00 00 	nop 
                                          
4001292c:	84 70 80 03 	udiv  %g2, %g3, %g2
                           
      dd->block_size = block_size;
                                   
40012930:	f2 27 60 24 	st  %i1, [ %i5 + 0x24 ]
                       
      rtems_bdbuf_do_purge_dev (dd);
                                 
40012934:	90 10 00 1d 	mov  %i5, %o0
                                 
      dd->block_count = dd->size / media_blocks_per_block;
           
40012938:	c4 27 60 28 	st  %g2, [ %i5 + 0x28 ]
                       
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
4001293c:	b0 10 20 00 	clr  %i0
                                      
      dd->media_blocks_per_block = media_blocks_per_block;
           
40012940:	c6 27 60 2c 	st  %g3, [ %i5 + 0x2c ]
                       
      dd->block_to_media_block_shift = block_to_media_block_shift;
   
40012944:	c2 27 60 30 	st  %g1, [ %i5 + 0x30 ]
                       
      rtems_bdbuf_do_purge_dev (dd);
                                 
40012948:	7f ff fa f3 	call  40011514 <rtems_bdbuf_do_purge_dev>
     
4001294c:	f4 27 60 34 	st  %i2, [ %i5 + 0x34 ]
                       
  _Mutex_Release( mutex );
                                           
40012950:	7f ff e4 23 	call  4000b9dc <_Mutex_Release>
               
40012954:	90 17 20 04 	or  %i4, 4, %o0
                               
}
                                                                    
40012958:	81 c7 e0 08 	ret 
                                          
4001295c:	81 e8 00 00 	restore 
                                      
    rtems_bdbuf_syncdev (dd);
                                        
40012960:	7f ff ff 93 	call  400127ac <rtems_bdbuf_syncdev>
          
40012964:	90 10 00 18 	mov  %i0, %o0
                                 
  _Mutex_Acquire( mutex );
                                           
40012968:	10 bf ff b9 	b  4001284c <rtems_bdbuf_set_block_size+0x14>
 
4001296c:	39 10 00 99 	sethi  %hi(0x40026400), %i4
                   

                                                                     

4001262c <rtems_bdbuf_sync>: {
4001262c:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  if (bd == NULL)
                                                    
40012630:	80 a6 20 00 	cmp  %i0, 0
                                   
40012634:	02 80 00 48 	be  40012754 <rtems_bdbuf_sync+0x128>
         <== NEVER TAKEN
40012638:	01 00 00 00 	nop 
                                          
  _Mutex_Acquire( mutex );
                                           
4001263c:	39 10 00 99 	sethi  %hi(0x40026400), %i4
                   
40012640:	7f ff e4 cb 	call  4000b96c <_Mutex_Acquire>
               
40012644:	90 17 20 04 	or  %i4, 4, %o0	! 40026404 <bdbuf_cache+0x28>
 
  switch (bd->state)
                                                 
40012648:	d0 06 20 20 	ld  [ %i0 + 0x20 ], %o0
                       
4001264c:	80 a2 20 03 	cmp  %o0, 3
                                   
40012650:	0a 80 00 54 	bcs  400127a0 <rtems_bdbuf_sync+0x174>
        <== NEVER TAKEN
40012654:	80 a2 20 05 	cmp  %o0, 5
                                   
40012658:	08 80 00 0b 	bleu  40012684 <rtems_bdbuf_sync+0x58>
        <== ALWAYS TAKEN
4001265c:	80 a2 20 06 	cmp  %o0, 6
                                   
40012660:	12 80 00 50 	bne  400127a0 <rtems_bdbuf_sync+0x174>
        <== NOT EXECUTED
40012664:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
      rtems_bdbuf_discard_buffer_after_access (bd);
                  
40012668:	7f ff fe 94 	call  400120b8 <rtems_bdbuf_discard_buffer_after_access>
<== NOT EXECUTED
4001266c:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
40012670:	90 17 20 04 	or  %i4, 4, %o0
                               <== NOT EXECUTED
40012674:	7f ff e4 da 	call  4000b9dc <_Mutex_Release>
               
40012678:	b0 10 20 00 	clr  %i0
                                      
  return RTEMS_SUCCESSFUL;
                                           
4001267c:	81 c7 e0 08 	ret 
                                          
40012680:	81 e8 00 00 	restore 
                                      
  bd->state = state;
                                                 
40012684:	82 10 20 08 	mov  8, %g1
                                   
  old_last = tail->previous;
                                         
40012688:	3b 10 00 98 	sethi  %hi(0x40026000), %i5
                   
4001268c:	c2 26 20 20 	st  %g1, [ %i0 + 0x20 ]
                       
40012690:	ba 17 63 dc 	or  %i5, 0x3dc, %i5
                           
40012694:	c2 07 60 80 	ld  [ %i5 + 0x80 ], %g1
                       
  the_node->next = tail;
                                             
40012698:	84 07 60 7c 	add  %i5, 0x7c, %g2
                           
4001269c:	c4 26 00 00 	st  %g2, [ %i0 ]
                              
  tail->previous = the_node;
                                         
400126a0:	f0 27 60 80 	st  %i0, [ %i5 + 0x80 ]
                       
  old_last->next = the_node;
                                         
400126a4:	f0 20 40 00 	st  %i0, [ %g1 ]
                              
  the_node->previous = old_last;
                                     
400126a8:	c2 26 20 04 	st  %g1, [ %i0 + 4 ]
                          
  if (bd->waiters)
                                                   
400126ac:	c2 06 20 24 	ld  [ %i0 + 0x24 ], %g1
                       
400126b0:	80 a0 60 00 	cmp  %g1, 0
                                   
400126b4:	32 80 00 2a 	bne,a   4001275c <rtems_bdbuf_sync+0x130>
     <== NEVER TAKEN
400126b8:	c2 07 60 84 	ld  [ %i5 + 0x84 ], %g1
                       <== NOT EXECUTED
  rtems_bdbuf_wake_swapper ();
                                       
400126bc:	7f ff f6 cd 	call  400101f0 <rtems_bdbuf_wake_swapper>
     
400126c0:	37 10 00 99 	sethi  %hi(0x40026400), %i3
                   
    switch (bd->state)
                                               
400126c4:	d0 06 20 20 	ld  [ %i0 + 0x20 ], %o0
                       
400126c8:	80 a2 20 01 	cmp  %o0, 1
                                   
400126cc:	0a 80 00 0e 	bcs  40012704 <rtems_bdbuf_sync+0xd8>
         <== NEVER TAKEN
400126d0:	b6 16 e0 78 	or  %i3, 0x78, %i3
                            
400126d4:	80 a2 20 07 	cmp  %o0, 7
                                   
400126d8:	08 80 00 0d 	bleu  4001270c <rtems_bdbuf_sync+0xe0>
        
400126dc:	80 a2 20 0a 	cmp  %o0, 0xa
                                 
400126e0:	18 80 00 09 	bgu  40012704 <rtems_bdbuf_sync+0xd8>
         <== NEVER TAKEN
400126e4:	01 00 00 00 	nop 
                                          
        rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
        
400126e8:	90 10 00 18 	mov  %i0, %o0
                                 
400126ec:	7f ff f8 38 	call  400107cc <rtems_bdbuf_wait>
             
400126f0:	92 10 00 1b 	mov  %i3, %o1
                                 
    switch (bd->state)
                                               
400126f4:	d0 06 20 20 	ld  [ %i0 + 0x20 ], %o0
                       
400126f8:	80 a2 20 01 	cmp  %o0, 1
                                   
400126fc:	1a bf ff f7 	bcc  400126d8 <rtems_bdbuf_sync+0xac>
         <== ALWAYS TAKEN
40012700:	80 a2 20 07 	cmp  %o0, 7
                                   
        rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);

40012704:	7f ff f6 a2 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
40012708:	92 10 20 10 	mov  0x10, %o1
                                <== NOT EXECUTED
  if (bd->waiters == 0
                                               
4001270c:	c2 06 20 24 	ld  [ %i0 + 0x24 ], %g1
                       
40012710:	80 a0 60 00 	cmp  %g1, 0
                                   
40012714:	12 bf ff d7 	bne  40012670 <rtems_bdbuf_sync+0x44>
         <== NEVER TAKEN
40012718:	82 02 3f ff 	add  %o0, -1, %g1
                             
        && (bd->state == RTEMS_BDBUF_STATE_CACHED
                    
4001271c:	80 a0 60 01 	cmp  %g1, 1
                                   
40012720:	38 bf ff d5 	bgu,a   40012674 <rtems_bdbuf_sync+0x48>
      <== NEVER TAKEN
40012724:	90 17 20 04 	or  %i4, 4, %o0
                               <== NOT EXECUTED
    if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
                        
40012728:	80 a2 20 01 	cmp  %o0, 1
                                   
4001272c:	02 80 00 12 	be  40012774 <rtems_bdbuf_sync+0x148>
         <== NEVER TAKEN
40012730:	01 00 00 00 	nop 
                                          
  if (waiters->count > 0)
                                            
40012734:	c2 07 60 b4 	ld  [ %i5 + 0xb4 ], %g1
                       
40012738:	80 a0 60 00 	cmp  %g1, 0
                                   
4001273c:	22 bf ff ce 	be,a   40012674 <rtems_bdbuf_sync+0x48>
       <== ALWAYS TAKEN
40012740:	90 17 20 04 	or  %i4, 4, %o0
                               
  _Condition_Broadcast( condition_variable );
                        
40012744:	40 00 06 84 	call  40014154 <_Condition_Broadcast>
         <== NOT EXECUTED
40012748:	90 07 60 b8 	add  %i5, 0xb8, %o0
                           <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
4001274c:	10 bf ff ca 	b  40012674 <rtems_bdbuf_sync+0x48>
           <== NOT EXECUTED
40012750:	90 17 20 04 	or  %i4, 4, %o0
                               <== NOT EXECUTED
}
                                                                    
40012754:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012758:	91 e8 20 09 	restore  %g0, 9, %o0
                          <== NOT EXECUTED
  if (waiters->count > 0)
                                            
4001275c:	80 a0 60 00 	cmp  %g1, 0
                                   <== NOT EXECUTED
40012760:	02 bf ff d7 	be  400126bc <rtems_bdbuf_sync+0x90>
          <== NOT EXECUTED
40012764:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
  _Condition_Broadcast( condition_variable );
                        
40012768:	40 00 06 7b 	call  40014154 <_Condition_Broadcast>
         <== NOT EXECUTED
4001276c:	90 07 60 88 	add  %i5, 0x88, %o0
                           <== NOT EXECUTED
40012770:	30 bf ff d3 	b,a   400126bc <rtems_bdbuf_sync+0x90>
        <== NOT EXECUTED
      rtems_bdbuf_remove_from_tree (bd);
                             
40012774:	7f ff f8 67 	call  40010910 <rtems_bdbuf_remove_from_tree>
 <== NOT EXECUTED
40012778:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
  the_node->previous    = after_node;
                                
4001277c:	03 10 00 99 	sethi  %hi(0x40026400), %g1
                   <== NOT EXECUTED
40012780:	82 10 60 3c 	or  %g1, 0x3c, %g1	! 4002643c <bdbuf_cache+0x60>
<== NOT EXECUTED
40012784:	c2 26 20 04 	st  %g1, [ %i0 + 4 ]
                          <== NOT EXECUTED
  bd->state = state;
                                                 
40012788:	c0 26 20 20 	clr  [ %i0 + 0x20 ]
                           <== NOT EXECUTED
  before_node           = after_node->next;
                          
4001278c:	c2 07 60 60 	ld  [ %i5 + 0x60 ], %g1
                       <== NOT EXECUTED
  after_node->next      = the_node;
                                  
40012790:	f0 27 60 60 	st  %i0, [ %i5 + 0x60 ]
                       <== NOT EXECUTED
  the_node->next        = before_node;
                               
40012794:	c2 26 00 00 	st  %g1, [ %i0 ]
                              <== NOT EXECUTED
  before_node->previous = the_node;
                                  
40012798:	10 bf ff e7 	b  40012734 <rtems_bdbuf_sync+0x108>
          <== NOT EXECUTED
4001279c:	f0 20 60 04 	st  %i0, [ %g1 + 4 ]
                          <== NOT EXECUTED
      rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);

400127a0:	7f ff f6 7b 	call  4001018c <rtems_bdbuf_fatal_with_state>
 <== NOT EXECUTED
400127a4:	92 10 20 0c 	mov  0xc, %o1
                                 <== NOT EXECUTED
400127a8:	01 00 00 00 	nop 
                                          <== NOT EXECUTED

                                                                     

40002c5c <rtems_bdpart_create>: const rtems_bdpart_format *format, rtems_bdpart_partition *pt, const unsigned *dist, size_t count ) {
40002c5c:	9d e3 bf 98 	save  %sp, -104, %sp
                          
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
  bool dos_compatibility = format != NULL
                            
    && format->type == RTEMS_BDPART_FORMAT_MBR
                       
    && format->mbr.dos_compatibility;
                                
40002c60:	80 a6 60 00 	cmp  %i1, 0
                                   
40002c64:	22 80 00 07 	be,a   40002c80 <rtems_bdpart_create+0x24>
    <== NEVER TAKEN
40002c68:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             <== NOT EXECUTED
    && format->type == RTEMS_BDPART_FORMAT_MBR
                       
40002c6c:	c2 06 40 00 	ld  [ %i1 ], %g1
                              
40002c70:	80 a0 60 00 	cmp  %g1, 0
                                   
40002c74:	22 80 00 76 	be,a   40002e4c <rtems_bdpart_create+0x1f0>
   <== ALWAYS TAKEN
40002c78:	c2 0e 60 08 	ldub  [ %i1 + 8 ], %g1
                        
  rtems_blkdev_bnum disk_end = 0;
                                    
40002c7c:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             <== NOT EXECUTED
40002c80:	a2 10 20 00 	clr  %l1
                                      <== NOT EXECUTED
  rtems_blkdev_bnum pos = 0;
                                         
  rtems_blkdev_bnum dist_sum = 0;
                                    
  rtems_blkdev_bnum record_space =
                                   
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
          
40002c84:	a0 10 20 01 	mov  1, %l0
                                   <== NOT EXECUTED
  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) {
                                                  
40002c88:	80 a7 20 00 	cmp  %i4, 0
                                   
40002c8c:	02 80 00 6e 	be  40002e44 <rtems_bdpart_create+0x1e8>
      <== NEVER TAKEN
40002c90:	90 10 20 00 	clr  %o0
                                      
    /* Nothing to do */
                                              
    return RTEMS_SUCCESSFUL;
                                         
  }
                                                                  

                                                                     
  /* Check parameter */
                                              
  if (format == NULL || pt == NULL || dist == NULL) {
                
40002c94:	80 a0 00 1a 	cmp  %g0, %i2
                                 
40002c98:	84 60 3f ff 	subx  %g0, -1, %g2
                            
40002c9c:	80 a0 00 1b 	cmp  %g0, %i3
                                 
40002ca0:	82 60 3f ff 	subx  %g0, -1, %g1
                            
40002ca4:	80 90 80 01 	orcc  %g2, %g1, %g0
                           
40002ca8:	12 80 00 6f 	bne  40002e64 <rtems_bdpart_create+0x208>
     <== NEVER TAKEN
40002cac:	80 a6 60 00 	cmp  %i1, 0
                                   
40002cb0:	02 80 00 6d 	be  40002e64 <rtems_bdpart_create+0x208>
      <== NEVER TAKEN
40002cb4:	96 07 bf fc 	add  %fp, -4, %o3
                             
    return RTEMS_INVALID_ADDRESS;
                                    
  }
                                                                  

                                                                     
  /* Get disk data */
                                                
  sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);

40002cb8:	94 10 20 00 	clr  %o2
                                      
40002cbc:	92 10 20 00 	clr  %o1
                                      
40002cc0:	40 00 01 3a 	call  400031a8 <rtems_bdpart_get_disk_data>
   
40002cc4:	90 10 00 18 	mov  %i0, %o0
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40002cc8:	80 a2 20 00 	cmp  %o0, 0
                                   
40002ccc:	12 80 00 5e 	bne  40002e44 <rtems_bdpart_create+0x1e8>
     <== NEVER TAKEN
40002cd0:	01 00 00 00 	nop 
                                          

                                                                     
  /* Get distribution sum and check for overflow */
                  
  for (i = 0; i < count; ++i) {
                                      
    unsigned prev_sum = dist_sum;
                                    

                                                                     
    dist_sum += dist [i];
                                            
40002cd4:	c2 06 c0 00 	ld  [ %i3 ], %g1
                              

                                                                     
    if (dist_sum < prev_sum) {
                                       
      return RTEMS_INVALID_NUMBER;
                                   
    }
                                                                

                                                                     
    if (dist [i] == 0) {
                                             
40002cd8:	80 a0 60 00 	cmp  %g1, 0
                                   
40002cdc:	12 80 00 0d 	bne  40002d10 <rtems_bdpart_create+0xb4>
      <== ALWAYS TAKEN
40002ce0:	88 10 20 00 	clr  %g4
                                      
      return RTEMS_INVALID_NUMBER;
                                   
40002ce4:	10 80 00 64 	b  40002e74 <rtems_bdpart_create+0x218>
       <== NOT EXECUTED
40002ce8:	90 10 20 0a 	mov  0xa, %o0
                                 <== NOT EXECUTED
    dist_sum += dist [i];
                                            
40002cec:	c4 06 c0 02 	ld  [ %i3 + %g2 ], %g2
                        
40002cf0:	82 80 80 01 	addcc  %g2, %g1, %g1
                          
40002cf4:	88 10 00 03 	mov  %g3, %g4
                                 
40002cf8:	86 40 20 00 	addx  %g0, 0, %g3
                             
    if (dist [i] == 0) {
                                             
40002cfc:	80 a0 e0 00 	cmp  %g3, 0
                                   
40002d00:	12 80 00 5c 	bne  40002e70 <rtems_bdpart_create+0x214>
     <== NEVER TAKEN
40002d04:	80 a0 a0 00 	cmp  %g2, 0
                                   
40002d08:	22 80 00 5b 	be,a   40002e74 <rtems_bdpart_create+0x218>
   <== NEVER TAKEN
40002d0c:	90 10 20 0a 	mov  0xa, %o0
                                 <== NOT EXECUTED
  for (i = 0; i < count; ++i) {
                                      
40002d10:	86 01 20 01 	add  %g4, 1, %g3
                              
40002d14:	80 a7 00 03 	cmp  %i4, %g3
                                 
40002d18:	12 bf ff f5 	bne  40002cec <rtems_bdpart_create+0x90>
      
40002d1c:	85 28 e0 02 	sll  %g3, 2, %g2
                              
    }
                                                                
  }
                                                                  

                                                                     
  /* Check format */
                                                 
  if (format->type != RTEMS_BDPART_FORMAT_MBR) {
                     
40002d20:	c4 06 40 00 	ld  [ %i1 ], %g2
                              
40002d24:	80 a0 a0 00 	cmp  %g2, 0
                                   
40002d28:	12 80 00 55 	bne  40002e7c <rtems_bdpart_create+0x220>
     <== NEVER TAKEN
40002d2c:	80 a4 60 00 	cmp  %l1, 0
                                   
    return RTEMS_NOT_IMPLEMENTED;
                                    
  }
                                                                  

                                                                     
  /* Align end of disk on cylinder boundary if necessary */
          
  if (dos_compatibility) {
                                           
40002d30:	02 80 00 55 	be  40002e84 <rtems_bdpart_create+0x228>
      <== NEVER TAKEN
40002d34:	d8 07 bf fc 	ld  [ %fp + -4 ], %o4
                         
    disk_end -= (disk_end % record_space);
                           
40002d38:	81 80 20 00 	wr  %g0, %y
                                   
40002d3c:	01 00 00 00 	nop 
                                          
40002d40:	01 00 00 00 	nop 
                                          
40002d44:	01 00 00 00 	nop 
                                          
40002d48:	84 73 00 10 	udiv  %o4, %l0, %g2
                           

                                                                     
  /*
                                                                 
   * In case we need an extended partition and logical partitions we have to

   * account for the space of each EBR.
                              
   */
                                                                
  if (count > 4) {
                                                   
40002d4c:	80 a0 e0 04 	cmp  %g3, 4
                                   
40002d50:	08 80 00 54 	bleu  40002ea0 <rtems_bdpart_create+0x244>
    <== NEVER TAKEN
40002d54:	98 58 80 10 	smul  %g2, %l0, %o4
                           
    overhead += (count - 3) * record_space;
                          
40002d58:	84 01 3f fe 	add  %g4, -2, %g2
                             
40002d5c:	84 58 80 10 	smul  %g2, %l0, %g2
                           
40002d60:	b8 00 80 10 	add  %g2, %l0, %i4
                            
  /*
                                                                 
   * Account space to align every partition on cylinder boundaries if

   * necessary.
                                                      
   */
                                                                
  if (dos_compatibility) {
                                           
    overhead += (count - 1) * record_space;
                          
40002d64:	84 5c 00 04 	smul  %l0, %g4, %g2
                           
40002d68:	84 00 80 1c 	add  %g2, %i4, %g2
                            
  }
                                                                  

                                                                     
  /* Check disk space */
                                             
  if ((overhead + count) > disk_end) {
                               
40002d6c:	88 00 80 03 	add  %g2, %g3, %g4
                            
40002d70:	80 a1 00 0c 	cmp  %g4, %o4
                                 
40002d74:	18 80 00 49 	bgu  40002e98 <rtems_bdpart_create+0x23c>
     <== NEVER TAKEN
40002d78:	84 23 00 02 	sub  %o4, %g2, %g2
                            
40002d7c:	9e 10 00 1a 	mov  %i2, %o7
                                 
    return RTEMS_IO_ERROR;
                                           
  }
                                                                  

                                                                     
  /* Begin of first primary partition */
                             
  pos = record_space;
                                                
40002d80:	b2 10 00 10 	mov  %l0, %i1
                                 

                                                                     
  /* Space for partitions */
                                         
  free_space = disk_end - overhead;
                                  

                                                                     
  for (i = 0; i < count; ++i) {
                                      
40002d84:	b0 10 20 00 	clr  %i0
                                      
    rtems_bdpart_partition *p = pt + i;
                              

                                                                     
    /* Partition size */
                                             
    rtems_blkdev_bnum s = free_space * dist [i];
                     
40002d88:	89 2e 20 02 	sll  %i0, 2, %g4
                              
40002d8c:	f8 06 c0 04 	ld  [ %i3 + %g4 ], %i4
                        
40002d90:	88 5f 00 02 	smul  %i4, %g2, %g4
                           
    if (s < free_space || s < dist [i]) {
                            
40002d94:	80 a1 00 02 	cmp  %g4, %g2
                                 
40002d98:	0a 80 00 36 	bcs  40002e70 <rtems_bdpart_create+0x214>
     <== NEVER TAKEN
40002d9c:	80 a1 00 1c 	cmp  %g4, %i4
                                 
40002da0:	2a 80 00 35 	bcs,a   40002e74 <rtems_bdpart_create+0x218>
  <== NEVER TAKEN
40002da4:	90 10 20 0a 	mov  0xa, %o0
                                 <== NOT EXECUTED
      return RTEMS_INVALID_NUMBER;
                                   
    }
                                                                
    s /= dist_sum;
                                                   

                                                                     
    /* Ensure that the partition is not empty */
                     
    if (s == 0) {
                                                    
40002da8:	81 80 20 00 	wr  %g0, %y
                                   
40002dac:	01 00 00 00 	nop 
                                          
40002db0:	01 00 00 00 	nop 
                                          
40002db4:	01 00 00 00 	nop 
                                          
40002db8:	88 f1 00 01 	udivcc  %g4, %g1, %g4
                         
40002dbc:	22 80 00 02 	be,a   40002dc4 <rtems_bdpart_create+0x168>
   <== NEVER TAKEN
40002dc0:	88 10 20 01 	mov  1, %g4
                                   <== NOT EXECUTED
      s = 1;
                                                         
    }
                                                                

                                                                     
    /* Align partition upwards */
                                    
    s += record_space - (s % record_space);
                          
40002dc4:	81 80 20 00 	wr  %g0, %y
                                   
40002dc8:	01 00 00 00 	nop 
                                          
40002dcc:	01 00 00 00 	nop 
                                          
40002dd0:	01 00 00 00 	nop 
                                          
40002dd4:	b8 71 00 10 	udiv  %g4, %l0, %i4
                           

                                                                     
    /* Reserve space for the EBR if necessary */
                     
    if (count > 4 && i > 2) {
                                        
40002dd8:	9a 10 20 01 	mov  1, %o5
                                   
    s += record_space - (s % record_space);
                          
40002ddc:	88 5f 00 10 	smul  %i4, %l0, %g4
                           
    if (count > 4 && i > 2) {
                                        
40002de0:	80 a0 e0 04 	cmp  %g3, 4
                                   
40002de4:	18 80 00 03 	bgu  40002df0 <rtems_bdpart_create+0x194>
     <== ALWAYS TAKEN
40002de8:	88 04 00 04 	add  %l0, %g4, %g4
                            
40002dec:	9a 10 20 00 	clr  %o5
                                      <== NOT EXECUTED
40002df0:	80 8b 60 ff 	btst  0xff, %o5
                               
40002df4:	02 80 00 08 	be  40002e14 <rtems_bdpart_create+0x1b8>
      <== NEVER TAKEN
40002df8:	80 a6 20 02 	cmp  %i0, 2
                                   
40002dfc:	18 80 00 03 	bgu  40002e08 <rtems_bdpart_create+0x1ac>
     
40002e00:	b8 10 20 01 	mov  1, %i4
                                   
40002e04:	b8 10 20 00 	clr  %i4
                                      
40002e08:	80 8f 20 ff 	btst  0xff, %i4
                               
40002e0c:	32 80 00 02 	bne,a   40002e14 <rtems_bdpart_create+0x1b8>
  
40002e10:	b2 06 40 10 	add  %i1, %l0, %i1
                            
      pos += record_space;
                                           
    }
                                                                

                                                                     
    /* Partition begin and end */
                                    
    p->begin = pos;
                                                  
40002e14:	f2 23 c0 00 	st  %i1, [ %o7 ]
                              
    pos += s;
                                                        
40002e18:	b2 06 40 04 	add  %i1, %g4, %i1
                            
    p->end = pos;
                                                    
40002e1c:	f2 23 e0 04 	st  %i1, [ %o7 + 4 ]
                          
  for (i = 0; i < count; ++i) {
                                      
40002e20:	b0 06 20 01 	inc  %i0
                                      
40002e24:	80 a6 00 03 	cmp  %i0, %g3
                                 
40002e28:	12 bf ff d8 	bne  40002d88 <rtems_bdpart_create+0x12c>
     
40002e2c:	9e 03 e0 30 	add  %o7, 0x30, %o7
                           
  }
                                                                  

                                                                     
  /* Expand the last partition to the disk end */
                    
  pt [count - 1].end = disk_end;
                                     
40002e30:	83 2e 20 01 	sll  %i0, 1, %g1
                              
40002e34:	82 00 40 18 	add  %g1, %i0, %g1
                            
40002e38:	83 28 60 04 	sll  %g1, 4, %g1
                              
40002e3c:	b4 06 80 01 	add  %i2, %g1, %i2
                            
40002e40:	d8 26 bf d4 	st  %o4, [ %i2 + -44 ]
                        

                                                                     
  return RTEMS_SUCCESSFUL;
                                           
}
                                                                    
40002e44:	81 c7 e0 08 	ret 
                                          
40002e48:	91 e8 00 08 	restore  %g0, %o0, %o0
                        
    && format->mbr.dos_compatibility;
                                
40002e4c:	80 a0 60 00 	cmp  %g1, 0
                                   
40002e50:	02 bf ff 8c 	be  40002c80 <rtems_bdpart_create+0x24>
       <== NEVER TAKEN
40002e54:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
40002e58:	a2 10 20 01 	mov  1, %l1
                                   
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
          
40002e5c:	10 bf ff 8b 	b  40002c88 <rtems_bdpart_create+0x2c>
        
40002e60:	a0 10 20 3f 	mov  0x3f, %l0
                                
    return RTEMS_INVALID_ADDRESS;
                                    
40002e64:	90 10 20 09 	mov  9, %o0
                                   <== NOT EXECUTED
}
                                                                    
40002e68:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40002e6c:	91 e8 00 08 	restore  %g0, %o0, %o0
                        <== NOT EXECUTED
      return RTEMS_INVALID_NUMBER;
                                   
40002e70:	90 10 20 0a 	mov  0xa, %o0
                                 <== NOT EXECUTED
}
                                                                    
40002e74:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40002e78:	91 e8 00 08 	restore  %g0, %o0, %o0
                        <== NOT EXECUTED
    return RTEMS_NOT_IMPLEMENTED;
                                    
40002e7c:	10 bf ff f2 	b  40002e44 <rtems_bdpart_create+0x1e8>
       <== NOT EXECUTED
40002e80:	90 10 20 18 	mov  0x18, %o0
                                <== NOT EXECUTED
  if (count > 4) {
                                                   
40002e84:	80 a0 e0 04 	cmp  %g3, 4
                                   <== NOT EXECUTED
40002e88:	38 80 00 08 	bgu,a   40002ea8 <rtems_bdpart_create+0x24c>
  <== NOT EXECUTED
40002e8c:	84 01 3f fe 	add  %g4, -2, %g2
                             <== NOT EXECUTED
  overhead += record_space;
                                          
40002e90:	10 bf ff b7 	b  40002d6c <rtems_bdpart_create+0x110>
       <== NOT EXECUTED
40002e94:	84 10 00 10 	mov  %l0, %g2
                                 <== NOT EXECUTED
    return RTEMS_IO_ERROR;
                                           
40002e98:	10 bf ff eb 	b  40002e44 <rtems_bdpart_create+0x1e8>
       <== NOT EXECUTED
40002e9c:	90 10 20 1b 	mov  0x1b, %o0
                                <== NOT EXECUTED
  overhead += record_space;
                                          
40002ea0:	10 bf ff b1 	b  40002d64 <rtems_bdpart_create+0x108>
       <== NOT EXECUTED
40002ea4:	b8 10 00 10 	mov  %l0, %i4
                                 <== NOT EXECUTED
    overhead += (count - 3) * record_space;
                          
40002ea8:	84 58 80 10 	smul  %g2, %l0, %g2
                           <== NOT EXECUTED
40002eac:	10 bf ff b0 	b  40002d6c <rtems_bdpart_create+0x110>
       <== NOT EXECUTED
40002eb0:	84 00 80 10 	add  %g2, %l0, %g2
                            <== NOT EXECUTED

                                                                     

40002eb4 <rtems_bdpart_dump>: { uuid_unparse_lower( type, str); } void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count) {
40002eb4:	9d e3 bf 60 	save  %sp, -160, %sp
                          
  size_t i = 0;
                                                      

                                                                     
  printf(
                                                            
40002eb8:	11 10 00 8b 	sethi  %hi(0x40022c00), %o0
                   
40002ebc:	40 00 33 ba 	call  4000fda4 <__wrap_puts>
                  
40002ec0:	90 12 23 28 	or  %o0, 0x328, %o0	! 40022f28 <rtems_test_name+0x150>

    "------------+------------+-----------------------------------------------------\n"

    " BEGIN      | LAST       | TYPE\n"
                              
    "------------+------------+-----------------------------------------------------\n"

  );
                                                                 

                                                                     
  for (i = 0; i < count; ++i) {
                                      
40002ec4:	80 a6 60 00 	cmp  %i1, 0
                                   
40002ec8:	02 80 00 35 	be  40002f9c <rtems_bdpart_dump+0xe8>
         <== NEVER TAKEN
40002ecc:	83 2e 60 01 	sll  %i1, 1, %g1
                              
40002ed0:	b0 06 20 08 	add  %i0, 8, %i0
                              
40002ed4:	b2 00 40 19 	add  %g1, %i1, %i1
                            
          break;
                                                     
        case RTEMS_BDPART_MBR_FAT_16_LBA:
                            
          type = "FAT 16 LBA";
                                       
          break;
                                                     
        case RTEMS_BDPART_MBR_FAT_32:
                                
          type = "FAT 32";
                                           
40002ed8:	23 10 00 8b 	sethi  %hi(0x40022c00), %l1
                   
40002edc:	b3 2e 60 04 	sll  %i1, 4, %i1
                              
          type = "FAT 16 LBA";
                                       
40002ee0:	21 10 00 8b 	sethi  %hi(0x40022c00), %l0
                   
          break;
                                                     
        case RTEMS_BDPART_MBR_FAT_32_LBA:
                            
          type = "FAT 32 LBA";
                                       
          break;
                                                     
        case RTEMS_BDPART_MBR_DATA:
                                  
          type = "DATA";
                                             
40002ee4:	39 10 00 8b 	sethi  %hi(0x40022c00), %i4
                   
          type = "FAT 32 LBA";
                                       
40002ee8:	03 10 00 8b 	sethi  %hi(0x40022c00), %g1
                   
          type = "FAT 12";
                                           
40002eec:	3b 10 00 8b 	sethi  %hi(0x40022c00), %i5
                   
40002ef0:	b2 06 40 18 	add  %i1, %i0, %i1
                            
40002ef4:	35 10 00 8c 	sethi  %hi(0x40023000), %i2
                   
          type = "FAT 32";
                                           
40002ef8:	a2 14 63 10 	or  %l1, 0x310, %l1
                           
          type = "FAT 16 LBA";
                                       
40002efc:	a0 14 23 18 	or  %l0, 0x318, %l0
                           
          type = "DATA";
                                             
40002f00:	b8 17 22 f8 	or  %i4, 0x2f8, %i4
                           
          type = "FAT 32 LBA";
                                       
40002f04:	b6 10 63 00 	or  %g1, 0x300, %i3
                           
          type = "FAT 12";
                                           
40002f08:	ba 17 62 f0 	or  %i5, 0x2f0, %i5
                           
    uint8_t type_mbr = 0;
                                            
40002f0c:	c0 2f bf c7 	clrb  [ %fp + -57 ]
                           
    if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
   
40002f10:	92 07 bf c7 	add  %fp, -57, %o1
                            
40002f14:	40 00 00 99 	call  40003178 <rtems_bdpart_to_mbr_partition_type>

40002f18:	90 10 00 18 	mov  %i0, %o0
                                 
40002f1c:	80 a2 20 00 	cmp  %o0, 0
                                   
40002f20:	02 80 00 24 	be  40002fb0 <rtems_bdpart_dump+0xfc>
         <== NEVER TAKEN
40002f24:	c2 0f bf c7 	ldub  [ %fp + -57 ], %g1
                      
      switch (type_mbr) {
                                            
40002f28:	80 a0 60 0b 	cmp  %g1, 0xb
                                 
40002f2c:	02 80 00 13 	be  40002f78 <rtems_bdpart_dump+0xc4>
         <== ALWAYS TAKEN
40002f30:	96 10 00 11 	mov  %l1, %o3
                                 
40002f34:	08 80 00 24 	bleu  40002fc4 <rtems_bdpart_dump+0x110>
      <== NOT EXECUTED
40002f38:	80 a0 60 0e 	cmp  %g1, 0xe
                                 <== NOT EXECUTED
40002f3c:	02 80 00 0f 	be  40002f78 <rtems_bdpart_dump+0xc4>
         <== NOT EXECUTED
40002f40:	96 10 00 10 	mov  %l0, %o3
                                 <== NOT EXECUTED
40002f44:	80 a0 60 da 	cmp  %g1, 0xda
                                <== NOT EXECUTED
40002f48:	02 80 00 0c 	be  40002f78 <rtems_bdpart_dump+0xc4>
         <== NOT EXECUTED
40002f4c:	96 10 00 1c 	mov  %i4, %o3
                                 <== NOT EXECUTED
40002f50:	80 a0 60 0c 	cmp  %g1, 0xc
                                 <== NOT EXECUTED
40002f54:	02 80 00 09 	be  40002f78 <rtems_bdpart_dump+0xc4>
         <== NOT EXECUTED
40002f58:	96 10 00 1b 	mov  %i3, %o3
                                 <== NOT EXECUTED
          break;
                                                     
        default:
                                                     
          snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);

40002f5c:	96 10 00 01 	mov  %g1, %o3
                                 <== NOT EXECUTED
40002f60:	92 10 20 34 	mov  0x34, %o1
                                <== NOT EXECUTED
40002f64:	15 10 00 8c 	sethi  %hi(0x40023000), %o2
                   <== NOT EXECUTED
40002f68:	90 07 bf c8 	add  %fp, -56, %o0
                            <== NOT EXECUTED
40002f6c:	40 00 4a a6 	call  40015a04 <snprintf>
                     <== NOT EXECUTED
40002f70:	94 12 a0 68 	or  %o2, 0x68, %o2
                            <== NOT EXECUTED
          type = type_buffer;
                                        
40002f74:	96 07 bf c8 	add  %fp, -56, %o3
                            <== NOT EXECUTED
    } else {
                                                         
      rtems_bdpart_type_to_string( p->type, type_buffer);
            
      type = type_buffer;
                                            
    }
                                                                

                                                                     
    printf(
                                                          
40002f78:	d4 06 3f fc 	ld  [ %i0 + -4 ], %o2
                         
40002f7c:	d2 06 3f f8 	ld  [ %i0 + -8 ], %o1
                         
40002f80:	94 02 bf ff 	add  %o2, -1, %o2
                             
40002f84:	40 00 33 79 	call  4000fd68 <__wrap_printf>
                
40002f88:	90 16 a0 78 	or  %i2, 0x78, %o0
                            
40002f8c:	b0 06 20 30 	add  %i0, 0x30, %i0
                           
  for (i = 0; i < count; ++i) {
                                      
40002f90:	80 a6 00 19 	cmp  %i0, %i1
                                 
40002f94:	32 bf ff df 	bne,a   40002f10 <rtems_bdpart_dump+0x5c>
     
40002f98:	c0 2f bf c7 	clrb  [ %fp + -57 ]
                           
      p->end - 1U,
                                                   
      type
                                                           
    );
                                                               
  }
                                                                  

                                                                     
  puts( "------------+------------+-----------------------------------------------------");

40002f9c:	11 10 00 8c 	sethi  %hi(0x40023000), %o0
                   
40002fa0:	40 00 33 81 	call  4000fda4 <__wrap_puts>
                  
40002fa4:	90 12 20 18 	or  %o0, 0x18, %o0	! 40023018 <rtems_test_name+0x240>

}
                                                                    
40002fa8:	81 c7 e0 08 	ret 
                                          
40002fac:	81 e8 00 00 	restore 
                                      
  uuid_unparse_lower( type, str);
                                    
40002fb0:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
40002fb4:	40 00 33 a3 	call  4000fe40 <uuid_unparse_lower>
           <== NOT EXECUTED
40002fb8:	92 07 bf c8 	add  %fp, -56, %o1
                            <== NOT EXECUTED
      type = type_buffer;
                                            
40002fbc:	10 bf ff ef 	b  40002f78 <rtems_bdpart_dump+0xc4>
          <== NOT EXECUTED
40002fc0:	96 07 bf c8 	add  %fp, -56, %o3
                            <== NOT EXECUTED
      switch (type_mbr) {
                                            
40002fc4:	80 a0 60 01 	cmp  %g1, 1
                                   <== NOT EXECUTED
40002fc8:	02 bf ff ec 	be  40002f78 <rtems_bdpart_dump+0xc4>
         <== NOT EXECUTED
40002fcc:	96 10 00 1d 	mov  %i5, %o3
                                 <== NOT EXECUTED
40002fd0:	80 a0 60 04 	cmp  %g1, 4
                                   <== NOT EXECUTED
40002fd4:	12 bf ff e2 	bne  40002f5c <rtems_bdpart_dump+0xa8>
        <== NOT EXECUTED
40002fd8:	17 10 00 8b 	sethi  %hi(0x40022c00), %o3
                   <== NOT EXECUTED
          type = "FAT 16";
                                           
40002fdc:	10 bf ff e7 	b  40002f78 <rtems_bdpart_dump+0xc4>
          <== NOT EXECUTED
40002fe0:	96 12 e2 e8 	or  %o3, 0x2e8, %o3	! 40022ee8 <rtems_test_name+0x110>
<== NOT EXECUTED

                                                                     

400031a8 <rtems_bdpart_get_disk_data>: {
400031a8:	9d e3 bf 98 	save  %sp, -104, %sp
                          
  fd = open( disk_name, O_RDWR);
                                     
400031ac:	92 10 20 02 	mov  2, %o1
                                   
400031b0:	90 10 00 18 	mov  %i0, %o0
                                 
  rtems_disk_device *dd = NULL;
                                      
400031b4:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  fd = open( disk_name, O_RDWR);
                                     
400031b8:	40 00 13 42 	call  40007ec0 <open>
                         
400031bc:	b0 10 20 03 	mov  3, %i0
                                   
  if (fd < 0) {
                                                      
400031c0:	80 a2 20 00 	cmp  %o0, 0
                                   
400031c4:	06 80 00 0b 	bl  400031f0 <rtems_bdpart_get_disk_data+0x48>
<== NEVER TAKEN
400031c8:	ba 10 00 08 	mov  %o0, %i5
                                 
400031cc:	94 07 bf fc 	add  %fp, -4, %o2
                             
400031d0:	13 10 01 10 	sethi  %hi(0x40044000), %o1
                   
400031d4:	40 00 10 74 	call  400073a4 <ioctl>
                        
400031d8:	92 12 62 09 	or  %o1, 0x209, %o1	! 40044209 <__end+0x1ceb9>

  if (rv != 0) {
                                                     
400031dc:	80 a2 20 00 	cmp  %o0, 0
                                   
400031e0:	02 80 00 06 	be  400031f8 <rtems_bdpart_get_disk_data+0x50>
<== ALWAYS TAKEN
400031e4:	c2 07 bf fc 	ld  [ %fp + -4 ], %g1
                         
    close( fd);
                                                      
400031e8:	40 00 0f 86 	call  40007000 <close>
                        
400031ec:	90 10 00 1d 	mov  %i5, %o0
                                 
}
                                                                    
400031f0:	81 c7 e0 08 	ret 
                                          
400031f4:	81 e8 00 00 	restore 
                                      
  *disk_end = dd->size;
                                              
400031f8:	c4 00 60 1c 	ld  [ %g1 + 0x1c ], %g2
                       
  disk_begin = dd->start;
                                            
400031fc:	c8 00 60 18 	ld  [ %g1 + 0x18 ], %g4
                       
  *disk_end = dd->size;
                                              
40003200:	c4 26 c0 00 	st  %g2, [ %i3 ]
                              
  if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
                        
40003204:	c6 00 60 24 	ld  [ %g1 + 0x24 ], %g3
                       
40003208:	80 a0 e1 ff 	cmp  %g3, 0x1ff
                               
4000320c:	18 80 00 0b 	bgu  40003238 <rtems_bdpart_get_disk_data+0x90>
<== ALWAYS TAKEN
40003210:	84 10 20 01 	mov  1, %g2
                                   
  if (disk_begin != 0) {
                                             
40003214:	80 88 a0 ff 	btst  0xff, %g2
                               
40003218:	12 80 00 04 	bne  40003228 <rtems_bdpart_get_disk_data+0x80>
<== NEVER TAKEN
4000321c:	80 a1 20 00 	cmp  %g4, 0
                                   
40003220:	02 80 00 08 	be  40003240 <rtems_bdpart_get_disk_data+0x98>
<== ALWAYS TAKEN
40003224:	80 a6 60 00 	cmp  %i1, 0
                                   
    sc = RTEMS_IO_ERROR;
                                             
40003228:	b0 10 20 1b 	mov  0x1b, %i0
                                <== NOT EXECUTED
    close( fd);
                                                      
4000322c:	40 00 0f 75 	call  40007000 <close>
                        <== NOT EXECUTED
40003230:	90 10 00 1d 	mov  %i5, %o0
                                 <== NOT EXECUTED
40003234:	30 bf ff ef 	b,a   400031f0 <rtems_bdpart_get_disk_data+0x48>
<== NOT EXECUTED
  if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
                        
40003238:	10 bf ff f7 	b  40003214 <rtems_bdpart_get_disk_data+0x6c>
 
4000323c:	84 10 20 00 	clr  %g2
                                      
  if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
  
40003240:	02 80 00 08 	be  40003260 <rtems_bdpart_get_disk_data+0xb8>

40003244:	80 a6 a0 00 	cmp  %i2, 0
                                   
40003248:	02 bf ff e8 	be  400031e8 <rtems_bdpart_get_disk_data+0x40>
<== NEVER TAKEN
4000324c:	b0 10 20 00 	clr  %i0
                                      
    *fd_ptr = fd;
                                                    
40003250:	fa 26 40 00 	st  %i5, [ %i1 ]
                              
    *dd_ptr = dd;
                                                    
40003254:	c2 26 80 00 	st  %g1, [ %i2 ]
                              
40003258:	81 c7 e0 08 	ret 
                                          
4000325c:	81 e8 00 00 	restore 
                                      
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
40003260:	10 bf ff e2 	b  400031e8 <rtems_bdpart_get_disk_data+0x40>
 
40003264:	b0 10 20 00 	clr  %i0
                                      

                                                                     

40003268 <rtems_bdpart_read>: const char *disk_name, rtems_bdpart_format *format, rtems_bdpart_partition *pt, size_t *count ) {
40003268:	9d e3 bf 88 	save  %sp, -120, %sp
                          
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
  rtems_status_code esc = RTEMS_SUCCESSFUL;
                          
  rtems_bdbuf_buffer *block = NULL;
                                  
  rtems_bdpart_partition *p = pt - 1;
                                
4000326c:	82 06 bf d0 	add  %i2, -48, %g1
                            
  rtems_bdbuf_buffer *block = NULL;
                                  
40003270:	c0 27 bf e8 	clr  [ %fp + -24 ]
                            
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);

40003274:	80 a6 e0 00 	cmp  %i3, 0
                                   
40003278:	02 80 00 17 	be  400032d4 <rtems_bdpart_read+0x6c>
         <== NEVER TAKEN
4000327c:	c2 27 bf ec 	st  %g1, [ %fp + -20 ]
                        
  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;
                                                       
40003280:	82 10 3f ff 	mov  -1, %g1
                                  
  rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
     
40003284:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            
  rtems_disk_device *dd = NULL;
                                      

                                                                     
  /* Check parameter */
                                              
  if (format == NULL || pt == NULL || count == NULL) {
               
40003288:	80 a6 60 00 	cmp  %i1, 0
                                   
  rtems_blkdev_bnum disk_end = 0;
                                    
4000328c:	c0 27 bf f4 	clr  [ %fp + -12 ]
                            
  int fd = -1;
                                                       
40003290:	c2 27 bf f8 	st  %g1, [ %fp + -8 ]
                         
  rtems_disk_device *dd = NULL;
                                      
40003294:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  if (format == NULL || pt == NULL || count == NULL) {
               
40003298:	02 80 00 0f 	be  400032d4 <rtems_bdpart_read+0x6c>
         <== NEVER TAKEN
4000329c:	fa 06 c0 00 	ld  [ %i3 ], %i5
                              
400032a0:	80 a6 a0 00 	cmp  %i2, 0
                                   
400032a4:	02 80 00 0c 	be  400032d4 <rtems_bdpart_read+0x6c>
         <== NEVER TAKEN
400032a8:	90 10 00 18 	mov  %i0, %o0
                                 
    return RTEMS_INVALID_ADDRESS;
                                    
  }
                                                                  

                                                                     
  /* Set count to a save value */
                                    
  *count = 0;
                                                        
400032ac:	c0 26 c0 00 	clr  [ %i3 ]
                                  

                                                                     
  /* Get disk data */
                                                
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
400032b0:	96 07 bf f4 	add  %fp, -12, %o3
                            
400032b4:	94 07 bf fc 	add  %fp, -4, %o2
                             
400032b8:	7f ff ff bc 	call  400031a8 <rtems_bdpart_get_disk_data>
   
400032bc:	92 07 bf f8 	add  %fp, -8, %o1
                             
  if (sc != RTEMS_SUCCESSFUL) {
                                      
400032c0:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
400032c4:	02 80 00 06 	be  400032dc <rtems_bdpart_read+0x74>
         <== ALWAYS TAKEN
400032c8:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
  if (block != NULL) {
                                               
    rtems_bdbuf_release( block);
                                     
  }
                                                                  

                                                                     
  return esc;
                                                        
}
                                                                    
400032cc:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400032d0:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    return RTEMS_INVALID_ADDRESS;
                                    
400032d4:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400032d8:	91 e8 20 09 	restore  %g0, 9, %o0
                          <== NOT EXECUTED
  sc = rtems_bdpart_read_record( dd, 0, &block);
                     
400032dc:	92 10 20 00 	clr  %o1
                                      
400032e0:	7f ff ff 7d 	call  400030d4 <rtems_bdpart_read_record>
     
400032e4:	94 07 bf e8 	add  %fp, -24, %o2
                            
  if (sc != RTEMS_SUCCESSFUL) {
                                      
400032e8:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
400032ec:	02 80 00 10 	be  4000332c <rtems_bdpart_read+0xc4>
         <== ALWAYS TAKEN
400032f0:	c2 07 bf e8 	ld  [ %fp + -24 ], %g1
                        
  if (fd >= 0) {
                                                     
400032f4:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
400032f8:	80 a2 20 00 	cmp  %o0, 0
                                   
400032fc:	26 80 00 05 	bl,a   40003310 <rtems_bdpart_read+0xa8>
      <== NEVER TAKEN
40003300:	d0 07 bf e8 	ld  [ %fp + -24 ], %o0
                        <== NOT EXECUTED
    close( fd);
                                                      
40003304:	40 00 0f 3f 	call  40007000 <close>
                        
40003308:	01 00 00 00 	nop 
                                          
  if (block != NULL) {
                                               
4000330c:	d0 07 bf e8 	ld  [ %fp + -24 ], %o0
                        
40003310:	80 a2 20 00 	cmp  %o0, 0
                                   
40003314:	02 80 00 04 	be  40003324 <rtems_bdpart_read+0xbc>
         <== NEVER TAKEN
40003318:	01 00 00 00 	nop 
                                          
    rtems_bdbuf_release( block);
                                     
4000331c:	40 00 3c 5c 	call  4001248c <rtems_bdbuf_release>
          
40003320:	01 00 00 00 	nop 
                                          
}
                                                                    
40003324:	81 c7 e0 08 	ret 
                                          
40003328:	81 e8 00 00 	restore 
                                      
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
            
4000332c:	e2 00 60 1c 	ld  [ %g1 + 0x1c ], %l1
                       
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);

40003330:	b9 2f 60 01 	sll  %i5, 1, %i4
                              
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
            
40003334:	a0 04 61 be 	add  %l1, 0x1be, %l0
                          
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);

40003338:	b8 07 00 1d 	add  %i4, %i5, %i4
                            
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
 
4000333c:	96 07 bf f0 	add  %fp, -16, %o3
                            
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);

40003340:	b9 2f 20 04 	sll  %i4, 4, %i4
                              
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
 
40003344:	92 07 bf ec 	add  %fp, -20, %o1
                            
  const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);

40003348:	b8 06 80 1c 	add  %i2, %i4, %i4
                            
  sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
 
4000334c:	90 10 00 10 	mov  %l0, %o0
                                 
40003350:	7f ff ff 25 	call  40002fe4 <rtems_bdpart_read_mbr_partition>

40003354:	94 10 00 1c 	mov  %i4, %o2
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40003358:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
4000335c:	32 bf ff e7 	bne,a   400032f8 <rtems_bdpart_read+0x90>
     <== NEVER TAKEN
40003360:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         <== NOT EXECUTED
  if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {

40003364:	c2 07 bf ec 	ld  [ %fp + -20 ], %g1
                        
40003368:	c2 08 60 08 	ldub  [ %g1 + 8 ], %g1
                        
4000336c:	80 a0 60 ee 	cmp  %g1, 0xee
                                
40003370:	02 bf ff e1 	be  400032f4 <rtems_bdpart_read+0x8c>
         <== NEVER TAKEN
40003374:	b0 10 20 18 	mov  0x18, %i0
                                
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
                  
40003378:	c4 07 bf e8 	ld  [ %fp + -24 ], %g2
                        
  format->type = RTEMS_BDPART_FORMAT_MBR;
                            
4000337c:	c0 26 40 00 	clr  [ %i1 ]
                                  
  uint32_t value = 0;
                                                
40003380:	82 10 20 00 	clr  %g1
                                      
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
                  
40003384:	c8 00 a0 1c 	ld  [ %g2 + 0x1c ], %g4
                       
40003388:	84 01 21 bb 	add  %g4, 0x1bb, %g2
                          
4000338c:	88 01 21 b7 	add  %g4, 0x1b7, %g4
                          
    value = (value << 8) + data [i];
                                 
40003390:	c6 08 80 00 	ldub  [ %g2 ], %g3
                            
40003394:	83 28 60 08 	sll  %g1, 8, %g1
                              
40003398:	84 00 bf ff 	add  %g2, -1, %g2
                             
  for (i = 3; i >= 0; --i) {
                                         
4000339c:	80 a0 80 04 	cmp  %g2, %g4
                                 
400033a0:	12 bf ff fc 	bne  40003390 <rtems_bdpart_read+0x128>
       
400033a4:	82 00 c0 01 	add  %g3, %g1, %g1
                            
  format->mbr.disk_id = rtems_uint32_from_little_endian(
             
400033a8:	c2 26 60 04 	st  %g1, [ %i1 + 4 ]
                          
  format->mbr.dos_compatibility = true;
                              
400033ac:	82 10 20 01 	mov  1, %g1
                                   
400033b0:	c2 2e 60 08 	stb  %g1, [ %i1 + 8 ]
                         
400033b4:	a2 04 61 ee 	add  %l1, 0x1ee, %l1
                          
    data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
                       
400033b8:	a0 04 20 10 	add  %l0, 0x10, %l0
                           
    sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);

400033bc:	96 07 bf f0 	add  %fp, -16, %o3
                            
400033c0:	94 10 00 1c 	mov  %i4, %o2
                                 
400033c4:	92 07 bf ec 	add  %fp, -20, %o1
                            
400033c8:	7f ff ff 07 	call  40002fe4 <rtems_bdpart_read_mbr_partition>

400033cc:	90 10 00 10 	mov  %l0, %o0
                                 
    if (sc != RTEMS_SUCCESSFUL) {
                                    
400033d0:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
400033d4:	12 bf ff c8 	bne  400032f4 <rtems_bdpart_read+0x8c>
        <== NEVER TAKEN
400033d8:	80 a4 40 10 	cmp  %l1, %l0
                                 
  for (i = 1; i < 4; ++i) {
                                          
400033dc:	32 bf ff f8 	bne,a   400033bc <rtems_bdpart_read+0x154>
    
400033e0:	a0 04 20 10 	add  %l0, 0x10, %l0
                           
  ebr = ep_begin;
                                                    
400033e4:	fa 07 bf f0 	ld  [ %fp + -16 ], %i5
                        
  while (ebr != 0) {
                                                 
400033e8:	80 a7 60 00 	cmp  %i5, 0
                                   
400033ec:	02 80 00 2c 	be  4000349c <rtems_bdpart_read+0x234>
        <== NEVER TAKEN
400033f0:	c8 07 bf ec 	ld  [ %fp + -20 ], %g4
                        
    sc = rtems_bdpart_read_record( dd, ebr, &block);
                 
400033f4:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
400033f8:	94 07 bf e8 	add  %fp, -24, %o2
                            
400033fc:	7f ff ff 36 	call  400030d4 <rtems_bdpart_read_record>
     
40003400:	92 10 00 1d 	mov  %i5, %o1
                                 
    if (sc != RTEMS_SUCCESSFUL) {
                                    
40003404:	80 a2 20 00 	cmp  %o0, 0
                                   
40003408:	12 80 00 36 	bne  400034e0 <rtems_bdpart_read+0x278>
       <== NEVER TAKEN
4000340c:	c2 07 bf e8 	ld  [ %fp + -24 ], %g1
                        
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
               
40003410:	d0 00 60 1c 	ld  [ %g1 + 0x1c ], %o0
                       
    sc = rtems_bdpart_read_mbr_partition(
                            
40003414:	96 10 20 00 	clr  %o3
                                      
40003418:	94 10 00 1c 	mov  %i4, %o2
                                 
4000341c:	92 07 bf ec 	add  %fp, -20, %o1
                            
40003420:	7f ff fe f1 	call  40002fe4 <rtems_bdpart_read_mbr_partition>

40003424:	90 02 21 be 	add  %o0, 0x1be, %o0
                          
    if (sc != RTEMS_SUCCESSFUL) {
                                    
40003428:	80 a2 20 00 	cmp  %o0, 0
                                   
4000342c:	12 80 00 2d 	bne  400034e0 <rtems_bdpart_read+0x278>
       <== NEVER TAKEN
40003430:	c8 07 bf ec 	ld  [ %fp + -20 ], %g4
                        
    tmp = p->begin + ebr;
                                            
40003434:	c2 01 00 00 	ld  [ %g4 ], %g1
                              
40003438:	84 00 40 1d 	add  %g1, %i5, %g2
                            
    if (tmp > p->begin) {
                                            
4000343c:	80 a0 40 02 	cmp  %g1, %g2
                                 
40003440:	3a bf ff ad 	bcc,a   400032f4 <rtems_bdpart_read+0x8c>
     <== NEVER TAKEN
40003444:	b0 10 20 1b 	mov  0x1b, %i0
                                <== NOT EXECUTED
      p->begin = tmp;
                                                
40003448:	c4 21 00 00 	st  %g2, [ %g4 ]
                              
    tmp = p->end + ebr;
                                              
4000344c:	c2 01 20 04 	ld  [ %g4 + 4 ], %g1
                          
40003450:	ba 00 40 1d 	add  %g1, %i5, %i5
                            
    if (tmp > p->end) {
                                              
40003454:	80 a0 40 1d 	cmp  %g1, %i5
                                 
40003458:	1a 80 00 20 	bcc  400034d8 <rtems_bdpart_read+0x270>
       <== NEVER TAKEN
4000345c:	c4 07 bf e8 	ld  [ %fp + -24 ], %g2
                        
      block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
                
40003460:	f2 00 a0 1c 	ld  [ %g2 + 0x1c ], %i1
                       
      p->end = tmp;
                                                  
40003464:	fa 21 20 04 	st  %i5, [ %g4 + 4 ]
                          
  uint32_t value = 0;
                                                
40003468:	82 10 20 00 	clr  %g1
                                      
4000346c:	84 06 61 d9 	add  %i1, 0x1d9, %g2
                          
40003470:	ba 06 61 d5 	add  %i1, 0x1d5, %i5
                          
    value = (value << 8) + data [i];
                                 
40003474:	c6 08 80 00 	ldub  [ %g2 ], %g3
                            
40003478:	83 28 60 08 	sll  %g1, 8, %g1
                              
4000347c:	84 00 bf ff 	add  %g2, -1, %g2
                             
  for (i = 3; i >= 0; --i) {
                                         
40003480:	80 a7 40 02 	cmp  %i5, %g2
                                 
40003484:	12 bf ff fc 	bne  40003474 <rtems_bdpart_read+0x20c>
       
40003488:	82 00 c0 01 	add  %g3, %g1, %g1
                            
  if (type == RTEMS_BDPART_MBR_EXTENDED) {
                           
4000348c:	c4 0e 61 d2 	ldub  [ %i1 + 0x1d2 ], %g2
                    
40003490:	80 a0 a0 05 	cmp  %g2, 5
                                   
40003494:	02 80 00 0a 	be  400034bc <rtems_bdpart_read+0x254>
        
40003498:	80 a0 60 00 	cmp  %g1, 0
                                   
  *count = (size_t) (p - pt + 1);
                                    
4000349c:	82 21 00 1a 	sub  %g4, %i2, %g1
                            
400034a0:	05 2a aa aa 	sethi  %hi(0xaaaaa800), %g2
                   
400034a4:	83 38 60 04 	sra  %g1, 4, %g1
                              
400034a8:	84 10 a2 ab 	or  %g2, 0x2ab, %g2
                           
400034ac:	82 58 40 02 	smul  %g1, %g2, %g1
                           
400034b0:	82 00 60 01 	inc  %g1
                                      
400034b4:	10 bf ff 90 	b  400032f4 <rtems_bdpart_read+0x8c>
          
400034b8:	c2 26 c0 00 	st  %g1, [ %i3 ]
                              
    if (ebr != 0) {
                                                  
400034bc:	22 bf ff f9 	be,a   400034a0 <rtems_bdpart_read+0x238>
     <== NEVER TAKEN
400034c0:	82 21 00 1a 	sub  %g4, %i2, %g1
                            <== NOT EXECUTED
      tmp = ebr + ep_begin;
                                          
400034c4:	fa 07 bf f0 	ld  [ %fp + -16 ], %i5
                        
400034c8:	ba 00 40 1d 	add  %g1, %i5, %i5
                            
      if (tmp > ebr) {
                                               
400034cc:	80 a7 40 01 	cmp  %i5, %g1
                                 
400034d0:	18 bf ff ca 	bgu  400033f8 <rtems_bdpart_read+0x190>
       <== ALWAYS TAKEN
400034d4:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
      esc = RTEMS_IO_ERROR;
                                          
400034d8:	10 bf ff 87 	b  400032f4 <rtems_bdpart_read+0x8c>
          <== NOT EXECUTED
400034dc:	b0 10 20 1b 	mov  0x1b, %i0
                                <== NOT EXECUTED
    sc = rtems_bdpart_read_mbr_partition(
                            
400034e0:	10 bf ff 85 	b  400032f4 <rtems_bdpart_read+0x8c>
          <== NOT EXECUTED
400034e4:	b0 10 00 08 	mov  %o0, %i0
                                 <== NOT EXECUTED

                                                                     

40003524 <rtems_bdpart_register>: rtems_status_code rtems_bdpart_register( const char *disk_name, const rtems_bdpart_partition *pt, size_t count ) {
40003524:	9d e3 bf 90 	save  %sp, -112, %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;
                                                       
40003528:	82 10 3f ff 	mov  -1, %g1
                                  
  rtems_disk_device *dd = NULL;
                                      

                                                                     
  /* Get disk data */
                                                
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
4000352c:	90 10 00 18 	mov  %i0, %o0
                                 
{
                                                                    
40003530:	b8 10 00 18 	mov  %i0, %i4
                                 
  rtems_blkdev_bnum disk_end = 0;
                                    
40003534:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
40003538:	96 07 bf f0 	add  %fp, -16, %o3
                            
  char *logical_disk_marker = NULL;
                                  
4000353c:	c0 27 bf f4 	clr  [ %fp + -12 ]
                            
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
40003540:	94 07 bf fc 	add  %fp, -4, %o2
                             
  int fd = -1;
                                                       
40003544:	c2 27 bf f8 	st  %g1, [ %fp + -8 ]
                         
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
40003548:	92 07 bf f8 	add  %fp, -8, %o1
                             
4000354c:	7f ff ff 17 	call  400031a8 <rtems_bdpart_get_disk_data>
   
40003550:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40003554:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
40003558:	12 80 00 24 	bne  400035e8 <rtems_bdpart_register+0xc4>
    <== NEVER TAKEN
4000355c:	92 07 bf f4 	add  %fp, -12, %o1
                            
    return sc;
                                                       
  }
                                                                  

                                                                     
  /* Create logical disk name */
                                     
  logical_disk_name = create_logical_disk_name(
                      
40003560:	7f ff ff e2 	call  400034e8 <create_logical_disk_name>
     
40003564:	90 10 00 1c 	mov  %i4, %o0
                                 
    disk_name,
                                                       
    &logical_disk_marker
                                             
  );
                                                                 
  if (logical_disk_name == NULL) {
                                   
40003568:	b6 92 20 00 	orcc  %o0, 0, %i3
                             
4000356c:	02 80 00 1b 	be  400035d8 <rtems_bdpart_register+0xb4>
     <== NEVER TAKEN
40003570:	80 a6 a0 00 	cmp  %i2, 0
                                   
    esc = sc;
                                                        
    goto cleanup;
                                                    
  }
                                                                  

                                                                     
  /* Create a logical disk for each partition */
                     
  for (i = 0; i < count; ++i) {
                                      
40003574:	02 80 00 19 	be  400035d8 <rtems_bdpart_register+0xb4>
     <== NEVER TAKEN
40003578:	01 00 00 00 	nop 
                                          
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

4000357c:	21 10 00 8c 	sethi  %hi(0x40023000), %l0
                   
  for (i = 0; i < count; ++i) {
                                      
40003580:	ba 10 20 00 	clr  %i5
                                      
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

40003584:	10 80 00 0a 	b  400035ac <rtems_bdpart_register+0x88>
      
40003588:	a0 14 20 a0 	or  %l0, 0xa0, %l0
                            
      esc = sc;
                                                      
      goto cleanup;
                                                  
    }
                                                                

                                                                     
    /* Create logical disk */
                                        
    sc = rtems_blkdev_create_partition(
                              
4000358c:	d4 1e 40 00 	ldd  [ %i1 ], %o2
                             
40003590:	40 00 02 80 	call  40003f90 <rtems_blkdev_create_partition>

40003594:	96 22 c0 0a 	sub  %o3, %o2, %o3
                            
      logical_disk_name,
                                             
      disk_name,
                                                     
      p->begin,
                                                      
      p->end - p->begin
                                              
    );
                                                               
    if (sc != RTEMS_SUCCESSFUL) {
                                    
40003598:	80 a2 20 00 	cmp  %o0, 0
                                   
4000359c:	12 80 00 15 	bne  400035f0 <rtems_bdpart_register+0xcc>
    <== NEVER TAKEN
400035a0:	80 a6 80 1d 	cmp  %i2, %i5
                                 
  for (i = 0; i < count; ++i) {
                                      
400035a4:	02 80 00 0d 	be  400035d8 <rtems_bdpart_register+0xb4>
     
400035a8:	b2 06 60 30 	add  %i1, 0x30, %i1
                           
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

400035ac:	d0 07 bf f4 	ld  [ %fp + -12 ], %o0
                        
400035b0:	92 10 20 04 	mov  4, %o1
                                   
400035b4:	ba 07 60 01 	inc  %i5
                                      
400035b8:	94 10 00 10 	mov  %l0, %o2
                                 
400035bc:	40 00 49 12 	call  40015a04 <snprintf>
                     
400035c0:	96 10 00 1d 	mov  %i5, %o3
                                 
    sc = rtems_blkdev_create_partition(
                              
400035c4:	92 10 00 1c 	mov  %i4, %o1
                                 
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
                              
400035c8:	80 a2 20 03 	cmp  %o0, 3
                                   
400035cc:	04 bf ff f0 	ble  4000358c <rtems_bdpart_register+0x68>
    <== ALWAYS TAKEN
400035d0:	90 10 00 1b 	mov  %i3, %o0
                                 
    sc = RTEMS_INVALID_NAME;
                                         
400035d4:	b0 10 20 03 	mov  3, %i0
                                   <== NOT EXECUTED
    }
                                                                
  }
                                                                  

                                                                     
cleanup:
                                                             

                                                                     
  free( logical_disk_name);
                                          
400035d8:	40 00 0e ea 	call  40007180 <free>
                         
400035dc:	90 10 00 1b 	mov  %i3, %o0
                                 
  close( fd);
                                                        
400035e0:	40 00 0e 88 	call  40007000 <close>
                        
400035e4:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         

                                                                     
  return esc;
                                                        
}
                                                                    
400035e8:	81 c7 e0 08 	ret 
                                          
400035ec:	81 e8 00 00 	restore 
                                      
    sc = rtems_blkdev_create_partition(
                              
400035f0:	10 bf ff fa 	b  400035d8 <rtems_bdpart_register+0xb4>
      <== NOT EXECUTED
400035f4:	b0 10 00 08 	mov  %o0, %i0
                                 <== NOT EXECUTED

                                                                     

400035f8 <rtems_bdpart_register_from_disk>: rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name) {
400035f8:	9d e3 bc 88 	save  %sp, -888, %sp
                          
  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;
                 
400035fc:	82 10 20 10 	mov  0x10, %g1
                                

                                                                     
  /* Read partitions */
                                              
  sc = rtems_bdpart_read( disk_name, &format, pt, &count);
           
40003600:	96 07 bc e8 	add  %fp, -792, %o3
                           
  size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
                 
40003604:	c2 27 bc e8 	st  %g1, [ %fp + -792 ]
                       
  sc = rtems_bdpart_read( disk_name, &format, pt, &count);
           
40003608:	94 07 bd 00 	add  %fp, -768, %o2
                           
4000360c:	92 07 bc ec 	add  %fp, -788, %o1
                           
40003610:	7f ff ff 16 	call  40003268 <rtems_bdpart_read>
            
40003614:	90 10 00 18 	mov  %i0, %o0
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40003618:	80 a2 20 00 	cmp  %o0, 0
                                   
4000361c:	12 80 00 05 	bne  40003630 <rtems_bdpart_register_from_disk+0x38>
<== NEVER TAKEN
40003620:	d4 07 bc e8 	ld  [ %fp + -792 ], %o2
                       
    return sc;
                                                       
  }
                                                                  

                                                                     
  /* Register partitions */
                                          
  return rtems_bdpart_register( disk_name, pt, count);
               
40003624:	92 07 bd 00 	add  %fp, -768, %o1
                           
40003628:	7f ff ff bf 	call  40003524 <rtems_bdpart_register>
        
4000362c:	90 10 00 18 	mov  %i0, %o0
                                 
}
                                                                    
40003630:	81 c7 e0 08 	ret 
                                          
40003634:	91 e8 00 08 	restore  %g0, %o0, %o0
                        

                                                                     

40003638 <rtems_bdpart_unregister>: rtems_status_code rtems_bdpart_unregister( const char *disk_name, const rtems_bdpart_partition *pt RTEMS_UNUSED, size_t count ) {
40003638:	9d e3 bf 90 	save  %sp, -112, %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;
                                                       
4000363c:	82 10 3f ff 	mov  -1, %g1
                                  
  rtems_blkdev_bnum disk_end = 0;
                                    
40003640:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            
  rtems_disk_device *dd = NULL;
                                      

                                                                     
  /* Get disk data */
                                                
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
40003644:	96 07 bf f0 	add  %fp, -16, %o3
                            
  char *logical_disk_marker = NULL;
                                  
40003648:	c0 27 bf f4 	clr  [ %fp + -12 ]
                            
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
4000364c:	94 07 bf fc 	add  %fp, -4, %o2
                             
  int fd = -1;
                                                       
40003650:	c2 27 bf f8 	st  %g1, [ %fp + -8 ]
                         
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
40003654:	92 07 bf f8 	add  %fp, -8, %o1
                             
  rtems_disk_device *dd = NULL;
                                      
40003658:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
4000365c:	7f ff fe d3 	call  400031a8 <rtems_bdpart_get_disk_data>
   
40003660:	90 10 00 18 	mov  %i0, %o0
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40003664:	b8 92 20 00 	orcc  %o0, 0, %i4
                             
40003668:	02 80 00 04 	be  40003678 <rtems_bdpart_unregister+0x40>
   <== ALWAYS TAKEN
4000366c:	92 07 bf f4 	add  %fp, -12, %o1
                            

                                                                     
  free( logical_disk_name);
                                          
  close( fd);
                                                        

                                                                     
  return esc;
                                                        
}
                                                                    
40003670:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40003674:	91 e8 00 1c 	restore  %g0, %i4, %o0
                        <== NOT EXECUTED
  logical_disk_name = create_logical_disk_name(
                      
40003678:	7f ff ff 9c 	call  400034e8 <create_logical_disk_name>
     
4000367c:	90 10 00 18 	mov  %i0, %o0
                                 
  if (logical_disk_name == NULL) {
                                   
40003680:	b6 92 20 00 	orcc  %o0, 0, %i3
                             
40003684:	02 80 00 19 	be  400036e8 <rtems_bdpart_unregister+0xb0>
   <== NEVER TAKEN
40003688:	80 a6 a0 00 	cmp  %i2, 0
                                   
  for (i = 0; i < count; ++i) {
                                      
4000368c:	02 80 00 17 	be  400036e8 <rtems_bdpart_unregister+0xb0>
   <== NEVER TAKEN
40003690:	01 00 00 00 	nop 
                                          
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

40003694:	33 10 00 8c 	sethi  %hi(0x40023000), %i1
                   
  for (i = 0; i < count; ++i) {
                                      
40003698:	ba 10 20 00 	clr  %i5
                                      
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

4000369c:	10 80 00 09 	b  400036c0 <rtems_bdpart_unregister+0x88>
    
400036a0:	b2 16 60 a0 	or  %i1, 0xa0, %i1
                            
    rv = unlink( logical_disk_name);
                                 
400036a4:	40 00 17 7f 	call  400094a0 <unlink>
                       
400036a8:	90 10 00 1b 	mov  %i3, %o0
                                 
    if (rv != 0) {
                                                   
400036ac:	80 a2 20 00 	cmp  %o0, 0
                                   
400036b0:	12 80 00 0e 	bne  400036e8 <rtems_bdpart_unregister+0xb0>
  <== NEVER TAKEN
400036b4:	80 a6 80 1d 	cmp  %i2, %i5
                                 
  for (i = 0; i < count; ++i) {
                                      
400036b8:	02 80 00 0c 	be  400036e8 <rtems_bdpart_unregister+0xb0>
   
400036bc:	01 00 00 00 	nop 
                                          
  rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);

400036c0:	d0 07 bf f4 	ld  [ %fp + -12 ], %o0
                        
400036c4:	ba 07 60 01 	inc  %i5
                                      
400036c8:	94 10 00 19 	mov  %i1, %o2
                                 
400036cc:	96 10 00 1d 	mov  %i5, %o3
                                 
400036d0:	40 00 48 cd 	call  40015a04 <snprintf>
                     
400036d4:	92 10 20 04 	mov  4, %o1
                                   
  if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
                              
400036d8:	80 a2 20 03 	cmp  %o0, 3
                                   
400036dc:	04 bf ff f2 	ble  400036a4 <rtems_bdpart_unregister+0x6c>
  <== ALWAYS TAKEN
400036e0:	01 00 00 00 	nop 
                                          
    sc = RTEMS_INVALID_NAME;
                                         
400036e4:	b8 10 20 03 	mov  3, %i4	! 3 <_TLS_Alignment+0x2>
          <== NOT EXECUTED
  free( logical_disk_name);
                                          
400036e8:	40 00 0e a6 	call  40007180 <free>
                         
400036ec:	90 10 00 1b 	mov  %i3, %o0
                                 
  close( fd);
                                                        
400036f0:	40 00 0e 44 	call  40007000 <close>
                        
400036f4:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
}
                                                                    
400036f8:	81 c7 e0 08 	ret 
                                          
400036fc:	91 e8 00 1c 	restore  %g0, %i4, %o0
                        

                                                                     

40003790 <rtems_bdpart_write>: const char *disk_name, const rtems_bdpart_format *format, const rtems_bdpart_partition *pt, size_t count ) {
40003790:	9d e3 bf 88 	save  %sp, -120, %sp
                          
  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;
                                
40003794:	80 a6 60 00 	cmp  %i1, 0
                                   
40003798:	22 80 00 07 	be,a   400037b4 <rtems_bdpart_write+0x24>
     <== NEVER TAKEN
4000379c:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            <== NOT EXECUTED
    && format->type == RTEMS_BDPART_FORMAT_MBR
                       
400037a0:	c2 06 40 00 	ld  [ %i1 ], %g1
                              
400037a4:	80 a0 60 00 	cmp  %g1, 0
                                   
400037a8:	22 80 00 4e 	be,a   400038e0 <rtems_bdpart_write+0x150>
    <== ALWAYS TAKEN
400037ac:	c2 0e 60 08 	ldub  [ %i1 + 8 ], %g1
                        
  rtems_bdbuf_buffer *block = NULL;
                                  
400037b0:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            <== NOT EXECUTED
  rtems_blkdev_bnum disk_end = 0;
                                    
400037b4:	a2 10 20 00 	clr  %l1
                                      <== NOT EXECUTED
400037b8:	c0 27 bf f4 	clr  [ %fp + -12 ]
                            <== NOT EXECUTED
  rtems_blkdev_bnum record_space =
                                   
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
          
400037bc:	a0 10 20 01 	mov  1, %l0
                                   <== NOT EXECUTED
  size_t ppc = 0; /* Primary partition count */
                      
  size_t i = 0;
                                                      
  uint8_t *data = NULL;
                                              
  int fd = -1;
                                                       
400037c0:	82 10 3f ff 	mov  -1, %g1
                                  
  rtems_disk_device *dd = NULL;
                                      
400037c4:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             

                                                                     
  /* Check if we have something to do */
                             
  if (count == 0) {
                                                  
    /* Nothing to do */
                                              
    return RTEMS_SUCCESSFUL;
                                         
400037c8:	ba 10 20 00 	clr  %i5
                                      
  if (count == 0) {
                                                  
400037cc:	80 a6 e0 00 	cmp  %i3, 0
                                   
400037d0:	02 80 00 42 	be  400038d8 <rtems_bdpart_write+0x148>
       <== NEVER TAKEN
400037d4:	c2 27 bf f8 	st  %g1, [ %fp + -8 ]
                         
  }
                                                                  

                                                                     
  /* Check parameter */
                                              
  if (format == NULL || pt == NULL) {
                                
400037d8:	80 a6 60 00 	cmp  %i1, 0
                                   
400037dc:	02 80 00 48 	be  400038fc <rtems_bdpart_write+0x16c>
       <== NEVER TAKEN
400037e0:	80 a6 a0 00 	cmp  %i2, 0
                                   
400037e4:	02 80 00 46 	be  400038fc <rtems_bdpart_write+0x16c>
       <== NEVER TAKEN
400037e8:	96 07 bf f4 	add  %fp, -12, %o3
                            
    return RTEMS_INVALID_ADDRESS;
                                    
  }
                                                                  

                                                                     
  /* Get disk data */
                                                
  sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
  
400037ec:	94 07 bf fc 	add  %fp, -4, %o2
                             
400037f0:	92 07 bf f8 	add  %fp, -8, %o1
                             
400037f4:	7f ff fe 6d 	call  400031a8 <rtems_bdpart_get_disk_data>
   
400037f8:	90 10 00 18 	mov  %i0, %o0
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
400037fc:	ba 92 20 00 	orcc  %o0, 0, %i5
                             
40003800:	12 80 00 36 	bne  400038d8 <rtems_bdpart_write+0x148>
      <== NEVER TAKEN
40003804:	80 a4 60 00 	cmp  %l1, 0
                                   
    return sc;
                                                       
  }
                                                                  

                                                                     
  /* Align end of disk on cylinder boundary if necessary */
          
  if (dos_compatibility) {
                                           
40003808:	02 80 00 09 	be  4000382c <rtems_bdpart_write+0x9c>
        <== NEVER TAKEN
4000380c:	c8 07 bf f4 	ld  [ %fp + -12 ], %g4
                        
    disk_end -= (disk_end % record_space);
                           
40003810:	81 80 20 00 	wr  %g0, %y
                                   
40003814:	01 00 00 00 	nop 
                                          
40003818:	01 00 00 00 	nop 
                                          
4000381c:	01 00 00 00 	nop 
                                          
40003820:	82 71 00 10 	udiv  %g4, %l0, %g1
                           
40003824:	88 58 40 10 	smul  %g1, %l0, %g4
                           
40003828:	c8 27 bf f4 	st  %g4, [ %fp + -12 ]
                        
  /* 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) {
                 
4000382c:	f0 06 80 00 	ld  [ %i2 ], %i0
                              
40003830:	80 a6 00 04 	cmp  %i0, %g4
                                 
40003834:	3a 80 00 1d 	bcc,a   400038a8 <rtems_bdpart_write+0x118>
   <== NEVER TAKEN
40003838:	ba 10 20 0a 	mov  0xa, %i5
                                 <== NOT EXECUTED
4000383c:	c2 06 a0 04 	ld  [ %i2 + 4 ], %g1
                          
      esc = RTEMS_INVALID_NUMBER;
                                    
      goto cleanup;
                                                  
    }
                                                                

                                                                     
    /* Check that begin and end are valid */
                         
    if (p->begin >= p->end) {
                                        
40003840:	80 a1 00 01 	cmp  %g4, %g1
                                 
40003844:	0a 80 00 18 	bcs  400038a4 <rtems_bdpart_write+0x114>
      <== NEVER TAKEN
40003848:	80 a6 00 01 	cmp  %i0, %g1
                                 
4000384c:	3a 80 00 17 	bcc,a   400038a8 <rtems_bdpart_write+0x118>
   <== NEVER TAKEN
40003850:	ba 10 20 0a 	mov  0xa, %i5
                                 <== NOT EXECUTED
40003854:	82 06 a0 04 	add  %i2, 4, %g1
                              
40003858:	b8 10 20 00 	clr  %i4
                                      
  for (i = 0; i < count; ++i) {
                                      
4000385c:	b8 07 20 01 	inc  %i4
                                      
40003860:	80 a6 c0 1c 	cmp  %i3, %i4
                                 
40003864:	22 80 00 29 	be,a   40003908 <rtems_bdpart_write+0x178>
    
40003868:	c2 06 40 00 	ld  [ %i1 ], %g1
                              
    if (p->begin >= disk_end || p->end > disk_end) {
                 
4000386c:	c4 00 60 2c 	ld  [ %g1 + 0x2c ], %g2
                       
40003870:	80 a0 80 04 	cmp  %g2, %g4
                                 
40003874:	1a 80 00 0d 	bcc  400038a8 <rtems_bdpart_write+0x118>
      <== NEVER TAKEN
40003878:	ba 10 20 0a 	mov  0xa, %i5
                                 
4000387c:	c6 00 60 30 	ld  [ %g1 + 0x30 ], %g3
                       
    if (p->begin >= p->end) {
                                        
40003880:	80 a0 80 03 	cmp  %g2, %g3
                                 
40003884:	1a 80 00 09 	bcc  400038a8 <rtems_bdpart_write+0x118>
      <== NEVER TAKEN
40003888:	80 a1 00 03 	cmp  %g4, %g3
                                 
4000388c:	0a 80 00 08 	bcs  400038ac <rtems_bdpart_write+0x11c>
      <== NEVER TAKEN
40003890:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
      esc = RTEMS_INVALID_NUMBER;
                                    
      goto cleanup;
                                                  
    }
                                                                

                                                                     
    /* Check that partitions do not overlap */
                       
    if (i > 0 && pt [i - 1].end > p->begin) {
                        
40003894:	c6 00 40 00 	ld  [ %g1 ], %g3
                              
40003898:	80 a0 80 03 	cmp  %g2, %g3
                                 
4000389c:	3a bf ff f0 	bcc,a   4000385c <rtems_bdpart_write+0xcc>
    <== ALWAYS TAKEN
400038a0:	82 00 60 30 	add  %g1, 0x30, %g1
                           
      esc = RTEMS_INVALID_NUMBER;
                                    
400038a4:	ba 10 20 0a 	mov  0xa, %i5
                                 <== NOT EXECUTED
    }
                                                                
  }
                                                                  

                                                                     
cleanup:
                                                             

                                                                     
  if (fd >= 0) {
                                                     
400038a8:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
400038ac:	80 a2 20 00 	cmp  %o0, 0
                                   
400038b0:	26 80 00 05 	bl,a   400038c4 <rtems_bdpart_write+0x134>
    <== NEVER TAKEN
400038b4:	d0 07 bf f0 	ld  [ %fp + -16 ], %o0
                        <== NOT EXECUTED
    close( fd);
                                                      
400038b8:	40 00 0d d2 	call  40007000 <close>
                        
400038bc:	01 00 00 00 	nop 
                                          
  }
                                                                  

                                                                     
  if (block != NULL) {
                                               
400038c0:	d0 07 bf f0 	ld  [ %fp + -16 ], %o0
                        
400038c4:	80 a2 20 00 	cmp  %o0, 0
                                   
400038c8:	02 80 00 04 	be  400038d8 <rtems_bdpart_write+0x148>
       <== NEVER TAKEN
400038cc:	01 00 00 00 	nop 
                                          
    rtems_bdbuf_sync( block);
                                        
400038d0:	40 00 3b 57 	call  4001262c <rtems_bdbuf_sync>
             
400038d4:	01 00 00 00 	nop 
                                          
  }
                                                                  

                                                                     
  return esc;
                                                        
}
                                                                    
400038d8:	81 c7 e0 08 	ret 
                                          
400038dc:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        
    && format->mbr.dos_compatibility;
                                
400038e0:	80 a0 60 00 	cmp  %g1, 0
                                   
400038e4:	02 bf ff b4 	be  400037b4 <rtems_bdpart_write+0x24>
        <== NEVER TAKEN
400038e8:	c0 27 bf f0 	clr  [ %fp + -16 ]
                            
400038ec:	a2 10 20 01 	mov  1, %l1
                                   
  rtems_blkdev_bnum disk_end = 0;
                                    
400038f0:	c0 27 bf f4 	clr  [ %fp + -12 ]
                            
    dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
          
400038f4:	10 bf ff b3 	b  400037c0 <rtems_bdpart_write+0x30>
         
400038f8:	a0 10 20 3f 	mov  0x3f, %l0
                                
    return RTEMS_INVALID_ADDRESS;
                                    
400038fc:	ba 10 20 09 	mov  9, %i5
                                   <== NOT EXECUTED
}
                                                                    
40003900:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40003904:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        <== NOT EXECUTED
  if (format->type != RTEMS_BDPART_FORMAT_MBR) {
                     
40003908:	80 a0 60 00 	cmp  %g1, 0
                                   
4000390c:	12 bf ff e7 	bne  400038a8 <rtems_bdpart_write+0x118>
      <== NEVER TAKEN
40003910:	ba 10 20 18 	mov  0x18, %i5
                                
  ppc = count <= 4 ? count : 3;
                                      
40003914:	80 a7 20 04 	cmp  %i4, 4
                                   
40003918:	08 80 00 bb 	bleu  40003c04 <rtems_bdpart_write+0x474>
     <== NEVER TAKEN
4000391c:	80 a4 60 00 	cmp  %l1, 0
                                   
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {

40003920:	12 80 00 c0 	bne  40003c20 <rtems_bdpart_write+0x490>
      <== ALWAYS TAKEN
40003924:	80 a6 20 3f 	cmp  %i0, 0x3f
                                
    if ((pt [i].begin - pt [i - 1].end) < record_space) {
            
40003928:	c2 06 a0 90 	ld  [ %i2 + 0x90 ], %g1
                       
4000392c:	c4 06 a0 64 	ld  [ %i2 + 0x64 ], %g2
                       
40003930:	82 20 40 02 	sub  %g1, %g2, %g1
                            
40003934:	80 a4 00 01 	cmp  %l0, %g1
                                 
40003938:	18 bf ff db 	bgu  400038a4 <rtems_bdpart_write+0x114>
      <== NEVER TAKEN
4000393c:	ba 06 bf d4 	add  %i2, -44, %i5
                            
40003940:	89 2f 20 01 	sll  %i4, 1, %g4
                              
40003944:	82 06 a0 94 	add  %i2, 0x94, %g1
                           
40003948:	88 01 00 1c 	add  %g4, %i4, %g4
                            
4000394c:	85 29 20 04 	sll  %g4, 4, %g2
                              
40003950:	10 80 00 08 	b  40003970 <rtems_bdpart_write+0x1e0>
        
40003954:	ba 07 40 02 	add  %i5, %g2, %i5
                            
40003958:	c4 00 e0 2c 	ld  [ %g3 + 0x2c ], %g2
                       
4000395c:	c6 00 c0 00 	ld  [ %g3 ], %g3
                              
40003960:	84 20 80 03 	sub  %g2, %g3, %g2
                            
40003964:	80 a0 80 10 	cmp  %g2, %l0
                                 
40003968:	0a bf ff cf 	bcs  400038a4 <rtems_bdpart_write+0x114>
      <== NEVER TAKEN
4000396c:	82 00 60 30 	add  %g1, 0x30, %g1
                           
  for (i = ppc; i < count; ++i) {
                                    
40003970:	80 a0 40 1d 	cmp  %g1, %i5
                                 
40003974:	12 bf ff f9 	bne  40003958 <rtems_bdpart_write+0x1c8>
      
40003978:	86 10 00 01 	mov  %g1, %g3
                                 
4000397c:	b0 10 20 03 	mov  3, %i0
                                   
40003980:	ba 06 a0 08 	add  %i2, 8, %i5
                              
40003984:	89 29 20 04 	sll  %g4, 4, %g4
                              
40003988:	b6 07 40 04 	add  %i5, %g4, %i3
                            
    if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
      
4000398c:	90 10 00 1d 	mov  %i5, %o0
                                 
    uint8_t type = 0;
                                                
40003990:	c0 2f bf ef 	clrb  [ %fp + -17 ]
                           
    if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
      
40003994:	7f ff fd f9 	call  40003178 <rtems_bdpart_to_mbr_partition_type>

40003998:	92 07 bf ef 	add  %fp, -17, %o1
                            
4000399c:	80 a2 20 00 	cmp  %o0, 0
                                   
400039a0:	22 bf ff c2 	be,a   400038a8 <rtems_bdpart_write+0x118>
    <== NEVER TAKEN
400039a4:	ba 10 20 04 	mov  4, %i5
                                   <== NOT EXECUTED
    if (p->flags > 0xffU) {
                                          
400039a8:	c2 07 60 20 	ld  [ %i5 + 0x20 ], %g1
                       
400039ac:	80 a0 60 00 	cmp  %g1, 0
                                   
400039b0:	32 bf ff be 	bne,a   400038a8 <rtems_bdpart_write+0x118>
   <== NEVER TAKEN
400039b4:	ba 10 20 04 	mov  4, %i5
                                   <== NOT EXECUTED
400039b8:	c2 07 60 24 	ld  [ %i5 + 0x24 ], %g1
                       
400039bc:	80 a0 60 ff 	cmp  %g1, 0xff
                                
400039c0:	38 bf ff ba 	bgu,a   400038a8 <rtems_bdpart_write+0x118>
   <== NEVER TAKEN
400039c4:	ba 10 20 04 	mov  4, %i5
                                   <== NOT EXECUTED
400039c8:	ba 07 60 30 	add  %i5, 0x30, %i5
                           
  for (i = 0; i < count; ++i) {
                                      
400039cc:	80 a6 c0 1d 	cmp  %i3, %i5
                                 
400039d0:	12 bf ff f0 	bne  40003990 <rtems_bdpart_write+0x200>
      
400039d4:	90 10 00 1d 	mov  %i5, %o0
                                 
  sc = rtems_bdpart_new_record( dd, 0, &block);
                      
400039d8:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
400039dc:	92 10 20 00 	clr  %o1
                                      
400039e0:	7f ff ff 48 	call  40003700 <rtems_bdpart_new_record>
      
400039e4:	94 07 bf f0 	add  %fp, -16, %o2
                            
  if (sc != RTEMS_SUCCESSFUL) {
                                      
400039e8:	ba 92 20 00 	orcc  %o0, 0, %i5
                             
400039ec:	12 bf ff b0 	bne  400038ac <rtems_bdpart_write+0x11c>
      <== NEVER TAKEN
400039f0:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
                  
400039f4:	c6 07 bf f0 	ld  [ %fp + -16 ], %g3
                        
  rtems_uint32_to_little_endian(
                                     
400039f8:	c2 06 60 04 	ld  [ %i1 + 4 ], %g1
                          
    block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
                  
400039fc:	c4 00 e0 1c 	ld  [ %g3 + 0x1c ], %g2
                       
{
                                                                    
  int i;
                                                             

                                                                     
  for (i = 0; i < 4; ++i) {
                                          
    data [i] = (uint8_t) value;
                                      
    value >>= 8;
                                                     
40003a00:	89 30 60 10 	srl  %g1, 0x10, %g4
                           
    data [i] = (uint8_t) value;
                                      
40003a04:	c2 28 a1 b8 	stb  %g1, [ %g2 + 0x1b8 ]
                     
    value >>= 8;
                                                     
40003a08:	b7 30 60 08 	srl  %g1, 8, %i3
                              
    data [i] = (uint8_t) value;
                                      
40003a0c:	c8 28 a1 ba 	stb  %g4, [ %g2 + 0x1ba ]
                     
    value >>= 8;
                                                     
40003a10:	83 30 60 18 	srl  %g1, 0x18, %g1
                           
    data [i] = (uint8_t) value;
                                      
40003a14:	f6 28 a1 b9 	stb  %i3, [ %g2 + 0x1b9 ]
                     
40003a18:	9b 2e 20 04 	sll  %i0, 4, %o5
                              
40003a1c:	c2 28 a1 bb 	stb  %g1, [ %g2 + 0x1bb ]
                     
40003a20:	82 03 61 be 	add  %o5, 0x1be, %g1
                          
  data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
            
40003a24:	d4 00 e0 1c 	ld  [ %g3 + 0x1c ], %o2
                       
40003a28:	98 02 a1 be 	add  %o2, 0x1be, %o4
                          
40003a2c:	88 10 00 1a 	mov  %i2, %g4
                                 
40003a30:	94 02 80 01 	add  %o2, %g1, %o2
                            
40003a34:	82 10 00 0c 	mov  %o4, %g1
                                 
    rtems_bdpart_write_mbr_partition(
                                
40003a38:	c6 01 00 00 	ld  [ %g4 ], %g3
                              
40003a3c:	c4 01 20 04 	ld  [ %g4 + 4 ], %g2
                          
40003a40:	f2 09 20 08 	ldub  [ %g4 + 8 ], %i1
                        
40003a44:	f6 01 20 2c 	ld  [ %g4 + 0x2c ], %i3
                       
40003a48:	84 20 80 03 	sub  %g2, %g3, %g2
                            
40003a4c:	c6 28 60 08 	stb  %g3, [ %g1 + 8 ]
                         
    value >>= 8;
                                                     
40003a50:	9f 30 e0 10 	srl  %g3, 0x10, %o7
                           
40003a54:	97 30 e0 08 	srl  %g3, 8, %o3
                              
40003a58:	87 30 e0 18 	srl  %g3, 0x18, %g3
                           
    data [i] = (uint8_t) value;
                                      
40003a5c:	c4 28 60 0c 	stb  %g2, [ %g1 + 0xc ]
                       
    data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
                       
40003a60:	82 00 60 10 	add  %g1, 0x10, %g1
                           
40003a64:	de 28 7f fa 	stb  %o7, [ %g1 + -6 ]
                        
    value >>= 8;
                                                     
40003a68:	9f 30 a0 08 	srl  %g2, 8, %o7
                              
    data [i] = (uint8_t) value;
                                      
40003a6c:	c6 28 7f fb 	stb  %g3, [ %g1 + -5 ]
                        
    value >>= 8;
                                                     
40003a70:	87 30 a0 10 	srl  %g2, 0x10, %g3
                           
    data [i] = (uint8_t) value;
                                      
40003a74:	d6 28 7f f9 	stb  %o3, [ %g1 + -7 ]
                        
    value >>= 8;
                                                     
40003a78:	85 30 a0 18 	srl  %g2, 0x18, %g2
                           
    data [i] = (uint8_t) value;
                                      
40003a7c:	de 28 7f fd 	stb  %o7, [ %g1 + -3 ]
                        
40003a80:	88 01 20 30 	add  %g4, 0x30, %g4
                           
40003a84:	c6 28 7f fe 	stb  %g3, [ %g1 + -2 ]
                        
40003a88:	c4 28 7f ff 	stb  %g2, [ %g1 + -1 ]
                        
  for (i = 0; i < ppc; ++i) {
                                        
40003a8c:	80 a0 40 0a 	cmp  %g1, %o2
                                 
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
                        
40003a90:	f2 28 7f f4 	stb  %i1, [ %g1 + -12 ]
                       
  for (i = 0; i < ppc; ++i) {
                                        
40003a94:	12 bf ff e9 	bne  40003a38 <rtems_bdpart_write+0x2a8>
      
40003a98:	f6 28 7f f0 	stb  %i3, [ %g1 + -16 ]
                       
  if (ppc != count) {
                                                
40003a9c:	80 a7 00 18 	cmp  %i4, %i0
                                 
40003aa0:	02 bf ff 82 	be  400038a8 <rtems_bdpart_write+0x118>
       <== NEVER TAKEN
40003aa4:	84 03 00 0d 	add  %o4, %o5, %g2
                            
    rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
      
40003aa8:	83 2e 20 01 	sll  %i0, 1, %g1
                              
40003aac:	82 00 40 18 	add  %g1, %i0, %g1
                            
40003ab0:	83 28 60 04 	sll  %g1, 4, %g1
                              
40003ab4:	e4 06 80 01 	ld  [ %i2 + %g1 ], %l2
                        
40003ab8:	a4 24 80 10 	sub  %l2, %l0, %l2
                            
    value >>= 8;
                                                     
40003abc:	89 34 a0 08 	srl  %l2, 8, %g4
                              
    rtems_bdpart_write_mbr_partition(
                                
40003ac0:	c6 07 bf f4 	ld  [ %fp + -12 ], %g3
                        
40003ac4:	b7 34 a0 10 	srl  %l2, 0x10, %i3
                           
    data [i] = (uint8_t) value;
                                      
40003ac8:	c8 28 a0 09 	stb  %g4, [ %g2 + 9 ]
                         
    value >>= 8;
                                                     
40003acc:	89 34 a0 18 	srl  %l2, 0x18, %g4
                           
40003ad0:	86 20 c0 12 	sub  %g3, %l2, %g3
                            
    data [i] = (uint8_t) value;
                                      
40003ad4:	f6 28 a0 0a 	stb  %i3, [ %g2 + 0xa ]
                       
    value >>= 8;
                                                     
40003ad8:	b7 30 e0 08 	srl  %g3, 8, %i3
                              
    data [i] = (uint8_t) value;
                                      
40003adc:	c8 28 a0 0b 	stb  %g4, [ %g2 + 0xb ]
                       
    value >>= 8;
                                                     
40003ae0:	89 30 e0 10 	srl  %g3, 0x10, %g4
                           
    data [i] = (uint8_t) value;
                                      
40003ae4:	c6 28 a0 0c 	stb  %g3, [ %g2 + 0xc ]
                       
    value >>= 8;
                                                     
40003ae8:	87 30 e0 18 	srl  %g3, 0x18, %g3
                           
    data [i] = (uint8_t) value;
                                      
40003aec:	f6 28 a0 0d 	stb  %i3, [ %g2 + 0xd ]
                       
    rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
      
40003af0:	b6 06 80 01 	add  %i2, %g1, %i3
                            
40003af4:	c6 28 a0 0f 	stb  %g3, [ %g2 + 0xf ]
                       
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
                        
40003af8:	86 10 20 05 	mov  5, %g3
                                   
40003afc:	e4 28 a0 08 	stb  %l2, [ %g2 + 8 ]
                         
40003b00:	c8 28 a0 0e 	stb  %g4, [ %g2 + 0xe ]
                       
40003b04:	c6 28 a0 04 	stb  %g3, [ %g2 + 4 ]
                         
    for (i = ppc; i < count; ++i) {
                                  
40003b08:	08 bf ff 68 	bleu  400038a8 <rtems_bdpart_write+0x118>
     <== NEVER TAKEN
40003b0c:	c0 2b 00 0d 	clrb  [ %o4 + %o5 ]
                           
40003b10:	82 00 60 30 	add  %g1, 0x30, %g1
                           
40003b14:	a2 10 00 18 	mov  %i0, %l1
                                 
40003b18:	b4 06 80 01 	add  %i2, %g1, %i2
                            
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
                        
40003b1c:	b2 10 20 05 	mov  5, %i1
                                   
      ebr = p->begin - record_space;
                                 
40003b20:	d2 06 c0 00 	ld  [ %i3 ], %o1
                              
      sc = rtems_bdpart_new_record( dd, ebr, &block);
                
40003b24:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
40003b28:	94 07 bf f0 	add  %fp, -16, %o2
                            
40003b2c:	7f ff fe f5 	call  40003700 <rtems_bdpart_new_record>
      
40003b30:	92 22 40 10 	sub  %o1, %l0, %o1
                            
      if (sc != RTEMS_SUCCESSFUL) {
                                  
40003b34:	80 a2 20 00 	cmp  %o0, 0
                                   
40003b38:	12 80 00 3e 	bne  40003c30 <rtems_bdpart_write+0x4a0>
      <== NEVER TAKEN
40003b3c:	de 07 bf f0 	ld  [ %fp + -16 ], %o7
                        
      rtems_bdpart_write_mbr_partition(
                              
40003b40:	da 06 c0 00 	ld  [ %i3 ], %o5
                              
40003b44:	c4 06 e0 04 	ld  [ %i3 + 4 ], %g2
                          
40003b48:	c8 0e e0 08 	ldub  [ %i3 + 8 ], %g4
                        
40003b4c:	c6 06 e0 2c 	ld  [ %i3 + 0x2c ], %g3
                       
        block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
             
40003b50:	c2 03 e0 1c 	ld  [ %o7 + 0x1c ], %g1
                       
      rtems_bdpart_write_mbr_partition(
                              
40003b54:	84 20 80 0d 	sub  %g2, %o5, %g2
                            
40003b58:	e0 28 61 c6 	stb  %l0, [ %g1 + 0x1c6 ]
                     
    value >>= 8;
                                                     
40003b5c:	97 30 a0 08 	srl  %g2, 8, %o3
                              
40003b60:	99 30 a0 10 	srl  %g2, 0x10, %o4
                           
40003b64:	9b 30 a0 18 	srl  %g2, 0x18, %o5
                           
    data [i] = (uint8_t) value;
                                      
40003b68:	c0 28 61 c7 	clrb  [ %g1 + 0x1c7 ]
                         
    for (i = ppc; i < count; ++i) {
                                  
40003b6c:	a2 04 60 01 	inc  %l1
                                      
40003b70:	c0 28 61 c8 	clrb  [ %g1 + 0x1c8 ]
                         
40003b74:	80 a4 40 1c 	cmp  %l1, %i4
                                 
40003b78:	c0 28 61 c9 	clrb  [ %g1 + 0x1c9 ]
                         
40003b7c:	b6 06 e0 30 	add  %i3, 0x30, %i3
                           
40003b80:	c4 28 61 ca 	stb  %g2, [ %g1 + 0x1ca ]
                     
40003b84:	d6 28 61 cb 	stb  %o3, [ %g1 + 0x1cb ]
                     
40003b88:	d8 28 61 cc 	stb  %o4, [ %g1 + 0x1cc ]
                     
40003b8c:	da 28 61 cd 	stb  %o5, [ %g1 + 0x1cd ]
                     
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
                        
40003b90:	c8 28 61 c2 	stb  %g4, [ %g1 + 0x1c2 ]
                     
    for (i = ppc; i < count; ++i) {
                                  
40003b94:	02 bf ff 45 	be  400038a8 <rtems_bdpart_write+0x118>
       
40003b98:	c6 28 61 be 	stb  %g3, [ %g1 + 0x1be ]
                     
40003b9c:	c4 06 80 00 	ld  [ %i2 ], %g2
                              
40003ba0:	88 20 80 10 	sub  %g2, %l0, %g4
                            
      if (i > ppc) {
                                                 
40003ba4:	80 a4 40 18 	cmp  %l1, %i0
                                 
        rtems_bdpart_write_mbr_partition(
                            
40003ba8:	86 21 00 12 	sub  %g4, %l2, %g3
                            
    value >>= 8;
                                                     
40003bac:	97 30 e0 08 	srl  %g3, 8, %o3
                              
40003bb0:	99 30 e0 10 	srl  %g3, 0x10, %o4
                           
      if (i > ppc) {
                                                 
40003bb4:	08 80 00 12 	bleu  40003bfc <rtems_bdpart_write+0x46c>
     <== NEVER TAKEN
40003bb8:	9b 30 e0 18 	srl  %g3, 0x18, %o5
                           
          block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
           
40003bbc:	c2 03 e0 1c 	ld  [ %o7 + 0x1c ], %g1
                       
        rtems_bdpart_write_mbr_partition(
                            
40003bc0:	c4 07 bf f4 	ld  [ %fp + -12 ], %g2
                        
40003bc4:	84 20 80 04 	sub  %g2, %g4, %g2
                            
    data [i] = (uint8_t) value;
                                      
40003bc8:	c6 28 61 d6 	stb  %g3, [ %g1 + 0x1d6 ]
                     
    value >>= 8;
                                                     
40003bcc:	9f 30 a0 08 	srl  %g2, 8, %o7
                              
40003bd0:	89 30 a0 10 	srl  %g2, 0x10, %g4
                           
40003bd4:	87 30 a0 18 	srl  %g2, 0x18, %g3
                           
    data [i] = (uint8_t) value;
                                      
40003bd8:	d6 28 61 d7 	stb  %o3, [ %g1 + 0x1d7 ]
                     
40003bdc:	d8 28 61 d8 	stb  %o4, [ %g1 + 0x1d8 ]
                     
40003be0:	da 28 61 d9 	stb  %o5, [ %g1 + 0x1d9 ]
                     
40003be4:	c4 28 61 da 	stb  %g2, [ %g1 + 0x1da ]
                     
40003be8:	de 28 61 db 	stb  %o7, [ %g1 + 0x1db ]
                     
40003bec:	c8 28 61 dc 	stb  %g4, [ %g1 + 0x1dc ]
                     
40003bf0:	c6 28 61 dd 	stb  %g3, [ %g1 + 0x1dd ]
                     
  data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
                        
40003bf4:	f2 28 61 d2 	stb  %i1, [ %g1 + 0x1d2 ]
                     
  data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
                      
40003bf8:	c0 28 61 ce 	clrb  [ %g1 + 0x1ce ]
                         
40003bfc:	10 bf ff c9 	b  40003b20 <rtems_bdpart_write+0x390>
        
40003c00:	b4 06 a0 30 	add  %i2, 0x30, %i2
                           
  if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {

40003c04:	02 80 00 04 	be  40003c14 <rtems_bdpart_write+0x484>
       <== NOT EXECUTED
40003c08:	80 a6 20 3f 	cmp  %i0, 0x3f
                                <== NOT EXECUTED
40003c0c:	12 bf ff 27 	bne  400038a8 <rtems_bdpart_write+0x118>
      <== NOT EXECUTED
40003c10:	ba 10 20 0a 	mov  0xa, %i5
                                 <== NOT EXECUTED
40003c14:	b0 10 00 1c 	mov  %i4, %i0
                                 <== NOT EXECUTED
40003c18:	10 bf ff 5a 	b  40003980 <rtems_bdpart_write+0x1f0>
        <== NOT EXECUTED
40003c1c:	88 5f 20 03 	smul  %i4, 3, %g4
                             <== NOT EXECUTED
40003c20:	02 bf ff 42 	be  40003928 <rtems_bdpart_write+0x198>
       <== ALWAYS TAKEN
40003c24:	ba 10 20 0a 	mov  0xa, %i5
                                 
40003c28:	10 bf ff 21 	b  400038ac <rtems_bdpart_write+0x11c>
        <== NOT EXECUTED
40003c2c:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         <== NOT EXECUTED
      sc = rtems_bdpart_new_record( dd, ebr, &block);
                
40003c30:	10 bf ff 1e 	b  400038a8 <rtems_bdpart_write+0x118>
        <== NOT EXECUTED
40003c34:	ba 10 00 08 	mov  %o0, %i5
                                 <== NOT EXECUTED

                                                                     

4001233c <rtems_blkdev_create>: uint32_t media_block_size, rtems_blkdev_bnum media_block_count, rtems_block_device_ioctl handler, void *driver_data ) {
4001233c:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  rtems_status_code sc;
                                              
  rtems_blkdev_imfs_context *ctx;
                                    

                                                                     
  sc = rtems_bdbuf_init();
                                           
40012340:	7f ff fd 67 	call  400118dc <rtems_bdbuf_init>
             
40012344:	ba 10 20 0e 	mov  0xe, %i5
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40012348:	80 a2 20 00 	cmp  %o0, 0
                                   
4001234c:	12 80 00 1b 	bne  400123b8 <rtems_blkdev_create+0x7c>
      <== NEVER TAKEN
40012350:	90 10 20 80 	mov  0x80, %o0
                                
    return RTEMS_INCORRECT_STATE;
                                    
  }
                                                                  

                                                                     
  ctx = malloc(sizeof(*ctx));
                                        
40012354:	7f ff cd 9f 	call  400059d0 <malloc>
                       
40012358:	ba 10 20 1a 	mov  0x1a, %i5
                                
  if (ctx != NULL) {
                                                 
4001235c:	80 a2 20 00 	cmp  %o0, 0
                                   
40012360:	02 80 00 16 	be  400123b8 <rtems_blkdev_create+0x7c>
       <== NEVER TAKEN
40012364:	a0 10 00 08 	mov  %o0, %l0
                                 
    sc = rtems_disk_init_phys(
                                       
40012368:	98 10 00 1c 	mov  %i4, %o4
                                 
4001236c:	96 10 00 1b 	mov  %i3, %o3
                                 
40012370:	94 10 00 1a 	mov  %i2, %o2
                                 
40012374:	40 00 02 9b 	call  40012de0 <rtems_disk_init_phys>
         
40012378:	92 10 00 19 	mov  %i1, %o1
                                 
      media_block_count,
                                             
      handler,
                                                       
      driver_data
                                                    
    );
                                                               

                                                                     
    ctx->fd = -1;
                                                    
4001237c:	82 10 3f ff 	mov  -1, %g1
                                  
40012380:	c2 24 20 78 	st  %g1, [ %l0 + 0x78 ]
                       

                                                                     
    if (sc == RTEMS_SUCCESSFUL) {
                                    
40012384:	80 a2 20 00 	cmp  %o0, 0
                                   
40012388:	12 80 00 0e 	bne  400123c0 <rtems_blkdev_create+0x84>
      <== NEVER TAKEN
4001238c:	ba 10 00 08 	mov  %o0, %i5
                                 
      int rv = IMFS_make_generic_node(
                               
40012390:	96 10 00 10 	mov  %l0, %o3
                                 
40012394:	15 10 00 a8 	sethi  %hi(0x4002a000), %o2
                   
40012398:	13 00 00 18 	sethi  %hi(0x6000), %o1
                       
4001239c:	94 12 a1 70 	or  %o2, 0x170, %o2
                           
400123a0:	92 12 61 ff 	or  %o1, 0x1ff, %o1
                           
400123a4:	40 00 0c f4 	call  40015774 <IMFS_make_generic_node>
       
400123a8:	90 10 00 18 	mov  %i0, %o0
                                 
        S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
                       
        &rtems_blkdev_imfs_control,
                                  
        ctx
                                                          
      );
                                                             

                                                                     
      if (rv != 0) {
                                                 
400123ac:	80 a2 20 00 	cmp  %o0, 0
                                   
400123b0:	12 80 00 09 	bne  400123d4 <rtems_blkdev_create+0x98>
      <== NEVER TAKEN
400123b4:	90 10 00 10 	mov  %l0, %o0
                                 
  } else {
                                                           
    sc = RTEMS_NO_MEMORY;
                                            
  }
                                                                  

                                                                     
  return sc;
                                                         
}
                                                                    
400123b8:	81 c7 e0 08 	ret 
                                          
400123bc:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        
      free(ctx);
                                                     
400123c0:	90 10 00 10 	mov  %l0, %o0
                                 <== NOT EXECUTED
400123c4:	7f ff cc 03 	call  400053d0 <free>
                         <== NOT EXECUTED
400123c8:	b0 10 00 1d 	mov  %i5, %i0
                                 <== NOT EXECUTED
}
                                                                    
400123cc:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400123d0:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
        free(ctx);
                                                   
400123d4:	7f ff cb ff 	call  400053d0 <free>
                         <== NOT EXECUTED
400123d8:	ba 10 20 0d 	mov  0xd, %i5
                                 <== NOT EXECUTED
400123dc:	30 bf ff f7 	b,a   400123b8 <rtems_blkdev_create+0x7c>
     <== NOT EXECUTED

                                                                     

40003f90 <rtems_blkdev_create_partition>: const char *partition, const char *parent_block_device, rtems_blkdev_bnum media_block_begin, rtems_blkdev_bnum media_block_count ) {
40003f90:	9d e3 bf 38 	save  %sp, -200, %sp
                          
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
  int fd = open(parent_block_device, O_RDWR);
                        
40003f94:	92 10 20 02 	mov  2, %o1
                                   
40003f98:	90 10 00 19 	mov  %i1, %o0
                                 
40003f9c:	40 00 0f c9 	call  40007ec0 <open>
                         
40003fa0:	ba 10 20 04 	mov  4, %i5
                                   

                                                                     
  if (fd >= 0) {
                                                     
40003fa4:	80 a2 20 00 	cmp  %o0, 0
                                   
40003fa8:	06 80 00 0f 	bl  40003fe4 <rtems_blkdev_create_partition+0x54>
<== NEVER TAKEN
40003fac:	b8 10 00 08 	mov  %o0, %i4
                                 
    int rv;
                                                          
    struct stat st;
                                                  

                                                                     
    rv = fstat(fd, &st);
                                             
40003fb0:	40 00 0c 8a 	call  400071d8 <fstat>
                        
40003fb4:	92 07 bf a0 	add  %fp, -96, %o1
                            
    if (rv == 0 && S_ISBLK(st.st_mode)) {
                            
40003fb8:	80 a2 20 00 	cmp  %o0, 0
                                   
40003fbc:	12 80 00 0c 	bne  40003fec <rtems_blkdev_create_partition+0x5c>
<== NEVER TAKEN
40003fc0:	03 00 00 3c 	sethi  %hi(0xf000), %g1
                       
40003fc4:	f2 07 bf ac 	ld  [ %fp + -84 ], %i1
                        
40003fc8:	b2 0e 40 01 	and  %i1, %g1, %i1
                            
40003fcc:	03 00 00 18 	sethi  %hi(0x6000), %g1
                       
40003fd0:	80 a6 40 01 	cmp  %i1, %g1
                                 
40003fd4:	02 80 00 08 	be  40003ff4 <rtems_blkdev_create_partition+0x64>
<== ALWAYS TAKEN
40003fd8:	ba 10 20 15 	mov  0x15, %i5
                                
    } else {
                                                         
      sc = RTEMS_INVALID_NODE;
                                       
    }
                                                                

                                                                     
    if (sc != RTEMS_SUCCESSFUL) {
                                    
      close(fd);
                                                     
40003fdc:	40 00 0c 09 	call  40007000 <close>
                        <== NOT EXECUTED
40003fe0:	90 10 00 1c 	mov  %i4, %o0
                                 <== NOT EXECUTED
  } else {
                                                           
    sc = RTEMS_INVALID_ID;
                                           
  }
                                                                  

                                                                     
  return sc;
                                                         
}
                                                                    
40003fe4:	81 c7 e0 08 	ret 
                                          
40003fe8:	91 e8 00 1d 	restore  %g0, %i5, %o0
                        
      sc = RTEMS_INVALID_NODE;
                                       
40003fec:	10 bf ff fc 	b  40003fdc <rtems_blkdev_create_partition+0x4c>
<== NOT EXECUTED
40003ff0:	ba 10 20 15 	mov  0x15, %i5
                                <== NOT EXECUTED
40003ff4:	94 07 bf 9c 	add  %fp, -100, %o2
                           
40003ff8:	90 10 00 1c 	mov  %i4, %o0
                                 
40003ffc:	13 10 01 10 	sethi  %hi(0x40044000), %o1
                   
        sc = RTEMS_NOT_IMPLEMENTED;
                                  
40004000:	ba 10 20 18 	mov  0x18, %i5
                                
40004004:	40 00 0c e8 	call  400073a4 <ioctl>
                        
40004008:	92 12 62 09 	or  %o1, 0x209, %o1
                           
      if (rv == 0) {
                                                 
4000400c:	80 a2 20 00 	cmp  %o0, 0
                                   
40004010:	12 bf ff f3 	bne  40003fdc <rtems_blkdev_create_partition+0x4c>
<== NEVER TAKEN
40004014:	90 10 20 80 	mov  0x80, %o0
                                
        rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
       
40004018:	40 00 0e 46 	call  40007930 <malloc>
                       
4000401c:	ba 10 20 1a 	mov  0x1a, %i5
                                
        if (ctx != NULL) {
                                           
40004020:	a0 92 20 00 	orcc  %o0, 0, %l0
                             
40004024:	02 bf ff ee 	be  40003fdc <rtems_blkdev_create_partition+0x4c>
<== NEVER TAKEN
40004028:	d2 07 bf 9c 	ld  [ %fp + -100 ], %o1
                       
          sc = rtems_disk_init_log(
                                  
4000402c:	96 10 00 1b 	mov  %i3, %o3
                                 
40004030:	40 00 02 01 	call  40004834 <rtems_disk_init_log>
          
40004034:	94 10 00 1a 	mov  %i2, %o2
                                 
          if (sc == RTEMS_SUCCESSFUL) {
                              
40004038:	ba 92 20 00 	orcc  %o0, 0, %i5
                             
4000403c:	12 80 00 0e 	bne  40004074 <rtems_blkdev_create_partition+0xe4>
<== NEVER TAKEN
40004040:	96 10 00 10 	mov  %l0, %o3
                                 
            ctx->fd = fd;
                                            
40004044:	f8 24 20 78 	st  %i4, [ %l0 + 0x78 ]
                       
            rv = IMFS_make_generic_node(
                             
40004048:	92 16 61 ff 	or  %i1, 0x1ff, %o1
                           
4000404c:	15 10 00 8c 	sethi  %hi(0x40023000), %o2
                   
40004050:	90 10 00 18 	mov  %i0, %o0
                                 
40004054:	40 00 07 57 	call  40005db0 <IMFS_make_generic_node>
       
40004058:	94 12 a0 a4 	or  %o2, 0xa4, %o2
                            
            if (rv != 0) {
                                           
4000405c:	80 a2 20 00 	cmp  %o0, 0
                                   
40004060:	02 bf ff e1 	be  40003fe4 <rtems_blkdev_create_partition+0x54>
<== ALWAYS TAKEN
40004064:	90 10 00 10 	mov  %l0, %o0
                                 
              free(ctx);
                                             
40004068:	40 00 0c 46 	call  40007180 <free>
                         <== NOT EXECUTED
4000406c:	ba 10 20 0d 	mov  0xd, %i5
                                 <== NOT EXECUTED
40004070:	30 bf ff db 	b,a   40003fdc <rtems_blkdev_create_partition+0x4c>
<== NOT EXECUTED
            free(ctx);
                                               
40004074:	40 00 0c 43 	call  40007180 <free>
                         <== NOT EXECUTED
40004078:	90 10 00 10 	mov  %l0, %o0
                                 <== NOT EXECUTED
4000407c:	30 bf ff d8 	b,a   40003fdc <rtems_blkdev_create_partition+0x4c>
<== NOT EXECUTED

                                                                     

400042c0 <rtems_blkdev_generic_ioctl>: rtems_device_driver rtems_blkdev_generic_ioctl( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) {
400042c0:	9d e3 bf a0 	save  %sp, -96, %sp
                           
    rtems_libio_ioctl_args_t *args = arg;
                            
    rtems_libio_t *iop = args->iop;
                                  
    rtems_disk_device *dd = iop->data1;
                              
400042c4:	c2 06 80 00 	ld  [ %i2 ], %g1
                              

                                                                     
    if (args->command != RTEMS_BLKIO_REQUEST)
                        
400042c8:	d2 06 a0 04 	ld  [ %i2 + 4 ], %o1
                          
    rtems_disk_device *dd = iop->data1;
                              
400042cc:	d0 00 60 28 	ld  [ %g1 + 0x28 ], %o0
                       
    if (args->command != RTEMS_BLKIO_REQUEST)
                        
400042d0:	03 30 06 10 	sethi  %hi(0xc0184000), %g1
                   
400042d4:	82 10 62 01 	or  %g1, 0x201, %g1	! c0184201 <RAM_END+0x7fd84201>

400042d8:	80 a2 40 01 	cmp  %o1, %g1
                                 
400042dc:	02 80 00 08 	be  400042fc <rtems_blkdev_generic_ioctl+0x3c>
<== NEVER TAKEN
400042e0:	82 10 3f ff 	mov  -1, %g1
                                  
    {
                                                                
        args->ioctl_return = dd->ioctl(dd,
                           
400042e4:	c2 02 20 38 	ld  [ %o0 + 0x38 ], %g1
                       
400042e8:	9f c0 40 00 	call  %g1
                                     
400042ec:	d4 06 a0 08 	ld  [ %i2 + 8 ], %o2
                          
400042f0:	d0 26 a0 0c 	st  %o0, [ %i2 + 0xc ]
                        
         */
                                                          
        args->ioctl_return = -1;
                                     
    }
                                                                

                                                                     
    return RTEMS_SUCCESSFUL;
                                         
}
                                                                    
400042f4:	81 c7 e0 08 	ret 
                                          
400042f8:	91 e8 20 00 	restore  %g0, 0, %o0
                          
        args->ioctl_return = -1;
                                     
400042fc:	10 bf ff fe 	b  400042f4 <rtems_blkdev_generic_ioctl+0x34>
 <== NOT EXECUTED
40004300:	c2 26 a0 0c 	st  %g1, [ %i2 + 0xc ]
                        <== NOT EXECUTED

                                                                     

40004080 <rtems_blkdev_generic_read>: rtems_device_driver rtems_blkdev_generic_read( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) {
40004080:	9d e3 bf 98 	save  %sp, -104, %sp
                          
    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;
                              
40004084:	c2 06 80 00 	ld  [ %i2 ], %g1
                              
40004088:	e4 00 60 28 	ld  [ %g1 + 0x28 ], %l2
                       
    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);

4000408c:	f8 1e a0 08 	ldd  [ %i2 + 8 ], %i4
                         
    uint32_t block_size = dd->block_size;
                            
40004090:	e2 04 a0 24 	ld  [ %l2 + 0x24 ], %l1
                       
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);

40004094:	94 10 20 00 	clr  %o2
                                      
40004098:	96 10 00 11 	mov  %l1, %o3
                                 
4000409c:	90 10 00 1c 	mov  %i4, %o0
                                 
400040a0:	40 00 76 d0 	call  40021be0 <__divdi3>
                     
400040a4:	92 10 00 1d 	mov  %i5, %o1
                                 
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
400040a8:	90 10 00 1c 	mov  %i4, %o0
                                 
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);

400040ac:	b2 10 00 09 	mov  %o1, %i1
                                 
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
400040b0:	94 10 20 00 	clr  %o2
                                      
400040b4:	96 10 00 11 	mov  %l1, %o3
                                 
400040b8:	40 00 77 55 	call  40021e0c <__moddi3>
                     
400040bc:	92 10 00 1d 	mov  %i5, %o1
                                 

                                                                     
    args->bytes_moved = 0;
                                           
400040c0:	c0 26 a0 1c 	clr  [ %i2 + 0x1c ]
                           
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
400040c4:	a0 10 00 09 	mov  %o1, %l0
                                 
    uint32_t count = args->count;
                                    
400040c8:	f8 06 a0 14 	ld  [ %i2 + 0x14 ], %i4
                       

                                                                     
    while (count > 0)
                                                
400040cc:	80 a7 20 00 	cmp  %i4, 0
                                   
400040d0:	12 80 00 1a 	bne  40004138 <rtems_blkdev_generic_read+0xb8>
<== ALWAYS TAKEN
400040d4:	f6 06 a0 10 	ld  [ %i2 + 0x10 ], %i3
                       
{
                                                                    
400040d8:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400040dc:	91 e8 20 00 	restore  %g0, 0, %o0
                          <== NOT EXECUTED
        uint32_t            copy;
                                    

                                                                     
        rc = rtems_bdbuf_read(dd, block, &diskbuf);
                  
        if (rc != RTEMS_SUCCESSFUL)
                                  
            break;
                                                   
        copy = block_size - blkofs;
                                  
400040e0:	ba 24 40 10 	sub  %l1, %l0, %i5
                            
400040e4:	80 a7 40 1c 	cmp  %i5, %i4
                                 
400040e8:	38 80 00 02 	bgu,a   400040f0 <rtems_blkdev_generic_read+0x70>

400040ec:	ba 10 00 1c 	mov  %i4, %i5
                                 
        if (copy > count)
                                            
            copy = count;
                                            
        memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
         
400040f0:	c2 07 bf fc 	ld  [ %fp + -4 ], %g1
                         
400040f4:	d2 00 60 1c 	ld  [ %g1 + 0x1c ], %o1
                       
400040f8:	92 02 40 10 	add  %o1, %l0, %o1
                            
400040fc:	40 00 45 47 	call  40015618 <memcpy>
                       
40004100:	94 10 00 1d 	mov  %i5, %o2
                                 
        rc = rtems_bdbuf_release(diskbuf);
                           
40004104:	40 00 38 e2 	call  4001248c <rtems_bdbuf_release>
          
40004108:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
        args->bytes_moved += copy;
                                   
4000410c:	c2 06 a0 1c 	ld  [ %i2 + 0x1c ], %g1
                       
40004110:	82 00 40 1d 	add  %g1, %i5, %g1
                            
40004114:	c2 26 a0 1c 	st  %g1, [ %i2 + 0x1c ]
                       
        if (rc != RTEMS_SUCCESSFUL)
                                  
40004118:	80 a2 20 00 	cmp  %o0, 0
                                   
4000411c:	12 80 00 0f 	bne  40004158 <rtems_blkdev_generic_read+0xd8>
<== NEVER TAKEN
40004120:	b0 10 00 08 	mov  %o0, %i0
                                 
            break;
                                                   
        count -= copy;
                                               
        buf += copy;
                                                 
40004124:	b6 06 c0 1d 	add  %i3, %i5, %i3
                            
        blkofs = 0;
                                                  
        block++;
                                                     
40004128:	b2 06 60 01 	inc  %i1
                                      
    while (count > 0)
                                                
4000412c:	b8 a7 00 1d 	subcc  %i4, %i5, %i4
                          
40004130:	02 80 00 0c 	be  40004160 <rtems_blkdev_generic_read+0xe0>
 <== ALWAYS TAKEN
40004134:	a0 10 20 00 	clr  %l0
                                      
        rc = rtems_bdbuf_read(dd, block, &diskbuf);
                  
40004138:	92 10 00 19 	mov  %i1, %o1
                                 
4000413c:	94 07 bf fc 	add  %fp, -4, %o2
                             
40004140:	40 00 38 4a 	call  40012268 <rtems_bdbuf_read>
             
40004144:	90 10 00 12 	mov  %l2, %o0
                                 
40004148:	b0 10 00 08 	mov  %o0, %i0
                                 
        if (rc != RTEMS_SUCCESSFUL)
                                  
4000414c:	80 a6 20 00 	cmp  %i0, 0
                                   
40004150:	02 bf ff e4 	be  400040e0 <rtems_blkdev_generic_read+0x60>
 <== ALWAYS TAKEN
40004154:	90 10 00 1b 	mov  %i3, %o0
                                 
    }
                                                                

                                                                     
    return rc;
                                                       
}
                                                                    
40004158:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000415c:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
{
                                                                    
40004160:	b0 10 20 00 	clr  %i0
                                      
40004164:	81 c7 e0 08 	ret 
                                          
40004168:	81 e8 00 00 	restore 
                                      

                                                                     

4000416c <rtems_blkdev_generic_write>: rtems_device_driver rtems_blkdev_generic_write( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) {
4000416c:	9d e3 bf 98 	save  %sp, -104, %sp
                          
    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;
                              
40004170:	c2 06 80 00 	ld  [ %i2 ], %g1
                              
40004174:	e2 00 60 28 	ld  [ %g1 + 0x28 ], %l1
                       
    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);

40004178:	f8 1e a0 08 	ldd  [ %i2 + 8 ], %i4
                         
    uint32_t block_size = dd->block_size;
                            
4000417c:	e0 04 60 24 	ld  [ %l1 + 0x24 ], %l0
                       
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);

40004180:	94 10 20 00 	clr  %o2
                                      
40004184:	96 10 00 10 	mov  %l0, %o3
                                 
40004188:	90 10 00 1c 	mov  %i4, %o0
                                 
4000418c:	40 00 76 95 	call  40021be0 <__divdi3>
                     
40004190:	92 10 00 1d 	mov  %i5, %o1
                                 
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
40004194:	90 10 00 1c 	mov  %i4, %o0
                                 
    rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);

40004198:	b0 10 00 09 	mov  %o1, %i0
                                 
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
4000419c:	94 10 20 00 	clr  %o2
                                      
400041a0:	96 10 00 10 	mov  %l0, %o3
                                 
400041a4:	40 00 77 1a 	call  40021e0c <__moddi3>
                     
400041a8:	92 10 00 1d 	mov  %i5, %o1
                                 

                                                                     
    args->bytes_moved = 0;
                                           
400041ac:	c0 26 a0 1c 	clr  [ %i2 + 0x1c ]
                           
    uint32_t blkofs = (uint32_t) (args->offset % block_size);
        
400041b0:	b6 10 00 09 	mov  %o1, %i3
                                 
    uint32_t count = args->count;
                                    
400041b4:	f8 06 a0 14 	ld  [ %i2 + 0x14 ], %i4
                       

                                                                     
    while (count > 0)
                                                
400041b8:	80 a7 20 00 	cmp  %i4, 0
                                   
400041bc:	12 80 00 21 	bne  40004240 <rtems_blkdev_generic_write+0xd4>
<== ALWAYS TAKEN
400041c0:	f2 06 a0 10 	ld  [ %i2 + 0x10 ], %i1
                       
{
                                                                    
400041c4:	10 80 00 2c 	b  40004274 <rtems_blkdev_generic_write+0x108>
<== NOT EXECUTED
400041c8:	90 10 20 00 	clr  %o0
                                      <== NOT EXECUTED
    {
                                                                
        rtems_bdbuf_buffer *diskbuf;
                                 
        uint32_t            copy;
                                    

                                                                     
        if ((blkofs == 0) && (count >= block_size))
                  
400041cc:	0a 80 00 20 	bcs  4000424c <rtems_blkdev_generic_write+0xe0>

400041d0:	94 07 bf fc 	add  %fp, -4, %o2
                             
            rc = rtems_bdbuf_get(dd, block, &diskbuf);
               
400041d4:	92 10 00 18 	mov  %i0, %o1
                                 
400041d8:	40 00 37 e4 	call  40012168 <rtems_bdbuf_get>
              
400041dc:	90 10 00 11 	mov  %l1, %o0
                                 
        else
                                                         
            rc = rtems_bdbuf_read(dd, block, &diskbuf);
              
        if (rc != RTEMS_SUCCESSFUL)
                                  
400041e0:	80 a2 20 00 	cmp  %o0, 0
                                   
400041e4:	12 80 00 21 	bne  40004268 <rtems_blkdev_generic_write+0xfc>
<== NEVER TAKEN
400041e8:	92 10 00 19 	mov  %i1, %o1
                                 
            break;
                                                   

                                                                     
        copy = block_size - blkofs;
                                  
400041ec:	ba 24 00 1b 	sub  %l0, %i3, %i5
                            
400041f0:	80 a7 40 1c 	cmp  %i5, %i4
                                 
400041f4:	38 80 00 02 	bgu,a   400041fc <rtems_blkdev_generic_write+0x90>

400041f8:	ba 10 00 1c 	mov  %i4, %i5
                                 
        if (copy > count)
                                            
            copy = count;
                                            
        memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
         
400041fc:	c2 07 bf fc 	ld  [ %fp + -4 ], %g1
                         
40004200:	d0 00 60 1c 	ld  [ %g1 + 0x1c ], %o0
                       
40004204:	94 10 00 1d 	mov  %i5, %o2
                                 
40004208:	40 00 45 04 	call  40015618 <memcpy>
                       
4000420c:	90 02 00 1b 	add  %o0, %i3, %o0
                            
        args->bytes_moved += copy;
                                   
40004210:	c2 06 a0 1c 	ld  [ %i2 + 0x1c ], %g1
                       
40004214:	82 00 40 1d 	add  %g1, %i5, %g1
                            
40004218:	c2 26 a0 1c 	st  %g1, [ %i2 + 0x1c ]
                       
        rc = rtems_bdbuf_release_modified(diskbuf);
                  
        if (rc != RTEMS_SUCCESSFUL)
                                  
            break;
                                                   

                                                                     
        count -= copy;
                                               
        buf += copy;
                                                 
4000421c:	b2 06 40 1d 	add  %i1, %i5, %i1
                            
        rc = rtems_bdbuf_release_modified(diskbuf);
                  
40004220:	40 00 38 e1 	call  400125a4 <rtems_bdbuf_release_modified>
 
40004224:	d0 07 bf fc 	ld  [ %fp + -4 ], %o0
                         
        if (rc != RTEMS_SUCCESSFUL)
                                  
40004228:	80 a2 20 00 	cmp  %o0, 0
                                   
4000422c:	12 80 00 0f 	bne  40004268 <rtems_blkdev_generic_write+0xfc>
<== NEVER TAKEN
40004230:	b8 a7 00 1d 	subcc  %i4, %i5, %i4
                          
        blkofs = 0;
                                                  
        block++;
                                                     
40004234:	b0 06 20 01 	inc  %i0
                                      
    while (count > 0)
                                                
40004238:	02 80 00 0e 	be  40004270 <rtems_blkdev_generic_write+0x104>
<== ALWAYS TAKEN
4000423c:	b6 10 20 00 	clr  %i3
                                      
        if ((blkofs == 0) && (count >= block_size))
                  
40004240:	80 a6 e0 00 	cmp  %i3, 0
                                   
40004244:	02 bf ff e2 	be  400041cc <rtems_blkdev_generic_write+0x60>

40004248:	80 a7 00 10 	cmp  %i4, %l0
                                 
            rc = rtems_bdbuf_read(dd, block, &diskbuf);
              
4000424c:	92 10 00 18 	mov  %i0, %o1
                                 
40004250:	94 07 bf fc 	add  %fp, -4, %o2
                             
40004254:	40 00 38 05 	call  40012268 <rtems_bdbuf_read>
             
40004258:	90 10 00 11 	mov  %l1, %o0
                                 
        if (rc != RTEMS_SUCCESSFUL)
                                  
4000425c:	80 a2 20 00 	cmp  %o0, 0
                                   
40004260:	02 bf ff e3 	be  400041ec <rtems_blkdev_generic_write+0x80>
<== ALWAYS TAKEN
40004264:	92 10 00 19 	mov  %i1, %o1
                                 
    }
                                                                

                                                                     
    return rc;
                                                       
}
                                                                    
40004268:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000426c:	91 e8 00 08 	restore  %g0, %o0, %o0
                        <== NOT EXECUTED
{
                                                                    
40004270:	90 10 20 00 	clr  %o0
                                      
}
                                                                    
40004274:	81 c7 e0 08 	ret 
                                          
40004278:	91 e8 00 08 	restore  %g0, %o0, %o0
                        

                                                                     

400129c8 <rtems_blkdev_ioctl>: #include <rtems/blkdev.h> #include <rtems/bdbuf.h> int rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) {
400129c8:	9d e3 bf a0 	save  %sp, -96, %sp
                           
    rtems_status_code  sc;
                                           
    int                rc = 0;
                                       

                                                                     
    switch (req)
                                                     
400129cc:	03 10 01 10 	sethi  %hi(0x40044000), %g1
                   
400129d0:	84 10 62 03 	or  %g1, 0x203, %g2	! 40044203 <__end+0x1ceb3>

400129d4:	80 a6 40 02 	cmp  %i1, %g2
                                 
400129d8:	22 80 00 4e 	be,a   40012b10 <rtems_blkdev_ioctl+0x148>
    <== NEVER TAKEN
400129dc:	c2 06 20 24 	ld  [ %i0 + 0x24 ], %g1
                       <== NOT EXECUTED
400129e0:	08 80 00 18 	bleu  40012a40 <rtems_blkdev_ioctl+0x78>
      
400129e4:	05 08 00 10 	sethi  %hi(0x20004000), %g2
                   
400129e8:	84 10 62 09 	or  %g1, 0x209, %g2
                           
400129ec:	80 a6 40 02 	cmp  %i1, %g2
                                 
400129f0:	22 80 00 4b 	be,a   40012b1c <rtems_blkdev_ioctl+0x154>
    
400129f4:	f0 26 80 00 	st  %i0, [ %i2 ]
                              
400129f8:	28 80 00 3b 	bleu,a   40012ae4 <rtems_blkdev_ioctl+0x11c>
  
400129fc:	82 10 62 05 	or  %g1, 0x205, %g1
                           
40012a00:	82 10 62 0b 	or  %g1, 0x20b, %g1
                           
40012a04:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012a08:	02 80 00 23 	be  40012a94 <rtems_blkdev_ioctl+0xcc>
        
40012a0c:	03 20 01 10 	sethi  %hi(0x80044000), %g1
                   
40012a10:	82 10 62 04 	or  %g1, 0x204, %g1	! 80044204 <RAM_END+0x3fc44204>

40012a14:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012a18:	12 80 00 43 	bne  40012b24 <rtems_blkdev_ioctl+0x15c>
      <== NEVER TAKEN
40012a1c:	94 10 20 01 	mov  1, %o2
                                   
        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);

40012a20:	d2 06 80 00 	ld  [ %i2 ], %o1
                              
40012a24:	7f ff ff 85 	call  40012838 <rtems_bdbuf_set_block_size>
   
40012a28:	90 10 00 18 	mov  %i0, %o0
                                 
            if (sc != RTEMS_SUCCESSFUL) {
                            
40012a2c:	80 a2 20 00 	cmp  %o0, 0
                                   
40012a30:	12 80 00 27 	bne  40012acc <rtems_blkdev_ioctl+0x104>
      <== NEVER TAKEN
40012a34:	01 00 00 00 	nop 
                                          
            }
                                                        
            break;
                                                   

                                                                     
        case RTEMS_BLKIO_GETSIZE:
                                    
            *(rtems_blkdev_bnum *) argp = dd->size;
                  
            break;
                                                   
40012a38:	81 c7 e0 08 	ret 
                                          
40012a3c:	91 e8 20 00 	restore  %g0, 0, %o0
                          
    switch (req)
                                                     
40012a40:	86 10 a2 0a 	or  %g2, 0x20a, %g3
                           
40012a44:	80 a6 40 03 	cmp  %i1, %g3
                                 
40012a48:	02 80 00 2e 	be  40012b00 <rtems_blkdev_ioctl+0x138>
       
40012a4c:	90 10 00 18 	mov  %i0, %o0
                                 
40012a50:	28 80 00 17 	bleu,a   40012aac <rtems_blkdev_ioctl+0xe4>
   
40012a54:	84 10 a2 06 	or  %g2, 0x206, %g2
                           
40012a58:	84 10 a2 0c 	or  %g2, 0x20c, %g2
                           
40012a5c:	80 a6 40 02 	cmp  %i1, %g2
                                 
40012a60:	02 80 00 09 	be  40012a84 <rtems_blkdev_ioctl+0xbc>
        
40012a64:	82 10 62 02 	or  %g1, 0x202, %g1
                           
40012a68:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012a6c:	12 80 00 2e 	bne  40012b24 <rtems_blkdev_ioctl+0x15c>
      <== NEVER TAKEN
40012a70:	01 00 00 00 	nop 
                                          
            *(uint32_t *) argp = dd->media_block_size;
               
40012a74:	c2 06 20 20 	ld  [ %i0 + 0x20 ], %g1
                       
40012a78:	c2 26 80 00 	st  %g1, [ %i2 ]
                              
            break;
                                                   
40012a7c:	81 c7 e0 08 	ret 
                                          
40012a80:	91 e8 20 00 	restore  %g0, 0, %o0
                          
        case RTEMS_BLKIO_GETDEVSTATS:
                                
            rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);

            break;
                                                   

                                                                     
        case RTEMS_BLKIO_RESETDEVSTATS:
                              
            rtems_bdbuf_reset_device_stats(dd);
                      
40012a84:	7f ff ff c6 	call  4001299c <rtems_bdbuf_reset_device_stats>

40012a88:	b0 10 20 00 	clr  %i0
                                      
            break;
                                                   
40012a8c:	81 c7 e0 08 	ret 
                                          
40012a90:	81 e8 00 00 	restore 
                                      
            rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);

40012a94:	90 10 00 18 	mov  %i0, %o0
                                 
40012a98:	92 10 00 1a 	mov  %i2, %o1
                                 
40012a9c:	7f ff ff b5 	call  40012970 <rtems_bdbuf_get_device_stats>
 
40012aa0:	b0 10 20 00 	clr  %i0
                                      
            break;
                                                   
40012aa4:	81 c7 e0 08 	ret 
                                          
40012aa8:	81 e8 00 00 	restore 
                                      
    switch (req)
                                                     
40012aac:	80 a6 40 02 	cmp  %i1, %g2
                                 
40012ab0:	12 80 00 1d 	bne  40012b24 <rtems_blkdev_ioctl+0x15c>
      
40012ab4:	01 00 00 00 	nop 
                                          
            sc = rtems_bdbuf_syncdev(dd);
                            
40012ab8:	7f ff ff 3d 	call  400127ac <rtems_bdbuf_syncdev>
          
40012abc:	90 10 00 18 	mov  %i0, %o0
                                 
            if (sc != RTEMS_SUCCESSFUL) {
                            
40012ac0:	80 a2 20 00 	cmp  %o0, 0
                                   
40012ac4:	02 bf ff dd 	be  40012a38 <rtems_blkdev_ioctl+0x70>
        <== ALWAYS TAKEN
40012ac8:	01 00 00 00 	nop 
                                          
                errno = EIO;
                                         
40012acc:	40 00 08 ff 	call  40014ec8 <__errno>
                      <== NOT EXECUTED
40012ad0:	b0 10 3f ff 	mov  -1, %i0	! ffffffff <RAM_END+0xbfbfffff>
  <== NOT EXECUTED
40012ad4:	82 10 20 05 	mov  5, %g1
                                   <== NOT EXECUTED
40012ad8:	c2 22 00 00 	st  %g1, [ %o0 ]
                              <== NOT EXECUTED
40012adc:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012ae0:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    switch (req)
                                                     
40012ae4:	80 a6 40 01 	cmp  %i1, %g1
                                 
40012ae8:	12 80 00 0f 	bne  40012b24 <rtems_blkdev_ioctl+0x15c>
      <== NEVER TAKEN
40012aec:	01 00 00 00 	nop 
                                          
            *(rtems_blkdev_bnum *) argp = dd->size;
                  
40012af0:	c2 06 20 1c 	ld  [ %i0 + 0x1c ], %g1
                       
40012af4:	c2 26 80 00 	st  %g1, [ %i2 ]
                              
            break;
                                                   
40012af8:	81 c7 e0 08 	ret 
                                          
40012afc:	91 e8 20 00 	restore  %g0, 0, %o0
                          
            rtems_bdbuf_purge_dev(dd);
                               
40012b00:	7f ff ff 44 	call  40012810 <rtems_bdbuf_purge_dev>
        
40012b04:	b0 10 20 00 	clr  %i0
                                      
            break;
                                                   
40012b08:	81 c7 e0 08 	ret 
                                          
40012b0c:	81 e8 00 00 	restore 
                                      
            *(uint32_t *) argp = dd->block_size;
                     
40012b10:	c2 26 80 00 	st  %g1, [ %i2 ]
                              <== NOT EXECUTED
            break;
                                                   
40012b14:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40012b18:	91 e8 20 00 	restore  %g0, 0, %o0
                          <== NOT EXECUTED
            break;
                                                   
40012b1c:	81 c7 e0 08 	ret 
                                          
40012b20:	91 e8 20 00 	restore  %g0, 0, %o0
                          

                                                                     
        default:
                                                     
            errno = EINVAL;
                                          
40012b24:	40 00 08 e9 	call  40014ec8 <__errno>
                      
40012b28:	b0 10 3f ff 	mov  -1, %i0
                                  
40012b2c:	82 10 20 16 	mov  0x16, %g1
                                
40012b30:	c2 22 00 00 	st  %g1, [ %o0 ]
                              
            rc = -1;
                                                 
            break;
                                                   
    }
                                                                

                                                                     
    return rc;
                                                       
}
                                                                    
40012b34:	81 c7 e0 08 	ret 
                                          
40012b38:	81 e8 00 00 	restore 
                                      

                                                                     

40004dd8 <rtems_disk_create_log>: {
40004dd8:	9d e3 bf 98 	save  %sp, -104, %sp
                          
  _Mutex_Acquire( mutex );
                                           
40004ddc:	21 10 00 94 	sethi  %hi(0x40025000), %l0
                   
  rtems_disk_device *dd = NULL;
                                      
40004de0:	c0 27 bf f8 	clr  [ %fp + -8 ]
                             
40004de4:	90 14 20 98 	or  %l0, 0x98, %o0
                            
40004de8:	40 00 1a e1 	call  4000b96c <_Mutex_Acquire>
               
40004dec:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
  diskdevs_protected = true;
                                         
40004df0:	82 10 20 01 	mov  1, %g1
                                   
  phys_dd = get_disk_entry(phys, true);
                              
40004df4:	90 10 00 1a 	mov  %i2, %o0
                                 
  diskdevs_protected = true;
                                         
40004df8:	23 10 00 98 	sethi  %hi(0x40026000), %l1
                   
  phys_dd = get_disk_entry(phys, true);
                              
40004dfc:	94 10 20 01 	mov  1, %o2
                                   
  diskdevs_protected = true;
                                         
40004e00:	c2 2c 63 5c 	stb  %g1, [ %l1 + 0x35c ]
                     
  phys_dd = get_disk_entry(phys, true);
                              
40004e04:	7f ff fe b0 	call  400048c4 <get_disk_entry>
               
40004e08:	92 10 00 1b 	mov  %i3, %o1
                                 
  if (phys_dd == NULL) {
                                             
40004e0c:	b4 92 20 00 	orcc  %o0, 0, %i2
                             
40004e10:	02 80 00 29 	be  40004eb4 <rtems_disk_create_log+0xdc>
     <== NEVER TAKEN
40004e14:	d4 07 a0 5c 	ld  [ %fp + 0x5c ], %o2
                       
  sc = create_disk(dev, name, &dd, &alloc_name);
                     
40004e18:	98 07 bf fc 	add  %fp, -4, %o4
                             
40004e1c:	96 07 bf f8 	add  %fp, -8, %o3
                             
40004e20:	90 10 00 18 	mov  %i0, %o0
                                 
40004e24:	7f ff fe ce 	call  4000495c <create_disk>
                  
40004e28:	92 10 00 19 	mov  %i1, %o1
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40004e2c:	b6 92 20 00 	orcc  %o0, 0, %i3
                             
40004e30:	12 80 00 1b 	bne  40004e9c <rtems_disk_create_log+0xc4>
    <== NEVER TAKEN
40004e34:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
  sc = rtems_disk_init_log(
                                          
40004e38:	96 10 00 1d 	mov  %i5, %o3
                                 
40004e3c:	94 10 00 1c 	mov  %i4, %o2
                                 
40004e40:	7f ff fe 7d 	call  40004834 <rtems_disk_init_log>
          
40004e44:	92 10 00 1a 	mov  %i2, %o1
                                 
  dd->name = alloc_name;
                                             
40004e48:	c4 1f bf f8 	ldd  [ %fp + -8 ], %g2
                        
  ++phys_dd->uses;
                                                   
40004e4c:	c2 06 a0 14 	ld  [ %i2 + 0x14 ], %g1
                       
  dd->dev = dev;
                                                     
40004e50:	f0 38 80 00 	std  %i0, [ %g2 ]
                             
  ++phys_dd->uses;
                                                   
40004e54:	82 00 60 01 	inc  %g1
                                      
  dd->name = alloc_name;
                                             
40004e58:	c6 20 a0 10 	st  %g3, [ %g2 + 0x10 ]
                       
  sc = rtems_disk_init_log(
                                          
40004e5c:	b6 10 00 08 	mov  %o0, %i3
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40004e60:	80 a2 20 00 	cmp  %o0, 0
                                   
40004e64:	02 80 00 0e 	be  40004e9c <rtems_disk_create_log+0xc4>
     <== ALWAYS TAKEN
40004e68:	c2 26 a0 14 	st  %g1, [ %i2 + 0x14 ]
                       
    dd->ioctl = null_handler;
                                        
40004e6c:	03 10 00 12 	sethi  %hi(0x40004800), %g1
                   <== NOT EXECUTED
40004e70:	82 10 61 54 	or  %g1, 0x154, %g1	! 40004954 <null_handler>
 <== NOT EXECUTED
40004e74:	c2 20 a0 38 	st  %g1, [ %g2 + 0x38 ]
                       <== NOT EXECUTED
    disk_delete_locked(dev);
                                         
40004e78:	92 10 00 19 	mov  %i1, %o1
                                 <== NOT EXECUTED
40004e7c:	7f ff ff 36 	call  40004b54 <disk_delete_locked>
           <== NOT EXECUTED
40004e80:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
40004e84:	90 14 20 98 	or  %l0, 0x98, %o0
                            <== NOT EXECUTED
  diskdevs_protected = false;
                                        
40004e88:	c0 2c 63 5c 	clrb  [ %l1 + 0x35c ]
                         <== NOT EXECUTED
40004e8c:	40 00 1a d4 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40004e90:	b0 10 00 1b 	mov  %i3, %i0
                                 <== NOT EXECUTED
}
                                                                    
40004e94:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004e98:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
  diskdevs_protected = false;
                                        
40004e9c:	c0 2c 63 5c 	clrb  [ %l1 + 0x35c ]
                         
40004ea0:	90 14 20 98 	or  %l0, 0x98, %o0
                            
40004ea4:	40 00 1a ce 	call  4000b9dc <_Mutex_Release>
               
40004ea8:	b0 10 00 1b 	mov  %i3, %i0
                                 
}
                                                                    
40004eac:	81 c7 e0 08 	ret 
                                          
40004eb0:	81 e8 00 00 	restore 
                                      
  diskdevs_protected = false;
                                        
40004eb4:	c0 2c 63 5c 	clrb  [ %l1 + 0x35c ]
                         <== NOT EXECUTED
40004eb8:	90 14 20 98 	or  %l0, 0x98, %o0
                            <== NOT EXECUTED
40004ebc:	40 00 1a c8 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40004ec0:	b6 10 20 04 	mov  4, %i3
                                   <== NOT EXECUTED
}
                                                                    
40004ec4:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004ec8:	91 e8 00 1b 	restore  %g0, %i3, %o0
                        <== NOT EXECUTED

                                                                     

40004d08 <rtems_disk_create_phys>: {
40004d08:	9d e3 bf 98 	save  %sp, -104, %sp
                          
  rtems_disk_device *dd = NULL;
                                      
40004d0c:	c0 27 bf f8 	clr  [ %fp + -8 ]
                             
{
                                                                    
40004d10:	a2 10 00 19 	mov  %i1, %l1
                                 
  char *alloc_name = NULL;
                                           
40004d14:	c0 27 bf fc 	clr  [ %fp + -4 ]
                             
{
                                                                    
40004d18:	a0 10 00 18 	mov  %i0, %l0
                                 
  if (handler == NULL) {
                                             
40004d1c:	80 a7 20 00 	cmp  %i4, 0
                                   
40004d20:	02 80 00 20 	be  40004da0 <rtems_disk_create_phys+0x98>
    <== NEVER TAKEN
40004d24:	b2 10 20 09 	mov  9, %i1
                                   
  mutex->_Queue._name = name;
                                        
}
                                                                    

                                                                     
static __inline void rtems_mutex_lock( rtems_mutex *mutex )
          
{
                                                                    
  _Mutex_Acquire( mutex );
                                           
40004d28:	31 10 00 94 	sethi  %hi(0x40025000), %i0
                   
40004d2c:	40 00 1b 10 	call  4000b96c <_Mutex_Acquire>
               
40004d30:	90 16 20 98 	or  %i0, 0x98, %o0	! 40025098 <diskdevs_mutex>

  diskdevs_protected = true;
                                         
40004d34:	82 10 20 01 	mov  1, %g1
                                   
  sc = create_disk(dev, name, &dd, &alloc_name);
                     
40004d38:	d4 07 a0 5c 	ld  [ %fp + 0x5c ], %o2
                       
  diskdevs_protected = true;
                                         
40004d3c:	25 10 00 98 	sethi  %hi(0x40026000), %l2
                   
  sc = create_disk(dev, name, &dd, &alloc_name);
                     
40004d40:	98 07 bf fc 	add  %fp, -4, %o4
                             
  diskdevs_protected = true;
                                         
40004d44:	c2 2c a3 5c 	stb  %g1, [ %l2 + 0x35c ]
                     
  sc = create_disk(dev, name, &dd, &alloc_name);
                     
40004d48:	96 07 bf f8 	add  %fp, -8, %o3
                             
40004d4c:	90 10 00 10 	mov  %l0, %o0
                                 
40004d50:	7f ff ff 03 	call  4000495c <create_disk>
                  
40004d54:	92 10 00 11 	mov  %l1, %o1
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40004d58:	b2 92 20 00 	orcc  %o0, 0, %i1
                             
40004d5c:	12 80 00 0e 	bne  40004d94 <rtems_disk_create_phys+0x8c>
   <== NEVER TAKEN
40004d60:	d0 07 bf f8 	ld  [ %fp + -8 ], %o0
                         
  sc = rtems_disk_init_phys(
                                         
40004d64:	98 10 00 1d 	mov  %i5, %o4
                                 
40004d68:	96 10 00 1c 	mov  %i4, %o3
                                 
40004d6c:	94 10 00 1b 	mov  %i3, %o2
                                 
40004d70:	7f ff fe 97 	call  400047cc <rtems_disk_init_phys>
         
40004d74:	92 10 00 1a 	mov  %i2, %o1
                                 
  dd->dev = dev;
                                                     
40004d78:	c2 07 bf f8 	ld  [ %fp + -8 ], %g1
                         
  dd->name = alloc_name;
                                             
40004d7c:	c4 07 bf fc 	ld  [ %fp + -4 ], %g2
                         
40004d80:	c4 20 60 10 	st  %g2, [ %g1 + 0x10 ]
                       
  sc = rtems_disk_init_phys(
                                         
40004d84:	b2 10 00 08 	mov  %o0, %i1
                                 
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40004d88:	80 a2 20 00 	cmp  %o0, 0
                                   
40004d8c:	12 80 00 07 	bne  40004da8 <rtems_disk_create_phys+0xa0>
   <== NEVER TAKEN
40004d90:	e0 38 40 00 	std  %l0, [ %g1 ]
                             
  diskdevs_protected = false;
                                        
40004d94:	c0 2c a3 5c 	clrb  [ %l2 + 0x35c ]
                         
}
                                                                    

                                                                     
static __inline void rtems_mutex_unlock( rtems_mutex *mutex )
        
{
                                                                    
  _Mutex_Release( mutex );
                                           
40004d98:	40 00 1b 11 	call  4000b9dc <_Mutex_Release>
               
40004d9c:	90 16 20 98 	or  %i0, 0x98, %o0
                            
}
                                                                    
40004da0:	81 c7 e0 08 	ret 
                                          
40004da4:	91 e8 00 19 	restore  %g0, %i1, %o0
                        
    dd->ioctl = null_handler;
                                        
40004da8:	05 10 00 12 	sethi  %hi(0x40004800), %g2
                   <== NOT EXECUTED
40004dac:	84 10 a1 54 	or  %g2, 0x154, %g2	! 40004954 <null_handler>
 <== NOT EXECUTED
40004db0:	c4 20 60 38 	st  %g2, [ %g1 + 0x38 ]
                       <== NOT EXECUTED
    disk_delete_locked(dev);
                                         
40004db4:	92 10 00 11 	mov  %l1, %o1
                                 <== NOT EXECUTED
40004db8:	7f ff ff 67 	call  40004b54 <disk_delete_locked>
           <== NOT EXECUTED
40004dbc:	90 10 00 10 	mov  %l0, %o0
                                 <== NOT EXECUTED
40004dc0:	90 16 20 98 	or  %i0, 0x98, %o0
                            <== NOT EXECUTED
  diskdevs_protected = false;
                                        
40004dc4:	c0 2c a3 5c 	clrb  [ %l2 + 0x35c ]
                         <== NOT EXECUTED
40004dc8:	40 00 1b 05 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40004dcc:	b0 10 00 19 	mov  %i1, %i0
                                 <== NOT EXECUTED
}
                                                                    
40004dd0:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004dd4:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED

                                                                     

40004834 <rtems_disk_init_log>: rtems_disk_device *dd, rtems_disk_device *phys_dd, rtems_blkdev_bnum block_begin, rtems_blkdev_bnum block_count ) {
40004834:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  rtems_status_code sc;
                                              

                                                                     
  dd = memset(dd, 0, sizeof(*dd));
                                   
40004838:	94 10 20 78 	mov  0x78, %o2
                                
4000483c:	90 10 00 18 	mov  %i0, %o0
                                 
40004840:	40 00 43 b2 	call  40015708 <memset>
                       
40004844:	92 10 20 00 	clr  %o1
                                      
  dd->phys_dev = phys_dd;
                                            
  dd->start = block_begin;
                                           
  dd->size = block_count;
                                            
  dd->media_block_size = phys_dd->media_block_size;
                  
  dd->ioctl = phys_dd->ioctl;
                                        
  dd->driver_data = phys_dd->driver_data;
                            
40004848:	c2 06 60 3c 	ld  [ %i1 + 0x3c ], %g1
                       
  dd->media_block_size = phys_dd->media_block_size;
                  
4000484c:	c6 06 60 20 	ld  [ %i1 + 0x20 ], %g3
                       
  dd->ioctl = phys_dd->ioctl;
                                        
40004850:	c4 06 60 38 	ld  [ %i1 + 0x38 ], %g2
                       
  dd->phys_dev = phys_dd;
                                            
40004854:	f2 22 20 08 	st  %i1, [ %o0 + 8 ]
                          
  dd->driver_data = phys_dd->driver_data;
                            
40004858:	c2 22 20 3c 	st  %g1, [ %o0 + 0x3c ]
                       
  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
         
4000485c:	82 10 3f ff 	mov  -1, %g1
                                  
  dd->start = block_begin;
                                           
40004860:	f4 22 20 18 	st  %i2, [ %o0 + 0x18 ]
                       
  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
         
40004864:	c2 22 20 6c 	st  %g1, [ %o0 + 0x6c ]
                       
  dd->size = block_count;
                                            
40004868:	f6 22 20 1c 	st  %i3, [ %o0 + 0x1c ]
                       
  dd->media_block_size = phys_dd->media_block_size;
                  
4000486c:	c6 22 20 20 	st  %g3, [ %o0 + 0x20 ]
                       
  dd->ioctl = phys_dd->ioctl;
                                        
40004870:	c4 22 20 38 	st  %g2, [ %o0 + 0x38 ]
                       

                                                                     
  if (phys_dd->phys_dev == phys_dd) {
                                
40004874:	c2 06 60 08 	ld  [ %i1 + 8 ], %g1
                          
40004878:	80 a0 40 19 	cmp  %g1, %i1
                                 
4000487c:	02 80 00 04 	be  4000488c <rtems_disk_init_log+0x58>
       <== ALWAYS TAKEN
40004880:	b0 10 20 04 	mov  4, %i0
                                   
  } else {
                                                           
    sc = RTEMS_INVALID_ID;
                                           
  }
                                                                  

                                                                     
  return sc;
                                                         
}
                                                                    
40004884:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004888:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    rtems_blkdev_bnum phys_block_count = phys_dd->size;
              
4000488c:	c4 00 60 1c 	ld  [ %g1 + 0x1c ], %g2
                       
    if (
                                                             
40004890:	80 a6 80 02 	cmp  %i2, %g2
                                 
40004894:	1a 80 00 0a 	bcc  400048bc <rtems_disk_init_log+0x88>
      <== NEVER TAKEN
40004898:	80 a6 e0 00 	cmp  %i3, 0
                                   
4000489c:	02 80 00 08 	be  400048bc <rtems_disk_init_log+0x88>
       <== NEVER TAKEN
400048a0:	b4 20 80 1a 	sub  %g2, %i2, %i2
                            
        && block_count <= phys_block_count - block_begin
             
400048a4:	80 a6 80 1b 	cmp  %i2, %i3
                                 
400048a8:	0a 80 00 05 	bcs  400048bc <rtems_disk_init_log+0x88>
      <== NEVER TAKEN
400048ac:	b4 10 20 00 	clr  %i2
                                      
      sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);

400048b0:	f2 00 60 20 	ld  [ %g1 + 0x20 ], %i1
                       
400048b4:	40 00 37 e1 	call  40012838 <rtems_bdbuf_set_block_size>
   
400048b8:	91 e8 00 08 	restore  %g0, %o0, %o0
                        
}
                                                                    
400048bc:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
400048c0:	91 e8 20 0a 	restore  %g0, 0xa, %o0
                        <== NOT EXECUTED

                                                                     

400047cc <rtems_disk_init_phys>: uint32_t block_size, rtems_blkdev_bnum block_count, rtems_block_device_ioctl handler, void *driver_data ) {
400047cc:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  rtems_status_code sc;
                                              

                                                                     
  dd = memset(dd, 0, sizeof(*dd));
                                   
400047d0:	94 10 20 78 	mov  0x78, %o2
                                
400047d4:	90 10 00 18 	mov  %i0, %o0
                                 
400047d8:	40 00 43 cc 	call  40015708 <memset>
                       
400047dc:	92 10 20 00 	clr  %o1
                                      
400047e0:	b0 10 00 08 	mov  %o0, %i0
                                 

                                                                     
  dd->phys_dev = dd;
                                                 
400047e4:	d0 26 20 08 	st  %o0, [ %i0 + 8 ]
                          
  dd->size = block_count;
                                            
  dd->media_block_size = block_size;
                                 
  dd->ioctl = handler;
                                               
  dd->driver_data = driver_data;
                                     
  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
         
400047e8:	82 10 3f ff 	mov  -1, %g1
                                  
  dd->size = block_count;
                                            
400047ec:	f4 22 20 1c 	st  %i2, [ %o0 + 0x1c ]
                       

                                                                     
  if (block_count > 0) {
                                             
400047f0:	80 a6 a0 00 	cmp  %i2, 0
                                   
  dd->media_block_size = block_size;
                                 
400047f4:	f2 22 20 20 	st  %i1, [ %o0 + 0x20 ]
                       
  dd->ioctl = handler;
                                               
400047f8:	f6 22 20 38 	st  %i3, [ %o0 + 0x38 ]
                       
  dd->driver_data = driver_data;
                                     
400047fc:	f8 22 20 3c 	st  %i4, [ %o0 + 0x3c ]
                       
  if (block_count > 0) {
                                             
40004800:	02 80 00 0b 	be  4000482c <rtems_disk_init_phys+0x60>
      <== NEVER TAKEN
40004804:	c2 22 20 6c 	st  %g1, [ %o0 + 0x6c ]
                       
    if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) != 0) {

40004808:	94 02 20 0c 	add  %o0, 0xc, %o2
                            
4000480c:	13 08 00 10 	sethi  %hi(0x20004000), %o1
                   
40004810:	9f c6 c0 00 	call  %i3
                                     
40004814:	92 12 62 08 	or  %o1, 0x208, %o1	! 20004208 <RAM_SIZE+0x1fc04208>

40004818:	80 a2 20 00 	cmp  %o0, 0
                                   
4000481c:	32 80 00 02 	bne,a   40004824 <rtems_disk_init_phys+0x58>
  <== ALWAYS TAKEN
40004820:	c0 26 20 0c 	clr  [ %i0 + 0xc ]
                            
      dd->capabilities = 0;
                                          
    }
                                                                

                                                                     
    sc = rtems_bdbuf_set_block_size(dd, block_size, false);
          
40004824:	40 00 38 05 	call  40012838 <rtems_bdbuf_set_block_size>
   
40004828:	95 e8 20 00 	restore  %g0, 0, %o2
                          
  } else {
                                                           
    sc = RTEMS_INVALID_NUMBER;
                                       
  }
                                                                  

                                                                     
  return sc;
                                                         
}
                                                                    
4000482c:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004830:	91 e8 20 0a 	restore  %g0, 0xa, %o0
                        <== NOT EXECUTED

                                                                     

40004af0 <rtems_disk_io_done>: rtems_status_code rtems_disk_io_done(void) {
40004af0:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  rtems_device_major_number major = 0;
                               
  rtems_device_minor_number minor = 0;
                               

                                                                     
  for (major = 0; major < disktab_size; ++major) {
                   
40004af4:	21 10 00 9e 	sethi  %hi(0x40027800), %l0
                   
40004af8:	c2 04 20 28 	ld  [ %l0 + 0x28 ], %g1	! 40027828 <disktab_size>

40004afc:	35 10 00 9e 	sethi  %hi(0x40027800), %i2
                   
40004b00:	80 a0 60 00 	cmp  %g1, 0
                                   
40004b04:	02 80 00 1f 	be  40004b80 <rtems_disk_io_done+0x90>
        <== NEVER TAKEN
40004b08:	fa 06 a0 2c 	ld  [ %i2 + 0x2c ], %i5
                       
40004b0c:	b6 10 20 00 	clr  %i3
                                      
40004b10:	b2 14 20 28 	or  %l0, 0x28, %i1
                            
    rtems_disk_device_table *dtab = disktab + major;
                 
40004b14:	83 2e e0 03 	sll  %i3, 3, %g1
                              
40004b18:	b8 07 40 01 	add  %i5, %g1, %i4
                            

                                                                     
    for (minor = 0; minor < dtab->size; ++minor) {
                   
40004b1c:	c6 07 20 04 	ld  [ %i4 + 4 ], %g3
                          
40004b20:	80 a0 e0 00 	cmp  %g3, 0
                                   
40004b24:	02 80 00 10 	be  40004b64 <rtems_disk_io_done+0x74>
        
40004b28:	c4 07 40 01 	ld  [ %i5 + %g1 ], %g2
                        
40004b2c:	ba 10 20 00 	clr  %i5
                                      
      rtems_disk_device *dd = dtab->minor [minor];
                   
40004b30:	83 2f 60 02 	sll  %i5, 2, %g1
                              
40004b34:	c2 00 80 01 	ld  [ %g2 + %g1 ], %g1
                        

                                                                     
      if (dd != NULL) {
                                              
40004b38:	90 90 60 00 	orcc  %g1, 0, %o0
                             
40004b3c:	02 80 00 06 	be  40004b54 <rtems_disk_io_done+0x64>
        
40004b40:	ba 07 60 01 	inc  %i5
                                      
        free_disk_device(dd);
                                        
40004b44:	7f ff fe d6 	call  4000469c <free_disk_device>
             
40004b48:	01 00 00 00 	nop 
                                          
40004b4c:	c6 07 20 04 	ld  [ %i4 + 4 ], %g3
                          
40004b50:	c4 07 00 00 	ld  [ %i4 ], %g2
                              
    for (minor = 0; minor < dtab->size; ++minor) {
                   
40004b54:	80 a0 c0 1d 	cmp  %g3, %i5
                                 
40004b58:	18 bf ff f7 	bgu  40004b34 <rtems_disk_io_done+0x44>
       
40004b5c:	83 2f 60 02 	sll  %i5, 2, %g1
                              
40004b60:	fa 06 a0 2c 	ld  [ %i2 + 0x2c ], %i5
                       
      }
                                                              
    }
                                                                
    free(dtab->minor);
                                               
40004b64:	40 00 06 9d 	call  400065d8 <free>
                         
40004b68:	90 10 00 02 	mov  %g2, %o0
                                 
  for (major = 0; major < disktab_size; ++major) {
                   
40004b6c:	c2 06 40 00 	ld  [ %i1 ], %g1
                              
40004b70:	b6 06 e0 01 	inc  %i3
                                      
40004b74:	80 a0 40 1b 	cmp  %g1, %i3
                                 
40004b78:	18 bf ff e8 	bgu  40004b18 <rtems_disk_io_done+0x28>
       
40004b7c:	83 2e e0 03 	sll  %i3, 3, %g1
                              
  }
                                                                  
  free(disktab);
                                                     
40004b80:	90 10 00 1d 	mov  %i5, %o0
                                 
40004b84:	40 00 06 95 	call  400065d8 <free>
                         
40004b88:	b0 10 20 00 	clr  %i0
                                      

                                                                     
  disktab = NULL;
                                                    
40004b8c:	c0 26 a0 2c 	clr  [ %i2 + 0x2c ]
                           
  disktab_size = 0;
                                                  
40004b90:	c0 24 20 28 	clr  [ %l0 + 0x28 ]
                           

                                                                     
  return RTEMS_SUCCESSFUL;
                                           
}
                                                                    
40004b94:	81 c7 e0 08 	ret 
                                          
40004b98:	81 e8 00 00 	restore 
                                      

                                                                     

40004fe4 <rtems_disk_io_initialize>: } } rtems_status_code rtems_disk_io_initialize(void) {
40004fe4:	9d e3 bf a0 	save  %sp, -96, %sp
                           
  rtems_status_code sc = RTEMS_SUCCESSFUL;
                           
  rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
             

                                                                     
  if (disktab_size > 0) {
                                            
40004fe8:	3b 10 00 98 	sethi  %hi(0x40026000), %i5
                   
40004fec:	c2 07 63 60 	ld  [ %i5 + 0x360 ], %g1	! 40026360 <disktab_size>

40004ff0:	80 a0 60 00 	cmp  %g1, 0
                                   
40004ff4:	12 80 00 10 	bne  40005034 <rtems_disk_io_initialize+0x50>
 
40004ff8:	b0 10 20 00 	clr  %i0
                                      
    return RTEMS_SUCCESSFUL;
                                         
  }
                                                                  

                                                                     
  disktab = calloc(size, sizeof(rtems_disk_device_table));
           
40004ffc:	92 10 20 08 	mov  8, %o1
                                   
40005000:	90 10 20 08 	mov  8, %o0
                                   
40005004:	40 00 07 da 	call  40006f6c <calloc>
                       
40005008:	39 10 00 98 	sethi  %hi(0x40026000), %i4
                   
4000500c:	d0 27 23 64 	st  %o0, [ %i4 + 0x364 ]	! 40026364 <disktab>
 
  if (disktab == NULL) {
                                             
40005010:	80 a2 20 00 	cmp  %o0, 0
                                   
40005014:	02 80 00 08 	be  40005034 <rtems_disk_io_initialize+0x50>
  <== NEVER TAKEN
40005018:	b0 10 20 1a 	mov  0x1a, %i0
                                
    return RTEMS_NO_MEMORY;
                                          
  }
                                                                  

                                                                     
  sc = rtems_bdbuf_init();
                                           
4000501c:	40 00 34 49 	call  40012140 <rtems_bdbuf_init>
             
40005020:	01 00 00 00 	nop 
                                          
  if (sc != RTEMS_SUCCESSFUL) {
                                      
40005024:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
40005028:	12 80 00 05 	bne  4000503c <rtems_disk_io_initialize+0x58>
 <== NEVER TAKEN
4000502c:	82 10 20 08 	mov  8, %g1
                                   
    free(disktab);
                                                   

                                                                     
    return RTEMS_UNSATISFIED;
                                        
  }
                                                                  

                                                                     
  disktab_size = size;
                                               
40005030:	c2 27 63 60 	st  %g1, [ %i5 + 0x360 ]
                      

                                                                     
  return RTEMS_SUCCESSFUL;
                                           
}
                                                                    
40005034:	81 c7 e0 08 	ret 
                                          
40005038:	81 e8 00 00 	restore 
                                      
    free(disktab);
                                                   
4000503c:	40 00 08 51 	call  40007180 <free>
                         <== NOT EXECUTED
40005040:	d0 07 23 64 	ld  [ %i4 + 0x364 ], %o0
                      <== NOT EXECUTED
    return RTEMS_UNSATISFIED;
                                        
40005044:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40005048:	91 e8 20 0d 	restore  %g0, 0xd, %o0
                        <== NOT EXECUTED

                                                                     

40004f10 <rtems_disk_obtain>: rtems_disk_device * rtems_disk_obtain(dev_t dev) {
40004f10:	9d e3 bf a0 	save  %sp, -96, %sp
                           <== NOT EXECUTED
  __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS));

40004f14:	91 d0 20 09 	ta  9
                                         <== NOT EXECUTED
  return psr;
                                                        
40004f18:	b8 10 00 01 	mov  %g1, %i4
                                 
  rtems_disk_device *dd = NULL;
                                      
  rtems_interrupt_lock_context lock_context;
                         

                                                                     
  rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);
       
  if (!diskdevs_protected) {
                                         
40004f1c:	3b 10 00 98 	sethi  %hi(0x40026000), %i5
                   
40004f20:	c4 0f 63 5c 	ldub  [ %i5 + 0x35c ], %g2	! 4002635c <diskdevs_protected>

40004f24:	80 a0 a0 00 	cmp  %g2, 0
                                   
40004f28:	02 80 00 14 	be  40004f78 <rtems_disk_obtain+0x68>
         <== ALWAYS TAKEN
40004f2c:	94 10 20 00 	clr  %o2
                                      
  __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr));

40004f30:	91 d0 20 0a 	ta  0xa
                                       <== NOT EXECUTED
40004f34:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
  _Mutex_Acquire( mutex );
                                           
40004f38:	39 10 00 94 	sethi  %hi(0x40025000), %i4
                   <== NOT EXECUTED
40004f3c:	40 00 1a 8c 	call  4000b96c <_Mutex_Acquire>
               <== NOT EXECUTED
40004f40:	90 17 20 98 	or  %i4, 0x98, %o0	! 40025098 <diskdevs_mutex>
<== NOT EXECUTED
  diskdevs_protected = true;
                                         
40004f44:	82 10 20 01 	mov  1, %g1
                                   <== NOT EXECUTED
    rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
     
  } else {
                                                           
    rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
     

                                                                     
    disk_lock();
                                                     
    dd = get_disk_entry(dev, false);
                                 
40004f48:	94 10 20 00 	clr  %o2
                                      <== NOT EXECUTED
40004f4c:	90 10 00 18 	mov  %i0, %o0
                                 <== NOT EXECUTED
40004f50:	92 10 00 19 	mov  %i1, %o1
                                 <== NOT EXECUTED
  diskdevs_protected = true;
                                         
40004f54:	c2 2f 63 5c 	stb  %g1, [ %i5 + 0x35c ]
                     <== NOT EXECUTED
    dd = get_disk_entry(dev, false);
                                 
40004f58:	7f ff fe 5b 	call  400048c4 <get_disk_entry>
               <== NOT EXECUTED
40004f5c:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
  diskdevs_protected = false;
                                        
40004f60:	c0 2f 63 5c 	clrb  [ %i5 + 0x35c ]
                         <== NOT EXECUTED
    dd = get_disk_entry(dev, false);
                                 
40004f64:	b0 10 00 08 	mov  %o0, %i0
                                 <== NOT EXECUTED
  _Mutex_Release( mutex );
                                           
40004f68:	40 00 1a 9d 	call  4000b9dc <_Mutex_Release>
               <== NOT EXECUTED
40004f6c:	90 17 20 98 	or  %i4, 0x98, %o0
                            <== NOT EXECUTED
    disk_unlock();
                                                   
  }
                                                                  

                                                                     
  return dd;
                                                         
}
                                                                    
40004f70:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
40004f74:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED
    dd = get_disk_entry(dev, false);
                                 
40004f78:	90 10 00 18 	mov  %i0, %o0
                                 
40004f7c:	7f ff fe 52 	call  400048c4 <get_disk_entry>
               
40004f80:	92 10 00 19 	mov  %i1, %o1
                                 
40004f84:	b0 10 00 08 	mov  %o0, %i0
                                 <== NOT EXECUTED
  register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */

40004f88:	82 10 00 1c 	mov  %i4, %g1
                                 <== NOT EXECUTED
  __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr));

40004f8c:	91 d0 20 0a 	ta  0xa
                                       <== NOT EXECUTED
40004f90:	01 00 00 00 	nop 
                                          
40004f94:	81 c7 e0 08 	ret 
                                          
40004f98:	81 e8 00 00 	restore 
                                      

                                                                     

40004f9c <rtems_disk_release>: rtems_status_code rtems_disk_release(rtems_disk_device *dd) {
40004f9c:	9d e3 bf a0 	save  %sp, -96, %sp
                           <== NOT EXECUTED
  rtems_interrupt_lock_context lock_context;
                         
  dev_t dev = dd->dev;
                                               
40004fa0:	d0 1e 00 00 	ldd  [ %i0 ], %o0
                             <== NOT EXECUTED
  __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS));

40004fa4:	91 d0 20 09 	ta  9
                                         <== NOT EXECUTED
  unsigned uses = 0;
                                                 
  bool deleted = false;
                                              

                                                                     
  rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);
       
  uses = --dd->uses;
                                                 
40004fa8:	c4 06 20 14 	ld  [ %i0 + 0x14 ], %g2
                       <== NOT EXECUTED
40004fac:	84 00 bf ff 	add  %g2, -1, %g2
                             <== NOT EXECUTED
  deleted = dd->deleted;
                                             
40004fb0:	c6 0e 20 40 	ldub  [ %i0 + 0x40 ], %g3
                     <== NOT EXECUTED
  uses = --dd->uses;
                                                 
40004fb4:	c4 26 20 14 	st  %g2, [ %i0 + 0x14 ]
                       <== NOT EXECUTED
  __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr));

40004fb8:	91 d0 20 0a 	ta  0xa
                                       <== NOT EXECUTED
40004fbc:	01 00 00 00 	nop 
                                          
  rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
       

                                                                     
  if (uses == 0 && deleted) {
                                        
40004fc0:	80 a0 a0 00 	cmp  %g2, 0
                                   
40004fc4:	12 80 00 06 	bne  40004fdc <rtems_disk_release+0x40>
       
40004fc8:	80 88 e0 ff 	btst  0xff, %g3
                               
40004fcc:	02 80 00 04 	be  40004fdc <rtems_disk_release+0x40>
        <== ALWAYS TAKEN
40004fd0:	01 00 00 00 	nop 
                                          
    rtems_disk_delete(dev);
                                          
40004fd4:	7f ff ff be 	call  40004ecc <rtems_disk_delete>
            <== NOT EXECUTED
40004fd8:	01 00 00 00 	nop 
                                          <== NOT EXECUTED
  }
                                                                  

                                                                     
  return RTEMS_SUCCESSFUL;
                                           
}
                                                                    
40004fdc:	81 c7 e0 08 	ret 
                                          
40004fe0:	91 e8 20 00 	restore  %g0, 0, %o0
                          

                                                                     

40005560 <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) {
40005560:	9d e3 bf 88 	save  %sp, -120, %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));

40005564:	92 10 21 28 	mov  0x128, %o1
                               
40005568:	90 10 20 01 	mov  1, %o0
                                   
4000556c:	40 00 06 80 	call  40006f6c <calloc>
                       
40005570:	b2 10 00 18 	mov  %i0, %i1
                                 
    if (disk_desc == NULL)
                                           
    {
                                                                
        return RTEMS_NO_MEMORY;
                                      
40005574:	b0 10 20 1a 	mov  0x1a, %i0
                                
    if (disk_desc == NULL)
                                           
40005578:	80 a2 20 00 	cmp  %o0, 0
                                   
4000557c:	02 80 00 32 	be  40005644 <rtems_ide_part_table_initialize+0xe4>
<== NEVER TAKEN
40005580:	b8 10 00 08 	mov  %o0, %i4
                                 
    }
                                                                

                                                                     
    /* get partition table */
                                        
    rc = partition_table_get(dev_name, disk_desc);
                   
40005584:	92 10 00 08 	mov  %o0, %o1
                                 
40005588:	7f ff ff 85 	call  4000539c <partition_table_get>
          
4000558c:	90 10 00 19 	mov  %i1, %o0
                                 
    if (rc != RTEMS_SUCCESSFUL)
                                      
40005590:	b0 92 20 00 	orcc  %o0, 0, %i0
                             
40005594:	12 80 00 37 	bne  40005670 <rtems_ide_part_table_initialize+0x110>
<== NEVER TAKEN
40005598:	13 10 00 8c 	sethi  %hi(0x40023000), %o1
                   
     */
                                                              

                                                                     
    rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
     

                                                                     
    /* create logical disks on the physical one */
                   
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

4000559c:	c2 07 20 24 	ld  [ %i4 + 0x24 ], %g1
                       
400055a0:	ba 10 20 00 	clr  %i5
                                      
    {
                                                                
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
400055a4:	b4 07 bf f0 	add  %fp, -16, %i2
                            
400055a8:	21 10 00 8c 	sethi  %hi(0x40023000), %l0
                   

                                                                     
        rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,

                                   part_desc->size, name);
           
        if (rc != RTEMS_SUCCESSFUL)
                                  
        {
                                                            
            fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);

400055ac:	a8 12 61 10 	or  %o1, 0x110, %l4
                           
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
400055b0:	a0 14 21 08 	or  %l0, 0x108, %l0
                           
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

400055b4:	80 a0 40 1d 	cmp  %g1, %i5
                                 
    rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
     
400055b8:	e6 07 00 00 	ld  [ %i4 ], %l3
                              
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
400055bc:	ba 07 60 01 	inc  %i5
                                      
    rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
     
400055c0:	e4 07 20 04 	ld  [ %i4 + 4 ], %l2
                          
400055c4:	b6 07 20 28 	add  %i4, 0x28, %i3
                           
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
400055c8:	94 10 00 19 	mov  %i1, %o2
                                 
400055cc:	92 10 00 10 	mov  %l0, %o1
                                 
400055d0:	90 10 00 1a 	mov  %i2, %o0
                                 
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

400055d4:	04 80 00 1a 	ble  4000563c <rtems_ide_part_table_initialize+0xdc>
<== NEVER TAKEN
400055d8:	96 10 00 1d 	mov  %i5, %o3
                                 
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
400055dc:	40 00 41 58 	call  40015b3c <sprintf>
                      
400055e0:	01 00 00 00 	nop 
                                          
        part_desc = disk_desc->partitions[part_num];
                 
400055e4:	c2 06 c0 00 	ld  [ %i3 ], %g1
                              
        rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,

400055e8:	90 10 00 13 	mov  %l3, %o0
                                 
        if (part_desc == NULL)
                                       
400055ec:	80 a0 60 00 	cmp  %g1, 0
                                   
400055f0:	02 80 00 0a 	be  40005618 <rtems_ide_part_table_initialize+0xb8>

400055f4:	92 07 40 12 	add  %i5, %l2, %o1
                            
        rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,

400055f8:	f4 23 a0 5c 	st  %i2, [ %sp + 0x5c ]
                       
400055fc:	d4 1f 00 00 	ldd  [ %i4 ], %o2
                             
40005600:	da 00 60 08 	ld  [ %g1 + 8 ], %o5
                          
40005604:	7f ff fd f5 	call  40004dd8 <rtems_disk_create_log>
        
40005608:	d8 00 60 04 	ld  [ %g1 + 4 ], %o4
                          
        if (rc != RTEMS_SUCCESSFUL)
                                  
4000560c:	a2 92 20 00 	orcc  %o0, 0, %l1
                             
40005610:	12 80 00 0f 	bne  4000564c <rtems_ide_part_table_initialize+0xec>
<== NEVER TAKEN
40005614:	01 00 00 00 	nop 
                                          
40005618:	b6 06 e0 04 	add  %i3, 4, %i3
                              
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

4000561c:	c2 07 20 24 	ld  [ %i4 + 0x24 ], %g1
                       
40005620:	80 a0 40 1d 	cmp  %g1, %i5
                                 
        sprintf(name, "%s%d", dev_name, part_num + 1);
               
40005624:	94 10 00 19 	mov  %i1, %o2
                                 
40005628:	ba 07 60 01 	inc  %i5
                                      
4000562c:	92 10 00 10 	mov  %l0, %o1
                                 
40005630:	90 10 00 1a 	mov  %i2, %o0
                                 
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

40005634:	14 bf ff ea 	bg  400055dc <rtems_ide_part_table_initialize+0x7c>

40005638:	96 10 00 1d 	mov  %i5, %o3
                                 
            continue;
                                                
        }
                                                            
    }
                                                                

                                                                     
    partition_table_free(disk_desc);
                                 
4000563c:	7f ff fe 99 	call  400050a0 <partition_table_free>
         
40005640:	90 10 00 1c 	mov  %i4, %o0
                                 

                                                                     
    return RTEMS_SUCCESSFUL;
                                         
}
                                                                    
40005644:	81 c7 e0 08 	ret 
                                          
40005648:	81 e8 00 00 	restore 
                                      
            fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);

4000564c:	7f ff f0 05 	call  40001660 <__getreent>
                   <== NOT EXECUTED
40005650:	b6 06 e0 04 	add  %i3, 4, %i3
                              <== NOT EXECUTED
40005654:	d0 02 20 08 	ld  [ %o0 + 8 ], %o0
                          <== NOT EXECUTED
40005658:	96 10 00 11 	mov  %l1, %o3
                                 <== NOT EXECUTED
4000565c:	94 10 00 1a 	mov  %i2, %o2
                                 <== NOT EXECUTED
40005660:	40 00 3f 35 	call  40015334 <fprintf>
                      <== NOT EXECUTED
40005664:	92 10 00 14 	mov  %l4, %o1
                                 <== NOT EXECUTED
    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)

40005668:	10 bf ff ee 	b  40005620 <rtems_ide_part_table_initialize+0xc0>
<== NOT EXECUTED
4000566c:	c2 07 20 24 	ld  [ %i4 + 0x24 ], %g1
                       <== NOT EXECUTED
        free(disk_desc);
                                             
40005670:	40 00 06 c4 	call  40007180 <free>
                         <== NOT EXECUTED
40005674:	90 10 00 1c 	mov  %i4, %o0
                                 <== NOT EXECUTED
        return rc;
                                                   
40005678:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000567c:	81 e8 00 00 	restore 
                                      <== NOT EXECUTED

                                                                     

4000f374 <rtems_sparse_disk_create_and_register>: {
4000f374:	9d e3 bf 98 	save  %sp, -104, %sp
                          
  size_t const alloc_size     = sizeof( rtems_sparse_disk )
          
4000f378:	90 06 60 08 	add  %i1, 8, %o0
                              
4000f37c:	90 5a 00 1a 	smul  %o0, %i2, %o0
                           
  rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(
        
4000f380:	7f ff d9 94 	call  400059d0 <malloc>
                       
4000f384:	90 02 20 2c 	add  %o0, 0x2c, %o0
                           
4000f388:	92 10 00 08 	mov  %o0, %o1
                                 
  if ( sparse_disk != NULL ) {
                                       
4000f38c:	80 a2 60 00 	cmp  %o1, 0
                                   
4000f390:	02 80 00 0b 	be  4000f3bc <rtems_sparse_disk_create_and_register+0x48>
<== NEVER TAKEN
4000f394:	90 10 20 1a 	mov  0x1a, %o0
                                
    sc = rtems_sparse_disk_register(
                                 
4000f398:	03 10 00 3c 	sethi  %hi(0x4000f000), %g1
                   
4000f39c:	82 10 60 08 	or  %g1, 8, %g1	! 4000f008 <rtems_sparse_disk_free>

4000f3a0:	c2 23 a0 5c 	st  %g1, [ %sp + 0x5c ]
                       
4000f3a4:	9a 10 00 1c 	mov  %i4, %o5
                                 
4000f3a8:	98 10 00 1b 	mov  %i3, %o4
                                 
4000f3ac:	96 10 00 1a 	mov  %i2, %o3
                                 
4000f3b0:	94 10 00 19 	mov  %i1, %o2
                                 
4000f3b4:	7f ff ff bd 	call  4000f2a8 <rtems_sparse_disk_register>
   
4000f3b8:	90 10 00 18 	mov  %i0, %o0
                                 
}
                                                                    
4000f3bc:	81 c7 e0 08 	ret 
                                          
4000f3c0:	91 e8 00 08 	restore  %g0, %o0, %o0
                        
	...
                                                                 

                                                                     

4000f2a8 <rtems_sparse_disk_register>: uint32_t media_block_size, rtems_blkdev_bnum blocks_with_buffer, rtems_blkdev_bnum media_block_count, uint8_t fill_pattern, rtems_sparse_disk_delete_handler sparse_disk_delete ) {
4000f2a8:	9d e3 bf a0 	save  %sp, -96, %sp
                           
4000f2ac:	a2 10 00 1c 	mov  %i4, %l1
                                 
4000f2b0:	a0 10 00 1a 	mov  %i2, %l0
                                 
  rtems_status_code sc;
                                              

                                                                     
  if ( blocks_with_buffer <= media_block_count ) {
                   
4000f2b4:	80 a6 c0 1c 	cmp  %i3, %i4
                                 
4000f2b8:	18 80 00 2b 	bgu  4000f364 <rtems_sparse_disk_register+0xbc>
<== NEVER TAKEN
4000f2bc:	e4 07 a0 5c 	ld  [ %fp + 0x5c ], %l2
                       
  if ( NULL == sd )
                                                  
4000f2c0:	80 a6 60 00 	cmp  %i1, 0
                                   
4000f2c4:	02 80 00 2a 	be  4000f36c <rtems_sparse_disk_register+0xc4>
<== NEVER TAKEN
4000f2c8:	92 10 20 00 	clr  %o1
                                      
  size_t const key_table_size = blocks_with_buffer
                   
4000f2cc:	b9 2e e0 03 	sll  %i3, 3, %i4
                              
  memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
   
4000f2d0:	90 10 00 19 	mov  %i1, %o0
                                 
4000f2d4:	b4 07 20 2c 	add  %i4, 0x2c, %i2
                           
4000f2d8:	40 00 32 c6 	call  4001bdf0 <memset>
                       
4000f2dc:	94 10 00 1a 	mov  %i2, %o2
                                 
  sd->fill_pattern = fill_pattern;
                                   
4000f2e0:	fa 2e 60 24 	stb  %i5, [ %i1 + 0x24 ]
                      
  memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),

4000f2e4:	b4 06 40 1a 	add  %i1, %i2, %i2
                            
4000f2e8:	94 5e c0 10 	smul  %i3, %l0, %o2
                           
4000f2ec:	92 10 00 1d 	mov  %i5, %o1
                                 
4000f2f0:	40 00 32 c0 	call  4001bdf0 <memset>
                       
4000f2f4:	90 10 00 1a 	mov  %i2, %o0
                                 
  data                  += sizeof( rtems_sparse_disk );
              
4000f2f8:	86 06 60 2c 	add  %i1, 0x2c, %g3
                           
	*_mutex = _init;
                                                    
4000f2fc:	03 10 00 a7 	sethi  %hi(0x40029c00), %g1
                   
  sd->delete_handler = sparse_disk_delete;
                           
4000f300:	e4 26 60 20 	st  %l2, [ %i1 + 0x20 ]
                       
4000f304:	82 10 63 b0 	or  %g1, 0x3b0, %g1
                           
4000f308:	c0 26 40 00 	clr  [ %i1 ]
                                  
  for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {

4000f30c:	80 a6 e0 00 	cmp  %i3, 0
                                   
4000f310:	c0 26 60 04 	clr  [ %i1 + 4 ]
                              
4000f314:	c0 26 60 08 	clr  [ %i1 + 8 ]
                              
4000f318:	c0 26 60 0c 	clr  [ %i1 + 0xc ]
                            
4000f31c:	c2 26 60 10 	st  %g1, [ %i1 + 0x10 ]
                       
  sd->blocks_with_buffer = blocks_with_buffer;
                       
4000f320:	f6 26 60 14 	st  %i3, [ %i1 + 0x14 ]
                       
  for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {

4000f324:	02 80 00 09 	be  4000f348 <rtems_sparse_disk_register+0xa0>
<== NEVER TAKEN
4000f328:	c6 26 60 28 	st  %g3, [ %i1 + 0x28 ]
                       
4000f32c:	82 10 00 19 	mov  %i1, %g1
                                 
4000f330:	86 07 00 19 	add  %i4, %i1, %g3
                            
    sd->key_table[i].data = data;
                                    
4000f334:	f4 20 60 30 	st  %i2, [ %g1 + 0x30 ]
                       
4000f338:	82 00 60 08 	add  %g1, 8, %g1
                              
  for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {

4000f33c:	80 a0 40 03 	cmp  %g1, %g3
                                 
4000f340:	12 bf ff fd 	bne  4000f334 <rtems_sparse_disk_register+0x8c>

4000f344:	b4 06 80 10 	add  %i2, %l0, %i2
                            
  sd->media_block_size = media_block_size;
                           
4000f348:	e0 26 60 1c 	st  %l0, [ %i1 + 0x1c ]
                       
      sparse_disk_delete,
                                            
      fill_pattern
                                                   
    );
                                                               

                                                                     
    if ( RTEMS_SUCCESSFUL == sc ) {
                                  
      sc = rtems_blkdev_create(
                                      
4000f34c:	b8 10 00 19 	mov  %i1, %i4
                                 
4000f350:	37 10 00 3c 	sethi  %hi(0x4000f000), %i3
                   
4000f354:	b4 10 00 11 	mov  %l1, %i2
                                 
4000f358:	b6 16 e0 14 	or  %i3, 0x14, %i3
                            
4000f35c:	40 00 0b f8 	call  4001233c <rtems_blkdev_create>
          
4000f360:	93 e8 00 10 	restore  %g0, %l0, %o1
                        
        sparse_disk_ioctl,
                                           
        sparse_disk
                                                  
      );
                                                             
    }
                                                                
  } else {
                                                           
    sc = RTEMS_INVALID_NUMBER;
                                       
4000f364:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000f368:	91 e8 20 0a 	restore  %g0, 0xa, %o0
                        <== NOT EXECUTED
  }
                                                                  

                                                                     
  return sc;
                                                         
}
                                                                    
4000f36c:	81 c7 e0 08 	ret 
                                          <== NOT EXECUTED
4000f370:	91 e8 20 09 	restore  %g0, 9, %o0
                          <== NOT EXECUTED