=============================================================================== 4000cbc8 : void *area_begin, uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace ) { 4000cbc8: 9d e3 bf a0 save %sp, -96, %sp struct ramdisk *rd = calloc(1, sizeof(*rd)); 4000cbcc: 92 10 20 10 mov 0x10, %o1 4000cbd0: 7f ff e0 63 call 40004d5c 4000cbd4: 90 10 20 01 mov 1, %o0 if (rd == NULL) { 4000cbd8: ba 92 20 00 orcc %o0, 0, %i5 4000cbdc: 02 80 00 0b be 4000cc08 <== NEVER TAKEN 4000cbe0: 80 a6 20 00 cmp %i0, 0 return NULL; } if (area_begin == NULL) { 4000cbe4: 02 80 00 0b be 4000cc10 4000cbe8: 92 10 00 19 mov %i1, %o1 return NULL; } rd->malloced = true; } else { rd->malloced = false; 4000cbec: c0 2f 60 0d clrb [ %i5 + 0xd ] } rd->block_size = media_block_size; rd->block_num = media_block_count; rd->area = area_begin; rd->trace = trace; rd->initialized = true; 4000cbf0: 82 10 20 01 mov 1, %g1 rd->block_size = media_block_size; 4000cbf4: f2 27 40 00 st %i1, [ %i5 ] rd->block_num = media_block_count; 4000cbf8: f4 27 60 04 st %i2, [ %i5 + 4 ] rd->area = area_begin; 4000cbfc: f0 27 60 08 st %i0, [ %i5 + 8 ] rd->trace = trace; 4000cc00: f6 2f 60 0e stb %i3, [ %i5 + 0xe ] rd->initialized = true; 4000cc04: c2 2f 60 0c stb %g1, [ %i5 + 0xc ] return rd; } 4000cc08: 81 c7 e0 08 ret 4000cc0c: 91 e8 00 1d restore %g0, %i5, %o0 area_begin = calloc(media_block_count, media_block_size); 4000cc10: 7f ff e0 53 call 40004d5c 4000cc14: 90 10 00 1a mov %i2, %o0 if (area_begin == NULL) { 4000cc18: b0 92 20 00 orcc %o0, 0, %i0 4000cc1c: 02 80 00 04 be 4000cc2c <== NEVER TAKEN 4000cc20: 82 10 20 01 mov 1, %g1 4000cc24: 10 bf ff f4 b 4000cbf4 4000cc28: c2 2f 60 0d stb %g1, [ %i5 + 0xd ] free(rd); 4000cc2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000cc30: 7f ff e0 cc call 40004f60 <== NOT EXECUTED 4000cc34: ba 10 20 00 clr %i5 <== NOT EXECUTED return NULL; 4000cc38: 30 bf ff f4 b,a 4000cc08 <== NOT EXECUTED =============================================================================== 4000cc3c : void ramdisk_free(ramdisk *rd) { 4000cc3c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (rd != NULL) { 4000cc40: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000cc44: 02 80 00 0c be 4000cc74 <== NOT EXECUTED 4000cc48: 01 00 00 00 nop <== NOT EXECUTED if (rd->malloced) { 4000cc4c: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1 <== NOT EXECUTED 4000cc50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cc54: 12 80 00 04 bne 4000cc64 <== NOT EXECUTED 4000cc58: 01 00 00 00 nop <== NOT EXECUTED free(rd->area); } free(rd); 4000cc5c: 7f ff e0 c1 call 40004f60 <== NOT EXECUTED 4000cc60: 81 e8 00 00 restore <== NOT EXECUTED free(rd->area); 4000cc64: 7f ff e0 bf call 40004f60 <== NOT EXECUTED 4000cc68: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED free(rd); 4000cc6c: 7f ff e0 bd call 40004f60 <== NOT EXECUTED 4000cc70: 81 e8 00 00 restore <== NOT EXECUTED } } 4000cc74: 81 c7 e0 08 ret <== NOT EXECUTED 4000cc78: 81 e8 00 00 restore <== NOT EXECUTED 4000cc7c: 00 00 00 00 unimp 0 <== NOT EXECUTED =============================================================================== 4000ca64 : return 0; } int ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) { 4000ca64: 9d e3 bf a0 save %sp, -96, %sp struct ramdisk *rd = rtems_disk_get_driver_data(dd); switch (req) 4000ca68: 03 08 00 10 sethi %hi(0x20004000), %g1 { 4000ca6c: ba 10 00 1a mov %i2, %i5 switch (req) 4000ca70: 82 10 62 07 or %g1, 0x207, %g1 4000ca74: 80 a6 40 01 cmp %i1, %g1 4000ca78: 02 80 00 28 be 4000cb18 4000ca7c: f6 06 20 3c ld [ %i0 + 0x3c ], %i3 4000ca80: 03 30 06 10 sethi %hi(0xc0184000), %g1 4000ca84: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 4000ca88: 80 a6 40 01 cmp %i1, %g1 4000ca8c: 12 80 00 21 bne 4000cb10 4000ca90: 01 00 00 00 nop { case RTEMS_BLKIO_REQUEST: { rtems_blkdev_request *r = argp; switch (r->req) 4000ca94: c2 06 80 00 ld [ %i2 ], %g1 4000ca98: 80 a0 60 00 cmp %g1, 0 4000ca9c: 02 80 00 2f be 4000cb58 4000caa0: 80 a0 60 01 cmp %g1, 1 4000caa4: 12 80 00 27 bne 4000cb40 <== NEVER TAKEN 4000caa8: 01 00 00 00 nop for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 4000caac: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 4000cab0: f2 06 e0 08 ld [ %i3 + 8 ], %i1 4000cab4: 80 a0 60 00 cmp %g1, 0 4000cab8: 02 80 00 0f be 4000caf4 <== NEVER TAKEN 4000cabc: b8 06 a0 18 add %i2, 0x18, %i4 4000cac0: b4 10 20 00 clr %i2 memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length); 4000cac4: d0 07 00 00 ld [ %i4 ], %o0 4000cac8: c2 06 c0 00 ld [ %i3 ], %g1 4000cacc: d4 07 20 04 ld [ %i4 + 4 ], %o2 4000cad0: d2 07 20 08 ld [ %i4 + 8 ], %o1 4000cad4: 90 5a 00 01 smul %o0, %g1, %o0 4000cad8: 40 00 16 a4 call 40012568 4000cadc: 90 06 40 08 add %i1, %o0, %o0 for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 4000cae0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 4000cae4: b4 06 a0 01 inc %i2 4000cae8: 80 a6 80 01 cmp %i2, %g1 4000caec: 0a bf ff f6 bcs 4000cac4 4000caf0: b8 07 20 10 add %i4, 0x10, %i4 (*req->done)(req, status); 4000caf4: c2 07 60 04 ld [ %i5 + 4 ], %g1 4000caf8: 92 10 20 00 clr %o1 4000cafc: 90 10 00 1d mov %i5, %o0 4000cb00: 9f c0 40 00 call %g1 4000cb04: 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); 4000cb08: 81 c7 e0 08 ret 4000cb0c: 81 e8 00 00 restore ramdisk_free(rd); } break; default: return rtems_blkdev_ioctl (dd, req, argp); 4000cb10: 40 00 0b 5d call 4000f884 4000cb14: 81 e8 00 00 restore if (rd->free_at_delete_request) { 4000cb18: c2 0e e0 0f ldub [ %i3 + 0xf ], %g1 4000cb1c: 80 a0 60 00 cmp %g1, 0 4000cb20: 12 80 00 22 bne 4000cba8 4000cb24: 01 00 00 00 nop break; } errno = EINVAL; 4000cb28: 40 00 16 53 call 40012474 <__errno> 4000cb2c: b0 10 3f ff mov -1, %i0 ! ffffffff 4000cb30: 82 10 20 16 mov 0x16, %g1 4000cb34: c2 22 00 00 st %g1, [ %o0 ] return -1; } 4000cb38: 81 c7 e0 08 ret 4000cb3c: 81 e8 00 00 restore errno = EINVAL; 4000cb40: 40 00 16 4d call 40012474 <__errno> <== NOT EXECUTED 4000cb44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cb48: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000cb4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000cb50: 81 c7 e0 08 ret <== NOT EXECUTED 4000cb54: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 4000cb58: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 4000cb5c: f2 06 e0 08 ld [ %i3 + 8 ], %i1 4000cb60: 80 a0 60 00 cmp %g1, 0 4000cb64: 02 bf ff e4 be 4000caf4 <== NEVER TAKEN 4000cb68: b8 06 a0 18 add %i2, 0x18, %i4 4000cb6c: b4 10 20 00 clr %i2 memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length); 4000cb70: d2 07 00 00 ld [ %i4 ], %o1 4000cb74: c2 06 c0 00 ld [ %i3 ], %g1 4000cb78: d4 07 20 04 ld [ %i4 + 4 ], %o2 4000cb7c: d0 07 20 08 ld [ %i4 + 8 ], %o0 4000cb80: 92 5a 40 01 smul %o1, %g1, %o1 4000cb84: 40 00 16 79 call 40012568 4000cb88: 92 06 40 09 add %i1, %o1, %o1 for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++) 4000cb8c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 4000cb90: b4 06 a0 01 inc %i2 4000cb94: 80 a6 80 01 cmp %i2, %g1 4000cb98: 0a bf ff f6 bcs 4000cb70 <== NEVER TAKEN 4000cb9c: b8 07 20 10 add %i4, 0x10, %i4 4000cba0: 10 bf ff d6 b 4000caf8 4000cba4: c2 07 60 04 ld [ %i5 + 4 ], %g1 ramdisk_free(rd); 4000cba8: 40 00 00 25 call 4000cc3c 4000cbac: 90 10 00 1b mov %i3, %o0 errno = EINVAL; 4000cbb0: 40 00 16 31 call 40012474 <__errno> 4000cbb4: b0 10 3f ff mov -1, %i0 4000cbb8: 82 10 20 16 mov 0x16, %g1 4000cbbc: c2 22 00 00 st %g1, [ %o0 ] } 4000cbc0: 81 c7 e0 08 ret 4000cbc4: 81 e8 00 00 restore =============================================================================== 40014398 : 40014398: 00 00 00 00 40 00 fb f4 40 00 fc 20 40 00 f9 f8 ....@...@.. @... 400143a8: 40 00 fa e4 40 00 fc 38 0a 0a 2a 2a 2a 20 42 45 @...@..8..*** BE 400143b8: 47 49 4e 20 4f 46 20 54 45 53 54 20 25 73 20 2a GIN OF TEST %s * 400143c8: 2a 2a 0a 2a 2a 2a 20 54 45 53 54 20 56 45 52 53 **.*** TEST VERS 400143d8: 49 4f 4e 3a 20 25 73 0a 2a 2a 2a 20 54 45 53 54 ION: %s.*** TEST 400143e8: 20 53 54 41 54 45 3a 20 25 73 0a 2a 2a 2a 20 54 STATE: %s.*** T 400143f8: 45 53 54 20 42 55 49 4c 44 3a 20 52 54 45 4d 53 EST BUILD: RTEMS 40014408: 5f 4e 45 54 57 4f 52 4b 49 4e 47 20 52 54 45 4d _NETWORKING RTEM 40014418: 53 5f 50 4f 53 49 58 5f 41 50 49 0a 2a 2a 2a 20 S_POSIX_API.*** 40014428: 54 45 53 54 20 54 4f 4f 4c 53 3a 20 37 2e 33 2e TEST TOOLS: 7.3. 40014438: 30 20 32 30 31 38 30 31 32 35 20 28 52 54 45 4d 0 20180125 (RTEM 40014448: 53 20 35 2c 20 52 53 42 20 32 35 66 34 64 62 30 S 5, RSB 25f4db0 40014458: 39 63 38 35 61 35 32 66 62 31 36 34 30 61 32 39 9c85a52fb1640a29 40014468: 66 39 62 64 63 32 64 65 38 63 32 37 36 38 39 38 f9bdc2de8c276898 40014478: 38 2c 20 4e 65 77 6c 69 62 20 33 2e 30 2e 30 29 8, Newlib 3.0.0) 40014488: 0a 00 00 00 00 00 00 00 0a 2a 2a 2a 20 45 4e 44 .........*** END 40014498: 20 4f 46 20 54 45 53 54 20 25 73 20 2a 2a 2a 0a OF TEST %s ***. 400144a8: 0a 00 00 00 00 00 00 00 45 58 50 45 43 54 45 44 ........EXPECTED 400144b8: 2d 50 41 53 53 00 00 00 45 58 50 45 43 54 45 44 -PASS...EXPECTED 400144c8: 2d 46 41 49 4c 00 00 00 55 53 45 52 5f 49 4e 50 -FAIL...USER_INP 400144d8: 55 54 00 00 00 00 00 00 49 4e 44 45 54 45 52 4d UT......INDETERM 400144e8: 49 4e 41 54 45 00 00 00 42 45 4e 43 48 4d 41 52 INATE...BENCHMAR 400144f8: 4b 00 00 00 K... =============================================================================== 4000f8c8 : rtems_blkdev_bnum media_block_count, bool trace, const char *disk, dev_t *dev_ptr ) { 4000f8c8: 9d e3 bf 90 save %sp, -112, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_device_major_number major = 0; ramdisk *rd = NULL; dev_t dev = 0; sc = rtems_io_register_driver(0, &ramdisk_ops, &major); 4000f8cc: 90 10 20 00 clr %o0 rtems_device_major_number major = 0; 4000f8d0: c0 27 bf fc clr [ %fp + -4 ] sc = rtems_io_register_driver(0, &ramdisk_ops, &major); 4000f8d4: 94 07 bf fc add %fp, -4, %o2 4000f8d8: 13 10 00 4f sethi %hi(0x40013c00), %o1 if (sc != RTEMS_SUCCESSFUL) { return RTEMS_UNSATISFIED; 4000f8dc: ba 10 20 0d mov 0xd, %i5 sc = rtems_io_register_driver(0, &ramdisk_ops, &major); 4000f8e0: 40 00 06 19 call 40011144 4000f8e4: 92 12 62 80 or %o1, 0x280, %o1 if (sc != RTEMS_SUCCESSFUL) { 4000f8e8: 80 a2 20 00 cmp %o0, 0 4000f8ec: 12 80 00 16 bne 4000f944 <== NEVER TAKEN 4000f8f0: 96 10 00 1a mov %i2, %o3 } rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace); 4000f8f4: 94 10 00 19 mov %i1, %o2 4000f8f8: 40 00 08 ba call 40011be0 4000f8fc: 92 10 00 18 mov %i0, %o1 if (rd == NULL) { 4000f900: b4 92 20 00 orcc %o0, 0, %i2 4000f904: 02 80 00 12 be 4000f94c <== NEVER TAKEN 4000f908: 9a 10 00 1a mov %i2, %o5 return RTEMS_UNSATISFIED; } dev = rtems_filesystem_make_dev_t(major, 0); sc = rtems_disk_create_phys( 4000f90c: f6 23 a0 5c st %i3, [ %sp + 0x5c ] temp.__overlay.major = _major; 4000f910: f6 07 bf fc ld [ %fp + -4 ], %i3 4000f914: 96 10 00 19 mov %i1, %o3 4000f918: 19 10 00 46 sethi %hi(0x40011800), %o4 4000f91c: 94 10 00 18 mov %i0, %o2 4000f920: 98 13 22 7c or %o4, 0x27c, %o4 4000f924: 90 10 00 1b mov %i3, %o0 4000f928: 7f ff d7 9e call 400057a0 4000f92c: 92 10 20 00 clr %o1 media_block_count, ramdisk_ioctl, rd, disk ); if (sc != RTEMS_SUCCESSFUL) { 4000f930: ba 92 20 00 orcc %o0, 0, %i5 4000f934: 12 80 00 09 bne 4000f958 <== NEVER TAKEN 4000f938: 01 00 00 00 nop rtems_io_unregister_driver(major); return RTEMS_UNSATISFIED; } *dev_ptr = dev; 4000f93c: f6 27 00 00 st %i3, [ %i4 ] 4000f940: c0 27 20 04 clr [ %i4 + 4 ] return RTEMS_SUCCESSFUL; } 4000f944: 81 c7 e0 08 ret 4000f948: 91 e8 00 1d restore %g0, %i5, %o0 rtems_io_unregister_driver(major); 4000f94c: 40 00 06 67 call 400112e8 <== NOT EXECUTED 4000f950: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 4000f954: 30 bf ff fc b,a 4000f944 <== NOT EXECUTED ramdisk_free(rd); 4000f958: 40 00 08 bf call 40011c54 <== NOT EXECUTED 4000f95c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_io_unregister_driver(major); 4000f960: 40 00 06 62 call 400112e8 <== NOT EXECUTED 4000f964: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 4000f968: 10 bf ff f7 b 4000f944 <== NOT EXECUTED 4000f96c: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED ... =============================================================================== 4000f1a4 : { 4000f1a4: 9d e3 bf a0 save %sp, -96, %sp _Mutex_Acquire( mutex ); 4000f1a8: 3b 10 00 5a sethi %hi(0x40016800), %i5 4000f1ac: 7f ff e7 2b call 40008e58 <_Mutex_Acquire> 4000f1b0: 90 17 62 6c or %i5, 0x26c, %o0 ! 40016a6c if (block < dd->block_count) 4000f1b4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000f1b8: 80 a6 40 01 cmp %i1, %g1 4000f1bc: 1a 80 00 2d bcc 4000f270 <== NEVER TAKEN 4000f1c0: b8 10 20 00 clr %i4 if (dd->block_to_media_block_shift >= 0) 4000f1c4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000f1c8: 80 a2 60 00 cmp %o1, 0 4000f1cc: 06 80 00 16 bl 4000f224 <== NEVER TAKEN 4000f1d0: 93 2e 40 09 sll %i1, %o1, %o1 *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000f1d4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000f1d8: 90 10 00 18 mov %i0, %o0 4000f1dc: 7f ff fc 27 call 4000e278 4000f1e0: 92 02 40 01 add %o1, %g1, %o1 4000f1e4: b8 10 00 08 mov %o0, %i4 switch (bd->state) 4000f1e8: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 4000f1ec: 80 a2 20 02 cmp %o0, 2 4000f1f0: 02 80 00 1d be 4000f264 4000f1f4: 82 10 20 03 mov 3, %g1 4000f1f8: 80 a2 20 07 cmp %o0, 7 4000f1fc: 12 80 00 23 bne 4000f288 4000f200: 80 a2 20 01 cmp %o0, 1 bd->state = state; 4000f204: 82 10 20 04 mov 4, %g1 4000f208: c2 27 20 20 st %g1, [ %i4 + 0x20 ] 4000f20c: b0 10 20 00 clr %i0 _Mutex_Release( mutex ); 4000f210: 7f ff e7 2e call 40008ec8 <_Mutex_Release> 4000f214: 90 17 62 6c or %i5, 0x26c, %o0 *bd_ptr = bd; 4000f218: f8 26 80 00 st %i4, [ %i2 ] } 4000f21c: 81 c7 e0 08 ret 4000f220: 81 e8 00 00 restore ((((uint64_t) block) * dd->block_size) / dd->media_block_size); 4000f224: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 <== NOT EXECUTED 4000f228: d6 06 20 20 ld [ %i0 + 0x20 ], %o3 <== NOT EXECUTED 4000f22c: 92 56 40 08 umul %i1, %o0, %o1 <== NOT EXECUTED 4000f230: 91 40 00 00 rd %y, %o0 <== NOT EXECUTED 4000f234: 40 00 10 31 call 400132f8 <__udivdi3> <== NOT EXECUTED 4000f238: 94 10 20 00 clr %o2 <== NOT EXECUTED *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000f23c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000f240: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000f244: 7f ff fc 0d call 4000e278 <== NOT EXECUTED 4000f248: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000f24c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED switch (bd->state) 4000f250: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 4000f254: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 4000f258: 12 bf ff e9 bne 4000f1fc <== NOT EXECUTED 4000f25c: 80 a2 20 07 cmp %o0, 7 <== NOT EXECUTED bd->state = state; 4000f260: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 4000f264: b0 10 20 00 clr %i0 4000f268: 10 bf ff ea b 4000f210 4000f26c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] 4000f270: 90 17 62 6c or %i5, 0x26c, %o0 <== NOT EXECUTED 4000f274: 7f ff e7 15 call 40008ec8 <_Mutex_Release> <== NOT EXECUTED 4000f278: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *bd_ptr = bd; 4000f27c: f8 26 80 00 st %i4, [ %i2 ] <== NOT EXECUTED } 4000f280: 81 c7 e0 08 ret <== NOT EXECUTED 4000f284: 81 e8 00 00 restore <== NOT EXECUTED switch (bd->state) 4000f288: 02 80 00 04 be 4000f298 <== ALWAYS TAKEN 4000f28c: 82 10 20 05 mov 5, %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2); 4000f290: 7f ff f7 ce call 4000d1c8 <== NOT EXECUTED 4000f294: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED bd->state = state; 4000f298: b0 10 20 00 clr %i0 4000f29c: 10 bf ff dd b 4000f210 4000f2a0: c2 27 20 20 st %g1, [ %i4 + 0x20 ] =============================================================================== 4000f2a4 : { 4000f2a4: 9d e3 bf a0 save %sp, -96, %sp _Mutex_Acquire( mutex ); 4000f2a8: 37 10 00 5a sethi %hi(0x40016800), %i3 4000f2ac: 7f ff e6 eb call 40008e58 <_Mutex_Acquire> 4000f2b0: 90 16 e2 6c or %i3, 0x26c, %o0 ! 40016a6c if (block < dd->block_count) 4000f2b4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000f2b8: 80 a6 40 01 cmp %i1, %g1 4000f2bc: 1a 80 00 41 bcc 4000f3c0 <== NEVER TAKEN 4000f2c0: ba 10 00 18 mov %i0, %i5 if (dd->block_to_media_block_shift >= 0) 4000f2c4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000f2c8: 80 a2 60 00 cmp %o1, 0 4000f2cc: 06 80 00 27 bl 4000f368 <== NEVER TAKEN 4000f2d0: 93 2e 40 09 sll %i1, %o1, %o1 *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000f2d4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000f2d8: 90 10 00 1d mov %i5, %o0 4000f2dc: 7f ff fb e7 call 4000e278 4000f2e0: 92 02 40 01 add %o1, %g1, %o1 4000f2e4: b8 10 00 08 mov %o0, %i4 switch (bd->state) 4000f2e8: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 4000f2ec: 80 a2 20 02 cmp %o0, 2 4000f2f0: 22 80 00 2e be,a 4000f3a8 4000f2f4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 4000f2f8: 80 a2 20 07 cmp %o0, 7 4000f2fc: 12 80 00 38 bne 4000f3dc 4000f300: 80 a2 20 01 cmp %o0, 1 ++dd->stats.read_hits; 4000f304: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 4000f308: 82 00 60 01 inc %g1 4000f30c: c2 27 60 44 st %g1, [ %i5 + 0x44 ] bd->state = state; 4000f310: 82 10 20 04 mov 4, %g1 4000f314: c2 27 20 20 st %g1, [ %i4 + 0x20 ] 4000f318: b0 10 20 00 clr %i0 if (bdbuf_cache.read_ahead_task != 0 4000f31c: 21 10 00 5a sethi %hi(0x40016800), %l0 4000f320: a0 14 22 44 or %l0, 0x244, %l0 ! 40016a44 4000f324: d0 04 20 dc ld [ %l0 + 0xdc ], %o0 4000f328: 80 a2 20 00 cmp %o0, 0 4000f32c: 02 80 00 0a be 4000f354 4000f330: 01 00 00 00 nop && dd->read_ahead.trigger == block 4000f334: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 4000f338: 80 a6 40 01 cmp %i1, %g1 4000f33c: 12 80 00 06 bne 4000f354 4000f340: 01 00 00 00 nop && !rtems_bdbuf_is_read_ahead_active (dd)) 4000f344: c2 07 60 64 ld [ %i5 + 0x64 ], %g1 4000f348: 80 a0 60 00 cmp %g1, 0 4000f34c: 22 80 00 4c be,a 4000f47c <== ALWAYS TAKEN 4000f350: c2 04 20 e0 ld [ %l0 + 0xe0 ], %g1 _Mutex_Release( mutex ); 4000f354: 7f ff e6 dd call 40008ec8 <_Mutex_Release> 4000f358: 90 16 e2 6c or %i3, 0x26c, %o0 *bd_ptr = bd; 4000f35c: f8 26 80 00 st %i4, [ %i2 ] } 4000f360: 81 c7 e0 08 ret 4000f364: 81 e8 00 00 restore ((((uint64_t) block) * dd->block_size) / dd->media_block_size); 4000f368: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 <== NOT EXECUTED 4000f36c: d6 06 20 20 ld [ %i0 + 0x20 ], %o3 <== NOT EXECUTED 4000f370: 92 56 40 08 umul %i1, %o0, %o1 <== NOT EXECUTED 4000f374: 91 40 00 00 rd %y, %o0 <== NOT EXECUTED 4000f378: 40 00 0f e0 call 400132f8 <__udivdi3> <== NOT EXECUTED 4000f37c: 94 10 20 00 clr %o2 <== NOT EXECUTED *media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start; 4000f380: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); 4000f384: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000f388: 7f ff fb bc call 4000e278 <== NOT EXECUTED 4000f38c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000f390: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED switch (bd->state) 4000f394: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 4000f398: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 4000f39c: 12 bf ff d8 bne 4000f2fc <== NOT EXECUTED 4000f3a0: 80 a2 20 07 cmp %o0, 7 <== NOT EXECUTED ++dd->stats.read_hits; 4000f3a4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 <== NOT EXECUTED 4000f3a8: 82 00 60 01 inc %g1 4000f3ac: c2 27 60 44 st %g1, [ %i5 + 0x44 ] bd->state = state; 4000f3b0: b0 10 20 00 clr %i0 4000f3b4: 82 10 20 03 mov 3, %g1 4000f3b8: 10 bf ff d9 b 4000f31c 4000f3bc: c2 27 20 20 st %g1, [ %i4 + 0x20 ] rtems_bdbuf_buffer *bd = NULL; 4000f3c0: b8 10 20 00 clr %i4 <== NOT EXECUTED 4000f3c4: 90 16 e2 6c or %i3, 0x26c, %o0 <== NOT EXECUTED 4000f3c8: 7f ff e6 c0 call 40008ec8 <_Mutex_Release> <== NOT EXECUTED 4000f3cc: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *bd_ptr = bd; 4000f3d0: f8 26 80 00 st %i4, [ %i2 ] <== NOT EXECUTED } 4000f3d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000f3d8: 81 e8 00 00 restore <== NOT EXECUTED switch (bd->state) 4000f3dc: 22 80 00 04 be,a 4000f3ec <== ALWAYS TAKEN 4000f3e0: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4); 4000f3e4: 7f ff f7 79 call 4000d1c8 <== NOT EXECUTED 4000f3e8: 92 10 20 0b mov 0xb, %o1 <== NOT EXECUTED ++dd->stats.read_misses; 4000f3ec: 82 00 60 01 inc %g1 4000f3f0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] if (dd->read_ahead.trigger != block) 4000f3f4: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 4000f3f8: 80 a6 40 01 cmp %i1, %g1 4000f3fc: 02 80 00 0f be 4000f438 4000f400: 94 10 20 01 mov 1, %o2 4000f404: c2 07 60 64 ld [ %i5 + 0x64 ], %g1 if (rtems_bdbuf_is_read_ahead_active (dd)) 4000f408: 80 a0 60 00 cmp %g1, 0 4000f40c: 02 80 00 07 be 4000f428 <== ALWAYS TAKEN 4000f410: 84 06 60 01 add %i1, 1, %g2 previous = the_node->previous; 4000f414: c4 07 60 68 ld [ %i5 + 0x68 ], %g2 <== NOT EXECUTED next->previous = previous; 4000f418: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED previous->next = next; 4000f41c: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED node->next = NULL; 4000f420: c0 27 60 64 clr [ %i5 + 0x64 ] <== NOT EXECUTED dd->read_ahead.trigger = block + 1; 4000f424: 84 06 60 01 add %i1, 1, %g2 <== NOT EXECUTED dd->read_ahead.next = block + 2; 4000f428: 82 06 60 02 add %i1, 2, %g1 dd->read_ahead.trigger = block + 1; 4000f42c: c4 27 60 6c st %g2, [ %i5 + 0x6c ] dd->read_ahead.next = block + 2; 4000f430: c2 27 60 70 st %g1, [ %i5 + 0x70 ] sc = rtems_bdbuf_execute_read_request (dd, bd, 1); 4000f434: 94 10 20 01 mov 1, %o2 4000f438: 92 10 00 1c mov %i4, %o1 4000f43c: 7f ff fd 67 call 4000e9d8 4000f440: 90 10 00 1d mov %i5, %o0 if (sc == RTEMS_SUCCESSFUL) 4000f444: b0 92 20 00 orcc %o0, 0, %i0 4000f448: 32 bf ff b5 bne,a 4000f31c 4000f44c: b8 10 20 00 clr %i4 next = the_node->next; 4000f450: c8 07 00 00 ld [ %i4 ], %g4 previous = the_node->previous; 4000f454: c6 07 20 04 ld [ %i4 + 4 ], %g3 bd->state = state; 4000f458: 82 10 20 03 mov 3, %g1 4000f45c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] 4000f460: c4 07 20 28 ld [ %i4 + 0x28 ], %g2 next->previous = previous; 4000f464: c6 21 20 04 st %g3, [ %g4 + 4 ] ++bd->group->users; 4000f468: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 previous->next = next; 4000f46c: c8 20 c0 00 st %g4, [ %g3 ] 4000f470: 82 00 60 01 inc %g1 4000f474: 10 bf ff aa b 4000f31c 4000f478: c2 20 a0 0c st %g1, [ %g2 + 0xc ] if (rtems_chain_is_empty (chain)) 4000f47c: b2 04 20 e4 add %l0, 0xe4, %i1 4000f480: 80 a0 40 19 cmp %g1, %i1 4000f484: 02 80 00 09 be 4000f4a8 <== ALWAYS TAKEN 4000f488: 01 00 00 00 nop old_last = tail->previous; 4000f48c: c2 04 20 e8 ld [ %l0 + 0xe8 ], %g1 <== NOT EXECUTED the_node->next = tail; 4000f490: f2 27 60 64 st %i1, [ %i5 + 0x64 ] rtems_chain_append_unprotected (chain, &dd->read_ahead.node); 4000f494: 84 07 60 64 add %i5, 0x64, %g2 tail->previous = the_node; 4000f498: c4 24 20 e8 st %g2, [ %l0 + 0xe8 ] old_last->next = the_node; 4000f49c: c4 20 40 00 st %g2, [ %g1 ] the_node->previous = old_last; 4000f4a0: 10 bf ff ad b 4000f354 4000f4a4: c2 27 60 68 st %g1, [ %i5 + 0x68 ] sc = rtems_event_send (bdbuf_cache.read_ahead_task, 4000f4a8: 40 00 06 ac call 40010f58 4000f4ac: 92 10 20 02 mov 2, %o1 if (sc != RTEMS_SUCCESSFUL) 4000f4b0: 80 a2 20 00 cmp %o0, 0 4000f4b4: 22 bf ff f7 be,a 4000f490 <== ALWAYS TAKEN 4000f4b8: c2 04 20 e8 ld [ %l0 + 0xe8 ], %g1 rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP); 4000f4bc: 7f ff f7 2c call 4000d16c <== NOT EXECUTED 4000f4c0: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 4000f4c4: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f4c8 : { 4000f4c8: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 4000f4cc: 80 a6 20 00 cmp %i0, 0 4000f4d0: 02 80 00 2f be 4000f58c <== NEVER TAKEN 4000f4d4: 01 00 00 00 nop _Mutex_Acquire( mutex ); 4000f4d8: 3b 10 00 5a sethi %hi(0x40016800), %i5 4000f4dc: 7f ff e6 5f call 40008e58 <_Mutex_Acquire> 4000f4e0: 90 17 62 6c or %i5, 0x26c, %o0 ! 40016a6c switch (bd->state) 4000f4e4: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f4e8: 80 a2 20 04 cmp %o0, 4 4000f4ec: 02 80 00 21 be 4000f570 4000f4f0: 01 00 00 00 nop 4000f4f4: 18 80 00 28 bgu 4000f594 4000f4f8: 80 a2 20 06 cmp %o0, 6 4000f4fc: 80 a2 20 03 cmp %o0, 3 4000f500: 12 80 00 35 bne 4000f5d4 <== NEVER TAKEN 4000f504: 01 00 00 00 nop 4000f508: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 --bd->group->users; 4000f50c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000f510: 82 00 7f ff add %g1, -1, %g1 4000f514: c2 20 a0 0c st %g1, [ %g2 + 0xc ] bd->state = state; 4000f518: 82 10 20 02 mov 2, %g1 old_last = tail->previous; 4000f51c: 11 10 00 5a sethi %hi(0x40016800), %o0 4000f520: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 4000f524: 90 12 22 44 or %o0, 0x244, %o0 4000f528: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 the_node->next = tail; 4000f52c: 84 02 20 64 add %o0, 0x64, %g2 4000f530: c4 26 00 00 st %g2, [ %i0 ] tail->previous = the_node; 4000f534: f0 22 20 68 st %i0, [ %o0 + 0x68 ] old_last->next = the_node; 4000f538: f0 20 40 00 st %i0, [ %g1 ] the_node->previous = old_last; 4000f53c: c2 26 20 04 st %g1, [ %i0 + 4 ] if (bd->waiters) 4000f540: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f544: 80 a0 60 00 cmp %g1, 0 4000f548: 22 80 00 1c be,a 4000f5b8 4000f54c: c2 02 20 b4 ld [ %o0 + 0xb4 ], %g1 if (waiters->count > 0) 4000f550: c2 02 20 84 ld [ %o0 + 0x84 ], %g1 4000f554: 80 a0 60 00 cmp %g1, 0 4000f558: 22 80 00 09 be,a 4000f57c 4000f55c: 90 17 62 6c or %i5, 0x26c, %o0 _Condition_Broadcast( condition_variable ); 4000f560: 40 00 08 72 call 40011728 <_Condition_Broadcast> 4000f564: 90 02 20 88 add %o0, 0x88, %o0 _Mutex_Release( mutex ); 4000f568: 10 80 00 05 b 4000f57c 4000f56c: 90 17 62 6c or %i5, 0x26c, %o0 rtems_bdbuf_add_to_modified_list_after_access (bd); 4000f570: 7f ff f8 c1 call 4000d874 4000f574: 90 10 00 18 mov %i0, %o0 4000f578: 90 17 62 6c or %i5, 0x26c, %o0 4000f57c: 7f ff e6 53 call 40008ec8 <_Mutex_Release> 4000f580: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f584: 81 c7 e0 08 ret 4000f588: 81 e8 00 00 restore } 4000f58c: 81 c7 e0 08 ret <== NOT EXECUTED 4000f590: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED switch (bd->state) 4000f594: 18 80 00 10 bgu 4000f5d4 <== NEVER TAKEN 4000f598: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 4000f59c: 7f ff fe d6 call 4000f0f4 4000f5a0: 90 10 00 18 mov %i0, %o0 4000f5a4: 90 17 62 6c or %i5, 0x26c, %o0 4000f5a8: 7f ff e6 48 call 40008ec8 <_Mutex_Release> 4000f5ac: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f5b0: 81 c7 e0 08 ret 4000f5b4: 81 e8 00 00 restore if (waiters->count > 0) 4000f5b8: 80 a0 60 00 cmp %g1, 0 4000f5bc: 22 bf ff f0 be,a 4000f57c 4000f5c0: 90 17 62 6c or %i5, 0x26c, %o0 _Condition_Broadcast( condition_variable ); 4000f5c4: 40 00 08 59 call 40011728 <_Condition_Broadcast> 4000f5c8: 90 02 20 b8 add %o0, 0xb8, %o0 _Mutex_Release( mutex ); 4000f5cc: 10 bf ff ec b 4000f57c 4000f5d0: 90 17 62 6c or %i5, 0x26c, %o0 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0); 4000f5d4: 7f ff f6 fd call 4000d1c8 <== NOT EXECUTED 4000f5d8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 4000f5dc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f5e0 : { 4000f5e0: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 4000f5e4: 80 a6 20 00 cmp %i0, 0 4000f5e8: 02 80 00 1b be 4000f654 <== NEVER TAKEN 4000f5ec: 01 00 00 00 nop _Mutex_Acquire( mutex ); 4000f5f0: 3b 10 00 5a sethi %hi(0x40016800), %i5 4000f5f4: 7f ff e6 19 call 40008e58 <_Mutex_Acquire> 4000f5f8: 90 17 62 6c or %i5, 0x26c, %o0 ! 40016a6c switch (bd->state) 4000f5fc: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 4000f600: 80 a2 20 03 cmp %o0, 3 4000f604: 0a 80 00 16 bcs 4000f65c <== NEVER TAKEN 4000f608: 80 a2 20 05 cmp %o0, 5 4000f60c: 08 80 00 0b bleu 4000f638 4000f610: 80 a2 20 06 cmp %o0, 6 4000f614: 12 80 00 12 bne 4000f65c <== NEVER TAKEN 4000f618: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 4000f61c: 7f ff fe b6 call 4000f0f4 4000f620: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 4000f624: 90 17 62 6c or %i5, 0x26c, %o0 4000f628: 7f ff e6 28 call 40008ec8 <_Mutex_Release> 4000f62c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f630: 81 c7 e0 08 ret 4000f634: 81 e8 00 00 restore rtems_bdbuf_add_to_modified_list_after_access (bd); 4000f638: 7f ff f8 8f call 4000d874 4000f63c: 90 10 00 18 mov %i0, %o0 4000f640: 90 17 62 6c or %i5, 0x26c, %o0 4000f644: 7f ff e6 21 call 40008ec8 <_Mutex_Release> 4000f648: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4000f64c: 81 c7 e0 08 ret 4000f650: 81 e8 00 00 restore } 4000f654: 81 c7 e0 08 ret <== NOT EXECUTED 4000f658: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6); 4000f65c: 7f ff f6 db call 4000d1c8 <== NOT EXECUTED 4000f660: 92 10 20 0d mov 0xd, %o1 <== NOT EXECUTED 4000f664: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000f858 : rtems_bdbuf_unlock_cache (); } void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd) { 4000f858: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED _Mutex_Acquire( mutex ); 4000f85c: 3b 10 00 5a sethi %hi(0x40016800), %i5 <== NOT EXECUTED 4000f860: 7f ff e5 7e call 40008e58 <_Mutex_Acquire> <== NOT EXECUTED 4000f864: 90 17 62 6c or %i5, 0x26c, %o0 ! 40016a6c <== NOT EXECUTED rtems_bdbuf_lock_cache (); memset (&dd->stats, 0, sizeof(dd->stats)); 4000f868: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED 4000f86c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000f870: 90 06 20 44 add %i0, 0x44, %o0 <== NOT EXECUTED 4000f874: 40 00 0b 79 call 40012658 <== NOT EXECUTED 4000f878: b0 17 62 6c or %i5, 0x26c, %i0 <== NOT EXECUTED _Mutex_Release( mutex ); 4000f87c: 7f ff e5 93 call 40008ec8 <_Mutex_Release> <== NOT EXECUTED 4000f880: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000f6f4 : { 4000f6f4: 9d e3 bf a0 save %sp, -96, %sp if (sync) 4000f6f8: 80 a6 a0 00 cmp %i2, 0 4000f6fc: 12 80 00 48 bne 4000f81c 4000f700: ba 10 00 18 mov %i0, %i5 _Mutex_Acquire( mutex ); 4000f704: 39 10 00 5a sethi %hi(0x40016800), %i4 4000f708: 7f ff e5 d4 call 40008e58 <_Mutex_Acquire> 4000f70c: 90 17 22 6c or %i4, 0x26c, %o0 ! 40016a6c if (block_size > 0) 4000f710: 80 a6 60 00 cmp %i1, 0 4000f714: 02 80 00 3e be 4000f80c 4000f718: b0 10 20 0a mov 0xa, %i0 if (size > bdbuf_config.buffer_max) 4000f71c: 03 10 00 4f sethi %hi(0x40013c00), %g1 4000f720: 82 10 61 3c or %g1, 0x13c, %g1 ! 40013d3c 4000f724: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 4000f728: 80 a6 40 02 cmp %i1, %g2 4000f72c: 18 80 00 38 bgu 4000f80c <== NEVER TAKEN 4000f730: 86 06 7f ff add %i1, -1, %g3 bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1; 4000f734: 81 80 20 00 wr %g0, %y 4000f738: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4000f73c: 01 00 00 00 nop 4000f740: 01 00 00 00 nop 4000f744: 84 70 c0 02 udiv %g3, %g2, %g2 4000f748: 84 00 a0 01 inc %g2 for (bds_per_size = 1; 4000f74c: 80 a0 a0 01 cmp %g2, 1 4000f750: 08 80 00 06 bleu 4000f768 4000f754: 82 10 20 01 mov 1, %g1 bds_per_size <<= 1) 4000f758: 83 28 60 01 sll %g1, 1, %g1 for (bds_per_size = 1; 4000f75c: 80 a0 80 01 cmp %g2, %g1 4000f760: 38 bf ff ff bgu,a 4000f75c 4000f764: 83 28 60 01 sll %g1, 1, %g1 return bdbuf_cache.max_bds_per_group / bds_per_size; 4000f768: 05 10 00 5a sethi %hi(0x40016800), %g2 4000f76c: 81 80 20 00 wr %g0, %y 4000f770: f4 00 a2 64 ld [ %g2 + 0x264 ], %i2 4000f774: 01 00 00 00 nop 4000f778: 01 00 00 00 nop 4000f77c: b4 76 80 01 udiv %i2, %g1, %i2 if (bds_per_group != 0) 4000f780: 80 a6 a0 00 cmp %i2, 0 4000f784: 02 80 00 22 be 4000f80c <== NEVER TAKEN 4000f788: b0 10 20 0a mov 0xa, %i0 uint32_t media_blocks_per_block = block_size / dd->media_block_size; 4000f78c: f6 07 60 20 ld [ %i5 + 0x20 ], %i3 4000f790: 81 80 20 00 wr %g0, %y 4000f794: 01 00 00 00 nop 4000f798: 01 00 00 00 nop 4000f79c: 01 00 00 00 nop 4000f7a0: 86 76 40 1b udiv %i1, %i3, %g3 while ((one << block_to_media_block_shift) < media_blocks_per_block) 4000f7a4: 80 a0 e0 01 cmp %g3, 1 4000f7a8: 08 80 00 09 bleu 4000f7cc 4000f7ac: 82 10 20 00 clr %g1 4000f7b0: 88 10 20 01 mov 1, %g4 ++block_to_media_block_shift; 4000f7b4: 82 00 60 01 inc %g1 while ((one << block_to_media_block_shift) < media_blocks_per_block) 4000f7b8: 85 29 00 01 sll %g4, %g1, %g2 4000f7bc: 80 a0 80 03 cmp %g2, %g3 4000f7c0: 2a bf ff fe bcs,a 4000f7b8 4000f7c4: 82 00 60 01 inc %g1 4000f7c8: b7 2e c0 01 sll %i3, %g1, %i3 if ((dd->media_block_size << block_to_media_block_shift) != block_size) 4000f7cc: 80 a6 40 1b cmp %i1, %i3 4000f7d0: 32 80 00 02 bne,a 4000f7d8 <== NEVER TAKEN 4000f7d4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED dd->block_count = dd->size / media_blocks_per_block; 4000f7d8: 81 80 20 00 wr %g0, %y 4000f7dc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 4000f7e0: 01 00 00 00 nop 4000f7e4: 01 00 00 00 nop 4000f7e8: 84 70 80 03 udiv %g2, %g3, %g2 dd->block_size = block_size; 4000f7ec: f2 27 60 24 st %i1, [ %i5 + 0x24 ] rtems_bdbuf_do_purge_dev (dd); 4000f7f0: 90 10 00 1d mov %i5, %o0 dd->block_count = dd->size / media_blocks_per_block; 4000f7f4: c4 27 60 28 st %g2, [ %i5 + 0x28 ] rtems_status_code sc = RTEMS_SUCCESSFUL; 4000f7f8: b0 10 20 00 clr %i0 dd->media_blocks_per_block = media_blocks_per_block; 4000f7fc: c6 27 60 2c st %g3, [ %i5 + 0x2c ] dd->block_to_media_block_shift = block_to_media_block_shift; 4000f800: c2 27 60 30 st %g1, [ %i5 + 0x30 ] rtems_bdbuf_do_purge_dev (dd); 4000f804: 7f ff fb 53 call 4000e550 4000f808: f4 27 60 34 st %i2, [ %i5 + 0x34 ] _Mutex_Release( mutex ); 4000f80c: 7f ff e5 af call 40008ec8 <_Mutex_Release> 4000f810: 90 17 22 6c or %i4, 0x26c, %o0 } 4000f814: 81 c7 e0 08 ret 4000f818: 81 e8 00 00 restore rtems_bdbuf_syncdev (dd); 4000f81c: 7f ff ff 93 call 4000f668 4000f820: 90 10 00 18 mov %i0, %o0 _Mutex_Acquire( mutex ); 4000f824: 10 bf ff b9 b 4000f708 4000f828: 39 10 00 5a sethi %hi(0x40016800), %i4 =============================================================================== 40004d6c : { 40004d6c: 9d e3 bf a0 save %sp, -96, %sp if (bd == NULL) 40004d70: 80 a6 20 00 cmp %i0, 0 40004d74: 02 80 00 48 be 40004e94 <== NEVER TAKEN 40004d78: 01 00 00 00 nop _Mutex_Acquire( mutex ); 40004d7c: 39 10 00 59 sethi %hi(0x40016400), %i4 40004d80: 40 00 1a 39 call 4000b664 <_Mutex_Acquire> 40004d84: 90 17 21 58 or %i4, 0x158, %o0 ! 40016558 switch (bd->state) 40004d88: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 40004d8c: 80 a2 20 03 cmp %o0, 3 40004d90: 0a 80 00 54 bcs 40004ee0 <== NEVER TAKEN 40004d94: 80 a2 20 05 cmp %o0, 5 40004d98: 08 80 00 0b bleu 40004dc4 40004d9c: 80 a2 20 06 cmp %o0, 6 40004da0: 12 80 00 50 bne 40004ee0 <== NEVER TAKEN 40004da4: 01 00 00 00 nop rtems_bdbuf_discard_buffer_after_access (bd); 40004da8: 7f ff fe 94 call 400047f8 40004dac: 90 10 00 18 mov %i0, %o0 _Mutex_Release( mutex ); 40004db0: 90 17 21 58 or %i4, 0x158, %o0 40004db4: 40 00 1a 48 call 4000b6d4 <_Mutex_Release> 40004db8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 40004dbc: 81 c7 e0 08 ret 40004dc0: 81 e8 00 00 restore bd->state = state; 40004dc4: 82 10 20 08 mov 8, %g1 old_last = tail->previous; 40004dc8: 3b 10 00 59 sethi %hi(0x40016400), %i5 40004dcc: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 40004dd0: ba 17 61 30 or %i5, 0x130, %i5 40004dd4: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 the_node->next = tail; 40004dd8: 84 07 60 7c add %i5, 0x7c, %g2 40004ddc: c4 26 00 00 st %g2, [ %i0 ] tail->previous = the_node; 40004de0: f0 27 60 80 st %i0, [ %i5 + 0x80 ] old_last->next = the_node; 40004de4: f0 20 40 00 st %i0, [ %g1 ] the_node->previous = old_last; 40004de8: c2 26 20 04 st %g1, [ %i0 + 4 ] if (bd->waiters) 40004dec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40004df0: 80 a0 60 00 cmp %g1, 0 40004df4: 32 80 00 2a bne,a 40004e9c 40004df8: c2 07 60 84 ld [ %i5 + 0x84 ], %g1 rtems_bdbuf_wake_swapper (); 40004dfc: 7f ff f6 cd call 40002930 40004e00: 37 10 00 59 sethi %hi(0x40016400), %i3 switch (bd->state) 40004e04: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 40004e08: 80 a2 20 01 cmp %o0, 1 40004e0c: 0a 80 00 0e bcs 40004e44 <== NEVER TAKEN 40004e10: b6 16 e1 cc or %i3, 0x1cc, %i3 40004e14: 80 a2 20 07 cmp %o0, 7 40004e18: 08 80 00 0d bleu 40004e4c 40004e1c: 80 a2 20 0a cmp %o0, 0xa 40004e20: 18 80 00 09 bgu 40004e44 <== NEVER TAKEN 40004e24: 01 00 00 00 nop rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters); 40004e28: 90 10 00 18 mov %i0, %o0 40004e2c: 7f ff f8 38 call 40002f0c 40004e30: 92 10 00 1b mov %i3, %o1 switch (bd->state) 40004e34: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 40004e38: 80 a2 20 01 cmp %o0, 1 40004e3c: 1a bf ff f7 bcc 40004e18 <== ALWAYS TAKEN 40004e40: 80 a2 20 07 cmp %o0, 7 rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9); 40004e44: 7f ff f6 a2 call 400028cc <== NOT EXECUTED 40004e48: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED if (bd->waiters == 0 40004e4c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40004e50: 80 a0 60 00 cmp %g1, 0 40004e54: 12 bf ff d7 bne 40004db0 40004e58: 82 02 3f ff add %o0, -1, %g1 && (bd->state == RTEMS_BDBUF_STATE_CACHED 40004e5c: 80 a0 60 01 cmp %g1, 1 40004e60: 38 bf ff d5 bgu,a 40004db4 <== NEVER TAKEN 40004e64: 90 17 21 58 or %i4, 0x158, %o0 <== NOT EXECUTED if (bd->state == RTEMS_BDBUF_STATE_EMPTY) 40004e68: 80 a2 20 01 cmp %o0, 1 40004e6c: 02 80 00 12 be 40004eb4 40004e70: 01 00 00 00 nop if (waiters->count > 0) 40004e74: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1 40004e78: 80 a0 60 00 cmp %g1, 0 40004e7c: 22 bf ff ce be,a 40004db4 40004e80: 90 17 21 58 or %i4, 0x158, %o0 _Condition_Broadcast( condition_variable ); 40004e84: 40 00 14 14 call 40009ed4 <_Condition_Broadcast> 40004e88: 90 07 60 b8 add %i5, 0xb8, %o0 _Mutex_Release( mutex ); 40004e8c: 10 bf ff ca b 40004db4 40004e90: 90 17 21 58 or %i4, 0x158, %o0 } 40004e94: 81 c7 e0 08 ret <== NOT EXECUTED 40004e98: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED if (waiters->count > 0) 40004e9c: 80 a0 60 00 cmp %g1, 0 40004ea0: 02 bf ff d7 be 40004dfc 40004ea4: 01 00 00 00 nop _Condition_Broadcast( condition_variable ); 40004ea8: 40 00 14 0b call 40009ed4 <_Condition_Broadcast> 40004eac: 90 07 60 88 add %i5, 0x88, %o0 40004eb0: 30 bf ff d3 b,a 40004dfc rtems_bdbuf_remove_from_tree (bd); 40004eb4: 7f ff f8 67 call 40003050 40004eb8: 90 10 00 18 mov %i0, %o0 the_node->previous = after_node; 40004ebc: 03 10 00 59 sethi %hi(0x40016400), %g1 40004ec0: 82 10 61 90 or %g1, 0x190, %g1 ! 40016590 40004ec4: c2 26 20 04 st %g1, [ %i0 + 4 ] bd->state = state; 40004ec8: c0 26 20 20 clr [ %i0 + 0x20 ] before_node = after_node->next; 40004ecc: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 after_node->next = the_node; 40004ed0: f0 27 60 60 st %i0, [ %i5 + 0x60 ] the_node->next = before_node; 40004ed4: c2 26 00 00 st %g1, [ %i0 ] before_node->previous = the_node; 40004ed8: 10 bf ff e7 b 40004e74 40004edc: f0 20 60 04 st %i0, [ %g1 + 4 ] rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5); 40004ee0: 7f ff f6 7b call 400028cc <== NOT EXECUTED 40004ee4: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED 40004ee8: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40003674 : const char *partition, const char *parent_block_device, rtems_blkdev_bnum media_block_begin, rtems_blkdev_bnum media_block_count ) { 40003674: 9d e3 bf 38 save %sp, -200, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; int fd = open(parent_block_device, O_RDWR); 40003678: 92 10 20 02 mov 2, %o1 4000367c: 90 10 00 19 mov %i1, %o0 40003680: 40 00 0c 21 call 40006704 40003684: ba 10 20 04 mov 4, %i5 if (fd >= 0) { 40003688: 80 a2 20 00 cmp %o0, 0 4000368c: 06 80 00 0f bl 400036c8 40003690: b8 10 00 08 mov %o0, %i4 int rv; struct stat st; rv = fstat(fd, &st); 40003694: 40 00 08 db call 40005a00 40003698: 92 07 bf a0 add %fp, -96, %o1 if (rv == 0 && S_ISBLK(st.st_mode)) { 4000369c: 80 a2 20 00 cmp %o0, 0 400036a0: 12 80 00 0c bne 400036d0 <== NEVER TAKEN 400036a4: 03 00 00 3c sethi %hi(0xf000), %g1 400036a8: f2 07 bf ac ld [ %fp + -84 ], %i1 400036ac: b2 0e 40 01 and %i1, %g1, %i1 400036b0: 03 00 00 18 sethi %hi(0x6000), %g1 400036b4: 80 a6 40 01 cmp %i1, %g1 400036b8: 02 80 00 08 be 400036d8 400036bc: ba 10 20 15 mov 0x15, %i5 } else { sc = RTEMS_INVALID_NODE; } if (sc != RTEMS_SUCCESSFUL) { close(fd); 400036c0: 40 00 08 5e call 40005838 400036c4: 90 10 00 1c mov %i4, %o0 } else { sc = RTEMS_INVALID_ID; } return sc; } 400036c8: 81 c7 e0 08 ret 400036cc: 91 e8 00 1d restore %g0, %i5, %o0 sc = RTEMS_INVALID_NODE; 400036d0: 10 bf ff fc b 400036c0 <== NOT EXECUTED 400036d4: ba 10 20 15 mov 0x15, %i5 <== NOT EXECUTED 400036d8: 94 07 bf 9c add %fp, -100, %o2 400036dc: 90 10 00 1c mov %i4, %o0 400036e0: 13 10 01 10 sethi %hi(0x40044000), %o1 sc = RTEMS_NOT_IMPLEMENTED; 400036e4: ba 10 20 18 mov 0x18, %i5 400036e8: 40 00 09 34 call 40005bb8 400036ec: 92 12 62 09 or %o1, 0x209, %o1 if (rv == 0) { 400036f0: 80 a2 20 00 cmp %o0, 0 400036f4: 12 bf ff f3 bne 400036c0 400036f8: 90 10 20 80 mov 0x80, %o0 rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx)); 400036fc: 40 00 0a 9e call 40006174 40003700: ba 10 20 1a mov 0x1a, %i5 if (ctx != NULL) { 40003704: a0 92 20 00 orcc %o0, 0, %l0 40003708: 02 bf ff ee be 400036c0 4000370c: d2 07 bf 9c ld [ %fp + -100 ], %o1 sc = rtems_disk_init_log( 40003710: 96 10 00 1b mov %i3, %o3 40003714: 40 00 01 60 call 40003c94 40003718: 94 10 00 1a mov %i2, %o2 if (sc == RTEMS_SUCCESSFUL) { 4000371c: ba 92 20 00 orcc %o0, 0, %i5 40003720: 12 80 00 0e bne 40003758 40003724: 96 10 00 10 mov %l0, %o3 ctx->fd = fd; 40003728: f8 24 20 78 st %i4, [ %l0 + 0x78 ] rv = IMFS_make_generic_node( 4000372c: 92 16 61 ff or %i1, 0x1ff, %o1 40003730: 15 10 00 53 sethi %hi(0x40014c00), %o2 40003734: 90 10 00 18 mov %i0, %o0 40003738: 40 00 03 a0 call 400045b8 4000373c: 94 12 a0 6c or %o2, 0x6c, %o2 if (rv != 0) { 40003740: 80 a2 20 00 cmp %o0, 0 40003744: 02 bf ff e1 be 400036c8 40003748: 90 10 00 10 mov %l0, %o0 free(ctx); 4000374c: 40 00 08 97 call 400059a8 40003750: ba 10 20 0d mov 0xd, %i5 40003754: 30 bf ff db b,a 400036c0 free(ctx); 40003758: 40 00 08 94 call 400059a8 4000375c: 90 10 00 10 mov %l0, %o0 40003760: 30 bf ff d8 b,a 400036c0 =============================================================================== 4000fc38 : rtems_device_driver rtems_blkdev_generic_ioctl( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 4000fc38: 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; 4000fc3c: c2 06 80 00 ld [ %i2 ], %g1 if (args->command != RTEMS_BLKIO_REQUEST) 4000fc40: d2 06 a0 04 ld [ %i2 + 4 ], %o1 rtems_disk_device *dd = iop->data1; 4000fc44: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 if (args->command != RTEMS_BLKIO_REQUEST) 4000fc48: 03 30 06 10 sethi %hi(0xc0184000), %g1 4000fc4c: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 4000fc50: 80 a2 40 01 cmp %o1, %g1 4000fc54: 02 80 00 08 be 4000fc74 <== NEVER TAKEN 4000fc58: 82 10 3f ff mov -1, %g1 { args->ioctl_return = dd->ioctl(dd, 4000fc5c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4000fc60: 9f c0 40 00 call %g1 4000fc64: d4 06 a0 08 ld [ %i2 + 8 ], %o2 4000fc68: d0 26 a0 0c st %o0, [ %i2 + 0xc ] */ args->ioctl_return = -1; } return RTEMS_SUCCESSFUL; } 4000fc6c: 81 c7 e0 08 ret 4000fc70: 91 e8 20 00 restore %g0, 0, %o0 args->ioctl_return = -1; 4000fc74: 10 bf ff fe b 4000fc6c <== NOT EXECUTED 4000fc78: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED =============================================================================== 4000f9f8 : rtems_device_driver rtems_blkdev_generic_read( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 4000f9f8: 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; 4000f9fc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000fa00: e4 00 60 28 ld [ %g1 + 0x28 ], %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); 4000fa04: f8 1e a0 08 ldd [ %i2 + 8 ], %i4 <== NOT EXECUTED uint32_t block_size = dd->block_size; 4000fa08: e2 04 a0 24 ld [ %l2 + 0x24 ], %l1 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 4000fa0c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000fa10: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 4000fa14: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000fa18: 40 00 0d 15 call 40012e6c <__divdi3> <== NOT EXECUTED 4000fa1c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fa20: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 4000fa24: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fa28: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000fa2c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 4000fa30: 40 00 0d 9a call 40013098 <__moddi3> <== NOT EXECUTED 4000fa34: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED args->bytes_moved = 0; 4000fa38: c0 26 a0 1c clr [ %i2 + 0x1c ] <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fa3c: a0 10 00 09 mov %o1, %l0 <== NOT EXECUTED uint32_t count = args->count; 4000fa40: f8 06 a0 14 ld [ %i2 + 0x14 ], %i4 <== NOT EXECUTED while (count > 0) 4000fa44: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000fa48: 12 80 00 1a bne 4000fab0 <== NOT EXECUTED 4000fa4c: f6 06 a0 10 ld [ %i2 + 0x10 ], %i3 <== NOT EXECUTED { 4000fa50: 81 c7 e0 08 ret <== NOT EXECUTED 4000fa54: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED uint32_t copy; rc = rtems_bdbuf_read(dd, block, &diskbuf); if (rc != RTEMS_SUCCESSFUL) break; copy = block_size - blkofs; 4000fa58: ba 24 40 10 sub %l1, %l0, %i5 <== NOT EXECUTED 4000fa5c: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 4000fa60: 38 80 00 02 bgu,a 4000fa68 <== NOT EXECUTED 4000fa64: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED if (copy > count) copy = count; memcpy(buf, (char *)diskbuf->buffer + blkofs, copy); 4000fa68: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 4000fa6c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 4000fa70: 92 02 40 10 add %o1, %l0, %o1 <== NOT EXECUTED 4000fa74: 40 00 0a bd call 40012568 <== NOT EXECUTED 4000fa78: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED rc = rtems_bdbuf_release(diskbuf); 4000fa7c: 7f ff fe 93 call 4000f4c8 <== NOT EXECUTED 4000fa80: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED args->bytes_moved += copy; 4000fa84: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 <== NOT EXECUTED 4000fa88: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED 4000fa8c: c2 26 a0 1c st %g1, [ %i2 + 0x1c ] <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 4000fa90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fa94: 12 80 00 0f bne 4000fad0 <== NOT EXECUTED 4000fa98: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED break; count -= copy; buf += copy; 4000fa9c: b6 06 c0 1d add %i3, %i5, %i3 <== NOT EXECUTED blkofs = 0; block++; 4000faa0: b2 06 60 01 inc %i1 <== NOT EXECUTED while (count > 0) 4000faa4: b8 a7 00 1d subcc %i4, %i5, %i4 <== NOT EXECUTED 4000faa8: 02 80 00 0c be 4000fad8 <== NOT EXECUTED 4000faac: a0 10 20 00 clr %l0 <== NOT EXECUTED rc = rtems_bdbuf_read(dd, block, &diskbuf); 4000fab0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fab4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 4000fab8: 7f ff fd fb call 4000f2a4 <== NOT EXECUTED 4000fabc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000fac0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 4000fac4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000fac8: 02 bf ff e4 be 4000fa58 <== NOT EXECUTED 4000facc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED } return rc; } 4000fad0: 81 c7 e0 08 ret <== NOT EXECUTED 4000fad4: 81 e8 00 00 restore <== NOT EXECUTED { 4000fad8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000fadc: 81 c7 e0 08 ret <== NOT EXECUTED 4000fae0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000fae4 : rtems_device_driver rtems_blkdev_generic_write( rtems_device_major_number major RTEMS_UNUSED, rtems_device_minor_number minor RTEMS_UNUSED, void * arg) { 4000fae4: 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; 4000fae8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000faec: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== 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); 4000faf0: f8 1e a0 08 ldd [ %i2 + 8 ], %i4 <== NOT EXECUTED uint32_t block_size = dd->block_size; 4000faf4: e0 04 60 24 ld [ %l1 + 0x24 ], %l0 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 4000faf8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000fafc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000fb00: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000fb04: 40 00 0c da call 40012e6c <__divdi3> <== NOT EXECUTED 4000fb08: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fb0c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size); 4000fb10: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fb14: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000fb18: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000fb1c: 40 00 0d 5f call 40013098 <__moddi3> <== NOT EXECUTED 4000fb20: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED args->bytes_moved = 0; 4000fb24: c0 26 a0 1c clr [ %i2 + 0x1c ] <== NOT EXECUTED uint32_t blkofs = (uint32_t) (args->offset % block_size); 4000fb28: b6 10 00 09 mov %o1, %i3 <== NOT EXECUTED uint32_t count = args->count; 4000fb2c: f8 06 a0 14 ld [ %i2 + 0x14 ], %i4 <== NOT EXECUTED while (count > 0) 4000fb30: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000fb34: 12 80 00 21 bne 4000fbb8 <== NOT EXECUTED 4000fb38: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1 <== NOT EXECUTED { 4000fb3c: 10 80 00 2c b 4000fbec <== NOT EXECUTED 4000fb40: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_bdbuf_buffer *diskbuf; uint32_t copy; if ((blkofs == 0) && (count >= block_size)) 4000fb44: 0a 80 00 20 bcs 4000fbc4 <== NOT EXECUTED 4000fb48: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED rc = rtems_bdbuf_get(dd, block, &diskbuf); 4000fb4c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000fb50: 7f ff fd 95 call 4000f1a4 <== NOT EXECUTED 4000fb54: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else rc = rtems_bdbuf_read(dd, block, &diskbuf); if (rc != RTEMS_SUCCESSFUL) 4000fb58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fb5c: 12 80 00 21 bne 4000fbe0 <== NOT EXECUTED 4000fb60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED break; copy = block_size - blkofs; 4000fb64: ba 24 00 1b sub %l0, %i3, %i5 <== NOT EXECUTED 4000fb68: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 4000fb6c: 38 80 00 02 bgu,a 4000fb74 <== NOT EXECUTED 4000fb70: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED if (copy > count) copy = count; memcpy((char *)diskbuf->buffer + blkofs, buf, copy); 4000fb74: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 4000fb78: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 4000fb7c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED 4000fb80: 40 00 0a 7a call 40012568 <== NOT EXECUTED 4000fb84: 90 02 00 1b add %o0, %i3, %o0 <== NOT EXECUTED args->bytes_moved += copy; 4000fb88: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 <== NOT EXECUTED 4000fb8c: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED 4000fb90: c2 26 a0 1c st %g1, [ %i2 + 0x1c ] <== NOT EXECUTED rc = rtems_bdbuf_release_modified(diskbuf); if (rc != RTEMS_SUCCESSFUL) break; count -= copy; buf += copy; 4000fb94: b2 06 40 1d add %i1, %i5, %i1 <== NOT EXECUTED rc = rtems_bdbuf_release_modified(diskbuf); 4000fb98: 7f ff fe 92 call 4000f5e0 <== NOT EXECUTED 4000fb9c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 4000fba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fba4: 12 80 00 0f bne 4000fbe0 <== NOT EXECUTED 4000fba8: b8 a7 00 1d subcc %i4, %i5, %i4 <== NOT EXECUTED blkofs = 0; block++; 4000fbac: b0 06 20 01 inc %i0 <== NOT EXECUTED while (count > 0) 4000fbb0: 02 80 00 0e be 4000fbe8 <== NOT EXECUTED 4000fbb4: b6 10 20 00 clr %i3 <== NOT EXECUTED if ((blkofs == 0) && (count >= block_size)) 4000fbb8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000fbbc: 02 bf ff e2 be 4000fb44 <== NOT EXECUTED 4000fbc0: 80 a7 00 10 cmp %i4, %l0 <== NOT EXECUTED rc = rtems_bdbuf_read(dd, block, &diskbuf); 4000fbc4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000fbc8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 4000fbcc: 7f ff fd b6 call 4000f2a4 <== NOT EXECUTED 4000fbd0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if (rc != RTEMS_SUCCESSFUL) 4000fbd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fbd8: 02 bf ff e3 be 4000fb64 <== NOT EXECUTED 4000fbdc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } return rc; } 4000fbe0: 81 c7 e0 08 ret <== NOT EXECUTED 4000fbe4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { 4000fbe8: 90 10 20 00 clr %o0 <== NOT EXECUTED } 4000fbec: 81 c7 e0 08 ret <== NOT EXECUTED 4000fbf0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 4000f884 : #include #include int rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp) { 4000f884: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; int rc = 0; switch (req) 4000f888: 03 10 01 10 sethi %hi(0x40044000), %g1 4000f88c: 84 10 62 03 or %g1, 0x203, %g2 ! 40044203 <__end+0x2c9f3> 4000f890: 80 a6 40 02 cmp %i1, %g2 4000f894: 22 80 00 4e be,a 4000f9cc 4000f898: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f89c: 08 80 00 18 bleu 4000f8fc 4000f8a0: 05 08 00 10 sethi %hi(0x20004000), %g2 4000f8a4: 84 10 62 09 or %g1, 0x209, %g2 4000f8a8: 80 a6 40 02 cmp %i1, %g2 4000f8ac: 22 80 00 4b be,a 4000f9d8 4000f8b0: f0 26 80 00 st %i0, [ %i2 ] 4000f8b4: 28 80 00 3b bleu,a 4000f9a0 4000f8b8: 82 10 62 05 or %g1, 0x205, %g1 4000f8bc: 82 10 62 0b or %g1, 0x20b, %g1 4000f8c0: 80 a6 40 01 cmp %i1, %g1 4000f8c4: 02 80 00 23 be 4000f950 <== NEVER TAKEN 4000f8c8: 03 20 01 10 sethi %hi(0x80044000), %g1 4000f8cc: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 4000f8d0: 80 a6 40 01 cmp %i1, %g1 4000f8d4: 12 80 00 43 bne 4000f9e0 <== NEVER TAKEN 4000f8d8: 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); 4000f8dc: d2 06 80 00 ld [ %i2 ], %o1 4000f8e0: 7f ff ff 85 call 4000f6f4 4000f8e4: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 4000f8e8: 80 a2 20 00 cmp %o0, 0 4000f8ec: 12 80 00 27 bne 4000f988 <== NEVER TAKEN 4000f8f0: 01 00 00 00 nop } break; case RTEMS_BLKIO_GETSIZE: *(rtems_blkdev_bnum *) argp = dd->size; break; 4000f8f4: 81 c7 e0 08 ret 4000f8f8: 91 e8 20 00 restore %g0, 0, %o0 switch (req) 4000f8fc: 86 10 a2 0a or %g2, 0x20a, %g3 4000f900: 80 a6 40 03 cmp %i1, %g3 4000f904: 02 80 00 2e be 4000f9bc <== NEVER TAKEN 4000f908: 90 10 00 18 mov %i0, %o0 4000f90c: 28 80 00 17 bleu,a 4000f968 4000f910: 84 10 a2 06 or %g2, 0x206, %g2 4000f914: 84 10 a2 0c or %g2, 0x20c, %g2 4000f918: 80 a6 40 02 cmp %i1, %g2 4000f91c: 02 80 00 09 be 4000f940 <== NEVER TAKEN 4000f920: 82 10 62 02 or %g1, 0x202, %g1 4000f924: 80 a6 40 01 cmp %i1, %g1 4000f928: 12 80 00 2e bne 4000f9e0 <== NEVER TAKEN 4000f92c: 01 00 00 00 nop *(uint32_t *) argp = dd->media_block_size; 4000f930: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f934: c2 26 80 00 st %g1, [ %i2 ] break; 4000f938: 81 c7 e0 08 ret 4000f93c: 91 e8 20 00 restore %g0, 0, %o0 case RTEMS_BLKIO_GETDEVSTATS: rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp); break; case RTEMS_BLKIO_RESETDEVSTATS: rtems_bdbuf_reset_device_stats(dd); 4000f940: 7f ff ff c6 call 4000f858 <== NOT EXECUTED 4000f944: b0 10 20 00 clr %i0 <== NOT EXECUTED break; 4000f948: 81 c7 e0 08 ret <== NOT EXECUTED 4000f94c: 81 e8 00 00 restore <== NOT EXECUTED rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp); 4000f950: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000f954: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000f958: 7f ff ff b5 call 4000f82c <== NOT EXECUTED 4000f95c: b0 10 20 00 clr %i0 <== NOT EXECUTED break; 4000f960: 81 c7 e0 08 ret <== NOT EXECUTED 4000f964: 81 e8 00 00 restore <== NOT EXECUTED switch (req) 4000f968: 80 a6 40 02 cmp %i1, %g2 4000f96c: 12 80 00 1d bne 4000f9e0 4000f970: 01 00 00 00 nop sc = rtems_bdbuf_syncdev(dd); 4000f974: 7f ff ff 3d call 4000f668 4000f978: 90 10 00 18 mov %i0, %o0 if (sc != RTEMS_SUCCESSFUL) { 4000f97c: 80 a2 20 00 cmp %o0, 0 4000f980: 02 bf ff dd be 4000f8f4 <== ALWAYS TAKEN 4000f984: 01 00 00 00 nop errno = EIO; 4000f988: 40 00 0a bb call 40012474 <__errno> <== NOT EXECUTED 4000f98c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000f990: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4000f994: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f998: 81 c7 e0 08 ret <== NOT EXECUTED 4000f99c: 81 e8 00 00 restore <== NOT EXECUTED switch (req) 4000f9a0: 80 a6 40 01 cmp %i1, %g1 4000f9a4: 12 80 00 0f bne 4000f9e0 <== NEVER TAKEN 4000f9a8: 01 00 00 00 nop *(rtems_blkdev_bnum *) argp = dd->size; 4000f9ac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000f9b0: c2 26 80 00 st %g1, [ %i2 ] break; 4000f9b4: 81 c7 e0 08 ret 4000f9b8: 91 e8 20 00 restore %g0, 0, %o0 rtems_bdbuf_purge_dev(dd); 4000f9bc: 7f ff ff 44 call 4000f6cc <== NOT EXECUTED 4000f9c0: b0 10 20 00 clr %i0 <== NOT EXECUTED break; 4000f9c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000f9c8: 81 e8 00 00 restore <== NOT EXECUTED *(uint32_t *) argp = dd->block_size; 4000f9cc: c2 26 80 00 st %g1, [ %i2 ] break; 4000f9d0: 81 c7 e0 08 ret 4000f9d4: 91 e8 20 00 restore %g0, 0, %o0 break; 4000f9d8: 81 c7 e0 08 ret 4000f9dc: 91 e8 20 00 restore %g0, 0, %o0 default: errno = EINVAL; 4000f9e0: 40 00 0a a5 call 40012474 <__errno> 4000f9e4: b0 10 3f ff mov -1, %i0 4000f9e8: 82 10 20 16 mov 0x16, %g1 4000f9ec: c2 22 00 00 st %g1, [ %o0 ] rc = -1; break; } return rc; } 4000f9f0: 81 c7 e0 08 ret 4000f9f4: 81 e8 00 00 restore =============================================================================== 400034f4 : rtems_status_code rtems_disk_io_done(void) { 400034f4: 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) { 400034f8: 21 10 00 5a sethi %hi(0x40016800), %l0 400034fc: c2 04 21 c8 ld [ %l0 + 0x1c8 ], %g1 ! 400169c8 40003500: 35 10 00 5a sethi %hi(0x40016800), %i2 40003504: 80 a0 60 00 cmp %g1, 0 40003508: 02 80 00 1f be 40003584 <== NEVER TAKEN 4000350c: fa 06 a1 cc ld [ %i2 + 0x1cc ], %i5 40003510: b6 10 20 00 clr %i3 40003514: b2 14 21 c8 or %l0, 0x1c8, %i1 rtems_disk_device_table *dtab = disktab + major; 40003518: 83 2e e0 03 sll %i3, 3, %g1 4000351c: b8 07 40 01 add %i5, %g1, %i4 for (minor = 0; minor < dtab->size; ++minor) { 40003520: c6 07 20 04 ld [ %i4 + 4 ], %g3 40003524: 80 a0 e0 00 cmp %g3, 0 40003528: 02 80 00 10 be 40003568 4000352c: c4 07 40 01 ld [ %i5 + %g1 ], %g2 40003530: ba 10 20 00 clr %i5 rtems_disk_device *dd = dtab->minor [minor]; 40003534: 83 2f 60 02 sll %i5, 2, %g1 40003538: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if (dd != NULL) { 4000353c: 90 90 60 00 orcc %g1, 0, %o0 40003540: 02 80 00 06 be 40003558 <== ALWAYS TAKEN 40003544: ba 07 60 01 inc %i5 free_disk_device(dd); 40003548: 7f ff fe 99 call 40002fac <== NOT EXECUTED 4000354c: 01 00 00 00 nop <== NOT EXECUTED 40003550: c6 07 20 04 ld [ %i4 + 4 ], %g3 <== NOT EXECUTED 40003554: c4 07 00 00 ld [ %i4 ], %g2 <== NOT EXECUTED for (minor = 0; minor < dtab->size; ++minor) { 40003558: 80 a0 c0 1d cmp %g3, %i5 4000355c: 18 bf ff f7 bgu 40003538 40003560: 83 2f 60 02 sll %i5, 2, %g1 40003564: fa 06 a1 cc ld [ %i2 + 0x1cc ], %i5 } } free(dtab->minor); 40003568: 40 00 06 7e call 40004f60 4000356c: 90 10 00 02 mov %g2, %o0 for (major = 0; major < disktab_size; ++major) { 40003570: c2 06 40 00 ld [ %i1 ], %g1 40003574: b6 06 e0 01 inc %i3 40003578: 80 a0 40 1b cmp %g1, %i3 4000357c: 18 bf ff e8 bgu 4000351c 40003580: 83 2e e0 03 sll %i3, 3, %g1 } free(disktab); 40003584: 90 10 00 1d mov %i5, %o0 40003588: 40 00 06 76 call 40004f60 4000358c: b0 10 20 00 clr %i0 disktab = NULL; 40003590: c0 26 a1 cc clr [ %i2 + 0x1cc ] disktab_size = 0; 40003594: c0 24 21 c8 clr [ %l0 + 0x1c8 ] return RTEMS_SUCCESSFUL; } 40003598: 81 c7 e0 08 ret 4000359c: 81 e8 00 00 restore =============================================================================== 4000348c : } } rtems_status_code rtems_disk_io_initialize(void) { 4000348c: 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) { 40003490: 3b 10 00 5a sethi %hi(0x40016800), %i5 40003494: c2 07 61 c8 ld [ %i5 + 0x1c8 ], %g1 ! 400169c8 40003498: 80 a0 60 00 cmp %g1, 0 4000349c: 12 80 00 10 bne 400034dc <== NEVER TAKEN 400034a0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } disktab = calloc(size, sizeof(rtems_disk_device_table)); 400034a4: 92 10 20 08 mov 8, %o1 400034a8: 90 10 20 08 mov 8, %o0 400034ac: 40 00 06 2c call 40004d5c 400034b0: 39 10 00 5a sethi %hi(0x40016800), %i4 400034b4: d0 27 21 cc st %o0, [ %i4 + 0x1cc ] ! 400169cc if (disktab == NULL) { 400034b8: 80 a2 20 00 cmp %o0, 0 400034bc: 02 80 00 08 be 400034dc <== NEVER TAKEN 400034c0: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } sc = rtems_bdbuf_init(); 400034c4: 40 00 2f 2e call 4000f17c 400034c8: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 400034cc: b0 92 20 00 orcc %o0, 0, %i0 400034d0: 12 80 00 05 bne 400034e4 <== NEVER TAKEN 400034d4: 82 10 20 08 mov 8, %g1 free(disktab); return RTEMS_UNSATISFIED; } disktab_size = size; 400034d8: c2 27 61 c8 st %g1, [ %i5 + 0x1c8 ] return RTEMS_SUCCESSFUL; } 400034dc: 81 c7 e0 08 ret 400034e0: 81 e8 00 00 restore free(disktab); 400034e4: 40 00 06 9f call 40004f60 <== NOT EXECUTED 400034e8: d0 07 21 cc ld [ %i4 + 0x1cc ], %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 400034ec: 81 c7 e0 08 ret <== NOT EXECUTED 400034f0: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED =============================================================================== 4000b410 : rtems_disk_device * rtems_disk_next(dev_t dev) { 4000b410: 9d e3 bf a0 save %sp, -96, %sp rtems_disk_device_table *dtab = NULL; rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; if (dev != (dev_t) -1) { 4000b414: 80 a6 3f ff cmp %i0, -1 4000b418: 02 80 00 3e be 4000b510 4000b41c: 80 a6 7f ff cmp %i1, -1 rtems_filesystem_split_dev_t(dev, major, minor); /* If minor wraps around */ if ((minor + 1) < minor) { 4000b420: 02 80 00 37 be 4000b4fc <== NEVER TAKEN 4000b424: ba 06 60 01 add %i1, 1, %i5 _Mutex_Acquire( mutex ); 4000b428: 33 10 00 73 sethi %hi(0x4001cc00), %i1 4000b42c: 40 00 1d 4a call 40012954 <_Mutex_Acquire> 4000b430: 90 16 63 48 or %i1, 0x348, %o0 ! 4001cf48 diskdevs_protected = true; 4000b434: 82 10 20 01 mov 1, %g1 4000b438: 35 10 00 78 sethi %hi(0x4001e000), %i2 4000b43c: c2 2e a1 a4 stb %g1, [ %i2 + 0x1a4 ] ! 4001e1a4 } } disk_lock(); if (major >= disktab_size) { 4000b440: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000b444: c8 00 61 a8 ld [ %g1 + 0x1a8 ], %g4 ! 4001e1a8 4000b448: 80 a1 00 18 cmp %g4, %i0 4000b44c: 08 80 00 1b bleu 4000b4b8 <== NEVER TAKEN 4000b450: 03 10 00 78 sethi %hi(0x4001e000), %g1 disk_unlock(); return NULL; } dtab = disktab + major; 4000b454: c4 00 61 ac ld [ %g1 + 0x1ac ], %g2 ! 4001e1ac 4000b458: b9 2e 20 03 sll %i0, 3, %i4 4000b45c: c2 00 80 1c ld [ %g2 + %i4 ], %g1 4000b460: b8 00 80 1c add %g2, %i4, %i4 while (true) { if (dtab->minor == NULL || minor >= dtab->size) { 4000b464: 80 a0 60 00 cmp %g1, 0 4000b468: 22 80 00 0d be,a 4000b49c 4000b46c: b0 06 20 01 inc %i0 4000b470: c6 07 20 04 ld [ %i4 + 4 ], %g3 4000b474: 80 a0 c0 1d cmp %g3, %i5 4000b478: 08 80 00 08 bleu 4000b498 4000b47c: b7 2f 60 02 sll %i5, 2, %i3 disk_unlock(); return NULL; } dtab = disktab + major; } else if (dtab->minor [minor] == NULL) { 4000b480: c6 00 40 1b ld [ %g1 + %i3 ], %g3 4000b484: 80 a0 e0 00 cmp %g3, 0 4000b488: 12 80 00 12 bne 4000b4d0 4000b48c: 80 a0 60 00 cmp %g1, 0 if (dtab->minor == NULL || minor >= dtab->size) { 4000b490: 12 bf ff f8 bne 4000b470 <== ALWAYS TAKEN 4000b494: ba 07 60 01 inc %i5 ++major; 4000b498: b0 06 20 01 inc %i0 if (major >= disktab_size) { 4000b49c: 80 a1 00 18 cmp %g4, %i0 4000b4a0: 08 80 00 06 bleu 4000b4b8 4000b4a4: 83 2e 20 03 sll %i0, 3, %g1 minor = 0; 4000b4a8: ba 10 20 00 clr %i5 dtab = disktab + major; 4000b4ac: b8 00 80 01 add %g2, %g1, %i4 4000b4b0: 10 bf ff ed b 4000b464 4000b4b4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 diskdevs_protected = false; 4000b4b8: c0 2e a1 a4 clrb [ %i2 + 0x1a4 ] _Mutex_Release( mutex ); 4000b4bc: 90 16 63 48 or %i1, 0x348, %o0 4000b4c0: 40 00 1d 41 call 400129c4 <_Mutex_Release> 4000b4c4: b0 10 20 00 clr %i0 return NULL; 4000b4c8: 81 c7 e0 08 ret 4000b4cc: 81 e8 00 00 restore ++minor; } else { ++dtab->minor [minor]->uses; 4000b4d0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 4000b4d4: 82 00 60 01 inc %g1 4000b4d8: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 4000b4dc: 90 16 63 48 or %i1, 0x348, %o0 diskdevs_protected = false; 4000b4e0: c0 2e a1 a4 clrb [ %i2 + 0x1a4 ] 4000b4e4: 40 00 1d 38 call 400129c4 <_Mutex_Release> 4000b4e8: 01 00 00 00 nop disk_unlock(); return dtab->minor [minor]; 4000b4ec: c2 07 00 00 ld [ %i4 ], %g1 4000b4f0: f0 00 40 1b ld [ %g1 + %i3 ], %i0 4000b4f4: 81 c7 e0 08 ret 4000b4f8: 81 e8 00 00 restore if ((major + 1) < major) { 4000b4fc: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED 4000b500: 02 80 00 09 be 4000b524 <== NOT EXECUTED 4000b504: ba 10 20 00 clr %i5 <== NOT EXECUTED 4000b508: 10 bf ff c8 b 4000b428 <== NOT EXECUTED 4000b50c: b0 06 20 01 inc %i0 <== NOT EXECUTED if (dev != (dev_t) -1) { 4000b510: 12 bf ff c4 bne 4000b420 <== NEVER TAKEN 4000b514: 80 a6 7f ff cmp %i1, -1 rtems_device_minor_number minor = 0; 4000b518: ba 10 20 00 clr %i5 rtems_device_major_number major = 0; 4000b51c: 10 bf ff c3 b 4000b428 4000b520: b0 10 20 00 clr %i0 } } } 4000b524: 81 c7 e0 08 ret <== NOT EXECUTED 4000b528: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 400033b8 : rtems_disk_device * rtems_disk_obtain(dev_t dev) { 400033b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400033bc: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 400033c0: b8 10 00 01 mov %g1, %i4 rtems_disk_device *dd = NULL; rtems_interrupt_lock_context lock_context; rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context); if (!diskdevs_protected) { 400033c4: 3b 10 00 5a sethi %hi(0x40016800), %i5 400033c8: c4 0f 61 c5 ldub [ %i5 + 0x1c5 ], %g2 ! 400169c5 400033cc: 80 a0 a0 00 cmp %g2, 0 400033d0: 02 80 00 14 be 40003420 <== ALWAYS TAKEN 400033d4: 94 10 20 00 clr %o2 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400033d8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400033dc: 01 00 00 00 nop <== NOT EXECUTED _Mutex_Acquire( mutex ); 400033e0: 39 10 00 56 sethi %hi(0x40015800), %i4 <== NOT EXECUTED 400033e4: 40 00 16 9d call 40008e58 <_Mutex_Acquire> <== NOT EXECUTED 400033e8: 90 17 20 98 or %i4, 0x98, %o0 ! 40015898 <== NOT EXECUTED diskdevs_protected = true; 400033ec: 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); 400033f0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400033f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400033f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED diskdevs_protected = true; 400033fc: c2 2f 61 c5 stb %g1, [ %i5 + 0x1c5 ] <== NOT EXECUTED dd = get_disk_entry(dev, false); 40003400: 7f ff fe 5b call 40002d6c <== NOT EXECUTED 40003404: 01 00 00 00 nop <== NOT EXECUTED diskdevs_protected = false; 40003408: c0 2f 61 c5 clrb [ %i5 + 0x1c5 ] <== NOT EXECUTED dd = get_disk_entry(dev, false); 4000340c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Mutex_Release( mutex ); 40003410: 40 00 16 ae call 40008ec8 <_Mutex_Release> <== NOT EXECUTED 40003414: 90 17 20 98 or %i4, 0x98, %o0 <== NOT EXECUTED disk_unlock(); } return dd; } 40003418: 81 c7 e0 08 ret <== NOT EXECUTED 4000341c: 81 e8 00 00 restore <== NOT EXECUTED dd = get_disk_entry(dev, false); 40003420: 90 10 00 18 mov %i0, %o0 40003424: 7f ff fe 52 call 40002d6c 40003428: 92 10 00 19 mov %i1, %o1 4000342c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40003430: 82 10 00 1c mov %i4, %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40003434: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40003438: 01 00 00 00 nop 4000343c: 81 c7 e0 08 ret 40003440: 81 e8 00 00 restore =============================================================================== 40003444 : rtems_status_code rtems_disk_release(rtems_disk_device *dd) { 40003444: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_interrupt_lock_context lock_context; dev_t dev = dd->dev; 40003448: d0 1e 00 00 ldd [ %i0 ], %o0 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000344c: 91 d0 20 09 ta 9 <== NOT EXECUTED unsigned uses = 0; bool deleted = false; rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context); uses = --dd->uses; 40003450: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 40003454: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED deleted = dd->deleted; 40003458: c6 0e 20 40 ldub [ %i0 + 0x40 ], %g3 <== NOT EXECUTED uses = --dd->uses; 4000345c: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40003460: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40003464: 01 00 00 00 nop rtems_interrupt_lock_release(&diskdevs_lock, &lock_context); if (uses == 0 && deleted) { 40003468: 80 a0 a0 00 cmp %g2, 0 4000346c: 12 80 00 06 bne 40003484 40003470: 80 88 e0 ff btst 0xff, %g3 40003474: 02 80 00 04 be 40003484 40003478: 01 00 00 00 nop rtems_disk_delete(dev); 4000347c: 7f ff ff be call 40003374 40003480: 01 00 00 00 nop } return RTEMS_SUCCESSFUL; } 40003484: 81 c7 e0 08 ret 40003488: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40007450 : */ rtems_device_driver rtems_fdisk_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void* arg RTEMS_UNUSED) { 40007450: 9d e3 bf 80 save %sp, -128, %sp const rtems_flashdisk_config* c = rtems_flashdisk_configuration; rtems_flashdisk* fd; rtems_status_code sc; sc = rtems_disk_io_initialize (); 40007454: 7f ff f4 d8 call 400047b4 40007458: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 4000745c: aa 92 20 00 orcc %o0, 0, %l5 40007460: 02 80 00 04 be 40007470 <== ALWAYS TAKEN 40007464: 01 00 00 00 nop } rtems_flashdisk_count = rtems_flashdisk_configuration_size; return RTEMS_SUCCESSFUL; } 40007468: 81 c7 e0 08 ret 4000746c: 91 e8 00 15 restore %g0, %l5, %o0 rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256); 40007470: 40 00 09 e8 call 40009c10 40007474: 90 10 22 00 mov 0x200, %o0 40007478: 03 10 01 39 sethi %hi(0x4004e400), %g1 4000747c: d0 20 60 80 st %o0, [ %g1 + 0x80 ] ! 4004e480 v = v & 1 ? (v >> 1) ^ pattern : v >> 1; 40007480: 09 3f ff e1 sethi %hi(0xffff8400), %g4 for (b = 0; b < 256; b++) 40007484: 86 10 20 00 clr %g3 if (!rtems_fdisk_crc16_factor) 40007488: 80 a2 20 00 cmp %o0, 0 4000748c: 02 80 00 da be 400077f4 <== NEVER TAKEN 40007490: 88 11 20 08 or %g4, 8, %g4 uint16_t v = b; 40007494: 82 10 00 03 mov %g3, %g1 40007498: ba 10 20 08 mov 8, %i5 4000749c: 84 08 60 01 and %g1, 1, %g2 400074a0: 83 28 60 10 sll %g1, 0x10, %g1 v = v & 1 ? (v >> 1) ^ pattern : v >> 1; 400074a4: 80 a0 a0 00 cmp %g2, 0 400074a8: 85 30 60 11 srl %g1, 0x11, %g2 400074ac: 02 80 00 03 be 400074b8 400074b0: 82 10 00 02 mov %g2, %g1 400074b4: 82 18 80 04 xor %g2, %g4, %g1 for (i = 8; i--;) 400074b8: ba 87 7f ff addcc %i5, -1, %i5 400074bc: 12 bf ff f9 bne 400074a0 400074c0: 84 08 60 01 and %g1, 1, %g2 rtems_fdisk_crc16_factor[b] = v & 0xffff; 400074c4: 85 28 e0 01 sll %g3, 1, %g2 for (b = 0; b < 256; b++) 400074c8: 86 00 e0 01 inc %g3 400074cc: 80 a0 e1 00 cmp %g3, 0x100 400074d0: 12 bf ff f1 bne 40007494 400074d4: c2 32 00 02 sth %g1, [ %o0 + %g2 ] rtems_flashdisks = calloc (rtems_flashdisk_configuration_size, 400074d8: 27 10 00 f4 sethi %hi(0x4003d000), %l3 400074dc: f8 04 e1 84 ld [ %l3 + 0x184 ], %i4 ! 4003d184 400074e0: 92 10 20 84 mov 0x84, %o1 400074e4: 90 10 00 1c mov %i4, %o0 400074e8: 40 00 06 fc call 400090d8 400074ec: 29 10 01 39 sethi %hi(0x4004e400), %l4 if (!rtems_flashdisks) 400074f0: 80 a2 20 00 cmp %o0, 0 400074f4: 02 80 00 c0 be 400077f4 <== NEVER TAKEN 400074f8: d0 25 20 88 st %o0, [ %l4 + 0x88 ] for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++) 400074fc: 80 a7 20 00 cmp %i4, 0 40007500: 02 80 00 e2 be 40007888 <== NEVER TAKEN 40007504: 33 10 00 c4 sethi %hi(0x40031000), %i1 static __inline void _Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name) { struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name); *_mutex = _init; 40007508: 82 16 63 70 or %i1, 0x370, %g1 ! 40031370 <__func__.8600+0xc58> 4000750c: c2 27 bf ec st %g1, [ %fp + -20 ] sc = rtems_disk_create_phys(dev, c->block_size, 40007510: 03 10 00 17 sethi %hi(0x40005c00), %g1 40007514: 82 10 63 98 or %g1, 0x398, %g1 ! 40005f98 40007518: c2 27 bf e8 st %g1, [ %fp + -24 ] const rtems_flashdisk_config* c = rtems_flashdisk_configuration; 4000751c: 37 10 00 c0 sethi %hi(0x40030000), %i3 char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 40007520: 25 00 00 18 sethi %hi(0x6000), %l2 const rtems_flashdisk_config* c = rtems_flashdisk_configuration; 40007524: b6 16 e2 ec or %i3, 0x2ec, %i3 for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++) 40007528: b4 10 20 00 clr %i2 char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 4000752c: a4 14 a1 00 or %l2, 0x100, %l2 40007530: e4 37 bf f8 sth %l2, [ %fp + -8 ] 40007534: 05 0b d9 19 sethi %hi(0x2f646400), %g2 name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor; 40007538: f4 2f bf f9 stb %i2, [ %fp + -7 ] char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a"; 4000753c: 84 10 a1 76 or %g2, 0x176, %g2 40007540: 07 0b d9 99 sethi %hi(0x2f666400), %g3 40007544: 86 10 e0 64 or %g3, 0x64, %g3 ! 2f666464 40007548: c4 3f bf f0 std %g2, [ %fp + -16 ] fd = &rtems_flashdisks[minor]; 4000754c: b8 02 00 1d add %o0, %i5, %i4 fd->major = major; 40007550: f0 22 00 1d st %i0, [ %o0 + %i5 ] fd->minor = minor; 40007554: f4 27 20 04 st %i2, [ %i4 + 4 ] fd->flags = c->flags; 40007558: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 4000755c: c2 27 20 08 st %g1, [ %i4 + 8 ] fd->compact_segs = c->compact_segs; 40007560: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 40007564: c2 27 20 0c st %g1, [ %i4 + 0xc ] fd->avail_compact_segs = c->avail_compact_segs; 40007568: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 4000756c: c2 27 20 10 st %g1, [ %i4 + 0x10 ] fd->block_size = c->block_size; 40007570: ee 06 c0 00 ld [ %i3 ], %l7 40007574: ee 27 20 14 st %l7, [ %i4 + 0x14 ] fd->unavail_blocks = c->unavail_blocks; 40007578: ea 06 e0 10 ld [ %i3 + 0x10 ], %l5 4000757c: ea 27 20 20 st %l5, [ %i4 + 0x20 ] fd->info_level = c->info_level; 40007580: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 40007584: c2 27 20 7c st %g1, [ %i4 + 0x7c ] for (device = 0; device < c->device_count; device++) 40007588: e2 06 e0 04 ld [ %i3 + 4 ], %l1 4000758c: 80 a4 60 00 cmp %l1, 0 40007590: 02 80 00 9c be 40007800 <== NEVER TAKEN 40007594: 91 2c 60 01 sll %l1, 1, %o0 40007598: d2 06 e0 08 ld [ %i3 + 8 ], %o1 uint32_t blocks = 0; 4000759c: a0 10 20 00 clr %l0 400075a0: 90 02 00 11 add %o0, %l1, %o0 400075a4: 91 2a 20 02 sll %o0, 2, %o0 400075a8: 90 02 00 09 add %o0, %o1, %o0 400075ac: c2 02 40 00 ld [ %o1 ], %g1 for (s = 0; s < dd->segment_count; s++) 400075b0: 80 a0 60 00 cmp %g1, 0 400075b4: 02 80 00 1c be 40007624 <== NEVER TAKEN 400075b8: 88 10 20 00 clr %g4 400075bc: c6 02 60 04 ld [ %o1 + 4 ], %g3 400075c0: 95 28 60 01 sll %g1, 1, %o2 400075c4: 94 02 80 01 add %o2, %g1, %o2 400075c8: 95 2a a0 02 sll %o2, 2, %o2 400075cc: 94 02 80 03 add %o2, %g3, %o2 rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count; 400075d0: de 10 c0 00 lduh [ %g3 ], %o7 return sd->size / page_size; 400075d4: 81 80 20 00 wr %g0, %y 400075d8: c2 00 e0 08 ld [ %g3 + 8 ], %g1 400075dc: 01 00 00 00 nop 400075e0: 01 00 00 00 nop 400075e4: 82 70 40 17 udiv %g1, %l7, %g1 400075e8: 86 00 e0 0c add %g3, 0xc, %g3 (rtems_fdisk_pages_in_segment (sd, page_size) - 400075ec: 84 00 7f ff add %g1, -1, %g2 for (s = 0; s < dd->segment_count; s++) 400075f0: 80 a2 80 03 cmp %o2, %g3 uint32_t bytes = pages * sizeof (rtems_fdisk_page_desc); 400075f4: 83 28 60 03 sll %g1, 3, %g1 return ((bytes - 1) / page_size) + 1; 400075f8: 82 00 7f ff add %g1, -1, %g1 400075fc: 81 80 20 00 wr %g0, %y 40007600: 01 00 00 00 nop 40007604: 01 00 00 00 nop 40007608: 01 00 00 00 nop 4000760c: 9a 70 40 17 udiv %g1, %l7, %o5 (rtems_fdisk_pages_in_segment (sd, page_size) - 40007610: 84 20 80 0d sub %g2, %o5, %g2 rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count; 40007614: 9e 58 80 0f smul %g2, %o7, %o7 for (s = 0; s < dd->segment_count; s++) 40007618: 12 bf ff ee bne 400075d0 <== NEVER TAKEN 4000761c: 88 01 00 0f add %g4, %o7, %g4 40007620: a0 04 00 04 add %l0, %g4, %l0 40007624: 92 02 60 0c add %o1, 0xc, %o1 for (device = 0; device < c->device_count; device++) 40007628: 80 a2 00 09 cmp %o0, %o1 4000762c: 32 bf ff e1 bne,a 400075b0 <== NEVER TAKEN 40007630: c2 02 40 00 ld [ %o1 ], %g1 <== NOT EXECUTED fd->copy_buffer = malloc (c->block_size); 40007634: 40 00 09 77 call 40009c10 40007638: 90 10 00 17 mov %l7, %o0 if (!fd->copy_buffer) 4000763c: 80 a2 20 00 cmp %o0, 0 40007640: 02 80 00 6d be 400077f4 <== NEVER TAKEN 40007644: d0 27 20 78 st %o0, [ %i4 + 0x78 ] fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl)); 40007648: 92 10 20 08 mov 8, %o1 4000764c: 40 00 06 a3 call 400090d8 40007650: 90 10 00 10 mov %l0, %o0 if (!fd->blocks) 40007654: 80 a2 20 00 cmp %o0, 0 40007658: 02 80 00 67 be 400077f4 <== NEVER TAKEN 4000765c: d0 27 20 18 st %o0, [ %i4 + 0x18 ] fd->block_count = blocks; 40007660: e0 27 20 1c st %l0, [ %i4 + 0x1c ] fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl)); 40007664: 92 10 20 0c mov 0xc, %o1 40007668: 40 00 06 9c call 400090d8 4000766c: 90 10 00 11 mov %l1, %o0 if (!fd->devices) 40007670: 80 a2 20 00 cmp %o0, 0 40007674: 02 80 00 60 be 400077f4 <== NEVER TAKEN 40007678: d0 27 20 2c st %o0, [ %i4 + 0x2c ] 4000767c: c2 07 bf ec ld [ %fp + -20 ], %g1 40007680: c2 27 20 74 st %g1, [ %i4 + 0x74 ] sc = rtems_disk_create_phys(dev, c->block_size, 40007684: 82 07 bf f0 add %fp, -16, %g1 40007688: c0 27 20 64 clr [ %i4 + 0x64 ] 4000768c: 96 24 00 15 sub %l0, %l5, %o3 40007690: c0 27 20 68 clr [ %i4 + 0x68 ] 40007694: 9a 10 20 00 clr %o5 40007698: c0 27 20 6c clr [ %i4 + 0x6c ] 4000769c: 94 10 00 17 mov %l7, %o2 400076a0: c0 27 20 70 clr [ %i4 + 0x70 ] 400076a4: 90 10 00 18 mov %i0, %o0 400076a8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400076ac: 92 10 00 1a mov %i2, %o1 400076b0: 7f ff f3 c7 call 400045cc 400076b4: d8 07 bf e8 ld [ %fp + -24 ], %o4 if (sc != RTEMS_SUCCESSFUL) 400076b8: aa 92 20 00 orcc %o0, 0, %l5 400076bc: 12 80 00 67 bne 40007858 <== NEVER TAKEN 400076c0: 92 10 00 1a mov %i2, %o1 for (device = 0; device < c->device_count; device++) 400076c4: ea 06 e0 04 ld [ %i3 + 4 ], %l5 400076c8: 80 a5 60 00 cmp %l5, 0 400076cc: 22 80 00 39 be,a 400077b0 <== NEVER TAKEN 400076d0: ea 27 20 30 st %l5, [ %i4 + 0x30 ] <== NOT EXECUTED 400076d4: e2 06 e0 08 ld [ %i3 + 8 ], %l1 400076d8: e0 07 20 2c ld [ %i4 + 0x2c ], %l0 400076dc: ae 10 20 00 clr %l7 400076e0: c4 04 40 00 ld [ %l1 ], %g2 for (segment = 0; segment < dd->segment_count; segment++) 400076e4: 80 a0 a0 00 cmp %g2, 0 400076e8: 02 80 00 48 be 40007808 <== NEVER TAKEN 400076ec: 87 28 a0 01 sll %g2, 1, %g3 400076f0: c2 04 60 04 ld [ %l1 + 4 ], %g1 uint32_t count = 0; 400076f4: ac 10 20 00 clr %l6 400076f8: b2 00 c0 02 add %g3, %g2, %i1 400076fc: 89 2e 60 02 sll %i1, 2, %g4 40007700: 88 01 00 01 add %g4, %g1, %g4 count += dd->segments[segment].count; 40007704: c6 10 40 00 lduh [ %g1 ], %g3 40007708: 82 00 60 0c add %g1, 0xc, %g1 for (segment = 0; segment < dd->segment_count; segment++) 4000770c: 80 a1 00 01 cmp %g4, %g1 40007710: 12 bf ff fd bne 40007704 <== NEVER TAKEN 40007714: ac 05 80 03 add %l6, %g3, %l6 fd->devices[device].segments = calloc (segment_count, 40007718: 92 10 20 30 mov 0x30, %o1 4000771c: 40 00 06 6f call 400090d8 40007720: 90 10 00 16 mov %l6, %o0 if (!fd->devices[device].segments) 40007724: 80 a2 20 00 cmp %o0, 0 40007728: 02 80 00 40 be 40007828 <== NEVER TAKEN 4000772c: d0 24 00 00 st %o0, [ %l0 ] 40007730: c6 04 60 04 ld [ %l1 + 4 ], %g3 40007734: 85 2e 60 02 sll %i1, 2, %g2 40007738: 9e 00 80 03 add %g2, %g3, %o7 for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 4000773c: c8 10 c0 00 lduh [ %g3 ], %g4 40007740: 80 a1 20 00 cmp %g4, 0 40007744: 02 80 00 0f be 40007780 <== NEVER TAKEN 40007748: 82 10 00 08 mov %o0, %g1 4000774c: 84 10 20 00 clr %g2 sc->segment = seg_segment; 40007750: c4 20 60 0c st %g2, [ %g1 + 0xc ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 40007754: 82 00 60 30 add %g1, 0x30, %g1 sc->descriptor = sd; 40007758: c6 20 7f d4 st %g3, [ %g1 + -44 ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 4000775c: 84 00 a0 01 inc %g2 sc->device = device; 40007760: ee 20 7f d8 st %l7, [ %g1 + -40 ] for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++) 40007764: 80 a0 80 04 cmp %g2, %g4 40007768: 12 bf ff fa bne 40007750 4000776c: c0 20 7f fc clr [ %g1 + -4 ] 40007770: 83 28 a0 01 sll %g2, 1, %g1 40007774: 84 00 40 02 add %g1, %g2, %g2 40007778: 85 28 a0 04 sll %g2, 4, %g2 4000777c: 90 02 00 02 add %o0, %g2, %o0 40007780: 86 00 e0 0c add %g3, 0xc, %g3 for (segment = 0; segment < c->devices[device].segment_count; segment++) 40007784: 80 a3 c0 03 cmp %o7, %g3 40007788: 32 bf ff ee bne,a 40007740 <== NEVER TAKEN 4000778c: c8 10 c0 00 lduh [ %g3 ], %g4 <== NOT EXECUTED fd->devices[device].descriptor = &c->devices[device]; 40007790: e2 24 20 08 st %l1, [ %l0 + 8 ] for (device = 0; device < c->device_count; device++) 40007794: ae 05 e0 01 inc %l7 fd->devices[device].segment_count = segment_count; 40007798: ec 24 20 04 st %l6, [ %l0 + 4 ] 4000779c: a2 04 60 0c add %l1, 0xc, %l1 for (device = 0; device < c->device_count; device++) 400077a0: 80 a5 40 17 cmp %l5, %l7 400077a4: 12 bf ff cf bne 400076e0 <== NEVER TAKEN 400077a8: a0 04 20 0c add %l0, 0xc, %l0 fd->device_count = c->device_count; 400077ac: ea 27 20 30 st %l5, [ %i4 + 0x30 ] ret = rtems_fdisk_recover_block_mappings (fd); 400077b0: 7f ff f9 01 call 40005bb4 400077b4: 90 10 00 1c mov %i4, %o0 if (ret) 400077b8: aa 92 20 00 orcc %o0, 0, %l5 400077bc: 12 80 00 48 bne 400078dc <== NEVER TAKEN 400077c0: 92 10 00 1a mov %i2, %o1 ret = rtems_fdisk_compact (fd); 400077c4: 7f ff f8 22 call 4000584c 400077c8: 90 10 00 1c mov %i4, %o0 if (ret) 400077cc: aa 92 20 00 orcc %o0, 0, %l5 400077d0: 12 80 00 32 bne 40007898 <== NEVER TAKEN 400077d4: b6 06 e0 20 add %i3, 0x20, %i3 for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++) 400077d8: f8 04 e1 84 ld [ %l3 + 0x184 ], %i4 400077dc: b4 06 a0 01 inc %i2 400077e0: 80 a7 00 1a cmp %i4, %i2 400077e4: 08 80 00 29 bleu 40007888 <== ALWAYS TAKEN 400077e8: ba 07 60 84 add %i5, 0x84, %i5 400077ec: 10 bf ff 51 b 40007530 <== NOT EXECUTED 400077f0: d0 05 20 88 ld [ %l4 + 0x88 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 400077f4: aa 10 20 1a mov 0x1a, %l5 <== NOT EXECUTED } 400077f8: 81 c7 e0 08 ret <== NOT EXECUTED 400077fc: 91 e8 00 15 restore %g0, %l5, %o0 <== NOT EXECUTED uint32_t blocks = 0; 40007800: 10 bf ff 8d b 40007634 <== NOT EXECUTED 40007804: a0 10 20 00 clr %l0 <== NOT EXECUTED fd->devices[device].segments = calloc (segment_count, 40007808: 92 10 20 30 mov 0x30, %o1 <== NOT EXECUTED 4000780c: 40 00 06 33 call 400090d8 <== NOT EXECUTED 40007810: 90 10 20 00 clr %o0 <== NOT EXECUTED if (!fd->devices[device].segments) 40007814: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007818: 02 80 00 04 be 40007828 <== NOT EXECUTED 4000781c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED uint32_t count = 0; 40007820: 10 bf ff dc b 40007790 <== NOT EXECUTED 40007824: ac 10 20 00 clr %l6 <== NOT EXECUTED rtems_disk_delete (dev); 40007828: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000782c: 7f ff f3 9c call 4000469c <== NOT EXECUTED 40007830: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (fd->copy_buffer); 40007834: 40 00 06 f8 call 40009414 <== NOT EXECUTED 40007838: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 4000783c: 40 00 06 f6 call 40009414 <== NOT EXECUTED 40007840: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 40007844: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED 40007848: 40 00 06 f3 call 40009414 <== NOT EXECUTED 4000784c: aa 10 20 1a mov 0x1a, %l5 <== NOT EXECUTED } 40007850: 81 c7 e0 08 ret <== NOT EXECUTED 40007854: 91 e8 00 15 restore %g0, %l5, %o0 <== NOT EXECUTED rtems_disk_delete (dev); 40007858: 7f ff f3 91 call 4000469c <== NOT EXECUTED 4000785c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (fd->copy_buffer); 40007860: 40 00 06 ed call 40009414 <== NOT EXECUTED 40007864: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 40007868: 40 00 06 eb call 40009414 <== NOT EXECUTED 4000786c: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 40007870: 40 00 06 e9 call 40009414 <== NOT EXECUTED 40007874: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("disk create phy failed"); 40007878: 11 10 00 c4 sethi %hi(0x40031000), %o0 <== NOT EXECUTED 4000787c: 7f ff f4 dc call 40004bec <== NOT EXECUTED 40007880: 90 12 23 80 or %o0, 0x380, %o0 ! 40031380 <__func__.8600+0xc68> <== NOT EXECUTED return sc; 40007884: 30 bf fe f9 b,a 40007468 <== NOT EXECUTED rtems_flashdisk_count = rtems_flashdisk_configuration_size; 40007888: 03 10 01 39 sethi %hi(0x4004e400), %g1 return RTEMS_SUCCESSFUL; 4000788c: aa 10 20 00 clr %l5 40007890: 10 bf fe f6 b 40007468 40007894: f8 20 60 84 st %i4, [ %g1 + 0x84 ] rtems_disk_delete (dev); 40007898: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000789c: 7f ff f3 80 call 4000469c <== NOT EXECUTED 400078a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (fd->copy_buffer); 400078a4: 40 00 06 dc call 40009414 <== NOT EXECUTED 400078a8: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 400078ac: 40 00 06 da call 40009414 <== NOT EXECUTED 400078b0: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 400078b4: 40 00 06 d8 call 40009414 <== NOT EXECUTED 400078b8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("compacting of disk failed: %s (%d)", 400078bc: 40 00 6d 34 call 40022d8c <== NOT EXECUTED 400078c0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 400078c4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 400078c8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 400078cc: 11 10 00 c4 sethi %hi(0x40031000), %o0 <== NOT EXECUTED 400078d0: 7f ff f4 c7 call 40004bec <== NOT EXECUTED 400078d4: 90 12 23 c0 or %o0, 0x3c0, %o0 ! 400313c0 <__func__.8600+0xca8> <== NOT EXECUTED return ret; 400078d8: 30 bf fe e4 b,a 40007468 <== NOT EXECUTED rtems_disk_delete (dev); 400078dc: 7f ff f3 70 call 4000469c <== NOT EXECUTED 400078e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (fd->copy_buffer); 400078e4: 40 00 06 cc call 40009414 <== NOT EXECUTED 400078e8: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 <== NOT EXECUTED free (fd->blocks); 400078ec: 40 00 06 ca call 40009414 <== NOT EXECUTED 400078f0: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED free (fd->devices); 400078f4: 40 00 06 c8 call 40009414 <== NOT EXECUTED 400078f8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 <== NOT EXECUTED rtems_fdisk_error ("recovery of disk failed: %s (%d)", 400078fc: 40 00 6d 24 call 40022d8c <== NOT EXECUTED 40007900: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007904: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40007908: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000790c: 11 10 00 c4 sethi %hi(0x40031000), %o0 <== NOT EXECUTED 40007910: 7f ff f4 b7 call 40004bec <== NOT EXECUTED 40007914: 90 12 23 98 or %o0, 0x398, %o0 ! 40031398 <__func__.8600+0xc80> <== NOT EXECUTED return ret; 40007918: 30 bf fe d4 b,a 40007468 <== NOT EXECUTED =============================================================================== 4000d308 : { 4000d308: 9d e3 bf 98 save %sp, -104, %sp size_t const alloc_size = sizeof( rtems_sparse_disk ) 4000d30c: 90 06 60 08 add %i1, 8, %o0 4000d310: 90 5a 00 1a smul %o0, %i2, %o0 rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc( 4000d314: 7f ff e0 98 call 40005574 4000d318: 90 02 20 2c add %o0, 0x2c, %o0 4000d31c: 92 10 00 08 mov %o0, %o1 if ( sparse_disk != NULL ) { 4000d320: 80 a2 60 00 cmp %o1, 0 4000d324: 02 80 00 0b be 4000d350 <== NEVER TAKEN 4000d328: 90 10 20 1a mov 0x1a, %o0 sc = rtems_sparse_disk_register( 4000d32c: 03 10 00 33 sethi %hi(0x4000cc00), %g1 4000d330: 82 10 63 9c or %g1, 0x39c, %g1 ! 4000cf9c 4000d334: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000d338: 9a 10 00 1c mov %i4, %o5 4000d33c: 98 10 00 1b mov %i3, %o4 4000d340: 96 10 00 1a mov %i2, %o3 4000d344: 94 10 00 19 mov %i1, %o2 4000d348: 7f ff ff bd call 4000d23c 4000d34c: 90 10 00 18 mov %i0, %o0 } 4000d350: 81 c7 e0 08 ret 4000d354: 91 e8 00 08 restore %g0, %o0, %o0 ... =============================================================================== 4000d23c : 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 ) { 4000d23c: 9d e3 bf a0 save %sp, -96, %sp 4000d240: a2 10 00 1c mov %i4, %l1 4000d244: a0 10 00 1a mov %i2, %l0 rtems_status_code sc; if ( blocks_with_buffer <= media_block_count ) { 4000d248: 80 a6 c0 1c cmp %i3, %i4 4000d24c: 18 80 00 2b bgu 4000d2f8 <== NEVER TAKEN 4000d250: e4 07 a0 5c ld [ %fp + 0x5c ], %l2 if ( NULL == sd ) 4000d254: 80 a6 60 00 cmp %i1, 0 4000d258: 02 80 00 2a be 4000d300 <== NEVER TAKEN 4000d25c: 92 10 20 00 clr %o1 size_t const key_table_size = blocks_with_buffer 4000d260: b9 2e e0 03 sll %i3, 3, %i4 memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size ); 4000d264: 90 10 00 19 mov %i1, %o0 4000d268: b4 07 20 2c add %i4, 0x2c, %i2 4000d26c: 40 00 16 ff call 40012e68 4000d270: 94 10 00 1a mov %i2, %o2 sd->fill_pattern = fill_pattern; 4000d274: fa 2e 60 24 stb %i5, [ %i1 + 0x24 ] memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ), 4000d278: b4 06 40 1a add %i1, %i2, %i2 4000d27c: 94 5e c0 10 smul %i3, %l0, %o2 4000d280: 92 10 00 1d mov %i5, %o1 4000d284: 40 00 16 f9 call 40012e68 4000d288: 90 10 00 1a mov %i2, %o0 data += sizeof( rtems_sparse_disk ); 4000d28c: 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; 4000d290: 03 10 00 54 sethi %hi(0x40015000), %g1 sd->delete_handler = sparse_disk_delete; 4000d294: e4 26 60 20 st %l2, [ %i1 + 0x20 ] 4000d298: 82 10 62 f0 or %g1, 0x2f0, %g1 4000d29c: c0 26 40 00 clr [ %i1 ] for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 4000d2a0: 80 a6 e0 00 cmp %i3, 0 4000d2a4: c0 26 60 04 clr [ %i1 + 4 ] 4000d2a8: c0 26 60 08 clr [ %i1 + 8 ] 4000d2ac: c0 26 60 0c clr [ %i1 + 0xc ] 4000d2b0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] sd->blocks_with_buffer = blocks_with_buffer; 4000d2b4: f6 26 60 14 st %i3, [ %i1 + 0x14 ] for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 4000d2b8: 02 80 00 09 be 4000d2dc <== NEVER TAKEN 4000d2bc: c6 26 60 28 st %g3, [ %i1 + 0x28 ] 4000d2c0: 82 10 00 19 mov %i1, %g1 4000d2c4: 86 07 00 19 add %i4, %i1, %g3 sd->key_table[i].data = data; 4000d2c8: f4 20 60 30 st %i2, [ %g1 + 0x30 ] 4000d2cc: 82 00 60 08 add %g1, 8, %g1 for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) { 4000d2d0: 80 a0 40 03 cmp %g1, %g3 4000d2d4: 12 bf ff fd bne 4000d2c8 4000d2d8: b4 06 80 10 add %i2, %l0, %i2 sd->media_block_size = media_block_size; 4000d2dc: e0 26 60 1c st %l0, [ %i1 + 0x1c ] sparse_disk_delete, fill_pattern ); if ( RTEMS_SUCCESSFUL == sc ) { sc = rtems_blkdev_create( 4000d2e0: b8 10 00 19 mov %i1, %i4 4000d2e4: 37 10 00 33 sethi %hi(0x4000cc00), %i3 4000d2e8: b4 10 00 11 mov %l1, %i2 4000d2ec: b6 16 e3 a8 or %i3, 0x3a8, %i3 4000d2f0: 40 00 0b f3 call 400102bc 4000d2f4: 93 e8 00 10 restore %g0, %l0, %o1 sparse_disk_ioctl, sparse_disk ); } } else { sc = RTEMS_INVALID_NUMBER; 4000d2f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d2fc: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED } return sc; } 4000d300: 81 c7 e0 08 ret <== NOT EXECUTED 4000d304: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED