=============================================================================== 4000fa3c <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 4000fa3c: 9d e3 bf 98 save %sp, -104, %sp 4000fa40: 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) 4000fa44: 80 a6 e0 00 cmp %i3, 0 4000fa48: 12 80 00 11 bne 4000fa8c <_fat_block_read+0x50> 4000fa4c: b0 10 20 00 clr %i0 4000fa50: 30 80 00 19 b,a 4000fab4 <_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)); 4000fa54: fa 14 00 00 lduh [ %l0 ], %i5 4000fa58: ba 27 40 1a sub %i5, %i2, %i5 4000fa5c: 80 a7 40 1b cmp %i5, %i3 4000fa60: 38 80 00 02 bgu,a 4000fa68 <_fat_block_read+0x2c> 4000fa64: ba 10 00 1b mov %i3, %i5 memcpy((buff + cmpltd), (sec_buf + ofs), c); 4000fa68: d2 07 bf fc ld [ %fp + -4 ], %o1 4000fa6c: 92 02 40 1a add %o1, %i2, %o1 4000fa70: 40 00 30 9c call 4001bce0 4000fa74: 94 10 00 1d mov %i5, %o2 count -= c; cmpltd += c; 4000fa78: b0 06 00 1d add %i0, %i5, %i0 sec_num++; 4000fa7c: b2 06 60 01 inc %i1 while (count > 0) 4000fa80: b6 a6 c0 1d subcc %i3, %i5, %i3 4000fa84: 02 80 00 0c be 4000fab4 <_fat_block_read+0x78> 4000fa88: b4 10 20 00 clr %i2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 4000fa8c: 92 10 00 19 mov %i1, %o1 4000fa90: 96 07 bf fc add %fp, -4, %o3 4000fa94: 94 10 20 01 mov 1, %o2 4000fa98: 7f ff ff b0 call 4000f958 4000fa9c: 90 10 00 10 mov %l0, %o0 if (rc != RC_OK) 4000faa0: 80 a2 20 00 cmp %o0, 0 4000faa4: 02 bf ff ec be 4000fa54 <_fat_block_read+0x18> 4000faa8: 90 07 00 18 add %i4, %i0, %o0 ofs = 0; } return cmpltd; } 4000faac: 81 c7 e0 08 ret <== NOT EXECUTED 4000fab0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000fab4: 81 c7 e0 08 ret <== NOT EXECUTED 4000fab8: 81 e8 00 00 restore =============================================================================== 4000f958 : { 4000f958: 9d e3 bf 98 save %sp, -104, %sp return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000f95c: fa 0e 20 02 ldub [ %i0 + 2 ], %i5 4000f960: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 4000f964: c4 0e 20 9d ldub [ %i0 + 0x9d ], %g2 4000f968: 82 20 40 1d sub %g1, %i5, %g1 { 4000f96c: b8 10 00 18 mov %i0, %i4 4000f970: 93 36 40 01 srl %i1, %g1, %o1 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 4000f974: 80 a0 a0 00 cmp %g2, 0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000f978: 83 2a 40 01 sll %o1, %g1, %g1 ((sector - 4000f97c: 82 26 40 01 sub %i1, %g1, %g1 4000f980: 02 80 00 0a be 4000f9a8 4000f984: bb 28 40 1d sll %g1, %i5, %i5 4000f988: d2 27 bf fc st %o1, [ %fp + -4 ] 4000f98c: c2 06 20 98 ld [ %i0 + 0x98 ], %g1 4000f990: 80 a0 40 19 cmp %g1, %i1 4000f994: 22 80 00 12 be,a 4000f9dc 4000f998: c2 07 20 a0 ld [ %i4 + 0xa0 ], %g1 4000f99c: 7f ff ff 79 call 4000f780 4000f9a0: 90 10 00 18 mov %i0, %o0 4000f9a4: d2 07 bf fc ld [ %fp + -4 ], %o1 4000f9a8: d0 07 20 6c ld [ %i4 + 0x6c ], %o0 if (op_type == FAT_OP_TYPE_READ) 4000f9ac: 80 a6 a0 01 cmp %i2, 1 4000f9b0: 02 80 00 10 be 4000f9f0 4000f9b4: 94 07 20 a0 add %i4, 0xa0, %o2 sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 4000f9b8: 40 00 22 3f call 400182b4 4000f9bc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 4000f9c0: 80 a2 20 00 cmp %o0, 0 4000f9c4: 12 80 00 0f bne 4000fa00 4000f9c8: 82 10 20 01 mov 1, %g1 fs_info->c.blk_num = sec_num; 4000f9cc: f2 27 20 98 st %i1, [ %i4 + 0x98 ] fs_info->c.modified = 0; 4000f9d0: c0 2f 20 9c clrb [ %i4 + 0x9c ] fs_info->c.state = FAT_CACHE_ACTUAL; 4000f9d4: c2 2f 20 9d stb %g1, [ %i4 + 0x9d ] *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 4000f9d8: c2 07 20 a0 ld [ %i4 + 0xa0 ], %g1 4000f9dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000f9e0: 82 00 40 1d add %g1, %i5, %g1 4000f9e4: c2 26 c0 00 st %g1, [ %i3 ] } 4000f9e8: 81 c7 e0 08 ret 4000f9ec: 91 e8 20 00 restore %g0, 0, %o0 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 4000f9f0: 40 00 22 71 call 400183b4 4000f9f4: 01 00 00 00 nop 4000f9f8: 10 bf ff f3 b 4000f9c4 4000f9fc: 80 a2 20 00 cmp %o0, 0 rtems_set_errno_and_return_minus_one(EIO); 4000fa00: 40 00 2e dc call 4001b570 <__errno> <== NOT EXECUTED 4000fa04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000fa08: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4000fa0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000fa10: 81 c7 e0 08 ret <== NOT EXECUTED 4000fa14: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000fa18 : if (fs_info->c.state == FAT_CACHE_EMPTY) 4000fa18: c2 0a 20 9d ldub [ %o0 + 0x9d ], %g1 <== NOT EXECUTED 4000fa1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fa20: 02 80 00 05 be 4000fa34 <== NOT EXECUTED 4000fa24: 01 00 00 00 nop <== NOT EXECUTED 4000fa28: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000fa2c: 7f ff ff 55 call 4000f780 <== NOT EXECUTED 4000fa30: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED } 4000fa34: 81 c3 e0 08 retl <== NOT EXECUTED 4000fa38: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 4000fb68 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 4000fb68: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4000fb6c: e0 06 20 08 ld [ %i0 + 8 ], %l0 4000fb70: a0 24 00 1a sub %l0, %i2, %l0 4000fb74: 80 a4 00 1b cmp %l0, %i3 4000fb78: 38 80 00 02 bgu,a 4000fb80 <== NEVER TAKEN 4000fb7c: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 4000fb80: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 4000fb84: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4000fb88: 80 a6 60 00 cmp %i1, 0 4000fb8c: 12 80 00 06 bne 4000fba4 4000fb90: 86 20 40 02 sub %g1, %g2, %g3 4000fb94: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 <== NOT EXECUTED 4000fb98: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 4000fb9c: 32 80 00 4c bne,a 4000fccc <== NOT EXECUTED 4000fba0: e4 06 20 28 ld [ %i0 + 0x28 ], %l2 <== NOT EXECUTED blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4000fba4: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000fba8: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 cln -= FAT_RSRVD_CLN; 4000fbac: b2 06 7f fe add %i1, -2, %i1 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4000fbb0: a4 24 80 01 sub %l2, %g1, %l2 4000fbb4: 85 30 80 03 srl %g2, %g3, %g2 4000fbb8: b3 2e 40 12 sll %i1, %l2, %i1 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 4000fbbc: 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; 4000fbc0: a5 36 80 01 srl %i2, %g1, %l2 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4000fbc4: 83 2c 80 01 sll %l2, %g1, %g1 ssize_t bytes_written = 0; 4000fbc8: b2 10 20 00 clr %i1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4000fbcc: b4 26 80 01 sub %i2, %g1, %i2 ssize_t ret; cur_blk += blocks_in_offset; 4000fbd0: a4 04 80 02 add %l2, %g2, %l2 ssize_t rc = RC_OK; 4000fbd4: 82 10 20 00 clr %g1 while ( (RC_OK == rc) 4000fbd8: 80 a0 60 00 cmp %g1, 0 4000fbdc: 12 80 00 26 bne 4000fc74 4000fbe0: a2 10 20 01 mov 1, %l1 4000fbe4: 80 a4 20 00 cmp %l0, 0 4000fbe8: 02 80 00 23 be 4000fc74 4000fbec: 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)); 4000fbf0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000fbf4: ba 20 40 1a sub %g1, %i2, %i5 4000fbf8: 80 a7 40 10 cmp %i5, %l0 4000fbfc: 08 80 00 03 bleu 4000fc08 4000fc00: b6 10 00 1d mov %i5, %i3 4000fc04: b6 10 00 10 mov %l0, %i3 <== NOT EXECUTED uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 4000fc08: 80 a7 40 1b cmp %i5, %i3 4000fc0c: 38 80 00 02 bgu,a 4000fc14 <== NEVER TAKEN 4000fc10: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED if (0 < bytes_to_write) 4000fc14: 80 a7 60 00 cmp %i5, 0 4000fc18: 02 80 00 0f be 4000fc54 4000fc1c: 90 10 00 1d mov %i5, %o0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000fc20: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1 4000fc24: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 4000fc28: 92 22 40 02 sub %o1, %g2, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4000fc2c: 96 07 bf fc add %fp, -4, %o3 if (bytes_to_write == fs_info->vol.bytes_per_block) 4000fc30: 80 a0 40 1d cmp %g1, %i5 4000fc34: 02 80 00 21 be 4000fcb8 4000fc38: 93 2c 80 09 sll %l2, %o1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 4000fc3c: 94 10 20 01 mov 1, %o2 4000fc40: 7f ff ff 46 call 4000f958 4000fc44: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 4000fc48: 80 a2 20 00 cmp %o0, 0 4000fc4c: 22 80 00 14 be,a 4000fc9c <== ALWAYS TAKEN 4000fc50: d0 07 bf fc ld [ %fp + -4 ], %o0 fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 4000fc54: 80 a2 00 1b cmp %o0, %i3 4000fc58: 02 80 00 0b be 4000fc84 4000fc5c: 82 10 3f ff mov -1, %g1 4000fc60: b4 10 20 00 clr %i2 <== NOT EXECUTED while ( (RC_OK == rc) 4000fc64: 80 a0 60 00 cmp %g1, 0 4000fc68: 02 bf ff e0 be 4000fbe8 4000fc6c: 80 a4 20 00 cmp %l0, 0 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 4000fc70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fc74: 32 80 00 02 bne,a 4000fc7c <== NEVER TAKEN 4000fc78: b2 10 3f ff mov -1, %i1 <== NOT EXECUTED return rc; else return bytes_written; } 4000fc7c: 81 c7 e0 08 ret 4000fc80: 91 e8 00 19 restore %g0, %i1, %o0 bytes_to_write -= ret; 4000fc84: a0 24 00 08 sub %l0, %o0, %l0 bytes_written += ret; 4000fc88: b2 06 40 08 add %i1, %o0, %i1 ++cur_blk; 4000fc8c: a4 04 a0 01 inc %l2 4000fc90: 82 10 20 00 clr %g1 4000fc94: 10 bf ff f4 b 4000fc64 4000fc98: b4 10 20 00 clr %i2 memset(blk_buf + offset, pattern, bytes_to_write); 4000fc9c: 94 10 00 1d mov %i5, %o2 4000fca0: 92 10 00 1c mov %i4, %o1 4000fca4: 40 00 30 4b call 4001bdd0 4000fca8: 90 02 00 1a add %o0, %i2, %o0 fs_info->c.modified = true; 4000fcac: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ] return bytes_to_write; 4000fcb0: 10 bf ff e9 b 4000fc54 4000fcb4: 90 10 00 1d mov %i5, %o0 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4000fcb8: 94 10 20 02 mov 2, %o2 4000fcbc: 7f ff ff 27 call 4000f958 4000fcc0: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 4000fcc4: 10 bf ff e2 b 4000fc4c 4000fcc8: 80 a2 20 00 cmp %o0, 0 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000fccc: 10 bf ff bd b 4000fbc0 <== NOT EXECUTED 4000fcd0: 85 34 80 03 srl %l2, %g3, %g2 <== NOT EXECUTED =============================================================================== 4000fcd4 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff) { 4000fcd4: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4000fcd8: e0 06 20 08 ld [ %i0 + 8 ], %l0 4000fcdc: a0 24 00 1a sub %l0, %i2, %l0 4000fce0: 80 a4 00 1b cmp %l0, %i3 4000fce4: 38 80 00 02 bgu,a 4000fcec 4000fce8: a0 10 00 1b mov %i3, %l0 4000fcec: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1 4000fcf0: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4000fcf4: 80 a6 60 00 cmp %i1, 0 4000fcf8: 12 80 00 06 bne 4000fd10 4000fcfc: 86 20 40 02 sub %g1, %g2, %g3 4000fd00: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 4000fd04: 80 88 a0 03 btst 3, %g2 4000fd08: 32 80 00 4c bne,a 4000fe38 <== ALWAYS TAKEN 4000fd0c: e4 06 20 28 ld [ %i0 + 0x28 ], %l2 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4000fd10: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2 4000fd14: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 cln -= FAT_RSRVD_CLN; 4000fd18: b2 06 7f fe add %i1, -2, %i1 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4000fd1c: a4 24 80 01 sub %l2, %g1, %l2 4000fd20: 85 30 80 03 srl %g2, %g3, %g2 4000fd24: b3 2e 40 12 sll %i1, %l2, %i1 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 4000fd28: 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); 4000fd2c: a5 36 80 01 srl %i2, %g1, %l2 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4000fd30: 83 2c 80 01 sll %l2, %g1, %g1 ssize_t bytes_written = 0; 4000fd34: b2 10 20 00 clr %i1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4000fd38: 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; 4000fd3c: a4 04 80 02 add %l2, %g2, %l2 ssize_t rc = RC_OK; 4000fd40: 82 10 20 00 clr %g1 while ( (RC_OK == rc) 4000fd44: 80 a0 60 00 cmp %g1, 0 4000fd48: 12 80 00 26 bne 4000fde0 4000fd4c: a2 10 20 01 mov 1, %l1 4000fd50: 80 a4 20 00 cmp %l0, 0 4000fd54: 02 80 00 23 be 4000fde0 4000fd58: 80 a0 60 00 cmp %g1, 0 && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 4000fd5c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000fd60: ba 20 40 1a sub %g1, %i2, %i5 4000fd64: 80 a7 40 10 cmp %i5, %l0 4000fd68: 08 80 00 03 bleu 4000fd74 4000fd6c: b6 10 00 1d mov %i5, %i3 4000fd70: b6 10 00 10 mov %l0, %i3 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 4000fd74: 80 a7 40 1b cmp %i5, %i3 4000fd78: 38 80 00 02 bgu,a 4000fd80 4000fd7c: ba 10 00 1b mov %i3, %i5 if (0 < bytes_to_write) 4000fd80: 80 a7 60 00 cmp %i5, 0 4000fd84: 02 80 00 0f be 4000fdc0 4000fd88: 90 10 00 1d mov %i5, %o0 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000fd8c: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1 4000fd90: c4 0e 20 02 ldub [ %i0 + 2 ], %g2 4000fd94: 92 22 40 02 sub %o1, %g2, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4000fd98: 96 07 bf fc add %fp, -4, %o3 if (bytes_to_write == fs_info->vol.bytes_per_block) 4000fd9c: 80 a0 40 1d cmp %g1, %i5 4000fda0: 02 80 00 21 be 4000fe24 4000fda4: 93 2c 80 09 sll %l2, %o1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 4000fda8: 94 10 20 01 mov 1, %o2 4000fdac: 7f ff fe eb call 4000f958 4000fdb0: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 4000fdb4: 80 a2 20 00 cmp %o0, 0 4000fdb8: 22 80 00 14 be,a 4000fe08 <== ALWAYS TAKEN 4000fdbc: d0 07 bf fc ld [ %fp + -4 ], %o0 fs_info, cur_blk, ofs_blk, c, &buffer[bytes_written]); if (c != ret) 4000fdc0: 80 a2 00 1b cmp %o0, %i3 4000fdc4: 02 80 00 0b be 4000fdf0 4000fdc8: 82 10 3f ff mov -1, %g1 4000fdcc: b4 10 20 00 clr %i2 <== NOT EXECUTED while ( (RC_OK == rc) 4000fdd0: 80 a0 60 00 cmp %g1, 0 4000fdd4: 02 bf ff e0 be 4000fd54 4000fdd8: 80 a4 20 00 cmp %l0, 0 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 4000fddc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fde0: 32 80 00 02 bne,a 4000fde8 <== NEVER TAKEN 4000fde4: b2 10 3f ff mov -1, %i1 <== NOT EXECUTED return rc; else return bytes_written; } 4000fde8: 81 c7 e0 08 ret 4000fdec: 91 e8 00 19 restore %g0, %i1, %o0 bytes_to_write -= ret; 4000fdf0: a0 24 00 08 sub %l0, %o0, %l0 bytes_written += ret; 4000fdf4: b2 06 40 08 add %i1, %o0, %i1 ++cur_blk; 4000fdf8: a4 04 a0 01 inc %l2 4000fdfc: 82 10 20 00 clr %g1 4000fe00: 10 bf ff f4 b 4000fdd0 4000fe04: b4 10 20 00 clr %i2 memcpy(blk_buf + offset, buf, bytes_to_write); 4000fe08: 94 10 00 1d mov %i5, %o2 4000fe0c: 92 07 00 19 add %i4, %i1, %o1 4000fe10: 40 00 2f b4 call 4001bce0 4000fe14: 90 02 00 1a add %o0, %i2, %o0 fs_info->c.modified = true; 4000fe18: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ] return bytes_to_write; 4000fe1c: 10 bf ff e9 b 4000fdc0 4000fe20: 90 10 00 1d mov %i5, %o0 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4000fe24: 94 10 20 02 mov 2, %o2 4000fe28: 7f ff fe cc call 4000f958 4000fe2c: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 4000fe30: 10 bf ff e2 b 4000fdb8 4000fe34: 80 a2 20 00 cmp %o0, 0 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 4000fe38: 10 bf ff bd b 4000fd2c 4000fe3c: 85 34 80 03 srl %l2, %g3, %g2 =============================================================================== 40011910 : { 40011910: 9d e3 bf a0 save %sp, -96, %sp if (fat_fd->links_num > 1) 40011914: c2 06 60 08 ld [ %i1 + 8 ], %g1 40011918: 80 a0 60 01 cmp %g1, 1 4001191c: 08 80 00 05 bleu 40011930 40011920: 82 00 7f ff add %g1, -1, %g1 fat_fd->links_num--; 40011924: c2 26 60 08 st %g1, [ %i1 + 8 ] rc = fat_buf_release(fs_info); 40011928: 7f ff f8 3c call 4000fa18 4001192c: 81 e8 00 00 restore fat_file_update(fs_info, fat_fd); 40011930: 92 10 00 19 mov %i1, %o1 40011934: 7f ff ff 17 call 40011590 40011938: 90 10 00 18 mov %i0, %o0 if (fat_fd->flags & FAT_FILE_REMOVED) 4001193c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40011940: 80 88 60 01 btst 1, %g1 40011944: 12 80 00 0b bne 40011970 40011948: 94 10 20 00 clr %o2 if (fat_ino_is_unique(fs_info, fat_fd->ino)) 4001194c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 40011950: 7f ff fc 56 call 40010aa8 40011954: 90 10 00 18 mov %i0, %o0 40011958: 80 a2 20 00 cmp %o0, 0 4001195c: 22 80 00 1b be,a 400119c8 40011960: c4 06 40 00 ld [ %i1 ], %g2 fat_fd->links_num = 0; 40011964: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED rc = fat_buf_release(fs_info); 40011968: 7f ff f8 2c call 4000fa18 <== NOT EXECUTED 4001196c: 81 e8 00 00 restore rc = fat_file_truncate(fs_info, fat_fd, 0); 40011970: 92 10 00 19 mov %i1, %o1 40011974: 7f ff ff a4 call 40011804 40011978: 90 10 00 18 mov %i0, %o0 if (rc == RC_OK) 4001197c: 80 a2 20 00 cmp %o0, 0 40011980: 12 bf ff ea bne 40011928 40011984: 90 10 00 18 mov %i0, %o0 next = the_node->next; 40011988: c4 06 40 00 ld [ %i1 ], %g2 previous = the_node->previous; 4001198c: c2 06 60 04 ld [ %i1 + 4 ], %g1 _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); 40011990: d2 06 60 0c ld [ %i1 + 0xc ], %o1 next->previous = previous; 40011994: c2 20 a0 04 st %g1, [ %g2 + 4 ] if (fat_ino_is_unique(fs_info, fat_fd->ino)) 40011998: 7f ff fc 44 call 40010aa8 4001199c: c4 20 40 00 st %g2, [ %g1 ] 400119a0: 80 a2 20 00 cmp %o0, 0 400119a4: 02 80 00 05 be 400119b8 400119a8: 01 00 00 00 nop fat_free_unique_ino(fs_info, fat_fd->ino); 400119ac: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 400119b0: 7f ff fc 33 call 40010a7c <== NOT EXECUTED 400119b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free(fat_fd); 400119b8: 7f ff c8 68 call 40003b58 400119bc: 90 10 00 19 mov %i1, %o0 rc = fat_buf_release(fs_info); 400119c0: 7f ff f8 16 call 4000fa18 400119c4: 81 e8 00 00 restore previous = the_node->previous; 400119c8: c2 06 60 04 ld [ %i1 + 4 ], %g1 next->previous = previous; 400119cc: c2 20 a0 04 st %g1, [ %g2 + 4 ] free(fat_fd); 400119d0: 90 10 00 19 mov %i1, %o0 400119d4: 7f ff c8 61 call 40003b58 400119d8: c4 20 40 00 st %g2, [ %g1 ] rc = fat_buf_release(fs_info); 400119dc: 7f ff f8 0f call 4000fa18 400119e0: 81 e8 00 00 restore =============================================================================== 40011ab8 : { 40011ab8: 9d e3 bf 90 save %sp, -112, %sp *a_length = new_length; 40011abc: f6 27 00 00 st %i3, [ %i4 ] uint32_t chain = 0; 40011ac0: c0 27 bf f0 clr [ %fp + -16 ] uint32_t last_cl = 0; 40011ac4: c0 27 bf f8 clr [ %fp + -8 ] if (new_length <= fat_fd->fat_file_size) 40011ac8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40011acc: 80 a0 40 1b cmp %g1, %i3 40011ad0: 1a 80 00 54 bcc 40011c20 40011ad4: a0 10 20 00 clr %l0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40011ad8: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 40011adc: 80 a0 a0 01 cmp %g2, 1 40011ae0: 22 80 00 53 be,a 40011c2c 40011ae4: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 bytes_remain = (fs_info->vol.bpc - 40011ae8: fa 06 20 08 ld [ %i0 + 8 ], %i5 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 40011aec: 84 07 7f ff add %i5, -1, %g2 40011af0: a4 08 40 02 and %g1, %g2, %l2 bytes_remain = (fs_info->vol.bpc - 40011af4: ba 27 40 12 sub %i5, %l2, %i5 40011af8: ba 0f 40 02 and %i5, %g2, %i5 40011afc: 80 a0 00 1d cmp %g0, %i5 bytes2add = new_length - fat_fd->fat_file_size; 40011b00: 86 26 c0 01 sub %i3, %g1, %g3 40011b04: 84 40 20 00 addx %g0, 0, %g2 if (bytes2add > bytes_remain) 40011b08: 80 a7 40 03 cmp %i5, %g3 40011b0c: 1a 80 00 41 bcc 40011c10 40011b10: 84 0e 80 02 and %i2, %g2, %g2 if (zero_fill && bytes_remain > 0) { 40011b14: 80 a0 a0 00 cmp %g2, 0 40011b18: 12 80 00 51 bne 40011c5c 40011b1c: a2 20 c0 1d sub %g3, %i5, %l1 if (bytes2add == 0) 40011b20: 80 a4 60 00 cmp %l1, 0 40011b24: 02 80 00 3e be 40011c1c 40011b28: 9a 10 00 1a mov %i2, %o5 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40011b2c: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40011b30: 82 04 7f ff add %l1, -1, %g1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40011b34: 98 07 bf f8 add %fp, -8, %o4 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40011b38: b5 30 40 02 srl %g1, %g2, %i2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40011b3c: 96 07 bf fc add %fp, -4, %o3 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 40011b40: b4 06 a0 01 inc %i2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 40011b44: 92 07 bf f0 add %fp, -16, %o1 40011b48: 94 10 00 1a mov %i2, %o2 40011b4c: 7f ff fd 2d call 40011000 40011b50: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40011b54: a0 92 20 00 orcc %o0, 0, %l0 40011b58: 32 80 00 33 bne,a 40011c24 <== NEVER TAKEN 40011b5c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) 40011b60: c2 07 bf fc ld [ %fp + -4 ], %g1 40011b64: 80 90 40 1d orcc %g1, %i5, %g0 40011b68: 02 80 00 38 be 40011c48 40011b6c: 80 a0 40 1a cmp %g1, %i2 if (cls2add != cls_added) 40011b70: 02 80 00 08 be 40011b90 40011b74: b4 26 80 01 sub %i2, %g1, %i2 uint32_t missing = (cls2add - cls_added) << fs_info->vol.bpc_log2; 40011b78: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40011b7c: b5 2e 80 02 sll %i2, %g2, %i2 new_length -= bytes2add < missing ? bytes2add : missing; 40011b80: 80 a6 80 11 cmp %i2, %l1 40011b84: 38 80 00 02 bgu,a 40011b8c <== ALWAYS TAKEN 40011b88: b4 10 00 11 mov %l1, %i2 40011b8c: b6 26 c0 1a sub %i3, %i2, %i3 if (cls_added > 0) 40011b90: 80 a0 60 00 cmp %g1, 0 40011b94: 22 80 00 47 be,a 40011cb0 40011b98: f6 27 00 00 st %i3, [ %i4 ] if ( fat_fd->fat_file_size == 0 ) 40011b9c: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 40011ba0: 80 a2 e0 00 cmp %o3, 0 40011ba4: 32 80 00 48 bne,a 40011cc4 40011ba8: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 fat_fd->map.disk_cln = chain; 40011bac: c4 07 bf f0 ld [ %fp + -16 ], %g2 fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 40011bb0: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40011bb4: 82 10 60 02 or %g1, 2, %g1 40011bb8: c4 26 60 38 st %g2, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; 40011bbc: c0 26 60 34 clr [ %i1 + 0x34 ] fat_fd->cln = cln; 40011bc0: c4 26 60 1c st %g2, [ %i1 + 0x1c ] fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 40011bc4: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] fat_fd->map.last_cln = last_cl; 40011bc8: c2 07 bf f8 ld [ %fp + -8 ], %g1 40011bcc: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 40011bd0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40011bd4: 80 a0 60 00 cmp %g1, 0 40011bd8: 32 80 00 36 bne,a 40011cb0 40011bdc: f6 27 00 00 st %i3, [ %i4 ] rc = fat_init_clusters_chain(fs_info, chain); 40011be0: d2 07 bf f0 ld [ %fp + -16 ], %o1 40011be4: 7f ff fb 49 call 40010908 40011be8: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 40011bec: 82 92 20 00 orcc %o0, 0, %g1 40011bf0: 22 80 00 30 be,a 40011cb0 <== ALWAYS TAKEN 40011bf4: f6 27 00 00 st %i3, [ %i4 ] fat_free_fat_clusters_chain(fs_info, chain); 40011bf8: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 40011bfc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40011c00: 7f ff fc c8 call 40010f20 <== NOT EXECUTED 40011c04: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED return rc; 40011c08: 81 c7 e0 08 ret <== NOT EXECUTED 40011c0c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED if (zero_fill && bytes_remain > 0) { 40011c10: 80 a0 a0 00 cmp %g2, 0 40011c14: 12 80 00 12 bne 40011c5c 40011c18: a2 10 20 00 clr %l1 return RC_OK; 40011c1c: a0 10 20 00 clr %l0 } 40011c20: b0 10 00 10 mov %l0, %i0 40011c24: 81 c7 e0 08 ret 40011c28: 81 e8 00 00 restore if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40011c2c: 80 a0 a0 00 cmp %g2, 0 40011c30: 32 bf ff af bne,a 40011aec <== NEVER TAKEN 40011c34: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED 40011c38: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40011c3c: 80 88 a0 03 btst 3, %g2 40011c40: 22 bf ff ab be,a 40011aec <== NEVER TAKEN 40011c44: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 40011c48: 40 00 26 4a call 4001b570 <__errno> 40011c4c: a0 10 3f ff mov -1, %l0 40011c50: 82 10 20 1c mov 0x1c, %g1 40011c54: 10 bf ff f3 b 40011c20 40011c58: c2 22 00 00 st %g1, [ %o0 ] uint32_t cl_start = start >> fs_info->vol.bpc_log2; 40011c5c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40011c60: 96 07 bf fc add %fp, -4, %o3 40011c64: 95 30 40 0a srl %g1, %o2, %o2 40011c68: 92 10 00 19 mov %i1, %o1 40011c6c: 7f ff fd 5a call 400111d4 40011c70: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40011c74: a0 92 60 00 orcc %o1, 0, %l0 40011c78: 32 bf ff eb bne,a 40011c24 <== NEVER TAKEN 40011c7c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 40011c80: d2 07 bf fc ld [ %fp + -4 ], %o1 40011c84: 98 10 20 00 clr %o4 40011c88: 96 10 00 1d mov %i5, %o3 40011c8c: 94 10 00 12 mov %l2, %o2 40011c90: 90 10 00 18 mov %i0, %o0 40011c94: 7f ff f7 b5 call 4000fb68 40011c98: a0 10 3f ff mov -1, %l0 if (bytes_remain != bytes_written) 40011c9c: 80 a2 00 1d cmp %o0, %i5 40011ca0: 32 bf ff e1 bne,a 40011c24 <== NEVER TAKEN 40011ca4: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 40011ca8: 10 bf ff 9f b 40011b24 40011cac: 80 a4 60 00 cmp %l1, 0 fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 40011cb0: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40011cb4: 82 10 60 02 or %g1, 2, %g1 fat_fd->fat_file_size = s; 40011cb8: f6 26 60 18 st %i3, [ %i1 + 0x18 ] return RC_OK; 40011cbc: 10 bf ff d9 b 40011c20 40011cc0: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 40011cc4: 80 a2 7f ff cmp %o1, -1 40011cc8: 22 80 00 0d be,a 40011cfc <== NEVER TAKEN 40011ccc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED old_last_cl = fat_fd->map.last_cln; 40011cd0: d2 27 bf f4 st %o1, [ %fp + -12 ] rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 40011cd4: 90 10 00 18 mov %i0, %o0 40011cd8: 7f ff fb ee call 40010c90 40011cdc: d4 07 bf f0 ld [ %fp + -16 ], %o2 if ( rc != RC_OK ) 40011ce0: 82 92 20 00 orcc %o0, 0, %g1 40011ce4: 12 bf ff c6 bne 40011bfc 40011ce8: d2 07 bf f0 ld [ %fp + -16 ], %o1 fat_buf_release(fs_info); 40011cec: 7f ff f7 4b call 4000fa18 40011cf0: 90 10 00 18 mov %i0, %o0 fat_fd->map.last_cln = last_cl; 40011cf4: 10 bf ff b6 b 40011bcc 40011cf8: c2 07 bf f8 ld [ %fp + -8 ], %g1 rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 40011cfc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40011d00: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40011d04: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40011d08: 7f ff ff 37 call 400119e4 <== NOT EXECUTED 40011d0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40011d10: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) 40011d14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011d18: 02 bf ff ef be 40011cd4 <== NOT EXECUTED 40011d1c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED 40011d20: 10 bf ff b7 b 40011bfc <== NOT EXECUTED 40011d24: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED =============================================================================== 400119e4 : { 400119e4: 9d e3 bf 98 save %sp, -104, %sp va_start(ap, cmd); 400119e8: 82 07 a0 50 add %fp, 0x50, %g1 400119ec: f6 27 a0 50 st %i3, [ %fp + 0x50 ] switch (cmd) 400119f0: 80 a6 a0 01 cmp %i2, 1 va_start(ap, cmd); 400119f4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400119f8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] uint32_t cur_cln = 0; 400119fc: c0 27 bf f8 clr [ %fp + -8 ] switch (cmd) 40011a00: 12 80 00 22 bne 40011a88 40011a04: c2 27 bf fc st %g1, [ %fp + -4 ] ret = va_arg(ap, uint32_t *); 40011a08: 84 07 a0 58 add %fp, 0x58, %g2 40011a0c: c4 27 bf fc st %g2, [ %fp + -4 ] if ( pos >= fat_fd->fat_file_size ) { 40011a10: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 40011a14: 80 a0 80 1b cmp %g2, %i3 40011a18: 08 80 00 22 bleu 40011aa0 40011a1c: ba 10 00 1c mov %i4, %i5 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40011a20: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40011a24: 80 a0 60 01 cmp %g1, 1 40011a28: 32 80 00 0d bne,a 40011a5c 40011a2c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 40011a30: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40011a34: 80 a0 60 00 cmp %g1, 0 40011a38: 32 80 00 09 bne,a 40011a5c <== NEVER TAKEN 40011a3c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 <== NOT EXECUTED 40011a40: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40011a44: 80 88 60 03 btst 3, %g1 40011a48: 22 80 00 05 be,a 40011a5c 40011a4c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2 *ret = 0; 40011a50: c0 27 00 00 clr [ %i4 ] break; 40011a54: 81 c7 e0 08 ret 40011a58: 91 e8 20 00 restore %g0, 0, %o0 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40011a5c: 90 10 00 18 mov %i0, %o0 40011a60: 96 07 bf f8 add %fp, -8, %o3 40011a64: 95 36 c0 0a srl %i3, %o2, %o2 40011a68: 7f ff fd db call 400111d4 40011a6c: 92 10 00 19 mov %i1, %o1 if ( rc != RC_OK ) 40011a70: b0 92 60 00 orcc %o1, 0, %i0 40011a74: 12 80 00 03 bne 40011a80 40011a78: c2 07 bf f8 ld [ %fp + -8 ], %g1 *ret = cur_cln; 40011a7c: c2 27 40 00 st %g1, [ %i5 ] break; 40011a80: 81 c7 e0 08 ret 40011a84: 81 e8 00 00 restore errno = EINVAL; 40011a88: 40 00 26 ba call 4001b570 <__errno> <== NOT EXECUTED 40011a8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011a90: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40011a94: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40011a98: 81 c7 e0 08 ret <== NOT EXECUTED 40011a9c: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 40011aa0: 40 00 26 b4 call 4001b570 <__errno> <== NOT EXECUTED 40011aa4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011aa8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40011aac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011ab0: 81 c7 e0 08 ret <== NOT EXECUTED 40011ab4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40011270 : { 40011270: 9d e3 bf a0 save %sp, -96, %sp return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 40011274: c2 06 40 00 ld [ %i1 ], %g1 if (cln == 1) 40011278: 80 a0 60 01 cmp %g1, 1 4001127c: 02 80 00 0b be 400112a8 40011280: 80 a0 60 00 cmp %g1, 0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40011284: 32 80 00 76 bne,a 4001145c 40011288: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 4001128c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40011290: 80 88 a0 03 btst 3, %g2 40011294: 22 80 00 72 be,a 4001145c <== NEVER TAKEN 40011298: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 4001129c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 fs_info->vol.sec_mul); 400112a0: fa 0e 20 03 ldub [ %i0 + 3 ], %i5 return (fat_cluster_num_to_sector_num(fs_info, cln) << 400112a4: 83 28 40 1d sll %g1, %i5, %g1 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400112a8: c4 06 60 04 ld [ %i1 + 4 ], %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 400112ac: e0 06 20 80 ld [ %i0 + 0x80 ], %l0 400112b0: bb 30 a0 09 srl %g2, 9, %i5 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400112b4: 85 30 a0 05 srl %g2, 5, %g2 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400112b8: ba 07 40 01 add %i5, %g1, %i5 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400112bc: 84 08 a0 0f and %g2, 0xf, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400112c0: bb 2f 60 04 sll %i5, 4, %i5 400112c4: ba 07 40 02 add %i5, %g2, %i5 uint32_t mod = (key1) % FAT_HASH_MODULE; 400112c8: 82 0f 60 01 and %i5, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 400112cc: b7 28 60 01 sll %g1, 1, %i3 400112d0: b6 06 c0 01 add %i3, %g1, %i3 400112d4: b7 2e e0 02 sll %i3, 2, %i3 return _Chain_Immutable_head( the_chain )->next; 400112d8: c8 04 00 1b ld [ %l0 + %i3 ], %g4 400112dc: a0 04 00 1b add %l0, %i3, %l0 return &the_chain->Tail.Node; 400112e0: b8 04 20 04 add %l0, 4, %i4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 400112e4: 80 a1 00 1c cmp %g4, %i4 400112e8: 22 80 00 1e be,a 40011360 400112ec: de 06 20 84 ld [ %i0 + 0x84 ], %o7 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400112f0: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 if (cln == 1) 400112f4: 80 a0 60 01 cmp %g1, 1 400112f8: 02 80 00 0b be 40011324 400112fc: 80 a0 60 00 cmp %g1, 0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40011300: 32 80 00 5c bne,a 40011470 40011304: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40011308: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 4001130c: 80 88 a0 03 btst 3, %g2 40011310: 22 80 00 58 be,a 40011470 <== NEVER TAKEN 40011314: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40011318: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 fs_info->vol.sec_mul); 4001131c: c4 0e 20 03 ldub [ %i0 + 3 ], %g2 return (fat_cluster_num_to_sector_num(fs_info, cln) << 40011320: 83 28 40 02 sll %g1, %g2, %g1 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 40011324: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 40011328: 85 30 e0 09 srl %g3, 9, %g2 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 4001132c: 87 30 e0 05 srl %g3, 5, %g3 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 40011330: 82 00 80 01 add %g2, %g1, %g1 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 40011334: 86 08 e0 0f and %g3, 0xf, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 40011338: 83 28 60 04 sll %g1, 4, %g1 4001133c: 82 00 40 03 add %g1, %g3, %g1 if ( (key1) == ck) 40011340: 80 a7 40 01 cmp %i5, %g1 40011344: 22 80 00 80 be,a 40011544 40011348: c2 01 20 08 ld [ %g4 + 8 ], %g1 the_node = the_node->next; 4001134c: c8 01 00 00 ld [ %g4 ], %g4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 40011350: 80 a1 00 1c cmp %g4, %i4 40011354: 32 bf ff e8 bne,a 400112f4 40011358: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4001135c: de 06 20 84 ld [ %i0 + 0x84 ], %o7 return _Chain_Immutable_head( the_chain )->next; 40011360: c8 03 c0 1b ld [ %o7 + %i3 ], %g4 40011364: 9e 03 c0 1b add %o7, %i3, %o7 return &the_chain->Tail.Node; 40011368: 9e 03 e0 04 add %o7, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 4001136c: 80 a1 00 0f cmp %g4, %o7 40011370: 02 80 00 1e be 400113e8 40011374: 92 10 20 50 mov 0x50, %o1 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 40011378: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 <== NOT EXECUTED if (cln == 1) 4001137c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40011380: 02 80 00 0b be 400113ac <== NOT EXECUTED 40011384: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40011388: 32 80 00 3f bne,a 40011484 <== NOT EXECUTED 4001138c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED 40011390: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 <== NOT EXECUTED 40011394: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 40011398: 22 80 00 3b be,a 40011484 <== NOT EXECUTED 4001139c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 400113a0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED fs_info->vol.sec_mul); 400113a4: c4 0e 20 03 ldub [ %i0 + 3 ], %g2 <== NOT EXECUTED return (fat_cluster_num_to_sector_num(fs_info, cln) << 400113a8: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400113ac: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 <== NOT EXECUTED 400113b0: 85 30 e0 09 srl %g3, 9, %g2 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400113b4: 87 30 e0 05 srl %g3, 5, %g3 <== NOT EXECUTED return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 400113b8: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 400113bc: 86 08 e0 0f and %g3, 0xf, %g3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 400113c0: 83 28 60 04 sll %g1, 4, %g1 <== NOT EXECUTED 400113c4: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED if ( (key1) == ck) 400113c8: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 400113cc: 02 80 00 33 be 40011498 <== NOT EXECUTED 400113d0: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED the_node = the_node->next; 400113d4: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 400113d8: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED 400113dc: 32 bf ff e8 bne,a 4001137c <== NOT EXECUTED 400113e0: 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)); 400113e4: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 400113e8: 7f ff f6 08 call 4000ec08 400113ec: 90 10 20 01 mov 1, %o0 400113f0: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 400113f4: 80 a2 20 00 cmp %o0, 0 400113f8: 02 80 00 5a be 40011560 400113fc: a2 10 00 08 mov %o0, %l1 lfat_fd->flags &= ~FAT_FILE_REMOVED; 40011400: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 40011404: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40011408: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ] <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4001140c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40011410: f6 06 40 00 ld [ %i1 ], %i3 <== NOT EXECUTED 40011414: c8 06 60 04 ld [ %i1 + 4 ], %g4 <== NOT EXECUTED 40011418: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED 4001141c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 40011420: c2 24 60 3c st %g1, [ %l1 + 0x3c ] <== NOT EXECUTED lfat_fd->links_num = 1; 40011424: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED old_last = tail->previous; 40011428: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4001142c: f4 24 60 08 st %i2, [ %l1 + 8 ] <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40011430: f6 24 60 20 st %i3, [ %l1 + 0x20 ] <== NOT EXECUTED 40011434: c8 24 60 24 st %g4, [ %l1 + 0x24 ] <== NOT EXECUTED 40011438: c6 24 60 28 st %g3, [ %l1 + 0x28 ] <== NOT EXECUTED 4001143c: c4 24 60 2c st %g2, [ %l1 + 0x2c ] <== NOT EXECUTED lfat_fd->ino = key; 40011440: fa 24 60 0c st %i5, [ %l1 + 0xc ] <== NOT EXECUTED the_node->next = tail; 40011444: f8 24 40 00 st %i4, [ %l1 ] <== NOT EXECUTED tail->previous = the_node; 40011448: e2 24 20 08 st %l1, [ %l0 + 8 ] <== NOT EXECUTED old_last->next = the_node; 4001144c: e2 20 40 00 st %l1, [ %g1 ] <== NOT EXECUTED the_node->previous = old_last; 40011450: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED } 40011454: 81 c7 e0 08 ret <== NOT EXECUTED 40011458: 91 e8 20 00 restore %g0, 0, %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 4001145c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40011460: 82 00 7f fe add %g1, -2, %g1 40011464: 83 28 40 03 sll %g1, %g3, %g1 40011468: 10 bf ff 8e b 400112a0 4001146c: 82 00 40 02 add %g1, %g2, %g1 40011470: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40011474: 82 00 7f fe add %g1, -2, %g1 40011478: 83 28 40 03 sll %g1, %g3, %g1 4001147c: 10 bf ff a8 b 4001131c 40011480: 82 00 40 02 add %g1, %g2, %g1 40011484: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED 40011488: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 4001148c: 83 28 40 03 sll %g1, %g3, %g1 <== NOT EXECUTED 40011490: 10 bf ff c5 b 400113a4 <== NOT EXECUTED 40011494: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED if ( ((key2) == 0) || ((key2) == ffd->ino) ) 40011498: 02 80 00 07 be 400114b4 <== NOT EXECUTED 4001149c: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 400114a0: c2 01 20 0c ld [ %g4 + 0xc ], %g1 <== NOT EXECUTED 400114a4: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 400114a8: 32 bf ff cc bne,a 400113d8 <== NOT EXECUTED 400114ac: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t)); 400114b0: 92 10 20 50 mov 0x50, %o1 <== NOT EXECUTED 400114b4: 7f ff f5 d5 call 4000ec08 <== NOT EXECUTED 400114b8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400114bc: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED if ( lfat_fd == NULL ) 400114c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400114c4: 02 80 00 27 be 40011560 <== NOT EXECUTED 400114c8: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 400114cc: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400114d0: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 400114d4: fa 06 40 00 ld [ %i1 ], %i5 <== NOT EXECUTED 400114d8: c8 06 60 04 ld [ %i1 + 4 ], %g4 <== NOT EXECUTED 400114dc: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED 400114e0: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 400114e4: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ] <== NOT EXECUTED lfat_fd->links_num = 1; 400114e8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 400114ec: fa 24 60 20 st %i5, [ %l1 + 0x20 ] <== NOT EXECUTED lfat_fd->ino = fat_get_unique_ino(fs_info); 400114f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED lfat_fd->links_num = 1; 400114f4: c2 24 60 08 st %g1, [ %l1 + 8 ] <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 400114f8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 400114fc: c8 24 60 24 st %g4, [ %l1 + 0x24 ] <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 40011500: c2 24 60 3c st %g1, [ %l1 + 0x3c ] <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 40011504: c6 24 60 28 st %g3, [ %l1 + 0x28 ] <== NOT EXECUTED lfat_fd->ino = fat_get_unique_ino(fs_info); 40011508: 7f ff fd 1e call 40010980 <== NOT EXECUTED 4001150c: c4 24 60 2c st %g2, [ %l1 + 0x2c ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 40011510: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011514: 02 80 00 11 be 40011558 <== NOT EXECUTED 40011518: d0 24 60 0c st %o0, [ %l1 + 0xc ] <== NOT EXECUTED 4001151c: e0 06 20 80 ld [ %i0 + 0x80 ], %l0 <== NOT EXECUTED 40011520: a0 04 00 1b add %l0, %i3, %l0 <== NOT EXECUTED old_last = tail->previous; 40011524: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40011528: b8 04 20 04 add %l0, 4, %i4 <== NOT EXECUTED the_node->next = tail; 4001152c: f8 24 40 00 st %i4, [ %l1 ] <== NOT EXECUTED tail->previous = the_node; 40011530: e2 24 20 08 st %l1, [ %l0 + 8 ] <== NOT EXECUTED old_last->next = the_node; 40011534: e2 20 40 00 st %l1, [ %g1 ] <== NOT EXECUTED the_node->previous = old_last; 40011538: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED } 4001153c: 81 c7 e0 08 ret <== NOT EXECUTED 40011540: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED (*fat_fd) = lfat_fd; 40011544: c8 26 80 00 st %g4, [ %i2 ] lfat_fd->links_num++; 40011548: 82 00 60 01 inc %g1 4001154c: c2 21 20 08 st %g1, [ %g4 + 8 ] return rc; 40011550: 81 c7 e0 08 ret 40011554: 91 e8 20 00 restore %g0, 0, %o0 free((*fat_fd)); 40011558: 7f ff c9 80 call 40003b58 <== NOT EXECUTED 4001155c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40011560: 40 00 28 04 call 4001b570 <__errno> <== NOT EXECUTED 40011564: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011568: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4001156c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011570: 81 c7 e0 08 ret <== NOT EXECUTED 40011574: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40011614 : { 40011614: 9d e3 bf 98 save %sp, -104, %sp uint32_t cur_cln = 0; 40011618: c0 27 bf fc clr [ %fp + -4 ] { 4001161c: ba 10 00 18 mov %i0, %i5 if (count == 0) 40011620: 80 a6 e0 00 cmp %i3, 0 40011624: 02 80 00 27 be 400116c0 40011628: b0 10 20 00 clr %i0 if ( start >= fat_fd->fat_file_size ) 4001162c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40011630: 80 a0 40 1a cmp %g1, %i2 40011634: 08 80 00 23 bleu 400116c0 40011638: 80 a0 40 1b cmp %g1, %i3 if ((count > fat_fd->fat_file_size) || 4001163c: 1a 80 00 5d bcc 400117b0 40011640: 84 20 40 1b sub %g1, %i3, %g2 count = fat_fd->fat_file_size - start; 40011644: b6 20 40 1a sub %g1, %i2, %i3 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40011648: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 4001164c: 80 a0 60 01 cmp %g1, 1 40011650: 32 80 00 1e bne,a 400116c8 40011654: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 40011658: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4001165c: 80 a0 60 00 cmp %g1, 0 40011660: 32 80 00 1a bne,a 400116c8 <== NEVER TAKEN 40011664: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 <== NOT EXECUTED 40011668: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 4001166c: 80 88 60 03 btst 3, %g1 40011670: 22 80 00 16 be,a 400116c8 40011674: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2 sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 40011678: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4001167c: 80 a0 60 00 cmp %g1, 0 40011680: 32 80 00 5c bne,a 400117f0 <== NEVER TAKEN 40011684: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 40011688: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 byte = start & (fs_info->vol.bps - 1); 4001168c: d4 17 40 00 lduh [ %i5 ], %o2 sec += (start >> fs_info->vol.sec_log2); 40011690: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 40011694: 94 02 bf ff add %o2, -1, %o2 sec += (start >> fs_info->vol.sec_log2); 40011698: 93 36 80 09 srl %i2, %o1, %o1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 4001169c: 98 10 00 1c mov %i4, %o4 400116a0: 96 10 00 1b mov %i3, %o3 400116a4: 94 0a 80 1a and %o2, %i2, %o2 400116a8: 92 02 40 01 add %o1, %g1, %o1 400116ac: 7f ff f8 e4 call 4000fa3c <_fat_block_read> 400116b0: 90 10 00 1d mov %i5, %o0 400116b4: b0 92 20 00 orcc %o0, 0, %i0 400116b8: 06 80 00 43 bl 400117c4 400116bc: 01 00 00 00 nop } 400116c0: 81 c7 e0 08 ret 400116c4: 81 e8 00 00 restore cl_start = start >> fs_info->vol.bpc_log2; 400116c8: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 400116cc: e0 07 60 08 ld [ %i5 + 8 ], %l0 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 400116d0: 94 10 00 12 mov %l2, %o2 400116d4: 96 07 bf fc add %fp, -4, %o3 400116d8: 92 10 00 19 mov %i1, %o1 400116dc: 7f ff fe be call 400111d4 400116e0: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 400116e4: b0 92 60 00 orcc %o1, 0, %i0 400116e8: 12 bf ff f6 bne 400116c0 400116ec: a0 04 3f ff add %l0, -1, %l0 uint32_t cmpltd = 0; 400116f0: a2 10 20 00 clr %l1 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 400116f4: b4 0c 00 1a and %l0, %i2, %i2 400116f8: 10 80 00 1f b 40011774 400116fc: 84 10 00 1a mov %i2, %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40011700: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 40011704: 22 80 00 26 be,a 4001179c <== NOT EXECUTED 40011708: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 4001170c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); 40011710: d4 17 40 00 lduh [ %i5 ], %o2 sec += (ofs >> fs_info->vol.sec_log2); 40011714: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 40011718: 93 30 80 09 srl %g2, %o1, %o1 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 4001171c: 98 07 00 11 add %i4, %l1, %o4 byte = ofs & (fs_info->vol.bps - 1); 40011720: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 40011724: 96 10 00 10 mov %l0, %o3 40011728: 94 0a 80 02 and %o2, %g2, %o2 4001172c: 92 02 40 01 add %o1, %g1, %o1 40011730: 7f ff f8 c3 call 4000fa3c <_fat_block_read> 40011734: 90 10 00 1d mov %i5, %o0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40011738: 94 07 bf fc add %fp, -4, %o2 if ( ret < 0 ) 4001173c: 80 a2 20 00 cmp %o0, 0 40011740: 06 80 00 21 bl 400117c4 40011744: 90 10 00 1d mov %i5, %o0 save_cln = cur_cln; 40011748: e6 07 bf fc ld [ %fp + -4 ], %l3 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4001174c: 92 10 00 13 mov %l3, %o1 40011750: 7f ff fc da call 40010ab8 40011754: b6 26 c0 10 sub %i3, %l0, %i3 cmpltd += c; 40011758: a2 04 40 10 add %l1, %l0, %l1 if ( rc != RC_OK ) 4001175c: 80 a2 20 00 cmp %o0, 0 40011760: 12 bf ff d8 bne 400116c0 <== NEVER TAKEN 40011764: b0 10 00 08 mov %o0, %i0 while (count > 0) 40011768: 80 a6 e0 00 cmp %i3, 0 4001176c: 02 80 00 18 be 400117cc 40011770: 84 10 20 00 clr %g2 c = MIN(count, (fs_info->vol.bpc - ofs)); 40011774: e0 07 60 08 ld [ %i5 + 8 ], %l0 40011778: a0 24 00 02 sub %l0, %g2, %l0 4001177c: 80 a4 00 1b cmp %l0, %i3 40011780: 38 80 00 02 bgu,a 40011788 40011784: a0 10 00 1b mov %i3, %l0 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 40011788: c2 07 bf fc ld [ %fp + -4 ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4001178c: 80 a0 60 00 cmp %g1, 0 40011790: 22 bf ff dc be,a 40011700 <== NEVER TAKEN 40011794: c6 0f 60 16 ldub [ %i5 + 0x16 ], %g3 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40011798: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 4001179c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 400117a0: 82 00 7f fe add %g1, -2, %g1 400117a4: 83 28 40 03 sll %g1, %g3, %g1 400117a8: 10 bf ff da b 40011710 400117ac: 82 00 40 09 add %g1, %o1, %g1 if ((count > fat_fd->fat_file_size) || 400117b0: 80 a0 80 1a cmp %g2, %i2 400117b4: 3a bf ff a6 bcc,a 4001164c 400117b8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 400117bc: 10 bf ff a3 b 40011648 400117c0: b6 20 40 1a sub %g1, %i2, %i3 } 400117c4: 81 c7 e0 08 ret <== NOT EXECUTED 400117c8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 400117cc: c4 0f 60 0c ldub [ %i5 + 0xc ], %g2 400117d0: 82 06 bf ff add %i2, -1, %g1 fat_fd->map.disk_cln = save_cln; 400117d4: e6 26 60 38 st %l3, [ %i1 + 0x38 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 400117d8: 82 00 40 11 add %g1, %l1, %g1 400117dc: 83 30 40 02 srl %g1, %g2, %g1 fat_fd->map.file_cln = cl_start + 400117e0: a4 00 40 12 add %g1, %l2, %l2 400117e4: e4 26 60 34 st %l2, [ %i1 + 0x34 ] return cmpltd; 400117e8: 81 c7 e0 08 ret 400117ec: 91 e8 00 11 restore %g0, %l1, %o0 400117f0: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED 400117f4: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 400117f8: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED 400117fc: 10 bf ff a4 b 4001168c <== NOT EXECUTED 40011800: 82 00 40 09 add %g1, %o1, %g1 <== NOT EXECUTED =============================================================================== 40011f98 : { 40011f98: 9d e3 bf 98 save %sp, -104, %sp uint32_t cur_cln = fat_fd->cln; 40011f9c: f8 06 60 1c ld [ %i1 + 0x1c ], %i4 40011fa0: f8 27 bf fc st %i4, [ %fp + -4 ] if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40011fa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40011fa8: 80 a0 60 01 cmp %g1, 1 40011fac: 22 80 00 22 be,a 40012034 40011fb0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 fat_fd->fat_file_size = 0; 40011fb4: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40011fb8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40011fbc: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40011fc0: 82 0f 00 01 and %i4, %g1, %g1 40011fc4: 80 a0 80 01 cmp %g2, %g1 40011fc8: 18 80 00 0f bgu 40012004 40011fcc: 92 10 00 1c mov %i4, %o1 uint32_t save_cln = 0; 40011fd0: 10 80 00 15 b 40012024 <== NOT EXECUTED 40011fd4: b8 10 20 00 clr %i4 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; 40011fd8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40011fdc: 82 00 40 02 add %g1, %g2, %g1 40011fe0: c2 26 60 18 st %g1, [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40011fe4: c4 07 bf fc ld [ %fp + -4 ], %g2 40011fe8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40011fec: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40011ff0: 82 08 80 01 and %g2, %g1, %g1 40011ff4: 80 a0 40 03 cmp %g1, %g3 40011ff8: 1a 80 00 0b bcc 40012024 40011ffc: 92 10 00 02 mov %g2, %o1 40012000: b8 10 00 02 mov %g2, %i4 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40012004: 94 07 bf fc add %fp, -4, %o2 40012008: 7f ff fa ac call 40010ab8 4001200c: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 40012010: 80 a2 20 00 cmp %o0, 0 40012014: 22 bf ff f1 be,a 40011fd8 <== ALWAYS TAKEN 40012018: c4 06 20 08 ld [ %i0 + 8 ], %g2 } 4001201c: 81 c7 e0 08 ret 40012020: 91 e8 00 08 restore %g0, %o0, %o0 return rc; 40012024: 90 10 20 00 clr %o0 fat_fd->map.last_cln = save_cln; 40012028: f8 26 60 3c st %i4, [ %i1 + 0x3c ] } 4001202c: 81 c7 e0 08 ret 40012030: 91 e8 00 08 restore %g0, %o0, %o0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 40012034: 80 a0 60 00 cmp %g1, 0 40012038: 32 bf ff e0 bne,a 40011fb8 <== NEVER TAKEN 4001203c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 40012040: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40012044: 80 88 60 03 btst 3, %g1 40012048: 22 bf ff dc be,a 40011fb8 4001204c: c0 26 60 18 clr [ %i1 + 0x18 ] fat_fd->fat_file_size = fs_info->vol.rdir_size; 40012050: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40012054: c2 26 60 18 st %g1, [ %i1 + 0x18 ] return rc; 40012058: 10 bf ff f1 b 4001201c 4001205c: 90 10 20 00 clr %o0 =============================================================================== 40011804 : { 40011804: 9d e3 bf 98 save %sp, -104, %sp uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 40011808: 82 10 3f ff mov -1, %g1 uint32_t cur_cln = 0; 4001180c: c0 27 bf f8 clr [ %fp + -8 ] uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 40011810: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 40011814: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40011818: 80 a0 40 1a cmp %g1, %i2 4001181c: 08 80 00 32 bleu 400118e4 40011820: 80 a0 60 00 cmp %g1, 0 assert(fat_fd->fat_file_size); 40011824: 02 80 00 33 be 400118f0 40011828: 17 10 00 99 sethi %hi(0x40026400), %o3 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 4001182c: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 40011830: c6 06 20 08 ld [ %i0 + 8 ], %g3 40011834: b4 06 80 03 add %i2, %g3, %i2 40011838: b4 06 bf ff add %i2, -1, %i2 4001183c: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 40011840: 85 2e 80 02 sll %i2, %g2, %g2 40011844: 80 a0 40 02 cmp %g1, %g2 40011848: 08 80 00 27 bleu 400118e4 4001184c: 80 a6 a0 00 cmp %i2, 0 if (cl_start != 0) 40011850: 02 80 00 0a be 40011878 40011854: 96 07 bf f8 add %fp, -8, %o3 rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 40011858: 96 07 bf fc add %fp, -4, %o3 4001185c: 94 06 bf ff add %i2, -1, %o2 40011860: 92 10 00 19 mov %i1, %o1 40011864: 7f ff fe 5c call 400111d4 40011868: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 4001186c: 80 a2 60 00 cmp %o1, 0 40011870: 12 80 00 1e bne 400118e8 40011874: 96 07 bf f8 add %fp, -8, %o3 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 40011878: 94 10 00 1a mov %i2, %o2 4001187c: 92 10 00 19 mov %i1, %o1 40011880: 7f ff fe 55 call 400111d4 40011884: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40011888: 80 a2 60 00 cmp %o1, 0 4001188c: 12 80 00 17 bne 400118e8 40011890: 01 00 00 00 nop rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 40011894: d2 07 bf f8 ld [ %fp + -8 ], %o1 40011898: 7f ff fd a2 call 40010f20 4001189c: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 400118a0: 92 92 20 00 orcc %o0, 0, %o1 400118a4: 12 80 00 11 bne 400118e8 400118a8: 80 a6 a0 00 cmp %i2, 0 if (cl_start != 0) 400118ac: 02 80 00 0f be 400118e8 400118b0: 92 10 20 00 clr %o1 rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 400118b4: d2 07 bf fc ld [ %fp + -4 ], %o1 400118b8: 94 10 3f ff mov -1, %o2 400118bc: 7f ff fc f5 call 40010c90 400118c0: 90 10 00 18 mov %i0, %o0 if ( rc != RC_OK ) 400118c4: 92 92 20 00 orcc %o0, 0, %o1 400118c8: 12 80 00 08 bne 400118e8 400118cc: c2 07 bf fc ld [ %fp + -4 ], %g1 fat_fd->map.file_cln = cl_start - 1; 400118d0: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = new_last_cln; 400118d4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = cl_start - 1; 400118d8: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.last_cln = new_last_cln; 400118dc: 10 80 00 03 b 400118e8 400118e0: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 400118e4: 92 10 20 00 clr %o1 } 400118e8: 81 c7 e0 08 ret 400118ec: 91 e8 00 09 restore %g0, %o1, %o0 assert(fat_fd->fat_file_size); 400118f0: 15 10 00 9a sethi %hi(0x40026800), %o2 <== NOT EXECUTED 400118f4: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 400118f8: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 400118fc: 94 12 a0 50 or %o2, 0x50, %o2 <== NOT EXECUTED 40011900: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED 40011904: 40 00 1c 24 call 40018994 <__assert_func> <== NOT EXECUTED 40011908: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED 4001190c: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40011590 : { 40011590: 9d e3 bf a0 save %sp, -96, %sp if (!FAT_FILE_IS_REMOVED(fat_fd) && 40011594: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 40011598: 80 88 60 01 btst 1, %g1 4001159c: 12 80 00 1c bne 4001160c 400115a0: ba 10 20 00 clr %i5 400115a4: 80 88 60 02 btst 2, %g1 400115a8: 02 80 00 19 be 4001160c 400115ac: 01 00 00 00 nop FAT_FILE_HAS_META_DATA_CHANGED(fat_fd) && 400115b0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 400115b4: 80 a0 60 01 cmp %g1, 1 400115b8: 12 80 00 06 bne 400115d0 400115bc: 92 10 00 19 mov %i1, %o1 !FAT_FD_OF_ROOT_DIR(fat_fd)) 400115c0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400115c4: 80 a0 60 00 cmp %g1, 0 400115c8: 02 80 00 11 be 4001160c 400115cc: 01 00 00 00 nop rc = fat_file_write_first_cluster_num(fs_info, fat_fd); 400115d0: 40 00 06 15 call 40012e24 400115d4: 90 10 00 18 mov %i0, %o0 rc = fat_file_write_file_size(fs_info, fat_fd); 400115d8: 92 10 00 19 mov %i1, %o1 rc = fat_file_write_first_cluster_num(fs_info, fat_fd); 400115dc: ba 10 00 08 mov %o0, %i5 rc = fat_file_write_file_size(fs_info, fat_fd); 400115e0: 40 00 06 42 call 40012ee8 400115e4: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 400115e8: 80 a2 20 00 cmp %o0, 0 400115ec: 32 80 00 02 bne,a 400115f4 <== NEVER TAKEN 400115f0: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED rc = fat_file_write_time_and_date(fs_info, fat_fd); 400115f4: 92 10 00 19 mov %i1, %o1 400115f8: 40 00 05 a6 call 40012c90 400115fc: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 40011600: 80 a2 20 00 cmp %o0, 0 40011604: 32 80 00 02 bne,a 4001160c <== NEVER TAKEN 40011608: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED } 4001160c: 81 c7 e0 08 ret 40011610: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 40011d28 : { 40011d28: 9d e3 bf 98 save %sp, -104, %sp uint32_t c = 0; 40011d2c: c0 27 bf f8 clr [ %fp + -8 ] if ( count == 0 ) 40011d30: 80 a6 e0 00 cmp %i3, 0 40011d34: 02 80 00 4c be 40011e64 40011d38: 92 10 20 00 clr %o1 if (start >= fat_fd->size_limit) 40011d3c: fa 06 60 14 ld [ %i1 + 0x14 ], %i5 40011d40: 80 a7 40 1a cmp %i5, %i2 40011d44: 08 80 00 43 bleu 40011e50 40011d48: ba 27 40 1a sub %i5, %i2, %i5 40011d4c: 80 a7 40 1b cmp %i5, %i3 bool zero_fill = start > fat_fd->fat_file_size; 40011d50: 18 80 00 47 bgu 40011e6c 40011d54: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 40011d58: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 40011d5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40011d60: 94 40 20 00 addx %g0, 0, %o2 <== NOT EXECUTED 40011d64: b6 06 80 1d add %i2, %i5, %i3 <== NOT EXECUTED 40011d68: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 40011d6c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 40011d70: 7f ff ff 52 call 40011ab8 <== NOT EXECUTED 40011d74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (RC_OK == rc) 40011d78: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 40011d7c: 12 80 00 3a bne 40011e64 <== NOT EXECUTED 40011d80: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED if (c != (start + count)) 40011d84: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 40011d88: 32 80 00 02 bne,a 40011d90 40011d8c: ba 20 40 1a sub %g1, %i2, %i5 40011d90: f6 0e 20 0c ldub [ %i0 + 0xc ], %i3 return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 40011d94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 40011d98: 80 a0 60 01 cmp %g1, 1 40011d9c: 02 80 00 51 be 40011ee0 40011da0: a1 36 80 1b srl %i2, %i3, %l0 uint32_t cur_cln = 0; 40011da4: c0 27 bf fc clr [ %fp + -4 ] rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 40011da8: 94 10 00 10 mov %l0, %o2 40011dac: 96 07 bf fc add %fp, -4, %o3 40011db0: 92 10 00 19 mov %i1, %o1 40011db4: 7f ff fd 08 call 400111d4 40011db8: 90 10 00 18 mov %i0, %o0 if (RC_OK == rc) 40011dbc: 80 a2 60 00 cmp %o1, 0 40011dc0: 12 80 00 44 bne 40011ed0 40011dc4: b7 2c 00 1b sll %l0, %i3, %i3 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 40011dc8: a4 10 20 00 clr %l2 uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 40011dcc: b4 26 80 1b sub %i2, %i3, %i2 uint32_t cmpltd = 0; 40011dd0: a2 10 20 00 clr %l1 uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 40011dd4: b6 10 00 1a mov %i2, %i3 ret = fat_cluster_write(fs_info, 40011dd8: 94 10 00 1b mov %i3, %o2 while ( (RC_OK == rc) 40011ddc: 80 a2 60 00 cmp %o1, 0 40011de0: 12 80 00 31 bne 40011ea4 40011de4: 90 10 00 18 mov %i0, %o0 40011de8: 80 a7 60 00 cmp %i5, 0 40011dec: 22 80 00 2f be,a 40011ea8 40011df0: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 40011df4: d6 06 20 08 ld [ %i0 + 8 ], %o3 40011df8: 96 22 c0 1b sub %o3, %i3, %o3 40011dfc: 80 a2 c0 1d cmp %o3, %i5 40011e00: 08 80 00 03 bleu 40011e0c 40011e04: 98 07 00 11 add %i4, %l1, %o4 40011e08: 96 10 00 1d mov %i5, %o3 ret = fat_cluster_write(fs_info, 40011e0c: 7f ff f7 b2 call 4000fcd4 40011e10: d2 07 bf fc ld [ %fp + -4 ], %o1 if (0 > ret) 40011e14: 80 a2 20 00 cmp %o0, 0 40011e18: 06 bf ff f0 bl 40011dd8 40011e1c: 92 10 3f ff mov -1, %o1 save_cln = cur_cln; 40011e20: e4 07 bf fc ld [ %fp + -4 ], %l2 cmpltd += ret; 40011e24: a2 04 40 08 add %l1, %o0, %l1 if (0 < bytes_to_write) 40011e28: 92 10 20 00 clr %o1 40011e2c: ba a7 40 08 subcc %i5, %o0, %i5 40011e30: 02 bf ff ea be 40011dd8 40011e34: b6 10 20 00 clr %i3 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40011e38: 92 10 00 12 mov %l2, %o1 40011e3c: 94 07 bf fc add %fp, -4, %o2 40011e40: 7f ff fb 1e call 40010ab8 40011e44: 90 10 00 18 mov %i0, %o0 40011e48: 10 bf ff e4 b 40011dd8 40011e4c: 92 10 00 08 mov %o0, %o1 rtems_set_errno_and_return_minus_one(EFBIG); 40011e50: 40 00 25 c8 call 4001b570 <__errno> <== NOT EXECUTED 40011e54: 01 00 00 00 nop <== NOT EXECUTED 40011e58: 82 10 20 1b mov 0x1b, %g1 ! 1b <_TLS_Alignment+0x1a> <== NOT EXECUTED 40011e5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011e60: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED } 40011e64: 81 c7 e0 08 ret 40011e68: 91 e8 00 09 restore %g0, %o1, %o0 bool zero_fill = start > fat_fd->fat_file_size; 40011e6c: 80 a0 40 1a cmp %g1, %i2 rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 40011e70: 92 10 00 19 mov %i1, %o1 40011e74: 94 40 20 00 addx %g0, 0, %o2 40011e78: ba 10 00 1b mov %i3, %i5 40011e7c: 98 07 bf f8 add %fp, -8, %o4 40011e80: b6 06 80 1d add %i2, %i5, %i3 40011e84: 90 10 00 18 mov %i0, %o0 40011e88: 7f ff ff 0c call 40011ab8 40011e8c: 96 10 00 1b mov %i3, %o3 if (RC_OK == rc) 40011e90: 92 92 20 00 orcc %o0, 0, %o1 40011e94: 12 bf ff f4 bne 40011e64 40011e98: c2 07 bf f8 ld [ %fp + -8 ], %g1 if (c != (start + count)) 40011e9c: 10 bf ff bb b 40011d88 40011ea0: 80 a6 c0 01 cmp %i3, %g1 ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 40011ea4: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40011ea8: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 40011eac: e4 26 60 38 st %l2, [ %i1 + 0x38 ] ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 40011eb0: b4 06 80 11 add %i2, %l1, %i2 40011eb4: b5 36 80 01 srl %i2, %g1, %i2 fat_fd->map.file_cln = start_cln + 40011eb8: a0 06 80 10 add %i2, %l0, %l0 if (RC_OK != rc) 40011ebc: 80 a2 60 00 cmp %o1, 0 40011ec0: 12 80 00 04 bne 40011ed0 40011ec4: e0 26 60 34 st %l0, [ %i1 + 0x34 ] return cmpltd; 40011ec8: 92 10 00 11 mov %l1, %o1 if (0 > ret) 40011ecc: 80 a2 60 00 cmp %o1, 0 40011ed0: 16 bf ff e5 bge 40011e64 40011ed4: 01 00 00 00 nop rc = -1; 40011ed8: 10 bf ff e3 b 40011e64 <== NOT EXECUTED 40011edc: 92 10 3f ff mov -1, %o1 ! ffffffff <== NOT EXECUTED return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 40011ee0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40011ee4: 80 a0 60 00 cmp %g1, 0 40011ee8: 32 bf ff b0 bne,a 40011da8 <== NEVER TAKEN 40011eec: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED 40011ef0: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40011ef4: 80 88 60 03 btst 3, %g1 40011ef8: 22 bf ff ac be,a 40011da8 40011efc: c0 27 bf fc clr [ %fp + -4 ] cln = fat_fd->cln; 40011f00: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 byte = start & (fs_info->vol.bpc -1); 40011f04: d4 06 20 08 ld [ %i0 + 8 ], %o2 ret = fat_cluster_write(fs_info, 40011f08: 92 02 40 10 add %o1, %l0, %o1 byte = start & (fs_info->vol.bpc -1); 40011f0c: 94 02 bf ff add %o2, -1, %o2 ret = fat_cluster_write(fs_info, 40011f10: 98 10 00 1c mov %i4, %o4 40011f14: 96 10 00 1d mov %i5, %o3 40011f18: 94 0a 80 1a and %o2, %i2, %o2 40011f1c: 7f ff f7 6e call 4000fcd4 40011f20: 90 10 00 18 mov %i0, %o0 if (0 > ret) 40011f24: 80 a2 20 00 cmp %o0, 0 40011f28: 06 bf ff ec bl 40011ed8 40011f2c: 92 10 00 08 mov %o0, %o1 } 40011f30: 81 c7 e0 08 ret 40011f34: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 40012ee8 : { 40012ee8: 9d e3 bf 90 save %sp, -112, %sp uint32_t le_new_length = 0; 40012eec: c0 27 bf fc clr [ %fp + -4 ] sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 40012ef0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40012ef4: 80 a0 60 00 cmp %g1, 0 40012ef8: 32 80 00 07 bne,a 40012f14 40012efc: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40012f00: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40012f04: 80 88 a0 03 btst 3, %g2 40012f08: 32 80 00 07 bne,a 40012f24 <== ALWAYS TAKEN 40012f0c: d2 06 20 28 ld [ %i0 + 0x28 ], %o1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40012f10: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 <== NOT EXECUTED 40012f14: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40012f18: 92 00 7f fe add %g1, -2, %o1 40012f1c: 93 2a 40 03 sll %o1, %g3, %o1 40012f20: 92 02 40 02 add %o1, %g2, %o1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012f24: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 40012f28: c2 0e 20 02 ldub [ %i0 + 2 ], %g1 byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 40012f2c: fa 16 00 00 lduh [ %i0 ], %i5 if (fat_fd->fat_file_type == FAT_DIRECTORY) { 40012f30: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012f34: 83 32 80 01 srl %o2, %g1, %g1 byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 40012f38: ba 07 7f ff add %i5, -1, %i5 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012f3c: 92 00 40 09 add %g1, %o1, %o1 if (fat_fd->fat_file_type == FAT_DIRECTORY) { 40012f40: 80 a0 a0 00 cmp %g2, 0 40012f44: 02 80 00 07 be 40012f60 40012f48: ba 0f 40 0a and %i5, %o2, %i5 le_new_length = CT_LE_L(fat_fd->fat_file_size); 40012f4c: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 40012f50: 40 00 1e 82 call 4001a958 <__bswapsi2> 40012f54: d2 27 bf f4 st %o1, [ %fp + -12 ] 40012f58: d0 27 bf fc st %o0, [ %fp + -4 ] 40012f5c: d2 07 bf f4 ld [ %fp + -12 ], %o1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4, 40012f60: 98 07 bf fc add %fp, -4, %o4 40012f64: 96 10 20 04 mov 4, %o3 40012f68: 94 07 60 1c add %i5, 0x1c, %o2 40012f6c: 7f ff f2 d4 call 4000fabc 40012f70: 90 10 00 18 mov %i0, %o0 } 40012f74: b1 3a 20 1f sra %o0, 0x1f, %i0 40012f78: 81 c7 e0 08 ret 40012f7c: 81 e8 00 00 restore =============================================================================== 40012e24 : { 40012e24: 9d e3 bf 98 save %sp, -104, %sp uint16_t le_cl_hi = 0; 40012e28: c0 37 bf fe clrh [ %fp + -2 ] sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 40012e2c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40012e30: 80 a0 60 00 cmp %g1, 0 40012e34: 12 80 00 06 bne 40012e4c 40012e38: fa 06 60 1c ld [ %i1 + 0x1c ], %i5 40012e3c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40012e40: 80 88 a0 03 btst 3, %g2 40012e44: 32 80 00 07 bne,a 40012e60 <== ALWAYS TAKEN 40012e48: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40012e4c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3 40012e50: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40012e54: 82 00 7f fe add %g1, -2, %g1 40012e58: 83 28 40 03 sll %g1, %g3, %g1 40012e5c: 82 00 40 02 add %g1, %g2, %g1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012e60: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 40012e64: f8 0e 20 02 ldub [ %i0 + 2 ], %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40012e68: f6 16 00 00 lduh [ %i0 ], %i3 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012e6c: b9 30 80 1c srl %g2, %i4, %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40012e70: b6 06 ff ff add %i3, -1, %i3 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012e74: b8 07 00 01 add %i4, %g1, %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40012e78: b6 0e c0 02 and %i3, %g2, %i3 le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF)); 40012e7c: 83 2f 60 08 sll %i5, 8, %g1 40012e80: 85 2f 60 10 sll %i5, 0x10, %g2 40012e84: 85 30 a0 18 srl %g2, 0x18, %g2 40012e88: 82 10 40 02 or %g1, %g2, %g1 ret1 = fat_sector_write(fs_info, sec, 40012e8c: 98 07 bf fc add %fp, -4, %o4 40012e90: 94 06 e0 1a add %i3, 0x1a, %o2 40012e94: 92 10 00 1c mov %i4, %o1 le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF)); 40012e98: c2 37 bf fc sth %g1, [ %fp + -4 ] ret1 = fat_sector_write(fs_info, sec, 40012e9c: 96 10 20 02 mov 2, %o3 40012ea0: 7f ff f3 07 call 4000fabc 40012ea4: 90 10 00 18 mov %i0, %o0 le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 40012ea8: bb 37 60 10 srl %i5, 0x10, %i5 40012eac: 83 2f 60 08 sll %i5, 8, %g1 ret1 = fat_sector_write(fs_info, sec, 40012eb0: b4 10 00 08 mov %o0, %i2 ret2 = fat_sector_write(fs_info, sec, 40012eb4: 98 07 bf fe add %fp, -2, %o4 40012eb8: 96 10 20 02 mov 2, %o3 40012ebc: 94 06 e0 14 add %i3, 0x14, %o2 40012ec0: 92 10 00 1c mov %i4, %o1 40012ec4: 90 10 00 18 mov %i0, %o0 le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 40012ec8: bb 37 60 08 srl %i5, 8, %i5 40012ecc: ba 10 40 1d or %g1, %i5, %i5 ret2 = fat_sector_write(fs_info, sec, 40012ed0: 7f ff f2 fb call 4000fabc 40012ed4: fa 37 bf fe sth %i5, [ %fp + -2 ] if ( (ret1 < 0) || (ret2 < 0) ) 40012ed8: b0 12 00 1a or %o0, %i2, %i0 } 40012edc: b1 3e 20 1f sra %i0, 0x1f, %i0 40012ee0: 81 c7 e0 08 ret 40012ee4: 81 e8 00 00 restore =============================================================================== 40012c90 : { 40012c90: 9d e3 bf 98 save %sp, -104, %sp sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 40012c94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 40012c98: 80 a0 60 00 cmp %g1, 0 40012c9c: 12 80 00 06 bne 40012cb4 40012ca0: ba 10 00 18 mov %i0, %i5 40012ca4: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2 40012ca8: 80 88 a0 03 btst 3, %g2 40012cac: 32 80 00 07 bne,a 40012cc8 <== ALWAYS TAKEN 40012cb0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 40012cb4: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 40012cb8: f8 07 60 3c ld [ %i5 + 0x3c ], %i4 40012cbc: 82 00 7f fe add %g1, -2, %g1 40012cc0: 83 28 40 02 sll %g1, %g2, %g1 40012cc4: 82 00 40 1c add %g1, %i4, %g1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012cc8: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 40012ccc: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40012cd0: f6 17 40 00 lduh [ %i5 ], %i3 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 40012cd4: d0 06 60 4c ld [ %i1 + 0x4c ], %o0 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012cd8: b9 30 80 1c srl %g2, %i4, %i4 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 40012cdc: 94 07 bf fc add %fp, -4, %o2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 40012ce0: b8 07 00 01 add %i4, %g1, %i4 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 40012ce4: 92 07 bf fe add %fp, -2, %o1 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 40012ce8: b6 06 ff ff add %i3, -1, %i3 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 40012cec: 40 00 18 19 call 40018d50 40012cf0: b6 0e c0 02 and %i3, %g2, %i3 time_val = CT_LE_W(time_val); 40012cf4: c2 17 bf fc lduh [ %fp + -4 ], %g1 40012cf8: 85 28 60 08 sll %g1, 8, %g2 40012cfc: 83 28 60 10 sll %g1, 0x10, %g1 40012d00: 83 30 60 18 srl %g1, 0x18, %g1 40012d04: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 40012d08: 98 07 bf fc add %fp, -4, %o4 40012d0c: 96 10 20 02 mov 2, %o3 40012d10: 94 06 e0 16 add %i3, 0x16, %o2 40012d14: 92 10 00 1c mov %i4, %o1 time_val = CT_LE_W(time_val); 40012d18: c2 37 bf fc sth %g1, [ %fp + -4 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 40012d1c: 7f ff f3 68 call 4000fabc 40012d20: 90 10 00 1d mov %i5, %o0 date = CT_LE_W(date); 40012d24: c2 17 bf fe lduh [ %fp + -2 ], %g1 40012d28: 85 28 60 08 sll %g1, 8, %g2 40012d2c: 83 28 60 10 sll %g1, 0x10, %g1 40012d30: 83 30 60 18 srl %g1, 0x18, %g1 40012d34: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 40012d38: b4 10 00 08 mov %o0, %i2 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 40012d3c: 98 07 bf fe add %fp, -2, %o4 40012d40: 96 10 20 02 mov 2, %o3 40012d44: 94 06 e0 18 add %i3, 0x18, %o2 date = CT_LE_W(date); 40012d48: c2 37 bf fe sth %g1, [ %fp + -2 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 40012d4c: 92 10 00 1c mov %i4, %o1 40012d50: 90 10 00 1d mov %i5, %o0 40012d54: 7f ff f3 5a call 4000fabc 40012d58: b0 10 3f ff mov -1, %i0 if ( ret < 0 ) 40012d5c: 80 a2 20 00 cmp %o0, 0 40012d60: 36 80 00 02 bge,a 40012d68 <== ALWAYS TAKEN 40012d64: b1 3e a0 1f sra %i2, 0x1f, %i0 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET, 40012d68: 98 07 bf fe add %fp, -2, %o4 40012d6c: 96 10 20 02 mov 2, %o3 40012d70: 94 06 e0 12 add %i3, 0x12, %o2 40012d74: 92 10 00 1c mov %i4, %o1 40012d78: 7f ff f3 51 call 4000fabc 40012d7c: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 40012d80: 80 a2 20 00 cmp %o0, 0 40012d84: 26 80 00 02 bl,a 40012d8c <== NEVER TAKEN 40012d88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED msdos_date_unix2dos(fat_fd->ctime, &date, &time_val); 40012d8c: d0 06 60 44 ld [ %i1 + 0x44 ], %o0 40012d90: 94 07 bf fc add %fp, -4, %o2 40012d94: 40 00 17 ef call 40018d50 40012d98: 92 07 bf fe add %fp, -2, %o1 time_val = CT_LE_W(time_val); 40012d9c: c2 17 bf fc lduh [ %fp + -4 ], %g1 40012da0: 85 28 60 08 sll %g1, 8, %g2 40012da4: 83 28 60 10 sll %g1, 0x10, %g1 40012da8: 83 30 60 18 srl %g1, 0x18, %g1 40012dac: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET, 40012db0: 98 07 bf fc add %fp, -4, %o4 40012db4: 96 10 20 02 mov 2, %o3 40012db8: 94 06 e0 0e add %i3, 0xe, %o2 time_val = CT_LE_W(time_val); 40012dbc: c2 37 bf fc sth %g1, [ %fp + -4 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET, 40012dc0: 92 10 00 1c mov %i4, %o1 40012dc4: 7f ff f3 3e call 4000fabc 40012dc8: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 40012dcc: 80 a2 20 00 cmp %o0, 0 40012dd0: 26 80 00 02 bl,a 40012dd8 <== NEVER TAKEN 40012dd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED date = CT_LE_W(date); 40012dd8: c2 17 bf fe lduh [ %fp + -2 ], %g1 40012ddc: 85 28 60 08 sll %g1, 8, %g2 40012de0: 83 28 60 10 sll %g1, 0x10, %g1 40012de4: 83 30 60 18 srl %g1, 0x18, %g1 40012de8: 82 10 80 01 or %g2, %g1, %g1 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 40012dec: 98 07 bf fe add %fp, -2, %o4 40012df0: 96 10 20 02 mov 2, %o3 40012df4: 94 06 e0 10 add %i3, 0x10, %o2 date = CT_LE_W(date); 40012df8: c2 37 bf fe sth %g1, [ %fp + -2 ] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 40012dfc: 92 10 00 1c mov %i4, %o1 40012e00: 7f ff f3 2f call 4000fabc 40012e04: 90 10 00 1d mov %i5, %o0 if ( ret < 0 ) 40012e08: 80 a2 20 00 cmp %o0, 0 40012e0c: 06 80 00 04 bl 40012e1c 40012e10: 01 00 00 00 nop } 40012e14: 81 c7 e0 08 ret 40012e18: 81 e8 00 00 restore 40012e1c: 81 c7 e0 08 ret <== NOT EXECUTED 40012e20: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40010f20 : { 40010f20: 9d e3 bf 98 save %sp, -104, %sp uint32_t next_cln = 0; 40010f24: c0 27 bf fc clr [ %fp + -4 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40010f28: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40010f2c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40010f30: 82 0e 40 01 and %i1, %g1, %g1 40010f34: 80 a0 80 01 cmp %g2, %g1 40010f38: 08 80 00 26 bleu 40010fd0 40010f3c: ba 10 00 18 mov %i0, %i5 uint32_t cur_cln = chain; 40010f40: b8 10 00 19 mov %i1, %i4 uint32_t freed_cls_cnt = 0; 40010f44: b6 10 20 00 clr %i3 int rc = RC_OK, rc1 = RC_OK; 40010f48: 10 80 00 0e b 40010f80 40010f4c: b0 10 20 00 clr %i0 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 40010f50: 7f ff ff 50 call 40010c90 40010f54: 01 00 00 00 nop if ( rc != RC_OK ) 40010f58: 80 a2 20 00 cmp %o0, 0 40010f5c: 32 80 00 02 bne,a 40010f64 <== NEVER TAKEN 40010f60: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED cur_cln = next_cln; 40010f64: f8 07 bf fc ld [ %fp + -4 ], %i4 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40010f68: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 40010f6c: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 40010f70: 82 0f 00 01 and %i4, %g1, %g1 40010f74: 80 a0 40 02 cmp %g1, %g2 40010f78: 1a 80 00 18 bcc 40010fd8 40010f7c: b6 06 e0 01 inc %i3 rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 40010f80: 92 10 00 1c mov %i4, %o1 40010f84: 94 07 bf fc add %fp, -4, %o2 40010f88: 7f ff fe cc call 40010ab8 40010f8c: 90 10 00 1d mov %i5, %o0 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 40010f90: 92 10 00 1c mov %i4, %o1 rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 40010f94: 82 10 00 08 mov %o0, %g1 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 40010f98: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 40010f9c: 80 a0 60 00 cmp %g1, 0 40010fa0: 02 bf ff ec be 40010f50 40010fa4: 90 10 00 1d mov %i5, %o0 if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40010fa8: c4 07 60 4c ld [ %i5 + 0x4c ], %g2 <== NOT EXECUTED 40010fac: 80 a0 bf ff cmp %g2, -1 <== NOT EXECUTED 40010fb0: 02 80 00 03 be 40010fbc <== NOT EXECUTED 40010fb4: b6 00 80 1b add %g2, %i3, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 40010fb8: f6 27 60 4c st %i3, [ %i5 + 0x4c ] <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 40010fbc: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED fat_buf_release(fs_info); 40010fc0: 7f ff fa 96 call 4000fa18 <== NOT EXECUTED 40010fc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; 40010fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40010fcc: 81 e8 00 00 restore <== NOT EXECUTED uint32_t freed_cls_cnt = 0; 40010fd0: b6 10 20 00 clr %i3 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; 40010fd4: b0 10 20 00 clr %i0 <== NOT EXECUTED fs_info->vol.next_cl = chain; 40010fd8: f2 27 60 54 st %i1, [ %i5 + 0x54 ] if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40010fdc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 40010fe0: 80 a0 7f ff cmp %g1, -1 40010fe4: 02 80 00 03 be 40010ff0 40010fe8: b6 00 40 1b add %g1, %i3, %i3 fs_info->vol.free_cls += freed_cls_cnt; 40010fec: f6 27 60 4c st %i3, [ %i5 + 0x4c ] <== NOT EXECUTED fat_buf_release(fs_info); 40010ff0: 7f ff fa 8a call 4000fa18 40010ff4: 90 10 00 1d mov %i5, %o0 } 40010ff8: 81 c7 e0 08 ret 40010ffc: 81 e8 00 00 restore =============================================================================== 40010a7c : 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); 40010a7c: c2 02 20 94 ld [ %o0 + 0x94 ], %g1 <== NOT EXECUTED 40010a80: c6 02 20 88 ld [ %o0 + 0x88 ], %g3 <== NOT EXECUTED 40010a84: 92 22 40 01 sub %o1, %g1, %o1 <== NOT EXECUTED 40010a88: 85 32 60 03 srl %o1, 3, %g2 <== NOT EXECUTED 40010a8c: c8 08 c0 02 ldub [ %g3 + %g2 ], %g4 <== NOT EXECUTED 40010a90: 92 0a 60 07 and %o1, 7, %o1 <== NOT EXECUTED 40010a94: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40010a98: 93 28 40 09 sll %g1, %o1, %o1 <== NOT EXECUTED 40010a9c: 92 29 00 09 andn %g4, %o1, %o1 <== NOT EXECUTED } 40010aa0: 81 c3 e0 08 retl <== NOT EXECUTED 40010aa4: d2 28 c0 02 stb %o1, [ %g3 + %g2 ] <== NOT EXECUTED =============================================================================== 40010ab8 : fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 40010ab8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 40010abc: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 40010ac0: 08 80 00 28 bleu 40010b60 <== NOT EXECUTED 40010ac4: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED 40010ac8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 40010acc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010ad0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 40010ad4: 0a 80 00 23 bcs 40010b60 <== NOT EXECUTED 40010ad8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010adc: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 <== NOT EXECUTED 40010ae0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40010ae4: 12 80 00 25 bne 40010b78 <== NOT EXECUTED 40010ae8: b7 36 60 01 srl %i1, 1, %i3 <== NOT EXECUTED 40010aec: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40010af0: 02 80 00 03 be 40010afc <== NOT EXECUTED 40010af4: a1 2e 60 02 sll %i1, 2, %l0 <== NOT EXECUTED 40010af8: a1 2e 60 01 sll %i1, 1, %l0 <== NOT EXECUTED 40010afc: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 <== NOT EXECUTED 40010b00: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 <== NOT EXECUTED 40010b04: b9 34 00 1c srl %l0, %i4, %i4 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010b08: f6 17 40 00 lduh [ %i5 ], %i3 <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010b0c: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40010b10: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40010b14: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 40010b18: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 40010b1c: 7f ff fb 8f call 4000f958 <== NOT EXECUTED 40010b20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rc != RC_OK) 40010b24: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40010b28: 12 80 00 48 bne 40010c48 <== NOT EXECUTED 40010b2c: 01 00 00 00 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 40010b30: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 <== NOT EXECUTED ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010b34: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED switch ( fs_info->vol.type ) 40010b38: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010b3c: b7 36 e0 10 srl %i3, 0x10, %i3 <== NOT EXECUTED 40010b40: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED switch ( fs_info->vol.type ) 40010b44: 02 80 00 35 be 40010c18 <== NOT EXECUTED 40010b48: b6 0e c0 10 and %i3, %l0, %i3 <== NOT EXECUTED 40010b4c: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 40010b50: 02 80 00 2c be 40010c00 <== NOT EXECUTED 40010b54: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40010b58: 02 80 00 18 be 40010bb8 <== NOT EXECUTED 40010b5c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 40010b60: 40 00 2a 84 call 4001b570 <__errno> <== NOT EXECUTED 40010b64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40010b68: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40010b6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40010b70: 81 c7 e0 08 ret <== NOT EXECUTED 40010b74: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010b78: f8 0f 60 02 ldub [ %i5 + 2 ], %i4 40010b7c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 40010b80: a0 06 c0 19 add %i3, %i1, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40010b84: 94 10 20 01 mov 1, %o2 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010b88: b9 34 00 1c srl %l0, %i4, %i4 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010b8c: f6 17 40 00 lduh [ %i5 ], %i3 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010b90: b8 07 00 01 add %i4, %g1, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40010b94: 96 07 bf fc add %fp, -4, %o3 40010b98: 92 10 00 1c mov %i4, %o1 40010b9c: 7f ff fb 6f call 4000f958 40010ba0: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40010ba4: b0 92 20 00 orcc %o0, 0, %i0 40010ba8: 22 bf ff e3 be,a 40010b34 <== ALWAYS TAKEN 40010bac: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1 break; } return RC_OK; } 40010bb0: 81 c7 e0 08 ret <== NOT EXECUTED 40010bb4: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); 40010bb8: c8 08 80 1b ldub [ %g2 + %i3 ], %g4 40010bbc: c8 26 80 00 st %g4, [ %i2 ] if ( ofs == (fs_info->vol.bps - 1) ) 40010bc0: c6 17 40 00 lduh [ %i5 ], %g3 40010bc4: 86 00 ff ff add %g3, -1, %g3 40010bc8: 80 a0 c0 1b cmp %g3, %i3 40010bcc: 02 80 00 21 be 40010c50 40010bd0: b6 00 80 1b add %g2, %i3, %i3 *ret_val |= *(sec_buf + ofs + 1) << 8; 40010bd4: c2 0e e0 01 ldub [ %i3 + 1 ], %g1 40010bd8: 83 28 60 08 sll %g1, 8, %g1 40010bdc: 82 10 40 04 or %g1, %g4, %g1 40010be0: c2 26 80 00 st %g1, [ %i2 ] if ( FAT_CLUSTER_IS_ODD(cln) ) 40010be4: 80 8e 60 01 btst 1, %i1 40010be8: 22 80 00 17 be,a 40010c44 40010bec: 82 08 6f ff and %g1, 0xfff, %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 40010bf0: 83 30 60 04 srl %g1, 4, %g1 40010bf4: c2 26 80 00 st %g1, [ %i2 ] 40010bf8: 81 c7 e0 08 ret 40010bfc: 81 e8 00 00 restore *ret_val = *((uint32_t *)(sec_buf + ofs)); 40010c00: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val = CF_LE_L(*ret_val); 40010c04: 40 00 27 55 call 4001a958 <__bswapsi2> 40010c08: d0 00 40 1b ld [ %g1 + %i3 ], %o0 40010c0c: d0 26 80 00 st %o0, [ %i2 ] break; 40010c10: 81 c7 e0 08 ret 40010c14: 81 e8 00 00 restore *ret_val = *((uint16_t *)(sec_buf + ofs)); 40010c18: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 40010c1c: c4 10 40 1b lduh [ %g1 + %i3 ], %g2 <== NOT EXECUTED 40010c20: 83 28 a0 08 sll %g2, 8, %g1 <== NOT EXECUTED 40010c24: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 40010c28: 85 30 a0 18 srl %g2, 0x18, %g2 <== NOT EXECUTED 40010c2c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 40010c30: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 40010c34: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED 40010c38: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 40010c3c: 81 c7 e0 08 ret <== NOT EXECUTED 40010c40: 81 e8 00 00 restore *ret_val = (*ret_val) & FAT_FAT12_MASK; 40010c44: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 40010c48: 81 c7 e0 08 ret <== NOT EXECUTED 40010c4c: 81 e8 00 00 restore rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40010c50: 96 07 bf fc add %fp, -4, %o3 40010c54: 94 10 20 01 mov 1, %o2 40010c58: 92 07 20 01 add %i4, 1, %o1 40010c5c: 7f ff fb 3f call 4000f958 40010c60: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40010c64: 80 a2 20 00 cmp %o0, 0 40010c68: 12 80 00 08 bne 40010c88 40010c6c: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val |= *sec_buf << 8; 40010c70: c2 08 40 00 ldub [ %g1 ], %g1 40010c74: c4 06 80 00 ld [ %i2 ], %g2 40010c78: 83 28 60 08 sll %g1, 8, %g1 40010c7c: 82 10 40 02 or %g1, %g2, %g1 40010c80: 10 bf ff d9 b 40010be4 40010c84: c2 26 80 00 st %g1, [ %i2 ] } 40010c88: 81 c7 e0 08 ret <== NOT EXECUTED 40010c8c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 40010980 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 40010980: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 40010984: d2 06 20 90 ld [ %i0 + 0x90 ], %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)) 40010988: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 4001098c: b4 10 63 ff or %g1, 0x3ff, %i2 ! fffffff <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 40010990: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40010994: 22 80 00 23 be,a 40010a20 <== NOT EXECUTED 40010998: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 4001099c: c8 06 20 88 ld [ %i0 + 0x88 ], %g4 <== NOT EXECUTED 400109a0: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 <== NOT EXECUTED 400109a4: 87 30 60 03 srl %g1, 3, %g3 <== NOT EXECUTED 400109a8: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2 <== NOT EXECUTED 400109ac: b8 08 60 07 and %g1, 7, %i4 <== NOT EXECUTED 400109b0: b6 01 00 03 add %g4, %g3, %i3 <== NOT EXECUTED 400109b4: 85 38 80 1c sra %g2, %i4, %g2 <== NOT EXECUTED 400109b8: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 400109bc: 02 80 00 26 be 40010a54 <== NOT EXECUTED 400109c0: c6 09 00 03 ldub [ %g4 + %g3 ], %g3 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 400109c4: 10 80 00 0e b 400109fc <== NOT EXECUTED 400109c8: ba 10 20 00 clr %i5 <== NOT EXECUTED 400109cc: 80 a7 40 09 cmp %i5, %o1 <== NOT EXECUTED 400109d0: 02 80 00 12 be 40010a18 <== NOT EXECUTED 400109d4: c2 26 20 8c st %g1, [ %i0 + 0x8c ] <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 400109d8: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 <== NOT EXECUTED 400109dc: 87 30 60 03 srl %g1, 3, %g3 <== NOT EXECUTED 400109e0: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2 <== NOT EXECUTED 400109e4: b8 08 60 07 and %g1, 7, %i4 <== NOT EXECUTED 400109e8: b6 01 00 03 add %g4, %g3, %i3 <== NOT EXECUTED 400109ec: 85 38 80 1c sra %g2, %i4, %g2 <== NOT EXECUTED 400109f0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 400109f4: 02 80 00 18 be 40010a54 <== NOT EXECUTED 400109f8: c6 09 00 03 ldub [ %g4 + %g3 ], %g3 <== NOT EXECUTED fs_info->index++; 400109fc: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 40010a00: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40010a04: 0a bf ff f2 bcs 400109cc <== NOT EXECUTED 40010a08: ba 07 60 01 inc %i5 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 40010a0c: 80 a7 40 09 cmp %i5, %o1 <== NOT EXECUTED 40010a10: 12 bf ff f2 bne 400109d8 <== NOT EXECUTED 40010a14: c0 26 20 8c clr [ %i0 + 0x8c ] <== NOT EXECUTED 40010a18: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 40010a1c: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40010a20: 82 26 80 01 sub %i2, %g1, %g1 <== NOT EXECUTED 40010a24: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40010a28: 08 80 00 13 bleu 40010a74 <== NOT EXECUTED 40010a2c: 01 00 00 00 nop <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 40010a30: d2 26 20 90 st %o1, [ %i0 + 0x90 ] <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 40010a34: 40 00 1f f9 call 40018a18 <== NOT EXECUTED 40010a38: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 <== NOT EXECUTED if (fs_info->uino != NULL) 40010a3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40010a40: 02 80 00 0d be 40010a74 <== NOT EXECUTED 40010a44: d0 26 20 88 st %o0, [ %i0 + 0x88 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 40010a48: d2 06 20 90 ld [ %i0 + 0x90 ], %o1 <== NOT EXECUTED 40010a4c: 10 bf ff d1 b 40010990 <== NOT EXECUTED 40010a50: d2 26 20 8c st %o1, [ %i0 + 0x8c ] <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 40010a54: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40010a58: b9 28 40 1c sll %g1, %i4, %i4 <== NOT EXECUTED 40010a5c: 86 17 00 03 or %i4, %g3, %g3 <== NOT EXECUTED 40010a60: c6 2e c0 00 stb %g3, [ %i3 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 40010a64: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40010a68: f0 06 20 8c ld [ %i0 + 0x8c ], %i0 <== NOT EXECUTED 40010a6c: 81 c7 e0 08 ret <== NOT EXECUTED 40010a70: 91 e8 40 18 restore %g1, %i0, %o0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 40010a74: 81 c7 e0 08 ret <== NOT EXECUTED 40010a78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40010908 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 40010908: 9d e3 bf 98 save %sp, -104, %sp 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) 4001090c: 10 80 00 0e b 40010944 40010910: f2 27 bf fc st %i1, [ %fp + -4 ] { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 40010914: 7f ff fc 95 call 4000fb68 40010918: d6 06 20 08 ld [ %i0 + 8 ], %o3 if ( ret != fs_info->vol.bpc ) 4001091c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40010920: 80 a0 40 08 cmp %g1, %o0 { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40010924: 94 07 bf fc add %fp, -4, %o2 if ( ret != fs_info->vol.bpc ) 40010928: 12 80 00 13 bne 40010974 4001092c: 90 10 00 18 mov %i0, %o0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 40010930: 40 00 00 62 call 40010ab8 40010934: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) 40010938: 80 a2 20 00 cmp %o0, 0 4001093c: 12 80 00 0c bne 4001096c 40010940: f2 07 bf fc ld [ %fp + -4 ], %i1 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40010944: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 40010948: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 4001094c: 92 10 00 19 mov %i1, %o1 40010950: 98 10 20 00 clr %o4 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 40010954: b2 0e 40 02 and %i1, %g2, %i1 ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 40010958: 94 10 20 00 clr %o2 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 4001095c: 80 a6 40 01 cmp %i1, %g1 40010960: 0a bf ff ed bcs 40010914 40010964: 90 10 00 18 mov %i0, %o0 return rc; } } return rc; 40010968: 90 10 20 00 clr %o0 } 4001096c: 81 c7 e0 08 ret 40010970: 91 e8 00 08 restore %g0, %o0, %o0 return -1; 40010974: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED } 40010978: 81 c7 e0 08 ret <== NOT EXECUTED 4001097c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 4000fe40 : * 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) { 4000fe40: 9d e3 bf 00 save %sp, -256, %sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 4000fe44: 92 10 20 02 mov 2, %o1 { 4000fe48: ae 10 00 18 mov %i0, %l7 rtems_bdbuf_buffer *block = NULL; 4000fe4c: c0 27 bf 84 clr [ %fp + -124 ] vol->fd = open(device, O_RDWR); 4000fe50: 7f ff d2 52 call 40004798 4000fe54: 90 10 00 19 mov %i1, %o0 if (vol->fd < 0) 4000fe58: 80 a2 20 00 cmp %o0, 0 4000fe5c: 06 80 01 db bl 400105c8 4000fe60: d0 25 e0 68 st %o0, [ %l7 + 0x68 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 4000fe64: 7f ff cf 53 call 40003bb0 4000fe68: 92 07 bf 98 add %fp, -104, %o1 if (rc != 0) 4000fe6c: 80 a2 20 00 cmp %o0, 0 4000fe70: 12 80 01 d3 bne 400105bc 4000fe74: 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)) 4000fe78: c4 07 bf a8 ld [ %fp + -88 ], %g2 4000fe7c: 84 08 80 03 and %g2, %g3, %g2 4000fe80: 07 00 00 18 sethi %hi(0x6000), %g3 4000fe84: 80 a0 80 03 cmp %g2, %g3 4000fe88: 12 80 01 ce bne 400105c0 4000fe8c: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 4000fe90: 94 06 20 6c add %i0, 0x6c, %o2 4000fe94: 13 10 01 10 sethi %hi(0x40044000), %o1 4000fe98: 7f ff fb d8 call 4000edf8 4000fe9c: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <__end+0x17ea9> 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) { 4000fea0: b0 92 20 00 orcc %o0, 0, %i0 4000fea4: 12 80 01 c6 bne 400105bc 4000fea8: c4 1f bf b8 ldd [ %fp + -72 ], %g2 close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } vol->dev = stat_buf.st_rdev; 4000feac: c4 3d e0 70 std %g2, [ %l7 + 0x70 ] /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 4000feb0: 94 07 bf 84 add %fp, -124, %o2 4000feb4: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0 4000feb8: 40 00 21 3f call 400183b4 4000febc: 92 10 20 00 clr %o1 if (sc != RTEMS_SUCCESSFUL) 4000fec0: 80 a2 20 00 cmp %o0, 0 4000fec4: 12 80 01 c7 bne 400105e0 4000fec8: d0 07 bf 84 ld [ %fp + -124 ], %o0 { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 4000fecc: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 4000fed0: c2 08 a0 20 ldub [ %g2 + 0x20 ], %g1 4000fed4: c2 2f bf 7f stb %g1, [ %fp + -129 ] 4000fed8: c2 08 a0 21 ldub [ %g2 + 0x21 ], %g1 4000fedc: c2 2f bf 7e stb %g1, [ %fp + -130 ] 4000fee0: c2 08 a0 22 ldub [ %g2 + 0x22 ], %g1 4000fee4: c2 2f bf 7d stb %g1, [ %fp + -131 ] 4000fee8: c2 08 a0 23 ldub [ %g2 + 0x23 ], %g1 4000feec: c2 2f bf 7b stb %g1, [ %fp + -133 ] 4000fef0: c2 08 a0 24 ldub [ %g2 + 0x24 ], %g1 4000fef4: c2 2f bf 7c stb %g1, [ %fp + -132 ] 4000fef8: c2 08 a0 25 ldub [ %g2 + 0x25 ], %g1 4000fefc: c2 2f bf 77 stb %g1, [ %fp + -137 ] 4000ff00: c2 08 a0 26 ldub [ %g2 + 0x26 ], %g1 4000ff04: c2 2f bf 76 stb %g1, [ %fp + -138 ] 4000ff08: c2 08 a0 27 ldub [ %g2 + 0x27 ], %g1 4000ff0c: c2 2f bf 73 stb %g1, [ %fp + -141 ] 4000ff10: c2 08 a0 28 ldub [ %g2 + 0x28 ], %g1 4000ff14: e4 08 a0 0b ldub [ %g2 + 0xb ], %l2 4000ff18: f8 08 a0 0c ldub [ %g2 + 0xc ], %i4 4000ff1c: e2 08 a0 0d ldub [ %g2 + 0xd ], %l1 4000ff20: ec 08 a0 0e ldub [ %g2 + 0xe ], %l6 4000ff24: fa 08 a0 0f ldub [ %g2 + 0xf ], %i5 4000ff28: f2 08 a0 10 ldub [ %g2 + 0x10 ], %i1 4000ff2c: ea 08 a0 11 ldub [ %g2 + 0x11 ], %l5 4000ff30: e0 08 a0 12 ldub [ %g2 + 0x12 ], %l0 4000ff34: e6 08 a0 13 ldub [ %g2 + 0x13 ], %l3 4000ff38: f6 08 a0 14 ldub [ %g2 + 0x14 ], %i3 4000ff3c: e8 08 a0 16 ldub [ %g2 + 0x16 ], %l4 4000ff40: f4 08 a0 17 ldub [ %g2 + 0x17 ], %i2 4000ff44: c2 2f bf 6f stb %g1, [ %fp + -145 ] 4000ff48: c2 08 a0 2c ldub [ %g2 + 0x2c ], %g1 4000ff4c: c2 2f bf 74 stb %g1, [ %fp + -140 ] 4000ff50: c2 08 a0 2d ldub [ %g2 + 0x2d ], %g1 4000ff54: c2 2f bf 67 stb %g1, [ %fp + -153 ] 4000ff58: c2 08 a0 2e ldub [ %g2 + 0x2e ], %g1 4000ff5c: c2 2f bf 75 stb %g1, [ %fp + -139 ] 4000ff60: c2 08 a0 2f ldub [ %g2 + 0x2f ], %g1 4000ff64: c2 2f bf 6b stb %g1, [ %fp + -149 ] 4000ff68: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1 4000ff6c: c2 2f bf 66 stb %g1, [ %fp + -154 ] 4000ff70: c2 08 a0 31 ldub [ %g2 + 0x31 ], %g1 sc = rtems_bdbuf_release( block); 4000ff74: 40 00 21 99 call 400185d8 4000ff78: c2 2f bf 65 stb %g1, [ %fp + -155 ] if (sc != RTEMS_SUCCESSFUL) 4000ff7c: 80 a2 20 00 cmp %o0, 0 4000ff80: 12 80 01 98 bne 400105e0 4000ff84: b8 0f 20 ff and %i4, 0xff, %i4 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 4000ff88: a4 0c a0 ff and %l2, 0xff, %l2 4000ff8c: b9 2f 20 08 sll %i4, 8, %i4 4000ff90: a4 17 00 12 or %i4, %l2, %l2 if ( (vol->bps != 512) && 4000ff94: 84 04 be 00 add %l2, -512, %g2 4000ff98: 84 08 bd ff and %g2, -513, %g2 4000ff9c: 85 28 a0 10 sll %g2, 0x10, %g2 (vol->bps != 1024) && (vol->bps != 2048) && 4000ffa0: 80 a0 a0 00 cmp %g2, 0 4000ffa4: 02 80 00 07 be 4000ffc0 4000ffa8: e4 35 c0 00 sth %l2, [ %l7 ] (vol->bps != 1024) && 4000ffac: 84 04 b8 00 add %l2, -2048, %g2 <== NOT EXECUTED 4000ffb0: 07 3f ff c2 sethi %hi(0xffff0800), %g3 <== NOT EXECUTED (vol->bps != 2048) && 4000ffb4: 80 a8 80 03 andncc %g2, %g3, %g0 <== NOT EXECUTED 4000ffb8: 12 80 00 41 bne 400100bc <== NOT EXECUTED 4000ffbc: 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; 4000ffc0: 93 2c a0 10 sll %l2, 0x10, %o1 4000ffc4: 85 32 60 19 srl %o1, 0x19, %g2 4000ffc8: 80 88 a0 01 btst 1, %g2 4000ffcc: 12 80 00 09 bne 4000fff0 4000ffd0: c0 2d e0 03 clrb [ %l7 + 3 ] 4000ffd4: 86 10 20 00 clr %g3 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 4000ffd8: 85 38 a0 01 sra %g2, 1, %g2 <== NOT EXECUTED 4000ffdc: 88 00 e0 01 add %g3, 1, %g4 <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 4000ffe0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000ffe4: 02 bf ff fd be 4000ffd8 <== NOT EXECUTED 4000ffe8: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED 4000ffec: c8 2d e0 03 stb %g4, [ %l7 + 3 ] <== NOT EXECUTED for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 4000fff0: 85 32 60 10 srl %o1, 0x10, %g2 4000fff4: 80 8c a0 01 btst 1, %l2 4000fff8: 12 80 00 0a bne 40010020 4000fffc: c0 2d e0 02 clrb [ %l7 + 2 ] 40010000: 10 80 00 03 b 4001000c 40010004: 86 10 20 01 mov 1, %g3 40010008: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->sec_log2++); 4001000c: 85 38 a0 01 sra %g2, 1, %g2 for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 40010010: 80 88 a0 01 btst 1, %g2 40010014: 02 bf ff fd be 40010008 40010018: 82 00 e0 01 add %g3, 1, %g1 4001001c: c6 2d e0 02 stb %g3, [ %l7 + 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); 40010020: 94 10 20 01 mov 1, %o2 40010024: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0 40010028: 40 00 21 f7 call 40018804 4001002c: 93 32 60 10 srl %o1, 0x10, %o1 if (sc != RTEMS_SUCCESSFUL) 40010030: 80 a2 20 00 cmp %o0, 0 40010034: 12 80 00 22 bne 400100bc 40010038: 84 10 20 01 mov 1, %g2 { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } vol->bytes_per_block = vol->bps; 4001003c: c8 15 c0 00 lduh [ %l7 ], %g4 vol->bytes_per_block_log2 = vol->sec_log2; 40010040: de 0d e0 02 ldub [ %l7 + 2 ], %o7 vol->bytes_per_block = vol->bps; 40010044: 89 29 20 10 sll %g4, 0x10, %g4 40010048: b9 31 20 10 srl %g4, 0x10, %i4 vol->bytes_per_block_log2 = vol->sec_log2; 4001004c: de 2d e0 14 stb %o7, [ %l7 + 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) 40010050: 9a 8c 60 ff andcc %l1, 0xff, %o5 vol->bytes_per_block = vol->bps; 40010054: f8 25 e0 10 st %i4, [ %l7 + 0x10 ] vol->sectors_per_block = 1; 40010058: c4 2d e0 0d stb %g2, [ %l7 + 0xd ] if (vol->spc == 0) 4001005c: 02 80 00 18 be 400100bc 40010060: e2 2d e0 04 stb %l1, [ %l7 + 4 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 40010064: c0 2d e0 05 clrb [ %l7 + 5 ] 40010068: 80 8c 60 01 btst 1, %l1 4001006c: 12 80 00 1c bne 400100dc 40010070: 84 10 00 0d mov %o5, %g2 40010074: 10 80 00 03 b 40010080 40010078: 86 10 20 01 mov 1, %g3 4001007c: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->spc_log2++); 40010080: 85 38 a0 01 sra %g2, 1, %g2 for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 40010084: 80 88 a0 01 btst 1, %g2 40010088: 02 bf ff fd be 4001007c 4001008c: 82 00 e0 01 add %g3, 1, %g1 40010090: 84 08 e0 ff and %g3, 0xff, %g2 40010094: c6 2d e0 05 stb %g3, [ %l7 + 5 ] 40010098: 86 10 20 01 mov 1, %g3 4001009c: 10 80 00 12 b 400100e4 400100a0: 87 28 c0 02 sll %g3, %g2, %g3 if (fs_info->c.state == FAT_CACHE_EMPTY) 400100a4: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2 <== NOT EXECUTED 400100a8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400100ac: 02 80 00 04 be 400100bc <== NOT EXECUTED 400100b0: 01 00 00 00 nop <== NOT EXECUTED 400100b4: 7f ff fd b3 call 4000f780 <== NOT EXECUTED 400100b8: 90 10 00 17 mov %l7, %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); 400100bc: 7f ff ce 44 call 400039cc <== NOT EXECUTED 400100c0: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 400100c4: 40 00 2d 2b call 4001b570 <__errno> <== NOT EXECUTED 400100c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400100cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400100d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400100d4: 81 c7 e0 08 ret <== NOT EXECUTED 400100d8: 81 e8 00 00 restore <== NOT EXECUTED for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 400100dc: 84 10 20 00 clr %g2 400100e0: 86 10 20 01 mov 1, %g3 if (vol->spc != UINT32_C(1) << vol->spc_log2) 400100e4: 80 a3 40 03 cmp %o5, %g3 400100e8: 12 bf ff f5 bne 400100bc 400100ec: b9 2f 00 02 sll %i4, %g2, %i4 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 400100f0: c0 2d e0 0c clrb [ %l7 + 0xc ] 400100f4: 84 10 00 1c mov %i4, %g2 400100f8: 80 8f 20 01 btst 1, %i4 400100fc: 12 80 00 0a bne 40010124 <== NEVER TAKEN 40010100: f8 25 e0 08 st %i4, [ %l7 + 8 ] 40010104: 10 80 00 03 b 40010110 40010108: 86 10 20 01 mov 1, %g3 4001010c: 86 10 00 01 mov %g1, %g3 i >>= 1, vol->bpc_log2++); 40010110: 85 38 a0 01 sra %g2, 1, %g2 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 40010114: 80 88 a0 01 btst 1, %g2 40010118: 02 bf ff fd be 4001010c 4001011c: 82 00 e0 01 add %g3, 1, %g1 40010120: c6 2d e0 0c stb %g3, [ %l7 + 0xc ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40010124: 89 31 20 10 srl %g4, 0x10, %g4 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40010128: ba 0f 60 ff and %i5, 0xff, %i5 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 4001012c: 86 01 3f ff add %g4, -1, %g3 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40010130: ac 0d a0 ff and %l6, 0xff, %l6 40010134: bb 2f 60 08 sll %i5, 8, %i5 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40010138: a0 0c 20 ff and %l0, 0xff, %l0 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 4001013c: ac 17 40 16 or %i5, %l6, %l6 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40010140: a1 2c 20 08 sll %l0, 8, %l0 40010144: aa 0d 60 ff and %l5, 0xff, %l5 vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 40010148: f2 2d e0 15 stb %i1, [ %l7 + 0x15 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 4001014c: a0 14 00 15 or %l0, %l5, %l0 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 40010150: ec 35 e0 20 sth %l6, [ %l7 + 0x20 ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40010154: 85 2c 20 10 sll %l0, 0x10, %g2 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 40010158: e0 35 e0 2c sth %l0, [ %l7 + 0x2c ] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 4001015c: 85 30 a0 0b srl %g2, 0xb, %g2 40010160: 84 00 80 03 add %g2, %g3, %g2 40010164: 83 38 a0 1f sra %g2, 0x1f, %g1 40010168: 81 80 60 00 wr %g1, %y 4001016c: 01 00 00 00 nop 40010170: 01 00 00 00 nop 40010174: 01 00 00 00 nop 40010178: 88 78 80 04 sdiv %g2, %g4, %g4 vol->rdir_size = vol->rdir_secs << vol->sec_log2; 4001017c: 9f 29 00 0f sll %g4, %o7, %o7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 40010180: c8 25 e0 30 st %g4, [ %l7 + 0x30 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 40010184: b4 0e a0 ff and %i2, 0xff, %i2 40010188: b5 2e a0 08 sll %i2, 8, %i2 4001018c: a8 0d 20 ff and %l4, 0xff, %l4 40010190: a8 16 80 14 or %i2, %l4, %l4 40010194: a9 2d 20 10 sll %l4, 0x10, %l4 40010198: 80 a5 20 00 cmp %l4, 0 4001019c: 02 80 00 9c be 4001040c 400101a0: de 25 e0 34 st %o7, [ %l7 + 0x34 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 400101a4: a9 35 20 10 srl %l4, 0x10, %l4 400101a8: e8 25 e0 24 st %l4, [ %l7 + 0x24 ] vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 400101ac: b2 0e 60 ff and %i1, 0xff, %i1 400101b0: ad 2d a0 10 sll %l6, 0x10, %l6 400101b4: b2 5e 40 14 smul %i1, %l4, %i1 400101b8: ad 35 a0 10 srl %l6, 0x10, %l6 400101bc: ac 06 40 16 add %i1, %l6, %l6 400101c0: 88 01 00 16 add %g4, %l6, %g4 vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 400101c4: ec 25 e0 28 st %l6, [ %l7 + 0x28 ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 400101c8: 84 0e e0 ff and %i3, 0xff, %g2 400101cc: 85 28 a0 08 sll %g2, 8, %g2 400101d0: a6 0c e0 ff and %l3, 0xff, %l3 400101d4: 84 10 80 13 or %g2, %l3, %g2 400101d8: 85 28 a0 10 sll %g2, 0x10, %g2 400101dc: 80 a0 a0 00 cmp %g2, 0 400101e0: 02 80 00 7f be 400103dc 400101e4: c8 25 e0 3c st %g4, [ %l7 + 0x3c ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 400101e8: 85 30 a0 10 srl %g2, 0x10, %g2 400101ec: c4 25 e0 38 st %g2, [ %l7 + 0x38 ] data_secs = vol->tot_secs - vol->data_fsec; 400101f0: 88 20 80 04 sub %g2, %g4, %g4 vol->data_cls = data_secs / vol->spc; 400101f4: 81 80 20 00 wr %g0, %y 400101f8: 01 00 00 00 nop 400101fc: 01 00 00 00 nop 40010200: 01 00 00 00 nop 40010204: 84 71 00 0d udiv %g4, %o5, %g2 if ( vol->data_cls < FAT_FAT12_MAX_CLN) 40010208: 80 a0 af f4 cmp %g2, 0xff4 4001020c: 18 80 00 69 bgu 400103b0 40010210: c4 25 e0 40 st %g2, [ %l7 + 0x40 ] vol->type = FAT_FAT12; 40010214: 84 10 20 01 mov 1, %g2 40010218: c4 2d e0 16 stb %g2, [ %l7 + 0x16 ] vol->mask = FAT_FAT12_MASK; 4001021c: 84 10 2f ff mov 0xfff, %g2 40010220: c4 25 e0 18 st %g2, [ %l7 + 0x18 ] vol->eoc_val = FAT_FAT12_EOC; 40010224: 84 10 2f f8 mov 0xff8, %g2 40010228: c4 25 e0 1c st %g2, [ %l7 + 0x1c ] else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 4001022c: 84 10 3f ff mov -1, %g2 vol->rdir_cl = 0; 40010230: c0 25 e0 44 clr [ %l7 + 0x44 ] vol->mirror = 0; 40010234: c0 2d e0 5c clrb [ %l7 + 0x5c ] vol->afat = 0; 40010238: c0 2d e0 64 clrb [ %l7 + 0x64 ] vol->free_cls = FAT_UNDEFINED_VALUE; 4001023c: c4 25 e0 4c st %g2, [ %l7 + 0x4c ] vol->next_cl = FAT_UNDEFINED_VALUE; 40010240: c4 25 e0 54 st %g2, [ %l7 + 0x54 ] if (fs_info->c.state == FAT_CACHE_EMPTY) 40010244: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2 40010248: 80 a0 a0 00 cmp %g2, 0 4001024c: 12 80 00 7c bne 4001043c 40010250: 01 00 00 00 nop } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 40010254: c4 0d e0 64 ldub [ %l7 + 0x64 ], %g2 40010258: c8 05 e0 24 ld [ %l7 + 0x24 ], %g4 4001025c: c6 15 e0 20 lduh [ %l7 + 0x20 ], %g3 40010260: 84 58 80 04 smul %g2, %g4, %g2 40010264: 84 00 80 03 add %g2, %g3, %g2 40010268: c4 25 e0 60 st %g2, [ %l7 + 0x60 ] /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 4001026c: 92 10 20 0c mov 0xc, %o1 40010270: 7f ff fa 66 call 4000ec08 40010274: 90 10 20 02 mov 2, %o0 40010278: d0 25 e0 80 st %o0, [ %l7 + 0x80 ] if ( fs_info->vhash == NULL ) 4001027c: 80 a2 20 00 cmp %o0, 0 40010280: 02 80 01 03 be 4001068c 40010284: 84 10 00 08 mov %o0, %g2 head->previous = NULL; 40010288: c0 22 20 04 clr [ %o0 + 4 ] return &the_chain->Tail.Node; 4001028c: ba 02 20 04 add %o0, 4, %i5 head->next = tail; 40010290: fa 22 00 00 st %i5, [ %o0 ] return &the_chain->Tail.Node; 40010294: 86 02 20 0c add %o0, 0xc, %g3 40010298: 88 02 20 10 add %o0, 0x10, %g4 tail->previous = head; 4001029c: 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)); 400102a0: 92 10 20 0c mov 0xc, %o1 head->next = tail; 400102a4: c8 20 a0 0c st %g4, [ %g2 + 0xc ] 400102a8: 90 10 20 02 mov 2, %o0 head->previous = NULL; 400102ac: c0 20 a0 10 clr [ %g2 + 0x10 ] 400102b0: 7f ff fa 56 call 4000ec08 400102b4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 400102b8: d0 25 e0 84 st %o0, [ %l7 + 0x84 ] if ( fs_info->rhash == NULL ) 400102bc: 80 a2 20 00 cmp %o0, 0 400102c0: 02 80 00 e7 be 4001065c 400102c4: 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; 400102c8: c8 0d e0 03 ldub [ %l7 + 3 ], %g4 400102cc: c6 05 e0 38 ld [ %l7 + 0x38 ], %g3 400102d0: c0 22 20 04 clr [ %o0 + 4 ] 400102d4: 87 28 c0 04 sll %g3, %g4, %g3 return &the_chain->Tail.Node; 400102d8: ba 02 20 04 add %o0, 4, %i5 400102dc: 87 28 e0 04 sll %g3, 4, %g3 head->next = tail; 400102e0: fa 22 00 00 st %i5, [ %o0 ] fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 400102e4: 88 10 21 00 mov 0x100, %g4 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 400102e8: c6 25 e0 94 st %g3, [ %l7 + 0x94 ] return &the_chain->Tail.Node; 400102ec: 86 02 20 0c add %o0, 0xc, %g3 fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 400102f0: c8 25 e0 90 st %g4, [ %l7 + 0x90 ] 400102f4: 88 02 20 10 add %o0, 0x10, %g4 fs_info->index = 0; 400102f8: c0 25 e0 8c clr [ %l7 + 0x8c ] fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 400102fc: 92 10 20 01 mov 1, %o1 tail->previous = head; 40010300: c4 20 a0 08 st %g2, [ %g2 + 8 ] 40010304: 90 10 21 00 mov 0x100, %o0 head->next = tail; 40010308: c8 20 a0 0c st %g4, [ %g2 + 0xc ] head->previous = NULL; 4001030c: c0 20 a0 10 clr [ %g2 + 0x10 ] 40010310: 7f ff fa 3e call 4000ec08 40010314: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] if ( fs_info->uino == NULL ) 40010318: 80 a2 20 00 cmp %o0, 0 4001031c: 02 80 00 b9 be 40010600 40010320: d0 25 e0 88 st %o0, [ %l7 + 0x88 ] 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)); 40010324: d0 15 c0 00 lduh [ %l7 ], %o0 40010328: 7f ff fa 38 call 4000ec08 4001032c: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 40010330: 80 a2 20 00 cmp %o0, 0 40010334: 02 80 00 ce be 4001066c 40010338: d0 25 e0 a4 st %o0, [ %l7 + 0xa4 ] return (sec_num & (vol->spc - 1)) == 0; 4001033c: c4 0d e0 04 ldub [ %l7 + 4 ], %g2 40010340: c6 05 e0 3c ld [ %l7 + 0x3c ], %g3 40010344: 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) 40010348: 80 88 80 03 btst %g2, %g3 4001034c: 12 80 00 d6 bne 400106a4 40010350: 01 00 00 00 nop && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 40010354: c6 0d e0 16 ldub [ %l7 + 0x16 ], %g3 40010358: 80 a0 e0 04 cmp %g3, 4 4001035c: 22 80 00 07 be,a 40010378 40010360: d2 05 e0 08 ld [ %l7 + 8 ], %o1 return (sec_num & (vol->spc - 1)) == 0; 40010364: c6 05 e0 28 ld [ %l7 + 0x28 ], %g3 && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 40010368: 80 88 80 03 btst %g2, %g3 4001036c: 12 80 00 ce bne 400106a4 40010370: 01 00 00 00 nop { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 40010374: d2 05 e0 08 ld [ %l7 + 8 ], %o1 40010378: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0 4001037c: 40 00 21 22 call 40018804 40010380: 94 10 20 01 mov 1, %o2 if (sc == RTEMS_SUCCESSFUL) 40010384: 80 a2 20 00 cmp %o0, 0 40010388: 12 80 00 c7 bne 400106a4 4001038c: 01 00 00 00 nop { vol->bytes_per_block = vol->bpc; 40010390: c8 05 e0 08 ld [ %l7 + 8 ], %g4 <== NOT EXECUTED vol->bytes_per_block_log2 = vol->bpc_log2; 40010394: c6 0d e0 0c ldub [ %l7 + 0xc ], %g3 <== NOT EXECUTED vol->sectors_per_block = vol->spc; 40010398: c4 0d e0 04 ldub [ %l7 + 4 ], %g2 <== NOT EXECUTED vol->bytes_per_block = vol->bpc; 4001039c: c8 25 e0 10 st %g4, [ %l7 + 0x10 ] <== NOT EXECUTED vol->bytes_per_block_log2 = vol->bpc_log2; 400103a0: c6 2d e0 14 stb %g3, [ %l7 + 0x14 ] <== NOT EXECUTED vol->sectors_per_block = vol->spc; 400103a4: c4 2d e0 0d stb %g2, [ %l7 + 0xd ] <== NOT EXECUTED 400103a8: 81 c7 e0 08 ret <== NOT EXECUTED 400103ac: 81 e8 00 00 restore if ( vol->data_cls < FAT_FAT16_MAX_CLN) 400103b0: 07 00 00 3f sethi %hi(0xfc00), %g3 400103b4: 88 10 e3 f4 or %g3, 0x3f4, %g4 ! fff4 <_ISR_Stack_size+0xeff4> 400103b8: 80 a0 80 04 cmp %g2, %g4 400103bc: 38 80 00 24 bgu,a 4001044c 400103c0: 07 03 ff ff sethi %hi(0xffffc00), %g3 vol->mask = FAT_FAT16_MASK; 400103c4: 84 10 e3 ff or %g3, 0x3ff, %g2 ! fffffff vol->type = FAT_FAT16; 400103c8: 88 10 20 02 mov 2, %g4 vol->eoc_val = FAT_FAT16_EOC; 400103cc: 86 10 e3 f8 or %g3, 0x3f8, %g3 vol->type = FAT_FAT16; 400103d0: c8 2d e0 16 stb %g4, [ %l7 + 0x16 ] 400103d4: 10 bf ff 96 b 4001022c 400103d8: c4 3d e0 18 std %g2, [ %l7 + 0x18 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 400103dc: c6 0f bf 7d ldub [ %fp + -131 ], %g3 400103e0: 87 28 e0 10 sll %g3, 0x10, %g3 400103e4: c4 0f bf 7e ldub [ %fp + -130 ], %g2 400103e8: fa 0f bf 7f ldub [ %fp + -129 ], %i5 400103ec: c2 0f bf 7b ldub [ %fp + -133 ], %g1 400103f0: 85 28 a0 08 sll %g2, 8, %g2 400103f4: 84 10 80 03 or %g2, %g3, %g2 400103f8: 87 28 60 18 sll %g1, 0x18, %g3 400103fc: 84 10 80 1d or %g2, %i5, %g2 40010400: 84 10 80 03 or %g2, %g3, %g2 40010404: 10 bf ff 7b b 400101f0 40010408: c4 25 e0 38 st %g2, [ %l7 + 0x38 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 4001040c: c4 0f bf 76 ldub [ %fp + -138 ], %g2 40010410: 85 28 a0 10 sll %g2, 0x10, %g2 40010414: e8 0f bf 77 ldub [ %fp + -137 ], %l4 40010418: c6 0f bf 7c ldub [ %fp + -132 ], %g3 4001041c: c2 0f bf 73 ldub [ %fp + -141 ], %g1 40010420: a9 2d 20 08 sll %l4, 8, %l4 40010424: a8 15 00 02 or %l4, %g2, %l4 40010428: 85 28 60 18 sll %g1, 0x18, %g2 4001042c: a8 15 00 03 or %l4, %g3, %l4 40010430: a8 15 00 02 or %l4, %g2, %l4 40010434: 10 bf ff 5e b 400101ac 40010438: e8 25 e0 24 st %l4, [ %l7 + 0x24 ] 4001043c: 7f ff fc d1 call 4000f780 40010440: 90 10 00 17 mov %l7, %o0 vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 40010444: 10 bf ff 85 b 40010258 40010448: c4 0d e0 64 ldub [ %l7 + 0x64 ], %g2 else if ( vol->data_cls < FAT_FAT32_MASK - 1 ) 4001044c: 88 10 e3 fd or %g3, 0x3fd, %g4 40010450: 80 a0 80 04 cmp %g2, %g4 40010454: 18 bf ff 1a bgu 400100bc 40010458: b8 10 e3 ff or %g3, 0x3ff, %i4 vol->eoc_val = FAT_FAT32_EOC; 4001045c: ba 10 e3 f8 or %g3, 0x3f8, %i5 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 40010460: c6 0f bf 75 ldub [ %fp + -139 ], %g3 40010464: c2 0f bf 6b ldub [ %fp + -149 ], %g1 40010468: c4 0f bf 67 ldub [ %fp + -153 ], %g2 4001046c: 87 28 e0 10 sll %g3, 0x10, %g3 40010470: c8 0f bf 74 ldub [ %fp + -140 ], %g4 40010474: 85 28 a0 08 sll %g2, 8, %g2 40010478: 84 10 80 03 or %g2, %g3, %g2 4001047c: 87 28 60 18 sll %g1, 0x18, %g3 vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 40010480: c2 0f bf 6f ldub [ %fp + -145 ], %g1 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 40010484: 84 10 80 04 or %g2, %g4, %g2 vol->eoc_val = FAT_FAT32_EOC; 40010488: f8 3d e0 18 std %i4, [ %l7 + 0x18 ] vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 4001048c: 84 10 80 03 or %g2, %g3, %g2 vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 40010490: 88 08 7f 80 and %g1, -128, %g4 vol->type = FAT_FAT32; 40010494: 86 10 20 04 mov 4, %g3 vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 40010498: c4 25 e0 44 st %g2, [ %l7 + 0x44 ] if (vol->mirror) 4001049c: 80 88 60 80 btst 0x80, %g1 vol->type = FAT_FAT32; 400104a0: c6 2d e0 16 stb %g3, [ %l7 + 0x16 ] if (vol->mirror) 400104a4: 02 80 00 44 be 400105b4 400104a8: c8 2d e0 5c stb %g4, [ %l7 + 0x5c ] vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 400104ac: c2 0f bf 6f ldub [ %fp + -145 ], %g1 <== NOT EXECUTED 400104b0: 82 08 60 0f and %g1, 0xf, %g1 <== NOT EXECUTED 400104b4: c2 2d e0 64 stb %g1, [ %l7 + 0x64 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 400104b8: c4 0f bf 65 ldub [ %fp + -155 ], %g2 400104bc: c6 0f bf 66 ldub [ %fp + -154 ], %g3 400104c0: 85 28 a0 08 sll %g2, 8, %g2 400104c4: 84 10 80 03 or %g2, %g3, %g2 400104c8: c4 35 e0 48 sth %g2, [ %l7 + 0x48 ] if( vol->info_sec == 0 ) 400104cc: 85 28 a0 10 sll %g2, 0x10, %g2 400104d0: 93 30 a0 10 srl %g2, 0x10, %o1 400104d4: 80 a2 60 00 cmp %o1, 0 400104d8: 02 bf fe f9 be 400100bc 400104dc: 96 10 20 04 mov 4, %o3 ret = _fat_block_read(fs_info, vol->info_sec , 0, 400104e0: 98 07 bf 88 add %fp, -120, %o4 400104e4: 94 10 20 00 clr %o2 400104e8: 7f ff fd 55 call 4000fa3c <_fat_block_read> 400104ec: 90 10 00 17 mov %l7, %o0 if ( ret < 0 ) 400104f0: 80 a2 20 00 cmp %o0, 0 400104f4: 06 80 00 56 bl 4001064c 400104f8: c6 0f bf 8b ldub [ %fp + -117 ], %g3 if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 400104fc: 87 28 e0 18 sll %g3, 0x18, %g3 40010500: c4 0f bf 89 ldub [ %fp + -119 ], %g2 40010504: c8 0f bf 8a ldub [ %fp + -118 ], %g4 40010508: fa 0f bf 88 ldub [ %fp + -120 ], %i5 4001050c: 85 28 a0 08 sll %g2, 8, %g2 40010510: 89 29 20 10 sll %g4, 0x10, %g4 40010514: 84 10 80 04 or %g2, %g4, %g2 40010518: 84 10 80 1d or %g2, %i5, %g2 4001051c: 84 10 80 03 or %g2, %g3, %g2 40010520: 07 10 58 54 sethi %hi(0x41615000), %g3 40010524: 86 10 e2 52 or %g3, 0x252, %g3 ! 41615252 40010528: 80 a0 80 03 cmp %g2, %g3 4001052c: 12 bf fe de bne 400100a4 40010530: 98 07 bf 88 add %fp, -120, %o4 ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 40010534: d2 15 e0 48 lduh [ %l7 + 0x48 ], %o1 40010538: 96 10 20 0c mov 0xc, %o3 4001053c: 94 10 21 e4 mov 0x1e4, %o2 40010540: 7f ff fd 3f call 4000fa3c <_fat_block_read> 40010544: 90 10 00 17 mov %l7, %o0 if ( ret < 0 ) 40010548: 80 a2 20 00 cmp %o0, 0 4001054c: 06 80 00 3a bl 40010634 40010550: c6 0f bf 8d ldub [ %fp + -115 ], %g3 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 40010554: f6 0f bf 8e ldub [ %fp + -114 ], %i3 40010558: f2 0f bf 8c ldub [ %fp + -116 ], %i1 4001055c: f8 0f bf 8f ldub [ %fp + -113 ], %i4 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 40010560: c4 0f bf 91 ldub [ %fp + -111 ], %g2 40010564: fa 0f bf 92 ldub [ %fp + -110 ], %i5 40010568: f4 0f bf 90 ldub [ %fp + -112 ], %i2 4001056c: c8 0f bf 93 ldub [ %fp + -109 ], %g4 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 40010570: 87 28 e0 08 sll %g3, 8, %g3 40010574: b7 2e e0 10 sll %i3, 0x10, %i3 40010578: b9 2f 20 18 sll %i4, 0x18, %i4 4001057c: 86 10 c0 1b or %g3, %i3, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 40010580: 85 28 a0 08 sll %g2, 8, %g2 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 40010584: 86 10 c0 19 or %g3, %i1, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 40010588: bb 2f 60 10 sll %i5, 0x10, %i5 FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 4001058c: 86 10 c0 1c or %g3, %i4, %g3 FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 40010590: 84 10 80 1d or %g2, %i5, %g2 40010594: 89 29 20 18 sll %g4, 0x18, %g4 40010598: 84 10 80 1a or %g2, %i2, %g2 vol->free_cls_in_fs_info = 4001059c: c6 25 e0 50 st %g3, [ %l7 + 0x50 ] FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 400105a0: 84 10 80 04 or %g2, %g4, %g2 vol->free_cls = vol->free_cls_in_fs_info; 400105a4: c6 25 e0 4c st %g3, [ %l7 + 0x4c ] vol->next_cl_in_fs_info = 400105a8: c4 25 e0 58 st %g2, [ %l7 + 0x58 ] 400105ac: 10 bf ff 26 b 40010244 400105b0: c4 25 e0 54 st %g2, [ %l7 + 0x54 ] vol->afat = 0; 400105b4: 10 bf ff c1 b 400104b8 400105b8: c0 2d e0 64 clrb [ %l7 + 0x64 ] close(vol->fd); 400105bc: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED 400105c0: 7f ff cd 03 call 400039cc <== NOT EXECUTED 400105c4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 400105c8: 40 00 2b ea call 4001b570 <__errno> <== NOT EXECUTED 400105cc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400105d0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 400105d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400105d8: 81 c7 e0 08 ret <== NOT EXECUTED 400105dc: 81 e8 00 00 restore <== NOT EXECUTED close(vol->fd); 400105e0: 7f ff cc fb call 400039cc <== NOT EXECUTED 400105e4: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 400105e8: 40 00 2b e2 call 4001b570 <__errno> <== NOT EXECUTED 400105ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400105f0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400105f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400105f8: 81 c7 e0 08 ret <== NOT EXECUTED 400105fc: 81 e8 00 00 restore <== NOT EXECUTED close(vol->fd); 40010600: 7f ff cc f3 call 400039cc <== NOT EXECUTED 40010604: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40010608: 7f ff cd 54 call 40003b58 <== NOT EXECUTED 4001060c: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 40010610: d0 05 e0 84 ld [ %l7 + 0x84 ], %o0 <== NOT EXECUTED free(fs_info->uino); 40010614: 7f ff cd 51 call 40003b58 <== NOT EXECUTED 40010618: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 4001061c: 40 00 2b d5 call 4001b570 <__errno> <== NOT EXECUTED 40010620: 01 00 00 00 nop <== NOT EXECUTED 40010624: 82 10 20 0c mov 0xc, %g1 ! c <_TLS_Alignment+0xb> <== NOT EXECUTED 40010628: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001062c: 81 c7 e0 08 ret <== NOT EXECUTED 40010630: 81 e8 00 00 restore <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) 40010634: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2 <== NOT EXECUTED 40010638: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001063c: 02 80 00 04 be 4001064c <== NOT EXECUTED 40010640: 01 00 00 00 nop <== NOT EXECUTED 40010644: 7f ff fc 4f call 4000f780 <== NOT EXECUTED 40010648: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED close(vol->fd); 4001064c: 7f ff cc e0 call 400039cc <== NOT EXECUTED 40010650: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED return -1; 40010654: 81 c7 e0 08 ret <== NOT EXECUTED 40010658: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED close(vol->fd); 4001065c: 7f ff cc dc call 400039cc <== NOT EXECUTED 40010660: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40010664: 10 bf ff ec b 40010614 <== NOT EXECUTED 40010668: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0 <== NOT EXECUTED close(vol->fd); 4001066c: 7f ff cc d8 call 400039cc <== NOT EXECUTED 40010670: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 40010674: 7f ff cd 39 call 40003b58 <== NOT EXECUTED 40010678: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 4001067c: 7f ff cd 37 call 40003b58 <== NOT EXECUTED 40010680: d0 05 e0 84 ld [ %l7 + 0x84 ], %o0 <== NOT EXECUTED free(fs_info->uino); 40010684: 10 bf ff e4 b 40010614 <== NOT EXECUTED 40010688: d0 05 e0 88 ld [ %l7 + 0x88 ], %o0 <== NOT EXECUTED close(vol->fd); 4001068c: 7f ff cc d0 call 400039cc <== NOT EXECUTED 40010690: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40010694: 40 00 2b b7 call 4001b570 <__errno> <== NOT EXECUTED 40010698: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001069c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400106a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400106a4: 81 c7 e0 08 ret <== NOT EXECUTED 400106a8: 81 e8 00 00 restore =============================================================================== 40011000 : { 40011000: 9d e3 bf 98 save %sp, -104, %sp uint32_t data_cls_val = fs_info->vol.data_cls + 2; 40011004: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 40011008: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 4001100c: 84 04 3f fe add %l0, -2, %g2 { 40011010: a4 10 00 18 mov %i0, %l2 if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 40011014: 80 a0 40 02 cmp %g1, %g2 40011018: 18 80 00 03 bgu 40011024 4001101c: a6 00 60 02 add %g1, 2, %l3 uint32_t cl4find = 2; 40011020: a0 10 20 02 mov 2, %l0 *cls_added = 0; 40011024: c0 26 c0 00 clr [ %i3 ] while (*cls_added != count && i < data_cls_val) 40011028: 80 a4 e0 02 cmp %l3, 2 4001102c: 18 80 00 03 bgu 40011038 40011030: 82 10 20 01 mov 1, %g1 40011034: 82 10 20 00 clr %g1 <== NOT EXECUTED 40011038: 80 88 60 ff btst 0xff, %g1 4001103c: 02 80 00 50 be 4001117c 40011040: 80 a6 a0 00 cmp %i2, 0 40011044: 02 80 00 4e be 4001117c 40011048: a2 10 20 02 mov 2, %l1 uint32_t save_cln = FAT_UNDEFINED_VALUE; 4001104c: 10 80 00 19 b 400110b0 40011050: a8 10 3f ff mov -1, %l4 rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 40011054: 94 10 3f ff mov -1, %o2 40011058: 92 10 00 10 mov %l0, %o1 4001105c: 7f ff ff 0d call 40010c90 40011060: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 40011064: b0 92 20 00 orcc %o0, 0, %i0 40011068: 12 80 00 38 bne 40011148 <== NEVER TAKEN 4001106c: 80 a7 60 00 cmp %i5, 0 if (zero_fill) 40011070: 32 80 00 38 bne,a 40011150 40011074: d6 04 a0 08 ld [ %l2 + 8 ], %o3 (*cls_added)++; 40011078: c2 06 c0 00 ld [ %i3 ], %g1 4001107c: 82 00 60 01 inc %g1 40011080: c2 26 c0 00 st %g1, [ %i3 ] 40011084: a8 10 00 10 mov %l0, %l4 cl4find++; 40011088: a0 04 20 01 inc %l0 if (cl4find >= data_cls_val) 4001108c: 80 a4 c0 10 cmp %l3, %l0 40011090: 18 80 00 03 bgu 4001109c 40011094: a2 04 60 01 inc %l1 cl4find = 2; 40011098: a0 10 20 02 mov 2, %l0 while (*cls_added != count && i < data_cls_val) 4001109c: 80 a6 80 01 cmp %i2, %g1 400110a0: 02 80 00 38 be 40011180 400110a4: 80 a4 40 13 cmp %l1, %l3 400110a8: 3a 80 00 37 bcc,a 40011184 400110ac: e8 27 00 00 st %l4, [ %i4 ] uint32_t next_cln = 0; 400110b0: c0 27 bf fc clr [ %fp + -4 ] rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 400110b4: 94 07 bf fc add %fp, -4, %o2 400110b8: 92 10 00 10 mov %l0, %o1 400110bc: 7f ff fe 7f call 40010ab8 400110c0: 90 10 00 12 mov %l2, %o0 if (*cls_added != 0) 400110c4: c2 06 c0 00 ld [ %i3 ], %g1 if ( rc != RC_OK ) 400110c8: 80 a2 20 00 cmp %o0, 0 400110cc: 12 80 00 3a bne 400111b4 400110d0: b0 10 00 08 mov %o0, %i0 if (next_cln == FAT_GENFAT_FREE) 400110d4: c4 07 bf fc ld [ %fp + -4 ], %g2 400110d8: 80 a0 a0 00 cmp %g2, 0 400110dc: 32 bf ff ec bne,a 4001108c 400110e0: a0 04 20 01 inc %l0 if (*cls_added == 0) 400110e4: 80 a0 60 00 cmp %g1, 0 400110e8: 22 bf ff db be,a 40011054 400110ec: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 400110f0: 94 10 3f ff mov -1, %o2 400110f4: 92 10 00 10 mov %l0, %o1 400110f8: 7f ff fe e6 call 40010c90 400110fc: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 40011100: b0 92 20 00 orcc %o0, 0, %i0 40011104: 12 80 00 2f bne 400111c0 40011108: 94 10 00 10 mov %l0, %o2 rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 4001110c: 92 10 00 14 mov %l4, %o1 40011110: 7f ff fe e0 call 40010c90 40011114: 90 10 00 12 mov %l2, %o0 if ( rc != RC_OK ) 40011118: b0 92 20 00 orcc %o0, 0, %i0 4001111c: 02 bf ff d5 be 40011070 40011120: 80 a7 60 00 cmp %i5, 0 fat_free_fat_clusters_chain(fs_info, (*chain)); 40011124: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40011128: 7f ff ff 7e call 40010f20 <== NOT EXECUTED 4001112c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED (void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 40011130: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011134: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011138: 7f ff fe d6 call 40010c90 <== NOT EXECUTED 4001113c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 40011140: 7f ff fa 36 call 4000fa18 <== NOT EXECUTED 40011144: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return rc; 40011148: 81 c7 e0 08 ret <== NOT EXECUTED 4001114c: 81 e8 00 00 restore <== NOT EXECUTED ssize_t bytes_written = 40011150: 98 10 20 00 clr %o4 40011154: 94 10 20 00 clr %o2 40011158: 92 10 00 10 mov %l0, %o1 4001115c: 7f ff fa 83 call 4000fb68 40011160: 90 10 00 12 mov %l2, %o0 if (fs_info->vol.bpc != bytes_written) 40011164: c2 04 a0 08 ld [ %l2 + 8 ], %g1 40011168: 80 a0 40 08 cmp %g1, %o0 4001116c: 22 bf ff c4 be,a 4001107c <== ALWAYS TAKEN 40011170: c2 06 c0 00 ld [ %i3 ], %g1 rc = -1; 40011174: 10 bf ff ec b 40011124 <== NOT EXECUTED 40011178: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED uint32_t save_cln = FAT_UNDEFINED_VALUE; 4001117c: a8 10 3f ff mov -1, %l4 <== NOT EXECUTED *last_cl = save_cln; 40011180: e8 27 00 00 st %l4, [ %i4 ] fs_info->vol.next_cl = save_cln; 40011184: e8 24 a0 54 st %l4, [ %l2 + 0x54 ] if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 40011188: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 4001118c: 80 a0 7f ff cmp %g1, -1 40011190: 02 80 00 05 be 400111a4 40011194: 90 10 00 12 mov %l2, %o0 fs_info->vol.free_cls -= (*cls_added); 40011198: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 4001119c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 400111a0: c2 24 a0 4c st %g1, [ %l2 + 0x4c ] <== NOT EXECUTED fat_buf_release(fs_info); 400111a4: 7f ff fa 1d call 4000fa18 400111a8: b0 10 20 00 clr %i0 } 400111ac: 81 c7 e0 08 ret 400111b0: 81 e8 00 00 restore if (*cls_added != 0) 400111b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400111b8: 02 80 00 05 be 400111cc <== NOT EXECUTED 400111bc: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 400111c0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 400111c4: 7f ff ff 57 call 40010f20 <== NOT EXECUTED 400111c8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return rc; 400111cc: 81 c7 e0 08 ret <== NOT EXECUTED 400111d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000fabc : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 4000fabc: 9d e3 bf 98 save %sp, -104, %sp uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 4000fac0: 80 a6 e0 00 cmp %i3, 0 4000fac4: 02 80 00 27 be 4000fb60 4000fac8: a0 10 20 00 clr %l0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 4000facc: 10 80 00 13 b 4000fb18 4000fad0: 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); 4000fad4: 94 10 20 01 mov 1, %o2 4000fad8: 96 07 bf fc add %fp, -4, %o3 4000fadc: 7f ff ff 9f call 4000f958 4000fae0: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 4000fae4: 92 07 00 10 add %i4, %l0, %o1 if (rc != RC_OK) 4000fae8: 80 a2 20 00 cmp %o0, 0 4000faec: 12 80 00 1c bne 4000fb5c 4000faf0: 94 10 00 1d mov %i5, %o2 memcpy((sec_buf + ofs), (buff + cmpltd), c); 4000faf4: d0 07 bf fc ld [ %fp + -4 ], %o0 4000faf8: 40 00 30 7a call 4001bce0 4000fafc: 90 02 00 1a add %o0, %i2, %o0 4000fb00: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ] fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 4000fb04: a0 04 00 1d add %l0, %i5, %l0 sec_num++; 4000fb08: b2 06 60 01 inc %i1 while(count > 0) 4000fb0c: b6 a6 c0 1d subcc %i3, %i5, %i3 4000fb10: 02 80 00 14 be 4000fb60 4000fb14: b4 10 20 00 clr %i2 c = MIN(count, (fs_info->vol.bps - ofs)); 4000fb18: fa 16 00 00 lduh [ %i0 ], %i5 4000fb1c: ba 27 40 1a sub %i5, %i2, %i5 4000fb20: 80 a7 40 1b cmp %i5, %i3 4000fb24: 38 80 00 02 bgu,a 4000fb2c 4000fb28: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bytes_per_block) 4000fb2c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000fb30: 80 a0 40 1d cmp %g1, %i5 4000fb34: 12 bf ff e8 bne 4000fad4 4000fb38: 92 10 00 19 mov %i1, %o1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 4000fb3c: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4000fb40: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 4000fb44: 7f ff ff 85 call 4000f958 <== NOT EXECUTED 4000fb48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memcpy((sec_buf + ofs), (buff + cmpltd), c); 4000fb4c: 92 07 00 10 add %i4, %l0, %o1 <== NOT EXECUTED if (rc != RC_OK) 4000fb50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fb54: 02 bf ff e8 be 4000faf4 <== NOT EXECUTED 4000fb58: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED return -1; 4000fb5c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 4000fb60: 81 c7 e0 08 ret 4000fb64: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 40010c90 : fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 40010c90: 9d e3 bf 98 save %sp, -104, %sp 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; 40010c94: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 40010c98: 80 a6 60 01 cmp %i1, 1 40010c9c: 08 80 00 76 bleu 40010e74 40010ca0: ba 10 00 18 mov %i0, %i5 40010ca4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40010ca8: 82 00 60 01 inc %g1 40010cac: 80 a0 40 19 cmp %g1, %i1 40010cb0: 0a 80 00 71 bcs 40010e74 40010cb4: 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) + 40010cb8: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 40010cbc: 80 88 60 01 btst 1, %g1 40010cc0: 12 80 00 24 bne 40010d50 40010cc4: b9 36 60 01 srl %i1, 1, %i4 40010cc8: 80 88 60 02 btst 2, %g1 40010ccc: 02 80 00 03 be 40010cd8 40010cd0: a3 2e 60 02 sll %i1, 2, %l1 40010cd4: a3 2e 60 01 sll %i1, 1, %l1 40010cd8: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 40010cdc: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 40010ce0: b7 34 40 1b srl %l1, %i3, %i3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010ce4: f8 17 40 00 lduh [ %i5 ], %i4 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 40010ce8: b6 06 c0 01 add %i3, %g1, %i3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 40010cec: 94 10 20 01 mov 1, %o2 40010cf0: 96 07 bf fc add %fp, -4, %o3 40010cf4: 92 10 00 1b mov %i3, %o1 40010cf8: 7f ff fb 18 call 4000f958 40010cfc: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40010d00: b0 92 20 00 orcc %o0, 0, %i0 40010d04: 12 80 00 11 bne 40010d48 40010d08: b9 2f 20 10 sll %i4, 0x10, %i4 return rc; switch ( fs_info->vol.type ) 40010d0c: e4 0f 60 16 ldub [ %i5 + 0x16 ], %l2 40010d10: 80 a4 a0 02 cmp %l2, 2 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 40010d14: b9 37 20 10 srl %i4, 0x10, %i4 40010d18: b8 07 3f ff add %i4, -1, %i4 switch ( fs_info->vol.type ) 40010d1c: 02 80 00 35 be 40010df0 40010d20: b8 0f 00 11 and %i4, %l1, %i4 40010d24: 80 a4 a0 04 cmp %l2, 4 40010d28: 02 80 00 26 be 40010dc0 40010d2c: 80 a4 a0 01 cmp %l2, 1 40010d30: 02 80 00 0a be 40010d58 40010d34: 80 8e 60 01 btst 1, %i1 fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 40010d38: 40 00 2a 0e call 4001b570 <__errno> <== NOT EXECUTED 40010d3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40010d40: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40010d44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 40010d48: 81 c7 e0 08 ret <== NOT EXECUTED 40010d4c: 81 e8 00 00 restore <== NOT EXECUTED 40010d50: 10 bf ff e2 b 40010cd8 40010d54: a2 07 00 19 add %i4, %i1, %l1 if ( FAT_CLUSTER_IS_ODD(cln) ) 40010d58: 02 80 00 30 be 40010e18 40010d5c: c2 07 bf fc ld [ %fp + -4 ], %g1 *(sec_buf + ofs) &= 0x0F; 40010d60: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 40010d64: 84 08 a0 0f and %g2, 0xf, %g2 40010d68: c4 28 40 1c stb %g2, [ %g1 + %i4 ] fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 40010d6c: 83 2e a0 04 sll %i2, 4, %g1 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 40010d70: c4 07 bf fc ld [ %fp + -4 ], %g2 40010d74: c6 08 80 1c ldub [ %g2 + %i4 ], %g3 40010d78: 82 10 40 03 or %g1, %g3, %g1 40010d7c: c2 28 80 1c stb %g1, [ %g2 + %i4 ] fs_info->c.modified = true; 40010d80: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ] if ( ofs == (fs_info->vol.bps - 1) ) 40010d84: c2 17 40 00 lduh [ %i5 ], %g1 40010d88: 82 00 7f ff add %g1, -1, %g1 40010d8c: 80 a0 40 1c cmp %g1, %i4 40010d90: 02 80 00 52 be 40010ed8 40010d94: c2 07 bf fc ld [ %fp + -4 ], %g1 *(sec_buf + ofs + 1) &= 0x00; 40010d98: b8 07 20 01 inc %i4 40010d9c: c0 28 40 1c clrb [ %g1 + %i4 ] *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 40010da0: 83 2e a0 14 sll %i2, 0x14, %g1 40010da4: c4 07 bf fc ld [ %fp + -4 ], %g2 40010da8: c6 08 80 1c ldub [ %g2 + %i4 ], %g3 40010dac: 83 30 60 18 srl %g1, 0x18, %g1 40010db0: 82 10 40 03 or %g1, %g3, %g1 40010db4: c2 28 80 1c stb %g1, [ %g2 + %i4 ] 40010db8: 81 c7 e0 08 ret 40010dbc: 81 e8 00 00 restore fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 40010dc0: 11 3c 00 00 sethi %hi(0xf0000000), %o0 40010dc4: 40 00 26 e5 call 4001a958 <__bswapsi2> 40010dc8: 90 2e 80 08 andn %i2, %o0, %o0 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 40010dcc: c4 07 bf fc ld [ %fp + -4 ], %g2 40010dd0: c2 00 80 1c ld [ %g2 + %i4 ], %g1 40010dd4: 82 08 60 f0 and %g1, 0xf0, %g1 *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 40010dd8: 90 10 40 08 or %g1, %o0, %o0 40010ddc: d0 20 80 1c st %o0, [ %g2 + %i4 ] 40010de0: 82 10 20 01 mov 1, %g1 40010de4: c2 2f 60 9c stb %g1, [ %i5 + 0x9c ] 40010de8: 81 c7 e0 08 ret 40010dec: 81 e8 00 00 restore (uint16_t )(CT_LE_W(in_val)); 40010df0: 83 2e a0 08 sll %i2, 8, %g1 40010df4: b5 2e a0 10 sll %i2, 0x10, %i2 40010df8: b5 36 a0 18 srl %i2, 0x18, %i2 40010dfc: b4 10 40 1a or %g1, %i2, %i2 *((uint16_t *)(sec_buf + ofs)) = 40010e00: c2 07 bf fc ld [ %fp + -4 ], %g1 40010e04: f4 30 40 1c sth %i2, [ %g1 + %i4 ] 40010e08: 82 10 20 01 mov 1, %g1 40010e0c: c2 2f 60 9c stb %g1, [ %i5 + 0x9c ] 40010e10: 81 c7 e0 08 ret 40010e14: 81 e8 00 00 restore *(sec_buf + ofs) &= 0x00; 40010e18: c0 28 40 1c clrb [ %g1 + %i4 ] fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 40010e1c: b4 0e af ff and %i2, 0xfff, %i2 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 40010e20: c4 07 bf fc ld [ %fp + -4 ], %g2 40010e24: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 40010e28: 82 16 80 01 or %i2, %g1, %g1 40010e2c: c2 28 80 1c stb %g1, [ %g2 + %i4 ] 40010e30: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ] if ( ofs == (fs_info->vol.bps - 1) ) 40010e34: c2 17 40 00 lduh [ %i5 ], %g1 40010e38: 82 00 7f ff add %g1, -1, %g1 40010e3c: 80 a0 40 1c cmp %g1, %i4 40010e40: 02 80 00 13 be 40010e8c 40010e44: c4 07 bf fc ld [ %fp + -4 ], %g2 *(sec_buf + ofs + 1) &= 0xF0; 40010e48: b8 07 20 01 inc %i4 40010e4c: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 40010e50: 82 08 7f f0 and %g1, -16, %g1 40010e54: c2 28 80 1c stb %g1, [ %g2 + %i4 ] *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 40010e58: b5 36 a0 08 srl %i2, 8, %i2 40010e5c: c2 07 bf fc ld [ %fp + -4 ], %g1 40010e60: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 40010e64: b4 16 80 02 or %i2, %g2, %i2 40010e68: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 40010e6c: 81 c7 e0 08 ret 40010e70: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one(EIO); 40010e74: 40 00 29 bf call 4001b570 <__errno> <== NOT EXECUTED 40010e78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40010e7c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40010e80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40010e84: 81 c7 e0 08 ret <== NOT EXECUTED 40010e88: 81 e8 00 00 restore <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40010e8c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 40010e90: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40010e94: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 40010e98: 7f ff fa b0 call 4000f958 <== NOT EXECUTED 40010e9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rc != RC_OK) 40010ea0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40010ea4: 12 bf ff a9 bne 40010d48 <== NOT EXECUTED 40010ea8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED *sec_buf &= 0xF0; 40010eac: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 40010eb0: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED 40010eb4: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 40010eb8: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED 40010ebc: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 40010ec0: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 40010ec4: 82 16 80 01 or %i2, %g1, %g1 <== NOT EXECUTED 40010ec8: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED 40010ecc: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ] <== NOT EXECUTED 40010ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40010ed4: 81 e8 00 00 restore <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 40010ed8: 96 07 bf fc add %fp, -4, %o3 40010edc: 94 10 20 01 mov 1, %o2 40010ee0: 92 06 e0 01 add %i3, 1, %o1 40010ee4: 7f ff fa 9d call 4000f958 40010ee8: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 40010eec: b0 92 20 00 orcc %o0, 0, %i0 40010ef0: 12 bf ff 96 bne 40010d48 40010ef4: c2 07 bf fc ld [ %fp + -4 ], %g1 *sec_buf &= 0x00; 40010ef8: c0 28 40 00 clrb [ %g1 ] *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 40010efc: 83 2e a0 14 sll %i2, 0x14, %g1 40010f00: c4 07 bf fc ld [ %fp + -4 ], %g2 40010f04: c6 08 80 00 ldub [ %g2 ], %g3 40010f08: 83 30 60 18 srl %g1, 0x18, %g1 40010f0c: 82 10 40 03 or %g1, %g3, %g1 40010f10: c2 28 80 00 stb %g1, [ %g2 ] 40010f14: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ] 40010f18: 81 c7 e0 08 ret 40010f1c: 81 e8 00 00 restore =============================================================================== 400107b8 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 400107b8: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 400107bc: 7f ff ff bc call 400106ac 400107c0: 90 10 00 18 mov %i0, %o0 rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 400107c4: fa 06 20 80 ld [ %i0 + 0x80 ], %i5 if ( rc != RC_OK ) 400107c8: 80 a0 00 08 cmp %g0, %o0 rc = fat_sync(fs_info); 400107cc: b4 10 00 08 mov %o0, %i2 return _Chain_Immutable_head( the_chain )->next; 400107d0: d0 07 40 00 ld [ %i5 ], %o0 { 400107d4: b8 10 00 18 mov %i0, %i4 return &the_chain->Tail.Node; 400107d8: b6 07 60 04 add %i5, 4, %i3 if ( rc != RC_OK ) 400107dc: b0 60 20 00 subx %g0, 0, %i0 if ( !_Chain_Is_empty(the_chain)) 400107e0: 80 a6 c0 08 cmp %i3, %o0 400107e4: 22 80 00 0c be,a 40010814 400107e8: d0 07 60 0c ld [ %i5 + 0xc ], %o0 new_first = old_first->next; 400107ec: c2 02 00 00 ld [ %o0 ], %g1 head->next = new_first; 400107f0: c2 27 40 00 st %g1, [ %i5 ] while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 400107f4: 7f ff cc d9 call 40003b58 400107f8: fa 20 60 04 st %i5, [ %g1 + 4 ] return _Chain_Immutable_head( the_chain )->next; 400107fc: d0 07 40 00 ld [ %i5 ], %o0 if ( !_Chain_Is_empty(the_chain)) 40010800: 80 a6 c0 08 cmp %i3, %o0 40010804: 32 bf ff fb bne,a 400107f0 40010808: c2 02 00 00 ld [ %o0 ], %g1 4001080c: fa 07 20 80 ld [ %i4 + 0x80 ], %i5 return _Chain_Immutable_head( the_chain )->next; 40010810: d0 07 60 0c ld [ %i5 + 0xc ], %o0 return &the_chain->Tail.Node; 40010814: b6 07 60 10 add %i5, 0x10, %i3 if ( !_Chain_Is_empty(the_chain)) 40010818: 80 a2 00 1b cmp %o0, %i3 4001081c: 02 80 00 0a be 40010844 40010820: b2 07 60 0c add %i5, 0xc, %i1 new_first = old_first->next; 40010824: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 40010828: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED 4001082c: 7f ff cc cb call 40003b58 <== NOT EXECUTED 40010830: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40010834: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40010838: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED 4001083c: 32 bf ff fb bne,a 40010828 <== NOT EXECUTED 40010840: 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; 40010844: fa 07 20 84 ld [ %i4 + 0x84 ], %i5 return _Chain_Immutable_head( the_chain )->next; 40010848: d0 07 40 00 ld [ %i5 ], %o0 return &the_chain->Tail.Node; 4001084c: b6 07 60 04 add %i5, 4, %i3 if ( !_Chain_Is_empty(the_chain)) 40010850: 80 a6 c0 08 cmp %i3, %o0 40010854: 22 80 00 0c be,a 40010884 <== ALWAYS TAKEN 40010858: d0 07 60 0c ld [ %i5 + 0xc ], %o0 new_first = old_first->next; 4001085c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 40010860: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 40010864: 7f ff cc bd call 40003b58 <== NOT EXECUTED 40010868: fa 20 60 04 st %i5, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 4001086c: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40010870: 80 a2 00 1b cmp %o0, %i3 <== NOT EXECUTED 40010874: 32 bf ff fb bne,a 40010860 <== NOT EXECUTED 40010878: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001087c: fa 07 20 84 ld [ %i4 + 0x84 ], %i5 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40010880: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED return &the_chain->Tail.Node; 40010884: b6 07 60 10 add %i5, 0x10, %i3 if ( !_Chain_Is_empty(the_chain)) 40010888: 80 a6 c0 08 cmp %i3, %o0 4001088c: 02 80 00 0a be 400108b4 40010890: b2 07 60 0c add %i5, 0xc, %i1 new_first = old_first->next; 40010894: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED head->next = new_first; 40010898: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED 4001089c: 7f ff cc af call 40003b58 <== NOT EXECUTED 400108a0: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 400108a4: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 400108a8: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED 400108ac: 32 bf ff fb bne,a 40010898 <== NOT EXECUTED 400108b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED } free(fs_info->vhash); 400108b4: 7f ff cc a9 call 40003b58 400108b8: d0 07 20 80 ld [ %i4 + 0x80 ], %o0 free(fs_info->rhash); 400108bc: 7f ff cc a7 call 40003b58 400108c0: d0 07 20 84 ld [ %i4 + 0x84 ], %o0 free(fs_info->uino); 400108c4: 7f ff cc a5 call 40003b58 400108c8: d0 07 20 88 ld [ %i4 + 0x88 ], %o0 free(fs_info->sec_buf); 400108cc: 7f ff cc a3 call 40003b58 400108d0: d0 07 20 a4 ld [ %i4 + 0xa4 ], %o0 close(fs_info->vol.fd); 400108d4: 7f ff cc 3e call 400039cc 400108d8: d0 07 20 68 ld [ %i4 + 0x68 ], %o0 if (rc) 400108dc: 80 a6 a0 00 cmp %i2, 0 400108e0: 12 80 00 04 bne 400108f0 400108e4: 01 00 00 00 nop errno = EIO; return rc; } 400108e8: 81 c7 e0 08 ret <== NOT EXECUTED 400108ec: 81 e8 00 00 restore errno = EIO; 400108f0: 40 00 2b 20 call 4001b570 <__errno> <== NOT EXECUTED 400108f4: 01 00 00 00 nop <== NOT EXECUTED 400108f8: 82 10 20 05 mov 5, %g1 ! 5 <_TLS_Alignment+0x4> <== NOT EXECUTED 400108fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40010900: 81 c7 e0 08 ret <== NOT EXECUTED 40010904: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400106ac : return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 400106ac: 9d e3 bf 98 save %sp, -104, %sp if (fs_info->vol.type == FAT_FAT32) 400106b0: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1 { 400106b4: ba 10 00 18 mov %i0, %i5 if (fs_info->vol.type == FAT_FAT32) 400106b8: 80 a0 60 04 cmp %g1, 4 400106bc: 02 80 00 0d be 400106f0 400106c0: b0 10 20 00 clr %i0 if (fs_info->c.state == FAT_CACHE_EMPTY) 400106c4: c2 0f 60 9d ldub [ %i5 + 0x9d ], %g1 400106c8: 80 a0 60 00 cmp %g1, 0 400106cc: 12 80 00 18 bne 4001072c 400106d0: 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) 400106d4: 40 00 20 29 call 40018778 400106d8: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 400106dc: 80 a2 20 00 cmp %o0, 0 400106e0: 12 80 00 34 bne 400107b0 400106e4: 01 00 00 00 nop rc = -1; return rc; } 400106e8: 81 c7 e0 08 ret <== NOT EXECUTED 400106ec: 81 e8 00 00 restore uint32_t free_count = fs_info->vol.free_cls; 400106f0: f6 07 60 4c ld [ %i5 + 0x4c ], %i3 if (free_count != fs_info->vol.free_cls_in_fs_info) 400106f4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 400106f8: 80 a6 c0 01 cmp %i3, %g1 400106fc: 12 80 00 1e bne 40010774 40010700: f8 07 60 54 ld [ %i5 + 0x54 ], %i4 if (next_free != fs_info->vol.next_cl_in_fs_info) 40010704: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 40010708: 80 a7 00 01 cmp %i4, %g1 4001070c: 12 80 00 0b bne 40010738 40010710: 01 00 00 00 nop if ( (ret1 < 0) || (ret2 < 0) ) 40010714: b0 0e 20 ff and %i0, 0xff, %i0 40010718: b0 20 00 18 neg %i0 if (fs_info->c.state == FAT_CACHE_EMPTY) 4001071c: c2 0f 60 9d ldub [ %i5 + 0x9d ], %g1 40010720: 80 a0 60 00 cmp %g1, 0 40010724: 02 bf ff ec be 400106d4 40010728: 01 00 00 00 nop 4001072c: 7f ff fc 15 call 4000f780 40010730: 90 10 00 1d mov %i5, %o0 40010734: 30 bf ff e8 b,a 400106d4 uint32_t le_next_free = CT_LE_L(next_free); 40010738: 40 00 28 88 call 4001a958 <__bswapsi2> 4001073c: 90 10 00 1c mov %i4, %o0 fs_info->vol.next_cl_in_fs_info = next_free; 40010740: f8 27 60 58 st %i4, [ %i5 + 0x58 ] ret2 = fat_sector_write(fs_info, 40010744: 98 07 bf fc add %fp, -4, %o4 40010748: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1 uint32_t le_next_free = CT_LE_L(next_free); 4001074c: d0 27 bf fc st %o0, [ %fp + -4 ] ret2 = fat_sector_write(fs_info, 40010750: 96 10 20 04 mov 4, %o3 40010754: 94 10 21 ec mov 0x1ec, %o2 40010758: 7f ff fc d9 call 4000fabc 4001075c: 90 10 00 1d mov %i5, %o0 40010760: 91 32 20 1f srl %o0, 0x1f, %o0 40010764: b0 12 00 18 or %o0, %i0, %i0 if ( (ret1 < 0) || (ret2 < 0) ) 40010768: b0 0e 20 ff and %i0, 0xff, %i0 4001076c: 10 bf ff ec b 4001071c 40010770: b0 20 00 18 neg %i0 uint32_t le_free_count = CT_LE_L(free_count); 40010774: 40 00 28 79 call 4001a958 <__bswapsi2> <== NOT EXECUTED 40010778: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; 4001077c: f6 27 60 50 st %i3, [ %i5 + 0x50 ] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 40010780: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 40010784: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1 <== NOT EXECUTED uint32_t le_free_count = CT_LE_L(free_count); 40010788: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 4001078c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 40010790: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 40010794: 7f ff fc ca call 4000fabc <== NOT EXECUTED 40010798: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) 4001079c: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 <== NOT EXECUTED 400107a0: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED 400107a4: 02 bf ff dc be 40010714 <== NOT EXECUTED 400107a8: b1 32 20 1f srl %o0, 0x1f, %i0 <== NOT EXECUTED 400107ac: 30 bf ff e3 b,a 40010738 <== NOT EXECUTED } 400107b0: 81 c7 e0 08 ret <== NOT EXECUTED 400107b4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40012238 : fat_file_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 40012238: 9d e3 bf 00 save %sp, -256, %sp int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 4001223c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40012240: e0 00 60 08 ld [ %g1 + 8 ], %l0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 40012244: c0 27 bf 6c clr [ %fp + -148 ] dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 40012248: 82 10 3f ff mov -1, %g1 time_t now; uint16_t time_val = 0; 4001224c: c0 37 bf 68 clrh [ %fp + -152 ] 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) { 40012250: 80 a6 e1 04 cmp %i3, 0x104 uint16_t date = 0; 40012254: c0 37 bf 6a clrh [ %fp + -150 ] memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 40012258: c0 27 bf 80 clr [ %fp + -128 ] 4001225c: c0 27 bf 84 clr [ %fp + -124 ] dir_pos->sname.cln = 0; 40012260: c0 27 bf 70 clr [ %fp + -144 ] 40012264: c0 27 bf 88 clr [ %fp + -120 ] 40012268: c0 27 bf 8c clr [ %fp + -116 ] dir_pos->sname.ofs = 0; 4001226c: c0 27 bf 74 clr [ %fp + -140 ] 40012270: c0 27 bf 90 clr [ %fp + -112 ] 40012274: c0 27 bf 94 clr [ %fp + -108 ] dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 40012278: c2 27 bf 78 st %g1, [ %fp + -136 ] 4001227c: c0 27 bf 98 clr [ %fp + -104 ] 40012280: c0 27 bf 9c clr [ %fp + -100 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 40012284: c2 27 bf 7c st %g1, [ %fp + -132 ] memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 40012288: c0 27 bf c0 clr [ %fp + -64 ] 4001228c: c0 27 bf c4 clr [ %fp + -60 ] 40012290: c0 27 bf c8 clr [ %fp + -56 ] 40012294: c0 27 bf cc clr [ %fp + -52 ] 40012298: c0 27 bf d0 clr [ %fp + -48 ] 4001229c: c0 27 bf d4 clr [ %fp + -44 ] 400122a0: c0 27 bf d8 clr [ %fp + -40 ] 400122a4: c0 27 bf dc clr [ %fp + -36 ] 400122a8: c0 27 bf e0 clr [ %fp + -32 ] 400122ac: c0 27 bf e4 clr [ %fp + -28 ] 400122b0: c0 27 bf e8 clr [ %fp + -24 ] 400122b4: c0 27 bf ec clr [ %fp + -20 ] 400122b8: c0 27 bf f0 clr [ %fp + -16 ] 400122bc: c0 27 bf f4 clr [ %fp + -12 ] 400122c0: c0 27 bf f8 clr [ %fp + -8 ] 400122c4: c0 27 bf fc clr [ %fp + -4 ] if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 400122c8: 14 80 00 e5 bg 4001265c 400122cc: 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, 400122d0: d0 04 20 cc ld [ %l0 + 0xcc ], %o0 400122d4: 98 10 20 0b mov 0xb, %o4 400122d8: 96 07 bf 80 add %fp, -128, %o3 400122dc: 94 10 00 1b mov %i3, %o2 400122e0: 40 00 01 c1 call 400129e4 400122e4: 92 10 00 1a mov %i2, %o1 name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 400122e8: a6 92 20 00 orcc %o0, 0, %l3 400122ec: 02 80 00 e1 be 40012670 400122f0: 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; 400122f4: c0 2f bf 8c clrb [ %fp + -116 ] /* set up last write date and time */ now = time(NULL); 400122f8: 40 00 35 c8 call 4001fa18