=============================================================================== 40014698 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 40014698: 9d e3 bf 98 save %sp, -104, %sp 4001469c: a0 10 00 18 mov %i0, %l0 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 400146a0: 80 a6 e0 00 cmp %i3, 0 400146a4: 12 80 00 11 bne 400146e8 <_fat_block_read+0x50> <== ALWAYS TAKEN 400146a8: b0 10 20 00 clr %i0 400146ac: 30 80 00 19 b,a 40014710 <_fat_block_read+0x78> <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 400146b0: fa 14 00 00 lduh [ %l0 ], %i5 400146b4: ba 27 40 1a sub %i5, %i2, %i5 400146b8: 80 a7 40 1b cmp %i5, %i3 400146bc: 38 80 00 02 bgu,a 400146c4 <_fat_block_read+0x2c> 400146c0: ba 10 00 1b mov %i3, %i5 memcpy((buff + cmpltd), (sec_buf + ofs), c); 400146c4: d2 07 bf fc ld [ %fp + -4 ], %o1 400146c8: 92 02 40 1a add %o1, %i2, %o1 400146cc: 40 00 1d 8d call 4001bd00 400146d0: 94 10 00 1d mov %i5, %o2 count -= c; cmpltd += c; 400146d4: b0 06 00 1d add %i0, %i5, %i0 sec_num++; 400146d8: b2 06 60 01 inc %i1 while (count > 0) 400146dc: b6 a6 c0 1d subcc %i3, %i5, %i3 400146e0: 02 80 00 0c be 40014710 <_fat_block_read+0x78> 400146e4: b4 10 20 00 clr %i2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 400146e8: 92 10 00 19 mov %i1, %o1 400146ec: 96 07 bf fc add %fp, -4, %o3 400146f0: 94 10 20 01 mov 1, %o2 400146f4: 7f ff ff b0 call 400145b4 400146f8: 90 10 00 10 mov %l0, %o0 if (rc != RC_OK) 400146fc: 80 a2 20 00 cmp %o0, 0 40014700: 02 bf ff ec be 400146b0 <_fat_block_read+0x18> <== ALWAYS TAKEN 40014704: 90 07 00 18 add %i4, %i0, %o0 ofs = 0; } return cmpltd; } 40014708: 81 c7 e0 08 ret <== NOT EXECUTED 4001470c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40014710: 81 c7 e0 08 ret 40014714: 81 e8 00 00 restore =============================================================================== 400145b4 : { 400145b4: 9d e3 bf 98 save %sp, -104, %sp return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 400145b8: fa 0e 20 02 ldub [ %i0 + 2 ], %i5 400145bc: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 400145c0: c4 0e 20 91 ldub [ %i0 + 0x91 ], %g2 400145c4: 82 20 40 1d sub %g1, %i5, %g1 { 400145c8: b8 10 00 18 mov %i0, %i4 400145cc: 93 36 40 01 srl %i1, %g1, %o1 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 400145d0: 80 a0 a0 00 cmp %g2, 0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 400145d4: 83 2a 40 01 sll %o1, %g1, %g1 ((sector - 400145d8: 82 26 40 01 sub %i1, %g1, %g1 400145dc: 02 80 00 0a be 40014604 400145e0: bb 28 40 1d sll %g1, %i5, %i5 400145e4: d2 27 bf fc st %o1, [ %fp + -4 ] 400145e8: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 400145ec: 80 a0 40 19 cmp %g1, %i1 400145f0: 22 80 00 12 be,a 40014638 400145f4: c2 07 20 94 ld [ %i4 + 0x94 ], %g1 400145f8: 7f ff ff 79 call 400143dc 400145fc: 90 10 00 18 mov %i0, %o0 40014600: d2 07 bf fc ld [ %fp + -4 ], %o1 40014604: d0 07 20 6c ld [ %i4 + 0x6c ], %o0 if (op_type == FAT_OP_TYPE_READ) 40014608: 80 a6 a0 01 cmp %i2, 1 4001460c: 02 80 00 10 be 4001464c 40014610: 94 07 20 94 add %i4, 0x94, %o2 sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 40014614: 7f ff f4 bc call 40011904 40014618: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 4001461c: 80 a2 20 00 cmp %o0, 0 40014620: 12 80 00 0f bne 4001465c <== NEVER TAKEN 40014624: 82 10 20 01 mov 1, %g1 fs_info->c.blk_num = sec_num; 40014628: f2 27 20 8c st %i1, [ %i4 + 0x8c ] fs_info->c.modified = 0; 4001462c: c0 2f 20 90 clrb [ %i4 + 0x90 ] fs_info->c.state = FAT_CACHE_ACTUAL; 40014630: c2 2f 20 91 stb %g1, [ %i4 + 0x91 ] *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 40014634: c2 07 20 94 ld [ %i4 + 0x94 ], %g1 40014638: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001463c: 82 00 40 1d add %g1, %i5, %g1 40014640: c2 26 c0 00 st %g1, [ %i3 ] } 40014644: 81 c7 e0 08 ret 40014648: 91 e8 20 00 restore %g0, 0, %o0 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 4001464c: 7f ff f4 ee call 40011a04 40014650: 01 00 00 00 nop 40014654: 10 bf ff f3 b 40014620 40014658: 80 a2 20 00 cmp %o0, 0 rtems_set_errno_and_return_minus_one(EIO); 4001465c: 40 00 1a b8 call 4001b13c <__errno> <== NOT EXECUTED 40014660: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014664: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40014668: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001466c: 81 c7 e0 08 ret <== NOT EXECUTED 40014670: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40014674 : if (fs_info->c.state == FAT_CACHE_EMPTY) 40014674: c2 0a 20 91 ldub [ %o0 + 0x91 ], %g1 <== NOT EXECUTED 40014678: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001467c: 02 80 00 05 be 40014690 <== NOT EXECUTED 40014680: 01 00 00 00 nop <== NOT EXECUTED 40014684: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40014688: 7f ff ff 55 call 400143dc <== NOT EXECUTED 4001468c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED } 40014690: 81 c3 e0 08 retl <== NOT EXECUTED 40014694: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 400147c4 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 400147c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 400147c8: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 400147cc: a0 24 00 1a sub %l0, %i2, %l0 <== NOT EXECUTED 400147d0: 80 a4 00 1b cmp %l0, %i3 <== NOT EXECUTED 400147d4: 38 80 00 02 bgu,a 400147dc <== NOT EXECUTED 400147d8: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 400147dc: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 400147e0: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 400147e4: 80 a6 60 00 cmp %i1, 0 400147e8: 12 80 00 06 bne 40014800 <== ALWAYS TAKEN 400147ec: 86 20 40 02 sub %g1, %g2, %g3 400147f0: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 <== NOT EXECUTED 400147f4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 400147f8: 32 80 00 4c bne,a 40014928 <== NOT EXECUTED 400147fc: e4 06 20 28 ld [ %i0 + 0x28 ], %l2 <== NOT EXECUTED blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 40014800: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 40014804: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 cln -= FAT_RSRVD_CLN; 40014808: b2 06 7f fe add %i1, -2, %i1 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4001480c: a4 24 80 01 sub %l2, %g1, %l2 40014810: 85 30 80 03 srl %g2, %g3, %g2 40014814: b3 2e 40 12 sll %i1, %l2, %i1 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 40014818: 84 00 80 19 add %g2, %i1, %g2 uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 4001481c: a5 36 80 01 srl %i2, %g1, %l2 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 40014820: 83 2c 80 01 sll %l2, %g1, %g1 ssize_t bytes_written = 0; 40014824: b2 10 20 00 clr %i1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 40014828: b4 26 80 01 sub %i2, %g1, %i2 ssize_t ret; cur_blk += blocks_in_offset; 4001482c: a4 04 80 02 add %l2, %g2, %l2 ssize_t rc = RC_OK; 40014830: 82 10 20 00 clr %g1 while ( (RC_OK == rc) 40014834: 80 a0 60 00 cmp %g1, 0 40014838: 12 80 00 26 bne 400148d0 <== NEVER TAKEN 4001483c: a2 10 20 01 mov 1, %l1 40014840: 80 a4 20 00 cmp %l0, 0 40014844: 02 80 00 23 be 400148d0 40014848: 80 a0 60 00 cmp %g1, 0 && (0 < bytes_to_write)) { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 4001484c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40014850: ba 20 40 1a sub %g1, %i2, %i5 40014854: 80 a7 40 10 cmp %i5, %l0 40014858: 08 80 00 03 bleu 40014864 <== ALWAYS TAKEN 4001485c: b6 10 00 1d mov %i5, %i3 40014860: b6 10 00 10 mov %l0, %i3 <== NOT EXECUTED uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 40014864: 80 a7 40 1b cmp %i5, %i3 40014868: 38 80 00 02 bgu,a 40014870 <== NEVER TAKEN 4001486c: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED if (0 < bytes_to_write) 40014870: 80 a7 60 00 cmp %i5, 0 40014874: 02 80 00 0f be 400148b0 <== NEVER TAKEN 40014878: 90 10 00 1d mov %i5, %o0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4001487c: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1 40014880: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 40014884: 92 22 40 02 sub %o1, %g2, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 40014888: 96 07 bf fc add %fp, -4, %o3 if (bytes_to_write == fs_info->vol.bytes_per_block) 4001488c: 80 a0 40 1d cmp %g1, %i5 40014890: 02 80 00 21 be 40014914 40014894: 93 2c 80 09 sll %l2, %o1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 40014898: 94 10 20 01 mov 1, %o2 4001489c: 7f ff ff 46 call 400145b4 400148a0: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 400148a4: 80 a2 20 00 cmp %o0, 0 400148a8: 22 80 00 14 be,a 400148f8 <== ALWAYS TAKEN 400148ac: d0 07 bf fc ld [ %fp + -4 ], %o0 fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 400148b0: 80 a2 00 1b cmp %o0, %i3 400148b4: 02 80 00 0b be 400148e0 <== ALWAYS TAKEN 400148b8: 82 10 3f ff mov -1, %g1 400148bc: b4 10 20 00 clr %i2 <== NOT EXECUTED while ( (RC_OK == rc) 400148c0: 80 a0 60 00 cmp %g1, 0 400148c4: 02 bf ff e0 be 40014844 <== ALWAYS TAKEN 400148c8: 80 a4 20 00 cmp %l0, 0 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 400148cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400148d0: 32 80 00 02 bne,a 400148d8 <== NEVER TAKEN 400148d4: b2 10 3f ff mov -1, %i1 <== NOT EXECUTED return rc; else return bytes_written; } 400148d8: 81 c7 e0 08 ret 400148dc: 91 e8 00 19 restore %g0, %i1, %o0 bytes_to_write -= ret; 400148e0: a0 24 00 08 sub %l0, %o0, %l0 bytes_written += ret; 400148e4: b2 06 40 08 add %i1, %o0, %i1 ++cur_blk; 400148e8: a4 04 a0 01 inc %l2 400148ec: 82 10 20 00 clr %g1 400148f0: 10 bf ff f4 b 400148c0 400148f4: b4 10 20 00 clr %i2 memset(blk_buf + offset, pattern, bytes_to_write); 400148f8: 94 10 00 1d mov %i5, %o2 400148fc: 92 10 00 1c mov %i4, %o1 40014900: 40 00 1d 3c call 4001bdf0 40014904: 90 02 00 1a add %o0, %i2, %o0 fs_info->c.modified = true; 40014908: e2 2e 20 90 stb %l1, [ %i0 + 0x90 ] return bytes_to_write; 4001490c: 10 bf ff e9 b 400148b0 40014910: 90 10 00 1d mov %i5, %o0 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 40014914: 94 10 20 02 mov 2, %o2 40014918: 7f ff ff 27 call 400145b4 4001491c: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 40014920: 10 bf ff e2 b 400148a8 40014924: 80 a2 20 00 cmp %o0, 0 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 40014928: 10 bf ff bd b 4001481c <== NOT EXECUTED 4001492c: 85 34 80 03 srl %l2, %g3, %g2 <== NOT EXECUTED =============================================================================== 40014930 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff) { 40014930: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 40014934: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 40014938: a0 24 00 1a sub %l0, %i2, %l0 <== NOT EXECUTED 4001493c: 80 a4 00 1b cmp %l0, %i3 <== NOT EXECUTED 40014940: 38 80 00 02 bgu,a 40014948 <== NOT EXECUTED 40014944: a0 10 00 1b mov %i3, %l0 40014948: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 4001494c: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40014950: 80 a6 60 00 cmp %i1, 0 40014954: 12 80 00 06 bne 4001496c 40014958: 86 20 40 02 sub %g1, %g2, %g3 4001495c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40014960: 80 88 a0 03 btst 3, %g2 40014964: 32 80 00 4c bne,a 40014a94 <== ALWAYS TAKEN 40014968: e4 06 20 28 ld [ %i0 + 0x28 ], %l2 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4001496c: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2 40014970: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 cln -= FAT_RSRVD_CLN; 40014974: b2 06 7f fe add %i1, -2, %i1 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 40014978: a4 24 80 01 sub %l2, %g1, %l2 4001497c: 85 30 80 03 srl %g2, %g3, %g2 40014980: b3 2e 40 12 sll %i1, %l2, %i1 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 40014984: 84 00 80 19 add %g2, %i1, %g2 uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 40014988: a5 36 80 01 srl %i2, %g1, %l2 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4001498c: 83 2c 80 01 sll %l2, %g1, %g1 ssize_t bytes_written = 0; 40014990: b2 10 20 00 clr %i1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 40014994: b4 26 80 01 sub %i2, %g1, %i2 uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 40014998: a4 04 80 02 add %l2, %g2, %l2 ssize_t rc = RC_OK; 4001499c: 82 10 20 00 clr %g1 while ( (RC_OK == rc) 400149a0: 80 a0 60 00 cmp %g1, 0 400149a4: 12 80 00 26 bne 40014a3c <== NEVER TAKEN 400149a8: a2 10 20 01 mov 1, %l1 400149ac: 80 a4 20 00 cmp %l0, 0 400149b0: 02 80 00 23 be 40014a3c 400149b4: 80 a0 60 00 cmp %g1, 0 && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 400149b8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400149bc: ba 20 40 1a sub %g1, %i2, %i5 400149c0: 80 a7 40 10 cmp %i5, %l0 400149c4: 08 80 00 03 bleu 400149d0 400149c8: b6 10 00 1d mov %i5, %i3 400149cc: b6 10 00 10 mov %l0, %i3 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 400149d0: 80 a7 40 1b cmp %i5, %i3 400149d4: 38 80 00 02 bgu,a 400149dc 400149d8: ba 10 00 1b mov %i3, %i5 if (0 < bytes_to_write) 400149dc: 80 a7 60 00 cmp %i5, 0 400149e0: 02 80 00 0f be 40014a1c <== NEVER TAKEN 400149e4: 90 10 00 1d mov %i5, %o0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 400149e8: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1 400149ec: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 400149f0: 92 22 40 02 sub %o1, %g2, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 400149f4: 96 07 bf fc add %fp, -4, %o3 if (bytes_to_write == fs_info->vol.bytes_per_block) 400149f8: 80 a0 40 1d cmp %g1, %i5 400149fc: 02 80 00 21 be 40014a80 40014a00: 93 2c 80 09 sll %l2, %o1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 40014a04: 94 10 20 01 mov 1, %o2 40014a08: 7f ff fe eb call 400145b4 40014a0c: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 40014a10: 80 a2 20 00 cmp %o0, 0 40014a14: 22 80 00 14 be,a 40014a64 <== ALWAYS TAKEN 40014a18: d0 07 bf fc ld [ %fp + -4 ], %o0 fs_info, cur_blk, ofs_blk, c, &buffer[bytes_written]); if (c != ret) 40014a1c: 80 a2 00 1b cmp %o0, %i3 40014a20: 02 80 00 0b be 40014a4c <== ALWAYS TAKEN 40014a24: 82 10 3f ff mov -1, %g1 40014a28: b4 10 20 00 clr %i2 <== NOT EXECUTED while ( (RC_OK == rc) 40014a2c: 80 a0 60 00 cmp %g1, 0 40014a30: 02 bf ff e0 be 400149b0 <== ALWAYS TAKEN 40014a34: 80 a4 20 00 cmp %l0, 0 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 40014a38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014a3c: 32 80 00 02 bne,a 40014a44 <== NEVER TAKEN 40014a40: b2 10 3f ff mov -1, %i1 <== NOT EXECUTED return rc; else return bytes_written; } 40014a44: 81 c7 e0 08 ret 40014a48: 91 e8 00 19 restore %g0, %i1, %o0 bytes_to_write -= ret; 40014a4c: a0 24 00 08 sub %l0, %o0, %l0 bytes_written += ret; 40014a50: b2 06 40 08 add %i1, %o0, %i1 ++cur_blk; 40014a54: a4 04 a0 01 inc %l2 40014a58: 82 10 20 00 clr %g1 40014a5c: 10 bf ff f4 b 40014a2c 40014a60: b4 10 20 00 clr %i2 memcpy(blk_buf + offset, buf, bytes_to_write); 40014a64: 94 10 00 1d mov %i5, %o2 40014a68: 92 07 00 19 add %i4, %i1, %o1 40014a6c: 40 00 1c a5 call 4001bd00 40014a70: 90 02 00 1a add %o0, %i2, %o0 fs_info->c.modified = true; 40014a74: e2 2e 20 90 stb %l1, [ %i0 + 0x90 ] return bytes_to_write; 40014a78: 10 bf ff e9 b 40014a1c 40014a7c: 90 10 00 1d mov %i5, %o0 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 40014a80: 94 10 20 02 mov 2, %o2 40014a84: 7f ff fe cc call 400145b4 40014a88: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 40014a8c: 10 bf ff e2 b 40014a14 40014a90: 80 a2 20 00 cmp %o0, 0 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 40014a94: 10 bf ff bd b 40014988 40014a98: 85 34 80 03 srl %l2, %g3, %g2 =============================================================================== 40013c8c : { 40013c8c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (fat_fd->links_num > 1) 40013c90: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED 40013c94: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40013c98: 08 80 00 05 bleu 40013cac <== NOT EXECUTED 40013c9c: 82 00 7f ff add %g1, -1, %g1 fat_fd->links_num--; 40013ca0: c2 26 60 08 st %g1, [ %i1 + 8 ] rc = fat_buf_release(fs_info); 40013ca4: 40 00 02 74 call 40014674 40013ca8: 81 e8 00 00 restore fat_file_update(fs_info, fat_fd); 40013cac: 92 10 00 19 mov %i1, %o1 40013cb0: 7f ff ff 17 call 4001390c 40013cb4: 90 10 00 18 mov %i0, %o0 if (fat_fd->flags & FAT_FILE_REMOVED) 40013cb8: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40013cbc: 80 88 60 01 btst 1, %g1 40013cc0: 12 80 00 0b bne 40013cec 40013cc4: 94 10 20 00 clr %o2 if (fat_ino_is_unique(fs_info, fat_fd->ino)) 40013cc8: d2 06 60 0c ld [ %i1 + 0xc ], %o1 40013ccc: 40 00 06 7e call 400156c4 40013cd0: 90 10 00 18 mov %i0, %o0 40013cd4: 80 a2 20 00 cmp %o0, 0 40013cd8: 22 80 00 1b be,a 40013d44 40013cdc: c4 06 40 00 ld [ %i1 ], %g2 fat_fd->links_num = 0; 40013ce0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED rc = fat_buf_release(fs_info); 40013ce4: 40 00 02 64 call 40014674 <== NOT EXECUTED 40013ce8: 81 e8 00 00 restore rc = fat_file_truncate(fs_info, fat_fd, 0); 40013cec: 92 10 00 19 mov %i1, %o1 40013cf0: 7f ff ff a4 call 40013b80 40013cf4: 90 10 00 18 mov %i0, %o0 if (rc == RC_OK) 40013cf8: 80 a2 20 00 cmp %o0, 0 40013cfc: 12 bf ff ea bne 40013ca4 <== NEVER TAKEN 40013d00: 90 10 00 18 mov %i0, %o0 next = the_node->next; 40013d04: c4 06 40 00 ld [ %i1 ], %g2 previous = the_node->previous; 40013d08: c2 06 60 04 ld [ %i1 + 4 ], %g1 _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); 40013d0c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 next->previous = previous; 40013d10: c2 20 a0 04 st %g1, [ %g2 + 4 ] if (fat_ino_is_unique(fs_info, fat_fd->ino)) 40013d14: 40 00 06 6c call 400156c4 40013d18: c4 20 40 00 st %g2, [ %g1 ] 40013d1c: 80 a2 20 00 cmp %o0, 0 40013d20: 02 80 00 05 be 40013d34 <== ALWAYS TAKEN 40013d24: 01 00 00 00 nop fat_free_unique_ino(fs_info, fat_fd->ino); 40013d28: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 40013d2c: 40 00 06 5b call 40015698 <== NOT EXECUTED 40013d30: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free(fat_fd); 40013d34: 7f ff c5 a7 call 400053d0 40013d38: 90 10 00 19 mov %i1, %o0 rc = fat_buf_release(fs_info); 40013d3c: 40 00 02 4e call 40014674 40013d40: 81 e8 00 00 restore previous = the_node->previous; 40013d44: c2 06 60 04 ld [ %i1 + 4 ], %g1 next->previous = previous; 40013d48: c2 20 a0 04 st %g1, [ %g2 + 4 ] free(fat_fd); 40013d4c: 90 10 00 19 mov %i1, %o0 40013d50: 7f ff c5 a0 call 400053d0 40013d54: c4 20 40 00 st %g2, [ %g1 ] rc = fat_buf_release(fs_info); 40013d58: 40 00 02 47 call 40014674 40013d5c: 81 e8 00 00 restore =============================================================================== 40013e34 : { 40013e34: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED *a_length = new_length; 40013e38: f6 27 00 00 st %i3, [ %i4 ] <== NOT EXECUTED uint32_t chain = 0; 40013e3c: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED uint32_t last_cl = 0; 40013e40: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 40013e44: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 40013e48: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40013e4c: 1a 80 00 54 bcc 40013f9c <== NOT EXECUTED 40013e50: a0 10 20 00 clr %l0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40013e54: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 40013e58: 80 a0 a0 01 cmp %g2, 1 40013e5c: 22 80 00 53 be,a 40013fa8 40013e60: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 bytes_remain = (fs_info->vol.bpc - 40013e64: fa 06 20 08 ld [ %i0 + 8 ], %i5 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 40013e68: 84 07 7f ff add %i5, -1, %g2 40013e6c: a4 08 40 02 and %g1, %g2, %l2 bytes_remain = (fs_info->vol.bpc - 40013e70: ba 27 40 12 sub %i5, %l2, %i5 40013e74: ba 0f 40 02 and %i5, %g2, %i5 40013e78: 80 a0 00 1d cmp %g0, %i5 bytes2add = new_length - fat_fd->fat_file_size; 40013e7c: 86 26 c0 01 sub %i3, %g1, %g3 40013e80: 84 40 20 00 addx %g0, 0, %g2 if (bytes2add > bytes_remain) 40013e84: 80 a7 40 03 cmp %i5, %g3 40013e88: 1a 80 00 41 bcc 40013f8c 40013e8c: 84 0e 80 02 and %i2, %g2, %g2 if (zero_fill && bytes_remain > 0) { 40013e90: 80 a0 a0 00 cmp %g2, 0 40013e94: 12 80 00 51 bne 40013fd8 <== NEVER TAKEN 40013e98: a2 20 c0 1d sub %g3, %i5, %l1 if (bytes2add == 0) 40013e9c: 80 a4 60 00 cmp %l1, 0 40013ea0: 02 80 00 3e be 40013f98 40013ea4: 9a 10 00 1a mov %i2, %o5 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40013ea8: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40013eac: 82 04 7f ff add %l1, -1, %g1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40013eb0: 98 07 bf f8 add %fp, -8, %o4 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40013eb4: b5 30 40 02 srl %g1, %g2, %i2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40013eb8: 96 07 bf fc add %fp, -4, %o3 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40013ebc: b4 06 a0 01 inc %i2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40013ec0: 92 07 bf f0 add %fp, -16, %o1 40013ec4: 94 10 00 1a mov %i2, %o2 40013ec8: 7f ff fd 2d call 4001337c 40013ecc: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013ed0: a0 92 20 00 orcc %o0, 0, %l0 40013ed4: 32 80 00 33 bne,a 40013fa0 <== NEVER TAKEN 40013ed8: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) 40013edc: c2 07 bf fc ld [ %fp + -4 ], %g1 40013ee0: 80 90 40 1d orcc %g1, %i5, %g0 40013ee4: 02 80 00 38 be 40013fc4 40013ee8: 80 a0 40 1a cmp %g1, %i2 if (cls2add != cls_added) 40013eec: 02 80 00 08 be 40013f0c 40013ef0: b4 26 80 01 sub %i2, %g1, %i2 uint32_t missing = (cls2add - cls_added) << fs_info->vol.bpc_log2; 40013ef4: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40013ef8: b5 2e 80 02 sll %i2, %g2, %i2 new_length -= bytes2add < missing ? bytes2add : missing; 40013efc: 80 a6 80 11 cmp %i2, %l1 40013f00: 38 80 00 02 bgu,a 40013f08 <== ALWAYS TAKEN 40013f04: b4 10 00 11 mov %l1, %i2 40013f08: b6 26 c0 1a sub %i3, %i2, %i3 if (cls_added > 0) 40013f0c: 80 a0 60 00 cmp %g1, 0 40013f10: 22 80 00 47 be,a 4001402c 40013f14: f6 27 00 00 st %i3, [ %i4 ] if ( fat_fd->fat_file_size == 0 ) 40013f18: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 40013f1c: 80 a2 e0 00 cmp %o3, 0 40013f20: 32 80 00 48 bne,a 40014040 40013f24: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 fat_fd->map.disk_cln = chain; 40013f28: c4 07 bf f0 ld [ %fp + -16 ], %g2 fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 40013f2c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40013f30: 82 10 60 02 or %g1, 2, %g1 40013f34: c4 26 60 38 st %g2, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; 40013f38: c0 26 60 34 clr [ %i1 + 0x34 ] fat_fd->cln = cln; 40013f3c: c4 26 60 1c st %g2, [ %i1 + 0x1c ] fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 40013f40: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] fat_fd->map.last_cln = last_cl; 40013f44: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013f48: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 40013f4c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40013f50: 80 a0 60 00 cmp %g1, 0 40013f54: 32 80 00 36 bne,a 4001402c 40013f58: f6 27 00 00 st %i3, [ %i4 ] rc = fat_init_clusters_chain(fs_info, chain); 40013f5c: d2 07 bf f0 ld [ %fp + -16 ], %o1 40013f60: 40 00 05 71 call 40015524 40013f64: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 40013f68: 82 92 20 00 orcc %o0, 0, %g1 40013f6c: 22 80 00 30 be,a 4001402c <== ALWAYS TAKEN 40013f70: f6 27 00 00 st %i3, [ %i4 ] fat_free_fat_clusters_chain(fs_info, chain); 40013f74: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 40013f78: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013f7c: 7f ff fc c8 call 4001329c <== NOT EXECUTED 40013f80: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED return rc; 40013f84: 81 c7 e0 08 ret <== NOT EXECUTED 40013f88: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED if (zero_fill && bytes_remain > 0) { 40013f8c: 80 a0 a0 00 cmp %g2, 0 40013f90: 12 80 00 12 bne 40013fd8 40013f94: a2 10 20 00 clr %l1 return RC_OK; 40013f98: a0 10 20 00 clr %l0 } 40013f9c: b0 10 00 10 mov %l0, %i0 40013fa0: 81 c7 e0 08 ret 40013fa4: 81 e8 00 00 restore if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40013fa8: 80 a0 a0 00 cmp %g2, 0 40013fac: 32 bf ff af bne,a 40013e68 <== NEVER TAKEN 40013fb0: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED 40013fb4: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40013fb8: 80 88 a0 03 btst 3, %g2 40013fbc: 22 bf ff ab be,a 40013e68 <== NEVER TAKEN 40013fc0: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 40013fc4: 40 00 1c 5e call 4001b13c <__errno> 40013fc8: a0 10 3f ff mov -1, %l0 40013fcc: 82 10 20 1c mov 0x1c, %g1 40013fd0: 10 bf ff f3 b 40013f9c 40013fd4: c2 22 00 00 st %g1, [ %o0 ] uint32_t cl_start = start >> fs_info->vol.bpc_log2; 40013fd8: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40013fdc: 96 07 bf fc add %fp, -4, %o3 40013fe0: 95 30 40 0a srl %g1, %o2, %o2 40013fe4: 92 10 00 19 mov %i1, %o1 40013fe8: 7f ff fd 5a call 40013550 40013fec: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013ff0: a0 92 60 00 orcc %o1, 0, %l0 40013ff4: 32 bf ff eb bne,a 40013fa0 <== NEVER TAKEN 40013ff8: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 40013ffc: d2 07 bf fc ld [ %fp + -4 ], %o1 40014000: 98 10 20 00 clr %o4 40014004: 96 10 00 1d mov %i5, %o3 40014008: 94 10 00 12 mov %l2, %o2 4001400c: 90 10 00 18 mov %i0, %o0 40014010: 40 00 01 ed call 400147c4 40014014: a0 10 3f ff mov -1, %l0 if (bytes_remain != bytes_written) 40014018: 80 a2 00 1d cmp %o0, %i5 4001401c: 32 bf ff e1 bne,a 40013fa0 <== NEVER TAKEN 40014020: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 40014024: 10 bf ff 9f b 40013ea0 40014028: 80 a4 60 00 cmp %l1, 0 fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 4001402c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40014030: 82 10 60 02 or %g1, 2, %g1 fat_fd->fat_file_size = s; 40014034: f6 26 60 18 st %i3, [ %i1 + 0x18 ] return RC_OK; 40014038: 10 bf ff d9 b 40013f9c 4001403c: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 40014040: 80 a2 7f ff cmp %o1, -1 40014044: 22 80 00 0d be,a 40014078 <== NEVER TAKEN 40014048: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED old_last_cl = fat_fd->map.last_cln; 4001404c: d2 27 bf f4 st %o1, [ %fp + -12 ] rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 40014050: 90 10 00 18 mov %i0, %o0 40014054: 7f ff fb f0 call 40013014 40014058: d4 07 bf f0 ld [ %fp + -16 ], %o2 if ( rc != RC_OK ) 4001405c: 82 92 20 00 orcc %o0, 0, %g1 40014060: 12 bf ff c6 bne 40013f78 <== NEVER TAKEN 40014064: d2 07 bf f0 ld [ %fp + -16 ], %o1 fat_buf_release(fs_info); 40014068: 40 00 01 83 call 40014674 4001406c: 90 10 00 18 mov %i0, %o0 fat_fd->map.last_cln = last_cl; 40014070: 10 bf ff b6 b 40013f48 40014074: c2 07 bf f8 ld [ %fp + -8 ], %g1 rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 40014078: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001407c: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40014080: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40014084: 7f ff ff 37 call 40013d60 <== NOT EXECUTED 40014088: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001408c: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) 40014090: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014094: 02 bf ff ef be 40014050 <== NOT EXECUTED 40014098: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED 4001409c: 10 bf ff b7 b 40013f78 <== NOT EXECUTED 400140a0: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED =============================================================================== 40013d60 : { 40013d60: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_start(ap, cmd); 40013d64: 82 07 a0 50 add %fp, 0x50, %g1 <== NOT EXECUTED 40013d68: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED switch (cmd) 40013d6c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED va_start(ap, cmd); 40013d70: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40013d74: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED uint32_t cur_cln = 0; 40013d78: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED switch (cmd) 40013d7c: 12 80 00 22 bne 40013e04 <== NOT EXECUTED 40013d80: c2 27 bf fc st %g1, [ %fp + -4 ] ret = va_arg(ap, uint32_t *); 40013d84: 84 07 a0 58 add %fp, 0x58, %g2 40013d88: c4 27 bf fc st %g2, [ %fp + -4 ] if ( pos >= fat_fd->fat_file_size ) { 40013d8c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 40013d90: 80 a0 80 1b cmp %g2, %i3 40013d94: 08 80 00 22 bleu 40013e1c <== NEVER TAKEN 40013d98: ba 10 00 1c mov %i4, %i5 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40013d9c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40013da0: 80 a0 60 01 cmp %g1, 1 40013da4: 32 80 00 0d bne,a 40013dd8 40013da8: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 40013dac: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40013db0: 80 a0 60 00 cmp %g1, 0 40013db4: 32 80 00 09 bne,a 40013dd8 <== NEVER TAKEN 40013db8: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 <== NOT EXECUTED 40013dbc: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40013dc0: 80 88 60 03 btst 3, %g1 40013dc4: 22 80 00 05 be,a 40013dd8 40013dc8: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 *ret = 0; 40013dcc: c0 27 00 00 clr [ %i4 ] break; 40013dd0: 81 c7 e0 08 ret 40013dd4: 91 e8 20 00 restore %g0, 0, %o0 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40013dd8: 90 10 00 18 mov %i0, %o0 40013ddc: 96 07 bf f8 add %fp, -8, %o3 40013de0: 95 36 c0 0a srl %i3, %o2, %o2 40013de4: 7f ff fd db call 40013550 40013de8: 92 10 00 19 mov %i1, %o1 if ( rc != RC_OK ) 40013dec: b0 92 60 00 orcc %o1, 0, %i0 40013df0: 12 80 00 03 bne 40013dfc <== NEVER TAKEN 40013df4: c2 07 bf f8 ld [ %fp + -8 ], %g1 *ret = cur_cln; 40013df8: c2 27 40 00 st %g1, [ %i5 ] break; 40013dfc: 81 c7 e0 08 ret 40013e00: 81 e8 00 00 restore errno = EINVAL; 40013e04: 40 00 1c ce call 4001b13c <__errno> <== NOT EXECUTED 40013e08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013e0c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013e10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40013e14: 81 c7 e0 08 ret <== NOT EXECUTED 40013e18: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 40013e1c: 40 00 1c c8 call 4001b13c <__errno> <== NOT EXECUTED 40013e20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013e24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40013e28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013e2c: 81 c7 e0 08 ret <== NOT EXECUTED 40013e30: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400142b4 : return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400142b4: c2 02 60 20 ld [ %o1 + 0x20 ], %g1 <== NOT EXECUTED if (cln == 1) 400142b8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400142bc: c6 02 40 00 ld [ %o1 ], %g3 <== NOT EXECUTED previous = the_node->previous; 400142c0: c4 02 60 04 ld [ %o1 + 4 ], %g2 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400142c4: c2 02 60 24 ld [ %o1 + 0x24 ], %g1 <== NOT EXECUTED next->previous = previous; 400142c8: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400142cc: 83 30 60 05 srl %g1, 5, %g1 <== NOT EXECUTED previous->next = next; 400142d0: c6 20 80 00 st %g3, [ %g2 ] <== NOT EXECUTED rtems_chain_append_unprotected((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 400142d4: 82 08 60 01 and %g1, 1, %g1 <== NOT EXECUTED 400142d8: c4 02 20 78 ld [ %o0 + 0x78 ], %g2 <== NOT EXECUTED 400142dc: 87 28 60 01 sll %g1, 1, %g3 <== NOT EXECUTED 400142e0: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 400142e4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 400142e8: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED old_last = tail->previous; 400142ec: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED return &the_chain->Tail.Node; 400142f0: 86 00 60 04 add %g1, 4, %g3 <== NOT EXECUTED the_node->next = tail; 400142f4: c6 22 40 00 st %g3, [ %o1 ] <== NOT EXECUTED tail->previous = the_node; 400142f8: d2 20 60 08 st %o1, [ %g1 + 8 ] <== NOT EXECUTED old_last->next = the_node; 400142fc: d2 20 80 00 st %o1, [ %g2 ] <== NOT EXECUTED fat_fd->flags |= FAT_FILE_REMOVED; 40014300: c2 0a 60 30 ldub [ %o1 + 0x30 ], %g1 <== NOT EXECUTED 40014304: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED the_node->previous = old_last; 40014308: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED } 4001430c: 81 c3 e0 08 retl <== NOT EXECUTED 40014310: c2 2a 60 30 stb %g1, [ %o1 + 0x30 ] =============================================================================== 400135ec : { 400135ec: 9d e3 bf a0 save %sp, -96, %sp return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400135f0: c2 06 40 00 ld [ %i1 ], %g1 if (cln == 1) 400135f4: 80 a0 60 01 cmp %g1, 1 400135f8: 02 80 00 0b be 40013624 400135fc: 80 a0 60 00 cmp %g1, 0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40013600: 32 80 00 76 bne,a 400137d8 40013604: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40013608: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 4001360c: 80 88 a0 03 btst 3, %g2 40013610: 22 80 00 72 be,a 400137d8 <== NEVER TAKEN 40013614: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40013618: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 fs_info->vol.sec_mul); 4001361c: fa 0e 20 03 ldub [ %i0 + 3 ], %i5 return (fat_cluster_num_to_sector_num(fs_info, cln) << 40013620: 83 28 40 1d sll %g1, %i5, %g1 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 40013624: c4 06 60 04 ld [ %i1 + 4 ], %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 40013628: e0 06 20 74 ld [ %i0 + 0x74 ], %l0 4001362c: bb 30 a0 09 srl %g2, 9, %i5 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 40013630: 85 30 a0 05 srl %g2, 5, %g2 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 40013634: ba 07 40 01 add %i5, %g1, %i5 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 40013638: 84 08 a0 0f and %g2, 0xf, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 4001363c: bb 2f 60 04 sll %i5, 4, %i5 40013640: ba 07 40 02 add %i5, %g2, %i5 uint32_t mod = (key1) % FAT_HASH_MODULE; 40013644: 82 0f 60 01 and %i5, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 40013648: b7 28 60 01 sll %g1, 1, %i3 4001364c: b6 06 c0 01 add %i3, %g1, %i3 40013650: b7 2e e0 02 sll %i3, 2, %i3 return _Chain_Immutable_head( the_chain )->next; 40013654: c8 04 00 1b ld [ %l0 + %i3 ], %g4 40013658: a0 04 00 1b add %l0, %i3, %l0 return &the_chain->Tail.Node; 4001365c: b8 04 20 04 add %l0, 4, %i4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 40013660: 80 a1 00 1c cmp %g4, %i4 40013664: 22 80 00 1e be,a 400136dc 40013668: de 06 20 78 ld [ %i0 + 0x78 ], %o7 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 4001366c: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 if (cln == 1) 40013670: 80 a0 60 01 cmp %g1, 1 40013674: 02 80 00 0b be 400136a0 40013678: 80 a0 60 00 cmp %g1, 0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4001367c: 32 80 00 5c bne,a 400137ec 40013680: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40013684: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40013688: 80 88 a0 03 btst 3, %g2 4001368c: 22 80 00 58 be,a 400137ec <== NEVER TAKEN 40013690: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40013694: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 fs_info->vol.sec_mul); 40013698: c4 0e 20 03 ldub [ %i0 + 3 ], %g2 return (fat_cluster_num_to_sector_num(fs_info, cln) << 4001369c: 83 28 40 02 sll %g1, %g2, %g1 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400136a0: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 400136a4: 85 30 e0 09 srl %g3, 9, %g2 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400136a8: 87 30 e0 05 srl %g3, 5, %g3 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400136ac: 82 00 80 01 add %g2, %g1, %g1 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400136b0: 86 08 e0 0f and %g3, 0xf, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400136b4: 83 28 60 04 sll %g1, 4, %g1 400136b8: 82 00 40 03 add %g1, %g3, %g1 if ( (key1) == ck) 400136bc: 80 a7 40 01 cmp %i5, %g1 400136c0: 22 80 00 80 be,a 400138c0 400136c4: c2 01 20 08 ld [ %g4 + 8 ], %g1 the_node = the_node->next; 400136c8: c8 01 00 00 ld [ %g4 ], %g4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 400136cc: 80 a1 00 1c cmp %g4, %i4 400136d0: 32 bf ff e8 bne,a 40013670 400136d4: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 400136d8: de 06 20 78 ld [ %i0 + 0x78 ], %o7 return _Chain_Immutable_head( the_chain )->next; 400136dc: c8 03 c0 1b ld [ %o7 + %i3 ], %g4 400136e0: 9e 03 c0 1b add %o7, %i3, %o7 return &the_chain->Tail.Node; 400136e4: 9e 03 e0 04 add %o7, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 400136e8: 80 a1 00 0f cmp %g4, %o7 400136ec: 02 80 00 1e be 40013764 <== ALWAYS TAKEN 400136f0: 92 10 20 50 mov 0x50, %o1 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400136f4: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 <== NOT EXECUTED if (cln == 1) 400136f8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400136fc: 02 80 00 0b be 40013728 <== NOT EXECUTED 40013700: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40013704: 32 80 00 3f bne,a 40013800 <== NOT EXECUTED 40013708: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED 4001370c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 <== NOT EXECUTED 40013710: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 40013714: 22 80 00 3b be,a 40013800 <== NOT EXECUTED 40013718: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 4001371c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED fs_info->vol.sec_mul); 40013720: c4 0e 20 03 ldub [ %i0 + 3 ], %g2 <== NOT EXECUTED return (fat_cluster_num_to_sector_num(fs_info, cln) << 40013724: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 40013728: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 <== NOT EXECUTED 4001372c: 85 30 e0 09 srl %g3, 9, %g2 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 40013730: 87 30 e0 05 srl %g3, 5, %g3 <== NOT EXECUTED return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 40013734: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 40013738: 86 08 e0 0f and %g3, 0xf, %g3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 4001373c: 83 28 60 04 sll %g1, 4, %g1 <== NOT EXECUTED 40013740: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED if ( (key1) == ck) 40013744: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 40013748: 02 80 00 33 be 40013814 <== NOT EXECUTED 4001374c: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED the_node = the_node->next; 40013750: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 40013754: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED 40013758: 32 bf ff e8 bne,a 400136f8 <== NOT EXECUTED 4001375c: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 <== NOT EXECUTED lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t)); 40013760: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 40013764: 7f ff c6 96 call 400051bc 40013768: 90 10 20 01 mov 1, %o0 4001376c: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 40013770: 80 a2 20 00 cmp %o0, 0 40013774: 02 80 00 5a be 400138dc <== NEVER TAKEN 40013778: a2 10 00 08 mov %o0, %l1 lfat_fd->flags &= ~FAT_FILE_REMOVED; 4001377c: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1 40013780: 82 08 7f fe and %g1, -2, %g1 40013784: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 40013788: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 4001378c: f6 06 40 00 ld [ %i1 ], %i3 40013790: c8 06 60 04 ld [ %i1 + 4 ], %g4 40013794: c6 06 60 08 ld [ %i1 + 8 ], %g3 40013798: c4 06 60 0c ld [ %i1 + 0xc ], %g2 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4001379c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] lfat_fd->links_num = 1; 400137a0: b4 10 20 01 mov 1, %i2 old_last = tail->previous; 400137a4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400137a8: f4 24 60 08 st %i2, [ %l1 + 8 ] lfat_fd->dir_pos = *dir_pos; 400137ac: f6 24 60 20 st %i3, [ %l1 + 0x20 ] 400137b0: c8 24 60 24 st %g4, [ %l1 + 0x24 ] 400137b4: c6 24 60 28 st %g3, [ %l1 + 0x28 ] 400137b8: c4 24 60 2c st %g2, [ %l1 + 0x2c ] lfat_fd->ino = key; 400137bc: fa 24 60 0c st %i5, [ %l1 + 0xc ] the_node->next = tail; 400137c0: f8 24 40 00 st %i4, [ %l1 ] tail->previous = the_node; 400137c4: e2 24 20 08 st %l1, [ %l0 + 8 ] old_last->next = the_node; 400137c8: e2 20 40 00 st %l1, [ %g1 ] the_node->previous = old_last; 400137cc: c2 24 60 04 st %g1, [ %l1 + 4 ] } 400137d0: 81 c7 e0 08 ret 400137d4: 91 e8 20 00 restore %g0, 0, %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 400137d8: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 400137dc: 82 00 7f fe add %g1, -2, %g1 400137e0: 83 28 40 03 sll %g1, %g3, %g1 400137e4: 10 bf ff 8e b 4001361c 400137e8: 82 00 40 02 add %g1, %g2, %g1 400137ec: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 400137f0: 82 00 7f fe add %g1, -2, %g1 400137f4: 83 28 40 03 sll %g1, %g3, %g1 400137f8: 10 bf ff a8 b 40013698 400137fc: 82 00 40 02 add %g1, %g2, %g1 40013800: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED 40013804: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 40013808: 83 28 40 03 sll %g1, %g3, %g1 <== NOT EXECUTED 4001380c: 10 bf ff c5 b 40013720 <== NOT EXECUTED 40013810: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED if ( ((key2) == 0) || ((key2) == ffd->ino) ) 40013814: 02 80 00 07 be 40013830 <== NOT EXECUTED 40013818: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 4001381c: c2 01 20 0c ld [ %g4 + 0xc ], %g1 <== NOT EXECUTED 40013820: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 40013824: 32 bf ff cc bne,a 40013754 <== NOT EXECUTED 40013828: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t)); 4001382c: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 40013830: 7f ff c6 63 call 400051bc <== NOT EXECUTED 40013834: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40013838: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED if ( lfat_fd == NULL ) 4001383c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013840: 02 80 00 27 be 400138dc <== NOT EXECUTED 40013844: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 40013848: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4001384c: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40013850: fa 06 40 00 ld [ %i1 ], %i5 <== NOT EXECUTED 40013854: c8 06 60 04 ld [ %i1 + 4 ], %g4 <== NOT EXECUTED 40013858: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED 4001385c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 40013860: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ] <== NOT EXECUTED lfat_fd->links_num = 1; 40013864: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40013868: fa 24 60 20 st %i5, [ %l1 + 0x20 ] <== NOT EXECUTED lfat_fd->ino = fat_get_unique_ino(fs_info); 4001386c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED lfat_fd->links_num = 1; 40013870: c2 24 60 08 st %g1, [ %l1 + 8 ] <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 40013874: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40013878: c8 24 60 24 st %g4, [ %l1 + 0x24 ] <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4001387c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40013880: c6 24 60 28 st %g3, [ %l1 + 0x28 ] <== NOT EXECUTED lfat_fd->ino = fat_get_unique_ino(fs_info); 40013884: 40 00 07 46 call 4001559c <== NOT EXECUTED 40013888: c4 24 60 2c st %g2, [ %l1 + 0x2c ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4001388c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013890: 02 80 00 11 be 400138d4 <== NOT EXECUTED 40013894: d0 24 60 0c st %o0, [ %l1 + 0xc ] <== NOT EXECUTED 40013898: e0 06 20 74 ld [ %i0 + 0x74 ], %l0 <== NOT EXECUTED 4001389c: a0 04 00 1b add %l0, %i3, %l0 <== NOT EXECUTED old_last = tail->previous; 400138a0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400138a4: b8 04 20 04 add %l0, 4, %i4 <== NOT EXECUTED the_node->next = tail; 400138a8: f8 24 40 00 st %i4, [ %l1 ] <== NOT EXECUTED tail->previous = the_node; 400138ac: e2 24 20 08 st %l1, [ %l0 + 8 ] <== NOT EXECUTED old_last->next = the_node; 400138b0: e2 20 40 00 st %l1, [ %g1 ] <== NOT EXECUTED the_node->previous = old_last; 400138b4: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED } 400138b8: 81 c7 e0 08 ret <== NOT EXECUTED 400138bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED (*fat_fd) = lfat_fd; 400138c0: c8 26 80 00 st %g4, [ %i2 ] lfat_fd->links_num++; 400138c4: 82 00 60 01 inc %g1 400138c8: c2 21 20 08 st %g1, [ %g4 + 8 ] return rc; 400138cc: 81 c7 e0 08 ret 400138d0: 91 e8 20 00 restore %g0, 0, %o0 free((*fat_fd)); 400138d4: 7f ff c6 bf call 400053d0 <== NOT EXECUTED 400138d8: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 400138dc: 40 00 1e 18 call 4001b13c <__errno> <== NOT EXECUTED 400138e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400138e4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400138e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400138ec: 81 c7 e0 08 ret <== NOT EXECUTED 400138f0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40013990 : { 40013990: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t cur_cln = 0; 40013994: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED { 40013998: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED if (count == 0) 4001399c: 80 a6 e0 00 cmp %i3, 0 400139a0: 02 80 00 27 be 40013a3c <== NEVER TAKEN 400139a4: b0 10 20 00 clr %i0 if ( start >= fat_fd->fat_file_size ) 400139a8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 400139ac: 80 a0 40 1a cmp %g1, %i2 400139b0: 08 80 00 23 bleu 40013a3c 400139b4: 80 a0 40 1b cmp %g1, %i3 if ((count > fat_fd->fat_file_size) || 400139b8: 1a 80 00 5d bcc 40013b2c 400139bc: 84 20 40 1b sub %g1, %i3, %g2 count = fat_fd->fat_file_size - start; 400139c0: b6 20 40 1a sub %g1, %i2, %i3 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 400139c4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 400139c8: 80 a0 60 01 cmp %g1, 1 400139cc: 32 80 00 1e bne,a 40013a44 400139d0: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 400139d4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400139d8: 80 a0 60 00 cmp %g1, 0 400139dc: 32 80 00 1a bne,a 40013a44 <== NEVER TAKEN 400139e0: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 <== NOT EXECUTED 400139e4: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 400139e8: 80 88 60 03 btst 3, %g1 400139ec: 22 80 00 16 be,a 40013a44 400139f0: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 400139f4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 400139f8: 80 a0 60 00 cmp %g1, 0 400139fc: 32 80 00 5c bne,a 40013b6c <== NEVER TAKEN 40013a00: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40013a04: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 byte = start & (fs_info->vol.bps - 1); 40013a08: d4 17 40 00 lduh [ %i5 ], %o2 sec += (start >> fs_info->vol.sec_log2); 40013a0c: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 40013a10: 94 02 bf ff add %o2, -1, %o2 sec += (start >> fs_info->vol.sec_log2); 40013a14: 93 36 80 09 srl %i2, %o1, %o1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 40013a18: 98 10 00 1c mov %i4, %o4 40013a1c: 96 10 00 1b mov %i3, %o3 40013a20: 94 0a 80 1a and %o2, %i2, %o2 40013a24: 92 02 40 01 add %o1, %g1, %o1 40013a28: 40 00 03 1c call 40014698 <_fat_block_read> 40013a2c: 90 10 00 1d mov %i5, %o0 40013a30: b0 92 20 00 orcc %o0, 0, %i0 40013a34: 06 80 00 43 bl 40013b40 <== NEVER TAKEN 40013a38: 01 00 00 00 nop } 40013a3c: 81 c7 e0 08 ret 40013a40: 81 e8 00 00 restore cl_start = start >> fs_info->vol.bpc_log2; 40013a44: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 40013a48: e0 07 60 08 ld [ %i5 + 8 ], %l0 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40013a4c: 94 10 00 12 mov %l2, %o2 40013a50: 96 07 bf fc add %fp, -4, %o3 40013a54: 92 10 00 19 mov %i1, %o1 40013a58: 7f ff fe be call 40013550 40013a5c: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40013a60: b0 92 60 00 orcc %o1, 0, %i0 40013a64: 12 bf ff f6 bne 40013a3c <== NEVER TAKEN 40013a68: a0 04 3f ff add %l0, -1, %l0 uint32_t cmpltd = 0; 40013a6c: a2 10 20 00 clr %l1 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 40013a70: b4 0c 00 1a and %l0, %i2, %i2 40013a74: 10 80 00 1f b 40013af0 40013a78: 84 10 00 1a mov %i2, %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40013a7c: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 40013a80: 22 80 00 26 be,a 40013b18 <== NOT EXECUTED 40013a84: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40013a88: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); 40013a8c: d4 17 40 00 lduh [ %i5 ], %o2 sec += (ofs >> fs_info->vol.sec_log2); 40013a90: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 40013a94: 93 30 80 09 srl %g2, %o1, %o1 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 40013a98: 98 07 00 11 add %i4, %l1, %o4 byte = ofs & (fs_info->vol.bps - 1); 40013a9c: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 40013aa0: 96 10 00 10 mov %l0, %o3 40013aa4: 94 0a 80 02 and %o2, %g2, %o2 40013aa8: 92 02 40 01 add %o1, %g1, %o1 40013aac: 40 00 02 fb call 40014698 <_fat_block_read> 40013ab0: 90 10 00 1d mov %i5, %o0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40013ab4: 94 07 bf fc add %fp, -4, %o2 if ( ret < 0 ) 40013ab8: 80 a2 20 00 cmp %o0, 0 40013abc: 06 80 00 21 bl 40013b40 <== NEVER TAKEN 40013ac0: 90 10 00 1d mov %i5, %o0 save_cln = cur_cln; 40013ac4: e6 07 bf fc ld [ %fp + -4 ], %l3 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40013ac8: 92 10 00 13 mov %l3, %o1 40013acc: 7f ff fc df call 40012e48 40013ad0: b6 26 c0 10 sub %i3, %l0, %i3 cmpltd += c; 40013ad4: a2 04 40 10 add %l1, %l0, %l1 if ( rc != RC_OK ) 40013ad8: 80 a2 20 00 cmp %o0, 0 40013adc: 12 bf ff d8 bne 40013a3c <== NEVER TAKEN 40013ae0: b0 10 00 08 mov %o0, %i0 while (count > 0) 40013ae4: 80 a6 e0 00 cmp %i3, 0 40013ae8: 02 80 00 18 be 40013b48 40013aec: 84 10 20 00 clr %g2 c = MIN(count, (fs_info->vol.bpc - ofs)); 40013af0: e0 07 60 08 ld [ %i5 + 8 ], %l0 40013af4: a0 24 00 02 sub %l0, %g2, %l0 40013af8: 80 a4 00 1b cmp %l0, %i3 40013afc: 38 80 00 02 bgu,a 40013b04 40013b00: a0 10 00 1b mov %i3, %l0 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 40013b04: c2 07 bf fc ld [ %fp + -4 ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40013b08: 80 a0 60 00 cmp %g1, 0 40013b0c: 22 bf ff dc be,a 40013a7c <== NEVER TAKEN 40013b10: c6 0f 60 16 ldub [ %i5 + 0x16 ], %g3 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40013b14: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 40013b18: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 40013b1c: 82 00 7f fe add %g1, -2, %g1 40013b20: 83 28 40 03 sll %g1, %g3, %g1 40013b24: 10 bf ff da b 40013a8c 40013b28: 82 00 40 09 add %g1, %o1, %g1 if ((count > fat_fd->fat_file_size) || 40013b2c: 80 a0 80 1a cmp %g2, %i2 40013b30: 3a bf ff a6 bcc,a 400139c8 40013b34: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40013b38: 10 bf ff a3 b 400139c4 40013b3c: b6 20 40 1a sub %g1, %i2, %i3 } 40013b40: 81 c7 e0 08 ret <== NOT EXECUTED 40013b44: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 40013b48: c4 0f 60 0c ldub [ %i5 + 0xc ], %g2 40013b4c: 82 06 bf ff add %i2, -1, %g1 fat_fd->map.disk_cln = save_cln; 40013b50: e6 26 60 38 st %l3, [ %i1 + 0x38 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 40013b54: 82 00 40 11 add %g1, %l1, %g1 40013b58: 83 30 40 02 srl %g1, %g2, %g1 fat_fd->map.file_cln = cl_start + 40013b5c: a4 00 40 12 add %g1, %l2, %l2 40013b60: e4 26 60 34 st %l2, [ %i1 + 0x34 ] return cmpltd; 40013b64: 81 c7 e0 08 ret 40013b68: 91 e8 00 11 restore %g0, %l1, %o0 40013b6c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED 40013b70: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 40013b74: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED 40013b78: 10 bf ff a4 b 40013a08 <== NOT EXECUTED 40013b7c: 82 00 40 09 add %g1, %o1, %g1 <== NOT EXECUTED =============================================================================== 400138f4 : fat_fd->links_num++; 400138f4: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED { 400138f8: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED fat_fd->links_num++; 400138fc: 82 00 60 01 inc %g1 <== NOT EXECUTED } 40013900: 90 10 20 00 clr %o0 <== NOT EXECUTED 40013904: 81 c3 e0 08 retl <== NOT EXECUTED 40013908: c2 20 a0 08 st %g1, [ %g2 + 8 ] =============================================================================== 40014314 : { 40014314: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 40014318: f8 06 60 1c ld [ %i1 + 0x1c ], %i4 <== NOT EXECUTED 4001431c: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40014320: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40014324: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40014328: 22 80 00 22 be,a 400143b0 <== NOT EXECUTED 4001432c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 fat_fd->fat_file_size = 0; 40014330: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40014334: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40014338: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 4001433c: 82 0f 00 01 and %i4, %g1, %g1 40014340: 80 a0 80 01 cmp %g2, %g1 40014344: 18 80 00 0f bgu 40014380 <== ALWAYS TAKEN 40014348: 92 10 00 1c mov %i4, %o1 uint32_t save_cln = 0; 4001434c: 10 80 00 15 b 400143a0 <== NOT EXECUTED 40014350: b8 10 20 00 clr %i4 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; 40014354: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40014358: 82 00 40 02 add %g1, %g2, %g1 4001435c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40014360: c4 07 bf fc ld [ %fp + -4 ], %g2 40014364: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40014368: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 4001436c: 82 08 80 01 and %g2, %g1, %g1 40014370: 80 a0 40 03 cmp %g1, %g3 40014374: 1a 80 00 0b bcc 400143a0 40014378: 92 10 00 02 mov %g2, %o1 4001437c: b8 10 00 02 mov %g2, %i4 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40014380: 94 07 bf fc add %fp, -4, %o2 40014384: 7f ff fa b1 call 40012e48 40014388: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 4001438c: 80 a2 20 00 cmp %o0, 0 40014390: 22 bf ff f1 be,a 40014354 <== ALWAYS TAKEN 40014394: c4 06 20 08 ld [ %i0 + 8 ], %g2 } 40014398: 81 c7 e0 08 ret 4001439c: 91 e8 00 08 restore %g0, %o0, %o0 return rc; 400143a0: 90 10 20 00 clr %o0 fat_fd->map.last_cln = save_cln; 400143a4: f8 26 60 3c st %i4, [ %i1 + 0x3c ] } 400143a8: 81 c7 e0 08 ret 400143ac: 91 e8 00 08 restore %g0, %o0, %o0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 400143b0: 80 a0 60 00 cmp %g1, 0 400143b4: 32 bf ff e0 bne,a 40014334 <== NEVER TAKEN 400143b8: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 400143bc: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 400143c0: 80 88 60 03 btst 3, %g1 400143c4: 22 bf ff dc be,a 40014334 400143c8: c0 26 60 18 clr [ %i1 + 0x18 ] fat_fd->fat_file_size = fs_info->vol.rdir_size; 400143cc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400143d0: c2 26 60 18 st %g1, [ %i1 + 0x18 ] return rc; 400143d4: 10 bf ff f1 b 40014398 400143d8: 90 10 20 00 clr %o0 =============================================================================== 40013b80 : { 40013b80: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 40013b84: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED uint32_t cur_cln = 0; 40013b88: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 40013b8c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) 40013b90: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 40013b94: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 40013b98: 08 80 00 32 bleu 40013c60 <== NOT EXECUTED 40013b9c: 80 a0 60 00 cmp %g1, 0 assert(fat_fd->fat_file_size); 40013ba0: 02 80 00 33 be 40013c6c <== NEVER TAKEN 40013ba4: 17 10 00 a8 sethi %hi(0x4002a000), %o3 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 40013ba8: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40013bac: c6 06 20 08 ld [ %i0 + 8 ], %g3 40013bb0: b4 06 80 03 add %i2, %g3, %i2 40013bb4: b4 06 bf ff add %i2, -1, %i2 40013bb8: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 40013bbc: 85 2e 80 02 sll %i2, %g2, %g2 40013bc0: 80 a0 40 02 cmp %g1, %g2 40013bc4: 08 80 00 27 bleu 40013c60 40013bc8: 80 a6 a0 00 cmp %i2, 0 if (cl_start != 0) 40013bcc: 02 80 00 0a be 40013bf4 40013bd0: 96 07 bf f8 add %fp, -8, %o3 rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 40013bd4: 96 07 bf fc add %fp, -4, %o3 40013bd8: 94 06 bf ff add %i2, -1, %o2 40013bdc: 92 10 00 19 mov %i1, %o1 40013be0: 7f ff fe 5c call 40013550 40013be4: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013be8: 80 a2 60 00 cmp %o1, 0 40013bec: 12 80 00 1e bne 40013c64 <== NEVER TAKEN 40013bf0: 96 07 bf f8 add %fp, -8, %o3 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40013bf4: 94 10 00 1a mov %i2, %o2 40013bf8: 92 10 00 19 mov %i1, %o1 40013bfc: 7f ff fe 55 call 40013550 40013c00: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013c04: 80 a2 60 00 cmp %o1, 0 40013c08: 12 80 00 17 bne 40013c64 <== NEVER TAKEN 40013c0c: 01 00 00 00 nop rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 40013c10: d2 07 bf f8 ld [ %fp + -8 ], %o1 40013c14: 7f ff fd a2 call 4001329c 40013c18: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013c1c: 92 92 20 00 orcc %o0, 0, %o1 40013c20: 12 80 00 11 bne 40013c64 <== NEVER TAKEN 40013c24: 80 a6 a0 00 cmp %i2, 0 if (cl_start != 0) 40013c28: 02 80 00 0f be 40013c64 40013c2c: 92 10 20 00 clr %o1 rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 40013c30: d2 07 bf fc ld [ %fp + -4 ], %o1 40013c34: 94 10 3f ff mov -1, %o2 40013c38: 7f ff fc f7 call 40013014 40013c3c: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 40013c40: 92 92 20 00 orcc %o0, 0, %o1 40013c44: 12 80 00 08 bne 40013c64 <== NEVER TAKEN 40013c48: c2 07 bf fc ld [ %fp + -4 ], %g1 fat_fd->map.file_cln = cl_start - 1; 40013c4c: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = new_last_cln; 40013c50: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = cl_start - 1; 40013c54: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.last_cln = new_last_cln; 40013c58: 10 80 00 03 b 40013c64 40013c5c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 40013c60: 92 10 20 00 clr %o1 } 40013c64: 81 c7 e0 08 ret 40013c68: 91 e8 00 09 restore %g0, %o1, %o0 assert(fat_fd->fat_file_size); 40013c6c: 15 10 00 a8 sethi %hi(0x4002a000), %o2 <== NOT EXECUTED 40013c70: 11 10 00 a8 sethi %hi(0x4002a000), %o0 <== NOT EXECUTED 40013c74: 96 12 e2 00 or %o3, 0x200, %o3 <== NOT EXECUTED 40013c78: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED 40013c7c: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED 40013c80: 40 00 07 07 call 4001589c <__assert_func> <== NOT EXECUTED 40013c84: 90 12 22 18 or %o0, 0x218, %o0 <== NOT EXECUTED 40013c88: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4001390c : { 4001390c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 40013910: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED if (!FAT_FILE_IS_REMOVED(fat_fd) && 40013914: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40013918: 12 80 00 1c bne 40013988 <== NOT EXECUTED 4001391c: ba 10 20 00 clr %i5 40013920: 80 88 60 02 btst 2, %g1 40013924: 02 80 00 19 be 40013988 40013928: 01 00 00 00 nop FAT_FILE_HAS_META_DATA_CHANGED(fat_fd) && 4001392c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40013930: 80 a0 60 01 cmp %g1, 1 40013934: 12 80 00 06 bne 4001394c 40013938: 92 10 00 19 mov %i1, %o1 !FAT_FD_OF_ROOT_DIR(fat_fd)) 4001393c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40013940: 80 a0 60 00 cmp %g1, 0 40013944: 02 80 00 11 be 40013988 <== ALWAYS TAKEN 40013948: 01 00 00 00 nop rc = fat_file_write_first_cluster_num(fs_info, fat_fd); 4001394c: 40 00 13 30 call 4001860c 40013950: 90 10 00 18 mov %i0, %o0 rc = fat_file_write_file_size(fs_info, fat_fd); 40013954: 92 10 00 19 mov %i1, %o1 rc = fat_file_write_first_cluster_num(fs_info, fat_fd); 40013958: ba 10 00 08 mov %o0, %i5 rc = fat_file_write_file_size(fs_info, fat_fd); 4001395c: 40 00 13 5d call 400186d0 40013960: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40013964: 80 a2 20 00 cmp %o0, 0 40013968: 32 80 00 02 bne,a 40013970 <== NEVER TAKEN 4001396c: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED rc = fat_file_write_time_and_date(fs_info, fat_fd); 40013970: 92 10 00 19 mov %i1, %o1 40013974: 40 00 12 c5 call 40018488 40013978: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 4001397c: 80 a2 20 00 cmp %o0, 0 40013980: 32 80 00 02 bne,a 40013988 <== NEVER TAKEN 40013984: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED } 40013988: 81 c7 e0 08 ret 4001398c: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 400140a4 : { 400140a4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t c = 0; 400140a8: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED if ( count == 0 ) 400140ac: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 400140b0: 02 80 00 4c be 400141e0 <== NOT EXECUTED 400140b4: 92 10 20 00 clr %o1 if (start >= fat_fd->size_limit) 400140b8: fa 06 60 14 ld [ %i1 + 0x14 ], %i5 400140bc: 80 a7 40 1a cmp %i5, %i2 400140c0: 08 80 00 43 bleu 400141cc <== NEVER TAKEN 400140c4: ba 27 40 1a sub %i5, %i2, %i5 400140c8: 80 a7 40 1b cmp %i5, %i3 bool zero_fill = start > fat_fd->fat_file_size; 400140cc: 18 80 00 47 bgu 400141e8 <== ALWAYS TAKEN 400140d0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 400140d4: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 400140d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400140dc: 94 40 20 00 addx %g0, 0, %o2 <== NOT EXECUTED 400140e0: b6 06 80 1d add %i2, %i5, %i3 <== NOT EXECUTED 400140e4: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 400140e8: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 400140ec: 7f ff ff 52 call 40013e34 <== NOT EXECUTED 400140f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (RC_OK == rc) 400140f4: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 400140f8: 12 80 00 3a bne 400141e0 <== NOT EXECUTED 400140fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED if (c != (start + count)) 40014100: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 40014104: 32 80 00 02 bne,a 4001410c 40014108: ba 20 40 1a sub %g1, %i2, %i5 4001410c: f6 0e 20 0c ldub [ %i0 + 0xc ], %i3 return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 40014110: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40014114: 80 a0 60 01 cmp %g1, 1 40014118: 02 80 00 51 be 4001425c 4001411c: a1 36 80 1b srl %i2, %i3, %l0 uint32_t cur_cln = 0; 40014120: c0 27 bf fc clr [ %fp + -4 ] rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 40014124: 94 10 00 10 mov %l0, %o2 40014128: 96 07 bf fc add %fp, -4, %o3 4001412c: 92 10 00 19 mov %i1, %o1 40014130: 7f ff fd 08 call 40013550 40014134: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 40014138: 80 a2 60 00 cmp %o1, 0 4001413c: 12 80 00 44 bne 4001424c <== NEVER TAKEN 40014140: b7 2c 00 1b sll %l0, %i3, %i3 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 40014144: a4 10 20 00 clr %l2 uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 40014148: b4 26 80 1b sub %i2, %i3, %i2 uint32_t cmpltd = 0; 4001414c: a2 10 20 00 clr %l1 uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 40014150: b6 10 00 1a mov %i2, %i3 ret = fat_cluster_write(fs_info, 40014154: 94 10 00 1b mov %i3, %o2 while ( (RC_OK == rc) 40014158: 80 a2 60 00 cmp %o1, 0 4001415c: 12 80 00 31 bne 40014220 <== NEVER TAKEN 40014160: 90 10 00 18 mov %i0, %o0 40014164: 80 a7 60 00 cmp %i5, 0 40014168: 22 80 00 2f be,a 40014224 4001416c: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 40014170: d6 06 20 08 ld [ %i0 + 8 ], %o3 40014174: 96 22 c0 1b sub %o3, %i3, %o3 40014178: 80 a2 c0 1d cmp %o3, %i5 4001417c: 08 80 00 03 bleu 40014188 40014180: 98 07 00 11 add %i4, %l1, %o4 40014184: 96 10 00 1d mov %i5, %o3 ret = fat_cluster_write(fs_info, 40014188: 40 00 01 ea call 40014930 4001418c: d2 07 bf fc ld [ %fp + -4 ], %o1 if (0 > ret) 40014190: 80 a2 20 00 cmp %o0, 0 40014194: 06 bf ff f0 bl 40014154 <== NEVER TAKEN 40014198: 92 10 3f ff mov -1, %o1 save_cln = cur_cln; 4001419c: e4 07 bf fc ld [ %fp + -4 ], %l2 cmpltd += ret; 400141a0: a2 04 40 08 add %l1, %o0, %l1 if (0 < bytes_to_write) 400141a4: 92 10 20 00 clr %o1 400141a8: ba a7 40 08 subcc %i5, %o0, %i5 400141ac: 02 bf ff ea be 40014154 400141b0: b6 10 20 00 clr %i3 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 400141b4: 92 10 00 12 mov %l2, %o1 400141b8: 94 07 bf fc add %fp, -4, %o2 400141bc: 7f ff fb 23 call 40012e48 400141c0: 90 10 00 18 mov %i0, %o0 400141c4: 10 bf ff e4 b 40014154 400141c8: 92 10 00 08 mov %o0, %o1 rtems_set_errno_and_return_minus_one(EFBIG); 400141cc: 40 00 1b dc call 4001b13c <__errno> <== NOT EXECUTED 400141d0: 01 00 00 00 nop <== NOT EXECUTED 400141d4: 82 10 20 1b mov 0x1b, %g1 ! 1b <_TLS_Alignment+0x1a> <== NOT EXECUTED 400141d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400141dc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED } 400141e0: 81 c7 e0 08 ret 400141e4: 91 e8 00 09 restore %g0, %o1, %o0 bool zero_fill = start > fat_fd->fat_file_size; 400141e8: 80 a0 40 1a cmp %g1, %i2 rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 400141ec: 92 10 00 19 mov %i1, %o1 400141f0: 94 40 20 00 addx %g0, 0, %o2 400141f4: ba 10 00 1b mov %i3, %i5 400141f8: 98 07 bf f8 add %fp, -8, %o4 400141fc: b6 06 80 1d add %i2, %i5, %i3 40014200: 90 10 00 18 mov %i0, %o0 40014204: 7f ff ff 0c call 40013e34 40014208: 96 10 00 1b mov %i3, %o3 if (RC_OK == rc) 4001420c: 92 92 20 00 orcc %o0, 0, %o1 40014210: 12 bf ff f4 bne 400141e0 40014214: c2 07 bf f8 ld [ %fp + -8 ], %g1 if (c != (start + count)) 40014218: 10 bf ff bb b 40014104 4001421c: 80 a6 c0 01 cmp %i3, %g1 ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 40014220: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40014224: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 40014228: e4 26 60 38 st %l2, [ %i1 + 0x38 ] ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 4001422c: b4 06 80 11 add %i2, %l1, %i2 40014230: b5 36 80 01 srl %i2, %g1, %i2 fat_fd->map.file_cln = start_cln + 40014234: a0 06 80 10 add %i2, %l0, %l0 if (RC_OK != rc) 40014238: 80 a2 60 00 cmp %o1, 0 4001423c: 12 80 00 04 bne 4001424c <== NEVER TAKEN 40014240: e0 26 60 34 st %l0, [ %i1 + 0x34 ] return cmpltd; 40014244: 92 10 00 11 mov %l1, %o1 if (0 > ret) 40014248: 80 a2 60 00 cmp %o1, 0 4001424c: 16 bf ff e5 bge 400141e0 <== ALWAYS TAKEN 40014250: 01 00 00 00 nop rc = -1; 40014254: 10 bf ff e3 b 400141e0 <== NOT EXECUTED 40014258: 92 10 3f ff mov -1, %o1 ! ffffffff <== NOT EXECUTED return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 4001425c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40014260: 80 a0 60 00 cmp %g1, 0 40014264: 32 bf ff b0 bne,a 40014124 <== NEVER TAKEN 40014268: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED 4001426c: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40014270: 80 88 60 03 btst 3, %g1 40014274: 22 bf ff ac be,a 40014124 40014278: c0 27 bf fc clr [ %fp + -4 ] cln = fat_fd->cln; 4001427c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 byte = start & (fs_info->vol.bpc -1); 40014280: d4 06 20 08 ld [ %i0 + 8 ], %o2 ret = fat_cluster_write(fs_info, 40014284: 92 02 40 10 add %o1, %l0, %o1 byte = start & (fs_info->vol.bpc -1); 40014288: 94 02 bf ff add %o2, -1, %o2 ret = fat_cluster_write(fs_info, 4001428c: 98 10 00 1c mov %i4, %o4 40014290: 96 10 00 1d mov %i5, %o3 40014294: 94 0a 80 1a and %o2, %i2, %o2 40014298: 40 00 01 a6 call 40014930 4001429c: 90 10 00 18 mov %i0, %o0 if (0 > ret) 400142a0: 80 a2 20 00 cmp %o0, 0 400142a4: 06 bf ff ec bl 40014254 <== NEVER TAKEN 400142a8: 92 10 00 08 mov %o0, %o1 } 400142ac: 81 c7 e0 08 ret 400142b0: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 400186d0 : { 400186d0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED uint32_t le_new_length = 0; 400186d4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 400186d8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 400186dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400186e0: 32 80 00 07 bne,a 400186fc <== NOT EXECUTED 400186e4: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 400186e8: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 400186ec: 80 88 a0 03 btst 3, %g2 400186f0: 32 80 00 07 bne,a 4001870c <== ALWAYS TAKEN 400186f4: d2 06 20 28 ld [ %i0 + 0x28 ], %o1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 400186f8: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED 400186fc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40018700: 92 00 7f fe add %g1, -2, %o1 40018704: 93 2a 40 03 sll %o1, %g3, %o1 40018708: 92 02 40 02 add %o1, %g2, %o1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 4001870c: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 40018710: c2 0e 20 02 ldub [ %i0 + 2 ], %g1 byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 40018714: fa 16 00 00 lduh [ %i0 ], %i5 if (fat_fd->fat_file_type == FAT_DIRECTORY) { 40018718: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 4001871c: 83 32 80 01 srl %o2, %g1, %g1 byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 40018720: ba 07 7f ff add %i5, -1, %i5 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40018724: 92 00 40 09 add %g1, %o1, %o1 if (fat_fd->fat_file_type == FAT_DIRECTORY) { 40018728: 80 a0 a0 00 cmp %g2, 0 4001872c: 02 80 00 07 be 40018748 40018730: ba 0f 40 0a and %i5, %o2, %i5 le_new_length = CT_LE_L(fat_fd->fat_file_size); 40018734: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 40018738: 40 00 40 75 call 4002890c <__bswapsi2> 4001873c: d2 27 bf f4 st %o1, [ %fp + -12 ] 40018740: d0 27 bf fc st %o0, [ %fp + -4 ] 40018744: d2 07 bf f4 ld [ %fp + -12 ], %o1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4, 40018748: 98 07 bf fc add %fp, -4, %o4 4001874c: 96 10 20 04 mov 4, %o3 40018750: 94 07 60 1c add %i5, 0x1c, %o2 40018754: 7f ff ef f1 call 40014718 40018758: 90 10 00 18 mov %i0, %o0 } 4001875c: b1 3a 20 1f sra %o0, 0x1f, %i0 40018760: 81 c7 e0 08 ret 40018764: 81 e8 00 00 restore =============================================================================== 4001860c : { 4001860c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint16_t le_cl_hi = 0; 40018610: c0 37 bf fe clrh [ %fp + -2 ] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 40018614: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40018618: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001861c: 12 80 00 06 bne 40018634 <== NOT EXECUTED 40018620: fa 06 60 1c ld [ %i1 + 0x1c ], %i5 40018624: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40018628: 80 88 a0 03 btst 3, %g2 4001862c: 32 80 00 07 bne,a 40018648 <== ALWAYS TAKEN 40018630: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40018634: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40018638: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 4001863c: 82 00 7f fe add %g1, -2, %g1 40018640: 83 28 40 03 sll %g1, %g3, %g1 40018644: 82 00 40 02 add %g1, %g2, %g1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40018648: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 4001864c: f8 0e 20 02 ldub [ %i0 + 2 ], %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40018650: f6 16 00 00 lduh [ %i0 ], %i3 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40018654: b9 30 80 1c srl %g2, %i4, %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40018658: b6 06 ff ff add %i3, -1, %i3 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 4001865c: b8 07 00 01 add %i4, %g1, %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40018660: b6 0e c0 02 and %i3, %g2, %i3 le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF)); 40018664: 83 2f 60 08 sll %i5, 8, %g1 40018668: 85 2f 60 10 sll %i5, 0x10, %g2 4001866c: 85 30 a0 18 srl %g2, 0x18, %g2 40018670: 82 10 40 02 or %g1, %g2, %g1 ret1 = fat_sector_write(fs_info, sec, 40018674: 98 07 bf fc add %fp, -4, %o4 40018678: 94 06 e0 1a add %i3, 0x1a, %o2 4001867c: 92 10 00 1c mov %i4, %o1 le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF)); 40018680: c2 37 bf fc sth %g1, [ %fp + -4 ] ret1 = fat_sector_write(fs_info, sec, 40018684: 96 10 20 02 mov 2, %o3 40018688: 7f ff f0 24 call 40014718 4001868c: 90 10 00 18 mov %i0, %o0 le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 40018690: bb 37 60 10 srl %i5, 0x10, %i5 40018694: 83 2f 60 08 sll %i5, 8, %g1 ret1 = fat_sector_write(fs_info, sec, 40018698: b4 10 00 08 mov %o0, %i2 ret2 = fat_sector_write(fs_info, sec, 4001869c: 98 07 bf fe add %fp, -2, %o4 400186a0: 96 10 20 02 mov 2, %o3 400186a4: 94 06 e0 14 add %i3, 0x14, %o2 400186a8: 92 10 00 1c mov %i4, %o1 400186ac: 90 10 00 18 mov %i0, %o0 le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 400186b0: bb 37 60 08 srl %i5, 8, %i5 400186b4: ba 10 40 1d or %g1, %i5, %i5 ret2 = fat_sector_write(fs_info, sec, 400186b8: 7f ff f0 18 call 40014718 400186bc: fa 37 bf fe sth %i5, [ %fp + -2 ] if ( (ret1 < 0) || (ret2 < 0) ) 400186c0: b0 12 00 1a or %o0, %i2, %i0 } 400186c4: b1 3e 20 1f sra %i0, 0x1f, %i0 400186c8: 81 c7 e0 08 ret 400186cc: 81 e8 00 00 restore =============================================================================== 40018488 : { 40018488: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 4001848c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40018490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018494: 12 80 00 06 bne 400184ac <== NOT EXECUTED 40018498: ba 10 00 18 mov %i0, %i5 4001849c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 400184a0: 80 88 a0 03 btst 3, %g2 400184a4: 32 80 00 07 bne,a 400184c0 <== ALWAYS TAKEN 400184a8: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 400184ac: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 400184b0: f8 07 60 3c ld [ %i5 + 0x3c ], %i4 400184b4: 82 00 7f fe add %g1, -2, %g1 400184b8: 83 28 40 02 sll %g1, %g2, %g1 400184bc: 82 00 40 1c add %g1, %i4, %g1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 400184c0: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 400184c4: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 400184c8: f6 17 40 00 lduh [ %i5 ], %i3 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 400184cc: d0 06 60 4c ld [ %i1 + 0x4c ], %o0 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 400184d0: b9 30 80 1c srl %g2, %i4, %i4 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 400184d4: 94 07 bf fc add %fp, -4, %o2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 400184d8: b8 07 00 01 add %i4, %g1, %i4 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 400184dc: 92 07 bf fe add %fp, -2, %o1 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 400184e0: b6 06 ff ff add %i3, -1, %i3 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 400184e4: 40 00 06 46 call 40019dfc 400184e8: b6 0e c0 02 and %i3, %g2, %i3 time_val = CT_LE_W(time_val); 400184ec: c2 17 bf fc lduh [ %fp + -4 ], %g1 400184f0: 85 28 60 08 sll %g1, 8, %g2 400184f4: 83 30 60 08 srl %g1, 8, %g1 400184f8: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 400184fc: 98 07 bf fc add %fp, -4, %o4 40018500: 96 10 20 02 mov 2, %o3 40018504: 94 06 e0 16 add %i3, 0x16, %o2 40018508: 92 10 00 1c mov %i4, %o1 time_val = CT_LE_W(time_val); 4001850c: c2 37 bf fc sth %g1, [ %fp + -4 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 40018510: 7f ff f0 82 call 40014718 40018514: 90 10 00 1d mov %i5, %o0 date = CT_LE_W(date); 40018518: c2 17 bf fe lduh [ %fp + -2 ], %g1 4001851c: 85 28 60 08 sll %g1, 8, %g2 40018520: 83 30 60 08 srl %g1, 8, %g1 40018524: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 40018528: b4 10 00 08 mov %o0, %i2 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 4001852c: 98 07 bf fe add %fp, -2, %o4 40018530: 96 10 20 02 mov 2, %o3 date = CT_LE_W(date); 40018534: c2 37 bf fe sth %g1, [ %fp + -2 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 40018538: 94 06 e0 18 add %i3, 0x18, %o2 4001853c: 92 10 00 1c mov %i4, %o1 40018540: 90 10 00 1d mov %i5, %o0 40018544: 7f ff f0 75 call 40014718 40018548: b0 10 3f ff mov -1, %i0 if ( ret < 0 ) 4001854c: 80 a2 20 00 cmp %o0, 0 40018550: 36 80 00 02 bge,a 40018558 <== ALWAYS TAKEN 40018554: b1 3e a0 1f sra %i2, 0x1f, %i0 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET, 40018558: 98 07 bf fe add %fp, -2, %o4 4001855c: 96 10 20 02 mov 2, %o3 40018560: 94 06 e0 12 add %i3, 0x12, %o2 40018564: 92 10 00 1c mov %i4, %o1 40018568: 7f ff f0 6c call 40014718 4001856c: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 40018570: 80 a2 20 00 cmp %o0, 0 40018574: 26 80 00 02 bl,a 4001857c <== NEVER TAKEN 40018578: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED msdos_date_unix2dos(fat_fd->ctime, &date, &time_val); 4001857c: d0 06 60 44 ld [ %i1 + 0x44 ], %o0 40018580: 94 07 bf fc add %fp, -4, %o2 40018584: 40 00 06 1e call 40019dfc 40018588: 92 07 bf fe add %fp, -2, %o1 time_val = CT_LE_W(time_val); 4001858c: c2 17 bf fc lduh [ %fp + -4 ], %g1 40018590: 85 28 60 08 sll %g1, 8, %g2 40018594: 83 30 60 08 srl %g1, 8, %g1 40018598: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET, 4001859c: 98 07 bf fc add %fp, -4, %o4 400185a0: 96 10 20 02 mov 2, %o3 time_val = CT_LE_W(time_val); 400185a4: c2 37 bf fc sth %g1, [ %fp + -4 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET, 400185a8: 94 06 e0 0e add %i3, 0xe, %o2 400185ac: 92 10 00 1c mov %i4, %o1 400185b0: 7f ff f0 5a call 40014718 400185b4: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 400185b8: 80 a2 20 00 cmp %o0, 0 400185bc: 26 80 00 02 bl,a 400185c4 <== NEVER TAKEN 400185c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED date = CT_LE_W(date); 400185c4: c2 17 bf fe lduh [ %fp + -2 ], %g1 400185c8: 85 28 60 08 sll %g1, 8, %g2 400185cc: 83 30 60 08 srl %g1, 8, %g1 400185d0: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 400185d4: 98 07 bf fe add %fp, -2, %o4 400185d8: 96 10 20 02 mov 2, %o3 date = CT_LE_W(date); 400185dc: c2 37 bf fe sth %g1, [ %fp + -2 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 400185e0: 94 06 e0 10 add %i3, 0x10, %o2 400185e4: 92 10 00 1c mov %i4, %o1 400185e8: 7f ff f0 4c call 40014718 400185ec: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 400185f0: 80 a2 20 00 cmp %o0, 0 400185f4: 06 80 00 04 bl 40018604 <== NEVER TAKEN 400185f8: 01 00 00 00 nop } 400185fc: 81 c7 e0 08 ret 40018600: 81 e8 00 00 restore 40018604: 81 c7 e0 08 ret <== NOT EXECUTED 40018608: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 4001329c : { 4001329c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t next_cln = 0; 400132a0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 400132a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 400132a8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 400132ac: 82 0e 40 01 and %i1, %g1, %g1 <== NOT EXECUTED 400132b0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400132b4: 08 80 00 26 bleu 4001334c <== NOT EXECUTED 400132b8: ba 10 00 18 mov %i0, %i5 uint32_t cur_cln = chain; 400132bc: b8 10 00 19 mov %i1, %i4 uint32_t freed_cls_cnt = 0; 400132c0: b6 10 20 00 clr %i3 int rc = RC_OK, rc1 = RC_OK; 400132c4: 10 80 00 0e b 400132fc 400132c8: b0 10 20 00 clr %i0 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 400132cc: 7f ff ff 52 call 40013014 400132d0: 01 00 00 00 nop if ( rc != RC_OK ) 400132d4: 80 a2 20 00 cmp %o0, 0 400132d8: 32 80 00 02 bne,a 400132e0 <== NEVER TAKEN 400132dc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED cur_cln = next_cln; 400132e0: f8 07 bf fc ld [ %fp + -4 ], %i4 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 400132e4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 400132e8: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 400132ec: 82 0f 00 01 and %i4, %g1, %g1 400132f0: 80 a0 40 02 cmp %g1, %g2 400132f4: 1a 80 00 18 bcc 40013354 400132f8: b6 06 e0 01 inc %i3 rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 400132fc: 92 10 00 1c mov %i4, %o1 40013300: 94 07 bf fc add %fp, -4, %o2 40013304: 7f ff fe d1 call 40012e48 40013308: 90 10 00 1d mov %i5, %o0 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 4001330c: 92 10 00 1c mov %i4, %o1 rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 40013310: 82 10 00 08 mov %o0, %g1 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 40013314: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 40013318: 80 a0 60 00 cmp %g1, 0 4001331c: 02 bf ff ec be 400132cc <== ALWAYS TAKEN 40013320: 90 10 00 1d mov %i5, %o0 if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40013324: c4 07 60 4c ld [ %i5 + 0x4c ], %g2 <== NOT EXECUTED 40013328: 80 a0 bf ff cmp %g2, -1 <== NOT EXECUTED 4001332c: 02 80 00 03 be 40013338 <== NOT EXECUTED 40013330: b6 00 80 1b add %g2, %i3, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 40013334: f6 27 60 4c st %i3, [ %i5 + 0x4c ] <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 40013338: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED fat_buf_release(fs_info); 4001333c: 40 00 04 ce call 40014674 <== NOT EXECUTED 40013340: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; 40013344: 81 c7 e0 08 ret <== NOT EXECUTED 40013348: 81 e8 00 00 restore <== NOT EXECUTED uint32_t freed_cls_cnt = 0; 4001334c: b6 10 20 00 clr %i3 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; 40013350: b0 10 20 00 clr %i0 <== NOT EXECUTED fs_info->vol.next_cl = chain; 40013354: f2 27 60 54 st %i1, [ %i5 + 0x54 ] if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40013358: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 4001335c: 80 a0 7f ff cmp %g1, -1 40013360: 02 80 00 03 be 4001336c <== ALWAYS TAKEN 40013364: b6 00 40 1b add %g1, %i3, %i3 fs_info->vol.free_cls += freed_cls_cnt; 40013368: f6 27 60 4c st %i3, [ %i5 + 0x4c ] <== NOT EXECUTED fat_buf_release(fs_info); 4001336c: 40 00 04 c2 call 40014674 40013370: 90 10 00 1d mov %i5, %o0 } 40013374: 81 c7 e0 08 ret 40013378: 81 e8 00 00 restore =============================================================================== 40015698 : fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 40015698: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 <== NOT EXECUTED 4001569c: c6 02 20 7c ld [ %o0 + 0x7c ], %g3 <== NOT EXECUTED 400156a0: 92 22 40 01 sub %o1, %g1, %o1 <== NOT EXECUTED 400156a4: 85 32 60 03 srl %o1, 3, %g2 <== NOT EXECUTED 400156a8: c8 08 c0 02 ldub [ %g3 + %g2 ], %g4 <== NOT EXECUTED 400156ac: 92 0a 60 07 and %o1, 7, %o1 <== NOT EXECUTED 400156b0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400156b4: 93 28 40 09 sll %g1, %o1, %o1 <== NOT EXECUTED 400156b8: 92 29 00 09 andn %g4, %o1, %o1 <== NOT EXECUTED } 400156bc: 81 c3 e0 08 retl <== NOT EXECUTED 400156c0: d2 28 c0 02 stb %o1, [ %g3 + %g2 ] <== NOT EXECUTED =============================================================================== 40012e48 : fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 40012e48: 9d e3 bf 98 save %sp, -104, %sp uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 40012e4c: 80 a6 60 01 cmp %i1, 1 40012e50: 08 80 00 26 bleu 40012ee8 <== NEVER TAKEN 40012e54: ba 10 00 18 mov %i0, %i5 40012e58: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40012e5c: 82 00 60 01 inc %g1 40012e60: 80 a0 40 19 cmp %g1, %i1 40012e64: 0a 80 00 21 bcs 40012ee8 <== NEVER TAKEN 40012e68: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40012e6c: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40012e70: 80 88 60 01 btst 1, %g1 40012e74: 12 80 00 23 bne 40012f00 40012e78: b7 36 60 01 srl %i1, 1, %i3 40012e7c: 80 88 60 02 btst 2, %g1 40012e80: 02 80 00 03 be 40012e8c 40012e84: a1 2e 60 02 sll %i1, 2, %l0 40012e88: a1 2e 60 01 sll %i1, 1, %l0 40012e8c: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 40012e90: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 40012e94: b9 34 00 1c srl %l0, %i4, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40012e98: f6 17 40 00 lduh [ %i5 ], %i3 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40012e9c: b8 07 00 01 add %i4, %g1, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40012ea0: 94 10 20 01 mov 1, %o2 40012ea4: 96 07 bf fc add %fp, -4, %o3 40012ea8: 92 10 00 1c mov %i4, %o1 40012eac: 40 00 05 c2 call 400145b4 40012eb0: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40012eb4: b0 92 20 00 orcc %o0, 0, %i0 40012eb8: 12 80 00 45 bne 40012fcc <== NEVER TAKEN 40012ebc: 01 00 00 00 nop return rc; switch ( fs_info->vol.type ) 40012ec0: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40012ec4: b6 06 ff ff add %i3, -1, %i3 switch ( fs_info->vol.type ) 40012ec8: 80 a0 60 02 cmp %g1, 2 40012ecc: 02 80 00 35 be 40012fa0 40012ed0: b6 0e c0 10 and %i3, %l0, %i3 40012ed4: 80 a0 60 04 cmp %g1, 4 40012ed8: 02 80 00 2c be 40012f88 40012edc: 80 a0 60 01 cmp %g1, 1 40012ee0: 02 80 00 18 be 40012f40 <== ALWAYS TAKEN 40012ee4: c4 07 bf fc ld [ %fp + -4 ], %g2 *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 40012ee8: 40 00 20 95 call 4001b13c <__errno> <== NOT EXECUTED 40012eec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012ef0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40012ef4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012ef8: 81 c7 e0 08 ret <== NOT EXECUTED 40012efc: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40012f00: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 40012f04: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 40012f08: a0 06 c0 19 add %i3, %i1, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40012f0c: 94 10 20 01 mov 1, %o2 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40012f10: b9 34 00 1c srl %l0, %i4, %i4 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40012f14: f6 17 40 00 lduh [ %i5 ], %i3 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40012f18: b8 07 00 01 add %i4, %g1, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40012f1c: 96 07 bf fc add %fp, -4, %o3 40012f20: 92 10 00 1c mov %i4, %o1 40012f24: 40 00 05 a4 call 400145b4 40012f28: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40012f2c: b0 92 20 00 orcc %o0, 0, %i0 40012f30: 22 bf ff e5 be,a 40012ec4 <== ALWAYS TAKEN 40012f34: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 break; } return RC_OK; } 40012f38: 81 c7 e0 08 ret <== NOT EXECUTED 40012f3c: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); 40012f40: c8 08 80 1b ldub [ %g2 + %i3 ], %g4 40012f44: c8 26 80 00 st %g4, [ %i2 ] if ( ofs == (fs_info->vol.bps - 1) ) 40012f48: c6 17 40 00 lduh [ %i5 ], %g3 40012f4c: 86 00 ff ff add %g3, -1, %g3 40012f50: 80 a0 c0 1b cmp %g3, %i3 40012f54: 02 80 00 20 be 40012fd4 40012f58: b6 00 80 1b add %g2, %i3, %i3 *ret_val |= *(sec_buf + ofs + 1) << 8; 40012f5c: c2 0e e0 01 ldub [ %i3 + 1 ], %g1 40012f60: 83 28 60 08 sll %g1, 8, %g1 40012f64: 82 10 40 04 or %g1, %g4, %g1 40012f68: c2 26 80 00 st %g1, [ %i2 ] if ( FAT_CLUSTER_IS_ODD(cln) ) 40012f6c: 80 8e 60 01 btst 1, %i1 40012f70: 22 80 00 16 be,a 40012fc8 40012f74: 82 08 6f ff and %g1, 0xfff, %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 40012f78: 83 30 60 04 srl %g1, 4, %g1 40012f7c: c2 26 80 00 st %g1, [ %i2 ] 40012f80: 81 c7 e0 08 ret 40012f84: 81 e8 00 00 restore *ret_val = *((uint32_t *)(sec_buf + ofs)); 40012f88: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val = CF_LE_L(*ret_val); 40012f8c: 40 00 56 60 call 4002890c <__bswapsi2> 40012f90: d0 00 40 1b ld [ %g1 + %i3 ], %o0 40012f94: d0 26 80 00 st %o0, [ %i2 ] break; 40012f98: 81 c7 e0 08 ret 40012f9c: 81 e8 00 00 restore *ret_val = *((uint16_t *)(sec_buf + ofs)); 40012fa0: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val = CF_LE_W(*ret_val); 40012fa4: c4 10 40 1b lduh [ %g1 + %i3 ], %g2 40012fa8: 83 28 a0 08 sll %g2, 8, %g1 40012fac: 85 30 a0 08 srl %g2, 8, %g2 40012fb0: 82 10 40 02 or %g1, %g2, %g1 40012fb4: 83 28 60 10 sll %g1, 0x10, %g1 40012fb8: 83 30 60 10 srl %g1, 0x10, %g1 40012fbc: c2 26 80 00 st %g1, [ %i2 ] break; 40012fc0: 81 c7 e0 08 ret 40012fc4: 81 e8 00 00 restore *ret_val = (*ret_val) & FAT_FAT12_MASK; 40012fc8: c2 26 80 00 st %g1, [ %i2 ] 40012fcc: 81 c7 e0 08 ret 40012fd0: 81 e8 00 00 restore rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40012fd4: 96 07 bf fc add %fp, -4, %o3 40012fd8: 94 10 20 01 mov 1, %o2 40012fdc: 92 07 20 01 add %i4, 1, %o1 40012fe0: 40 00 05 75 call 400145b4 40012fe4: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40012fe8: 80 a2 20 00 cmp %o0, 0 40012fec: 12 80 00 08 bne 4001300c <== NEVER TAKEN 40012ff0: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val |= *sec_buf << 8; 40012ff4: c2 08 40 00 ldub [ %g1 ], %g1 40012ff8: c4 06 80 00 ld [ %i2 ], %g2 40012ffc: 83 28 60 08 sll %g1, 8, %g1 40013000: 82 10 40 02 or %g1, %g2, %g1 40013004: 10 bf ff da b 40012f6c 40013008: c2 26 80 00 st %g1, [ %i2 ] } 4001300c: 81 c7 e0 08 ret <== NOT EXECUTED 40013010: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 4001559c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 4001559c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 400155a0: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 400155a4: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 400155a8: b4 10 63 ff or %g1, 0x3ff, %i2 ! fffffff <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 400155ac: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 400155b0: 22 80 00 23 be,a 4001563c <== NOT EXECUTED 400155b4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 400155b8: c8 06 20 7c ld [ %i0 + 0x7c ], %g4 <== NOT EXECUTED 400155bc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400155c0: 87 30 60 03 srl %g1, 3, %g3 <== NOT EXECUTED 400155c4: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2 <== NOT EXECUTED 400155c8: b8 08 60 07 and %g1, 7, %i4 <== NOT EXECUTED 400155cc: b6 01 00 03 add %g4, %g3, %i3 <== NOT EXECUTED 400155d0: 85 38 80 1c sra %g2, %i4, %g2 <== NOT EXECUTED 400155d4: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 400155d8: 02 80 00 26 be 40015670 <== NOT EXECUTED 400155dc: c6 09 00 03 ldub [ %g4 + %g3 ], %g3 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 400155e0: 10 80 00 0e b 40015618 <== NOT EXECUTED 400155e4: ba 10 20 00 clr %i5 <== NOT EXECUTED 400155e8: 80 a7 40 09 cmp %i5, %o1 <== NOT EXECUTED 400155ec: 02 80 00 12 be 40015634 <== NOT EXECUTED 400155f0: c2 26 20 80 st %g1, [ %i0 + 0x80 ] <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 400155f4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400155f8: 87 30 60 03 srl %g1, 3, %g3 <== NOT EXECUTED 400155fc: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2 <== NOT EXECUTED 40015600: b8 08 60 07 and %g1, 7, %i4 <== NOT EXECUTED 40015604: b6 01 00 03 add %g4, %g3, %i3 <== NOT EXECUTED 40015608: 85 38 80 1c sra %g2, %i4, %g2 <== NOT EXECUTED 4001560c: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 40015610: 02 80 00 18 be 40015670 <== NOT EXECUTED 40015614: c6 09 00 03 ldub [ %g4 + %g3 ], %g3 <== NOT EXECUTED fs_info->index++; 40015618: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 4001561c: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40015620: 0a bf ff f2 bcs 400155e8 <== NOT EXECUTED 40015624: ba 07 60 01 inc %i5 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 40015628: 80 a7 40 09 cmp %i5, %o1 <== NOT EXECUTED 4001562c: 12 bf ff f2 bne 400155f4 <== NOT EXECUTED 40015630: c0 26 20 80 clr [ %i0 + 0x80 ] <== NOT EXECUTED 40015634: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 40015638: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 4001563c: 82 26 80 01 sub %i2, %g1, %g1 <== NOT EXECUTED 40015640: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40015644: 08 80 00 13 bleu 40015690 <== NOT EXECUTED 40015648: 01 00 00 00 nop <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 4001564c: d2 26 20 84 st %o1, [ %i0 + 0x84 ] <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 40015650: 7f ff c2 f4 call 40006220 <== NOT EXECUTED 40015654: d0 06 20 7c ld [ %i0 + 0x7c ], %o0 <== NOT EXECUTED if (fs_info->uino != NULL) 40015658: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001565c: 02 80 00 0d be 40015690 <== NOT EXECUTED 40015660: d0 26 20 7c st %o0, [ %i0 + 0x7c ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 40015664: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 40015668: 10 bf ff d1 b 400155ac <== NOT EXECUTED 4001566c: d2 26 20 80 st %o1, [ %i0 + 0x80 ] <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 40015670: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40015674: b9 28 40 1c sll %g1, %i4, %i4 <== NOT EXECUTED 40015678: 86 17 00 03 or %i4, %g3, %g3 <== NOT EXECUTED 4001567c: c6 2e c0 00 stb %g3, [ %i3 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 40015680: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 40015684: f0 06 20 80 ld [ %i0 + 0x80 ], %i0 <== NOT EXECUTED 40015688: 81 c7 e0 08 ret <== NOT EXECUTED 4001568c: 91 e8 40 18 restore %g1, %i0, %o0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 40015690: 81 c7 e0 08 ret <== NOT EXECUTED 40015694: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40015524 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 40015524: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40015528: 10 80 00 0e b 40015560 <== NOT EXECUTED 4001552c: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 40015530: 7f ff fc a5 call 400147c4 40015534: d6 06 20 08 ld [ %i0 + 8 ], %o3 if ( ret != fs_info->vol.bpc ) 40015538: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001553c: 80 a0 40 08 cmp %g1, %o0 { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40015540: 94 07 bf fc add %fp, -4, %o2 if ( ret != fs_info->vol.bpc ) 40015544: 12 80 00 13 bne 40015590 <== NEVER TAKEN 40015548: 90 10 00 18 mov %i0, %o0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4001554c: 7f ff f6 3f call 40012e48 40015550: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) 40015554: 80 a2 20 00 cmp %o0, 0 40015558: 12 80 00 0c bne 40015588 <== NEVER TAKEN 4001555c: f2 07 bf fc ld [ %fp + -4 ], %i1 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40015560: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 40015564: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 40015568: 92 10 00 19 mov %i1, %o1 4001556c: 98 10 20 00 clr %o4 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40015570: b2 0e 40 02 and %i1, %g2, %i1 ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 40015574: 94 10 20 00 clr %o2 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40015578: 80 a6 40 01 cmp %i1, %g1 4001557c: 0a bf ff ed bcs 40015530 40015580: 90 10 00 18 mov %i0, %o0 return rc; } } return rc; 40015584: 90 10 20 00 clr %o0 } 40015588: 81 c7 e0 08 ret 4001558c: 91 e8 00 08 restore %g0, %o0, %o0 return -1; 40015590: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED } 40015594: 81 c7 e0 08 ret <== NOT EXECUTED 40015598: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 40014a9c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 40014a9c: 9d e3 be e8 save %sp, -280, %sp <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 40014aa0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED { 40014aa4: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 40014aa8: c0 27 bf 8c clr [ %fp + -116 ] <== NOT EXECUTED vol->fd = open(device, O_RDWR); 40014aac: 7f ff c5 2d call 40005f60 <== NOT EXECUTED 40014ab0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (vol->fd < 0) 40014ab4: 80 a2 20 00 cmp %o0, 0 40014ab8: 06 80 01 cb bl 400151e4 <== NEVER TAKEN 40014abc: d0 24 a0 68 st %o0, [ %l2 + 0x68 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 40014ac0: 7f ff c2 5a call 40005428 40014ac4: 92 07 bf a0 add %fp, -96, %o1 if (rc != 0) 40014ac8: 80 a2 20 00 cmp %o0, 0 40014acc: 12 80 01 c3 bne 400151d8 <== NEVER TAKEN 40014ad0: 07 00 00 3c sethi %hi(0xf000), %g3 close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 40014ad4: c4 07 bf ac ld [ %fp + -84 ], %g2 40014ad8: 84 08 80 03 and %g2, %g3, %g2 40014adc: 07 00 00 18 sethi %hi(0x6000), %g3 40014ae0: 80 a0 80 03 cmp %g2, %g3 40014ae4: 12 80 01 be bne 400151dc <== NEVER TAKEN 40014ae8: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 40014aec: 94 06 20 6c add %i0, 0x6c, %o2 40014af0: 13 10 01 10 sethi %hi(0x40044000), %o1 40014af4: 40 00 04 31 call 40015bb8 40014af8: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <__end+0x16329> rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { 40014afc: b0 92 20 00 orcc %o0, 0, %i0 40014b00: 12 80 01 b6 bne 400151d8 <== NEVER TAKEN 40014b04: 94 07 bf 8c add %fp, -116, %o2 rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 40014b08: d0 04 a0 6c ld [ %l2 + 0x6c ], %o0 40014b0c: 7f ff f3 be call 40011a04 40014b10: 92 10 20 00 clr %o1 if (sc != RTEMS_SUCCESSFUL) 40014b14: 80 a2 20 00 cmp %o0, 0 40014b18: 12 80 01 b9 bne 400151fc <== NEVER TAKEN 40014b1c: d0 07 bf 8c ld [ %fp + -116 ], %o0 { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 40014b20: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 40014b24: c2 08 a0 20 ldub [ %g2 + 0x20 ], %g1 40014b28: c2 2f bf 87 stb %g1, [ %fp + -121 ] 40014b2c: c2 08 a0 21 ldub [ %g2 + 0x21 ], %g1 40014b30: c2 2f bf 83 stb %g1, [ %fp + -125 ] 40014b34: c2 08 a0 22 ldub [ %g2 + 0x22 ], %g1 40014b38: c2 2f bf 7f stb %g1, [ %fp + -129 ] 40014b3c: c2 08 a0 23 ldub [ %g2 + 0x23 ], %g1 40014b40: c2 2f bf 7b stb %g1, [ %fp + -133 ] 40014b44: c2 08 a0 24 ldub [ %g2 + 0x24 ], %g1 40014b48: c2 2f bf 77 stb %g1, [ %fp + -137 ] 40014b4c: c2 08 a0 25 ldub [ %g2 + 0x25 ], %g1 40014b50: c2 2f bf 73 stb %g1, [ %fp + -141 ] 40014b54: c2 08 a0 26 ldub [ %g2 + 0x26 ], %g1 40014b58: c2 2f bf 6f stb %g1, [ %fp + -145 ] 40014b5c: c2 08 a0 27 ldub [ %g2 + 0x27 ], %g1 40014b60: c2 2f bf 6b stb %g1, [ %fp + -149 ] 40014b64: c2 08 a0 28 ldub [ %g2 + 0x28 ], %g1 40014b68: e6 08 a0 0b ldub [ %g2 + 0xb ], %l3 40014b6c: fa 08 a0 0c ldub [ %g2 + 0xc ], %i5 40014b70: e0 08 a0 0d ldub [ %g2 + 0xd ], %l0 40014b74: ee 08 a0 0e ldub [ %g2 + 0xe ], %l7 40014b78: f4 08 a0 0f ldub [ %g2 + 0xf ], %i2 40014b7c: e2 08 a0 10 ldub [ %g2 + 0x10 ], %l1 40014b80: ec 08 a0 11 ldub [ %g2 + 0x11 ], %l6 40014b84: f2 08 a0 12 ldub [ %g2 + 0x12 ], %i1 40014b88: e8 08 a0 13 ldub [ %g2 + 0x13 ], %l4 40014b8c: f8 08 a0 14 ldub [ %g2 + 0x14 ], %i4 40014b90: ea 08 a0 16 ldub [ %g2 + 0x16 ], %l5 40014b94: f6 08 a0 17 ldub [ %g2 + 0x17 ], %i3 40014b98: c2 2f bf 67 stb %g1, [ %fp + -153 ] 40014b9c: c2 08 a0 2c ldub [ %g2 + 0x2c ], %g1 40014ba0: c2 2f bf 5b stb %g1, [ %fp + -165 ] 40014ba4: c2 08 a0 2d ldub [ %g2 + 0x2d ], %g1 40014ba8: c2 2f bf 57 stb %g1, [ %fp + -169 ] 40014bac: c2 08 a0 2e ldub [ %g2 + 0x2e ], %g1 40014bb0: c2 2f bf 63 stb %g1, [ %fp + -157 ] 40014bb4: c2 08 a0 2f ldub [ %g2 + 0x2f ], %g1 40014bb8: c2 2f bf 5f stb %g1, [ %fp + -161 ] 40014bbc: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1 40014bc0: c2 2f bf 53 stb %g1, [ %fp + -173 ] 40014bc4: c2 08 a0 31 ldub [ %g2 + 0x31 ], %g1 sc = rtems_bdbuf_release( block); 40014bc8: 7f ff f4 18 call 40011c28 40014bcc: c2 2f bf 4f stb %g1, [ %fp + -177 ] if (sc != RTEMS_SUCCESSFUL) 40014bd0: 80 a2 20 00 cmp %o0, 0 40014bd4: 12 80 01 8a bne 400151fc <== NEVER TAKEN 40014bd8: bb 2f 60 08 sll %i5, 8, %i5 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 40014bdc: a6 17 40 13 or %i5, %l3, %l3 if ( (vol->bps != 512) && 40014be0: 84 04 fe 00 add %l3, -512, %g2 40014be4: 84 08 bd ff and %g2, -513, %g2 40014be8: 85 28 a0 10 sll %g2, 0x10, %g2 (vol->bps != 1024) && (vol->bps != 2048) && 40014bec: 80 a0 a0 00 cmp %g2, 0 40014bf0: 02 80 00 07 be 40014c0c <== ALWAYS TAKEN 40014bf4: e6 34 80 00 sth %l3, [ %l2 ] (vol->bps != 1024) && 40014bf8: 84 04 f8 00 add %l3, -2048, %g2 <== NOT EXECUTED 40014bfc: 07 3f ff c2 sethi %hi(0xffff0800), %g3 <== NOT EXECUTED (vol->bps != 2048) && 40014c00: 80 a8 80 03 andncc %g2, %g3, %g0 <== NOT EXECUTED 40014c04: 12 80 00 41 bne 40014d08 <== NOT EXECUTED 40014c08: 01 00 00 00 nop <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 40014c0c: 93 2c e0 10 sll %l3, 0x10, %o1 40014c10: 85 32 60 19 srl %o1, 0x19, %g2 40014c14: 80 88 a0 01 btst 1, %g2 40014c18: 12 80 00 09 bne 40014c3c <== ALWAYS TAKEN 40014c1c: c0 2c a0 03 clrb [ %l2 + 3 ] 40014c20: 86 10 20 00 clr %g3 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 40014c24: 85 38 a0 01 sra %g2, 1, %g2 <== NOT EXECUTED 40014c28: 88 00 e0 01 add %g3, 1, %g4 <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 40014c2c: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 40014c30: 02 bf ff fd be 40014c24 <== NOT EXECUTED 40014c34: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED 40014c38: c8 2c a0 03 stb %g4, [ %l2 + 3 ] <== NOT EXECUTED for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 40014c3c: 85 32 60 10 srl %o1, 0x10, %g2 40014c40: 80 8c e0 01 btst 1, %l3 40014c44: 12 80 00 0a bne 40014c6c <== NEVER TAKEN 40014c48: c0 2c a0 02 clrb [ %l2 + 2 ] 40014c4c: 10 80 00 03 b 40014c58 40014c50: 86 10 20 01 mov 1, %g3 40014c54: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->sec_log2++); 40014c58: 85 38 a0 01 sra %g2, 1, %g2 for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 40014c5c: 80 88 a0 01 btst 1, %g2 40014c60: 02 bf ff fd be 40014c54 40014c64: 82 00 e0 01 add %g3, 1, %g1 40014c68: c6 2c a0 02 stb %g3, [ %l2 + 2 ] /* Assign the sector size as bdbuf block size for now. * If possible the bdbuf block size will get increased to the cluster * size at the end of this method for better performance */ sc = rtems_bdbuf_set_block_size (vol->dd, vol->bps, true); 40014c6c: 94 10 20 01 mov 1, %o2 40014c70: d0 04 a0 6c ld [ %l2 + 0x6c ], %o0 40014c74: 7f ff f4 78 call 40011e54 40014c78: 93 32 60 10 srl %o1, 0x10, %o1 if (sc != RTEMS_SUCCESSFUL) 40014c7c: 80 a2 20 00 cmp %o0, 0 40014c80: 12 80 00 22 bne 40014d08 <== NEVER TAKEN 40014c84: 84 10 20 01 mov 1, %g2 { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } vol->bytes_per_block = vol->bps; 40014c88: c8 14 80 00 lduh [ %l2 ], %g4 vol->bytes_per_block_log2 = vol->sec_log2; 40014c8c: de 0c a0 02 ldub [ %l2 + 2 ], %o7 vol->bytes_per_block = vol->bps; 40014c90: 89 29 20 10 sll %g4, 0x10, %g4 40014c94: bb 31 20 10 srl %g4, 0x10, %i5 vol->bytes_per_block_log2 = vol->sec_log2; 40014c98: de 2c a0 14 stb %o7, [ %l2 + 0x14 ] vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 40014c9c: 9a 8c 20 ff andcc %l0, 0xff, %o5 vol->bytes_per_block = vol->bps; 40014ca0: fa 24 a0 10 st %i5, [ %l2 + 0x10 ] vol->sectors_per_block = 1; 40014ca4: c4 2c a0 0d stb %g2, [ %l2 + 0xd ] if (vol->spc == 0) 40014ca8: 02 80 00 18 be 40014d08 <== NEVER TAKEN 40014cac: e0 2c a0 04 stb %l0, [ %l2 + 4 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 40014cb0: c0 2c a0 05 clrb [ %l2 + 5 ] 40014cb4: 80 8c 20 01 btst 1, %l0 40014cb8: 12 80 00 1c bne 40014d28 40014cbc: 84 10 00 0d mov %o5, %g2 40014cc0: 10 80 00 03 b 40014ccc 40014cc4: 86 10 20 01 mov 1, %g3 40014cc8: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->spc_log2++); 40014ccc: 85 38 a0 01 sra %g2, 1, %g2 for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 40014cd0: 80 88 a0 01 btst 1, %g2 40014cd4: 02 bf ff fd be 40014cc8 40014cd8: 82 00 e0 01 add %g3, 1, %g1 40014cdc: 84 08 e0 ff and %g3, 0xff, %g2 40014ce0: c6 2c a0 05 stb %g3, [ %l2 + 5 ] 40014ce4: 86 10 20 01 mov 1, %g3 40014ce8: 10 80 00 12 b 40014d30 40014cec: 87 28 c0 02 sll %g3, %g2, %g3 if (fs_info->c.state == FAT_CACHE_EMPTY) 40014cf0: c4 0c a0 91 ldub [ %l2 + 0x91 ], %g2 <== NOT EXECUTED 40014cf4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014cf8: 02 80 00 04 be 40014d08 <== NOT EXECUTED 40014cfc: 01 00 00 00 nop <== NOT EXECUTED 40014d00: 7f ff fd b7 call 400143dc <== NOT EXECUTED 40014d04: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); 40014d08: 7f ff c1 52 call 40005250 <== NOT EXECUTED 40014d0c: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40014d10: 40 00 19 0b call 4001b13c <__errno> <== NOT EXECUTED 40014d14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014d18: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40014d1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014d20: 81 c7 e0 08 ret <== NOT EXECUTED 40014d24: 81 e8 00 00 restore <== NOT EXECUTED for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 40014d28: 84 10 20 00 clr %g2 40014d2c: 86 10 20 01 mov 1, %g3 if (vol->spc != UINT32_C(1) << vol->spc_log2) 40014d30: 80 a3 40 03 cmp %o5, %g3 40014d34: 12 bf ff f5 bne 40014d08 <== NEVER TAKEN 40014d38: bb 2f 40 02 sll %i5, %g2, %i5 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 40014d3c: c0 2c a0 0c clrb [ %l2 + 0xc ] 40014d40: 84 10 00 1d mov %i5, %g2 40014d44: 80 8f 60 01 btst 1, %i5 40014d48: 12 80 00 0a bne 40014d70 <== NEVER TAKEN 40014d4c: fa 24 a0 08 st %i5, [ %l2 + 8 ] 40014d50: 10 80 00 03 b 40014d5c 40014d54: 86 10 20 01 mov 1, %g3 40014d58: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->bpc_log2++); 40014d5c: 85 38 a0 01 sra %g2, 1, %g2 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 40014d60: 80 88 a0 01 btst 1, %g2 40014d64: 02 bf ff fd be 40014d58 40014d68: 82 00 e0 01 add %g3, 1, %g1 40014d6c: c6 2c a0 0c stb %g3, [ %l2 + 0xc ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014d70: 89 31 20 10 srl %g4, 0x10, %g4 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40014d74: b5 2e a0 08 sll %i2, 8, %i2 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014d78: 86 01 3f ff add %g4, -1, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40014d7c: b3 2e 60 08 sll %i1, 8, %i1 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40014d80: ae 16 80 17 or %i2, %l7, %l7 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40014d84: ac 16 40 16 or %i1, %l6, %l6 vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 40014d88: e2 2c a0 15 stb %l1, [ %l2 + 0x15 ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014d8c: 85 2d a0 05 sll %l6, 5, %g2 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40014d90: ee 34 a0 20 sth %l7, [ %l2 + 0x20 ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014d94: 84 00 80 03 add %g2, %g3, %g2 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40014d98: ec 34 a0 2c sth %l6, [ %l2 + 0x2c ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014d9c: 83 38 a0 1f sra %g2, 0x1f, %g1 40014da0: 81 80 60 00 wr %g1, %y 40014da4: 01 00 00 00 nop 40014da8: 01 00 00 00 nop 40014dac: 01 00 00 00 nop 40014db0: 88 78 80 04 sdiv %g2, %g4, %g4 vol->rdir_size = vol->rdir_secs << vol->sec_log2; 40014db4: 9f 29 00 0f sll %g4, %o7, %o7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40014db8: c8 24 a0 30 st %g4, [ %l2 + 0x30 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 40014dbc: b7 2e e0 08 sll %i3, 8, %i3 40014dc0: aa 16 c0 15 or %i3, %l5, %l5 40014dc4: ab 2d 60 10 sll %l5, 0x10, %l5 40014dc8: 80 a5 60 00 cmp %l5, 0 40014dcc: 02 80 00 98 be 4001502c 40014dd0: de 24 a0 34 st %o7, [ %l2 + 0x34 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 40014dd4: ab 35 60 10 srl %l5, 0x10, %l5 40014dd8: ea 24 a0 24 st %l5, [ %l2 + 0x24 ] vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 40014ddc: a2 5d 40 11 smul %l5, %l1, %l1 40014de0: ae 04 40 17 add %l1, %l7, %l7 40014de4: 88 01 00 17 add %g4, %l7, %g4 vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 40014de8: ee 24 a0 28 st %l7, [ %l2 + 0x28 ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 40014dec: b9 2f 20 08 sll %i4, 8, %i4 40014df0: a8 17 00 14 or %i4, %l4, %l4 40014df4: a9 2d 20 10 sll %l4, 0x10, %l4 40014df8: 80 a5 20 00 cmp %l4, 0 40014dfc: 02 80 00 80 be 40014ffc 40014e00: c8 24 a0 3c st %g4, [ %l2 + 0x3c ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 40014e04: a9 35 20 10 srl %l4, 0x10, %l4 40014e08: e8 24 a0 38 st %l4, [ %l2 + 0x38 ] data_secs = vol->tot_secs - vol->data_fsec; 40014e0c: a8 25 00 04 sub %l4, %g4, %l4 vol->data_cls = data_secs / vol->spc; 40014e10: 81 80 20 00 wr %g0, %y 40014e14: 01 00 00 00 nop 40014e18: 01 00 00 00 nop 40014e1c: 01 00 00 00 nop 40014e20: 84 75 00 0d udiv %l4, %o5, %g2 if ( vol->data_cls < FAT_FAT12_MAX_CLN) 40014e24: 80 a0 af f4 cmp %g2, 0xff4 40014e28: 18 80 00 69 bgu 40014fcc 40014e2c: c4 24 a0 40 st %g2, [ %l2 + 0x40 ] vol->type = FAT_FAT12; 40014e30: 84 10 20 01 mov 1, %g2 40014e34: c4 2c a0 16 stb %g2, [ %l2 + 0x16 ] vol->mask = FAT_FAT12_MASK; 40014e38: 84 10 2f ff mov 0xfff, %g2 40014e3c: c4 24 a0 18 st %g2, [ %l2 + 0x18 ] vol->eoc_val = FAT_FAT12_EOC; 40014e40: 84 10 2f f8 mov 0xff8, %g2 40014e44: c4 24 a0 1c st %g2, [ %l2 + 0x1c ] else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 40014e48: 84 10 3f ff mov -1, %g2 vol->rdir_cl = 0; 40014e4c: c0 24 a0 44 clr [ %l2 + 0x44 ] vol->mirror = 0; 40014e50: c0 2c a0 5c clrb [ %l2 + 0x5c ] vol->afat = 0; 40014e54: c0 2c a0 64 clrb [ %l2 + 0x64 ] vol->free_cls = FAT_UNDEFINED_VALUE; 40014e58: c4 24 a0 4c st %g2, [ %l2 + 0x4c ] vol->next_cl = FAT_UNDEFINED_VALUE; 40014e5c: c4 24 a0 54 st %g2, [ %l2 + 0x54 ] if (fs_info->c.state == FAT_CACHE_EMPTY) 40014e60: c4 0c a0 91 ldub [ %l2 + 0x91 ], %g2 40014e64: 80 a0 a0 00 cmp %g2, 0 40014e68: 12 80 00 7d bne 4001505c 40014e6c: 01 00 00 00 nop } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 40014e70: c4 0c a0 64 ldub [ %l2 + 0x64 ], %g2 40014e74: c8 04 a0 24 ld [ %l2 + 0x24 ], %g4 40014e78: c6 14 a0 20 lduh [ %l2 + 0x20 ], %g3 40014e7c: 84 58 80 04 smul %g2, %g4, %g2 40014e80: 84 00 80 03 add %g2, %g3, %g2 40014e84: c4 24 a0 60 st %g2, [ %l2 + 0x60 ] /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 40014e88: 92 10 20 0c mov 0xc, %o1 40014e8c: 7f ff c0 cc call 400051bc 40014e90: 90 10 20 02 mov 2, %o0 40014e94: d0 24 a0 74 st %o0, [ %l2 + 0x74 ] if ( fs_info->vhash == NULL ) 40014e98: 80 a2 20 00 cmp %o0, 0 40014e9c: 02 80 01 03 be 400152a8 <== NEVER TAKEN 40014ea0: 84 10 00 08 mov %o0, %g2 head->previous = NULL; 40014ea4: c0 22 20 04 clr [ %o0 + 4 ] return &the_chain->Tail.Node; 40014ea8: ba 02 20 04 add %o0, 4, %i5 head->next = tail; 40014eac: fa 22 00 00 st %i5, [ %o0 ] return &the_chain->Tail.Node; 40014eb0: 86 02 20 0c add %o0, 0xc, %g3 40014eb4: 88 02 20 10 add %o0, 0x10, %g4 tail->previous = head; 40014eb8: c4 20 a0 08 st %g2, [ %g2 + 8 ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 40014ebc: 92 10 20 0c mov 0xc, %o1 head->next = tail; 40014ec0: c8 20 a0 0c st %g4, [ %g2 + 0xc ] 40014ec4: 90 10 20 02 mov 2, %o0 head->previous = NULL; 40014ec8: c0 20 a0 10 clr [ %g2 + 0x10 ] 40014ecc: 7f ff c0 bc call 400051bc 40014ed0: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 40014ed4: d0 24 a0 78 st %o0, [ %l2 + 0x78 ] if ( fs_info->rhash == NULL ) 40014ed8: 80 a2 20 00 cmp %o0, 0 40014edc: 02 80 00 e7 be 40015278 <== NEVER TAKEN 40014ee0: 84 10 00 08 mov %o0, %g2 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 40014ee4: c8 0c a0 03 ldub [ %l2 + 3 ], %g4 40014ee8: c6 04 a0 38 ld [ %l2 + 0x38 ], %g3 40014eec: c0 22 20 04 clr [ %o0 + 4 ] 40014ef0: 87 28 c0 04 sll %g3, %g4, %g3 return &the_chain->Tail.Node; 40014ef4: ba 02 20 04 add %o0, 4, %i5 40014ef8: 87 28 e0 04 sll %g3, 4, %g3 head->next = tail; 40014efc: fa 22 00 00 st %i5, [ %o0 ] fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 40014f00: 88 10 21 00 mov 0x100, %g4 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 40014f04: c6 24 a0 88 st %g3, [ %l2 + 0x88 ] return &the_chain->Tail.Node; 40014f08: 86 02 20 0c add %o0, 0xc, %g3 fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 40014f0c: c8 24 a0 84 st %g4, [ %l2 + 0x84 ] 40014f10: 88 02 20 10 add %o0, 0x10, %g4 fs_info->index = 0; 40014f14: c0 24 a0 80 clr [ %l2 + 0x80 ] fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 40014f18: 92 10 20 01 mov 1, %o1 tail->previous = head; 40014f1c: c4 20 a0 08 st %g2, [ %g2 + 8 ] 40014f20: 90 10 21 00 mov 0x100, %o0 head->next = tail; 40014f24: c8 20 a0 0c st %g4, [ %g2 + 0xc ] head->previous = NULL; 40014f28: c0 20 a0 10 clr [ %g2 + 0x10 ] 40014f2c: 7f ff c0 a4 call 400051bc 40014f30: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] if ( fs_info->uino == NULL ) 40014f34: 80 a2 20 00 cmp %o0, 0 40014f38: 02 80 00 b9 be 4001521c <== NEVER TAKEN 40014f3c: d0 24 a0 7c st %o0, [ %l2 + 0x7c ] close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 40014f40: d0 14 80 00 lduh [ %l2 ], %o0 40014f44: 7f ff c0 9e call 400051bc 40014f48: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 40014f4c: 80 a2 20 00 cmp %o0, 0 40014f50: 02 80 00 ce be 40015288 <== NEVER TAKEN 40014f54: d0 24 a0 98 st %o0, [ %l2 + 0x98 ] return (sec_num & (vol->spc - 1)) == 0; 40014f58: c4 0c a0 04 ldub [ %l2 + 4 ], %g2 40014f5c: c6 04 a0 3c ld [ %l2 + 0x3c ], %g3 40014f60: 84 00 bf ff add %g2, -1, %g2 /* * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) 40014f64: 80 88 80 03 btst %g2, %g3 40014f68: 12 80 00 d6 bne 400152c0 <== NEVER TAKEN 40014f6c: 01 00 00 00 nop && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 40014f70: c6 0c a0 16 ldub [ %l2 + 0x16 ], %g3 40014f74: 80 a0 e0 04 cmp %g3, 4 40014f78: 22 80 00 07 be,a 40014f94 40014f7c: d2 04 a0 08 ld [ %l2 + 8 ], %o1 return (sec_num & (vol->spc - 1)) == 0; 40014f80: c6 04 a0 28 ld [ %l2 + 0x28 ], %g3 && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 40014f84: 80 88 80 03 btst %g2, %g3 40014f88: 12 80 00 ce bne 400152c0 <== NEVER TAKEN 40014f8c: 01 00 00 00 nop { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 40014f90: d2 04 a0 08 ld [ %l2 + 8 ], %o1 40014f94: d0 04 a0 6c ld [ %l2 + 0x6c ], %o0 40014f98: 7f ff f3 af call 40011e54 40014f9c: 94 10 20 01 mov 1, %o2 if (sc == RTEMS_SUCCESSFUL) 40014fa0: 80 a2 20 00 cmp %o0, 0 40014fa4: 12 80 00 c7 bne 400152c0 40014fa8: 01 00 00 00 nop { vol->bytes_per_block = vol->bpc; 40014fac: c8 04 a0 08 ld [ %l2 + 8 ], %g4 vol->bytes_per_block_log2 = vol->bpc_log2; 40014fb0: c6 0c a0 0c ldub [ %l2 + 0xc ], %g3 vol->sectors_per_block = vol->spc; 40014fb4: c4 0c a0 04 ldub [ %l2 + 4 ], %g2 vol->bytes_per_block = vol->bpc; 40014fb8: c8 24 a0 10 st %g4, [ %l2 + 0x10 ] vol->bytes_per_block_log2 = vol->bpc_log2; 40014fbc: c6 2c a0 14 stb %g3, [ %l2 + 0x14 ] vol->sectors_per_block = vol->spc; 40014fc0: c4 2c a0 0d stb %g2, [ %l2 + 0xd ] 40014fc4: 81 c7 e0 08 ret 40014fc8: 81 e8 00 00 restore if ( vol->data_cls < FAT_FAT16_MAX_CLN) 40014fcc: 07 00 00 3f sethi %hi(0xfc00), %g3 40014fd0: 88 10 e3 f4 or %g3, 0x3f4, %g4 ! fff4 <_Configuration_Interrupt_stack_size+0xeff4> 40014fd4: 80 a0 80 04 cmp %g2, %g4 40014fd8: 38 80 00 25 bgu,a 4001506c 40014fdc: 07 03 ff ff sethi %hi(0xffffc00), %g3 vol->mask = FAT_FAT16_MASK; 40014fe0: 84 10 e3 ff or %g3, 0x3ff, %g2 ! fffffff vol->type = FAT_FAT16; 40014fe4: 88 10 20 02 mov 2, %g4 vol->eoc_val = FAT_FAT16_EOC; 40014fe8: 86 10 e3 f8 or %g3, 0x3f8, %g3 vol->type = FAT_FAT16; 40014fec: c8 2c a0 16 stb %g4, [ %l2 + 0x16 ] vol->mask = FAT_FAT16_MASK; 40014ff0: c4 24 a0 18 st %g2, [ %l2 + 0x18 ] 40014ff4: 10 bf ff 95 b 40014e48 40014ff8: c6 24 a0 1c st %g3, [ %l2 + 0x1c ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 40014ffc: c2 0f bf 83 ldub [ %fp + -125 ], %g1 40015000: bb 28 60 08 sll %g1, 8, %i5 40015004: c2 0f bf 7f ldub [ %fp + -129 ], %g1 40015008: 85 28 60 10 sll %g1, 0x10, %g2 4001500c: c2 0f bf 7b ldub [ %fp + -133 ], %g1 40015010: a9 28 60 18 sll %g1, 0x18, %l4 40015014: c2 0f bf 87 ldub [ %fp + -121 ], %g1 40015018: ba 17 40 02 or %i5, %g2, %i5 4001501c: ba 17 40 01 or %i5, %g1, %i5 40015020: a8 17 40 14 or %i5, %l4, %l4 40015024: 10 bf ff 7a b 40014e0c 40015028: e8 24 a0 38 st %l4, [ %l2 + 0x38 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 4001502c: c2 0f bf 73 ldub [ %fp + -141 ], %g1 40015030: ab 28 60 08 sll %g1, 8, %l5 40015034: c2 0f bf 6f ldub [ %fp + -145 ], %g1 40015038: 87 28 60 10 sll %g1, 0x10, %g3 4001503c: c2 0f bf 6b ldub [ %fp + -149 ], %g1 40015040: 85 28 60 18 sll %g1, 0x18, %g2 40015044: c2 0f bf 77 ldub [ %fp + -137 ], %g1 40015048: aa 15 40 03 or %l5, %g3, %l5 4001504c: aa 15 40 01 or %l5, %g1, %l5 40015050: aa 15 40 02 or %l5, %g2, %l5 40015054: 10 bf ff 62 b 40014ddc 40015058: ea 24 a0 24 st %l5, [ %l2 + 0x24 ] 4001505c: 7f ff fc e0 call 400143dc 40015060: 90 10 00 12 mov %l2, %o0 vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 40015064: 10 bf ff 84 b 40014e74 40015068: c4 0c a0 64 ldub [ %l2 + 0x64 ], %g2 else if ( vol->data_cls < FAT_FAT32_MASK - 1 ) 4001506c: 88 10 e3 fd or %g3, 0x3fd, %g4 40015070: 80 a0 80 04 cmp %g2, %g4 40015074: 18 bf ff 25 bgu 40014d08 <== NEVER TAKEN 40015078: c2 0f bf 57 ldub [ %fp + -169 ], %g1 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 4001507c: 85 28 60 08 sll %g1, 8, %g2 40015080: c2 0f bf 63 ldub [ %fp + -157 ], %g1 40015084: 89 28 60 10 sll %g1, 0x10, %g4 40015088: c2 0f bf 5f ldub [ %fp + -161 ], %g1 vol->mask = FAT_FAT32_MASK; 4001508c: b8 10 e3 ff or %g3, 0x3ff, %i4 vol->eoc_val = FAT_FAT32_EOC; 40015090: ba 10 e3 f8 or %g3, 0x3f8, %i5 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 40015094: f6 0f bf 5b ldub [ %fp + -165 ], %i3 40015098: 87 28 60 18 sll %g1, 0x18, %g3 vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 4001509c: c2 0f bf 67 ldub [ %fp + -153 ], %g1 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 400150a0: 84 10 80 04 or %g2, %g4, %g2 vol->mask = FAT_FAT32_MASK; 400150a4: f8 24 a0 18 st %i4, [ %l2 + 0x18 ] vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 400150a8: 84 10 80 1b or %g2, %i3, %g2 vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 400150ac: 88 08 7f 80 and %g1, -128, %g4 vol->type = FAT_FAT32; 400150b0: b6 10 20 04 mov 4, %i3 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 400150b4: 84 10 80 03 or %g2, %g3, %g2 vol->type = FAT_FAT32; 400150b8: f6 2c a0 16 stb %i3, [ %l2 + 0x16 ] if (vol->mirror) 400150bc: 80 88 60 80 btst 0x80, %g1 vol->eoc_val = FAT_FAT32_EOC; 400150c0: fa 24 a0 1c st %i5, [ %l2 + 0x1c ] vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 400150c4: c4 24 a0 44 st %g2, [ %l2 + 0x44 ] if (vol->mirror) 400150c8: 02 80 00 42 be 400151d0 <== ALWAYS TAKEN 400150cc: c8 2c a0 5c stb %g4, [ %l2 + 0x5c ] vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 400150d0: c2 0f bf 67 ldub [ %fp + -153 ], %g1 <== NOT EXECUTED 400150d4: 82 08 60 0f and %g1, 0xf, %g1 <== NOT EXECUTED 400150d8: c2 2c a0 64 stb %g1, [ %l2 + 0x64 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 400150dc: c2 0f bf 4f ldub [ %fp + -177 ], %g1 400150e0: 93 28 60 08 sll %g1, 8, %o1 400150e4: c2 0f bf 53 ldub [ %fp + -173 ], %g1 400150e8: 92 12 40 01 or %o1, %g1, %o1 if( vol->info_sec == 0 ) 400150ec: 80 a2 60 00 cmp %o1, 0 400150f0: 02 bf ff 06 be 40014d08 <== NEVER TAKEN 400150f4: d2 34 a0 48 sth %o1, [ %l2 + 0x48 ] ret = _fat_block_read(fs_info, vol->info_sec , 0, 400150f8: 96 10 20 04 mov 4, %o3 400150fc: 98 07 bf 90 add %fp, -112, %o4 40015100: 94 10 20 00 clr %o2 40015104: 7f ff fd 65 call 40014698 <_fat_block_read> 40015108: 90 10 00 12 mov %l2, %o0 if ( ret < 0 ) 4001510c: 80 a2 20 00 cmp %o0, 0 40015110: 06 80 00 56 bl 40015268 <== NEVER TAKEN 40015114: c6 0f bf 93 ldub [ %fp + -109 ], %g3 if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 40015118: 87 28 e0 18 sll %g3, 0x18, %g3 4001511c: c4 0f bf 91 ldub [ %fp + -111 ], %g2 40015120: c8 0f bf 92 ldub [ %fp + -110 ], %g4 40015124: fa 0f bf 90 ldub [ %fp + -112 ], %i5 40015128: 85 28 a0 08 sll %g2, 8, %g2 4001512c: 89 29 20 10 sll %g4, 0x10, %g4 40015130: 84 10 80 04 or %g2, %g4, %g2 40015134: 84 10 80 1d or %g2, %i5, %g2 40015138: 84 10 80 03 or %g2, %g3, %g2 4001513c: 07 10 58 54 sethi %hi(0x41615000), %g3 40015140: 86 10 e2 52 or %g3, 0x252, %g3 ! 41615252 40015144: 80 a0 80 03 cmp %g2, %g3 40015148: 12 bf fe ea bne 40014cf0 <== NEVER TAKEN 4001514c: 98 07 bf 90 add %fp, -112, %o4 ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 40015150: d2 14 a0 48 lduh [ %l2 + 0x48 ], %o1 40015154: 96 10 20 0c mov 0xc, %o3 40015158: 94 10 21 e4 mov 0x1e4, %o2 4001515c: 7f ff fd 4f call 40014698 <_fat_block_read> 40015160: 90 10 00 12 mov %l2, %o0 if ( ret < 0 ) 40015164: 80 a2 20 00 cmp %o0, 0 40015168: 06 80 00 3a bl 40015250 <== NEVER TAKEN 4001516c: c6 0f bf 95 ldub [ %fp + -107 ], %g3 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 40015170: f6 0f bf 96 ldub [ %fp + -106 ], %i3 40015174: f2 0f bf 94 ldub [ %fp + -108 ], %i1 40015178: f8 0f bf 97 ldub [ %fp + -105 ], %i4 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 4001517c: c4 0f bf 99 ldub [ %fp + -103 ], %g2 40015180: fa 0f bf 9a ldub [ %fp + -102 ], %i5 40015184: f4 0f bf 98 ldub [ %fp + -104 ], %i2 40015188: c8 0f bf 9b ldub [ %fp + -101 ], %g4 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 4001518c: 87 28 e0 08 sll %g3, 8, %g3 40015190: b7 2e e0 10 sll %i3, 0x10, %i3 40015194: b9 2f 20 18 sll %i4, 0x18, %i4 40015198: 86 10 c0 1b or %g3, %i3, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 4001519c: 85 28 a0 08 sll %g2, 8, %g2 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 400151a0: 86 10 c0 19 or %g3, %i1, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 400151a4: bb 2f 60 10 sll %i5, 0x10, %i5 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 400151a8: 86 10 c0 1c or %g3, %i4, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 400151ac: 84 10 80 1d or %g2, %i5, %g2 400151b0: 89 29 20 18 sll %g4, 0x18, %g4 400151b4: 84 10 80 1a or %g2, %i2, %g2 vol->free_cls_in_fs_info = 400151b8: c6 24 a0 50 st %g3, [ %l2 + 0x50 ] FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 400151bc: 84 10 80 04 or %g2, %g4, %g2 vol->free_cls = vol->free_cls_in_fs_info; 400151c0: c6 24 a0 4c st %g3, [ %l2 + 0x4c ] vol->next_cl_in_fs_info = 400151c4: c4 24 a0 58 st %g2, [ %l2 + 0x58 ] 400151c8: 10 bf ff 26 b 40014e60 400151cc: c4 24 a0 54 st %g2, [ %l2 + 0x54 ] vol->afat = 0; 400151d0: 10 bf ff c3 b 400150dc 400151d4: c0 2c a0 64 clrb [ %l2 + 0x64 ] close(vol->fd); 400151d8: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED 400151dc: 7f ff c0 1d call 40005250 <== NOT EXECUTED 400151e0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 400151e4: 40 00 17 d6 call 4001b13c <__errno> <== NOT EXECUTED 400151e8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400151ec: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 400151f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400151f4: 81 c7 e0 08 ret <== NOT EXECUTED 400151f8: 81 e8 00 00 restore <== NOT EXECUTED close(vol->fd); 400151fc: 7f ff c0 15 call 40005250 <== NOT EXECUTED 40015200: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 40015204: 40 00 17 ce call 4001b13c <__errno> <== NOT EXECUTED 40015208: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001520c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40015210: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015214: 81 c7 e0 08 ret <== NOT EXECUTED 40015218: 81 e8 00 00 restore <== NOT EXECUTED close(vol->fd); 4001521c: 7f ff c0 0d call 40005250 <== NOT EXECUTED 40015220: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40015224: 7f ff c0 6b call 400053d0 <== NOT EXECUTED 40015228: d0 04 a0 74 ld [ %l2 + 0x74 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 4001522c: d0 04 a0 78 ld [ %l2 + 0x78 ], %o0 <== NOT EXECUTED free(fs_info->uino); 40015230: 7f ff c0 68 call 400053d0 <== NOT EXECUTED 40015234: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40015238: 40 00 17 c1 call 4001b13c <__errno> <== NOT EXECUTED 4001523c: 01 00 00 00 nop <== NOT EXECUTED 40015240: 82 10 20 0c mov 0xc, %g1 ! c <_TLS_Alignment+0xb> <== NOT EXECUTED 40015244: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015248: 81 c7 e0 08 ret <== NOT EXECUTED 4001524c: 81 e8 00 00 restore <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) 40015250: c4 0c a0 91 ldub [ %l2 + 0x91 ], %g2 <== NOT EXECUTED 40015254: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40015258: 02 80 00 04 be 40015268 <== NOT EXECUTED 4001525c: 01 00 00 00 nop <== NOT EXECUTED 40015260: 7f ff fc 5f call 400143dc <== NOT EXECUTED 40015264: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED close(vol->fd); 40015268: 7f ff bf fa call 40005250 <== NOT EXECUTED 4001526c: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED return -1; 40015270: 81 c7 e0 08 ret <== NOT EXECUTED 40015274: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED close(vol->fd); 40015278: 7f ff bf f6 call 40005250 <== NOT EXECUTED 4001527c: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40015280: 10 bf ff ec b 40015230 <== NOT EXECUTED 40015284: d0 04 a0 74 ld [ %l2 + 0x74 ], %o0 <== NOT EXECUTED close(vol->fd); 40015288: 7f ff bf f2 call 40005250 <== NOT EXECUTED 4001528c: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40015290: 7f ff c0 50 call 400053d0 <== NOT EXECUTED 40015294: d0 04 a0 74 ld [ %l2 + 0x74 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 40015298: 7f ff c0 4e call 400053d0 <== NOT EXECUTED 4001529c: d0 04 a0 78 ld [ %l2 + 0x78 ], %o0 <== NOT EXECUTED free(fs_info->uino); 400152a0: 10 bf ff e4 b 40015230 <== NOT EXECUTED 400152a4: d0 04 a0 7c ld [ %l2 + 0x7c ], %o0 <== NOT EXECUTED close(vol->fd); 400152a8: 7f ff bf ea call 40005250 <== NOT EXECUTED 400152ac: d0 04 a0 68 ld [ %l2 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 400152b0: 40 00 17 a3 call 4001b13c <__errno> <== NOT EXECUTED 400152b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400152b8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400152bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400152c0: 81 c7 e0 08 ret 400152c4: 81 e8 00 00 restore =============================================================================== 400156c4 : fat_fs_info_t *fs_info, uint32_t ino ) { return (ino >= fs_info->uino_base); 400156c4: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 <== NOT EXECUTED 400156c8: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED } 400156cc: 81 c3 e0 08 retl <== NOT EXECUTED 400156d0: 90 60 3f ff subx %g0, -1, %o0 =============================================================================== 4001337c : { 4001337c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; 40013380: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 40013384: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 <== NOT EXECUTED 40013388: 84 04 3f fe add %l0, -2, %g2 <== NOT EXECUTED { 4001338c: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 40013390: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013394: 18 80 00 03 bgu 400133a0 <== NOT EXECUTED 40013398: a6 00 60 02 add %g1, 2, %l3 uint32_t cl4find = 2; 4001339c: a0 10 20 02 mov 2, %l0 *cls_added = 0; 400133a0: c0 26 c0 00 clr [ %i3 ] while (*cls_added != count && i < data_cls_val) 400133a4: 80 a4 e0 02 cmp %l3, 2 400133a8: 18 80 00 03 bgu 400133b4 <== ALWAYS TAKEN 400133ac: 82 10 20 01 mov 1, %g1 400133b0: 82 10 20 00 clr %g1 <== NOT EXECUTED 400133b4: 80 88 60 ff btst 0xff, %g1 400133b8: 02 80 00 50 be 400134f8 <== NEVER TAKEN 400133bc: 80 a6 a0 00 cmp %i2, 0 400133c0: 02 80 00 4e be 400134f8 <== NEVER TAKEN 400133c4: a2 10 20 02 mov 2, %l1 uint32_t save_cln = FAT_UNDEFINED_VALUE; 400133c8: 10 80 00 19 b 4001342c 400133cc: a8 10 3f ff mov -1, %l4 rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 400133d0: 94 10 3f ff mov -1, %o2 400133d4: 92 10 00 10 mov %l0, %o1 400133d8: 7f ff ff 0f call 40013014 400133dc: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 400133e0: b0 92 20 00 orcc %o0, 0, %i0 400133e4: 12 80 00 38 bne 400134c4 <== NEVER TAKEN 400133e8: 80 a7 60 00 cmp %i5, 0 if (zero_fill) 400133ec: 32 80 00 38 bne,a 400134cc 400133f0: d6 04 a0 08 ld [ %l2 + 8 ], %o3 (*cls_added)++; 400133f4: c2 06 c0 00 ld [ %i3 ], %g1 400133f8: 82 00 60 01 inc %g1 400133fc: c2 26 c0 00 st %g1, [ %i3 ] 40013400: a8 10 00 10 mov %l0, %l4 cl4find++; 40013404: a0 04 20 01 inc %l0 if (cl4find >= data_cls_val) 40013408: 80 a4 c0 10 cmp %l3, %l0 4001340c: 18 80 00 03 bgu 40013418 40013410: a2 04 60 01 inc %l1 cl4find = 2; 40013414: a0 10 20 02 mov 2, %l0 while (*cls_added != count && i < data_cls_val) 40013418: 80 a6 80 01 cmp %i2, %g1 4001341c: 02 80 00 38 be 400134fc 40013420: 80 a4 40 13 cmp %l1, %l3 40013424: 3a 80 00 37 bcc,a 40013500 40013428: e8 27 00 00 st %l4, [ %i4 ] uint32_t next_cln = 0; 4001342c: c0 27 bf fc clr [ %fp + -4 ] rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 40013430: 94 07 bf fc add %fp, -4, %o2 40013434: 92 10 00 10 mov %l0, %o1 40013438: 7f ff fe 84 call 40012e48 4001343c: 90 10 00 12 mov %l2, %o0 if (*cls_added != 0) 40013440: c2 06 c0 00 ld [ %i3 ], %g1 if ( rc != RC_OK ) 40013444: 80 a2 20 00 cmp %o0, 0 40013448: 12 80 00 3a bne 40013530 <== NEVER TAKEN 4001344c: b0 10 00 08 mov %o0, %i0 if (next_cln == FAT_GENFAT_FREE) 40013450: c4 07 bf fc ld [ %fp + -4 ], %g2 40013454: 80 a0 a0 00 cmp %g2, 0 40013458: 32 bf ff ec bne,a 40013408 4001345c: a0 04 20 01 inc %l0 if (*cls_added == 0) 40013460: 80 a0 60 00 cmp %g1, 0 40013464: 22 bf ff db be,a 400133d0 40013468: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 4001346c: 94 10 3f ff mov -1, %o2 40013470: 92 10 00 10 mov %l0, %o1 40013474: 7f ff fe e8 call 40013014 40013478: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 4001347c: b0 92 20 00 orcc %o0, 0, %i0 40013480: 12 80 00 2f bne 4001353c <== NEVER TAKEN 40013484: 94 10 00 10 mov %l0, %o2 rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 40013488: 92 10 00 14 mov %l4, %o1 4001348c: 7f ff fe e2 call 40013014 40013490: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 40013494: b0 92 20 00 orcc %o0, 0, %i0 40013498: 02 bf ff d5 be 400133ec <== ALWAYS TAKEN 4001349c: 80 a7 60 00 cmp %i5, 0 fat_free_fat_clusters_chain(fs_info, (*chain)); 400134a0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 400134a4: 7f ff ff 7e call 4001329c <== NOT EXECUTED 400134a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED (void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 400134ac: 94 10 20 00 clr %o2 <== NOT EXECUTED 400134b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400134b4: 7f ff fe d8 call 40013014 <== NOT EXECUTED 400134b8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 400134bc: 40 00 04 6e call 40014674 <== NOT EXECUTED 400134c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return rc; 400134c4: 81 c7 e0 08 ret <== NOT EXECUTED 400134c8: 81 e8 00 00 restore <== NOT EXECUTED ssize_t bytes_written = 400134cc: 98 10 20 00 clr %o4 400134d0: 94 10 20 00 clr %o2 400134d4: 92 10 00 10 mov %l0, %o1 400134d8: 40 00 04 bb call 400147c4 400134dc: 90 10 00 12 mov %l2, %o0 if (fs_info->vol.bpc != bytes_written) 400134e0: c2 04 a0 08 ld [ %l2 + 8 ], %g1 400134e4: 80 a0 40 08 cmp %g1, %o0 400134e8: 22 bf ff c4 be,a 400133f8 <== ALWAYS TAKEN 400134ec: c2 06 c0 00 ld [ %i3 ], %g1 rc = -1; 400134f0: 10 bf ff ec b 400134a0 <== NOT EXECUTED 400134f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED uint32_t save_cln = FAT_UNDEFINED_VALUE; 400134f8: a8 10 3f ff mov -1, %l4 <== NOT EXECUTED *last_cl = save_cln; 400134fc: e8 27 00 00 st %l4, [ %i4 ] fs_info->vol.next_cl = save_cln; 40013500: e8 24 a0 54 st %l4, [ %l2 + 0x54 ] if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40013504: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 40013508: 80 a0 7f ff cmp %g1, -1 4001350c: 02 80 00 05 be 40013520 <== ALWAYS TAKEN 40013510: 90 10 00 12 mov %l2, %o0 fs_info->vol.free_cls -= (*cls_added); 40013514: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 40013518: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001351c: c2 24 a0 4c st %g1, [ %l2 + 0x4c ] <== NOT EXECUTED fat_buf_release(fs_info); 40013520: 40 00 04 55 call 40014674 40013524: b0 10 20 00 clr %i0 } 40013528: 81 c7 e0 08 ret 4001352c: 81 e8 00 00 restore if (*cls_added != 0) 40013530: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013534: 02 80 00 05 be 40013548 <== NOT EXECUTED 40013538: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 4001353c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40013540: 7f ff ff 57 call 4001329c <== NOT EXECUTED 40013544: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return rc; 40013548: 81 c7 e0 08 ret <== NOT EXECUTED 4001354c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40014718 : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 40014718: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 4001471c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40014720: 02 80 00 27 be 400147bc <== NOT EXECUTED 40014724: a0 10 20 00 clr %l0 fs_info->c.modified = true; 40014728: 10 80 00 13 b 40014774 4001472c: a2 10 20 01 mov 1, %l1 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 40014730: 94 10 20 01 mov 1, %o2 40014734: 96 07 bf fc add %fp, -4, %o3 40014738: 7f ff ff 9f call 400145b4 4001473c: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 40014740: 92 07 00 10 add %i4, %l0, %o1 if (rc != RC_OK) 40014744: 80 a2 20 00 cmp %o0, 0 40014748: 12 80 00 1c bne 400147b8 <== NEVER TAKEN 4001474c: 94 10 00 1d mov %i5, %o2 memcpy((sec_buf + ofs), (buff + cmpltd), c); 40014750: d0 07 bf fc ld [ %fp + -4 ], %o0 40014754: 40 00 1d 6b call 4001bd00 40014758: 90 02 00 1a add %o0, %i2, %o0 4001475c: e2 2e 20 90 stb %l1, [ %i0 + 0x90 ] fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 40014760: a0 04 00 1d add %l0, %i5, %l0 sec_num++; 40014764: b2 06 60 01 inc %i1 while(count > 0) 40014768: b6 a6 c0 1d subcc %i3, %i5, %i3 4001476c: 02 80 00 14 be 400147bc <== ALWAYS TAKEN 40014770: b4 10 20 00 clr %i2 c = MIN(count, (fs_info->vol.bps - ofs)); 40014774: fa 16 00 00 lduh [ %i0 ], %i5 40014778: ba 27 40 1a sub %i5, %i2, %i5 4001477c: 80 a7 40 1b cmp %i5, %i3 40014780: 38 80 00 02 bgu,a 40014788 40014784: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bytes_per_block) 40014788: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4001478c: 80 a0 40 1d cmp %g1, %i5 40014790: 12 bf ff e8 bne 40014730 <== ALWAYS TAKEN 40014794: 92 10 00 19 mov %i1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 40014798: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4001479c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 400147a0: 7f ff ff 85 call 400145b4 <== NOT EXECUTED 400147a4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memcpy((sec_buf + ofs), (buff + cmpltd), c); 400147a8: 92 07 00 10 add %i4, %l0, %o1 <== NOT EXECUTED if (rc != RC_OK) 400147ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400147b0: 02 bf ff e8 be 40014750 <== NOT EXECUTED 400147b4: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED return -1; 400147b8: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 400147bc: 81 c7 e0 08 ret 400147c0: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 40013014 : fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 40013014: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; 40013018: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 4001301c: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 40013020: 08 80 00 74 bleu 400131f0 <== NOT EXECUTED 40013024: ba 10 00 18 mov %i0, %i5 40013028: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4001302c: 82 00 60 01 inc %g1 40013030: 80 a0 40 19 cmp %g1, %i1 40013034: 0a 80 00 6f bcs 400131f0 <== NEVER TAKEN 40013038: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 4001303c: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40013040: 80 88 60 01 btst 1, %g1 40013044: 12 80 00 22 bne 400130cc 40013048: b7 36 60 01 srl %i1, 1, %i3 4001304c: 80 88 60 02 btst 2, %g1 40013050: 02 80 00 03 be 4001305c 40013054: a1 2e 60 02 sll %i1, 2, %l0 40013058: a1 2e 60 01 sll %i1, 1, %l0 4001305c: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 40013060: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 40013064: b9 34 00 1c srl %l0, %i4, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40013068: f6 17 40 00 lduh [ %i5 ], %i3 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 4001306c: b8 07 00 01 add %i4, %g1, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40013070: 94 10 20 01 mov 1, %o2 40013074: 96 07 bf fc add %fp, -4, %o3 40013078: 92 10 00 1c mov %i4, %o1 4001307c: 40 00 05 4e call 400145b4 40013080: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40013084: b0 92 20 00 orcc %o0, 0, %i0 40013088: 12 80 00 0f bne 400130c4 <== NEVER TAKEN 4001308c: b6 06 ff ff add %i3, -1, %i3 return rc; switch ( fs_info->vol.type ) 40013090: e2 0f 60 16 ldub [ %i5 + 0x16 ], %l1 40013094: 80 a4 60 02 cmp %l1, 2 40013098: 02 80 00 35 be 4001316c 4001309c: b6 0e c0 10 and %i3, %l0, %i3 400130a0: 80 a4 60 04 cmp %l1, 4 400130a4: 02 80 00 26 be 4001313c 400130a8: 80 a4 60 01 cmp %l1, 1 400130ac: 02 80 00 0a be 400130d4 <== ALWAYS TAKEN 400130b0: 80 8e 60 01 btst 1, %i1 fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 400130b4: 40 00 20 22 call 4001b13c <__errno> <== NOT EXECUTED 400130b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400130bc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400130c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 400130c4: 81 c7 e0 08 ret <== NOT EXECUTED 400130c8: 81 e8 00 00 restore <== NOT EXECUTED 400130cc: 10 bf ff e4 b 4001305c 400130d0: a0 06 c0 19 add %i3, %i1, %l0 if ( FAT_CLUSTER_IS_ODD(cln) ) 400130d4: 02 80 00 30 be 40013194 400130d8: c2 07 bf fc ld [ %fp + -4 ], %g1 *(sec_buf + ofs) &= 0x0F; 400130dc: c4 08 40 1b ldub [ %g1 + %i3 ], %g2 400130e0: 84 08 a0 0f and %g2, 0xf, %g2 400130e4: c4 28 40 1b stb %g2, [ %g1 + %i3 ] fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 400130e8: 83 2e a0 04 sll %i2, 4, %g1 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 400130ec: c4 07 bf fc ld [ %fp + -4 ], %g2 400130f0: c6 08 80 1b ldub [ %g2 + %i3 ], %g3 400130f4: 82 10 40 03 or %g1, %g3, %g1 400130f8: c2 28 80 1b stb %g1, [ %g2 + %i3 ] } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 400130fc: e2 2f 60 90 stb %l1, [ %i5 + 0x90 ] if ( ofs == (fs_info->vol.bps - 1) ) 40013100: c2 17 40 00 lduh [ %i5 ], %g1 40013104: 82 00 7f ff add %g1, -1, %g1 40013108: 80 a0 40 1b cmp %g1, %i3 4001310c: 02 80 00 52 be 40013254 40013110: c2 07 bf fc ld [ %fp + -4 ], %g1 *(sec_buf + ofs + 1) &= 0x00; 40013114: b6 06 e0 01 inc %i3 40013118: c0 28 40 1b clrb [ %g1 + %i3 ] *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 4001311c: 83 2e a0 14 sll %i2, 0x14, %g1 40013120: c4 07 bf fc ld [ %fp + -4 ], %g2 40013124: c6 08 80 1b ldub [ %g2 + %i3 ], %g3 40013128: 83 30 60 18 srl %g1, 0x18, %g1 4001312c: 82 10 40 03 or %g1, %g3, %g1 40013130: c2 28 80 1b stb %g1, [ %g2 + %i3 ] 40013134: 81 c7 e0 08 ret 40013138: 81 e8 00 00 restore fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 4001313c: 11 3c 00 00 sethi %hi(0xf0000000), %o0 40013140: 40 00 55 f3 call 4002890c <__bswapsi2> 40013144: 90 2e 80 08 andn %i2, %o0, %o0 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 40013148: c4 07 bf fc ld [ %fp + -4 ], %g2 4001314c: c2 00 80 1b ld [ %g2 + %i3 ], %g1 40013150: 82 08 60 f0 and %g1, 0xf0, %g1 *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 40013154: 90 10 40 08 or %g1, %o0, %o0 40013158: d0 20 80 1b st %o0, [ %g2 + %i3 ] 4001315c: 82 10 20 01 mov 1, %g1 40013160: c2 2f 60 90 stb %g1, [ %i5 + 0x90 ] 40013164: 81 c7 e0 08 ret 40013168: 81 e8 00 00 restore (uint16_t )(CT_LE_W(in_val)); 4001316c: 83 2e a0 08 sll %i2, 8, %g1 40013170: b5 2e a0 10 sll %i2, 0x10, %i2 40013174: b5 36 a0 18 srl %i2, 0x18, %i2 40013178: b4 10 40 1a or %g1, %i2, %i2 *((uint16_t *)(sec_buf + ofs)) = 4001317c: c2 07 bf fc ld [ %fp + -4 ], %g1 40013180: f4 30 40 1b sth %i2, [ %g1 + %i3 ] 40013184: 82 10 20 01 mov 1, %g1 40013188: c2 2f 60 90 stb %g1, [ %i5 + 0x90 ] 4001318c: 81 c7 e0 08 ret 40013190: 81 e8 00 00 restore *(sec_buf + ofs) &= 0x00; 40013194: c0 28 40 1b clrb [ %g1 + %i3 ] fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 40013198: b4 0e af ff and %i2, 0xfff, %i2 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 4001319c: c4 07 bf fc ld [ %fp + -4 ], %g2 400131a0: c2 08 80 1b ldub [ %g2 + %i3 ], %g1 400131a4: 82 16 80 01 or %i2, %g1, %g1 400131a8: c2 28 80 1b stb %g1, [ %g2 + %i3 ] 400131ac: e2 2f 60 90 stb %l1, [ %i5 + 0x90 ] if ( ofs == (fs_info->vol.bps - 1) ) 400131b0: c2 17 40 00 lduh [ %i5 ], %g1 400131b4: 82 00 7f ff add %g1, -1, %g1 400131b8: 80 a0 40 1b cmp %g1, %i3 400131bc: 02 80 00 13 be 40013208 <== NEVER TAKEN 400131c0: c4 07 bf fc ld [ %fp + -4 ], %g2 *(sec_buf + ofs + 1) &= 0xF0; 400131c4: b6 06 e0 01 inc %i3 400131c8: c2 08 80 1b ldub [ %g2 + %i3 ], %g1 400131cc: 82 08 7f f0 and %g1, -16, %g1 400131d0: c2 28 80 1b stb %g1, [ %g2 + %i3 ] *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 400131d4: b5 36 a0 08 srl %i2, 8, %i2 400131d8: c2 07 bf fc ld [ %fp + -4 ], %g1 400131dc: c4 08 40 1b ldub [ %g1 + %i3 ], %g2 400131e0: b4 16 80 02 or %i2, %g2, %i2 400131e4: f4 28 40 1b stb %i2, [ %g1 + %i3 ] 400131e8: 81 c7 e0 08 ret 400131ec: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one(EIO); 400131f0: 40 00 1f d3 call 4001b13c <__errno> <== NOT EXECUTED 400131f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400131f8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400131fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013200: 81 c7 e0 08 ret <== NOT EXECUTED 40013204: 81 e8 00 00 restore <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40013208: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 4001320c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40013210: 92 07 20 01 add %i4, 1, %o1 <== NOT EXECUTED 40013214: 40 00 04 e8 call 400145b4 <== NOT EXECUTED 40013218: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rc != RC_OK) 4001321c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40013220: 12 bf ff a9 bne 400130c4 <== NOT EXECUTED 40013224: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED *sec_buf &= 0xF0; 40013228: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 4001322c: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED 40013230: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 40013234: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED 40013238: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 4001323c: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 40013240: 82 16 80 01 or %i2, %g1, %g1 <== NOT EXECUTED 40013244: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED 40013248: e2 2f 60 90 stb %l1, [ %i5 + 0x90 ] <== NOT EXECUTED 4001324c: 81 c7 e0 08 ret <== NOT EXECUTED 40013250: 81 e8 00 00 restore <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40013254: 96 07 bf fc add %fp, -4, %o3 40013258: 94 10 20 01 mov 1, %o2 4001325c: 92 07 20 01 add %i4, 1, %o1 40013260: 40 00 04 d5 call 400145b4 40013264: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40013268: b0 92 20 00 orcc %o0, 0, %i0 4001326c: 12 bf ff 96 bne 400130c4 <== NEVER TAKEN 40013270: c2 07 bf fc ld [ %fp + -4 ], %g1 *sec_buf &= 0x00; 40013274: c0 28 40 00 clrb [ %g1 ] *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 40013278: 83 2e a0 14 sll %i2, 0x14, %g1 4001327c: c4 07 bf fc ld [ %fp + -4 ], %g2 40013280: c6 08 80 00 ldub [ %g2 ], %g3 40013284: 83 30 60 18 srl %g1, 0x18, %g1 40013288: 82 10 40 03 or %g1, %g3, %g1 4001328c: c2 28 80 00 stb %g1, [ %g2 ] 40013290: e2 2f 60 90 stb %l1, [ %i5 + 0x90 ] 40013294: 81 c7 e0 08 ret 40013298: 81 e8 00 00 restore =============================================================================== 400153d4 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 400153d4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 400153d8: 7f ff ff bc call 400152c8 <== NOT EXECUTED 400153dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 400153e0: fa 06 20 74 ld [ %i0 + 0x74 ], %i5 if ( rc != RC_OK ) 400153e4: 80 a0 00 08 cmp %g0, %o0 rc = fat_sync(fs_info); 400153e8: b4 10 00 08 mov %o0, %i2 return _Chain_Immutable_head( the_chain )->next; 400153ec: d0 07 40 00 ld [ %i5 ], %o0 { 400153f0: b8 10 00 18 mov %i0, %i4 return &the_chain->Tail.Node; 400153f4: b6 07 60 04 add %i5, 4, %i3 if ( rc != RC_OK ) 400153f8: b0 60 20 00 subx %g0, 0, %i0 if ( !_Chain_Is_empty(the_chain)) 400153fc: 80 a6 c0 08 cmp %i3, %o0 40015400: 22 80 00 0c be,a 40015430 40015404: d0 07 60 0c ld [ %i5 + 0xc ], %o0 new_first = old_first->next; 40015408: c2 02 00 00 ld [ %o0 ], %g1 head->next = new_first; 4001540c: c2 27 40 00 st %g1, [ %i5 ] while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 40015410: 7f ff bf f0 call 400053d0 40015414: fa 20 60 04 st %i5, [ %g1 + 4 ] return _Chain_Immutable_head( the_chain )->next; 40015418: d0 07 40 00 ld [ %i5 ], %o0 if ( !_Chain_Is_empty(the_chain)) 4001541c: 80 a6 c0 08 cmp %i3, %o0 40015420: 32 bf ff fb bne,a 4001540c 40015424: c2 02 00 00 ld [ %o0 ], %g1 40015428: fa 07 20 74 ld [ %i4 + 0x74 ], %i5 return _Chain_Immutable_head( the_chain )->next; 4001542c: d0 07 60 0c ld [ %i5 + 0xc ], %o0 return &the_chain->Tail.Node; 40015430: b6 07 60 10 add %i5, 0x10, %i3 if ( !_Chain_Is_empty(the_chain)) 40015434: 80 a2 00 1b cmp %o0, %i3 40015438: 02 80 00 0a be 40015460 <== ALWAYS TAKEN 4001543c: b2 07 60 0c add %i5, 0xc, %i1 new_first = old_first->next; 40015440: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 40015444: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED 40015448: 7f ff bf e2 call 400053d0 <== NOT EXECUTED 4001544c: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40015450: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40015454: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED 40015458: 32 bf ff fb bne,a 40015444 <== NOT EXECUTED 4001545c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 40015460: fa 07 20 78 ld [ %i4 + 0x78 ], %i5 return _Chain_Immutable_head( the_chain )->next; 40015464: d0 07 40 00 ld [ %i5 ], %o0 return &the_chain->Tail.Node; 40015468: b6 07 60 04 add %i5, 4, %i3 if ( !_Chain_Is_empty(the_chain)) 4001546c: 80 a6 c0 08 cmp %i3, %o0 40015470: 22 80 00 0c be,a 400154a0 <== ALWAYS TAKEN 40015474: d0 07 60 0c ld [ %i5 + 0xc ], %o0 new_first = old_first->next; 40015478: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 4001547c: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 40015480: 7f ff bf d4 call 400053d0 <== NOT EXECUTED 40015484: fa 20 60 04 st %i5, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40015488: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 4001548c: 80 a2 00 1b cmp %o0, %i3 <== NOT EXECUTED 40015490: 32 bf ff fb bne,a 4001547c <== NOT EXECUTED 40015494: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40015498: fa 07 20 78 ld [ %i4 + 0x78 ], %i5 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 4001549c: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED return &the_chain->Tail.Node; 400154a0: b6 07 60 10 add %i5, 0x10, %i3 if ( !_Chain_Is_empty(the_chain)) 400154a4: 80 a6 c0 08 cmp %i3, %o0 400154a8: 02 80 00 0a be 400154d0 <== ALWAYS TAKEN 400154ac: b2 07 60 0c add %i5, 0xc, %i1 new_first = old_first->next; 400154b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 400154b4: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED 400154b8: 7f ff bf c6 call 400053d0 <== NOT EXECUTED 400154bc: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 400154c0: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 400154c4: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED 400154c8: 32 bf ff fb bne,a 400154b4 <== NOT EXECUTED 400154cc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED } free(fs_info->vhash); 400154d0: 7f ff bf c0 call 400053d0 400154d4: d0 07 20 74 ld [ %i4 + 0x74 ], %o0 free(fs_info->rhash); 400154d8: 7f ff bf be call 400053d0 400154dc: d0 07 20 78 ld [ %i4 + 0x78 ], %o0 free(fs_info->uino); 400154e0: 7f ff bf bc call 400053d0 400154e4: d0 07 20 7c ld [ %i4 + 0x7c ], %o0 free(fs_info->sec_buf); 400154e8: 7f ff bf ba call 400053d0 400154ec: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 close(fs_info->vol.fd); 400154f0: 7f ff bf 58 call 40005250 400154f4: d0 07 20 68 ld [ %i4 + 0x68 ], %o0 if (rc) 400154f8: 80 a6 a0 00 cmp %i2, 0 400154fc: 12 80 00 04 bne 4001550c <== NEVER TAKEN 40015500: 01 00 00 00 nop errno = EIO; return rc; } 40015504: 81 c7 e0 08 ret 40015508: 81 e8 00 00 restore errno = EIO; 4001550c: 40 00 17 0c call 4001b13c <__errno> <== NOT EXECUTED 40015510: 01 00 00 00 nop <== NOT EXECUTED 40015514: 82 10 20 05 mov 5, %g1 ! 5 <_TLS_Alignment+0x4> <== NOT EXECUTED 40015518: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 4001551c: 81 c7 e0 08 ret <== NOT EXECUTED 40015520: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400152c8 : return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 400152c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (fs_info->vol.type == FAT_FAT32) 400152cc: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 <== NOT EXECUTED { 400152d0: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED if (fs_info->vol.type == FAT_FAT32) 400152d4: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 400152d8: 02 80 00 0d be 4001530c <== NOT EXECUTED 400152dc: b0 10 20 00 clr %i0 if (fs_info->c.state == FAT_CACHE_EMPTY) 400152e0: c2 0f 60 91 ldub [ %i5 + 0x91 ], %g1 400152e4: 80 a0 60 00 cmp %g1, 0 400152e8: 12 80 00 18 bne 40015348 400152ec: 01 00 00 00 nop if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 400152f0: 7f ff f2 b6 call 40011dc8 400152f4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 400152f8: 80 a2 20 00 cmp %o0, 0 400152fc: 12 80 00 34 bne 400153cc <== NEVER TAKEN 40015300: 01 00 00 00 nop rc = -1; return rc; } 40015304: 81 c7 e0 08 ret 40015308: 81 e8 00 00 restore uint32_t free_count = fs_info->vol.free_cls; 4001530c: f6 07 60 4c ld [ %i5 + 0x4c ], %i3 if (free_count != fs_info->vol.free_cls_in_fs_info) 40015310: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 40015314: 80 a6 c0 01 cmp %i3, %g1 40015318: 12 80 00 1e bne 40015390 <== NEVER TAKEN 4001531c: f8 07 60 54 ld [ %i5 + 0x54 ], %i4 if (next_free != fs_info->vol.next_cl_in_fs_info) 40015320: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 40015324: 80 a7 00 01 cmp %i4, %g1 40015328: 12 80 00 0b bne 40015354 4001532c: 01 00 00 00 nop if ( (ret1 < 0) || (ret2 < 0) ) 40015330: b0 0e 20 ff and %i0, 0xff, %i0 40015334: b0 20 00 18 neg %i0 if (fs_info->c.state == FAT_CACHE_EMPTY) 40015338: c2 0f 60 91 ldub [ %i5 + 0x91 ], %g1 4001533c: 80 a0 60 00 cmp %g1, 0 40015340: 02 bf ff ec be 400152f0 40015344: 01 00 00 00 nop 40015348: 7f ff fc 25 call 400143dc 4001534c: 90 10 00 1d mov %i5, %o0 40015350: 30 bf ff e8 b,a 400152f0 uint32_t le_next_free = CT_LE_L(next_free); 40015354: 40 00 4d 6e call 4002890c <__bswapsi2> 40015358: 90 10 00 1c mov %i4, %o0 fs_info->vol.next_cl_in_fs_info = next_free; 4001535c: f8 27 60 58 st %i4, [ %i5 + 0x58 ] ret2 = fat_sector_write(fs_info, 40015360: 98 07 bf fc add %fp, -4, %o4 40015364: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1 uint32_t le_next_free = CT_LE_L(next_free); 40015368: d0 27 bf fc st %o0, [ %fp + -4 ] ret2 = fat_sector_write(fs_info, 4001536c: 96 10 20 04 mov 4, %o3 40015370: 94 10 21 ec mov 0x1ec, %o2 40015374: 7f ff fc e9 call 40014718 40015378: 90 10 00 1d mov %i5, %o0 4001537c: 91 32 20 1f srl %o0, 0x1f, %o0 40015380: b0 12 00 18 or %o0, %i0, %i0 if ( (ret1 < 0) || (ret2 < 0) ) 40015384: b0 0e 20 ff and %i0, 0xff, %i0 40015388: 10 bf ff ec b 40015338 4001538c: b0 20 00 18 neg %i0 uint32_t le_free_count = CT_LE_L(free_count); 40015390: 40 00 4d 5f call 4002890c <__bswapsi2> <== NOT EXECUTED 40015394: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; 40015398: f6 27 60 50 st %i3, [ %i5 + 0x50 ] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 4001539c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 400153a0: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1 <== NOT EXECUTED uint32_t le_free_count = CT_LE_L(free_count); 400153a4: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 400153a8: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 400153ac: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 400153b0: 7f ff fc da call 40014718 <== NOT EXECUTED 400153b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) 400153b8: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 <== NOT EXECUTED 400153bc: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED 400153c0: 02 bf ff dc be 40015330 <== NOT EXECUTED 400153c4: b1 32 20 1f srl %o0, 0x1f, %i0 <== NOT EXECUTED 400153c8: 30 bf ff e3 b,a 40015354 <== NOT EXECUTED } 400153cc: 81 c7 e0 08 ret <== NOT EXECUTED 400153d0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40017a4c : fat_file_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 40017a4c: 9d e3 bf 00 save %sp, -256, %sp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 40017a50: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 40017a54: e0 00 60 08 ld [ %g1 + 8 ], %l0 <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 40017a58: c0 27 bf 6c clr [ %fp + -148 ] <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 40017a5c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED time_t now; uint16_t time_val = 0; 40017a60: c0 37 bf 68 clrh [ %fp + -152 ] <== NOT EXECUTED fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 40017a64: 80 a6 e1 04 cmp %i3, 0x104 <== NOT EXECUTED uint16_t date = 0; 40017a68: c0 37 bf 6a clrh [ %fp + -150 ] <== NOT EXECUTED memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 40017a6c: c0 27 bf 80 clr [ %fp + -128 ] <== NOT EXECUTED 40017a70: c0 27 bf 84 clr [ %fp + -124 ] <== NOT EXECUTED dir_pos->sname.cln = 0; 40017a74: c0 27 bf 70 clr [ %fp + -144 ] <== NOT EXECUTED 40017a78: c0 27 bf 88 clr [ %fp + -120 ] <== NOT EXECUTED 40017a7c: c0 27 bf 8c clr [ %fp + -116 ] <== NOT EXECUTED dir_pos->sname.ofs = 0; 40017a80: c0 27 bf 74 clr [ %fp + -140 ] <== NOT EXECUTED 40017a84: c0 27 bf 90 clr [ %fp + -112 ] <== NOT EXECUTED 40017a88: c0 27 bf 94 clr [ %fp + -108 ] <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 40017a8c: c2 27 bf 78 st %g1, [ %fp + -136 ] <== NOT EXECUTED 40017a90: c0 27 bf 98 clr [ %fp + -104 ] <== NOT EXECUTED 40017a94: c0 27 bf 9c clr [ %fp + -100 ] <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 40017a98: c2 27 bf 7c st %g1, [ %fp + -132 ] <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 40017a9c: c0 27 bf c0 clr [ %fp + -64 ] <== NOT EXECUTED 40017aa0: c0 27 bf c4 clr [ %fp + -60 ] <== NOT EXECUTED 40017aa4: c0 27 bf c8 clr [ %fp + -56 ] <== NOT EXECUTED 40017aa8: c0 27 bf cc clr [ %fp + -52 ] <== NOT EXECUTED 40017aac: c0 27 bf d0 clr [ %fp + -48 ] <== NOT EXECUTED 40017ab0: c0 27 bf d4 clr [ %fp + -44 ] <== NOT EXECUTED 40017ab4: c0 27 bf d8 clr [ %fp + -40 ] <== NOT EXECUTED 40017ab8: c0 27 bf dc clr [ %fp + -36 ] <== NOT EXECUTED 40017abc: c0 27 bf e0 clr [ %fp + -32 ] <== NOT EXECUTED 40017ac0: c0 27 bf e4 clr [ %fp + -28 ] <== NOT EXECUTED 40017ac4: c0 27 bf e8 clr [ %fp + -24 ] 40017ac8: c0 27 bf ec clr [ %fp + -20 ] 40017acc: c0 27 bf f0 clr [ %fp + -16 ] 40017ad0: c0 27 bf f4 clr [ %fp + -12 ] 40017ad4: c0 27 bf f8 clr [ %fp + -8 ] 40017ad8: c0 27 bf fc clr [ %fp + -4 ] if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 40017adc: 14 80 00 e3 bg 40017e68 <== NEVER TAKEN 40017ae0: f8 06 20 08 ld [ %i0 + 8 ], %i4 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (fs_info->converter, 40017ae4: d0 04 20 c0 ld [ %l0 + 0xc0 ], %o0 40017ae8: 98 10 20 0b mov 0xb, %o4 40017aec: 96 07 bf 80 add %fp, -128, %o3 40017af0: 94 10 00 1b mov %i3, %o2 40017af4: 40 00 01 bf call 400181f0 40017af8: 92 10 00 1a mov %i2, %o1 name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 40017afc: a6 92 20 00 orcc %o0, 0, %l3 40017b00: 02 80 00 df be 40017e7c <== NEVER TAKEN 40017b04: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 40017b08: c0 2f bf 8c clrb [ %fp + -116 ] /* set up last write date and time */ now = time(NULL); 40017b0c: 40 00 1f f3 call 4001fad8