=============================================================================== 40012af4 : void *area_begin, uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace ) { 40012af4: 9d e3 bf a0 save %sp, -96, %sp struct ramdisk *rd = calloc(1, sizeof(*rd)); 40012af8: 92 10 20 10 mov 0x10, %o1 40012afc: 40 00 00 35 call 40012bd0 40012b00: 90 10 20 01 mov 1, %o0 if (rd == NULL) { 40012b04: ba 92 20 00 orcc %o0, 0, %i5 40012b08: 02 80 00 0a be 40012b30 <== NEVER TAKEN 40012b0c: 80 a6 20 00 cmp %i0, 0 return NULL; } if (area_begin == NULL) { 40012b10: 02 80 00 0a be 40012b38 40012b14: 92 10 00 19 mov %i1, %o1 } rd->block_size = media_block_size; rd->block_num = media_block_count; rd->area = area_begin; rd->trace = trace; rd->initialized = true; 40012b18: 82 10 20 01 mov 1, %g1 rd->block_size = media_block_size; 40012b1c: f2 27 40 00 st %i1, [ %i5 ] rd->block_num = media_block_count; 40012b20: f4 27 60 04 st %i2, [ %i5 + 4 ] rd->area = area_begin; 40012b24: f0 27 60 08 st %i0, [ %i5 + 8 ] rd->trace = trace; 40012b28: f6 2f 60 0e stb %i3, [ %i5 + 0xe ] rd->initialized = true; 40012b2c: c2 2f 60 0c stb %g1, [ %i5 + 0xc ] return rd; } 40012b30: 81 c7 e0 08 ret 40012b34: 91 e8 00 1d restore %g0, %i5, %o0 area_begin = calloc(media_block_count, media_block_size); 40012b38: 40 00 00 26 call 40012bd0 40012b3c: 90 10 00 1a mov %i2, %o0 if (area_begin == NULL) { 40012b40: b0 92 20 00 orcc %o0, 0, %i0 40012b44: 02 80 00 04 be 40012b54 <== NEVER TAKEN 40012b48: 82 10 20 01 mov 1, %g1 rd->malloced = true; 40012b4c: 10 bf ff f4 b 40012b1c 40012b50: c2 2f 60 0d stb %g1, [ %i5 + 0xd ] free(rd); 40012b54: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40012b58: 7f ff c1 2a call 40003000 <== NOT EXECUTED 40012b5c: ba 10 20 00 clr %i5 <== NOT EXECUTED return NULL; 40012b60: 30 bf ff f4 b,a 40012b30 <== NOT EXECUTED =============================================================================== 40003844 : return rd; } void ramdisk_free(ramdisk *rd) { 40003844: 9d e3 bf a0 save %sp, -96, %sp if (rd != NULL) { 40003848: 80 a6 20 00 cmp %i0, 0 4000384c: 02 80 00 0c be 4000387c <== NEVER TAKEN 40003850: 01 00 00 00 nop if (rd->malloced) { 40003854: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1 40003858: 80 a0 60 00 cmp %g1, 0 4000385c: 12 80 00 04 bne 4000386c 40003860: 01 00 00 00 nop free(rd->area); } free(rd); 40003864: 40 00 00 90 call 40003aa4 40003868: 81 e8 00 00 restore free(rd->area); 4000386c: 40 00 00 8e call 40003aa4 40003870: d0 06 20 08 ld [ %i0 + 8 ], %o0 free(rd); 40003874: 40 00 00 8c call 40003aa4 40003878: 81 e8 00 00 restore } } 4000387c: 81 c7 e0 08 ret <== NOT EXECUTED 40003880: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400035cc : rtems_device_driver ramdisk_initialize( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void *arg RTEMS_UNUSED) { 400035cc: 9d e3 bf 88 save %sp, -120, %sp * This is allocating memory for a RAM disk which will persist for * the life of the system. RTEMS has no "de-initialize" driver call * so there is no corresponding free(r). Coverity is correct that * it is never freed but this is not a problem. */ r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk)); 400035d0: 35 10 00 89 sethi %hi(0x40022400), %i2 400035d4: f8 06 a3 14 ld [ %i2 + 0x314 ], %i4 ! 40022714 400035d8: 92 10 20 10 mov 0x10, %o1 400035dc: 40 00 00 c4 call 400038ec 400035e0: 90 10 00 1c mov %i4, %o0 r->trace = false; 400035e4: c0 2a 20 0e clrb [ %o0 + 0xe ] for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++) 400035e8: 80 a7 20 00 cmp %i4, 0 400035ec: 02 80 00 2e be 400036a4 <== NEVER TAKEN 400035f0: ba 10 00 08 mov %o0, %i5 rtems_ramdisk_config *c = rtems_ramdisk_configuration; 400035f4: 39 10 00 89 sethi %hi(0x40022400), %i4 { char name [] = RAMDISK_DEVICE_BASE_NAME "a"; 400035f8: 31 0b d9 19 sethi %hi(0x2f646400), %i0 400035fc: 33 0b dc 99 sethi %hi(0x2f726400), %i1 { r->malloced = false; r->initialized = true; r->area = c->location; } rc = rtems_blkdev_create(name, c->block_size, c->block_num, 40003600: 23 10 00 0d sethi %hi(0x40003400), %l1 rtems_ramdisk_config *c = rtems_ramdisk_configuration; 40003604: b8 17 23 18 or %i4, 0x318, %i4 for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++) 40003608: b6 10 20 00 clr %i3 4000360c: b4 16 a3 14 or %i2, 0x314, %i2 char name [] = RAMDISK_DEVICE_BASE_NAME "a"; 40003610: b0 16 21 76 or %i0, 0x176, %i0 40003614: b2 16 60 61 or %i1, 0x61, %i1 rc = rtems_blkdev_create(name, c->block_size, c->block_num, 40003618: a2 14 62 e8 or %l1, 0x2e8, %l1 r->initialized = true; 4000361c: a0 10 20 01 mov 1, %l0 char name [] = RAMDISK_DEVICE_BASE_NAME "a"; 40003620: f0 3f bf f0 std %i0, [ %fp + -16 ] name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i; 40003624: 82 06 e0 61 add %i3, 0x61, %g1 r->block_size = c->block_size; 40003628: d2 07 00 00 ld [ %i4 ], %o1 r->block_num = c->block_num; 4000362c: d4 07 20 04 ld [ %i4 + 4 ], %o2 name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i; 40003630: c2 2f bf f7 stb %g1, [ %fp + -9 ] r->block_size = c->block_size; 40003634: d2 27 40 00 st %o1, [ %i5 ] r->block_num = c->block_num; 40003638: d4 27 60 04 st %o2, [ %i5 + 4 ] char name [] = RAMDISK_DEVICE_BASE_NAME "a"; 4000363c: c0 2f bf f8 clrb [ %fp + -8 ] if (c->location == NULL) 40003640: c2 07 20 08 ld [ %i4 + 8 ], %g1 40003644: 80 a0 60 00 cmp %g1, 0 40003648: 22 80 00 1d be,a 400036bc 4000364c: e0 2f 60 0d stb %l0, [ %i5 + 0xd ] r->malloced = false; 40003650: c0 2f 60 0d clrb [ %i5 + 0xd ] r->initialized = true; 40003654: e0 2f 60 0c stb %l0, [ %i5 + 0xc ] r->area = c->location; 40003658: c2 27 60 08 st %g1, [ %i5 + 8 ] rc = rtems_blkdev_create(name, c->block_size, c->block_num, 4000365c: 98 10 00 1d mov %i5, %o4 40003660: 96 10 00 11 mov %l1, %o3 40003664: 7f ff fd 17 call 40002ac0 40003668: 90 07 bf f0 add %fp, -16, %o0 ramdisk_ioctl, r); if (rc != RTEMS_SUCCESSFUL) 4000366c: 80 a2 20 00 cmp %o0, 0 40003670: 22 80 00 08 be,a 40003690 <== ALWAYS TAKEN 40003674: b6 06 e0 01 inc %i3 { if (r->malloced) 40003678: c2 0f 60 0d ldub [ %i5 + 0xd ], %g1 <== NOT EXECUTED 4000367c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003680: 12 80 00 0b bne 400036ac <== NOT EXECUTED 40003684: 01 00 00 00 nop <== NOT EXECUTED { free(r->area); } r->initialized = false; 40003688: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++) 4000368c: b6 06 e0 01 inc %i3 <== NOT EXECUTED 40003690: c2 06 80 00 ld [ %i2 ], %g1 40003694: b8 07 20 0c add %i4, 0xc, %i4 40003698: 80 a0 40 1b cmp %g1, %i3 4000369c: 18 bf ff e1 bgu 40003620 400036a0: ba 07 60 10 add %i5, 0x10, %i5 } } return RTEMS_SUCCESSFUL; } 400036a4: 81 c7 e0 08 ret 400036a8: 91 e8 20 00 restore %g0, 0, %o0 free(r->area); 400036ac: 40 00 00 fe call 40003aa4 <== NOT EXECUTED 400036b0: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED r->initialized = false; 400036b4: 10 bf ff f6 b 4000368c <== NOT EXECUTED 400036b8: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED r->area = malloc(r->block_size * r->block_num); 400036bc: 90 5a 40 0a smul %o1, %o2, %o0 400036c0: d4 27 bf e8 st %o2, [ %fp + -24 ] 400036c4: 40 00 02 47 call 40003fe0 400036c8: d2 27 bf ec st %o1, [ %fp + -20 ] 400036cc: d0 27 60 08 st %o0, [ %i5 + 8 ] if (r->area == NULL) /* No enough memory for this disk */ 400036d0: 80 a2 20 00 cmp %o0, 0 400036d4: d2 07 bf ec ld [ %fp + -20 ], %o1 400036d8: 02 bf ff ec be 40003688 <== NEVER TAKEN 400036dc: d4 07 bf e8 ld [ %fp + -24 ], %o2 400036e0: 10 bf ff df b 4000365c 400036e4: e0 2f 60 0c stb %l0, [ %i5 + 0xc ] =============================================================================== 400036e8 : return 0; } int ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) { 400036e8: 9d e3 bf a0 save %sp, -96, %sp struct ramdisk *rd = rtems_disk_get_driver_data(dd); switch (req) 400036ec: 03 08 00 10 sethi %hi(0x20004000), %g1 static inline void *rtems_disk_get_driver_data( const rtems_disk_device *dd ) { return dd->driver_data; 400036f0: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 400036f4: 82 10 62 07 or %g1, 0x207, %g1 400036f8: 80 a6 40 01 cmp %i1, %g1 400036fc: 02 80 00 25 be 40003790 40003700: b8 10 00 1a mov %i2, %i4 40003704: 03 30 06 10 sethi %hi(0xc0184000), %g1 40003708: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 4000370c: 80 a6 40 01 cmp %i1, %g1 40003710: 12 80 00 2a bne 400037b8 40003714: 01 00 00 00 nop { case RTEMS_BLKIO_REQUEST: { rtems_blkdev_request *r = argp; switch (r->req) 40003718: f6 06 80 00 ld [ %i2 ], %i3 4000371c: 80 a6 e0 00 cmp %i3, 0 40003720: 02 80 00 2e be 400037d8 40003724: 80 a6 e0 01 cmp %i3, 1 40003728: 12 80 00 26 bne 400037c0 <== NEVER TAKEN 4000372c: ba 07 20 18 add %i4, 0x18, %i5 for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 40003730: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 40003734: 80 a0 60 00 cmp %g1, 0 40003738: 02 80 00 0f be 40003774 <== NEVER TAKEN 4000373c: f4 04 20 08 ld [ %l0 + 8 ], %i2 40003740: b6 10 20 00 clr %i3 memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length); 40003744: d0 07 40 00 ld [ %i5 ], %o0 40003748: c2 04 00 00 ld [ %l0 ], %g1 4000374c: d4 07 60 04 ld [ %i5 + 4 ], %o2 40003750: d2 07 60 08 ld [ %i5 + 8 ], %o1 40003754: 90 5a 00 01 smul %o0, %g1, %o0 40003758: 40 00 47 90 call 40015598 4000375c: 90 06 80 08 add %i2, %o0, %o0 for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 40003760: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 40003764: b6 06 e0 01 inc %i3 40003768: 80 a6 c0 01 cmp %i3, %g1 4000376c: 0a bf ff f6 bcs 40003744 40003770: ba 07 60 10 add %i5, 0x10, %i5 (*req->done)(req, status); 40003774: c2 07 20 04 ld [ %i4 + 4 ], %g1 40003778: 92 10 20 00 clr %o1 4000377c: 90 10 00 1c mov %i4, %o0 40003780: 9f c0 40 00 call %g1 40003784: 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); 40003788: 81 c7 e0 08 ret 4000378c: 81 e8 00 00 restore } break; } case RTEMS_BLKIO_DELETED: if (rd->free_at_delete_request) { 40003790: c2 0c 20 0f ldub [ %l0 + 0xf ], %g1 40003794: 80 a0 60 00 cmp %g1, 0 40003798: 12 80 00 23 bne 40003824 4000379c: 01 00 00 00 nop default: return rtems_blkdev_ioctl (dd, req, argp); break; } errno = EINVAL; 400037a0: 40 00 46 5c call 40015110 <__errno> 400037a4: b0 10 3f ff mov -1, %i0 ! ffffffff 400037a8: 82 10 20 16 mov 0x16, %g1 400037ac: c2 22 00 00 st %g1, [ %o0 ] return -1; } 400037b0: 81 c7 e0 08 ret 400037b4: 81 e8 00 00 restore return rtems_blkdev_ioctl (dd, req, argp); 400037b8: 40 00 2f b7 call 4000f694 400037bc: 81 e8 00 00 restore errno = EINVAL; 400037c0: 40 00 46 54 call 40015110 <__errno> <== NOT EXECUTED 400037c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400037c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400037cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 400037d0: 81 c7 e0 08 ret <== NOT EXECUTED 400037d4: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 400037d8: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 400037dc: ba 07 20 18 add %i4, 0x18, %i5 400037e0: 80 a0 60 00 cmp %g1, 0 400037e4: 02 bf ff e4 be 40003774 <== NEVER TAKEN 400037e8: f4 04 20 08 ld [ %l0 + 8 ], %i2 memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length); 400037ec: d2 07 40 00 ld [ %i5 ], %o1 400037f0: c2 04 00 00 ld [ %l0 ], %g1 400037f4: d4 07 60 04 ld [ %i5 + 4 ], %o2 400037f8: d0 07 60 08 ld [ %i5 + 8 ], %o0 400037fc: 92 5a 40 01 smul %o1, %g1, %o1 40003800: 40 00 47 66 call 40015598 40003804: 92 06 80 09 add %i2, %o1, %o1 for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 40003808: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 4000380c: b6 06 e0 01 inc %i3 40003810: 80 a6 c0 01 cmp %i3, %g1 40003814: 0a bf ff f6 bcs 400037ec <== NEVER TAKEN 40003818: ba 07 60 10 add %i5, 0x10, %i5 4000381c: 10 bf ff d7 b 40003778 40003820: c2 07 20 04 ld [ %i4 + 4 ], %g1 ramdisk_free(rd); 40003824: 40 00 00 08 call 40003844 40003828: 90 10 00 10 mov %l0, %o0 errno = EINVAL; 4000382c: 40 00 46 39 call 40015110 <__errno> 40003830: b0 10 3f ff mov -1, %i0 40003834: 82 10 20 16 mov 0x16, %g1 40003838: c2 22 00 00 st %g1, [ %o0 ] } 4000383c: 81 c7 e0 08 ret 40003840: 81 e8 00 00 restore =============================================================================== 40002d48 : uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace, const char *disk ) { 40002d48: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; ramdisk *rd = NULL; rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace); 40002d4c: 90 10 20 00 clr %o0 40002d50: 96 10 00 1a mov %i2, %o3 40002d54: 94 10 00 19 mov %i1, %o2 40002d58: 40 00 3f 67 call 40012af4 40002d5c: 92 10 00 18 mov %i0, %o1 if (rd == NULL) { 40002d60: ba 92 20 00 orcc %o0, 0, %i5 40002d64: 02 80 00 0f be 40002da0 <== NEVER TAKEN 40002d68: 92 10 00 18 mov %i0, %o1 return RTEMS_UNSATISFIED; } sc = rtems_blkdev_create( 40002d6c: 98 10 00 1d mov %i5, %o4 40002d70: 94 10 00 19 mov %i1, %o2 40002d74: 17 10 00 4a sethi %hi(0x40012800), %o3 40002d78: 90 10 00 1b mov %i3, %o0 40002d7c: 40 00 3e c4 call 4001288c 40002d80: 96 12 e1 98 or %o3, 0x198, %o3 media_block_size, media_block_count, ramdisk_ioctl, rd ); if (sc != RTEMS_SUCCESSFUL) { 40002d84: b0 92 20 00 orcc %o0, 0, %i0 40002d88: 02 80 00 04 be 40002d98 <== ALWAYS TAKEN 40002d8c: 90 10 00 1d mov %i5, %o0 ramdisk_free(rd); 40002d90: 40 00 3f 75 call 40012b64 <== NOT EXECUTED 40002d94: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 40002d98: 81 c7 e0 08 ret 40002d9c: 81 e8 00 00 restore } return RTEMS_SUCCESSFUL; } 40002da0: 81 c7 e0 08 ret <== NOT EXECUTED 40002da4: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED =============================================================================== 4000ed94 : { 4000ed94: 9d e3 bf a0 save %sp, -96, %sp 4000ed98: 39 10 00 93 sethi %hi(0x40024c00), %i4 4000ed9c: 7f ff ea 82 call 400097a4 <_Mutex_Acquire> 4000eda0: 90 17 22 70 or %i4, 0x270, %o0 ! 40024e70 if (block < dd->block_count) 4000eda4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000eda8: 80 a6 40 01 cmp %i1, %g1 4000edac: 1a 80 00 31 bcc 4000ee70 <== NEVER TAKEN 4000edb0: ba 10 20 00 clr %i5 if (dd->block_to_media_block_shift >= 0) 4000edb4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000edb8: 80 a2 60 00 cmp %o1, 0 4000edbc: 06 80 00 16 bl 4000ee14 <== NEVER TAKEN 4000edc0: 93 2e 40 09 sll %i1, %o1, %o1 *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000edc4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000edc8: 90 10 00 18 mov %i0, %o0 4000edcc: 7f ff ff 05 call 4000e9e0 4000edd0: 92 02 40 01 add %o1, %g1, %o1 4000edd4: ba 10 00 08 mov %o0, %i5 switch (bd->state) 4000edd8: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 4000eddc: 80 a2 20 02 cmp %o0, 2 4000ede0: 02 80 00 1d be 4000ee54 4000ede4: 82 10 20 03 mov 3, %g1 4000ede8: 80 a2 20 07 cmp %o0, 7 4000edec: 12 80 00 1d bne 4000ee60 4000edf0: 80 a2 20 01 cmp %o0, 1 bd->state = state; 4000edf4: 82 10 20 04 mov 4, %g1 4000edf8: c2 27 60 20 st %g1, [ %i5 + 0x20 ] } 4000edfc: b0 10 20 00 clr %i0 _Mutex_Release( mutex ); 4000ee00: 7f ff ea 84 call 40009810 <_Mutex_Release> 4000ee04: 90 17 22 70 or %i4, 0x270, %o0 *bd_ptr = bd; 4000ee08: fa 26 80 00 st %i5, [ %i2 ] } 4000ee0c: 81 c7 e0 08 ret 4000ee10: 81 e8 00 00 restore ((((uint64_t) block) * dd->block_size) / dd->media_block_size); 4000ee14: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 <== NOT EXECUTED 4000ee18: d6 06 20 20 ld [ %i0 + 0x20 ], %o3 <== NOT EXECUTED 4000ee1c: 92 56 40 08 umul %i1, %o0, %o1 <== NOT EXECUTED 4000ee20: 91 40 00 00 rd %y, %o0 <== NOT EXECUTED 4000ee24: 40 00 17 6e call 40014bdc <__udivdi3> <== NOT EXECUTED 4000ee28: 94 10 20 00 clr %o2 <== NOT EXECUTED *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000ee2c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000ee30: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000ee34: 7f ff fe eb call 4000e9e0 <== NOT EXECUTED 4000ee38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ee3c: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED switch (bd->state) 4000ee40: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 4000ee44: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 4000ee48: 12 bf ff e9 bne 4000edec <== NOT EXECUTED 4000ee4c: 80 a2 20 07 cmp %o0, 7 <== NOT EXECUTED bd->state = state; 4000ee50: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED } 4000ee54: b0 10 20 00 clr %i0 4000ee58: 10 bf ff ea b 4000ee00 4000ee5c: c2 27 60 20 st %g1, [ %i5 + 0x20 ] switch (bd->state) 4000ee60: 02 80 00 0a be 4000ee88 <== ALWAYS TAKEN 4000ee64: 82 10 20 05 mov 5, %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2); 4000ee68: 7f ff f7 a4 call 4000ccf8 <== NOT EXECUTED 4000ee6c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4000ee70: 90 17 22 70 or %i4, 0x270, %o0 <== NOT EXECUTED 4000ee74: 7f ff ea 67 call 40009810 <_Mutex_Release> <== NOT EXECUTED 4000ee78: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *bd_ptr = bd; 4000ee7c: fa 26 80 00 st %i5, [ %i2 ] <== NOT EXECUTED } 4000ee80: 81 c7 e0 08 ret <== NOT EXECUTED 4000ee84: 81 e8 00 00 restore <== NOT EXECUTED } 4000ee88: b0 10 20 00 clr %i0 4000ee8c: 10 bf ff dd b 4000ee00 4000ee90: c2 27 60 20 st %g1, [ %i5 + 0x20 ] =============================================================================== 4000ee94 : { 4000ee94: 9d e3 bf a0 save %sp, -96, %sp _Mutex_Acquire( mutex ); 4000ee98: 37 10 00 93 sethi %hi(0x40024c00), %i3 4000ee9c: 7f ff ea 42 call 400097a4 <_Mutex_Acquire> 4000eea0: 90 16 e2 70 or %i3, 0x270, %o0 ! 40024e70 if (block < dd->block_count) 4000eea4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000eea8: 80 a6 40 01 cmp %i1, %g1 4000eeac: 1a 80 00 41 bcc 4000efb0 <== NEVER TAKEN 4000eeb0: ba 10 00 18 mov %i0, %i5 if (dd->block_to_media_block_shift >= 0) 4000eeb4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000eeb8: 80 a2 60 00 cmp %o1, 0 4000eebc: 06 80 00 23 bl 4000ef48 <== NEVER TAKEN 4000eec0: 93 2e 40 09 sll %i1, %o1, %o1 *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000eec4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000eec8: 90 10 00 1d mov %i5, %o0 4000eecc: 7f ff fe c5 call 4000e9e0 4000eed0: 92 02 40 01 add %o1, %g1, %o1 4000eed4: b8 10 00 08 mov %o0, %i4 switch (bd->state) 4000eed8: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 4000eedc: 80 a2 20 02 cmp %o0, 2 4000eee0: 22 80 00 2a be,a 4000ef88 4000eee4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 4000eee8: 80 a2 20 07 cmp %o0, 7 4000eeec: 12 80 00 2d bne 4000efa0 4000eef0: 80 a2 20 01 cmp %o0, 1 ++dd->stats.read_hits; 4000eef4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 4000eef8: 82 00 60 01 inc %g1 4000eefc: c2 27 60 44 st %g1, [ %i5 + 0x44 ] bd->state = state; 4000ef00: 82 10 20 04 mov 4, %g1 4000ef04: c2 27 20 20 st %g1, [ %i4 + 0x20 ] } 4000ef08: b0 10 20 00 clr %i0 if (bdbuf_cache.read_ahead_task != 0 4000ef0c: 21 10 00 93 sethi %hi(0x40024c00), %l0 4000ef10: a0 14 22 48 or %l0, 0x248, %l0 ! 40024e48 4000ef14: d0 04 20 dc ld [ %l0 + 0xdc ], %o0 4000ef18: 80 a2 20 00 cmp %o0, 0 4000ef1c: 02 80 00 06 be 4000ef34 4000ef20: 01 00 00 00 nop && dd->read_ahead.trigger == block 4000ef24: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 4000ef28: 80 a6 40 01 cmp %i1, %g1 4000ef2c: 22 80 00 4c be,a 4000f05c 4000ef30: c2 07 60 64 ld [ %i5 + 0x64 ], %g1 _Mutex_Release( mutex ); 4000ef34: 7f ff ea 37 call 40009810 <_Mutex_Release> 4000ef38: 90 16 e2 70 or %i3, 0x270, %o0 *bd_ptr = bd; 4000ef3c: f8 26 80 00 st %i4, [ %i2 ] } 4000ef40: 81 c7 e0 08 ret 4000ef44: 81 e8 00 00 restore ((((uint64_t) block) * dd->block_size) / dd->media_block_size); 4000ef48: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 <== NOT EXECUTED 4000ef4c: d6 06 20 20 ld [ %i0 + 0x20 ], %o3 <== NOT EXECUTED 4000ef50: 92 56 40 08 umul %i1, %o0, %o1 <== NOT EXECUTED 4000ef54: 91 40 00 00 rd %y, %o0 <== NOT EXECUTED 4000ef58: 40 00 17 21 call 40014bdc <__udivdi3> <== NOT EXECUTED 4000ef5c: 94 10 20 00 clr %o2 <== NOT EXECUTED *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000ef60: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000ef64: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000ef68: 7f ff fe 9e call 4000e9e0 <== NOT EXECUTED 4000ef6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000ef70: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED switch (bd->state) 4000ef74: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 4000ef78: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 4000ef7c: 12 bf ff dc bne 4000eeec <== NOT EXECUTED 4000ef80: 80 a2 20 07 cmp %o0, 7 <== NOT EXECUTED ++dd->stats.read_hits; 4000ef84: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 <== NOT EXECUTED 4000ef88: 82 00 60 01 inc %g1 4000ef8c: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } 4000ef90: b0 10 20 00 clr %i0 bd->state = state; 4000ef94: 82 10 20 03 mov 3, %g1 } 4000ef98: 10 bf ff dd b 4000ef0c 4000ef9c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] switch (bd->state) 4000efa0: 22 80 00 0b be,a 4000efcc <== ALWAYS TAKEN 4000efa4: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4); 4000efa8: 7f ff f7 54 call 4000ccf8 <== NOT EXECUTED 4000efac: 92 10 20 0b mov 0xb, %o1 <== NOT EXECUTED rtems_bdbuf_buffer *bd = NULL; 4000efb0: b8 10 20 00 clr %i4 <== NOT EXECUTED 4000efb4: 90 16 e2 70 or %i3, 0x270, %o0 <== NOT EXECUTED 4000efb8: 7f ff ea 16 call 40009810 <_Mutex_Release> <== NOT EXECUTED 4000efbc: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *bd_ptr = bd; 4000efc0: f8 26 80 00 st %i4, [ %i2 ] <== NOT EXECUTED } 4000efc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000efc8: 81 e8 00 00 restore <== NOT EXECUTED ++dd->stats.read_misses; 4000efcc: 82 00 60 01 inc %g1 4000efd0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] if (dd->read_ahead.trigger != block) 4000efd4: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 4000efd8: 80 a6 40 01 cmp %i1, %g1 4000efdc: 02 80 00 0f be 4000f018 4000efe0: 94 10 20 01 mov 1, %o2 return node->next == NULL; 4000efe4: c2 07 60 64 ld [ %i5 + 0x64 ], %g1 if (rtems_bdbuf_is_read_ahead_active (dd)) 4000efe8: 80 a0 60 00 cmp %g1, 0 4000efec: 02 80 00 07 be 4000f008 <== ALWAYS TAKEN 4000eff0: 84 06 60 01 add %i1, 1, %g2 previous = the_node->previous; 4000eff4: c4 07 60 68 ld [ %i5 + 0x68 ], %g2 <== NOT EXECUTED next->previous = previous; 4000eff8: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED previous->next = next; 4000effc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED node->next = NULL; 4000f000: c0 27 60 64 clr [ %i5 + 0x64 ] <== NOT EXECUTED dd->read_ahead.trigger = block + 1; 4000f004: 84 06 60 01 add %i1, 1, %g2 <== NOT EXECUTED dd->read_ahead.next = block + 2; 4000f008: 82 06 60 02 add %i1, 2, %g1 dd->read_ahead.trigger = block + 1; 4000f00c: c4 27 60 6c st %g2, [ %i5 + 0x6c ] dd->read_ahead.next = block + 2; 4000f010: c2 27 60 70 st %g1, [ %i5 + 0x70 ] sc = rtems_bdbuf_execute_read_request (dd, bd, 1); 4000f014: 94 10 20 01 mov 1, %o2 4000f018: 92 10 00 1c mov %i4, %o1 4000f01c: 7f ff fc 29 call 4000e0c0 4000f020: 90 10 00 1d mov %i5, %o0 if (sc == RTEMS_SUCCESSFUL) 4000f024: b0 92 20 00 orcc %o0, 0, %i0 4000f028: 32 bf ff b9 bne,a 4000ef0c 4000f02c: b8 10 20 00 clr %i4 next = the_node->next; 4000f030: c8 07 00 00 ld [ %i4 ], %g4 previous = the_node->previous; 4000f034: c6 07 20 04 ld [ %i4 + 4 ], %g3 bd->state = state; 4000f038: 82 10 20 03 mov 3, %g1 4000f03c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] ++bd->group->users; 4000f040: c4 07 20 28 ld [ %i4 + 0x28 ], %g2 next->previous = previous; 4000f044: c6 21 20 04 st %g3, [ %g4 + 4 ] 4000f048: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 previous->next = next; 4000f04c: c8 20 c0 00 st %g4, [ %g3 ] 4000f050: 82 00 60 01 inc %g1 } 4000f054: 10 bf ff ae b 4000ef0c 4000f058: c2 20 a0 0c st %g1, [ %g2 + 0xc ] && !rtems_bdbuf_is_read_ahead_active (dd)) 4000f05c: 80 a0 60 00 cmp %g1, 0 4000f060: 12 bf ff b5 bne 4000ef34 <== NEVER TAKEN 4000f064: b2 04 20 e4 add %l0, 0xe4, %i1 if (rtems_chain_is_empty (chain)) 4000f068: c2 04 20 e0 ld [ %l0 + 0xe0 ], %g1 4000f06c: 80 a0 40 19 cmp %g1, %i1 4000f070: 02 80 00 09 be 4000f094 <== ALWAYS TAKEN 4000f074: 01 00 00 00 nop old_last = tail->previous; 4000f078: c2 04 20 e8 ld [ %l0 + 0xe8 ], %g1 <== NOT EXECUTED the_node->next = tail; 4000f07c: f2 27 60 64 st %i1, [ %i5 + 0x64 ] rtems_chain_append_unprotected (chain, &dd->read_ahead.node); 4000f080: 84 07 60 64 add %i5, 0x64, %g2 tail->previous = the_node; 4000f084: c4 24 20 e8 st %g2, [ %l0 + 0xe8 ] old_last->next = the_node; 4000f088: c4 20 40 00 st %g2, [ %g1 ] 4000f08c: 10 bf ff aa b 4000ef34 4000f090: c2 27 60 68 st %g1, [ %i5 + 0x68 ] sc = rtems_event_send (bdbuf_cache.read_ahead_task, 4000f094: 40 00 05 1f call 40010510 4000f098: 92 10 20 02 mov 2, %o1 if (sc != RTEMS_SUCCESSFUL) 4000f09c: 80 a2 20 00 cmp %o0, 0 4000f0a0: 22 bf ff f7 be,a 4000f07c <== ALWAYS TAKEN 4000f0a4: c2 04 20 e8 ld [ %l0 + 0xe8 ], %g1 rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP); 4000f0a8: 7f ff f7 0f call 4000cce4 <== NOT EXECUTED 4000f0ac: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 4000f0b0: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f0b4 : { 4000f0b4: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 4000f0b8: 80 a6 20 00 cmp %i0, 0 4000f0bc: 02 80 00 40 be 4000f1bc <== NEVER TAKEN 4000f0c0: 01 00 00 00 nop _Mutex_Acquire( mutex ); 4000f0c4: 3b 10 00 93 sethi %hi(0x40024c00), %i5 4000f0c8: 7f ff e9 b7 call 400097a4 <_Mutex_Acquire> 4000f0cc: 90 17 62 70 or %i5, 0x270, %o0 ! 40024e70 switch (bd->state) 4000f0d0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f0d4: 80 a2 20 04 cmp %o0, 4 4000f0d8: 02 80 00 2b be 4000f184 4000f0dc: 01 00 00 00 nop 4000f0e0: 08 80 00 0d bleu 4000f114 4000f0e4: 80 a2 20 03 cmp %o0, 3 4000f0e8: 82 02 3f fb add %o0, -5, %g1 4000f0ec: 80 a0 60 01 cmp %g1, 1 4000f0f0: 18 80 00 35 bgu 4000f1c4 <== NEVER TAKEN 4000f0f4: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 4000f0f8: 7f ff f8 0f call 4000d134 4000f0fc: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 4000f100: 90 17 62 70 or %i5, 0x270, %o0 4000f104: 7f ff e9 c3 call 40009810 <_Mutex_Release> 4000f108: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f10c: 81 c7 e0 08 ret 4000f110: 81 e8 00 00 restore switch (bd->state) 4000f114: 12 80 00 2c bne 4000f1c4 <== NEVER TAKEN 4000f118: 01 00 00 00 nop --bd->group->users; 4000f11c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 4000f120: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000f124: 82 00 7f ff add %g1, -1, %g1 4000f128: c2 20 a0 0c st %g1, [ %g2 + 0xc ] bd->state = state; 4000f12c: 82 10 20 02 mov 2, %g1 old_last = tail->previous; 4000f130: 11 10 00 93 sethi %hi(0x40024c00), %o0 4000f134: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 4000f138: 90 12 22 48 or %o0, 0x248, %o0 4000f13c: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 the_node->next = tail; 4000f140: 84 02 20 64 add %o0, 0x64, %g2 4000f144: c4 26 00 00 st %g2, [ %i0 ] tail->previous = the_node; 4000f148: f0 22 20 68 st %i0, [ %o0 + 0x68 ] old_last->next = the_node; 4000f14c: f0 20 40 00 st %i0, [ %g1 ] the_node->previous = old_last; 4000f150: c2 26 20 04 st %g1, [ %i0 + 4 ] if (bd->waiters) 4000f154: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f158: 80 a0 60 00 cmp %g1, 0 4000f15c: 22 80 00 11 be,a 4000f1a0 4000f160: c2 02 20 b4 ld [ %o0 + 0xb4 ], %g1 if (waiters->count > 0) 4000f164: c2 02 20 84 ld [ %o0 + 0x84 ], %g1 4000f168: 80 a0 60 00 cmp %g1, 0 4000f16c: 22 bf ff e6 be,a 4000f104 4000f170: 90 17 62 70 or %i5, 0x270, %o0 _Condition_Broadcast( condition_variable ); 4000f174: 40 00 05 e6 call 4001090c <_Condition_Broadcast> 4000f178: 90 02 20 88 add %o0, 0x88, %o0 } 4000f17c: 10 bf ff e2 b 4000f104 4000f180: 90 17 62 70 or %i5, 0x270, %o0 rtems_bdbuf_add_to_modified_list_after_access (bd); 4000f184: 7f ff fe be call 4000ec7c 4000f188: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 4000f18c: 90 17 62 70 or %i5, 0x270, %o0 4000f190: 7f ff e9 a0 call 40009810 <_Mutex_Release> 4000f194: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f198: 81 c7 e0 08 ret 4000f19c: 81 e8 00 00 restore if (waiters->count > 0) 4000f1a0: 80 a0 60 00 cmp %g1, 0 4000f1a4: 22 bf ff d8 be,a 4000f104 4000f1a8: 90 17 62 70 or %i5, 0x270, %o0 _Condition_Broadcast( condition_variable ); 4000f1ac: 40 00 05 d8 call 4001090c <_Condition_Broadcast> 4000f1b0: 90 02 20 b8 add %o0, 0xb8, %o0 } 4000f1b4: 10 bf ff d4 b 4000f104 4000f1b8: 90 17 62 70 or %i5, 0x270, %o0 } 4000f1bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000f1c0: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0); 4000f1c4: 7f ff f6 cd call 4000ccf8 <== NOT EXECUTED 4000f1c8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 4000f1cc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f1d0 : { 4000f1d0: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 4000f1d4: 80 a6 20 00 cmp %i0, 0 4000f1d8: 02 80 00 1e be 4000f250 <== NEVER TAKEN 4000f1dc: 01 00 00 00 nop _Mutex_Acquire( mutex ); 4000f1e0: 3b 10 00 93 sethi %hi(0x40024c00), %i5 4000f1e4: 7f ff e9 70 call 400097a4 <_Mutex_Acquire> 4000f1e8: 90 17 62 70 or %i5, 0x270, %o0 ! 40024e70 switch (bd->state) 4000f1ec: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f1f0: 80 a2 20 05 cmp %o0, 5 4000f1f4: 08 80 00 0c bleu 4000f224 4000f1f8: 80 a2 20 02 cmp %o0, 2 4000f1fc: 80 a2 20 06 cmp %o0, 6 4000f200: 12 80 00 0b bne 4000f22c <== NEVER TAKEN 4000f204: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 4000f208: 7f ff f7 cb call 4000d134 4000f20c: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 4000f210: 90 17 62 70 or %i5, 0x270, %o0 4000f214: 7f ff e9 7f call 40009810 <_Mutex_Release> 4000f218: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f21c: 81 c7 e0 08 ret 4000f220: 81 e8 00 00 restore switch (bd->state) 4000f224: 18 80 00 04 bgu 4000f234 <== ALWAYS TAKEN 4000f228: 01 00 00 00 nop rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6); 4000f22c: 7f ff f6 b3 call 4000ccf8 4000f230: 92 10 20 0d mov 0xd, %o1 ! d <_TLS_Alignment+0xc> rtems_bdbuf_add_to_modified_list_after_access (bd); 4000f234: 7f ff fe 92 call 4000ec7c 4000f238: 90 10 00 18 mov %i0, %o0 4000f23c: 90 17 62 70 or %i5, 0x270, %o0 4000f240: 7f ff e9 74 call 40009810 <_Mutex_Release> 4000f244: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f248: 81 c7 e0 08 ret 4000f24c: 81 e8 00 00 restore } 4000f250: 81 c7 e0 08 ret <== NOT EXECUTED 4000f254: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED =============================================================================== 4000f4c8 : { 4000f4c8: 9d e3 bf a0 save %sp, -96, %sp if (sync) 4000f4cc: 80 a6 a0 00 cmp %i2, 0 4000f4d0: 12 80 00 4d bne 4000f604 4000f4d4: ba 10 00 18 mov %i0, %i5 _Mutex_Acquire( mutex ); 4000f4d8: 39 10 00 93 sethi %hi(0x40024c00), %i4 4000f4dc: 7f ff e8 b2 call 400097a4 <_Mutex_Acquire> 4000f4e0: 90 17 22 70 or %i4, 0x270, %o0 ! 40024e70 if (block_size > 0) 4000f4e4: 80 a6 60 00 cmp %i1, 0 4000f4e8: 12 80 00 06 bne 4000f500 4000f4ec: b0 10 20 0a mov 0xa, %i0 _Mutex_Release( mutex ); 4000f4f0: 7f ff e8 c8 call 40009810 <_Mutex_Release> 4000f4f4: 90 17 22 70 or %i4, 0x270, %o0 } 4000f4f8: 81 c7 e0 08 ret 4000f4fc: 81 e8 00 00 restore if (size > bdbuf_config.buffer_max) 4000f500: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000f504: 82 10 63 dc or %g1, 0x3dc, %g1 ! 4001f3dc 4000f508: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 4000f50c: 80 a6 40 02 cmp %i1, %g2 4000f510: 18 bf ff f8 bgu 4000f4f0 4000f514: 84 06 7f ff add %i1, -1, %g2 bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1; 4000f518: 81 80 20 00 wr %g0, %y 4000f51c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 4000f520: 01 00 00 00 nop 4000f524: 01 00 00 00 nop 4000f528: 86 70 80 03 udiv %g2, %g3, %g3 for (bds_per_size = 1; 4000f52c: 82 10 20 01 mov 1, %g1 4000f530: 80 a0 e0 00 cmp %g3, 0 4000f534: 02 80 00 06 be 4000f54c 4000f538: 84 00 e0 01 add %g3, 1, %g2 bds_per_size <<= 1) 4000f53c: 83 28 60 01 sll %g1, 1, %g1 for (bds_per_size = 1; 4000f540: 80 a0 80 01 cmp %g2, %g1 4000f544: 38 bf ff ff bgu,a 4000f540 4000f548: 83 28 60 01 sll %g1, 1, %g1 return bdbuf_cache.max_bds_per_group / bds_per_size; 4000f54c: 05 10 00 93 sethi %hi(0x40024c00), %g2 4000f550: c4 00 a2 68 ld [ %g2 + 0x268 ], %g2 ! 40024e68 4000f554: 81 80 20 00 wr %g0, %y 4000f558: 01 00 00 00 nop 4000f55c: 01 00 00 00 nop 4000f560: 01 00 00 00 nop 4000f564: b4 70 80 01 udiv %g2, %g1, %i2 if (bds_per_group != 0) 4000f568: 80 a0 80 01 cmp %g2, %g1 4000f56c: 2a bf ff e1 bcs,a 4000f4f0 <== NEVER TAKEN 4000f570: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED uint32_t media_blocks_per_block = block_size / dd->media_block_size; 4000f574: f6 07 60 20 ld [ %i5 + 0x20 ], %i3 4000f578: 81 80 20 00 wr %g0, %y 4000f57c: 01 00 00 00 nop 4000f580: 01 00 00 00 nop 4000f584: 01 00 00 00 nop 4000f588: 86 76 40 1b udiv %i1, %i3, %g3 while ((one << block_to_media_block_shift) < media_blocks_per_block) 4000f58c: 80 a0 e0 01 cmp %g3, 1 4000f590: 08 80 00 09 bleu 4000f5b4 4000f594: 82 10 20 00 clr %g1 4000f598: 88 10 20 01 mov 1, %g4 ++block_to_media_block_shift; 4000f59c: 82 00 60 01 inc %g1 while ((one << block_to_media_block_shift) < media_blocks_per_block) 4000f5a0: 85 29 00 01 sll %g4, %g1, %g2 4000f5a4: 80 a0 80 03 cmp %g2, %g3 4000f5a8: 2a bf ff fe bcs,a 4000f5a0 4000f5ac: 82 00 60 01 inc %g1 if ((dd->media_block_size << block_to_media_block_shift) != block_size) 4000f5b0: b7 2e c0 01 sll %i3, %g1, %i3 4000f5b4: 80 a6 40 1b cmp %i1, %i3 4000f5b8: 32 80 00 02 bne,a 4000f5c0 <== NEVER TAKEN 4000f5bc: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED dd->block_count = dd->size / media_blocks_per_block; 4000f5c0: 81 80 20 00 wr %g0, %y 4000f5c4: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 4000f5c8: 01 00 00 00 nop 4000f5cc: 01 00 00 00 nop 4000f5d0: 84 70 80 03 udiv %g2, %g3, %g2 dd->block_size = block_size; 4000f5d4: f2 27 60 24 st %i1, [ %i5 + 0x24 ] rtems_bdbuf_do_purge_dev (dd); 4000f5d8: 90 10 00 1d mov %i5, %o0 dd->block_count = dd->size / media_blocks_per_block; 4000f5dc: c4 27 60 28 st %g2, [ %i5 + 0x28 ] rtems_status_code sc = RTEMS_SUCCESSFUL; 4000f5e0: b0 10 20 00 clr %i0 dd->media_blocks_per_block = media_blocks_per_block; 4000f5e4: c6 27 60 2c st %g3, [ %i5 + 0x2c ] dd->block_to_media_block_shift = block_to_media_block_shift; 4000f5e8: c2 27 60 30 st %g1, [ %i5 + 0x30 ] rtems_bdbuf_do_purge_dev (dd); 4000f5ec: 7f ff f7 0c call 4000d21c 4000f5f0: f4 27 60 34 st %i2, [ %i5 + 0x34 ] 4000f5f4: 7f ff e8 87 call 40009810 <_Mutex_Release> 4000f5f8: 90 17 22 70 or %i4, 0x270, %o0 } 4000f5fc: 81 c7 e0 08 ret 4000f600: 81 e8 00 00 restore rtems_bdbuf_syncdev (dd); 4000f604: 7f ff ff 7f call 4000f400 4000f608: 90 10 00 18 mov %i0, %o0 _Mutex_Acquire( mutex ); 4000f60c: 10 bf ff b4 b 4000f4dc 4000f610: 39 10 00 93 sethi %hi(0x40024c00), %i4 =============================================================================== 4000f258 : { 4000f258: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 4000f25c: 80 a6 20 00 cmp %i0, 0 4000f260: 02 80 00 54 be 4000f3b0 <== NEVER TAKEN 4000f264: 01 00 00 00 nop _Mutex_Acquire( mutex ); 4000f268: 3b 10 00 93 sethi %hi(0x40024c00), %i5 4000f26c: 7f ff e9 4e call 400097a4 <_Mutex_Acquire> 4000f270: 90 17 62 70 or %i5, 0x270, %o0 ! 40024e70 switch (bd->state) 4000f274: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f278: 80 a2 20 05 cmp %o0, 5 4000f27c: 08 80 00 0c bleu 4000f2ac 4000f280: 80 a2 20 02 cmp %o0, 2 4000f284: 80 a2 20 06 cmp %o0, 6 4000f288: 12 80 00 0b bne 4000f2b4 <== NEVER TAKEN 4000f28c: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 4000f290: 7f ff f7 a9 call 4000d134 4000f294: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 4000f298: 90 17 62 70 or %i5, 0x270, %o0 4000f29c: 7f ff e9 5d call 40009810 <_Mutex_Release> 4000f2a0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f2a4: 81 c7 e0 08 ret 4000f2a8: 81 e8 00 00 restore switch (bd->state) 4000f2ac: 18 80 00 04 bgu 4000f2bc <== ALWAYS TAKEN 4000f2b0: 82 10 20 08 mov 8, %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5); 4000f2b4: 7f ff f6 91 call 4000ccf8 <== NOT EXECUTED 4000f2b8: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED old_last = tail->previous; 4000f2bc: 37 10 00 93 sethi %hi(0x40024c00), %i3 bd->state = state; 4000f2c0: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 4000f2c4: b8 16 e2 48 or %i3, 0x248, %i4 4000f2c8: c2 07 20 80 ld [ %i4 + 0x80 ], %g1 the_node->next = tail; 4000f2cc: 84 07 20 7c add %i4, 0x7c, %g2 4000f2d0: c4 26 00 00 st %g2, [ %i0 ] tail->previous = the_node; 4000f2d4: f0 27 20 80 st %i0, [ %i4 + 0x80 ] old_last->next = the_node; 4000f2d8: f0 20 40 00 st %i0, [ %g1 ] the_node->previous = old_last; 4000f2dc: c2 26 20 04 st %g1, [ %i0 + 4 ] if (bd->waiters) 4000f2e0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f2e4: 80 a0 60 00 cmp %g1, 0 4000f2e8: 02 80 00 06 be 4000f300 4000f2ec: d0 06 e2 48 ld [ %i3 + 0x248 ], %o0 if (waiters->count > 0) 4000f2f0: c2 07 20 84 ld [ %i4 + 0x84 ], %g1 4000f2f4: 80 a0 60 00 cmp %g1, 0 4000f2f8: 12 80 00 2a bne 4000f3a0 4000f2fc: 01 00 00 00 nop rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout, 4000f300: 92 10 20 04 mov 4, %o1 ! 4 <_TLS_Alignment+0x3> 4000f304: 40 00 04 83 call 40010510 4000f308: 37 10 00 93 sethi %hi(0x40024c00), %i3 if (sc != RTEMS_SUCCESSFUL) 4000f30c: 80 a2 20 00 cmp %o0, 0 4000f310: 12 80 00 37 bne 4000f3ec <== NEVER TAKEN 4000f314: b6 16 e2 e4 or %i3, 0x2e4, %i3 switch (bd->state) 4000f318: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f31c: 80 a2 20 07 cmp %o0, 7 4000f320: 18 80 00 07 bgu 4000f33c 4000f324: 82 02 3f f8 add %o0, -8, %g1 4000f328: 80 a2 20 00 cmp %o0, 0 4000f32c: 32 80 00 0b bne,a 4000f358 <== ALWAYS TAKEN 4000f330: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9); 4000f334: 7f ff f6 71 call 4000ccf8 <== NOT EXECUTED 4000f338: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED switch (bd->state) 4000f33c: 80 a0 60 02 cmp %g1, 2 4000f340: 18 bf ff fd bgu 4000f334 <== NEVER TAKEN 4000f344: 92 10 00 1b mov %i3, %o1 rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters); 4000f348: 7f ff f7 60 call 4000d0c8 4000f34c: 90 10 00 18 mov %i0, %o0 break; 4000f350: 10 bf ff f3 b 4000f31c 4000f354: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if (bd->waiters == 0 4000f358: 80 a0 60 00 cmp %g1, 0 4000f35c: 32 bf ff d0 bne,a 4000f29c 4000f360: 90 17 62 70 or %i5, 0x270, %o0 || bd->state == RTEMS_BDBUF_STATE_EMPTY)) 4000f364: 82 02 3f ff add %o0, -1, %g1 && (bd->state == RTEMS_BDBUF_STATE_CACHED 4000f368: 80 a0 60 01 cmp %g1, 1 4000f36c: 38 bf ff cc bgu,a 4000f29c <== NEVER TAKEN 4000f370: 90 17 62 70 or %i5, 0x270, %o0 <== NOT EXECUTED if (bd->state == RTEMS_BDBUF_STATE_EMPTY) 4000f374: 80 a2 20 01 cmp %o0, 1 4000f378: 22 80 00 10 be,a 4000f3b8 4000f37c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if (waiters->count > 0) 4000f380: c2 07 20 b4 ld [ %i4 + 0xb4 ], %g1 4000f384: 80 a0 60 00 cmp %g1, 0 4000f388: 22 bf ff c5 be,a 4000f29c 4000f38c: 90 17 62 70 or %i5, 0x270, %o0 _Condition_Broadcast( condition_variable ); 4000f390: 40 00 05 5f call 4001090c <_Condition_Broadcast> 4000f394: 90 07 20 b8 add %i4, 0xb8, %o0 } 4000f398: 10 bf ff c1 b 4000f29c 4000f39c: 90 17 62 70 or %i5, 0x270, %o0 _Condition_Broadcast( condition_variable ); 4000f3a0: 40 00 05 5b call 4001090c <_Condition_Broadcast> 4000f3a4: 90 07 20 88 add %i4, 0x88, %o0 } 4000f3a8: 10 bf ff d6 b 4000f300 4000f3ac: d0 06 e2 48 ld [ %i3 + 0x248 ], %o0 } 4000f3b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000f3b4: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0) 4000f3b8: 7f ff f6 5b call 4000cd24 4000f3bc: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 4000f3c0: 80 a2 20 00 cmp %o0, 0 4000f3c4: 12 80 00 0c bne 4000f3f4 <== NEVER TAKEN 4000f3c8: 03 10 00 93 sethi %hi(0x40024c00), %g1 bd->state = state; 4000f3cc: c0 26 20 20 clr [ %i0 + 0x20 ] the_node->previous = after_node; 4000f3d0: 82 10 62 a8 or %g1, 0x2a8, %g1 4000f3d4: c2 26 20 04 st %g1, [ %i0 + 4 ] before_node = after_node->next; 4000f3d8: c2 07 20 60 ld [ %i4 + 0x60 ], %g1 after_node->next = the_node; 4000f3dc: f0 27 20 60 st %i0, [ %i4 + 0x60 ] the_node->next = before_node; 4000f3e0: c2 26 00 00 st %g1, [ %i0 ] } 4000f3e4: 10 bf ff e7 b 4000f380 4000f3e8: f0 20 60 04 st %i0, [ %g1 + 4 ] rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1); 4000f3ec: 7f ff f6 3e call 4000cce4 <== NOT EXECUTED 4000f3f0: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 4000f3f4: 7f ff f7 30 call 4000d0b4 <== NOT EXECUTED 4000f3f8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED 4000f3fc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f400 : { 4000f400: 9d e3 bf 98 save %sp, -104, %sp _Mutex_Acquire( mutex ); 4000f404: 37 10 00 93 sethi %hi(0x40024c00), %i3 4000f408: 7f ff e8 e7 call 400097a4 <_Mutex_Acquire> 4000f40c: 90 16 e2 84 or %i3, 0x284, %o0 ! 40024e84 4000f410: 35 10 00 93 sethi %hi(0x40024c00), %i2 4000f414: 7f ff e8 e4 call 400097a4 <_Mutex_Acquire> 4000f418: 90 16 a2 70 or %i2, 0x270, %o0 ! 40024e70 bdbuf_cache.sync_active = true; 4000f41c: 82 10 20 01 mov 1, %g1 4000f420: 39 10 00 93 sethi %hi(0x40024c00), %i4 4000f424: ba 17 22 48 or %i4, 0x248, %i5 ! 40024e48 bdbuf_cache.sync_requester = rtems_task_self (); 4000f428: 40 00 04 f9 call 4001080c 4000f42c: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] 4000f430: 82 10 00 08 mov %o0, %g1 rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout, 4000f434: d0 07 22 48 ld [ %i4 + 0x248 ], %o0 bdbuf_cache.sync_requester = rtems_task_self (); 4000f438: c2 27 60 54 st %g1, [ %i5 + 0x54 ] rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout, 4000f43c: 92 10 20 04 mov 4, %o1 4000f440: 40 00 04 34 call 40010510 4000f444: f0 27 60 58 st %i0, [ %i5 + 0x58 ] if (sc != RTEMS_SUCCESSFUL) 4000f448: 80 a2 20 00 cmp %o0, 0 4000f44c: 12 80 00 10 bne 4000f48c <== NEVER TAKEN 4000f450: 01 00 00 00 nop _Mutex_Release( mutex ); 4000f454: 7f ff e8 ef call 40009810 <_Mutex_Release> 4000f458: 90 16 a2 70 or %i2, 0x270, %o0 return rtems_event_system_receive( 4000f45c: 96 07 bf fc add %fp, -4, %o3 4000f460: 94 10 20 00 clr %o2 4000f464: 92 10 20 00 clr %o1 4000f468: 40 00 04 73 call 40010634 4000f46c: 11 20 00 00 sethi %hi(0x80000000), %o0 if (sc != RTEMS_SUCCESSFUL) 4000f470: 80 a2 20 00 cmp %o0, 0 4000f474: 12 80 00 08 bne 4000f494 <== NEVER TAKEN 4000f478: b0 10 20 00 clr %i0 4000f47c: 7f ff e8 e5 call 40009810 <_Mutex_Release> 4000f480: 90 16 e2 84 or %i3, 0x284, %o0 } 4000f484: 81 c7 e0 08 ret 4000f488: 81 e8 00 00 restore rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1); 4000f48c: 7f ff f6 16 call 4000cce4 <== NOT EXECUTED 4000f490: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT); 4000f494: 7f ff f6 14 call 4000cce4 <== NOT EXECUTED 4000f498: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 4000f49c: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40001768 : const rtems_bdpart_format *format, rtems_bdpart_partition *pt, const unsigned *dist, size_t count ) { 40001768: 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; 4000176c: 80 a6 60 00 cmp %i1, 0 40001770: 02 80 00 07 be 4000178c <== NEVER TAKEN 40001774: a2 10 20 00 clr %l1 && format->type == RTEMS_BDPART_FORMAT_MBR 40001778: c2 06 40 00 ld [ %i1 ], %g1 4000177c: 80 a0 60 00 cmp %g1, 0 40001780: 22 80 00 6d be,a 40001934 <== ALWAYS TAKEN 40001784: c2 0e 60 08 ldub [ %i1 + 8 ], %g1 && format->mbr.dos_compatibility; 40001788: a2 10 20 00 clr %l1 <== NOT EXECUTED rtems_blkdev_bnum disk_end = 0; rtems_blkdev_bnum pos = 0; rtems_blkdev_bnum dist_sum = 0; rtems_blkdev_bnum record_space = dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1; 4000178c: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED 40001790: c0 27 bf fc clr [ %fp + -4 ] 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) { 40001794: 80 a7 20 00 cmp %i4, 0 40001798: 02 80 00 65 be 4000192c <== NEVER TAKEN 4000179c: 90 10 20 00 clr %o0 /* Nothing to do */ return RTEMS_SUCCESSFUL; } /* Check parameter */ if (format == NULL || pt == NULL || dist == NULL) { 400017a0: 80 a0 00 1a cmp %g0, %i2 400017a4: 84 60 3f ff subx %g0, -1, %g2 400017a8: 80 a0 00 1b cmp %g0, %i3 400017ac: 82 60 3f ff subx %g0, -1, %g1 400017b0: 80 90 80 01 orcc %g2, %g1, %g0 400017b4: 12 80 00 66 bne 4000194c <== NEVER TAKEN 400017b8: 80 a6 60 00 cmp %i1, 0 400017bc: 02 80 00 64 be 4000194c <== NEVER TAKEN 400017c0: 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); 400017c4: 94 10 20 00 clr %o2 400017c8: 92 10 20 00 clr %o1 400017cc: 40 00 01 48 call 40001cec 400017d0: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 400017d4: 80 a2 20 00 cmp %o0, 0 400017d8: 02 80 00 04 be 400017e8 <== ALWAYS TAKEN 400017dc: 86 10 20 00 clr %g3 /* Expand the last partition to the disk end */ pt [count - 1].end = disk_end; return RTEMS_SUCCESSFUL; } 400017e0: 81 c7 e0 08 ret <== NOT EXECUTED 400017e4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED dist_sum += dist [i]; 400017e8: 83 28 e0 02 sll %g3, 2, %g1 400017ec: c2 06 c0 01 ld [ %i3 + %g1 ], %g1 400017f0: 88 80 40 08 addcc %g1, %o0, %g4 400017f4: ba 40 20 00 addx %g0, 0, %i5 if (dist [i] == 0) { 400017f8: 80 a0 60 00 cmp %g1, 0 400017fc: 02 80 00 4b be 40001928 <== NEVER TAKEN 40001800: 90 10 00 04 mov %g4, %o0 40001804: 80 a7 60 00 cmp %i5, 0 40001808: 32 80 00 49 bne,a 4000192c <== NEVER TAKEN 4000180c: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED for (i = 0; i < count; ++i) { 40001810: 82 00 e0 01 add %g3, 1, %g1 40001814: 80 a7 00 01 cmp %i4, %g1 40001818: 32 bf ff f4 bne,a 400017e8 4000181c: 86 10 00 01 mov %g1, %g3 if (format->type != RTEMS_BDPART_FORMAT_MBR) { 40001820: fa 06 40 00 ld [ %i1 ], %i5 40001824: 80 a7 60 00 cmp %i5, 0 40001828: 12 80 00 41 bne 4000192c <== NEVER TAKEN 4000182c: 90 10 20 18 mov 0x18, %o0 if (dos_compatibility) { 40001830: 80 a4 60 00 cmp %l1, 0 40001834: 12 80 00 4a bne 4000195c <== ALWAYS TAKEN 40001838: da 07 bf fc ld [ %fp + -4 ], %o5 if (count > 4) { 4000183c: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 40001840: 08 80 00 04 bleu 40001850 <== NOT EXECUTED 40001844: 9e 10 00 10 mov %l0, %o7 <== NOT EXECUTED overhead += (count - 3) * record_space; 40001848: 9e 00 ff ff add %g3, -1, %o7 <== NOT EXECUTED 4000184c: 9e 5b c0 10 smul %o7, %l0, %o7 <== NOT EXECUTED if ((overhead + count) > disk_end) { 40001850: ba 03 c0 01 add %o7, %g1, %i5 40001854: 80 a7 40 0d cmp %i5, %o5 40001858: 18 80 00 35 bgu 4000192c <== NEVER TAKEN 4000185c: 90 10 20 1b mov 0x1b, %o0 free_space = disk_end - overhead; 40001860: 9e 23 40 0f sub %o5, %o7, %o7 for (i = 0; i < count; ++i) { 40001864: b0 10 00 1a mov %i2, %i0 40001868: b2 10 20 00 clr %i1 pos = record_space; 4000186c: 10 80 00 25 b 40001900 40001870: b8 10 00 10 mov %l0, %i4 if (s == 0) { 40001874: 0a 80 00 07 bcs 40001890 <== NEVER TAKEN 40001878: 84 10 20 01 mov 1, %g2 s /= dist_sum; 4000187c: 81 80 20 00 wr %g0, %y 40001880: 01 00 00 00 nop 40001884: 01 00 00 00 nop 40001888: 01 00 00 00 nop 4000188c: 84 77 40 04 udiv %i5, %g4, %g2 s += record_space - (s % record_space); 40001890: 81 80 20 00 wr %g0, %y 40001894: 01 00 00 00 nop 40001898: 01 00 00 00 nop 4000189c: 01 00 00 00 nop 400018a0: 84 70 80 10 udiv %g2, %l0, %g2 if (count > 4 && i > 2) { 400018a4: ba 10 20 01 mov 1, %i5 s += record_space - (s % record_space); 400018a8: 84 58 80 10 smul %g2, %l0, %g2 if (count > 4 && i > 2) { 400018ac: 80 a0 60 04 cmp %g1, 4 400018b0: 18 80 00 03 bgu 400018bc <== ALWAYS TAKEN 400018b4: 84 04 00 02 add %l0, %g2, %g2 400018b8: ba 10 20 00 clr %i5 <== NOT EXECUTED 400018bc: 80 8f 60 ff btst 0xff, %i5 400018c0: 02 80 00 08 be 400018e0 <== NEVER TAKEN 400018c4: 80 a6 60 02 cmp %i1, 2 400018c8: 18 80 00 03 bgu 400018d4 400018cc: ba 10 20 01 mov 1, %i5 400018d0: ba 10 20 00 clr %i5 400018d4: 80 8f 60 ff btst 0xff, %i5 400018d8: 32 80 00 02 bne,a 400018e0 400018dc: b8 07 00 10 add %i4, %l0, %i4 p->begin = pos; 400018e0: f8 26 00 00 st %i4, [ %i0 ] pos += s; 400018e4: b8 07 00 02 add %i4, %g2, %i4 p->end = pos; 400018e8: f8 26 20 04 st %i4, [ %i0 + 4 ] for (i = 0; i < count; ++i) { 400018ec: 84 06 60 01 add %i1, 1, %g2 400018f0: 80 a0 c0 19 cmp %g3, %i1 400018f4: 02 80 00 26 be 4000198c 400018f8: b0 06 20 30 add %i0, 0x30, %i0 400018fc: b2 10 00 02 mov %g2, %i1 rtems_blkdev_bnum s = free_space * dist [i]; 40001900: 85 2e 60 02 sll %i1, 2, %g2 40001904: fa 06 c0 02 ld [ %i3 + %g2 ], %i5 if (s < free_space || s < dist [i]) { 40001908: 84 10 00 1d mov %i5, %g2 4000190c: 80 a0 80 0f cmp %g2, %o7 40001910: 1a 80 00 03 bcc 4000191c <== NEVER TAKEN 40001914: ba 5f 40 0f smul %i5, %o7, %i5 40001918: 84 10 00 0f mov %o7, %g2 4000191c: 80 a7 40 02 cmp %i5, %g2 40001920: 1a bf ff d5 bcc 40001874 <== ALWAYS TAKEN 40001924: 80 a7 40 04 cmp %i5, %g4 return RTEMS_INVALID_NUMBER; 40001928: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED } 4000192c: 81 c7 e0 08 ret 40001930: 91 e8 00 08 restore %g0, %o0, %o0 && format->mbr.dos_compatibility; 40001934: 80 a0 60 00 cmp %g1, 0 40001938: 22 bf ff 95 be,a 4000178c <== NEVER TAKEN 4000193c: a2 10 20 00 clr %l1 <== NOT EXECUTED 40001940: a2 10 20 01 mov 1, %l1 dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1; 40001944: 10 bf ff 93 b 40001790 40001948: a0 10 20 3f mov 0x3f, %l0 return RTEMS_INVALID_ADDRESS; 4000194c: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED } 40001950: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40001954: 81 c7 e0 08 ret <== NOT EXECUTED 40001958: 81 e8 00 00 restore <== NOT EXECUTED disk_end -= (disk_end % record_space); 4000195c: 81 80 20 00 wr %g0, %y 40001960: 01 00 00 00 nop 40001964: 01 00 00 00 nop 40001968: 01 00 00 00 nop 4000196c: 9a 73 40 10 udiv %o5, %l0, %o5 if (count > 4) { 40001970: 80 a0 60 04 cmp %g1, 4 40001974: 18 80 00 0d bgu 400019a8 <== ALWAYS TAKEN 40001978: 9a 5b 40 10 smul %o5, %l0, %o5 overhead += record_space; 4000197c: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED overhead += (count - 1) * record_space; 40001980: 9e 5c 00 03 smul %l0, %g3, %o7 <== NOT EXECUTED 40001984: 10 bf ff b3 b 40001850 <== NOT EXECUTED 40001988: 9e 03 c0 02 add %o7, %g2, %o7 <== NOT EXECUTED pt [count - 1].end = disk_end; 4000198c: 87 28 60 01 sll %g1, 1, %g3 return RTEMS_SUCCESSFUL; 40001990: 90 10 20 00 clr %o0 pt [count - 1].end = disk_end; 40001994: 82 00 c0 01 add %g3, %g1, %g1 40001998: 83 28 60 04 sll %g1, 4, %g1 4000199c: 82 06 80 01 add %i2, %g1, %g1 return RTEMS_SUCCESSFUL; 400019a0: 10 bf ff e3 b 4000192c 400019a4: da 20 7f d4 st %o5, [ %g1 + -44 ] overhead += (count - 3) * record_space; 400019a8: 84 00 ff ff add %g3, -1, %g2 overhead += (count - 1) * record_space; 400019ac: 9e 5c 00 03 smul %l0, %g3, %o7 overhead += (count - 3) * record_space; 400019b0: 84 58 80 10 smul %g2, %l0, %g2 overhead += (count - 1) * record_space; 400019b4: 10 bf ff a7 b 40001850 400019b8: 9e 03 c0 02 add %o7, %g2, %o7 =============================================================================== 400019f8 : { uuid_unparse_lower( type, str); } void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count) { 400019f8: 9d e3 bf 60 save %sp, -160, %sp size_t i = 0; printf( 400019fc: 11 10 00 7d sethi %hi(0x4001f400), %o0 40001a00: 7f ff ff 54 call 40001750 <__wrap_puts> 40001a04: 90 12 22 70 or %o0, 0x270, %o0 ! 4001f670 "------------+------------+-----------------------------------------------------\n" " BEGIN | LAST | TYPE\n" "------------+------------+-----------------------------------------------------\n" ); for (i = 0; i < count; ++i) { 40001a08: 80 a6 60 00 cmp %i1, 0 40001a0c: 22 80 00 34 be,a 40001adc <== NEVER TAKEN 40001a10: 31 10 00 7d sethi %hi(0x4001f400), %i0 <== NOT EXECUTED break; case RTEMS_BDPART_MBR_FAT_32_LBA: type = "FAT 32 LBA"; break; case RTEMS_BDPART_MBR_DATA: type = "DATA"; 40001a14: 37 10 00 7d sethi %hi(0x4001f400), %i3 40001a18: 35 10 00 06 sethi %hi(0x40001800), %i2 type = "FAT 12"; 40001a1c: 25 10 00 7d sethi %hi(0x4001f400), %l2 type = "FAT 32 LBA"; 40001a20: 23 10 00 7d sethi %hi(0x4001f400), %l1 type = "FAT 32"; 40001a24: 21 10 00 7d sethi %hi(0x4001f400), %l0 40001a28: b0 06 20 08 add %i0, 8, %i0 for (i = 0; i < count; ++i) { 40001a2c: ba 10 20 00 clr %i5 40001a30: 39 10 00 7d sethi %hi(0x4001f400), %i4 type = "DATA"; 40001a34: b6 16 e2 68 or %i3, 0x268, %i3 40001a38: b4 16 a1 bc or %i2, 0x1bc, %i2 type = "FAT 12"; 40001a3c: a4 14 a2 30 or %l2, 0x230, %l2 type = "FAT 32 LBA"; 40001a40: a2 14 62 50 or %l1, 0x250, %l1 type = "FAT 32"; 40001a44: a0 14 22 60 or %l0, 0x260, %l0 uint8_t type_mbr = 0; 40001a48: c0 2f bf c7 clrb [ %fp + -57 ] if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) { 40001a4c: 92 07 bf c7 add %fp, -57, %o1 40001a50: 40 00 00 9b call 40001cbc 40001a54: 90 10 00 18 mov %i0, %o0 40001a58: 80 a2 20 00 cmp %o0, 0 40001a5c: 02 80 00 2b be 40001b08 <== NEVER TAKEN 40001a60: c2 0f bf c7 ldub [ %fp + -57 ], %g1 switch (type_mbr) { 40001a64: 80 a0 60 0e cmp %g1, 0xe 40001a68: 18 80 00 09 bgu 40001a8c <== NEVER TAKEN 40001a6c: 80 a0 60 00 cmp %g1, 0 40001a70: 02 80 00 0a be 40001a98 <== NEVER TAKEN 40001a74: 80 a0 60 0e cmp %g1, 0xe 40001a78: 18 80 00 08 bgu 40001a98 <== NEVER TAKEN 40001a7c: 85 28 60 02 sll %g1, 2, %g2 40001a80: c4 06 80 02 ld [ %i2 + %g2 ], %g2 40001a84: 81 c0 80 00 jmp %g2 40001a88: 01 00 00 00 nop 40001a8c: 80 a0 60 da cmp %g1, 0xda <== NOT EXECUTED 40001a90: 02 80 00 09 be 40001ab4 <== NOT EXECUTED 40001a94: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED break; default: snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr); 40001a98: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40001a9c: 92 10 20 34 mov 0x34, %o1 <== NOT EXECUTED 40001aa0: 15 10 00 7d sethi %hi(0x4001f400), %o2 <== NOT EXECUTED 40001aa4: 90 07 bf c8 add %fp, -56, %o0 <== NOT EXECUTED 40001aa8: 40 00 4f 9c call 40015918 <== NOT EXECUTED 40001aac: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED type = type_buffer; 40001ab0: 96 07 bf c8 add %fp, -56, %o3 <== NOT EXECUTED } else { rtems_bdpart_type_to_string( p->type, type_buffer); type = type_buffer; } printf( 40001ab4: d4 06 3f fc ld [ %i0 + -4 ], %o2 40001ab8: d2 06 3f f8 ld [ %i0 + -8 ], %o1 40001abc: 94 02 bf ff add %o2, -1, %o2 40001ac0: 7f ff ff 16 call 40001718 <__wrap_printf> 40001ac4: 90 17 23 c0 or %i4, 0x3c0, %o0 for (i = 0; i < count; ++i) { 40001ac8: ba 07 60 01 inc %i5 40001acc: 80 a6 40 1d cmp %i1, %i5 40001ad0: 12 bf ff de bne 40001a48 40001ad4: b0 06 20 30 add %i0, 0x30, %i0 p->end - 1U, type ); } puts( "------------+------------+-----------------------------------------------------"); 40001ad8: 31 10 00 7d sethi %hi(0x4001f400), %i0 40001adc: 7f ff ff 1d call 40001750 <__wrap_puts> 40001ae0: 91 ee 23 60 restore %i0, 0x360, %o0 type = "FAT 16 LBA"; 40001ae4: 17 10 00 7d sethi %hi(0x4001f400), %o3 <== NOT EXECUTED break; 40001ae8: 10 bf ff f3 b 40001ab4 <== NOT EXECUTED 40001aec: 96 12 e2 38 or %o3, 0x238, %o3 ! 4001f638 <== NOT EXECUTED break; 40001af0: 10 bf ff f1 b 40001ab4 <== NOT EXECUTED 40001af4: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED break; 40001af8: 10 bf ff ef b 40001ab4 40001afc: 96 10 00 10 mov %l0, %o3 type = "FAT 12"; 40001b00: 10 bf ff ed b 40001ab4 <== NOT EXECUTED 40001b04: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED uuid_unparse_lower( type, str); 40001b08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001b0c: 40 00 17 87 call 40007928 <== NOT EXECUTED 40001b10: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED type = type_buffer; 40001b14: 10 bf ff e8 b 40001ab4 <== NOT EXECUTED 40001b18: 96 07 bf c8 add %fp, -56, %o3 <== NOT EXECUTED switch (type_mbr) { 40001b1c: 17 10 00 7d sethi %hi(0x4001f400), %o3 <== NOT EXECUTED 40001b20: 10 bf ff e5 b 40001ab4 <== NOT EXECUTED 40001b24: 96 12 e2 48 or %o3, 0x248, %o3 ! 4001f648 <== NOT EXECUTED =============================================================================== 40001cec : { 40001cec: 9d e3 bf 98 save %sp, -104, %sp fd = open( disk_name, O_RDWR); 40001cf0: 92 10 20 02 mov 2, %o1 40001cf4: 90 10 00 18 mov %i0, %o0 rtems_disk_device *dd = NULL; 40001cf8: c0 27 bf fc clr [ %fp + -4 ] fd = open( disk_name, O_RDWR); 40001cfc: 40 00 0a 95 call 40004750 40001d00: b0 10 20 03 mov 3, %i0 if (fd < 0) { 40001d04: 80 a2 20 00 cmp %o0, 0 40001d08: 06 80 00 18 bl 40001d68 <== NEVER TAKEN 40001d0c: ba 10 00 08 mov %o0, %i5 40001d10: 94 07 bf fc add %fp, -4, %o2 40001d14: 13 10 01 10 sethi %hi(0x40044000), %o1 40001d18: 40 00 07 e8 call 40003cb8 40001d1c: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <__end+0x1e7d9> if (rv != 0) { 40001d20: 80 a2 20 00 cmp %o0, 0 40001d24: 12 80 00 14 bne 40001d74 <== NEVER TAKEN 40001d28: c2 07 bf fc ld [ %fp + -4 ], %g1 *disk_end = dd->size; 40001d2c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 disk_begin = dd->start; 40001d30: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 *disk_end = dd->size; 40001d34: c4 26 c0 00 st %g2, [ %i3 ] if (block_size < RTEMS_BDPART_BLOCK_SIZE) { 40001d38: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if (disk_begin != 0) { 40001d3c: 80 a0 a1 ff cmp %g2, 0x1ff 40001d40: 08 80 00 0c bleu 40001d70 <== NEVER TAKEN 40001d44: 80 a0 e0 00 cmp %g3, 0 40001d48: 12 80 00 0a bne 40001d70 <== NEVER TAKEN 40001d4c: 80 a6 60 00 cmp %i1, 0 if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) { 40001d50: 02 80 00 0d be 40001d84 40001d54: 80 a6 a0 00 cmp %i2, 0 40001d58: 02 80 00 0c be 40001d88 <== NEVER TAKEN 40001d5c: b0 10 20 00 clr %i0 *fd_ptr = fd; 40001d60: fa 26 40 00 st %i5, [ %i1 ] *dd_ptr = dd; 40001d64: c2 26 80 00 st %g1, [ %i2 ] 40001d68: 81 c7 e0 08 ret 40001d6c: 81 e8 00 00 restore sc = RTEMS_IO_ERROR; 40001d70: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED close( fd); 40001d74: 40 00 06 ea call 4000391c <== NOT EXECUTED 40001d78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED } 40001d7c: 81 c7 e0 08 ret 40001d80: 81 e8 00 00 restore rtems_status_code sc = RTEMS_SUCCESSFUL; 40001d84: b0 10 20 00 clr %i0 close( fd); 40001d88: 40 00 06 e5 call 4000391c 40001d8c: 90 10 00 1d mov %i5, %o0 40001d90: 30 bf ff fb b,a 40001d7c =============================================================================== 40001d94 : const char *disk_name, rtems_bdpart_format *format, rtems_bdpart_partition *pt, size_t *count ) { 40001d94: 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; 40001d98: 82 06 bf d0 add %i2, -48, %g1 rtems_bdbuf_buffer *block = NULL; 40001d9c: c0 27 bf e8 clr [ %fp + -24 ] const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0); 40001da0: 80 a6 e0 00 cmp %i3, 0 40001da4: 02 80 00 26 be 40001e3c <== NEVER TAKEN 40001da8: 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; 40001dac: 82 10 3f ff mov -1, %g1 rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */ 40001db0: c0 27 bf f0 clr [ %fp + -16 ] rtems_disk_device *dd = NULL; /* Check parameter */ if (format == NULL || pt == NULL || count == NULL) { 40001db4: 80 a6 60 00 cmp %i1, 0 rtems_blkdev_bnum disk_end = 0; 40001db8: c0 27 bf f4 clr [ %fp + -12 ] int fd = -1; 40001dbc: c2 27 bf f8 st %g1, [ %fp + -8 ] rtems_disk_device *dd = NULL; 40001dc0: c0 27 bf fc clr [ %fp + -4 ] if (format == NULL || pt == NULL || count == NULL) { 40001dc4: 02 80 00 1e be 40001e3c <== NEVER TAKEN 40001dc8: f8 06 c0 00 ld [ %i3 ], %i4 40001dcc: 80 a6 a0 00 cmp %i2, 0 40001dd0: 02 80 00 1b be 40001e3c <== NEVER TAKEN 40001dd4: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; } /* Set count to a save value */ *count = 0; 40001dd8: c0 26 c0 00 clr [ %i3 ] /* Get disk data */ sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 40001ddc: 96 07 bf f4 add %fp, -12, %o3 40001de0: 94 07 bf fc add %fp, -4, %o2 40001de4: 7f ff ff c2 call 40001cec 40001de8: 92 07 bf f8 add %fp, -8, %o1 if (sc != RTEMS_SUCCESSFUL) { 40001dec: b0 92 20 00 orcc %o0, 0, %i0 40001df0: 12 80 00 11 bne 40001e34 <== NEVER TAKEN 40001df4: d0 07 bf fc ld [ %fp + -4 ], %o0 return sc; } /* Read MBR */ sc = rtems_bdpart_read_record( dd, 0, &block); 40001df8: 92 10 20 00 clr %o1 40001dfc: 7f ff ff 87 call 40001c18 40001e00: 94 07 bf e8 add %fp, -24, %o2 if (sc != RTEMS_SUCCESSFUL) { 40001e04: b0 92 20 00 orcc %o0, 0, %i0 40001e08: 02 80 00 0f be 40001e44 <== ALWAYS TAKEN 40001e0c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* Return partition count */ *count = (size_t) (p - pt + 1); cleanup: if (fd >= 0) { 40001e10: c2 07 bf f8 ld [ %fp + -8 ], %g1 40001e14: 80 a0 60 00 cmp %g1, 0 40001e18: 16 80 00 75 bge 40001fec <== ALWAYS TAKEN 40001e1c: d0 07 bf e8 ld [ %fp + -24 ], %o0 close( fd); } if (block != NULL) { 40001e20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001e24: 02 80 00 04 be 40001e34 <== NOT EXECUTED 40001e28: 01 00 00 00 nop <== NOT EXECUTED rtems_bdbuf_release( block); 40001e2c: 40 00 34 a2 call 4000f0b4 40001e30: 01 00 00 00 nop 40001e34: 81 c7 e0 08 ret 40001e38: 81 e8 00 00 restore return RTEMS_INVALID_ADDRESS; 40001e3c: 81 c7 e0 08 ret <== NOT EXECUTED 40001e40: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0; 40001e44: e0 00 60 1c ld [ %g1 + 0x1c ], %l0 const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0); 40001e48: 83 2f 20 01 sll %i4, 1, %g1 data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0; 40001e4c: ba 04 21 be add %l0, 0x1be, %i5 const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0); 40001e50: b8 00 40 1c add %g1, %i4, %i4 sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin); 40001e54: 96 07 bf f0 add %fp, -16, %o3 const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0); 40001e58: b9 2f 20 04 sll %i4, 4, %i4 sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin); 40001e5c: 92 07 bf ec add %fp, -20, %o1 const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0); 40001e60: b8 06 80 1c add %i2, %i4, %i4 sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin); 40001e64: 90 10 00 1d mov %i5, %o0 40001e68: 7f ff ff 30 call 40001b28 40001e6c: 94 10 00 1c mov %i4, %o2 if (sc != RTEMS_SUCCESSFUL) { 40001e70: b0 92 20 00 orcc %o0, 0, %i0 40001e74: 12 bf ff e7 bne 40001e10 <== NEVER TAKEN 40001e78: c2 07 bf ec ld [ %fp + -20 ], %g1 if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) { 40001e7c: c2 08 60 08 ldub [ %g1 + 8 ], %g1 40001e80: 80 a0 60 ee cmp %g1, 0xee 40001e84: 02 80 00 63 be 40002010 <== NEVER TAKEN 40001e88: c4 07 bf e8 ld [ %fp + -24 ], %g2 format->type = RTEMS_BDPART_FORMAT_MBR; 40001e8c: c0 26 40 00 clr [ %i1 ] 40001e90: 82 10 20 03 mov 3, %g1 block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID 40001e94: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 40001e98: 86 00 e1 b8 add %g3, 0x1b8, %g3 value = (value << 8) + data [i]; 40001e9c: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 40001ea0: b1 2e 20 08 sll %i0, 8, %i0 for (i = 3; i >= 0; --i) { 40001ea4: 82 00 7f ff add %g1, -1, %g1 40001ea8: 80 a0 7f ff cmp %g1, -1 40001eac: 12 bf ff fc bne 40001e9c 40001eb0: b0 00 80 18 add %g2, %i0, %i0 format->mbr.dos_compatibility = true; 40001eb4: 82 10 20 01 mov 1, %g1 format->mbr.disk_id = rtems_uint32_from_little_endian( 40001eb8: f0 26 60 04 st %i0, [ %i1 + 4 ] format->mbr.dos_compatibility = true; 40001ebc: a0 04 21 ee add %l0, 0x1ee, %l0 40001ec0: c2 2e 60 08 stb %g1, [ %i1 + 8 ] data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE; 40001ec4: ba 07 60 10 add %i5, 0x10, %i5 sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin); 40001ec8: 96 07 bf f0 add %fp, -16, %o3 40001ecc: 94 10 00 1c mov %i4, %o2 40001ed0: 92 07 bf ec add %fp, -20, %o1 40001ed4: 7f ff ff 15 call 40001b28 40001ed8: 90 10 00 1d mov %i5, %o0 if (sc != RTEMS_SUCCESSFUL) { 40001edc: b0 92 20 00 orcc %o0, 0, %i0 40001ee0: 12 bf ff cc bne 40001e10 <== NEVER TAKEN 40001ee4: 80 a7 40 10 cmp %i5, %l0 for (i = 1; i < 4; ++i) { 40001ee8: 12 bf ff f8 bne 40001ec8 40001eec: ba 07 60 10 add %i5, 0x10, %i5 ebr = ep_begin; 40001ef0: fa 07 bf f0 ld [ %fp + -16 ], %i5 while (ebr != 0) { 40001ef4: 80 a7 60 00 cmp %i5, 0 40001ef8: 02 80 00 2d be 40001fac <== NEVER TAKEN 40001efc: c8 07 bf ec ld [ %fp + -20 ], %g4 sc = rtems_bdpart_read_record( dd, ebr, &block); 40001f00: d0 07 bf fc ld [ %fp + -4 ], %o0 40001f04: 94 07 bf e8 add %fp, -24, %o2 40001f08: 7f ff ff 44 call 40001c18 40001f0c: 92 10 00 1d mov %i5, %o1 if (sc != RTEMS_SUCCESSFUL) { 40001f10: 80 a2 20 00 cmp %o0, 0 40001f14: 12 80 00 41 bne 40002018 <== NEVER TAKEN 40001f18: c2 07 bf e8 ld [ %fp + -24 ], %g1 block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0, 40001f1c: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 sc = rtems_bdpart_read_mbr_partition( 40001f20: 96 10 20 00 clr %o3 40001f24: 94 10 00 1c mov %i4, %o2 40001f28: 92 07 bf ec add %fp, -20, %o1 40001f2c: 7f ff fe ff call 40001b28 40001f30: 90 02 21 be add %o0, 0x1be, %o0 if (sc != RTEMS_SUCCESSFUL) { 40001f34: 82 92 20 00 orcc %o0, 0, %g1 40001f38: 12 80 00 3a bne 40002020 <== NEVER TAKEN 40001f3c: c8 07 bf ec ld [ %fp + -20 ], %g4 tmp = p->begin + ebr; 40001f40: c4 01 00 00 ld [ %g4 ], %g2 40001f44: 86 00 80 1d add %g2, %i5, %g3 if (tmp > p->begin) { 40001f48: 80 a0 80 03 cmp %g2, %g3 40001f4c: 3a bf ff b1 bcc,a 40001e10 <== NEVER TAKEN 40001f50: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED p->begin = tmp; 40001f54: c6 21 00 00 st %g3, [ %g4 ] tmp = p->end + ebr; 40001f58: c4 01 20 04 ld [ %g4 + 4 ], %g2 40001f5c: ba 00 80 1d add %g2, %i5, %i5 if (tmp > p->end) { 40001f60: 80 a0 80 1d cmp %g2, %i5 40001f64: 1a 80 00 29 bcc 40002008 <== NEVER TAKEN 40001f68: d0 07 bf e8 ld [ %fp + -24 ], %o0 block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1 40001f6c: f2 02 20 1c ld [ %o0 + 0x1c ], %i1 p->end = tmp; 40001f70: fa 21 20 04 st %i5, [ %g4 + 4 ] 40001f74: 84 10 20 03 mov 3, %g2 40001f78: ba 06 61 d6 add %i1, 0x1d6, %i5 value = (value << 8) + data [i]; 40001f7c: c6 0f 40 02 ldub [ %i5 + %g2 ], %g3 40001f80: 83 28 60 08 sll %g1, 8, %g1 for (i = 3; i >= 0; --i) { 40001f84: 84 00 bf ff add %g2, -1, %g2 40001f88: 80 a0 bf ff cmp %g2, -1 40001f8c: 12 bf ff fc bne 40001f7c 40001f90: 82 00 c0 01 add %g3, %g1, %g1 if (type == RTEMS_BDPART_MBR_EXTENDED) { 40001f94: c4 0e 61 d2 ldub [ %i1 + 0x1d2 ], %g2 if (ebr != 0) { 40001f98: 80 a0 a0 05 cmp %g2, 5 40001f9c: 12 80 00 04 bne 40001fac 40001fa0: 80 a0 60 00 cmp %g1, 0 40001fa4: 32 80 00 0a bne,a 40001fcc <== ALWAYS TAKEN 40001fa8: fa 07 bf f0 ld [ %fp + -16 ], %i5 *count = (size_t) (p - pt + 1); 40001fac: 82 21 00 1a sub %g4, %i2, %g1 40001fb0: 05 2a aa aa sethi %hi(0xaaaaa800), %g2 40001fb4: 83 38 60 04 sra %g1, 4, %g1 40001fb8: 84 10 a2 ab or %g2, 0x2ab, %g2 40001fbc: 82 58 40 02 smul %g1, %g2, %g1 40001fc0: 82 00 60 01 inc %g1 40001fc4: 10 bf ff 93 b 40001e10 40001fc8: c2 26 c0 00 st %g1, [ %i3 ] tmp = ebr + ep_begin; 40001fcc: ba 00 40 1d add %g1, %i5, %i5 if (tmp > ebr) { 40001fd0: 80 a7 40 01 cmp %i5, %g1 40001fd4: 38 bf ff cc bgu,a 40001f04 <== ALWAYS TAKEN 40001fd8: d0 07 bf fc ld [ %fp + -4 ], %o0 if (fd >= 0) { 40001fdc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40001fe0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001fe4: 06 bf ff 92 bl 40001e2c <== NOT EXECUTED 40001fe8: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED close( fd); 40001fec: 40 00 06 4c call 4000391c 40001ff0: 90 10 00 01 mov %g1, %o0 if (block != NULL) { 40001ff4: d0 07 bf e8 ld [ %fp + -24 ], %o0 40001ff8: 80 a2 20 00 cmp %o0, 0 40001ffc: 12 bf ff 8c bne 40001e2c <== ALWAYS TAKEN 40002000: 01 00 00 00 nop 40002004: 30 bf ff 8c b,a 40001e34 <== NOT EXECUTED esc = RTEMS_IO_ERROR; 40002008: 10 bf ff 82 b 40001e10 <== NOT EXECUTED 4000200c: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED esc = RTEMS_NOT_IMPLEMENTED; 40002010: 10 bf ff 80 b 40001e10 <== NOT EXECUTED 40002014: b0 10 20 18 mov 0x18, %i0 <== NOT EXECUTED 40002018: 10 bf ff 7e b 40001e10 <== NOT EXECUTED 4000201c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40002020: 10 bf ff 7c b 40001e10 <== NOT EXECUTED 40002024: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED =============================================================================== 40002028 : rtems_status_code rtems_bdpart_register( const char *disk_name, const rtems_bdpart_partition *pt, size_t count ) { 40002028: 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; 4000202c: 82 10 3f ff mov -1, %g1 rtems_blkdev_bnum disk_end = 0; 40002030: c0 27 bf f4 clr [ %fp + -12 ] rtems_disk_device *dd = NULL; /* Get disk data */ sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 40002034: 96 07 bf f4 add %fp, -12, %o3 rtems_disk_device *dd = NULL; 40002038: c0 27 bf fc clr [ %fp + -4 ] sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 4000203c: 94 07 bf fc add %fp, -4, %o2 int fd = -1; 40002040: c2 27 bf f8 st %g1, [ %fp + -8 ] sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 40002044: 92 07 bf f8 add %fp, -8, %o1 40002048: 7f ff ff 29 call 40001cec 4000204c: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 40002050: b6 92 20 00 orcc %o0, 0, %i3 40002054: 02 80 00 04 be 40002064 <== ALWAYS TAKEN 40002058: 01 00 00 00 nop free( logical_disk_name); close( fd); return esc; } 4000205c: 81 c7 e0 08 ret <== NOT EXECUTED 40002060: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED size_t disk_name_size = strlen( disk_name); 40002064: 40 00 4f 19 call 40015cc8 40002068: 90 10 00 18 mov %i0, %o0 4000206c: ba 10 00 08 mov %o0, %i5 char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE); 40002070: 40 00 07 dc call 40003fe0 40002074: 90 02 20 04 add %o0, 4, %o0 if (logical_disk_name != NULL) { 40002078: b8 92 20 00 orcc %o0, 0, %i4 4000207c: 02 80 00 1f be 400020f8 <== NEVER TAKEN 40002080: 94 10 00 1d mov %i5, %o2 memcpy( logical_disk_name, disk_name, disk_name_size); 40002084: 92 10 00 18 mov %i0, %o1 *marker = logical_disk_name + disk_name_size; 40002088: a2 07 00 1d add %i4, %i5, %l1 memcpy( logical_disk_name, disk_name, disk_name_size); 4000208c: 40 00 4d 43 call 40015598 40002090: 21 10 00 7d sethi %hi(0x4001f400), %l0 for (i = 0; i < count; ++i) { 40002094: ba 10 20 00 clr %i5 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 40002098: 10 80 00 09 b 400020bc 4000209c: a0 14 23 e8 or %l0, 0x3e8, %l0 sc = rtems_blkdev_create_partition( 400020a0: d4 1e 40 00 ldd [ %i1 ], %o2 400020a4: 96 22 c0 0a sub %o3, %o2, %o3 400020a8: 40 00 02 af call 40002b64 400020ac: b2 06 60 30 add %i1, 0x30, %i1 if (sc != RTEMS_SUCCESSFUL) { 400020b0: 80 a2 20 00 cmp %o0, 0 400020b4: 32 80 00 11 bne,a 400020f8 <== NEVER TAKEN 400020b8: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED for (i = 0; i < count; ++i) { 400020bc: 80 a7 40 1a cmp %i5, %i2 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400020c0: 94 10 00 10 mov %l0, %o2 400020c4: ba 07 60 01 inc %i5 400020c8: 92 10 20 04 mov 4, %o1 400020cc: 90 10 00 11 mov %l1, %o0 for (i = 0; i < count; ++i) { 400020d0: 02 80 00 0a be 400020f8 400020d4: 96 10 00 1d mov %i5, %o3 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400020d8: 40 00 4e 10 call 40015918 400020dc: 01 00 00 00 nop sc = rtems_blkdev_create_partition( 400020e0: 92 10 00 18 mov %i0, %o1 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400020e4: 82 10 00 08 mov %o0, %g1 if (rv >= RTEMS_BDPART_NUMBER_SIZE) { 400020e8: 80 a0 60 03 cmp %g1, 3 400020ec: 04 bf ff ed ble 400020a0 <== ALWAYS TAKEN 400020f0: 90 10 00 1c mov %i4, %o0 sc = RTEMS_INVALID_NAME; 400020f4: b6 10 20 03 mov 3, %i3 <== NOT EXECUTED free( logical_disk_name); 400020f8: 40 00 06 6b call 40003aa4 400020fc: 90 10 00 1c mov %i4, %o0 close( fd); 40002100: 40 00 06 07 call 4000391c 40002104: d0 07 bf f8 ld [ %fp + -8 ], %o0 } 40002108: 81 c7 e0 08 ret 4000210c: 91 e8 00 1b restore %g0, %i3, %o0 =============================================================================== 40002110 : rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name) { 40002110: 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; 40002114: 82 10 20 10 mov 0x10, %g1 /* Read partitions */ sc = rtems_bdpart_read( disk_name, &format, pt, &count); 40002118: 96 07 bc e8 add %fp, -792, %o3 size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT; 4000211c: c2 27 bc e8 st %g1, [ %fp + -792 ] sc = rtems_bdpart_read( disk_name, &format, pt, &count); 40002120: 94 07 bd 00 add %fp, -768, %o2 40002124: 92 07 bc ec add %fp, -788, %o1 40002128: 7f ff ff 1b call 40001d94 4000212c: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 40002130: 80 a2 20 00 cmp %o0, 0 40002134: 12 80 00 05 bne 40002148 <== NEVER TAKEN 40002138: d4 07 bc e8 ld [ %fp + -792 ], %o2 return sc; } /* Register partitions */ return rtems_bdpart_register( disk_name, pt, count); 4000213c: 92 07 bd 00 add %fp, -768, %o1 40002140: 7f ff ff ba call 40002028 40002144: 90 10 00 18 mov %i0, %o0 } 40002148: 81 c7 e0 08 ret 4000214c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40002150 : rtems_status_code rtems_bdpart_unregister( const char *disk_name, const rtems_bdpart_partition *pt RTEMS_UNUSED, size_t count ) { 40002150: 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; 40002154: 82 10 3f ff mov -1, %g1 rtems_blkdev_bnum disk_end = 0; 40002158: c0 27 bf f4 clr [ %fp + -12 ] rtems_disk_device *dd = NULL; /* Get disk data */ sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 4000215c: 96 07 bf f4 add %fp, -12, %o3 rtems_disk_device *dd = NULL; 40002160: c0 27 bf fc clr [ %fp + -4 ] sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 40002164: 94 07 bf fc add %fp, -4, %o2 int fd = -1; 40002168: c2 27 bf f8 st %g1, [ %fp + -8 ] sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end); 4000216c: 92 07 bf f8 add %fp, -8, %o1 40002170: 7f ff fe df call 40001cec 40002174: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 40002178: b6 92 20 00 orcc %o0, 0, %i3 4000217c: 02 80 00 04 be 4000218c <== ALWAYS TAKEN 40002180: 01 00 00 00 nop free( logical_disk_name); close( fd); return esc; } 40002184: 81 c7 e0 08 ret <== NOT EXECUTED 40002188: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED size_t disk_name_size = strlen( disk_name); 4000218c: 40 00 4e cf call 40015cc8 40002190: 90 10 00 18 mov %i0, %o0 40002194: ba 10 00 08 mov %o0, %i5 char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE); 40002198: 40 00 07 92 call 40003fe0 4000219c: 90 02 20 04 add %o0, 4, %o0 if (logical_disk_name != NULL) { 400021a0: b8 92 20 00 orcc %o0, 0, %i4 400021a4: 02 80 00 1c be 40002214 <== NEVER TAKEN 400021a8: 94 10 00 1d mov %i5, %o2 memcpy( logical_disk_name, disk_name, disk_name_size); 400021ac: 92 10 00 18 mov %i0, %o1 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400021b0: 33 10 00 7d sethi %hi(0x4001f400), %i1 memcpy( logical_disk_name, disk_name, disk_name_size); 400021b4: 40 00 4c f9 call 40015598 400021b8: b0 07 00 1d add %i4, %i5, %i0 for (i = 0; i < count; ++i) { 400021bc: ba 10 20 00 clr %i5 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400021c0: 10 80 00 07 b 400021dc 400021c4: b2 16 63 e8 or %i1, 0x3e8, %i1 rv = unlink( logical_disk_name); 400021c8: 40 00 0e 26 call 40005a60 400021cc: 01 00 00 00 nop if (rv != 0) { 400021d0: 80 a2 20 00 cmp %o0, 0 400021d4: 12 80 00 10 bne 40002214 <== NEVER TAKEN 400021d8: 01 00 00 00 nop for (i = 0; i < count; ++i) { 400021dc: 80 a7 40 1a cmp %i5, %i2 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400021e0: 94 10 00 19 mov %i1, %o2 400021e4: ba 07 60 01 inc %i5 400021e8: 92 10 20 04 mov 4, %o1 400021ec: 90 10 00 18 mov %i0, %o0 for (i = 0; i < count; ++i) { 400021f0: 02 80 00 09 be 40002214 400021f4: 96 10 00 1d mov %i5, %o3 rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1); 400021f8: 40 00 4d c8 call 40015918 400021fc: 01 00 00 00 nop 40002200: 82 10 00 08 mov %o0, %g1 if (rv >= RTEMS_BDPART_NUMBER_SIZE) { 40002204: 80 a0 60 03 cmp %g1, 3 40002208: 04 bf ff f0 ble 400021c8 <== ALWAYS TAKEN 4000220c: 90 10 00 1c mov %i4, %o0 sc = RTEMS_INVALID_NAME; 40002210: b6 10 20 03 mov 3, %i3 <== NOT EXECUTED free( logical_disk_name); 40002214: 40 00 06 24 call 40003aa4 40002218: 90 10 00 1c mov %i4, %o0 close( fd); 4000221c: 40 00 05 c0 call 4000391c 40002220: d0 07 bf f8 ld [ %fp + -8 ], %o0 } 40002224: 81 c7 e0 08 ret 40002228: 91 e8 00 1b restore %g0, %i3, %o0 =============================================================================== 400022b8 : const char *disk_name, const rtems_bdpart_format *format, const rtems_bdpart_partition *pt, size_t count ) { 400022b8: 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; 400022bc: 80 a6 60 00 cmp %i1, 0 400022c0: 22 80 00 07 be,a 400022dc <== NEVER TAKEN 400022c4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED && format->type == RTEMS_BDPART_FORMAT_MBR 400022c8: c2 06 40 00 ld [ %i1 ], %g1 400022cc: 80 a0 60 00 cmp %g1, 0 400022d0: 22 80 00 54 be,a 40002420 <== ALWAYS TAKEN 400022d4: c2 0e 60 08 ldub [ %i1 + 8 ], %g1 rtems_bdbuf_buffer *block = NULL; 400022d8: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED && format->mbr.dos_compatibility; 400022dc: a0 10 20 00 clr %l0 <== NOT EXECUTED rtems_blkdev_bnum disk_end = 0; 400022e0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED rtems_blkdev_bnum record_space = dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1; 400022e4: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED size_t ppc = 0; /* Primary partition count */ size_t i = 0; uint8_t *data = NULL; int fd = -1; 400022e8: 82 10 3f ff mov -1, %g1 rtems_disk_device *dd = NULL; 400022ec: c0 27 bf fc clr [ %fp + -4 ] /* Check if we have something to do */ if (count == 0) { /* Nothing to do */ return RTEMS_SUCCESSFUL; 400022f0: ba 10 20 00 clr %i5 if (count == 0) { 400022f4: 80 a6 e0 00 cmp %i3, 0 400022f8: 02 80 00 48 be 40002418 <== NEVER TAKEN 400022fc: c2 27 bf f8 st %g1, [ %fp + -8 ] } /* Check parameter */ if (format == NULL || pt == NULL) { 40002300: 80 a6 60 00 cmp %i1, 0 40002304: 02 80 00 4e be 4000243c <== NEVER TAKEN 40002308: 80 a6 a0 00 cmp %i2, 0 4000230c: 02 80 00 4c be 4000243c <== NEVER TAKEN 40002310: 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); 40002314: 94 07 bf fc add %fp, -4, %o2 40002318: 92 07 bf f8 add %fp, -8, %o1 4000231c: 7f ff fe 74 call 40001cec 40002320: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 40002324: ba 92 20 00 orcc %o0, 0, %i5 40002328: 12 80 00 3c bne 40002418 <== NEVER TAKEN 4000232c: 80 a4 20 00 cmp %l0, 0 return sc; } /* Align end of disk on cylinder boundary if necessary */ if (dos_compatibility) { 40002330: 12 80 00 46 bne 40002448 <== ALWAYS TAKEN 40002334: c8 07 bf f4 ld [ %fp + -12 ], %g4 dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1; 40002338: 10 80 00 03 b 40002344 4000233c: 82 10 00 1a mov %i2, %g1 40002340: ba 10 00 1c mov %i4, %i5 /* 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) { 40002344: c4 00 40 00 ld [ %g1 ], %g2 40002348: 80 a0 80 04 cmp %g2, %g4 4000234c: 3a 80 00 29 bcc,a 400023f0 <== NEVER TAKEN 40002350: ba 10 20 0a mov 0xa, %i5 <== NOT EXECUTED 40002354: c6 00 60 04 ld [ %g1 + 4 ], %g3 esc = RTEMS_INVALID_NUMBER; goto cleanup; } /* Check that begin and end are valid */ if (p->begin >= p->end) { 40002358: 80 a0 80 03 cmp %g2, %g3 4000235c: 1a 80 00 24 bcc 400023ec <== NEVER TAKEN 40002360: 80 a1 00 03 cmp %g4, %g3 40002364: 0a 80 00 22 bcs 400023ec <== NEVER TAKEN 40002368: 80 a7 60 00 cmp %i5, 0 esc = RTEMS_INVALID_NUMBER; goto cleanup; } /* Check that partitions do not overlap */ if (i > 0 && pt [i - 1].end > p->begin) { 4000236c: 02 80 00 06 be 40002384 40002370: b8 07 60 01 add %i5, 1, %i4 40002374: c6 00 7f d4 ld [ %g1 + -44 ], %g3 40002378: 80 a0 80 03 cmp %g2, %g3 4000237c: 2a 80 00 1d bcs,a 400023f0 <== NEVER TAKEN 40002380: ba 10 20 0a mov 0xa, %i5 <== NOT EXECUTED for (i = 0; i < count; ++i) { 40002384: 80 a6 c0 1c cmp %i3, %i4 40002388: 12 bf ff ee bne 40002340 4000238c: 82 00 60 30 add %g1, 0x30, %g1 goto cleanup; } } /* Check format */ if (format->type != RTEMS_BDPART_FORMAT_MBR) { 40002390: c2 06 40 00 ld [ %i1 ], %g1 40002394: 80 a0 60 00 cmp %g1, 0 40002398: 12 80 00 3b bne 40002484 <== NEVER TAKEN 4000239c: 80 a6 e0 04 cmp %i3, 4 * Set primary partition count. If we have more than four partitions we need * an extended partition which will contain the partitions of number four and * above as logical partitions. If we have four or less partitions we can * use the primary partition table. */ ppc = count <= 4 ? count : 3; 400023a0: 08 80 00 3b bleu 4000248c <== NEVER TAKEN 400023a4: 80 a4 20 00 cmp %l0, 0 /* * Check that the first primary partition starts at head one and sector one * under the virtual one head and 63 sectors geometry if necessary. */ if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) { 400023a8: 32 80 00 e7 bne,a 40002744 <== ALWAYS TAKEN 400023ac: c2 06 80 00 ld [ %i2 ], %g1 400023b0: 89 2f 20 01 sll %i4, 1, %g4 <== NOT EXECUTED 400023b4: 82 06 a0 90 add %i2, 0x90, %g1 400023b8: 88 01 00 1c add %g4, %i4, %g4 400023bc: b7 29 20 04 sll %g4, 4, %i3 400023c0: 10 80 00 05 b 400023d4 400023c4: b6 06 80 1b add %i2, %i3, %i3 * Each logical partition is described via one EBR preceding the partition. * The space for the EBR and maybe some space which is needed for DOS * compatibility resides between the partitions. So there have to be gaps of * the appropriate size between the partitions. */ for (i = ppc; i < count; ++i) { 400023c8: 80 a0 40 1b cmp %g1, %i3 400023cc: 02 80 00 38 be 400024ac 400023d0: a0 10 20 03 mov 3, %l0 if ((pt [i].begin - pt [i - 1].end) < record_space) { 400023d4: c4 00 40 00 ld [ %g1 ], %g2 400023d8: c6 00 7f d4 ld [ %g1 + -44 ], %g3 400023dc: 84 20 80 03 sub %g2, %g3, %g2 400023e0: 80 a0 80 11 cmp %g2, %l1 400023e4: 3a bf ff f9 bcc,a 400023c8 <== ALWAYS TAKEN 400023e8: 82 00 60 30 add %g1, 0x30, %g1 esc = RTEMS_INVALID_NUMBER; 400023ec: ba 10 20 0a mov 0xa, %i5 <== NOT EXECUTED } } cleanup: if (fd >= 0) { 400023f0: d0 07 bf f8 ld [ %fp + -8 ], %o0 400023f4: 80 a2 20 00 cmp %o0, 0 400023f8: 16 80 00 1c bge 40002468 <== ALWAYS TAKEN 400023fc: 01 00 00 00 nop close( fd); } if (block != NULL) { 40002400: d0 07 bf f0 ld [ %fp + -16 ], %o0 <== NOT EXECUTED 40002404: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002408: 02 80 00 04 be 40002418 <== NOT EXECUTED 4000240c: 01 00 00 00 nop <== NOT EXECUTED rtems_bdbuf_sync( block); 40002410: 40 00 33 92 call 4000f258 40002414: 01 00 00 00 nop } return esc; } 40002418: 81 c7 e0 08 ret 4000241c: 91 e8 00 1d restore %g0, %i5, %o0 && format->mbr.dos_compatibility; 40002420: 80 a0 60 00 cmp %g1, 0 40002424: 02 bf ff ae be 400022dc <== NEVER TAKEN 40002428: c0 27 bf f0 clr [ %fp + -16 ] 4000242c: a0 10 20 01 mov 1, %l0 rtems_blkdev_bnum disk_end = 0; 40002430: c0 27 bf f4 clr [ %fp + -12 ] dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1; 40002434: 10 bf ff ad b 400022e8 40002438: a2 10 20 3f mov 0x3f, %l1 return RTEMS_INVALID_ADDRESS; 4000243c: ba 10 20 09 mov 9, %i5 <== NOT EXECUTED } 40002440: 81 c7 e0 08 ret <== NOT EXECUTED 40002444: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED disk_end -= (disk_end % record_space); 40002448: 81 80 20 00 wr %g0, %y 4000244c: 01 00 00 00 nop 40002450: 01 00 00 00 nop 40002454: 01 00 00 00 nop 40002458: 88 71 00 11 udiv %g4, %l1, %g4 4000245c: 88 59 00 11 smul %g4, %l1, %g4 40002460: 10 bf ff b6 b 40002338 40002464: c8 27 bf f4 st %g4, [ %fp + -12 ] close( fd); 40002468: 40 00 05 2d call 4000391c 4000246c: 01 00 00 00 nop if (block != NULL) { 40002470: d0 07 bf f0 ld [ %fp + -16 ], %o0 40002474: 80 a2 20 00 cmp %o0, 0 40002478: 12 bf ff e6 bne 40002410 <== ALWAYS TAKEN 4000247c: 01 00 00 00 nop 40002480: 30 bf ff e6 b,a 40002418 <== NOT EXECUTED esc = RTEMS_NOT_IMPLEMENTED; 40002484: 10 bf ff db b 400023f0 <== NOT EXECUTED 40002488: ba 10 20 18 mov 0x18, %i5 <== NOT EXECUTED if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) { 4000248c: 22 80 00 07 be,a 400024a8 <== NOT EXECUTED 40002490: a0 10 00 1c mov %i4, %l0 <== NOT EXECUTED 40002494: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40002498: 80 a0 60 3f cmp %g1, 0x3f <== NOT EXECUTED 4000249c: 32 bf ff d5 bne,a 400023f0 <== NOT EXECUTED 400024a0: ba 10 20 0a mov 0xa, %i5 <== NOT EXECUTED 400024a4: a0 10 00 1c mov %i4, %l0 <== NOT EXECUTED 400024a8: 88 5f 20 03 smul %i4, 3, %g4 <== NOT EXECUTED 400024ac: b6 06 a0 08 add %i2, 8, %i3 400024b0: 89 29 20 04 sll %g4, 4, %g4 400024b4: b0 06 c0 04 add %i3, %g4, %i0 uint8_t type = 0; 400024b8: c0 2f bf ef clrb [ %fp + -17 ] if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) { 400024bc: 90 10 00 1b mov %i3, %o0 400024c0: 7f ff fd ff call 40001cbc 400024c4: 92 07 bf ef add %fp, -17, %o1 400024c8: 80 a2 20 00 cmp %o0, 0 400024cc: 22 bf ff c9 be,a 400023f0 <== NEVER TAKEN 400024d0: ba 10 20 04 mov 4, %i5 <== NOT EXECUTED if (p->flags > 0xffU) { 400024d4: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 400024d8: 80 a0 60 00 cmp %g1, 0 400024dc: 32 bf ff c5 bne,a 400023f0 <== NEVER TAKEN 400024e0: ba 10 20 04 mov 4, %i5 <== NOT EXECUTED 400024e4: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1 400024e8: 80 a0 60 ff cmp %g1, 0xff 400024ec: 38 bf ff c1 bgu,a 400023f0 <== NEVER TAKEN 400024f0: ba 10 20 04 mov 4, %i5 <== NOT EXECUTED for (i = 0; i < count; ++i) { 400024f4: b6 06 e0 30 add %i3, 0x30, %i3 400024f8: 80 a6 c0 18 cmp %i3, %i0 400024fc: 32 bf ff f0 bne,a 400024bc 40002500: c0 2f bf ef clrb [ %fp + -17 ] sc = rtems_bdpart_new_record( dd, 0, &block); 40002504: d0 07 bf fc ld [ %fp + -4 ], %o0 40002508: 92 10 20 00 clr %o1 4000250c: 7f ff ff 48 call 4000222c 40002510: 94 07 bf f0 add %fp, -16, %o2 if (sc != RTEMS_SUCCESSFUL) { 40002514: 80 a2 20 00 cmp %o0, 0 40002518: 32 bf ff b6 bne,a 400023f0 <== NEVER TAKEN 4000251c: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID 40002520: c8 07 bf f0 ld [ %fp + -16 ], %g4 rtems_uint32_to_little_endian( 40002524: c2 06 60 04 ld [ %i1 + 4 ], %g1 block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID 40002528: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 { int i; for (i = 0; i < 4; ++i) { data [i] = (uint8_t) value; value >>= 8; 4000252c: 85 30 60 10 srl %g1, 0x10, %g2 data [i] = (uint8_t) value; 40002530: c2 28 e1 b8 stb %g1, [ %g3 + 0x1b8 ] value >>= 8; 40002534: b7 30 60 08 srl %g1, 8, %i3 data [i] = (uint8_t) value; 40002538: c4 28 e1 ba stb %g2, [ %g3 + 0x1ba ] value >>= 8; 4000253c: 83 30 60 18 srl %g1, 0x18, %g1 data [i] = (uint8_t) value; 40002540: f6 28 e1 b9 stb %i3, [ %g3 + 0x1b9 ] 40002544: 85 2c 20 04 sll %l0, 4, %g2 40002548: c2 28 e1 bb stb %g1, [ %g3 + 0x1bb ] data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0; 4000254c: 84 00 a1 be add %g2, 0x1be, %g2 40002550: da 01 20 1c ld [ %g4 + 0x1c ], %o5 40002554: 82 03 61 be add %o5, 0x1be, %g1 40002558: 88 10 00 1a mov %i2, %g4 4000255c: 9a 03 40 02 add %o5, %g2, %o5 rtems_bdpart_write_mbr_partition( 40002560: c6 01 00 00 ld [ %g4 ], %g3 40002564: c4 01 20 04 ld [ %g4 + 4 ], %g2 40002568: f2 09 20 08 ldub [ %g4 + 8 ], %i1 4000256c: f6 01 20 2c ld [ %g4 + 0x2c ], %i3 40002570: 84 20 80 03 sub %g2, %g3, %g2 40002574: c6 28 60 08 stb %g3, [ %g1 + 8 ] value >>= 8; 40002578: b1 30 e0 10 srl %g3, 0x10, %i0 4000257c: 9f 30 e0 08 srl %g3, 8, %o7 40002580: 87 30 e0 18 srl %g3, 0x18, %g3 data [i] = (uint8_t) value; 40002584: c4 28 60 0c stb %g2, [ %g1 + 0xc ] data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE; 40002588: 82 00 60 10 add %g1, 0x10, %g1 4000258c: f0 28 7f fa stb %i0, [ %g1 + -6 ] value >>= 8; 40002590: b1 30 a0 08 srl %g2, 8, %i0 data [i] = (uint8_t) value; 40002594: c6 28 7f fb stb %g3, [ %g1 + -5 ] value >>= 8; 40002598: 87 30 a0 10 srl %g2, 0x10, %g3 data [i] = (uint8_t) value; 4000259c: de 28 7f f9 stb %o7, [ %g1 + -7 ] value >>= 8; 400025a0: 85 30 a0 18 srl %g2, 0x18, %g2 data [i] = (uint8_t) value; 400025a4: f0 28 7f fd stb %i0, [ %g1 + -3 ] for (i = 0; i < ppc; ++i) { 400025a8: 88 01 20 30 add %g4, 0x30, %g4 400025ac: c6 28 7f fe stb %g3, [ %g1 + -2 ] 400025b0: c4 28 7f ff stb %g2, [ %g1 + -1 ] 400025b4: 80 a0 40 0d cmp %g1, %o5 data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 400025b8: f2 28 7f f4 stb %i1, [ %g1 + -12 ] for (i = 0; i < ppc; ++i) { 400025bc: 12 bf ff e9 bne 40002560 400025c0: f6 28 7f f0 stb %i3, [ %g1 + -16 ] if (ppc != count) { 400025c4: 80 a7 00 10 cmp %i4, %l0 400025c8: 22 bf ff 8a be,a 400023f0 <== NEVER TAKEN 400025cc: ba 10 20 00 clr %i5 <== NOT EXECUTED rtems_bdpart_write_mbr_partition( 400025d0: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space; 400025d4: 87 2c 20 01 sll %l0, 1, %g3 400025d8: 86 00 c0 10 add %g3, %l0, %g3 400025dc: 87 28 e0 04 sll %g3, 4, %g3 400025e0: f6 06 80 03 ld [ %i2 + %g3 ], %i3 rtems_bdpart_write_mbr_partition( 400025e4: 84 04 40 02 add %l1, %g2, %g2 400025e8: 84 20 80 1b sub %g2, %i3, %g2 rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space; 400025ec: 88 26 c0 11 sub %i3, %l1, %g4 value >>= 8; 400025f0: 9f 30 a0 08 srl %g2, 8, %o7 400025f4: b1 30 a0 10 srl %g2, 0x10, %i0 400025f8: b3 30 a0 18 srl %g2, 0x18, %i1 data [i] = (uint8_t) value; 400025fc: c4 28 60 0c stb %g2, [ %g1 + 0xc ] value >>= 8; 40002600: 97 31 20 08 srl %g4, 8, %o3 40002604: 99 31 20 10 srl %g4, 0x10, %o4 40002608: 9b 31 20 18 srl %g4, 0x18, %o5 data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 4000260c: 84 10 20 05 mov 5, %g2 data [i] = (uint8_t) value; 40002610: c8 28 60 08 stb %g4, [ %g1 + 8 ] rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space; 40002614: b8 06 80 03 add %i2, %g3, %i4 40002618: d6 28 60 09 stb %o3, [ %g1 + 9 ] 4000261c: d8 28 60 0a stb %o4, [ %g1 + 0xa ] 40002620: da 28 60 0b stb %o5, [ %g1 + 0xb ] 40002624: de 28 60 0d stb %o7, [ %g1 + 0xd ] 40002628: f0 28 60 0e stb %i0, [ %g1 + 0xe ] 4000262c: f2 28 60 0f stb %i1, [ %g1 + 0xf ] data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 40002630: c4 28 60 04 stb %g2, [ %g1 + 4 ] for (i = ppc; i < count; ++i) { 40002634: 08 80 00 40 bleu 40002734 <== NEVER TAKEN 40002638: c0 28 40 00 clrb [ %g1 ] ebr = p->begin - record_space; 4000263c: d2 06 80 03 ld [ %i2 + %g3 ], %o1 40002640: b0 10 00 1c mov %i4, %i0 40002644: b2 10 00 10 mov %l0, %i1 data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 40002648: b4 10 20 05 mov 5, %i2 sc = rtems_bdpart_new_record( dd, ebr, &block); 4000264c: d0 07 bf fc ld [ %fp + -4 ], %o0 40002650: 92 22 40 11 sub %o1, %l1, %o1 40002654: 7f ff fe f6 call 4000222c 40002658: 94 07 bf f0 add %fp, -16, %o2 if (sc != RTEMS_SUCCESSFUL) { 4000265c: 80 a2 20 00 cmp %o0, 0 40002660: 12 80 00 37 bne 4000273c <== NEVER TAKEN 40002664: 80 a6 40 1d cmp %i1, %i5 block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0, 40002668: c8 07 bf f0 ld [ %fp + -16 ], %g4 rtems_bdpart_write_mbr_partition( 4000266c: c6 07 00 00 ld [ %i4 ], %g3 40002670: c4 07 20 04 ld [ %i4 + 4 ], %g2 40002674: da 0f 20 08 ldub [ %i4 + 8 ], %o5 40002678: de 07 20 2c ld [ %i4 + 0x2c ], %o7 block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0, 4000267c: c2 01 20 1c ld [ %g4 + 0x1c ], %g1 rtems_bdpart_write_mbr_partition( 40002680: 84 20 80 03 sub %g2, %g3, %g2 40002684: e2 28 61 c6 stb %l1, [ %g1 + 0x1c6 ] value >>= 8; 40002688: 95 30 a0 08 srl %g2, 8, %o2 4000268c: 97 30 a0 10 srl %g2, 0x10, %o3 40002690: 99 30 a0 18 srl %g2, 0x18, %o4 data [i] = (uint8_t) value; 40002694: c0 28 61 c7 clrb [ %g1 + 0x1c7 ] for (i = ppc; i < count; ++i) { 40002698: 86 06 60 01 add %i1, 1, %g3 4000269c: c0 28 61 c8 clrb [ %g1 + 0x1c8 ] 400026a0: c0 28 61 c9 clrb [ %g1 + 0x1c9 ] 400026a4: b8 07 20 30 add %i4, 0x30, %i4 400026a8: c4 28 61 ca stb %g2, [ %g1 + 0x1ca ] data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0; 400026ac: b2 10 00 03 mov %g3, %i1 400026b0: d4 28 61 cb stb %o2, [ %g1 + 0x1cb ] 400026b4: d6 28 61 cc stb %o3, [ %g1 + 0x1cc ] 400026b8: d8 28 61 cd stb %o4, [ %g1 + 0x1cd ] data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 400026bc: da 28 61 c2 stb %o5, [ %g1 + 0x1c2 ] for (i = ppc; i < count; ++i) { 400026c0: 02 80 00 1d be 40002734 400026c4: de 28 61 be stb %o7, [ %g1 + 0x1be ] rtems_blkdev_bnum begin = p->begin - record_space; 400026c8: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 rtems_bdpart_write_mbr_partition( 400026cc: 84 22 40 1b sub %o1, %i3, %g2 if (i > ppc) { 400026d0: 80 a0 c0 10 cmp %g3, %l0 value >>= 8; 400026d4: 99 30 a0 08 srl %g2, 8, %o4 400026d8: 9b 30 a0 10 srl %g2, 0x10, %o5 400026dc: 08 80 00 14 bleu 4000272c <== NEVER TAKEN 400026e0: 9f 30 a0 18 srl %g2, 0x18, %o7 block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1, 400026e4: c2 01 20 1c ld [ %g4 + 0x1c ], %g1 data [i] = (uint8_t) value; 400026e8: c4 28 61 d6 stb %g2, [ %g1 + 0x1d6 ] rtems_bdpart_write_mbr_partition( 400026ec: c4 07 bf f4 ld [ %fp + -12 ], %g2 400026f0: d8 28 61 d7 stb %o4, [ %g1 + 0x1d7 ] 400026f4: 84 04 40 02 add %l1, %g2, %g2 400026f8: da 28 61 d8 stb %o5, [ %g1 + 0x1d8 ] 400026fc: 84 20 80 09 sub %g2, %o1, %g2 40002700: de 28 61 d9 stb %o7, [ %g1 + 0x1d9 ] value >>= 8; 40002704: 89 30 a0 08 srl %g2, 8, %g4 data [i] = (uint8_t) value; 40002708: c4 28 61 da stb %g2, [ %g1 + 0x1da ] value >>= 8; 4000270c: 87 30 a0 10 srl %g2, 0x10, %g3 data [i] = (uint8_t) value; 40002710: c8 28 61 db stb %g4, [ %g1 + 0x1db ] value >>= 8; 40002714: 85 30 a0 18 srl %g2, 0x18, %g2 data [i] = (uint8_t) value; 40002718: c6 28 61 dc stb %g3, [ %g1 + 0x1dc ] 4000271c: c4 28 61 dd stb %g2, [ %g1 + 0x1dd ] data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type; 40002720: f4 28 61 d2 stb %i2, [ %g1 + 0x1d2 ] data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags; 40002724: c0 28 61 ce clrb [ %g1 + 0x1ce ] ebr = p->begin - record_space; 40002728: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000272c: 10 bf ff c8 b 4000264c 40002730: b0 06 20 30 add %i0, 0x30, %i0 rtems_status_code esc = RTEMS_SUCCESSFUL; 40002734: 10 bf ff 2f b 400023f0 40002738: ba 10 20 00 clr %i5 4000273c: 10 bf ff 2d b 400023f0 <== NOT EXECUTED 40002740: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) { 40002744: 80 a0 60 3f cmp %g1, 0x3f 40002748: 22 bf ff 1b be,a 400023b4 <== ALWAYS TAKEN 4000274c: 89 2f 20 01 sll %i4, 1, %g4 esc = RTEMS_INVALID_NUMBER; 40002750: 10 bf ff 28 b 400023f0 <== NOT EXECUTED 40002754: ba 10 20 0a mov 0xa, %i5 <== NOT EXECUTED =============================================================================== 40002b64 : const char *partition, const char *parent_block_device, rtems_blkdev_bnum media_block_begin, rtems_blkdev_bnum media_block_count ) { 40002b64: 9d e3 bf 30 save %sp, -208, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; int fd = open(parent_block_device, O_RDWR); 40002b68: 92 10 20 02 mov 2, %o1 40002b6c: 90 10 00 19 mov %i1, %o0 40002b70: 40 00 06 f8 call 40004750 40002b74: b8 10 20 04 mov 4, %i4 if (fd >= 0) { 40002b78: 80 a2 20 00 cmp %o0, 0 40002b7c: 06 80 00 0f bl 40002bb8 40002b80: ba 10 00 08 mov %o0, %i5 int rv; struct stat st; rv = fstat(fd, &st); 40002b84: 40 00 04 02 call 40003b8c 40002b88: 92 07 bf 98 add %fp, -104, %o1 if (rv == 0 && S_ISBLK(st.st_mode)) { 40002b8c: 80 a2 20 00 cmp %o0, 0 40002b90: 12 80 00 0c bne 40002bc0 <== NEVER TAKEN 40002b94: 03 00 00 3c sethi %hi(0xf000), %g1 40002b98: f2 07 bf a8 ld [ %fp + -88 ], %i1 40002b9c: b2 0e 40 01 and %i1, %g1, %i1 40002ba0: 03 00 00 18 sethi %hi(0x6000), %g1 40002ba4: 80 a6 40 01 cmp %i1, %g1 40002ba8: 02 80 00 08 be 40002bc8 40002bac: b8 10 20 15 mov 0x15, %i4 } else { sc = RTEMS_INVALID_NODE; } if (sc != RTEMS_SUCCESSFUL) { close(fd); 40002bb0: 40 00 03 5b call 4000391c 40002bb4: 90 10 00 1d mov %i5, %o0 } else { sc = RTEMS_INVALID_ID; } return sc; } 40002bb8: 81 c7 e0 08 ret 40002bbc: 91 e8 00 1c restore %g0, %i4, %o0 sc = RTEMS_INVALID_NODE; 40002bc0: 10 bf ff fc b 40002bb0 <== NOT EXECUTED 40002bc4: b8 10 20 15 mov 0x15, %i4 <== NOT EXECUTED 40002bc8: 94 07 bf 94 add %fp, -108, %o2 40002bcc: 90 10 00 1d mov %i5, %o0 40002bd0: 13 10 01 10 sethi %hi(0x40044000), %o1 sc = RTEMS_NOT_IMPLEMENTED; 40002bd4: b8 10 20 18 mov 0x18, %i4 40002bd8: 40 00 04 38 call 40003cb8 40002bdc: 92 12 62 09 or %o1, 0x209, %o1 if (rv == 0) { 40002be0: 80 a2 20 00 cmp %o0, 0 40002be4: 12 bf ff f3 bne 40002bb0 40002be8: 90 10 20 80 mov 0x80, %o0 rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx)); 40002bec: 40 00 04 fd call 40003fe0 40002bf0: b8 10 20 1a mov 0x1a, %i4 if (ctx != NULL) { 40002bf4: a0 92 20 00 orcc %o0, 0, %l0 40002bf8: 02 bf ff ee be 40002bb0 40002bfc: d2 07 bf 94 ld [ %fp + -108 ], %o1 sc = rtems_disk_init_log( 40002c00: 96 10 00 1b mov %i3, %o3 40002c04: 40 00 00 2e call 40002cbc 40002c08: 94 10 00 1a mov %i2, %o2 if (sc == RTEMS_SUCCESSFUL) { 40002c0c: b8 92 20 00 orcc %o0, 0, %i4 40002c10: 12 80 00 0e bne 40002c48 40002c14: 96 10 00 10 mov %l0, %o3 ctx->fd = fd; 40002c18: fa 24 20 78 st %i5, [ %l0 + 0x78 ] rv = IMFS_make_generic_node( 40002c1c: 92 16 61 ff or %i1, 0x1ff, %o1 40002c20: 15 10 00 7d sethi %hi(0x4001f400), %o2 40002c24: 90 10 00 18 mov %i0, %o0 40002c28: 40 00 0f 0a call 40006850 40002c2c: 94 12 a3 ec or %o2, 0x3ec, %o2 if (rv != 0) { 40002c30: 80 a2 20 00 cmp %o0, 0 40002c34: 02 bf ff e1 be 40002bb8 40002c38: 90 10 00 10 mov %l0, %o0 free(ctx); 40002c3c: 40 00 03 9a call 40003aa4 40002c40: b8 10 20 0d mov 0xd, %i4 if (sc != RTEMS_SUCCESSFUL) { 40002c44: 30 bf ff db b,a 40002bb0 free(ctx); 40002c48: 40 00 03 97 call 40003aa4 40002c4c: 90 10 00 10 mov %l0, %o0 if (sc != RTEMS_SUCCESSFUL) { 40002c50: 30 bf ff d8 b,a 40002bb0 =============================================================================== 40001d1c : rtems_device_driver rtems_blkdev_generic_ioctl( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 40001d1c: 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; if (args->command != RTEMS_BLKIO_REQUEST) 40001d20: d2 06 a0 04 ld [ %i2 + 4 ], %o1 40001d24: 03 30 06 10 sethi %hi(0xc0184000), %g1 40001d28: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 40001d2c: 80 a2 40 01 cmp %o1, %g1 40001d30: 02 80 00 0a be 40001d58 <== NEVER TAKEN 40001d34: 82 10 3f ff mov -1, %g1 rtems_disk_device *dd = iop->data1; 40001d38: c2 06 80 00 ld [ %i2 ], %g1 40001d3c: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 { args->ioctl_return = dd->ioctl(dd, 40001d40: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40001d44: 9f c0 40 00 call %g1 40001d48: d4 06 a0 08 ld [ %i2 + 8 ], %o2 40001d4c: d0 26 a0 0c st %o0, [ %i2 + 0xc ] */ args->ioctl_return = -1; } return RTEMS_SUCCESSFUL; } 40001d50: 81 c7 e0 08 ret 40001d54: 91 e8 20 00 restore %g0, 0, %o0 args->ioctl_return = -1; 40001d58: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED } 40001d5c: 81 c7 e0 08 ret <== NOT EXECUTED 40001d60: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40001ad4 : rtems_device_driver rtems_blkdev_generic_read( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 40001ad4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 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; 40001ad8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40001adc: e4 00 60 2c ld [ %g1 + 0x2c ], %l2 <== NOT EXECUTED uint32_t block_size = dd->block_size; char *buf = args->buffer; uint32_t count = args->count; rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001ae0: f8 1e a0 08 ldd [ %i2 + 8 ], %i4 <== NOT EXECUTED uint32_t block_size = dd->block_size; 40001ae4: e2 04 a0 24 ld [ %l2 + 0x24 ], %l1 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001ae8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001aec: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40001af0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40001af4: 40 00 3f 2d call 400117a8 <__divdi3> <== NOT EXECUTED 40001af8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001afc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40001b00: 94 10 20 00 clr %o2 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001b04: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001b08: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40001b0c: 40 00 3f b2 call 400119d4 <__moddi3> <== NOT EXECUTED 40001b10: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED args->bytes_moved = 0; 40001b14: c0 26 a0 1c clr [ %i2 + 0x1c ] <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001b18: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED uint32_t count = args->count; 40001b1c: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3 <== NOT EXECUTED while (count > 0) 40001b20: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40001b24: 12 80 00 18 bne 40001b84 <== NOT EXECUTED 40001b28: e0 06 a0 10 ld [ %i2 + 0x10 ], %l0 <== NOT EXECUTED if (copy > count) copy = count; memcpy(buf, (char *)diskbuf->buffer + blkofs, copy); rc = rtems_bdbuf_release(diskbuf); args->bytes_moved += copy; if (rc != RTEMS_SUCCESSFUL) 40001b2c: 81 c7 e0 08 ret <== NOT EXECUTED 40001b30: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED copy = block_size - blkofs; 40001b34: ba 24 40 1c sub %l1, %i4, %i5 <== NOT EXECUTED if (copy > count) 40001b38: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED 40001b3c: 38 80 00 02 bgu,a 40001b44 <== NOT EXECUTED 40001b40: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED memcpy(buf, (char *)diskbuf->buffer + blkofs, copy); 40001b44: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40001b48: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 40001b4c: 92 02 40 1c add %o1, %i4, %o1 <== NOT EXECUTED 40001b50: 40 00 44 87 call 40012d6c <== NOT EXECUTED 40001b54: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED rc = rtems_bdbuf_release(diskbuf); 40001b58: 40 00 2a d7 call 4000c6b4 <== NOT EXECUTED 40001b5c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED args->bytes_moved += copy; 40001b60: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 <== NOT EXECUTED 40001b64: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001b68: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 40001b6c: 12 80 00 12 bne 40001bb4 <== NOT EXECUTED 40001b70: c2 26 a0 1c st %g1, [ %i2 + 0x1c ] <== NOT EXECUTED break; count -= copy; buf += copy; 40001b74: a0 04 00 1d add %l0, %i5, %l0 <== NOT EXECUTED while (count > 0) 40001b78: b6 a6 c0 1d subcc %i3, %i5, %i3 <== NOT EXECUTED 40001b7c: 02 80 00 0c be 40001bac <== NOT EXECUTED 40001b80: b2 06 60 01 inc %i1 <== NOT EXECUTED rc = rtems_bdbuf_read(dd, block, &diskbuf); 40001b84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40001b88: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40001b8c: 40 00 2a 42 call 4000c494 <== NOT EXECUTED 40001b90: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40001b94: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001b98: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40001b9c: 02 bf ff e6 be 40001b34 <== NOT EXECUTED 40001ba0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED blkofs = 0; block++; } return rc; } 40001ba4: 81 c7 e0 08 ret <== NOT EXECUTED 40001ba8: 81 e8 00 00 restore <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001bac: 81 c7 e0 08 ret <== NOT EXECUTED 40001bb0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40001bb4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED } 40001bb8: 81 c7 e0 08 ret <== NOT EXECUTED 40001bbc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40001bc0 : rtems_device_driver rtems_blkdev_generic_write( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 40001bc0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 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; 40001bc4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40001bc8: e0 00 60 2c ld [ %g1 + 0x2c ], %l0 <== NOT EXECUTED uint32_t block_size = dd->block_size; char *buf = args->buffer; uint32_t count = args->count; rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001bcc: f8 1e a0 08 ldd [ %i2 + 8 ], %i4 <== NOT EXECUTED uint32_t block_size = dd->block_size; 40001bd0: f0 04 20 24 ld [ %l0 + 0x24 ], %i0 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001bd4: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001bd8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 40001bdc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40001be0: 40 00 3e f2 call 400117a8 <__divdi3> <== NOT EXECUTED 40001be4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001be8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40001bec: 94 10 20 00 clr %o2 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 40001bf0: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001bf4: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 40001bf8: 40 00 3f 77 call 400119d4 <__moddi3> <== NOT EXECUTED 40001bfc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED args->bytes_moved = 0; 40001c00: c0 26 a0 1c clr [ %i2 + 0x1c ] <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 40001c04: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED uint32_t count = args->count; 40001c08: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3 <== NOT EXECUTED while (count > 0) 40001c0c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40001c10: 12 80 00 1e bne 40001c88 <== NOT EXECUTED 40001c14: e2 06 a0 10 ld [ %i2 + 0x10 ], %l1 <== NOT EXECUTED copy = count; memcpy((char *)diskbuf->buffer + blkofs, buf, copy); args->bytes_moved += copy; rc = rtems_bdbuf_release_modified(diskbuf); if (rc != RTEMS_SUCCESSFUL) 40001c18: 10 80 00 2b b 40001cc4 <== NOT EXECUTED 40001c1c: 90 10 20 00 clr %o0 <== NOT EXECUTED rc = rtems_bdbuf_get(dd, block, &diskbuf); 40001c20: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40001c24: 40 00 29 dc call 4000c394 <== NOT EXECUTED 40001c28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001c2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001c30: 12 80 00 22 bne 40001cb8 <== NOT EXECUTED 40001c34: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED copy = block_size - blkofs; 40001c38: ba 26 00 1c sub %i0, %i4, %i5 <== NOT EXECUTED if (copy > count) 40001c3c: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED 40001c40: 38 80 00 02 bgu,a 40001c48 <== NOT EXECUTED 40001c44: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED memcpy((char *)diskbuf->buffer + blkofs, buf, copy); 40001c48: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40001c4c: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 40001c50: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED 40001c54: 40 00 44 46 call 40012d6c <== NOT EXECUTED 40001c58: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED args->bytes_moved += copy; 40001c5c: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 <== NOT EXECUTED 40001c60: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED 40001c64: c2 26 a0 1c st %g1, [ %i2 + 0x1c ] <== NOT EXECUTED break; count -= copy; buf += copy; 40001c68: a2 04 40 1d add %l1, %i5, %l1 <== NOT EXECUTED rc = rtems_bdbuf_release_modified(diskbuf); 40001c6c: 40 00 2a d9 call 4000c7d0 <== NOT EXECUTED 40001c70: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001c74: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 40001c78: 12 80 00 15 bne 40001ccc <== NOT EXECUTED 40001c7c: b6 a6 c0 1d subcc %i3, %i5, %i3 <== NOT EXECUTED while (count > 0) 40001c80: 02 80 00 10 be 40001cc0 <== NOT EXECUTED 40001c84: b2 06 60 01 inc %i1 <== NOT EXECUTED if ((blkofs == 0) && (count >= block_size)) 40001c88: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40001c8c: 12 80 00 04 bne 40001c9c <== NOT EXECUTED 40001c90: 80 a6 c0 18 cmp %i3, %i0 <== NOT EXECUTED 40001c94: 3a bf ff e3 bcc,a 40001c20 <== NOT EXECUTED 40001c98: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rc = rtems_bdbuf_read(dd, block, &diskbuf); 40001c9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40001ca0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40001ca4: 40 00 29 fc call 4000c494 <== NOT EXECUTED 40001ca8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001cac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001cb0: 02 bf ff e2 be 40001c38 <== NOT EXECUTED 40001cb4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED blkofs = 0; block++; } return rc; } 40001cb8: 81 c7 e0 08 ret <== NOT EXECUTED 40001cbc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001cc0: 90 10 20 00 clr %o0 <== NOT EXECUTED } 40001cc4: 81 c7 e0 08 ret <== NOT EXECUTED 40001cc8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 40001ccc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED } 40001cd0: 81 c7 e0 08 ret <== NOT EXECUTED 40001cd4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 4000f694 : #include #include int rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) { 4000f694: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; int rc = 0; switch (req) 4000f698: 03 10 01 10 sethi %hi(0x40044000), %g1 4000f69c: 84 10 62 0b or %g1, 0x20b, %g2 ! 4004420b <__end+0x1e7db> 4000f6a0: 80 a6 40 02 cmp %i1, %g2 4000f6a4: 18 80 00 0f bgu 4000f6e0 4000f6a8: 82 10 62 01 or %g1, 0x201, %g1 4000f6ac: 80 a6 40 01 cmp %i1, %g1 4000f6b0: 08 80 00 19 bleu 4000f714 4000f6b4: 03 2f fe ef sethi %hi(0xbffbbc00), %g1 4000f6b8: 82 10 61 fe or %g1, 0x1fe, %g1 ! bffbbdfe 4000f6bc: b2 06 40 01 add %i1, %g1, %i1 4000f6c0: 80 a6 60 09 cmp %i1, 9 4000f6c4: 18 80 00 2f bgu 4000f780 <== NEVER TAKEN 4000f6c8: b3 2e 60 02 sll %i1, 2, %i1 4000f6cc: 03 10 00 3d sethi %hi(0x4000f400), %g1 4000f6d0: 82 10 62 6c or %g1, 0x26c, %g1 ! 4000f66c 4000f6d4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000f6d8: 81 c0 40 00 jmp %g1 4000f6dc: 01 00 00 00 nop 4000f6e0: 03 20 01 10 sethi %hi(0x80044000), %g1 4000f6e4: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 4000f6e8: 80 a6 40 01 cmp %i1, %g1 4000f6ec: 12 80 00 25 bne 4000f780 <== NEVER TAKEN 4000f6f0: 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); 4000f6f4: d2 06 80 00 ld [ %i2 ], %o1 4000f6f8: 7f ff ff 74 call 4000f4c8 4000f6fc: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 4000f700: 80 a2 20 00 cmp %o0, 0 4000f704: 12 80 00 19 bne 4000f768 <== NEVER TAKEN 4000f708: 01 00 00 00 nop } break; case RTEMS_BLKIO_GETSIZE: *(rtems_blkdev_bnum *) argp = dd->size; break; 4000f70c: 81 c7 e0 08 ret 4000f710: 91 e8 20 00 restore %g0, 0, %o0 switch (req) 4000f714: 03 08 00 10 sethi %hi(0x20004000), %g1 4000f718: 84 10 62 0a or %g1, 0x20a, %g2 ! 2000420a 4000f71c: 80 a6 40 02 cmp %i1, %g2 4000f720: 02 80 00 33 be 4000f7ec 4000f724: 84 10 62 0c or %g1, 0x20c, %g2 4000f728: 80 a6 40 02 cmp %i1, %g2 4000f72c: 12 80 00 06 bne 4000f744 4000f730: 90 10 00 18 mov %i0, %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); 4000f734: 7f ff ff c3 call 4000f640 4000f738: b0 10 20 00 clr %i0 break; 4000f73c: 81 c7 e0 08 ret 4000f740: 81 e8 00 00 restore switch (req) 4000f744: 82 10 62 06 or %g1, 0x206, %g1 4000f748: 80 a6 40 01 cmp %i1, %g1 4000f74c: 12 80 00 0d bne 4000f780 4000f750: 01 00 00 00 nop sc = rtems_bdbuf_syncdev(dd); 4000f754: 7f ff ff 2b call 4000f400 4000f758: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 4000f75c: 80 a2 20 00 cmp %o0, 0 4000f760: 02 bf ff eb be 4000f70c <== ALWAYS TAKEN 4000f764: 01 00 00 00 nop errno = EIO; 4000f768: 40 00 16 6a call 40015110 <__errno> <== NOT EXECUTED 4000f76c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000f770: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4000f774: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 4000f778: 81 c7 e0 08 ret <== NOT EXECUTED 4000f77c: 81 e8 00 00 restore <== NOT EXECUTED default: errno = EINVAL; 4000f780: 40 00 16 64 call 40015110 <__errno> 4000f784: b0 10 3f ff mov -1, %i0 4000f788: 82 10 20 16 mov 0x16, %g1 4000f78c: c2 22 00 00 st %g1, [ %o0 ] rc = -1; break; } return rc; } 4000f790: 81 c7 e0 08 ret 4000f794: 81 e8 00 00 restore *(uint32_t *) argp = dd->media_block_size; 4000f798: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f79c: c2 26 80 00 st %g1, [ %i2 ] break; 4000f7a0: 81 c7 e0 08 ret 4000f7a4: 91 e8 20 00 restore %g0, 0, %o0 *(uint32_t *) argp = dd->block_size; 4000f7a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f7ac: c2 26 80 00 st %g1, [ %i2 ] break; 4000f7b0: 81 c7 e0 08 ret 4000f7b4: 91 e8 20 00 restore %g0, 0, %o0 *(rtems_blkdev_bnum *) argp = dd->size; 4000f7b8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000f7bc: c2 26 80 00 st %g1, [ %i2 ] break; 4000f7c0: 81 c7 e0 08 ret 4000f7c4: 91 e8 20 00 restore %g0, 0, %o0 *(rtems_disk_device **) argp = dd; 4000f7c8: f0 26 80 00 st %i0, [ %i2 ] break; 4000f7cc: 81 c7 e0 08 ret 4000f7d0: 91 e8 20 00 restore %g0, 0, %o0 rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp); 4000f7d4: 90 10 00 18 mov %i0, %o0 4000f7d8: 92 10 00 1a mov %i2, %o1 4000f7dc: 7f ff ff 8e call 4000f614 4000f7e0: b0 10 20 00 clr %i0 break; 4000f7e4: 81 c7 e0 08 ret 4000f7e8: 81 e8 00 00 restore rtems_bdbuf_purge_dev(dd); 4000f7ec: 90 10 00 18 mov %i0, %o0 4000f7f0: 7f ff ff 2c call 4000f4a0 4000f7f4: b0 10 20 00 clr %i0 break; 4000f7f8: 81 c7 e0 08 ret 4000f7fc: 81 e8 00 00 restore =============================================================================== 40002278 : { 40002278: 9d e3 bf 98 save %sp, -104, %sp _Mutex_Acquire( mutex ); 4000227c: 21 10 00 59 sethi %hi(0x40016400), %l0 rtems_disk_device *dd = NULL; 40002280: c0 27 bf f8 clr [ %fp + -8 ] 40002284: 90 14 23 fc or %l0, 0x3fc, %o0 40002288: 40 00 13 f2 call 40007250 <_Mutex_Acquire> 4000228c: c0 27 bf fc clr [ %fp + -4 ] phys_dd = get_disk_entry(phys, true); 40002290: 90 10 00 1a mov %i2, %o0 diskdevs_protected = true; 40002294: 23 10 00 61 sethi %hi(0x40018400), %l1 40002298: a4 10 20 01 mov 1, %l2 phys_dd = get_disk_entry(phys, true); 4000229c: 94 10 20 01 mov 1, %o2 diskdevs_protected = true; 400022a0: e4 2c 62 7c stb %l2, [ %l1 + 0x27c ] phys_dd = get_disk_entry(phys, true); 400022a4: 7f ff fe b0 call 40001d64 400022a8: 92 10 00 1b mov %i3, %o1 if (phys_dd == NULL) { 400022ac: b4 92 20 00 orcc %o0, 0, %i2 400022b0: 02 80 00 2a be 40002358 400022b4: d4 07 a0 5c ld [ %fp + 0x5c ], %o2 sc = create_disk(dev, name, &dd, &alloc_name); 400022b8: 98 07 bf fc add %fp, -4, %o4 400022bc: 96 07 bf f8 add %fp, -8, %o3 400022c0: 90 10 00 18 mov %i0, %o0 400022c4: 7f ff fe cf call 40001e00 400022c8: 92 10 00 19 mov %i1, %o1 if (sc != RTEMS_SUCCESSFUL) { 400022cc: b6 92 20 00 orcc %o0, 0, %i3 400022d0: 12 80 00 0f bne 4000230c 400022d4: d0 07 bf f8 ld [ %fp + -8 ], %o0 sc = rtems_disk_init_log( 400022d8: 96 10 00 1d mov %i5, %o3 400022dc: 94 10 00 1c mov %i4, %o2 400022e0: 40 00 00 e6 call 40002678 400022e4: 92 10 00 1a mov %i2, %o1 dd->name = alloc_name; 400022e8: c4 1f bf f8 ldd [ %fp + -8 ], %g2 ++phys_dd->uses; 400022ec: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 dd->dev = dev; 400022f0: f0 38 80 00 std %i0, [ %g2 ] ++phys_dd->uses; 400022f4: 82 00 60 01 inc %g1 dd->name = alloc_name; 400022f8: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] sc = rtems_disk_init_log( 400022fc: b6 10 00 08 mov %o0, %i3 if (sc != RTEMS_SUCCESSFUL) { 40002300: 80 a2 20 00 cmp %o0, 0 40002304: 12 80 00 08 bne 40002324 40002308: c2 26 a0 14 st %g1, [ %i2 + 0x14 ] diskdevs_protected = false; 4000230c: c0 2c 62 7c clrb [ %l1 + 0x27c ] _Mutex_Release( mutex ); 40002310: 90 14 23 fc or %l0, 0x3fc, %o0 40002314: 40 00 13 ea call 400072bc <_Mutex_Release> 40002318: b0 10 00 1b mov %i3, %i0 } 4000231c: 81 c7 e0 08 ret 40002320: 81 e8 00 00 restore dd->ioctl = null_handler; 40002324: 03 10 00 07 sethi %hi(0x40001c00), %g1 40002328: 82 10 61 f8 or %g1, 0x1f8, %g1 ! 40001df8 4000232c: c2 20 a0 38 st %g1, [ %g2 + 0x38 ] dd = get_disk_entry(dev, true); 40002330: 94 10 20 01 mov 1, %o2 40002334: 90 10 00 18 mov %i0, %o0 40002338: 7f ff fe 8b call 40001d64 4000233c: 92 10 00 19 mov %i1, %o1 if (dd == NULL) { 40002340: 82 92 20 00 orcc %o0, 0, %g1 40002344: 02 bf ff f2 be 4000230c <== NEVER TAKEN 40002348: 01 00 00 00 nop rtems_disk_cleanup(dd); 4000234c: 7f ff ff 32 call 40002014 40002350: e4 28 60 40 stb %l2, [ %g1 + 0x40 ] return RTEMS_SUCCESSFUL; 40002354: 30 bf ff ee b,a 4000230c diskdevs_protected = false; 40002358: c0 2c 62 7c clrb [ %l1 + 0x27c ] 4000235c: 90 14 23 fc or %l0, 0x3fc, %o0 40002360: 40 00 13 d7 call 400072bc <_Mutex_Release> 40002364: b6 10 20 04 mov 4, %i3 } 40002368: 81 c7 e0 08 ret 4000236c: 91 e8 00 1b restore %g0, %i3, %o0 =============================================================================== 40002194 : { 40002194: 9d e3 bf 98 save %sp, -104, %sp rtems_disk_device *dd = NULL; 40002198: c0 27 bf f8 clr [ %fp + -8 ] { 4000219c: a0 10 00 18 mov %i0, %l0 char *alloc_name = NULL; 400021a0: c0 27 bf fc clr [ %fp + -4 ] if (handler == NULL) { 400021a4: 80 a7 20 00 cmp %i4, 0 400021a8: 02 80 00 31 be 4000226c 400021ac: a2 10 00 19 mov %i1, %l1 mutex->_Queue._name = name; } static __inline void rtems_mutex_lock( rtems_mutex *mutex ) { _Mutex_Acquire( mutex ); 400021b0: 31 10 00 59 sethi %hi(0x40016400), %i0 400021b4: 40 00 14 27 call 40007250 <_Mutex_Acquire> 400021b8: 90 16 23 fc or %i0, 0x3fc, %o0 ! 400167fc sc = create_disk(dev, name, &dd, &alloc_name); 400021bc: d4 07 a0 5c ld [ %fp + 0x5c ], %o2 400021c0: 92 10 00 19 mov %i1, %o1 diskdevs_protected = true; 400021c4: 25 10 00 61 sethi %hi(0x40018400), %l2 400021c8: a6 10 20 01 mov 1, %l3 sc = create_disk(dev, name, &dd, &alloc_name); 400021cc: 98 07 bf fc add %fp, -4, %o4 diskdevs_protected = true; 400021d0: e6 2c a2 7c stb %l3, [ %l2 + 0x27c ] sc = create_disk(dev, name, &dd, &alloc_name); 400021d4: 96 07 bf f8 add %fp, -8, %o3 400021d8: 7f ff ff 0a call 40001e00 400021dc: 90 10 00 10 mov %l0, %o0 if (sc != RTEMS_SUCCESSFUL) { 400021e0: b2 92 20 00 orcc %o0, 0, %i1 400021e4: 12 80 00 0e bne 4000221c 400021e8: d0 07 bf f8 ld [ %fp + -8 ], %o0 sc = rtems_disk_init_phys( 400021ec: 98 10 00 1d mov %i5, %o4 400021f0: 96 10 00 1c mov %i4, %o3 400021f4: 94 10 00 1b mov %i3, %o2 400021f8: 40 00 01 06 call 40002610 400021fc: 92 10 00 1a mov %i2, %o1 dd->dev = dev; 40002200: c2 07 bf f8 ld [ %fp + -8 ], %g1 dd->name = alloc_name; 40002204: c4 07 bf fc ld [ %fp + -4 ], %g2 40002208: c4 20 60 10 st %g2, [ %g1 + 0x10 ] sc = rtems_disk_init_phys( 4000220c: b2 10 00 08 mov %o0, %i1 if (sc != RTEMS_SUCCESSFUL) { 40002210: 80 a2 20 00 cmp %o0, 0 40002214: 12 80 00 08 bne 40002234 40002218: e0 38 40 00 std %l0, [ %g1 ] } static __inline void rtems_mutex_unlock( rtems_mutex *mutex ) { _Mutex_Release( mutex ); 4000221c: 90 16 23 fc or %i0, 0x3fc, %o0 diskdevs_protected = false; 40002220: c0 2c a2 7c clrb [ %l2 + 0x27c ] 40002224: 40 00 14 26 call 400072bc <_Mutex_Release> 40002228: b0 10 00 19 mov %i1, %i0 } 4000222c: 81 c7 e0 08 ret 40002230: 81 e8 00 00 restore dd->ioctl = null_handler; 40002234: 05 10 00 07 sethi %hi(0x40001c00), %g2 40002238: 84 10 a1 f8 or %g2, 0x1f8, %g2 ! 40001df8 4000223c: c4 20 60 38 st %g2, [ %g1 + 0x38 ] static rtems_status_code disk_delete_locked(dev_t dev) { rtems_disk_device *dd = NULL; dd = get_disk_entry(dev, true); 40002240: 94 10 20 01 mov 1, %o2 40002244: 90 10 00 10 mov %l0, %o0 40002248: 7f ff fe c7 call 40001d64 4000224c: 92 10 00 11 mov %l1, %o1 if (dd == NULL) { 40002250: 82 92 20 00 orcc %o0, 0, %g1 40002254: 22 bf ff f3 be,a 40002220 <== NEVER TAKEN 40002258: 90 16 23 fc or %i0, 0x3fc, %o0 <== NOT EXECUTED return RTEMS_INVALID_ID; } dd->deleted = true; rtems_disk_cleanup(dd); 4000225c: 7f ff ff 6e call 40002014 40002260: e6 28 60 40 stb %l3, [ %g1 + 0x40 ] return RTEMS_SUCCESSFUL; 40002264: 10 bf ff ef b 40002220 40002268: 90 16 23 fc or %i0, 0x3fc, %o0 return RTEMS_INVALID_ADDRESS; 4000226c: b2 10 20 09 mov 9, %i1 } 40002270: 81 c7 e0 08 ret 40002274: 91 e8 00 19 restore %g0, %i1, %o0 =============================================================================== 40002370 : } rtems_status_code rtems_disk_delete(dev_t dev) { 40002370: 9d e3 bf a0 save %sp, -96, %sp _Mutex_Acquire( mutex ); 40002374: 3b 10 00 59 sethi %hi(0x40016400), %i5 40002378: 40 00 13 b6 call 40007250 <_Mutex_Acquire> 4000237c: 90 17 63 fc or %i5, 0x3fc, %o0 ! 400167fc diskdevs_protected = true; 40002380: 39 10 00 61 sethi %hi(0x40018400), %i4 40002384: b6 10 20 01 mov 1, %i3 dd = get_disk_entry(dev, true); 40002388: 94 10 20 01 mov 1, %o2 diskdevs_protected = true; 4000238c: f6 2f 22 7c stb %i3, [ %i4 + 0x27c ] dd = get_disk_entry(dev, true); 40002390: 90 10 00 18 mov %i0, %o0 40002394: 7f ff fe 74 call 40001d64 40002398: 92 10 00 19 mov %i1, %o1 if (dd == NULL) { 4000239c: 82 92 20 00 orcc %o0, 0, %g1 400023a0: 22 80 00 0b be,a 400023cc <== NEVER TAKEN 400023a4: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED dd->deleted = true; 400023a8: f6 28 60 40 stb %i3, [ %g1 + 0x40 ] rtems_disk_cleanup(dd); 400023ac: 7f ff ff 1a call 40002014 400023b0: b0 10 20 00 clr %i0 _Mutex_Release( mutex ); 400023b4: 90 17 63 fc or %i5, 0x3fc, %o0 diskdevs_protected = false; 400023b8: c0 2f 22 7c clrb [ %i4 + 0x27c ] 400023bc: 40 00 13 c0 call 400072bc <_Mutex_Release> 400023c0: 01 00 00 00 nop disk_lock(); sc = disk_delete_locked(dev); disk_unlock(); return sc; } 400023c4: 81 c7 e0 08 ret 400023c8: 81 e8 00 00 restore diskdevs_protected = false; 400023cc: c0 2f 22 7c clrb [ %i4 + 0x27c ] <== NOT EXECUTED 400023d0: 40 00 13 bb call 400072bc <_Mutex_Release> <== NOT EXECUTED 400023d4: 90 17 63 fc or %i5, 0x3fc, %o0 <== NOT EXECUTED } 400023d8: 81 c7 e0 08 ret <== NOT EXECUTED 400023dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40002564 : rtems_status_code rtems_disk_io_done(void) { 40002564: 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) { 40002568: 21 10 00 61 sethi %hi(0x40018400), %l0 4000256c: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 ! 40018680 rtems_disk_device_table *dtab = disktab + major; 40002570: 35 10 00 61 sethi %hi(0x40018400), %i2 for (major = 0; major < disktab_size; ++major) { 40002574: 80 a0 60 00 cmp %g1, 0 40002578: 02 80 00 1f be 400025f4 <== NEVER TAKEN 4000257c: fa 06 a2 84 ld [ %i2 + 0x284 ], %i5 40002580: b6 10 20 00 clr %i3 40002584: b2 14 22 80 or %l0, 0x280, %i1 rtems_disk_device_table *dtab = disktab + major; 40002588: 83 2e e0 03 sll %i3, 3, %g1 4000258c: b8 07 40 01 add %i5, %g1, %i4 for (minor = 0; minor < dtab->size; ++minor) { 40002590: c6 07 20 04 ld [ %i4 + 4 ], %g3 40002594: 80 a0 e0 00 cmp %g3, 0 40002598: 02 80 00 10 be 400025d8 4000259c: c4 07 40 01 ld [ %i5 + %g1 ], %g2 400025a0: ba 10 20 00 clr %i5 rtems_disk_device *dd = dtab->minor [minor]; 400025a4: 83 2f 60 02 sll %i5, 2, %g1 400025a8: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if (dd != NULL) { 400025ac: 80 a2 20 00 cmp %o0, 0 400025b0: 02 80 00 06 be 400025c8 <== ALWAYS TAKEN 400025b4: ba 07 60 01 inc %i5 free_disk_device(dd); 400025b8: 7f ff fe 81 call 40001fbc <== NOT EXECUTED 400025bc: 01 00 00 00 nop <== NOT EXECUTED 400025c0: c6 07 20 04 ld [ %i4 + 4 ], %g3 <== NOT EXECUTED } } free(dtab->minor); 400025c4: c4 07 00 00 ld [ %i4 ], %g2 <== NOT EXECUTED for (minor = 0; minor < dtab->size; ++minor) { 400025c8: 80 a0 c0 1d cmp %g3, %i5 400025cc: 18 bf ff f7 bgu 400025a8 400025d0: 83 2f 60 02 sll %i5, 2, %g1 } free(disktab); 400025d4: fa 06 a2 84 ld [ %i2 + 0x284 ], %i5 free(dtab->minor); 400025d8: 40 00 01 54 call 40002b28 400025dc: 90 10 00 02 mov %g2, %o0 for (major = 0; major < disktab_size; ++major) { 400025e0: c2 06 40 00 ld [ %i1 ], %g1 400025e4: b6 06 e0 01 inc %i3 400025e8: 80 a0 40 1b cmp %g1, %i3 400025ec: 18 bf ff e8 bgu 4000258c 400025f0: 83 2e e0 03 sll %i3, 3, %g1 free(disktab); 400025f4: 90 10 00 1d mov %i5, %o0 400025f8: 40 00 01 4c call 40002b28 400025fc: b0 10 20 00 clr %i0 disktab = NULL; 40002600: c0 26 a2 84 clr [ %i2 + 0x284 ] disktab_size = 0; 40002604: c0 24 22 80 clr [ %l0 + 0x280 ] return RTEMS_SUCCESSFUL; } 40002608: 81 c7 e0 08 ret 4000260c: 81 e8 00 00 restore =============================================================================== 400024f8 : } } rtems_status_code rtems_disk_io_initialize(void) { 400024f8: 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) { 400024fc: 3b 10 00 61 sethi %hi(0x40018400), %i5 40002500: c2 07 62 80 ld [ %i5 + 0x280 ], %g1 ! 40018680 40002504: 80 a0 60 00 cmp %g1, 0 40002508: 12 80 00 0f bne 40002544 <== NEVER TAKEN 4000250c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } disktab = calloc(size, sizeof(rtems_disk_device_table)); 40002510: 92 10 20 08 mov 8, %o1 40002514: 90 10 20 08 mov 8, %o0 40002518: 40 00 01 1a call 40002980 4000251c: 39 10 00 61 sethi %hi(0x40018400), %i4 if (disktab == NULL) { 40002520: 80 a2 20 00 cmp %o0, 0 40002524: 02 80 00 0e be 4000255c <== NEVER TAKEN 40002528: d0 27 22 84 st %o0, [ %i4 + 0x284 ] return RTEMS_NO_MEMORY; } sc = rtems_bdbuf_init(); 4000252c: 40 00 27 90 call 4000c36c 40002530: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 40002534: b0 92 20 00 orcc %o0, 0, %i0 40002538: 12 80 00 05 bne 4000254c <== NEVER TAKEN 4000253c: 82 10 20 08 mov 8, %g1 free(disktab); return RTEMS_UNSATISFIED; } disktab_size = size; 40002540: c2 27 62 80 st %g1, [ %i5 + 0x280 ] return RTEMS_SUCCESSFUL; 40002544: 81 c7 e0 08 ret 40002548: 81 e8 00 00 restore free(disktab); 4000254c: 40 00 01 77 call 40002b28 <== NOT EXECUTED 40002550: d0 07 22 84 ld [ %i4 + 0x284 ], %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 40002554: 81 c7 e0 08 ret <== NOT EXECUTED 40002558: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED } 4000255c: 81 c7 e0 08 ret <== NOT EXECUTED 40002560: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED =============================================================================== 400023e0 : rtems_disk_device * rtems_disk_obtain(dev_t dev) { 400023e0: 9d e3 bf 98 save %sp, -104, %sp * @return This method returns the entire PSR contents. */ static inline uint32_t sparc_disable_interrupts(void) { register uint32_t psr __asm__("g1"); /* return value of trap handler */ __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400023e4: 91 d0 20 09 ta 9 return psr; 400023e8: c2 27 bf fc st %g1, [ %fp + -4 ] rtems_disk_device *dd = NULL; rtems_interrupt_lock_context lock_context; rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context); if (!diskdevs_protected) { 400023ec: 3b 10 00 61 sethi %hi(0x40018400), %i5 400023f0: c4 0f 62 7c ldub [ %i5 + 0x27c ], %g2 ! 4001867c 400023f4: 80 a0 a0 00 cmp %g2, 0 400023f8: 12 80 00 0b bne 40002424 <== NEVER TAKEN 400023fc: 94 10 20 00 clr %o2 /* Frequent and quickest case */ dd = get_disk_entry(dev, false); 40002400: 90 10 00 18 mov %i0, %o0 40002404: 7f ff fe 58 call 40001d64 40002408: 92 10 00 19 mov %i1, %o1 4000240c: b0 10 00 08 mov %o0, %i0 * * @param[in] psr is the PSR returned by @ref sparc_disable_interrupts. */ static inline void sparc_enable_interrupts(uint32_t psr) { register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40002410: c2 07 bf fc ld [ %fp + -4 ], %g1 * The trap instruction has a higher trap priority than the interrupts * according to "The SPARC Architecture Manual: Version 8", Table 7-1 * "Exception and Interrupt Request Priority and tt Values". Add a nop to * prevent a trap instruction right after the interrupt enable trap. */ __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002414: 91 d0 20 0a ta 0xa 40002418: 01 00 00 00 nop } 4000241c: 81 c7 e0 08 ret 40002420: 81 e8 00 00 restore __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002424: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40002428: 01 00 00 00 nop <== NOT EXECUTED _Mutex_Acquire( mutex ); 4000242c: 39 10 00 59 sethi %hi(0x40016400), %i4 <== NOT EXECUTED 40002430: 40 00 13 88 call 40007250 <_Mutex_Acquire> <== NOT EXECUTED 40002434: 90 17 23 fc or %i4, 0x3fc, %o0 ! 400167fc <== NOT EXECUTED diskdevs_protected = true; 40002438: 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); 4000243c: 94 10 20 00 clr %o2 <== NOT EXECUTED diskdevs_protected = true; 40002440: c2 2f 62 7c stb %g1, [ %i5 + 0x27c ] <== NOT EXECUTED dd = get_disk_entry(dev, false); 40002444: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002448: 7f ff fe 47 call 40001d64 <== NOT EXECUTED 4000244c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED diskdevs_protected = false; 40002450: c0 2f 62 7c clrb [ %i5 + 0x27c ] <== NOT EXECUTED dd = get_disk_entry(dev, false); 40002454: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Mutex_Release( mutex ); 40002458: 40 00 13 99 call 400072bc <_Mutex_Release> <== NOT EXECUTED 4000245c: 90 17 23 fc or %i4, 0x3fc, %o0 <== NOT EXECUTED disk_unlock(); } return dd; } 40002460: 81 c7 e0 08 ret <== NOT EXECUTED 40002464: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40002468 : rtems_status_code rtems_disk_release(rtems_disk_device *dd) { 40002468: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_lock_context lock_context; dev_t dev = dd->dev; 4000246c: f8 1e 00 00 ldd [ %i0 ], %i4 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002470: 91 d0 20 09 ta 9 unsigned uses = 0; bool deleted = false; rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context); uses = --dd->uses; 40002474: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40002478: 84 00 bf ff add %g2, -1, %g2 deleted = dd->deleted; 4000247c: c6 0e 20 40 ldub [ %i0 + 0x40 ], %g3 uses = --dd->uses; 40002480: c4 26 20 14 st %g2, [ %i0 + 0x14 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002484: 91 d0 20 0a ta 0xa 40002488: 01 00 00 00 nop rtems_interrupt_lock_release(&diskdevs_lock, &lock_context); if (uses == 0 && deleted) { 4000248c: 80 a0 a0 00 cmp %g2, 0 40002490: 12 80 00 04 bne 400024a0 40002494: 80 88 e0 ff btst 0xff, %g3 40002498: 12 80 00 04 bne 400024a8 4000249c: 37 10 00 59 sethi %hi(0x40016400), %i3 rtems_disk_delete(dev); } return RTEMS_SUCCESSFUL; } 400024a0: 81 c7 e0 08 ret 400024a4: 91 e8 20 00 restore %g0, 0, %o0 _Mutex_Acquire( mutex ); 400024a8: 40 00 13 6a call 40007250 <_Mutex_Acquire> 400024ac: 90 16 e3 fc or %i3, 0x3fc, %o0 diskdevs_protected = true; 400024b0: 35 10 00 61 sethi %hi(0x40018400), %i2 400024b4: b2 10 20 01 mov 1, %i1 dd = get_disk_entry(dev, true); 400024b8: 94 10 20 01 mov 1, %o2 diskdevs_protected = true; 400024bc: f2 2e a2 7c stb %i1, [ %i2 + 0x27c ] dd = get_disk_entry(dev, true); 400024c0: 90 10 00 1c mov %i4, %o0 400024c4: 7f ff fe 28 call 40001d64 400024c8: 92 10 00 1d mov %i5, %o1 if (dd == NULL) { 400024cc: 82 92 20 00 orcc %o0, 0, %g1 400024d0: 02 80 00 04 be 400024e0 <== NEVER TAKEN 400024d4: 01 00 00 00 nop rtems_disk_cleanup(dd); 400024d8: 7f ff fe cf call 40002014 400024dc: f2 28 60 40 stb %i1, [ %g1 + 0x40 ] diskdevs_protected = false; 400024e0: c0 2e a2 7c clrb [ %i2 + 0x27c ] _Mutex_Release( mutex ); 400024e4: 90 16 e3 fc or %i3, 0x3fc, %o0 400024e8: 40 00 13 75 call 400072bc <_Mutex_Release> 400024ec: b0 10 20 00 clr %i0 } 400024f0: 81 c7 e0 08 ret 400024f4: 81 e8 00 00 restore =============================================================================== 40005240 : */ rtems_device_driver rtems_fdisk_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void* arg RTEMS_UNUSED) { 40005240: 9d e3 bf 88 save %sp, -120, %sp rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256); 40005244: 40 00 03 41 call 40005f48 40005248: 90 10 22 00 mov 0x200, %o0 4000524c: 03 10 01 15 sethi %hi(0x40045400), %g1 40005250: d0 20 62 38 st %o0, [ %g1 + 0x238 ] ! 40045638 v = v & 1 ? (v >> 1) ^ pattern : v >> 1; 40005254: 09 3f ff e1 sethi %hi(0xffff8400), %g4 for (b = 0; b < 256; b++) 40005258: 86 10 20 00 clr %g3 if (!rtems_fdisk_crc16_factor) 4000525c: 80 a2 20 00 cmp %o0, 0 40005260: 02 80 01 14 be 400056b0 <== NEVER TAKEN 40005264: 88 11 20 08 or %g4, 8, %g4 uint16_t v = b; 40005268: 82 10 00 03 mov %g3, %g1 for (b = 0; b < 256; b++) 4000526c: ae 10 20 08 mov 8, %l7 v = v & 1 ? (v >> 1) ^ pattern : v >> 1; 40005270: 84 08 60 01 and %g1, 1, %g2 40005274: 83 28 60 10 sll %g1, 0x10, %g1 40005278: 80 a0 a0 00 cmp %g2, 0 4000527c: 85 30 60 11 srl %g1, 0x11, %g2 40005280: 02 80 00 03 be 4000528c 40005284: 82 10 00 02 mov %g2, %g1 40005288: 82 18 80 04 xor %g2, %g4, %g1 for (i = 8; i--;) 4000528c: ae 85 ff ff addcc %l7, -1, %l7 40005290: 12 bf ff f9 bne 40005274 40005294: 84 08 60 01 and %g1, 1, %g2 rtems_fdisk_crc16_factor[b] = v & 0xffff; 40005298: 85 28 e0 01 sll %g3, 1, %g2 for (b = 0; b < 256; b++) 4000529c: 86 00 e0 01 inc %g3 400052a0: 80 a0 e1 00 cmp %g3, 0x100 400052a4: 12 bf ff f1 bne 40005268 400052a8: c2 32 00 02 sth %g1, [ %o0 + %g2 ] sc = rtems_fdisk_crc16_gen_factors (0x8408); if (sc != RTEMS_SUCCESSFUL) return sc; fd = calloc (rtems_flashdisk_configuration_size, sizeof (*fd)); 400052ac: 2b 10 00 cc sethi %hi(0x40033000), %l5 400052b0: fa 05 61 94 ld [ %l5 + 0x194 ], %i5 ! 40033194 400052b4: 92 10 20 84 mov 0x84, %o1 400052b8: 40 00 01 33 call 40005784 400052bc: 90 10 00 1d mov %i5, %o0 if (!fd) 400052c0: b8 92 20 00 orcc %o0, 0, %i4 400052c4: 02 80 00 fb be 400056b0 <== NEVER TAKEN 400052c8: 80 a7 60 00 cmp %i5, 0 return RTEMS_NO_MEMORY; for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++) 400052cc: 02 80 00 b6 be 400055a4 <== NEVER TAKEN 400052d0: 29 00 00 18 sethi %hi(0x6000), %l4 { char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 400052d4: 82 15 21 00 or %l4, 0x100, %g1 ! 6100 <_ISR_Stack_size+0x5100> static __inline void _Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name) { struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name); *_mutex = _init; 400052d8: 27 10 00 b4 sethi %hi(0x4002d000), %l3 400052dc: c2 37 bf ee sth %g1, [ %fp + -18 ] 400052e0: 82 14 e1 f0 or %l3, 0x1f0, %g1 400052e4: c2 27 bf e8 st %g1, [ %fp + -24 ] const rtems_flashdisk_config* c = rtems_flashdisk_configuration; 400052e8: 35 10 00 b0 sethi %hi(0x4002c000), %i2 if (!fd->devices) return RTEMS_NO_MEMORY; rtems_mutex_init (&fd->lock, "Flash Disk"); sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks, 400052ec: 25 10 00 0f sethi %hi(0x40003c00), %l2 for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++) 400052f0: b2 10 20 00 clr %i1 const rtems_flashdisk_config* c = rtems_flashdisk_configuration; 400052f4: b4 16 a2 64 or %i2, 0x264, %i2 sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks, 400052f8: a4 14 a1 b8 or %l2, 0x1b8, %l2 char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 400052fc: c2 17 bf ee lduh [ %fp + -18 ], %g1 40005300: c2 37 bf f8 sth %g1, [ %fp + -8 ] 40005304: 19 0b d9 19 sethi %hi(0x2f646400), %o4 fd->flags = c->flags; 40005308: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 fd->compact_segs = c->compact_segs; 4000530c: c6 06 a0 14 ld [ %i2 + 0x14 ], %g3 fd->avail_compact_segs = c->avail_compact_segs; 40005310: c4 06 a0 18 ld [ %i2 + 0x18 ], %g2 fd->block_size = c->block_size; 40005314: f6 06 80 00 ld [ %i2 ], %i3 fd->unavail_blocks = c->unavail_blocks; 40005318: fa 06 a0 10 ld [ %i2 + 0x10 ], %i5 fd->info_level = c->info_level; 4000531c: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 40005320: 98 13 21 76 or %o4, 0x176, %o4 40005324: 1b 0b d9 99 sethi %hi(0x2f666400), %o5 name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor; 40005328: f2 2f bf f9 stb %i1, [ %fp + -7 ] char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 4000532c: 9a 13 60 64 or %o5, 0x64, %o5 fd->major = major; 40005330: f0 27 00 00 st %i0, [ %i4 ] char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 40005334: d8 3f bf f0 std %o4, [ %fp + -16 ] fd->minor = minor; 40005338: f2 27 20 04 st %i1, [ %i4 + 4 ] fd->flags = c->flags; 4000533c: c8 27 20 08 st %g4, [ %i4 + 8 ] fd->compact_segs = c->compact_segs; 40005340: c6 27 20 0c st %g3, [ %i4 + 0xc ] fd->avail_compact_segs = c->avail_compact_segs; 40005344: c4 27 20 10 st %g2, [ %i4 + 0x10 ] fd->block_size = c->block_size; 40005348: f6 27 20 14 st %i3, [ %i4 + 0x14 ] fd->unavail_blocks = c->unavail_blocks; 4000534c: fa 27 20 20 st %i5, [ %i4 + 0x20 ] fd->info_level = c->info_level; 40005350: c2 27 20 7c st %g1, [ %i4 + 0x7c ] for (device = 0; device < c->device_count; device++) 40005354: e0 06 a0 04 ld [ %i2 + 4 ], %l0 40005358: 80 a4 20 00 cmp %l0, 0 4000535c: 02 80 00 a6 be 400055f4 <== NEVER TAKEN 40005360: 95 2c 20 01 sll %l0, 1, %o2 40005364: d6 06 a0 08 ld [ %i2 + 8 ], %o3 uint32_t blocks = 0; 40005368: ac 10 20 00 clr %l6 4000536c: 94 02 80 10 add %o2, %l0, %o2 40005370: 95 2a a0 02 sll %o2, 2, %o2 40005374: 94 02 80 0b add %o2, %o3, %o2 for (s = 0; s < dd->segment_count; s++) 40005378: c2 02 c0 00 ld [ %o3 ], %g1 4000537c: 80 a0 60 00 cmp %g1, 0 40005380: 02 80 00 1c be 400053f0 <== NEVER TAKEN 40005384: 88 10 20 00 clr %g4 40005388: c6 02 e0 04 ld [ %o3 + 4 ], %g3 4000538c: 99 28 60 01 sll %g1, 1, %o4 40005390: 98 03 00 01 add %o4, %g1, %o4 40005394: 99 2b 20 02 sll %o4, 2, %o4 40005398: 98 03 00 03 add %o4, %g3, %o4 rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count; 4000539c: de 10 c0 00 lduh [ %g3 ], %o7 return sd->size / page_size; 400053a0: 81 80 20 00 wr %g0, %y 400053a4: c2 00 e0 08 ld [ %g3 + 8 ], %g1 400053a8: 01 00 00 00 nop 400053ac: 01 00 00 00 nop 400053b0: 82 70 40 1b udiv %g1, %i3, %g1 for (s = 0; s < dd->segment_count; s++) 400053b4: 86 00 e0 0c add %g3, 0xc, %g3 (rtems_fdisk_pages_in_segment (sd, page_size) - 400053b8: 84 00 7f ff add %g1, -1, %g2 for (s = 0; s < dd->segment_count; s++) 400053bc: 80 a3 00 03 cmp %o4, %g3 uint32_t bytes = pages * sizeof (rtems_fdisk_page_desc); 400053c0: 83 28 60 03 sll %g1, 3, %g1 return ((bytes - 1) / page_size) + 1; 400053c4: 82 00 7f ff add %g1, -1, %g1 400053c8: 81 80 20 00 wr %g0, %y 400053cc: 01 00 00 00 nop 400053d0: 01 00 00 00 nop 400053d4: 01 00 00 00 nop 400053d8: 82 70 40 1b udiv %g1, %i3, %g1 (rtems_fdisk_pages_in_segment (sd, page_size) - 400053dc: 82 20 80 01 sub %g2, %g1, %g1 rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count; 400053e0: 9e 58 40 0f smul %g1, %o7, %o7 for (s = 0; s < dd->segment_count; s++) 400053e4: 12 bf ff ee bne 4000539c <== NEVER TAKEN 400053e8: 88 01 00 0f add %g4, %o7, %g4 blocks += rtems_fdisk_blocks_in_device (&c->devices[device], 400053ec: ac 05 80 04 add %l6, %g4, %l6 for (device = 0; device < c->device_count; device++) 400053f0: 96 02 e0 0c add %o3, 0xc, %o3 400053f4: 80 a2 c0 0a cmp %o3, %o2 400053f8: 32 bf ff e1 bne,a 4000537c <== NEVER TAKEN 400053fc: c2 02 c0 00 ld [ %o3 ], %g1 <== NOT EXECUTED fd->copy_buffer = malloc (c->block_size); 40005400: 40 00 02 d2 call 40005f48 40005404: 90 10 00 1b mov %i3, %o0 if (!fd->copy_buffer) 40005408: 80 a2 20 00 cmp %o0, 0 4000540c: 02 80 00 ab be 400056b8 <== NEVER TAKEN 40005410: d0 27 20 78 st %o0, [ %i4 + 0x78 ] fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl)); 40005414: 92 10 20 08 mov 8, %o1 40005418: 40 00 00 db call 40005784 4000541c: 90 10 00 16 mov %l6, %o0 if (!fd->blocks) 40005420: 80 a2 20 00 cmp %o0, 0 40005424: 02 80 00 a5 be 400056b8 <== NEVER TAKEN 40005428: d0 27 20 18 st %o0, [ %i4 + 0x18 ] fd->block_count = blocks; 4000542c: ec 27 20 1c st %l6, [ %i4 + 0x1c ] fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl)); 40005430: 92 10 20 0c mov 0xc, %o1 40005434: 40 00 00 d4 call 40005784 40005438: 90 10 00 10 mov %l0, %o0 if (!fd->devices) 4000543c: 80 a2 20 00 cmp %o0, 0 40005440: 02 80 00 9e be 400056b8 <== NEVER TAKEN 40005444: d0 27 20 2c st %o0, [ %i4 + 0x2c ] 40005448: c2 07 bf e8 ld [ %fp + -24 ], %g1 4000544c: c0 27 20 64 clr [ %i4 + 0x64 ] sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks, 40005450: 94 25 80 1d sub %l6, %i5, %o2 40005454: c0 27 20 68 clr [ %i4 + 0x68 ] 40005458: 98 10 00 1c mov %i4, %o4 4000545c: c0 27 20 6c clr [ %i4 + 0x6c ] 40005460: 96 10 00 12 mov %l2, %o3 40005464: c0 27 20 70 clr [ %i4 + 0x70 ] 40005468: 92 10 00 1b mov %i3, %o1 4000546c: c2 27 20 74 st %g1, [ %i4 + 0x74 ] 40005470: 40 00 32 3f call 40011d6c 40005474: 90 07 bf f0 add %fp, -16, %o0 rtems_fdisk_ioctl, fd); if (sc != RTEMS_SUCCESSFUL) 40005478: ba 92 20 00 orcc %o0, 0, %i5 4000547c: 12 80 00 60 bne 400055fc <== NEVER TAKEN 40005480: 01 00 00 00 nop free (fd->devices); rtems_fdisk_error ("disk create phy failed"); return sc; } for (device = 0; device < c->device_count; device++) 40005484: f6 06 a0 04 ld [ %i2 + 4 ], %i3 40005488: 80 a6 e0 00 cmp %i3, 0 4000548c: 22 80 00 37 be,a 40005568 <== NEVER TAKEN 40005490: f6 27 20 30 st %i3, [ %i4 + 0x30 ] <== NOT EXECUTED 40005494: e2 06 a0 08 ld [ %i2 + 8 ], %l1 40005498: e0 07 20 2c ld [ %i4 + 0x2c ], %l0 4000549c: ac 10 20 00 clr %l6 for (segment = 0; segment < dd->segment_count; segment++) 400054a0: e6 04 40 00 ld [ %l1 ], %l3 400054a4: 80 a4 e0 00 cmp %l3, 0 400054a8: 02 80 00 41 be 400055ac <== NEVER TAKEN 400054ac: 9b 2c e0 01 sll %l3, 1, %o5 400054b0: fa 04 60 04 ld [ %l1 + 4 ], %i5 count += dd->segments[segment].count; 400054b4: 82 10 00 1d mov %i5, %g1 400054b8: 9a 03 40 13 add %o5, %l3, %o5 uint32_t count = 0; 400054bc: a6 10 20 00 clr %l3 400054c0: 9b 2b 60 02 sll %o5, 2, %o5 400054c4: a8 03 40 1d add %o5, %i5, %l4 count += dd->segments[segment].count; 400054c8: c4 10 40 00 lduh [ %g1 ], %g2 for (segment = 0; segment < dd->segment_count; segment++) 400054cc: 82 00 60 0c add %g1, 0xc, %g1 400054d0: 80 a5 00 01 cmp %l4, %g1 400054d4: 12 bf ff fd bne 400054c8 <== NEVER TAKEN 400054d8: a6 04 c0 02 add %l3, %g2, %l3 uint32_t segment_count; uint32_t segment; segment_count = rtems_fdisk_count_segments (&c->devices[device]); fd->devices[device].segments = calloc (segment_count, 400054dc: 92 10 20 30 mov 0x30, %o1 400054e0: 40 00 00 a9 call 40005784 400054e4: 90 10 00 13 mov %l3, %o0 sizeof (rtems_fdisk_segment_ctl)); if (!fd->devices[device].segments) 400054e8: 80 a2 20 00 cmp %o0, 0 400054ec: 02 80 00 36 be 400055c4 <== NEVER TAKEN 400054f0: d0 24 00 00 st %o0, [ %l0 ] const rtems_fdisk_segment_desc* sd; uint32_t seg_segment; sd = &c->devices[device].segments[segment]; for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 400054f4: c6 17 40 00 lduh [ %i5 ], %g3 400054f8: 80 a0 e0 00 cmp %g3, 0 400054fc: 02 80 00 0f be 40005538 <== NEVER TAKEN 40005500: 84 10 20 00 clr %g2 40005504: 82 10 00 08 mov %o0, %g1 { sc->descriptor = sd; sc->device = device; sc->segment = seg_segment; 40005508: c4 20 60 0c st %g2, [ %g1 + 0xc ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 4000550c: 82 00 60 30 add %g1, 0x30, %g1 sc->descriptor = sd; 40005510: fa 20 7f d4 st %i5, [ %g1 + -44 ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 40005514: 84 00 a0 01 inc %g2 sc->device = device; 40005518: ec 20 7f d8 st %l6, [ %g1 + -40 ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 4000551c: 80 a0 80 03 cmp %g2, %g3 40005520: 12 bf ff fa bne 40005508 40005524: c0 20 7f fc clr [ %g1 + -4 ] 40005528: 83 28 a0 01 sll %g2, 1, %g1 4000552c: 84 00 40 02 add %g1, %g2, %g2 40005530: 85 28 a0 04 sll %g2, 4, %g2 40005534: 90 02 00 02 add %o0, %g2, %o0 for (segment = 0; segment < c->devices[device].segment_count; segment++) 40005538: ba 07 60 0c add %i5, 0xc, %i5 4000553c: 80 a5 00 1d cmp %l4, %i5 40005540: 32 bf ff ee bne,a 400054f8 <== NEVER TAKEN 40005544: c6 17 40 00 lduh [ %i5 ], %g3 <== NOT EXECUTED sc->erased = 0; } } fd->devices[device].segment_count = segment_count; fd->devices[device].descriptor = &c->devices[device]; 40005548: e2 24 20 08 st %l1, [ %l0 + 8 ] for (device = 0; device < c->device_count; device++) 4000554c: ac 05 a0 01 inc %l6 fd->devices[device].segment_count = segment_count; 40005550: e6 24 20 04 st %l3, [ %l0 + 4 ] for (device = 0; device < c->device_count; device++) 40005554: a2 04 60 0c add %l1, 0xc, %l1 40005558: 80 a5 80 1b cmp %l6, %i3 4000555c: 12 bf ff d1 bne 400054a0 <== NEVER TAKEN 40005560: a0 04 20 0c add %l0, 0xc, %l0 } fd->device_count = c->device_count; 40005564: f6 27 20 30 st %i3, [ %i4 + 0x30 ] ret = rtems_fdisk_recover_block_mappings (fd); 40005568: 7f ff f9 0d call 4000399c 4000556c: 90 10 00 1c mov %i4, %o0 if (ret) 40005570: ba 92 20 00 orcc %o0, 0, %i5 40005574: 12 80 00 2d bne 40005628 <== NEVER TAKEN 40005578: 01 00 00 00 nop rtems_fdisk_error ("recovery of disk failed: %s (%d)", strerror (ret), ret); return ret; } ret = rtems_fdisk_compact (fd); 4000557c: 7f ff f8 58 call 400036dc 40005580: 90 10 00 1c mov %i4, %o0 if (ret) 40005584: ba 92 20 00 orcc %o0, 0, %i5 40005588: 12 80 00 39 bne 4000566c <== NEVER TAKEN 4000558c: c2 05 61 94 ld [ %l5 + 0x194 ], %g1 for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++) 40005590: b2 06 60 01 inc %i1 40005594: b4 06 a0 20 add %i2, 0x20, %i2 40005598: 80 a0 40 19 cmp %g1, %i1 4000559c: 18 bf ff 58 bgu 400052fc <== NEVER TAKEN 400055a0: b8 07 20 84 add %i4, 0x84, %i4 return ret; } } return RTEMS_SUCCESSFUL; } 400055a4: 81 c7 e0 08 ret 400055a8: 91 e8 00 17 restore %g0, %l7, %o0 fd->devices[device].segments = calloc (segment_count, 400055ac: 92 10 20 30 mov 0x30, %o1 <== NOT EXECUTED 400055b0: 40 00 00 75 call 40005784 <== NOT EXECUTED 400055b4: 90 10 20 00 clr %o0 <== NOT EXECUTED if (!fd->devices[device].segments) 400055b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400055bc: 12 bf ff e3 bne 40005548 <== NOT EXECUTED 400055c0: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED unlink (name); 400055c4: 40 00 09 6c call 40007b74 <== NOT EXECUTED 400055c8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED free (fd->copy_buffer); 400055cc: 40 00 01 10 call 40005a0c <== NOT EXECUTED 400055d0: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 400055d4: 40 00 01 0e call 40005a0c <== NOT EXECUTED 400055d8: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 400055dc: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED 400055e0: 40 00 01 0b call 40005a0c <== NOT EXECUTED 400055e4: ba 10 20 1a mov 0x1a, %i5 <== NOT EXECUTED return RTEMS_NO_MEMORY; 400055e8: ae 10 00 1d mov %i5, %l7 <== NOT EXECUTED } 400055ec: 81 c7 e0 08 ret <== NOT EXECUTED 400055f0: 91 e8 00 17 restore %g0, %l7, %o0 <== NOT EXECUTED uint32_t blocks = 0; 400055f4: 10 bf ff 83 b 40005400 <== NOT EXECUTED 400055f8: ac 10 20 00 clr %l6 <== NOT EXECUTED free (fd->copy_buffer); 400055fc: 40 00 01 04 call 40005a0c <== NOT EXECUTED 40005600: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 40005604: 40 00 01 02 call 40005a0c <== NOT EXECUTED 40005608: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 4000560c: 40 00 01 00 call 40005a0c <== NOT EXECUTED 40005610: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("disk create phy failed"); 40005614: 11 10 00 b4 sethi %hi(0x4002d000), %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005618: ae 10 00 1d mov %i5, %l7 <== NOT EXECUTED rtems_fdisk_error ("disk create phy failed"); 4000561c: 7f ff f5 0f call 40002a58 <== NOT EXECUTED 40005620: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED return sc; 40005624: 30 bf ff f2 b,a 400055ec <== NOT EXECUTED unlink (name); 40005628: 40 00 09 53 call 40007b74 <== NOT EXECUTED 4000562c: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED free (fd->copy_buffer); 40005630: 40 00 00 f7 call 40005a0c <== NOT EXECUTED 40005634: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 40005638: 40 00 00 f5 call 40005a0c <== NOT EXECUTED 4000563c: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 40005640: 40 00 00 f3 call 40005a0c <== NOT EXECUTED 40005644: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("recovery of disk failed: %s (%d)", 40005648: 40 00 74 e5 call 400229dc <== NOT EXECUTED 4000564c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40005650: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED 40005654: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005658: ae 10 00 1d mov %i5, %l7 <== NOT EXECUTED rtems_fdisk_error ("recovery of disk failed: %s (%d)", 4000565c: 11 10 00 b4 sethi %hi(0x4002d000), %o0 <== NOT EXECUTED 40005660: 7f ff f4 fe call 40002a58 <== NOT EXECUTED 40005664: 90 12 22 18 or %o0, 0x218, %o0 ! 4002d218 <__func__.6+0xb70> <== NOT EXECUTED return ret; 40005668: 30 bf ff e1 b,a 400055ec <== NOT EXECUTED unlink (name); 4000566c: 40 00 09 42 call 40007b74 <== NOT EXECUTED 40005670: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED free (fd->copy_buffer); 40005674: 40 00 00 e6 call 40005a0c <== NOT EXECUTED 40005678: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 4000567c: 40 00 00 e4 call 40005a0c <== NOT EXECUTED 40005680: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 40005684: 40 00 00 e2 call 40005a0c <== NOT EXECUTED 40005688: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("compacting of disk failed: %s (%d)", 4000568c: 40 00 74 d4 call 400229dc <== NOT EXECUTED 40005690: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40005694: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED 40005698: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4000569c: ae 10 00 1d mov %i5, %l7 <== NOT EXECUTED rtems_fdisk_error ("compacting of disk failed: %s (%d)", 400056a0: 11 10 00 b4 sethi %hi(0x4002d000), %o0 <== NOT EXECUTED 400056a4: 7f ff f4 ed call 40002a58 <== NOT EXECUTED 400056a8: 90 12 22 40 or %o0, 0x240, %o0 ! 4002d240 <__func__.6+0xb98> <== NOT EXECUTED return ret; 400056ac: 30 bf ff d0 b,a 400055ec <== NOT EXECUTED return RTEMS_NO_MEMORY; 400056b0: 10 bf ff bd b 400055a4 <== NOT EXECUTED 400056b4: ae 10 20 1a mov 0x1a, %l7 <== NOT EXECUTED return RTEMS_NO_MEMORY; 400056b8: ba 10 20 1a mov 0x1a, %i5 <== NOT EXECUTED 400056bc: 10 bf ff cc b 400055ec <== NOT EXECUTED 400056c0: ae 10 00 1d mov %i5, %l7 <== NOT EXECUTED =============================================================================== 40003474 : * 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) { 40003474: 9d e3 bf 90 save %sp, -112, %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)); 40003478: 92 10 21 1c mov 0x11c, %o1 4000347c: 40 00 01 1c call 400038ec 40003480: 90 10 20 01 mov 1, %o0 if (disk_desc == NULL) 40003484: b6 92 20 00 orcc %o0, 0, %i3 40003488: 02 80 00 4f be 400035c4 <== NEVER TAKEN 4000348c: 92 10 00 1b mov %i3, %o1 { return RTEMS_NO_MEMORY; } /* get partition table */ rc = partition_table_get(dev_name, disk_desc); 40003490: 7f ff fe c4 call 40002fa0 40003494: 90 10 00 18 mov %i0, %o0 if (rc != RTEMS_SUCCESSFUL) 40003498: b2 92 20 00 orcc %o0, 0, %i1 4000349c: 12 80 00 46 bne 400035b4 <== NEVER TAKEN 400034a0: 01 00 00 00 nop free(disk_desc); return rc; } /* create logical disks on the physical one */ for (part_num = 0; part_num < disk_desc->last_log_id; part_num++) 400034a4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 400034a8: 80 a0 60 00 cmp %g1, 0 400034ac: 04 80 00 29 ble 40003550 <== NEVER TAKEN 400034b0: 35 10 00 7e sethi %hi(0x4001f800), %i2 rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start, part_desc->size); if (rc != RTEMS_SUCCESSFUL) { fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc); 400034b4: 23 10 00 7e sethi %hi(0x4001f800), %l1 for (part_num = 0; part_num < disk_desc->last_log_id; part_num++) 400034b8: ba 10 20 00 clr %i5 400034bc: a0 06 e0 1c add %i3, 0x1c, %l0 sprintf(name, "%s%d", dev_name, part_num + 1); 400034c0: b4 16 a0 40 or %i2, 0x40, %i2 fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc); 400034c4: 10 80 00 06 b 400034dc 400034c8: a2 14 60 48 or %l1, 0x48, %l1 for (part_num = 0; part_num < disk_desc->last_log_id; part_num++) 400034cc: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 400034d0: 80 a7 40 01 cmp %i5, %g1 400034d4: 36 80 00 20 bge,a 40003554 400034d8: b4 06 e0 20 add %i3, 0x20, %i2 sprintf(name, "%s%d", dev_name, part_num + 1); 400034dc: ba 07 60 01 inc %i5 400034e0: 92 10 00 1a mov %i2, %o1 400034e4: 94 10 00 18 mov %i0, %o2 400034e8: 96 10 00 1d mov %i5, %o3 400034ec: 40 00 49 3f call 400159e8 400034f0: 90 07 bf f0 add %fp, -16, %o0 part_desc = disk_desc->partitions[part_num]; 400034f4: 83 2f 60 02 sll %i5, 2, %g1 400034f8: c2 04 00 01 ld [ %l0 + %g1 ], %g1 rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start, 400034fc: 92 10 00 18 mov %i0, %o1 if (part_desc == NULL) 40003500: 80 a0 60 00 cmp %g1, 0 40003504: 02 bf ff f2 be 400034cc 40003508: 90 07 bf f0 add %fp, -16, %o0 rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start, 4000350c: d6 00 60 08 ld [ %g1 + 8 ], %o3 40003510: 7f ff fd 95 call 40002b64 40003514: d4 00 60 04 ld [ %g1 + 4 ], %o2 if (rc != RTEMS_SUCCESSFUL) 40003518: b8 92 20 00 orcc %o0, 0, %i4 4000351c: 22 bf ff ed be,a 400034d0 <== ALWAYS TAKEN 40003520: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc); 40003524: 7f ff f8 51 call 40001668 <__getreent> <== NOT EXECUTED 40003528: 01 00 00 00 nop <== NOT EXECUTED 4000352c: d0 02 20 08 ld [ %o0 + 8 ], %o0 <== NOT EXECUTED 40003530: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40003534: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 40003538: 40 00 47 8e call 40015370 <== NOT EXECUTED 4000353c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED for (part_num = 0; part_num < disk_desc->last_log_id; part_num++) 40003540: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED 40003544: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 40003548: 26 bf ff e6 bl,a 400034e0 <== NOT EXECUTED 4000354c: ba 07 60 01 inc %i5 <== NOT EXECUTED 40003550: b4 06 e0 20 add %i3, 0x20, %i2 <== NOT EXECUTED 40003554: a0 06 e0 30 add %i3, 0x30, %l0 partition_free(disk_desc->partitions[part_num]); 40003558: f8 06 80 00 ld [ %i2 ], %i4 if (part_desc == NULL) 4000355c: 80 a7 20 00 cmp %i4, 0 40003560: 22 80 00 12 be,a 400035a8 40003564: b4 06 a0 04 add %i2, 4, %i2 return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 40003568: c2 0f 20 01 ldub [ %i4 + 1 ], %g1 if (is_extended(part_desc->sys_type)) 4000356c: 82 08 60 7f and %g1, 0x7f, %g1 40003570: 80 a0 60 05 cmp %g1, 5 40003574: 12 80 00 0a bne 4000359c <== ALWAYS TAKEN 40003578: 01 00 00 00 nop 4000357c: ba 07 20 18 add %i4, 0x18, %i5 <== NOT EXECUTED 40003580: b0 07 20 28 add %i4, 0x28, %i0 <== NOT EXECUTED partition_free(part_desc->sub_part[part_num]); 40003584: 7f ff ff 07 call 400031a0 <== NOT EXECUTED 40003588: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED for (part_num = 0; 4000358c: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED 40003590: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED 40003594: 12 bf ff fc bne 40003584 <== NOT EXECUTED 40003598: 01 00 00 00 nop <== NOT EXECUTED free(part_desc); 4000359c: 40 00 01 42 call 40003aa4 400035a0: 90 10 00 1c mov %i4, %o0 for (part_num = 0; 400035a4: b4 06 a0 04 add %i2, 4, %i2 400035a8: 80 a6 80 10 cmp %i2, %l0 400035ac: 32 bf ff ec bne,a 4000355c 400035b0: f8 06 80 00 ld [ %i2 ], %i4 free(disk_desc); 400035b4: 40 00 01 3c call 40003aa4 400035b8: 90 10 00 1b mov %i3, %o0 } partition_table_free(disk_desc); return RTEMS_SUCCESSFUL; } 400035bc: 81 c7 e0 08 ret 400035c0: 91 e8 00 19 restore %g0, %i1, %o0 return RTEMS_NO_MEMORY; 400035c4: 10 bf ff fe b 400035bc <== NOT EXECUTED 400035c8: b2 10 20 1a mov 0x1a, %i1 <== NOT EXECUTED =============================================================================== 400022e0 : { 400022e0: 9d e3 bf 98 save %sp, -104, %sp + key_table_size + data_size; 400022e4: 90 06 60 08 add %i1, 8, %o0 400022e8: 90 5a 00 1a smul %o0, %i2, %o0 rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc( 400022ec: 40 00 01 71 call 400028b0 400022f0: 90 02 20 2c add %o0, 0x2c, %o0 if ( sparse_disk != NULL ) { 400022f4: 92 92 20 00 orcc %o0, 0, %o1 400022f8: 02 80 00 0c be 40002328 <== NEVER TAKEN 400022fc: 03 10 00 07 sethi %hi(0x40001c00), %g1 sc = rtems_sparse_disk_register( 40002300: 82 10 63 78 or %g1, 0x378, %g1 ! 40001f78 40002304: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40002308: 9a 10 00 1c mov %i4, %o5 4000230c: 98 10 00 1b mov %i3, %o4 40002310: 96 10 00 1a mov %i2, %o3 40002314: 94 10 00 19 mov %i1, %o2 40002318: 7f ff ff be call 40002210 4000231c: 90 10 00 18 mov %i0, %o0 40002320: 81 c7 e0 08 ret 40002324: 91 e8 00 08 restore %g0, %o0, %o0 } 40002328: 81 c7 e0 08 ret <== NOT EXECUTED 4000232c: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED =============================================================================== 40002210 : 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 ) { 40002210: 9d e3 bf a0 save %sp, -96, %sp sparse_disk_ioctl, sparse_disk ); } } else { sc = RTEMS_INVALID_NUMBER; 40002214: 82 10 20 0a mov 0xa, %g1 { 40002218: e4 07 a0 5c ld [ %fp + 0x5c ], %l2 4000221c: a2 10 00 1c mov %i4, %l1 if ( blocks_with_buffer <= media_block_count ) { 40002220: 80 a6 c0 1c cmp %i3, %i4 40002224: 08 80 00 04 bleu 40002234 <== ALWAYS TAKEN 40002228: a0 10 00 1a mov %i2, %l0 } return sc; } 4000222c: 81 c7 e0 08 ret <== NOT EXECUTED 40002230: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED if ( NULL == sd ) 40002234: 80 a6 60 00 cmp %i1, 0 40002238: 02 80 00 28 be 400022d8 <== NEVER TAKEN 4000223c: 92 10 20 00 clr %o1 size_t const key_table_size = blocks_with_buffer 40002240: b9 2e e0 03 sll %i3, 3, %i4 memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size ); 40002244: 90 10 00 19 mov %i1, %o0 40002248: b4 07 20 2c add %i4, 0x2c, %i2 4000224c: 40 00 68 45 call 4001c360 40002250: 94 10 00 1a mov %i2, %o2 sd->fill_pattern = fill_pattern; 40002254: fa 2e 60 24 stb %i5, [ %i1 + 0x24 ] memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ), 40002258: b4 06 40 1a add %i1, %i2, %i2 4000225c: 94 5e c0 10 smul %i3, %l0, %o2 40002260: 92 10 00 1d mov %i5, %o1 40002264: 40 00 68 3f call 4001c360 40002268: 90 10 00 1a mov %i2, %o0 data += sizeof( rtems_sparse_disk ); 4000226c: 86 06 60 2c add %i1, 0x2c, %g3 static __inline void _Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name) { struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name); *_mutex = _init; 40002270: 03 10 00 99 sethi %hi(0x40026400), %g1 sd->delete_handler = sparse_disk_delete; 40002274: e4 26 60 20 st %l2, [ %i1 + 0x20 ] 40002278: 82 10 63 c8 or %g1, 0x3c8, %g1 4000227c: c0 26 40 00 clr [ %i1 ] for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 40002280: 80 a6 e0 00 cmp %i3, 0 40002284: c0 26 60 04 clr [ %i1 + 4 ] 40002288: c0 26 60 08 clr [ %i1 + 8 ] 4000228c: c0 26 60 0c clr [ %i1 + 0xc ] 40002290: c2 26 60 10 st %g1, [ %i1 + 0x10 ] sd->blocks_with_buffer = blocks_with_buffer; 40002294: f6 26 60 14 st %i3, [ %i1 + 0x14 ] for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 40002298: 02 80 00 09 be 400022bc <== NEVER TAKEN 4000229c: c6 26 60 28 st %g3, [ %i1 + 0x28 ] 400022a0: 82 10 00 19 mov %i1, %g1 400022a4: 86 07 00 19 add %i4, %i1, %g3 sd->key_table[i].data = data; 400022a8: f4 20 60 30 st %i2, [ %g1 + 0x30 ] for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 400022ac: 82 00 60 08 add %g1, 8, %g1 400022b0: 80 a0 c0 01 cmp %g3, %g1 400022b4: 12 bf ff fd bne 400022a8 400022b8: b4 06 80 10 add %i2, %l0, %i2 sd->media_block_size = media_block_size; 400022bc: e0 26 60 1c st %l0, [ %i1 + 0x1c ] sc = rtems_blkdev_create( 400022c0: b8 10 00 19 mov %i1, %i4 400022c4: 37 10 00 07 sethi %hi(0x40001c00), %i3 400022c8: b4 10 00 11 mov %l1, %i2 400022cc: b6 16 e3 84 or %i3, 0x384, %i3 400022d0: 40 00 29 c7 call 4000c9ec 400022d4: 93 e8 00 10 restore %g0, %l0, %o1 return sc; 400022d8: 10 bf ff d5 b 4000222c <== NOT EXECUTED 400022dc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED