=============================================================================== 0010ca88 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 10ca88: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 10ca8c: 461e mov r6, r3 { 10ca8e: b083 sub sp, #12 while (count > 0) 10ca90: 2b00 cmp r3, #0 10ca92: d044 beq.n 10cb1e <_fat_block_read+0x96> <== ALWAYS TAKEN 10ca94: 4605 mov r5, r0 10ca96: 4689 mov r9, r1 10ca98: 4617 mov r7, r2 ssize_t cmpltd = 0; 10ca9a: f04f 0800 mov.w r8, #0 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 10ca9e: f100 0aa0 add.w sl, r0, #160 ; 0xa0 fs_info->c.modified = 0; 10caa2: f44f 7b80 mov.w fp, #256 ; 0x100 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10caa6: f895 e002 ldrb.w lr, [r5, #2] 10caaa: 4628 mov r0, r5 10caac: 7d2a ldrb r2, [r5, #20] if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 10caae: f895 309d ldrb.w r3, [r5, #157] ; 0x9d 10cab2: eba2 020e sub.w r2, r2, lr 10cab6: fa29 f102 lsr.w r1, r9, r2 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10caba: fa01 f402 lsl.w r4, r1, r2 ((sector - 10cabe: eba9 0404 sub.w r4, r9, r4 << fs_info->vol.sec_log2); 10cac2: fa04 f40e lsl.w r4, r4, lr 10cac6: b13b cbz r3, 10cad8 <_fat_block_read+0x50> 10cac8: f8d5 2098 ldr.w r2, [r5, #152] ; 0x98 10cacc: 9101 str r1, [sp, #4] 10cace: 454a cmp r2, r9 10cad0: d00b beq.n 10caea <_fat_block_read+0x62> 10cad2: f7ff ff07 bl 10c8e4 10cad6: 9901 ldr r1, [sp, #4] sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 10cad8: 6ee8 ldr r0, [r5, #108] ; 0x6c 10cada: 4652 mov r2, sl 10cadc: f005 fae8 bl 1120b0 if (sc != RTEMS_SUCCESSFUL) 10cae0: b9f8 cbnz r0, 10cb22 <_fat_block_read+0x9a> fs_info->c.blk_num = sec_num; 10cae2: f8c5 9098 str.w r9, [r5, #152] ; 0x98 fs_info->c.modified = 0; 10cae6: f8a5 b09c strh.w fp, [r5, #156] ; 0x9c 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)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 10caea: 9b0c ldr r3, [sp, #48] ; 0x30 10caec: 19e1 adds r1, r4, r7 c = MIN(count, (fs_info->vol.bps - ofs)); 10caee: 882a ldrh r2, [r5, #0] count -= c; cmpltd += c; sec_num++; 10caf0: f109 0901 add.w r9, r9, #1 memcpy((buff + cmpltd), (sec_buf + ofs), c); 10caf4: eb03 0008 add.w r0, r3, r8 10caf8: f8d5 30a0 ldr.w r3, [r5, #160] ; 0xa0 c = MIN(count, (fs_info->vol.bps - ofs)); 10cafc: 1bd4 subs r4, r2, r7 ofs = 0; 10cafe: 2700 movs r7, #0 c = MIN(count, (fs_info->vol.bps - ofs)); 10cb00: 42b4 cmp r4, r6 memcpy((buff + cmpltd), (sec_buf + ofs), c); 10cb02: 69db ldr r3, [r3, #28] c = MIN(count, (fs_info->vol.bps - ofs)); 10cb04: bf28 it cs 10cb06: 4634 movcs r4, r6 memcpy((buff + cmpltd), (sec_buf + ofs), c); 10cb08: 4622 mov r2, r4 cmpltd += c; 10cb0a: 44a0 add r8, r4 memcpy((buff + cmpltd), (sec_buf + ofs), c); 10cb0c: 4419 add r1, r3 10cb0e: f008 eb78 blx 115200 while (count > 0) 10cb12: 1b36 subs r6, r6, r4 10cb14: d1c7 bne.n 10caa6 <_fat_block_read+0x1e> } return cmpltd; } 10cb16: 4640 mov r0, r8 10cb18: b003 add sp, #12 10cb1a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} ssize_t cmpltd = 0; 10cb1e: 4698 mov r8, r3 <== NOT EXECUTED 10cb20: e7f9 b.n 10cb16 <_fat_block_read+0x8e> <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 10cb22: f008 f8ad bl 114c80 <__errno> <== NOT EXECUTED 10cb26: 2305 movs r3, #5 <== NOT EXECUTED return -1; 10cb28: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 10cb2c: 6003 str r3, [r0, #0] <== NOT EXECUTED if (rc != RC_OK) 10cb2e: e7f2 b.n 10cb16 <_fat_block_read+0x8e> <== NOT EXECUTED =============================================================================== 0010c9f8 : { 10c9f8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 10c9fc: 461f mov r7, r3 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10c9fe: 7884 ldrb r4, [r0, #2] 10ca00: 4605 mov r5, r0 10ca02: 460e mov r6, r1 10ca04: 4690 mov r8, r2 10ca06: f890 c014 ldrb.w ip, [r0, #20] if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 10ca0a: f890 309d ldrb.w r3, [r0, #157] ; 0x9d 10ca0e: ebac 0c04 sub.w ip, ip, r4 10ca12: fa21 f90c lsr.w r9, r1, ip return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10ca16: fa09 fc0c lsl.w ip, r9, ip ((sector - 10ca1a: eba1 0c0c sub.w ip, r1, ip << fs_info->vol.sec_log2); 10ca1e: fa0c f404 lsl.w r4, ip, r4 10ca22: b12b cbz r3, 10ca30 10ca24: f8d0 3098 ldr.w r3, [r0, #152] ; 0x98 10ca28: 428b cmp r3, r1 10ca2a: d011 beq.n 10ca50 if (fs_info->c.state == FAT_CACHE_EMPTY) 10ca2c: f7ff ff5a bl 10c8e4 if (op_type == FAT_OP_TYPE_READ) 10ca30: f1b8 0f01 cmp.w r8, #1 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 10ca34: 6ee8 ldr r0, [r5, #108] ; 0x6c 10ca36: f105 02a0 add.w r2, r5, #160 ; 0xa0 10ca3a: 4649 mov r1, r9 if (op_type == FAT_OP_TYPE_READ) 10ca3c: d010 beq.n 10ca60 sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 10ca3e: f005 faf9 bl 112034 if (sc != RTEMS_SUCCESSFUL) 10ca42: b980 cbnz r0, 10ca66 fs_info->c.modified = 0; 10ca44: f44f 7380 mov.w r3, #256 ; 0x100 fs_info->c.blk_num = sec_num; 10ca48: f8c5 6098 str.w r6, [r5, #152] ; 0x98 fs_info->c.modified = 0; 10ca4c: f8a5 309c strh.w r3, [r5, #156] ; 0x9c *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 10ca50: f8d5 30a0 ldr.w r3, [r5, #160] ; 0xa0 return RC_OK; 10ca54: 2000 movs r0, #0 *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 10ca56: 69db ldr r3, [r3, #28] 10ca58: 441c add r4, r3 10ca5a: 603c str r4, [r7, #0] } 10ca5c: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 10ca60: f005 fb26 bl 1120b0 10ca64: e7ed b.n 10ca42 rtems_set_errno_and_return_minus_one(EIO); 10ca66: f008 f90b bl 114c80 <__errno> <== NOT EXECUTED 10ca6a: 2205 movs r2, #5 <== NOT EXECUTED 10ca6c: 4603 mov r3, r0 <== NOT EXECUTED 10ca6e: 601a str r2, [r3, #0] <== NOT EXECUTED 10ca70: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10ca74: e7f2 b.n 10ca5c <== NOT EXECUTED 10ca76: bf00 nop =============================================================================== 0010c8e4 : rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; if (fs_info->c.modified) 10c8e4: f890 309c ldrb.w r3, [r0, #156] ; 0x9c <== NOT EXECUTED fat_buf_release(fat_fs_info_t *fs_info) 10c8e8: b5f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 10c8ea: 4604 mov r4, r0 <== NOT EXECUTED 10c8ec: b083 sub sp, #12 <== NOT EXECUTED sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, 10c8ee: f8d0 00a0 ldr.w r0, [r0, #160] ; 0xa0 <== NOT EXECUTED if (fs_info->c.modified) 10c8f2: 2b00 cmp r3, #0 <== NOT EXECUTED 10c8f4: d055 beq.n 10c9a2 <== NOT EXECUTED uint32_t sec_num = fs_info->c.blk_num; 10c8f6: f8d4 3098 ldr.w r3, [r4, #152] ; 0x98 <== NOT EXECUTED bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 10c8fa: 8c22 ldrh r2, [r4, #32] <== NOT EXECUTED 10c8fc: 4293 cmp r3, r2 <== NOT EXECUTED 10c8fe: d20b bcs.n 10c918 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 10c900: f005 fcb4 bl 11226c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10c904: 2800 cmp r0, #0 <== NOT EXECUTED 10c906: d150 bne.n 10c9aa <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 10c908: f884 009c strb.w r0, [r4, #156] ; 0x9c <== NOT EXECUTED { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 10c90c: 2300 movs r3, #0 <== NOT EXECUTED return RC_OK; 10c90e: 4618 mov r0, r3 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 10c910: f884 309d strb.w r3, [r4, #157] ; 0x9d <== NOT EXECUTED } 10c914: b003 add sp, #12 <== NOT EXECUTED 10c916: bdf0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 10c918: 6aa2 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 10c91a: 4293 cmp r3, r2 <== NOT EXECUTED 10c91c: d2f0 bcs.n 10c900 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 10c91e: f894 205c ldrb.w r2, [r4, #92] ; 0x5c <== NOT EXECUTED 10c922: 2a00 cmp r2, #0 <== NOT EXECUTED 10c924: d04c beq.n 10c9c0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 10c926: f005 fca1 bl 11226c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10c92a: 2800 cmp r0, #0 <== NOT EXECUTED 10c92c: d13d bne.n 10c9aa <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 10c92e: f894 305c ldrb.w r3, [r4, #92] ; 0x5c <== NOT EXECUTED fs_info->c.modified = 0; 10c932: f884 009c strb.w r0, [r4, #156] ; 0x9c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 10c936: 2b00 cmp r3, #0 <== NOT EXECUTED 10c938: d1e8 bne.n 10c90c <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) 10c93a: 7d63 ldrb r3, [r4, #21] <== NOT EXECUTED 10c93c: 2b01 cmp r3, #1 <== NOT EXECUTED 10c93e: bf88 it hi <== NOT EXECUTED 10c940: 2601 movhi r6, #1 <== NOT EXECUTED 10c942: d9e3 bls.n 10c90c <== NOT EXECUTED sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 10c944: 6a60 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 10c946: aa01 add r2, sp, #4 <== NOT EXECUTED sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 10c948: f8d4 3098 ldr.w r3, [r4, #152] ; 0x98 <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10c94c: 78a5 ldrb r5, [r4, #2] <== NOT EXECUTED 10c94e: 7d21 ldrb r1, [r4, #20] <== NOT EXECUTED sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 10c950: 6ee7 ldr r7, [r4, #108] ; 0x6c <== NOT EXECUTED sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 10c952: fb00 3306 mla r3, r0, r6, r3 <== NOT EXECUTED 10c956: 1b49 subs r1, r1, r5 <== NOT EXECUTED 10c958: fa23 fc01 lsr.w ip, r3, r1 <== NOT EXECUTED return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10c95c: fa0c f001 lsl.w r0, ip, r1 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 10c960: 4661 mov r1, ip <== NOT EXECUTED fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 10c962: 1a1b subs r3, r3, r0 <== NOT EXECUTED 10c964: 4638 mov r0, r7 <== NOT EXECUTED if (blk_ofs == 0 10c966: fa13 f505 lsls.w r5, r3, r5 <== NOT EXECUTED 10c96a: d104 bne.n 10c976 <== NOT EXECUTED && fs_info->vol.bps == fs_info->vol.bytes_per_block) 10c96c: f8b4 e000 ldrh.w lr, [r4] <== NOT EXECUTED 10c970: 6923 ldr r3, [r4, #16] <== NOT EXECUTED 10c972: 459e cmp lr, r3 <== NOT EXECUTED 10c974: d021 beq.n 10c9ba <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 10c976: f005 fb9b bl 1120b0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 10c97a: 2800 cmp r0, #0 <== NOT EXECUTED 10c97c: d133 bne.n 10c9e6 <== NOT EXECUTED memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 10c97e: 9b01 ldr r3, [sp, #4] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) 10c980: 3601 adds r6, #1 <== NOT EXECUTED memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 10c982: 8822 ldrh r2, [r4, #0] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) 10c984: b2f6 uxtb r6, r6 <== NOT EXECUTED memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 10c986: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 <== NOT EXECUTED 10c98a: 69d8 ldr r0, [r3, #28] <== NOT EXECUTED 10c98c: 4428 add r0, r5 <== NOT EXECUTED 10c98e: f008 ec38 blx 115200 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(bd); 10c992: 9801 ldr r0, [sp, #4] <== NOT EXECUTED 10c994: f005 fc6a bl 11226c <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 10c998: bb28 cbnz r0, 10c9e6 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) 10c99a: 7d63 ldrb r3, [r4, #21] <== NOT EXECUTED 10c99c: 42b3 cmp r3, r6 <== NOT EXECUTED 10c99e: d8d1 bhi.n 10c944 <== NOT EXECUTED 10c9a0: e7b4 b.n 10c90c <== NOT EXECUTED sc = rtems_bdbuf_release(fs_info->c.buf); 10c9a2: f005 fc15 bl 1121d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10c9a6: 2800 cmp r0, #0 <== NOT EXECUTED 10c9a8: d0b0 beq.n 10c90c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 10c9aa: f008 f969 bl 114c80 <__errno> <== NOT EXECUTED 10c9ae: 2205 movs r2, #5 <== NOT EXECUTED 10c9b0: 4603 mov r3, r0 <== NOT EXECUTED 10c9b2: 601a str r2, [r3, #0] <== NOT EXECUTED 10c9b4: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10c9b8: e7ac b.n 10c914 <== NOT EXECUTED sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 10c9ba: f005 fb3b bl 112034 <== NOT EXECUTED 10c9be: e7dc b.n 10c97a <== NOT EXECUTED return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10c9c0: 78a6 ldrb r6, [r4, #2] <== NOT EXECUTED 10c9c2: 7d22 ldrb r2, [r4, #20] <== NOT EXECUTED fs_info->c.buf->buffer + blk_ofs, 10c9c4: 69c1 ldr r1, [r0, #28] <== NOT EXECUTED 10c9c6: 1b90 subs r0, r2, r6 <== NOT EXECUTED memcpy(fs_info->sec_buf, 10c9c8: 8822 ldrh r2, [r4, #0] <== NOT EXECUTED 10c9ca: fa23 f500 lsr.w r5, r3, r0 <== NOT EXECUTED return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10c9ce: fa05 f000 lsl.w r0, r5, r0 <== NOT EXECUTED ((sector - 10c9d2: 1a1b subs r3, r3, r0 <== NOT EXECUTED 10c9d4: f8d4 00a4 ldr.w r0, [r4, #164] ; 0xa4 <== NOT EXECUTED fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 10c9d8: 40b3 lsls r3, r6 <== NOT EXECUTED 10c9da: 4419 add r1, r3 <== NOT EXECUTED 10c9dc: f008 ec10 blx 115200 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 10c9e0: f8d4 00a0 ldr.w r0, [r4, #160] ; 0xa0 <== NOT EXECUTED 10c9e4: e79f b.n 10c926 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10c9e6: f008 f94b bl 114c80 <__errno> <== NOT EXECUTED 10c9ea: 230c movs r3, #12 <== NOT EXECUTED 10c9ec: 6003 str r3, [r0, #0] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10c9ee: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED } 10c9f2: b003 add sp, #12 <== NOT EXECUTED 10c9f4: bdf0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 10c9f6: bf00 nop =============================================================================== 0010cba0 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 10cba0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10cba4: 4606 mov r6, r0 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 10cba6: 6880 ldr r0, [r0, #8] { 10cba8: b083 sub sp, #12 10cbaa: f89d b030 ldrb.w fp, [sp, #48] ; 0x30 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 10cbae: 1a85 subs r5, r0, r2 10cbb0: 78b0 ldrb r0, [r6, #2] 10cbb2: 429d cmp r5, r3 10cbb4: bf28 it cs 10cbb6: 461d movcs r5, r3 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10cbb8: 7d33 ldrb r3, [r6, #20] return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10cbba: eba3 0800 sub.w r8, r3, r0 10cbbe: b911 cbnz r1, 10cbc6 10cbc0: 7db4 ldrb r4, [r6, #22] <== NOT EXECUTED 10cbc2: 07a4 lsls r4, r4, #30 <== NOT EXECUTED 10cbc4: d146 bne.n 10cc54 <== NOT EXECUTED blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 10cbc6: 7b37 ldrb r7, [r6, #12] cln -= FAT_RSRVD_CLN; 10cbc8: 3902 subs r1, #2 10cbca: 6bf4 ldr r4, [r6, #60] ; 0x3c 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; 10cbcc: fa22 f903 lsr.w r9, r2, r3 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 10cbd0: 1aff subs r7, r7, r3 10cbd2: 40b9 lsls r1, r7 10cbd4: fa24 f808 lsr.w r8, r4, r8 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 10cbd8: 4488 add r8, r1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; 10cbda: 44c8 add r8, r9 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 10cbdc: fa09 f903 lsl.w r9, r9, r3 10cbe0: eba2 0909 sub.w r9, r2, r9 while ( (RC_OK == rc) 10cbe4: 2d00 cmp r5, #0 10cbe6: d041 beq.n 10cc6c <== ALWAYS TAKEN ssize_t bytes_written = 0; 10cbe8: f04f 0a00 mov.w sl, #0 && (0 < bytes_to_write)) { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 10cbec: 6932 ldr r2, [r6, #16] 10cbee: eba2 0409 sub.w r4, r2, r9 10cbf2: 42ac cmp r4, r5 10cbf4: 4627 mov r7, r4 10cbf6: bf28 it cs 10cbf8: 462f movcs r7, r5 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 10cbfa: 463c mov r4, r7 if (0 < bytes_to_write) 10cbfc: b347 cbz r7, 10cc50 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10cbfe: 1a1b subs r3, r3, r0 if (bytes_to_write == fs_info->vol.bytes_per_block) 10cc00: 42ba cmp r2, r7 10cc02: fa08 f103 lsl.w r1, r8, r3 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 10cc06: bf0c ite eq 10cc08: 2202 moveq r2, #2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 10cc0a: 2201 movne r2, #1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 10cc0c: ab01 add r3, sp, #4 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 10cc0e: 4630 mov r0, r6 10cc10: f7ff fef2 bl 10c9f8 if (RC_OK == rc) 10cc14: b190 cbz r0, 10cc3c fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 10cc16: 4604 mov r4, r0 <== NOT EXECUTED 10cc18: 42a7 cmp r7, r4 10cc1a: d005 beq.n 10cc28 <== NEVER TAKEN 10cc1c: f04f 3aff mov.w sl, #4294967295 ; 0xffffffff <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 10cc20: 4650 mov r0, sl 10cc22: b003 add sp, #12 10cc24: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} while ( (RC_OK == rc) 10cc28: 1bed subs r5, r5, r7 bytes_written += ret; 10cc2a: 4482 add sl, r0 ++cur_blk; 10cc2c: f108 0801 add.w r8, r8, #1 while ( (RC_OK == rc) 10cc30: d0f6 beq.n 10cc20 10cc32: 7d33 ldrb r3, [r6, #20] 10cc34: f04f 0900 mov.w r9, #0 10cc38: 78b0 ldrb r0, [r6, #2] 10cc3a: e7d7 b.n 10cbec memset(blk_buf + offset, pattern, bytes_to_write); 10cc3c: 9801 ldr r0, [sp, #4] 10cc3e: 463a mov r2, r7 10cc40: 4659 mov r1, fp 10cc42: 4448 add r0, r9 10cc44: f008 fd4c bl 1156e0 fs_info->c.modified = true; 10cc48: f04f 0301 mov.w r3, #1 10cc4c: f886 309c strb.w r3, [r6, #156] ; 0x9c return bytes_to_write; 10cc50: 4620 mov r0, r4 10cc52: e7e1 b.n 10cc18 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10cc54: 6ab1 ldr r1, [r6, #40] ; 0x28 <== NOT EXECUTED uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 10cc56: fa22 f903 lsr.w r9, r2, r3 <== NOT EXECUTED 10cc5a: fa21 f808 lsr.w r8, r1, r8 <== NOT EXECUTED cur_blk += blocks_in_offset; 10cc5e: 44c8 add r8, r9 <== NOT EXECUTED uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 10cc60: fa09 f903 lsl.w r9, r9, r3 <== NOT EXECUTED 10cc64: eba2 0909 sub.w r9, r2, r9 <== NOT EXECUTED while ( (RC_OK == rc) 10cc68: 2d00 cmp r5, #0 <== NOT EXECUTED 10cc6a: d1bd bne.n 10cbe8 <== NOT EXECUTED ssize_t bytes_written = 0; 10cc6c: 46aa mov sl, r5 <== NOT EXECUTED } 10cc6e: 4650 mov r0, sl <== NOT EXECUTED 10cc70: b003 add sp, #12 <== NOT EXECUTED 10cc72: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 10cc76: bf00 nop =============================================================================== 0010cc78 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff) { 10cc78: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10cc7c: 4606 mov r6, r0 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 10cc7e: 6880 ldr r0, [r0, #8] { 10cc80: b083 sub sp, #12 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 10cc82: 1a85 subs r5, r0, r2 10cc84: 78b0 ldrb r0, [r6, #2] 10cc86: 429d cmp r5, r3 10cc88: bf28 it cs 10cc8a: 461d movcs r5, r3 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10cc8c: 7d33 ldrb r3, [r6, #20] 10cc8e: eba3 0800 sub.w r8, r3, r0 10cc92: b911 cbnz r1, 10cc9a 10cc94: 7db4 ldrb r4, [r6, #22] 10cc96: 07a4 lsls r4, r4, #30 10cc98: d148 bne.n 10cd2c <== NEVER TAKEN blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 10cc9a: 7b37 ldrb r7, [r6, #12] cln -= FAT_RSRVD_CLN; 10cc9c: 3902 subs r1, #2 10cc9e: 6bf4 ldr r4, [r6, #60] ; 0x3c 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); 10cca0: fa22 f903 lsr.w r9, r2, r3 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 10cca4: 1aff subs r7, r7, r3 10cca6: 40b9 lsls r1, r7 10cca8: fa24 f808 lsr.w r8, r4, r8 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 10ccac: 4488 add r8, r1 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 10ccae: 44c8 add r8, r9 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 10ccb0: fa09 f903 lsl.w r9, r9, r3 10ccb4: eba2 0909 sub.w r9, r2, r9 while ( (RC_OK == rc) 10ccb8: 2d00 cmp r5, #0 10ccba: d043 beq.n 10cd44 <== ALWAYS TAKEN ssize_t bytes_written = 0; 10ccbc: f04f 0a00 mov.w sl, #0 fs_info->c.modified = true; 10ccc0: f04f 0b01 mov.w fp, #1 && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 10ccc4: 6932 ldr r2, [r6, #16] 10ccc6: eba2 0409 sub.w r4, r2, r9 10ccca: 42ac cmp r4, r5 10cccc: 4627 mov r7, r4 10ccce: bf28 it cs 10ccd0: 462f movcs r7, r5 uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 10ccd2: 463c mov r4, r7 if (0 < bytes_to_write) 10ccd4: b347 cbz r7, 10cd28 return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10ccd6: 1a1b subs r3, r3, r0 if (bytes_to_write == fs_info->vol.bytes_per_block) 10ccd8: 42ba cmp r2, r7 10ccda: fa08 f103 lsl.w r1, r8, r3 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 10ccde: bf0c ite eq 10cce0: 2202 moveq r2, #2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 10cce2: 2201 movne r2, #1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 10cce4: ab01 add r3, sp, #4 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 10cce6: 4630 mov r0, r6 10cce8: f7ff fe86 bl 10c9f8 if (RC_OK == rc) 10ccec: b190 cbz r0, 10cd14 fs_info, cur_blk, ofs_blk, c, &buffer[bytes_written]); if (c != ret) 10ccee: 4604 mov r4, r0 <== NOT EXECUTED 10ccf0: 42a7 cmp r7, r4 10ccf2: d005 beq.n 10cd00 <== NEVER TAKEN 10ccf4: f04f 3aff mov.w sl, #4294967295 ; 0xffffffff <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 10ccf8: 4650 mov r0, sl 10ccfa: b003 add sp, #12 10ccfc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} while ( (RC_OK == rc) 10cd00: 1bed subs r5, r5, r7 bytes_written += ret; 10cd02: 4482 add sl, r0 ++cur_blk; 10cd04: f108 0801 add.w r8, r8, #1 while ( (RC_OK == rc) 10cd08: d0f6 beq.n 10ccf8 <== NEVER TAKEN 10cd0a: 7d33 ldrb r3, [r6, #20] <== NOT EXECUTED 10cd0c: f04f 0900 mov.w r9, #0 <== NOT EXECUTED 10cd10: 78b0 ldrb r0, [r6, #2] <== NOT EXECUTED 10cd12: e7d7 b.n 10ccc4 <== NOT EXECUTED memcpy(blk_buf + offset, buf, bytes_to_write); 10cd14: 9801 ldr r0, [sp, #4] 10cd16: 463a mov r2, r7 10cd18: 9b0c ldr r3, [sp, #48] ; 0x30 10cd1a: 4448 add r0, r9 10cd1c: eb03 010a add.w r1, r3, sl 10cd20: f008 ea6e blx 115200 fs_info->c.modified = true; 10cd24: f886 b09c strb.w fp, [r6, #156] ; 0x9c return bytes_to_write; 10cd28: 4620 mov r0, r4 10cd2a: e7e1 b.n 10ccf0 return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 10cd2c: 6ab1 ldr r1, [r6, #40] ; 0x28 uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 10cd2e: fa22 f903 lsr.w r9, r2, r3 10cd32: fa21 f808 lsr.w r8, r1, r8 cur_blk += blocks_in_offset; 10cd36: 44c8 add r8, r9 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 10cd38: fa09 f903 lsl.w r9, r9, r3 10cd3c: eba2 0909 sub.w r9, r2, r9 while ( (RC_OK == rc) 10cd40: 2d00 cmp r5, #0 10cd42: d1bb bne.n 10ccbc <== NEVER TAKEN ssize_t bytes_written = 0; 10cd44: 46aa mov sl, r5 <== NOT EXECUTED } 10cd46: 4650 mov r0, sl <== NOT EXECUTED 10cd48: b003 add sp, #12 <== NOT EXECUTED 10cd4a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 10cd4e: bf00 nop =============================================================================== 0010dc80 : if (fat_fd->links_num > 1) 10dc80: 688b ldr r3, [r1, #8] { 10dc82: b570 push {r4, r5, r6, lr} 10dc84: 460c mov r4, r1 10dc86: 4605 mov r5, r0 if (fat_fd->links_num > 1) 10dc88: 2b01 cmp r3, #1 10dc8a: d906 bls.n 10dc9a fat_fd->links_num--; 10dc8c: 3b01 subs r3, #1 10dc8e: 608b str r3, [r1, #8] rc = fat_buf_release(fs_info); 10dc90: 4628 mov r0, r5 } 10dc92: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} rc = fat_buf_release(fs_info); 10dc96: f7fe beef b.w 10ca78 fat_file_update(fs_info, fat_fd); 10dc9a: f7ff feef bl 10da7c if (fat_fd->flags & FAT_FILE_REMOVED) 10dc9e: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 10dca2: f013 0601 ands.w r6, r3, #1 10dca6: d106 bne.n 10dcb6 if (fat_ino_is_unique(fs_info, fat_fd->ino)) 10dca8: 68e1 ldr r1, [r4, #12] 10dcaa: 4628 mov r0, r5 10dcac: f7ff fbb2 bl 10d414 10dcb0: b1a8 cbz r0, 10dcde fat_fd->links_num = 0; 10dcb2: 60a6 str r6, [r4, #8] 10dcb4: e7ec b.n 10dc90 rc = fat_file_truncate(fs_info, fat_fd, 0); 10dcb6: 2200 movs r2, #0 10dcb8: 4621 mov r1, r4 10dcba: 4628 mov r0, r5 10dcbc: f7ff ff96 bl 10dbec if (rc == RC_OK) 10dcc0: 2800 cmp r0, #0 10dcc2: d1e5 bne.n 10dc90 <== ALWAYS TAKEN previous = the_node->previous; 10dcc4: e9d4 2300 ldrd r2, r3, [r4] if (fat_ino_is_unique(fs_info, fat_fd->ino)) 10dcc8: 4628 mov r0, r5 _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); 10dcca: 68e1 ldr r1, [r4, #12] next->previous = previous; 10dccc: 6053 str r3, [r2, #4] previous->next = next; 10dcce: 601a str r2, [r3, #0] if (fat_ino_is_unique(fs_info, fat_fd->ino)) 10dcd0: f7ff fba0 bl 10d414 10dcd4: b958 cbnz r0, 10dcee free(fat_fd); 10dcd6: 4620 mov r0, r4 10dcd8: f7f7 fc84 bl 1055e4 10dcdc: e7d8 b.n 10dc90 previous = the_node->previous; 10dcde: e9d4 2300 ldrd r2, r3, [r4] free(fat_fd); 10dce2: 4620 mov r0, r4 next->previous = previous; 10dce4: 6053 str r3, [r2, #4] previous->next = next; 10dce6: 601a str r2, [r3, #0] 10dce8: f7f7 fc7c bl 1055e4 10dcec: e7d0 b.n 10dc90 fat_free_unique_ino(fs_info, fat_fd->ino); 10dcee: 68e1 ldr r1, [r4, #12] <== NOT EXECUTED 10dcf0: 4628 mov r0, r5 <== NOT EXECUTED 10dcf2: f7ff fb7b bl 10d3ec <== NOT EXECUTED 10dcf6: e7ee b.n 10dcd6 <== NOT EXECUTED =============================================================================== 0010dd78 : { 10dd78: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10dd7c: b087 sub sp, #28 10dd7e: 461c mov r4, r3 *a_length = new_length; 10dd80: 9b10 ldr r3, [sp, #64] ; 0x40 { 10dd82: 4690 mov r8, r2 uint32_t chain = 0; 10dd84: 2200 movs r2, #0 10dd86: 9202 str r2, [sp, #8] *a_length = new_length; 10dd88: 601c str r4, [r3, #0] if (new_length <= fat_fd->fat_file_size) 10dd8a: 698b ldr r3, [r1, #24] uint32_t last_cl = 0; 10dd8c: 9204 str r2, [sp, #16] if (new_length <= fat_fd->fat_file_size) 10dd8e: 42a3 cmp r3, r4 10dd90: d268 bcs.n 10de64 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10dd92: 6a0a ldr r2, [r1, #32] 10dd94: 460d mov r5, r1 10dd96: 4607 mov r7, r0 10dd98: 2a01 cmp r2, #1 10dd9a: d069 beq.n 10de70 bytes_remain = (fs_info->vol.bpc - 10dd9c: 68be ldr r6, [r7, #8] bytes2add = new_length - fat_fd->fat_file_size; 10dd9e: eba4 0a03 sub.w sl, r4, r3 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 10dda2: 1e72 subs r2, r6, #1 10dda4: ea03 0b02 and.w fp, r3, r2 bytes_remain = (fs_info->vol.bpc - 10dda8: eba6 060b sub.w r6, r6, fp 10ddac: 4016 ands r6, r2 if (bytes2add > bytes_remain) 10ddae: 4556 cmp r6, sl 10ddb0: d255 bcs.n 10de5e if (zero_fill && bytes_remain > 0) { 10ddb2: 2e00 cmp r6, #0 10ddb4: bf0c ite eq 10ddb6: 2200 moveq r2, #0 10ddb8: f008 0201 andne.w r2, r8, #1 bytes2add -= bytes_remain; 10ddbc: ebaa 0a06 sub.w sl, sl, r6 if (zero_fill && bytes_remain > 0) { 10ddc0: 2a00 cmp r2, #0 10ddc2: d164 bne.n 10de8e <== ALWAYS TAKEN if (bytes2add == 0) 10ddc4: f1ba 0f00 cmp.w sl, #0 10ddc8: d04c beq.n 10de64 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 10ddca: f8cd 8004 str.w r8, [sp, #4] cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 10ddce: f10a 38ff add.w r8, sl, #4294967295 ; 0xffffffff 10ddd2: 7b3a ldrb r2, [r7, #12] rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 10ddd4: ab04 add r3, sp, #16 10ddd6: 9300 str r3, [sp, #0] 10ddd8: a902 add r1, sp, #8 10ddda: ab05 add r3, sp, #20 10dddc: 4638 mov r0, r7 cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 10ddde: fa28 f802 lsr.w r8, r8, r2 10dde2: f108 0801 add.w r8, r8, #1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 10dde6: 4642 mov r2, r8 10dde8: f7ff fc8a bl 10d700 if (rc != RC_OK) 10ddec: 4681 mov r9, r0 10ddee: 2800 cmp r0, #0 10ddf0: d13a bne.n 10de68 <== ALWAYS TAKEN if ((cls_added == 0) && (bytes_remain == 0)) 10ddf2: 9b05 ldr r3, [sp, #20] 10ddf4: ea53 0206 orrs.w r2, r3, r6 10ddf8: d040 beq.n 10de7c if (cls2add != cls_added) 10ddfa: 4543 cmp r3, r8 10ddfc: d00a beq.n 10de14 uint32_t missing = (cls2add - cls_added) << fs_info->vol.bpc_log2; 10ddfe: 7b3a ldrb r2, [r7, #12] 10de00: eba8 0803 sub.w r8, r8, r3 10de04: fa08 f802 lsl.w r8, r8, r2 new_length -= bytes2add < missing ? bytes2add : missing; 10de08: 45d0 cmp r8, sl 10de0a: bf94 ite ls 10de0c: eba4 0408 subls.w r4, r4, r8 10de10: eba4 040a subhi.w r4, r4, sl if (cls_added > 0) 10de14: 2b00 cmp r3, #0 10de16: d052 beq.n 10debe if ( fat_fd->fat_file_size == 0 ) 10de18: 69ab ldr r3, [r5, #24] 10de1a: 2b00 cmp r3, #0 10de1c: d05c beq.n 10ded8 if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 10de1e: 6be9 ldr r1, [r5, #60] ; 0x3c 10de20: 1c4a adds r2, r1, #1 old_last_cl = fat_fd->map.last_cln; 10de22: bf18 it ne 10de24: 9103 strne r1, [sp, #12] if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 10de26: d062 beq.n 10deee <== ALWAYS TAKEN rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 10de28: 9a02 ldr r2, [sp, #8] 10de2a: 4638 mov r0, r7 10de2c: f7ff fb70 bl 10d510 if ( rc != RC_OK ) 10de30: 4603 mov r3, r0 10de32: b970 cbnz r0, 10de52 fat_buf_release(fs_info); 10de34: 4638 mov r0, r7 10de36: f7fe fe1f bl 10ca78 if (fat_fd->fat_file_type == FAT_DIRECTORY) 10de3a: 692b ldr r3, [r5, #16] fat_fd->map.last_cln = last_cl; 10de3c: 9a04 ldr r2, [sp, #16] 10de3e: 63ea str r2, [r5, #60] ; 0x3c if (fat_fd->fat_file_type == FAT_DIRECTORY) 10de40: 2b00 cmp r3, #0 10de42: d13c bne.n 10debe rc = fat_init_clusters_chain(fs_info, chain); 10de44: 9902 ldr r1, [sp, #8] 10de46: 4638 mov r0, r7 10de48: f7ff fa62 bl 10d310 if ( rc != RC_OK ) 10de4c: 4603 mov r3, r0 10de4e: 2800 cmp r0, #0 10de50: d035 beq.n 10debe <== NEVER TAKEN fat_free_fat_clusters_chain(fs_info, chain); 10de52: 9902 ldr r1, [sp, #8] <== NOT EXECUTED 10de54: 4638 mov r0, r7 <== NOT EXECUTED return rc; 10de56: 4699 mov r9, r3 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); 10de58: f7ff fc12 bl 10d680 <== NOT EXECUTED return rc; 10de5c: e004 b.n 10de68 <== NOT EXECUTED if (zero_fill && bytes_remain > 0) { 10de5e: f1b8 0f00 cmp.w r8, #0 10de62: d112 bne.n 10de8a return RC_OK; 10de64: f04f 0900 mov.w r9, #0 } 10de68: 4648 mov r0, r9 10de6a: b007 add sp, #28 10de6c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10de70: 6a4a ldr r2, [r1, #36] ; 0x24 10de72: 2a00 cmp r2, #0 10de74: d192 bne.n 10dd9c <== ALWAYS TAKEN 10de76: 7d82 ldrb r2, [r0, #22] 10de78: 0791 lsls r1, r2, #30 10de7a: d08f beq.n 10dd9c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); 10de7c: f006 ff00 bl 114c80 <__errno> 10de80: 231c movs r3, #28 10de82: f04f 39ff mov.w r9, #4294967295 ; 0xffffffff 10de86: 6003 str r3, [r0, #0] 10de88: e7ee b.n 10de68 bytes2add = 0; 10de8a: f04f 0a00 mov.w sl, #0 uint32_t cl_start = start >> fs_info->vol.bpc_log2; 10de8e: 7b3a ldrb r2, [r7, #12] rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 10de90: 4629 mov r1, r5 10de92: 4638 mov r0, r7 10de94: fa23 f202 lsr.w r2, r3, r2 10de98: ab05 add r3, sp, #20 10de9a: f7ff fcd3 bl 10d844 if (rc != RC_OK) 10de9e: 4681 mov r9, r0 10dea0: 2800 cmp r0, #0 10dea2: d1e1 bne.n 10de68 <== ALWAYS TAKEN bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 10dea4: 9000 str r0, [sp, #0] 10dea6: 465a mov r2, fp 10dea8: 9905 ldr r1, [sp, #20] 10deaa: 4633 mov r3, r6 10deac: 4638 mov r0, r7 10deae: f7fe fe77 bl 10cba0 if (bytes_remain != bytes_written) 10deb2: 42b0 cmp r0, r6 return -1; 10deb4: bf18 it ne 10deb6: f04f 39ff movne.w r9, #4294967295 ; 0xffffffff if (bytes_remain != bytes_written) 10deba: d1d5 bne.n 10de68 <== ALWAYS TAKEN 10debc: e782 b.n 10ddc4 *a_length = new_length; 10debe: 9b10 ldr r3, [sp, #64] ; 0x40 } 10dec0: 4648 mov r0, r9 *a_length = new_length; 10dec2: 601c str r4, [r3, #0] fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 10dec4: f895 3030 ldrb.w r3, [r5, #48] ; 0x30 fat_fd->fat_file_size = s; 10dec8: 61ac str r4, [r5, #24] fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 10deca: f043 0302 orr.w r3, r3, #2 10dece: f885 3030 strb.w r3, [r5, #48] ; 0x30 } 10ded2: b007 add sp, #28 10ded4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} fat_fd->map.file_cln = 0; 10ded8: 636b str r3, [r5, #52] ; 0x34 fat_fd->flags |= FAT_FILE_META_DATA_CHANGED; 10deda: f895 3030 ldrb.w r3, [r5, #48] ; 0x30 10dede: f043 0302 orr.w r3, r3, #2 10dee2: f885 3030 strb.w r3, [r5, #48] ; 0x30 fat_fd->map.disk_cln = chain; 10dee6: 9b02 ldr r3, [sp, #8] 10dee8: 63ab str r3, [r5, #56] ; 0x38 fat_fd->cln = cln; 10deea: 61eb str r3, [r5, #28] } 10deec: e7a5 b.n 10de3a rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 10deee: aa03 add r2, sp, #12 <== NOT EXECUTED 10def0: 3b01 subs r3, #1 <== NOT EXECUTED 10def2: 4629 mov r1, r5 <== NOT EXECUTED 10def4: 9200 str r2, [sp, #0] <== NOT EXECUTED 10def6: 4638 mov r0, r7 <== NOT EXECUTED 10def8: 2201 movs r2, #1 <== NOT EXECUTED 10defa: f7ff fefd bl 10dcf8 <== NOT EXECUTED rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 10defe: 9903 ldr r1, [sp, #12] <== NOT EXECUTED if ( rc != RC_OK ) 10df00: 4603 mov r3, r0 <== NOT EXECUTED 10df02: 2800 cmp r0, #0 <== NOT EXECUTED 10df04: d090 beq.n 10de28 <== NOT EXECUTED 10df06: e7a4 b.n 10de52 <== NOT EXECUTED =============================================================================== 0010dcf8 : { 10dcf8: b40c push {r2, r3} 10dcfa: b530 push {r4, r5, lr} 10dcfc: b083 sub sp, #12 10dcfe: ab06 add r3, sp, #24 uint32_t cur_cln = 0; 10dd00: 2400 movs r4, #0 { 10dd02: f853 2b04 ldr.w r2, [r3], #4 switch (cmd) 10dd06: 2a01 cmp r2, #1 va_start(ap, cmd); 10dd08: e9cd 4300 strd r4, r3, [sp] switch (cmd) 10dd0c: d118 bne.n 10dd40 <== ALWAYS TAKEN ret = va_arg(ap, uint32_t *); 10dd0e: ac09 add r4, sp, #36 ; 0x24 pos = va_arg(ap, uint32_t); 10dd10: 9a07 ldr r2, [sp, #28] ret = va_arg(ap, uint32_t *); 10dd12: 9401 str r4, [sp, #4] if ( pos >= fat_fd->fat_file_size ) { 10dd14: 698c ldr r4, [r1, #24] ret = va_arg(ap, uint32_t *); 10dd16: 685d ldr r5, [r3, #4] if ( pos >= fat_fd->fat_file_size ) { 10dd18: 4294 cmp r4, r2 10dd1a: d924 bls.n 10dd66 <== ALWAYS TAKEN if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10dd1c: 6a0b ldr r3, [r1, #32] 10dd1e: 2b01 cmp r3, #1 10dd20: d101 bne.n 10dd26 10dd22: 6a4b ldr r3, [r1, #36] ; 0x24 10dd24: b1c3 cbz r3, 10dd58 cl_start = pos >> fs_info->vol.bpc_log2; 10dd26: 7b03 ldrb r3, [r0, #12] rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 10dd28: 40da lsrs r2, r3 10dd2a: 466b mov r3, sp 10dd2c: f7ff fd8a bl 10d844 if ( rc != RC_OK ) 10dd30: b908 cbnz r0, 10dd36 *ret = cur_cln; 10dd32: 9b00 ldr r3, [sp, #0] 10dd34: 602b str r3, [r5, #0] } 10dd36: b003 add sp, #12 10dd38: e8bd 4030 ldmia.w sp!, {r4, r5, lr} 10dd3c: b002 add sp, #8 10dd3e: 4770 bx lr errno = EINVAL; 10dd40: f006 ff9e bl 114c80 <__errno> <== NOT EXECUTED 10dd44: 2216 movs r2, #22 <== NOT EXECUTED 10dd46: 4603 mov r3, r0 <== NOT EXECUTED 10dd48: 601a str r2, [r3, #0] <== NOT EXECUTED rc = -1; 10dd4a: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED } 10dd4e: b003 add sp, #12 <== NOT EXECUTED 10dd50: e8bd 4030 ldmia.w sp!, {r4, r5, lr} <== NOT EXECUTED 10dd54: b002 add sp, #8 <== NOT EXECUTED 10dd56: 4770 bx lr <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10dd58: 7d84 ldrb r4, [r0, #22] 10dd5a: 07a4 lsls r4, r4, #30 rc = RC_OK; 10dd5c: bf1c itt ne 10dd5e: 4618 movne r0, r3 *ret = 0; 10dd60: 602b strne r3, [r5, #0] if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10dd62: d1e8 bne.n 10dd36 10dd64: e7df b.n 10dd26 rtems_set_errno_and_return_minus_one( EIO ); 10dd66: f006 ff8b bl 114c80 <__errno> <== NOT EXECUTED 10dd6a: 2205 movs r2, #5 <== NOT EXECUTED 10dd6c: 4603 mov r3, r0 <== NOT EXECUTED 10dd6e: 601a str r2, [r3, #0] <== NOT EXECUTED 10dd70: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10dd74: e7df b.n 10dd36 <== NOT EXECUTED 10dd76: bf00 nop =============================================================================== 0010d8b4 : { 10d8b4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 10d8b8: 468a mov sl, r1 10d8ba: e9d1 5600 ldrd r5, r6, [r1] 10d8be: 4604 mov r4, r0 10d8c0: 4691 mov r9, r2 if (cln == 1) 10d8c2: 2d01 cmp r5, #1 10d8c4: d009 beq.n 10d8da if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d8c6: 2d00 cmp r5, #0 10d8c8: f000 8095 beq.w 10d9f6 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d8cc: 7962 ldrb r2, [r4, #5] 10d8ce: 3d02 subs r5, #2 10d8d0: 4095 lsls r5, r2 10d8d2: 6be2 ldr r2, [r4, #60] ; 0x3c 10d8d4: 4415 add r5, r2 fs_info->vol.sec_mul); 10d8d6: 78e2 ldrb r2, [r4, #3] return (fat_cluster_num_to_sector_num(fs_info, cln) << 10d8d8: 4095 lsls r5, r2 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 10d8da: eb05 2556 add.w r5, r5, r6, lsr #9 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 10d8de: f3c6 1643 ubfx r6, r6, #5, #4 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 10d8e2: f8d4 7080 ldr.w r7, [r4, #128] ; 0x80 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 10d8e6: eb06 1505 add.w r5, r6, r5, lsl #4 uint32_t mod = (key1) % FAT_HASH_MODULE; 10d8ea: f006 0601 and.w r6, r6, #1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 10d8ee: eb06 0646 add.w r6, r6, r6, lsl #1 10d8f2: 00b6 lsls r6, r6, #2 return _Chain_Immutable_head( the_chain )->next; 10d8f4: 59ba ldr r2, [r7, r6] 10d8f6: 4437 add r7, r6 return &the_chain->Tail.Node; 10d8f8: f107 0804 add.w r8, r7, #4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 10d8fc: 4542 cmp r2, r8 10d8fe: d01e beq.n 10d93e return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d900: e9d2 3008 ldrd r3, r0, [r2, #32] if (cln == 1) 10d904: 2b01 cmp r3, #1 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d906: f1a3 0102 sub.w r1, r3, #2 if (cln == 1) 10d90a: d00d beq.n 10d928 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d90c: b923 cbnz r3, 10d918 10d90e: 7da3 ldrb r3, [r4, #22] 10d910: 079b lsls r3, r3, #30 return fs_info->vol.rdir_loc; 10d912: bf18 it ne 10d914: 6aa3 ldrne r3, [r4, #40] ; 0x28 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d916: d105 bne.n 10d924 <== NEVER TAKEN return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d918: f894 c005 ldrb.w ip, [r4, #5] 10d91c: 6be3 ldr r3, [r4, #60] ; 0x3c 10d91e: fa01 f10c lsl.w r1, r1, ip 10d922: 440b add r3, r1 fs_info->vol.sec_mul); 10d924: 78e1 ldrb r1, [r4, #3] return (fat_cluster_num_to_sector_num(fs_info, cln) << 10d926: 408b lsls r3, r1 return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 10d928: eb03 2350 add.w r3, r3, r0, lsr #9 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 10d92c: f3c0 1143 ubfx r1, r0, #5, #4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 10d930: eb01 1303 add.w r3, r1, r3, lsl #4 if ( (key1) == ck) 10d934: 429d cmp r5, r3 10d936: d056 beq.n 10d9e6 the_node = the_node->next; 10d938: 6812 ldr r2, [r2, #0] for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 10d93a: 4542 cmp r2, r8 10d93c: d1e0 bne.n 10d900 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 10d93e: f8d4 1084 ldr.w r1, [r4, #132] ; 0x84 return _Chain_Immutable_head( the_chain )->next; 10d942: 598a ldr r2, [r1, r6] 10d944: 4431 add r1, r6 return &the_chain->Tail.Node; 10d946: 3104 adds r1, #4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 10d948: 428a cmp r2, r1 10d94a: d103 bne.n 10d954 <== ALWAYS TAKEN 10d94c: e05a b.n 10da04 the_node = the_node->next; 10d94e: 6812 ldr r2, [r2, #0] <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 10d950: 428a cmp r2, r1 <== NOT EXECUTED 10d952: d057 beq.n 10da04 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d954: e9d2 3c08 ldrd r3, ip, [r2, #32] <== NOT EXECUTED if (cln == 1) 10d958: 2b01 cmp r3, #1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d95a: f1a3 0002 sub.w r0, r3, #2 <== NOT EXECUTED if (cln == 1) 10d95e: d00d beq.n 10d97c <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d960: b923 cbnz r3, 10d96c <== NOT EXECUTED 10d962: 7da3 ldrb r3, [r4, #22] <== NOT EXECUTED 10d964: 079b lsls r3, r3, #30 <== NOT EXECUTED return fs_info->vol.rdir_loc; 10d966: bf18 it ne <== NOT EXECUTED 10d968: 6aa3 ldrne r3, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d96a: d105 bne.n 10d978 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10d96c: f894 e005 ldrb.w lr, [r4, #5] <== NOT EXECUTED 10d970: 6be3 ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 10d972: fa00 f00e lsl.w r0, r0, lr <== NOT EXECUTED 10d976: 4403 add r3, r0 <== NOT EXECUTED fs_info->vol.sec_mul); 10d978: 78e0 ldrb r0, [r4, #3] <== NOT EXECUTED return (fat_cluster_num_to_sector_num(fs_info, cln) << 10d97a: 4083 lsls r3, r0 <== NOT EXECUTED return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 10d97c: eb03 235c add.w r3, r3, ip, lsr #9 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 10d980: f3cc 1043 ubfx r0, ip, #5, #4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 10d984: eb00 1303 add.w r3, r0, r3, lsl #4 <== NOT EXECUTED if ( (key1) == ck) 10d988: 429d cmp r5, r3 <== NOT EXECUTED 10d98a: d1e0 bne.n 10d94e <== NOT EXECUTED if ( ((key2) == 0) || ((key2) == ffd->ino) ) 10d98c: b115 cbz r5, 10d994 <== NOT EXECUTED 10d98e: 68d3 ldr r3, [r2, #12] <== NOT EXECUTED 10d990: 429d cmp r5, r3 <== NOT EXECUTED 10d992: d1dc bne.n 10d94e <== NOT EXECUTED lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t)); 10d994: 2150 movs r1, #80 ; 0x50 <== NOT EXECUTED 10d996: 2001 movs r0, #1 <== NOT EXECUTED 10d998: f7fe fba8 bl 10c0ec <== NOT EXECUTED 10d99c: 4683 mov fp, r0 <== NOT EXECUTED 10d99e: f8c9 0000 str.w r0, [r9] <== NOT EXECUTED if ( lfat_fd == NULL ) 10d9a2: 2800 cmp r0, #0 <== NOT EXECUTED 10d9a4: d05b beq.n 10da5e <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 10d9a6: f89b 3030 ldrb.w r3, [fp, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 10d9aa: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 10d9ae: f10b 0720 add.w r7, fp, #32 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 10d9b2: f8cb 503c str.w r5, [fp, #60] ; 0x3c <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 10d9b6: f023 0301 bic.w r3, r3, #1 <== NOT EXECUTED 10d9ba: f88b 3030 strb.w r3, [fp, #48] ; 0x30 <== NOT EXECUTED lfat_fd->links_num = 1; 10d9be: 2301 movs r3, #1 <== NOT EXECUTED 10d9c0: f8cb 3008 str.w r3, [fp, #8] <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 10d9c4: e89a 000f ldmia.w sl, {r0, r1, r2, r3} <== NOT EXECUTED 10d9c8: e887 000f stmia.w r7, {r0, r1, r2, r3} <== NOT EXECUTED lfat_fd->ino = fat_get_unique_ino(fs_info); 10d9cc: 4620 mov r0, r4 <== NOT EXECUTED 10d9ce: f7ff fcc3 bl 10d358 <== NOT EXECUTED 10d9d2: f8cb 000c str.w r0, [fp, #12] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 10d9d6: 2800 cmp r0, #0 <== NOT EXECUTED 10d9d8: d03d beq.n 10da56 <== NOT EXECUTED rtems_chain_append_unprotected((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 10d9da: f8d4 7080 ldr.w r7, [r4, #128] ; 0x80 <== NOT EXECUTED 10d9de: 4437 add r7, r6 <== NOT EXECUTED return &the_chain->Tail.Node; 10d9e0: f107 0804 add.w r8, r7, #4 <== NOT EXECUTED 10d9e4: e02b b.n 10da3e <== NOT EXECUTED lfat_fd->links_num++; 10d9e6: 6893 ldr r3, [r2, #8] return rc; 10d9e8: 2000 movs r0, #0 (*fat_fd) = lfat_fd; 10d9ea: f8c9 2000 str.w r2, [r9] lfat_fd->links_num++; 10d9ee: 3301 adds r3, #1 10d9f0: 6093 str r3, [r2, #8] } 10d9f2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d9f6: 7d82 ldrb r2, [r0, #22] 10d9f8: 0792 lsls r2, r2, #30 return fs_info->vol.rdir_loc; 10d9fa: bf18 it ne 10d9fc: 6a85 ldrne r5, [r0, #40] ; 0x28 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10d9fe: f47f af6a bne.w 10d8d6 <== NEVER TAKEN 10da02: e763 b.n 10d8cc <== NOT EXECUTED lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t)); 10da04: 2150 movs r1, #80 ; 0x50 10da06: 2001 movs r0, #1 10da08: f7fe fb70 bl 10c0ec 10da0c: 4683 mov fp, r0 10da0e: f8c9 0000 str.w r0, [r9] if ( lfat_fd == NULL ) 10da12: b320 cbz r0, 10da5e lfat_fd->flags &= ~FAT_FILE_REMOVED; 10da14: f89b 3030 ldrb.w r3, [fp, #48] ; 0x30 lfat_fd->dir_pos = *dir_pos; 10da18: f10b 0420 add.w r4, fp, #32 lfat_fd->flags &= ~FAT_FILE_REMOVED; 10da1c: f023 0301 bic.w r3, r3, #1 10da20: f88b 3030 strb.w r3, [fp, #48] ; 0x30 lfat_fd->links_num = 1; 10da24: 2301 movs r3, #1 10da26: f8cb 3008 str.w r3, [fp, #8] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 10da2a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff 10da2e: f8cb 303c str.w r3, [fp, #60] ; 0x3c lfat_fd->dir_pos = *dir_pos; 10da32: e89a 000f ldmia.w sl, {r0, r1, r2, r3} 10da36: e884 000f stmia.w r4, {r0, r1, r2, r3} lfat_fd->ino = key; 10da3a: f8cb 500c str.w r5, [fp, #12] return RC_OK; 10da3e: 2000 movs r0, #0 old_last = tail->previous; 10da40: 68bb ldr r3, [r7, #8] the_node->next = tail; 10da42: f8cb 8000 str.w r8, [fp] tail->previous = the_node; 10da46: f8c7 b008 str.w fp, [r7, #8] old_last->next = the_node; 10da4a: f8c3 b000 str.w fp, [r3] the_node->previous = old_last; 10da4e: f8cb 3004 str.w r3, [fp, #4] } 10da52: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} free((*fat_fd)); 10da56: f8d9 0000 ldr.w r0, [r9] <== NOT EXECUTED 10da5a: f7f7 fdc3 bl 1055e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10da5e: f007 f90f bl 114c80 <__errno> <== NOT EXECUTED 10da62: 220c movs r2, #12 <== NOT EXECUTED 10da64: 4603 mov r3, r0 <== NOT EXECUTED 10da66: 601a str r2, [r3, #0] <== NOT EXECUTED 10da68: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10da6c: e7c1 b.n 10d9f2 <== NOT EXECUTED 10da6e: bf00 nop =============================================================================== 0010dacc : { 10dacc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10dad0: 4604 mov r4, r0 10dad2: b085 sub sp, #20 uint32_t cur_cln = 0; 10dad4: 2000 movs r0, #0 if (count == 0) 10dad6: 461d mov r5, r3 { 10dad8: f8dd 8038 ldr.w r8, [sp, #56] ; 0x38 uint32_t cur_cln = 0; 10dadc: 9003 str r0, [sp, #12] if (count == 0) 10dade: 2b00 cmp r3, #0 10dae0: d05f beq.n 10dba2 <== ALWAYS TAKEN if ( start >= fat_fd->fat_file_size ) 10dae2: 698b ldr r3, [r1, #24] 10dae4: 460f mov r7, r1 10dae6: 4691 mov r9, r2 10dae8: 4293 cmp r3, r2 10daea: d954 bls.n 10db96 if ((count > fat_fd->fat_file_size) || 10daec: 42ab cmp r3, r5 10daee: d355 bcc.n 10db9c (start > fat_fd->fat_file_size - count)) 10daf0: 1b5a subs r2, r3, r5 if ((count > fat_fd->fat_file_size) || 10daf2: 454a cmp r2, r9 10daf4: d352 bcc.n 10db9c if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10daf6: 6a3b ldr r3, [r7, #32] 10daf8: 2b01 cmp r3, #1 10dafa: d102 bne.n 10db02 10dafc: 6a7b ldr r3, [r7, #36] ; 0x24 10dafe: 2b00 cmp r3, #0 10db00: d053 beq.n 10dbaa <== NEVER TAKEN cl_start = start >> fs_info->vol.bpc_log2; 10db02: f894 a00c ldrb.w sl, [r4, #12] rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 10db06: ab03 add r3, sp, #12 10db08: 4639 mov r1, r7 10db0a: 4620 mov r0, r4 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 10db0c: 68a6 ldr r6, [r4, #8] cl_start = start >> fs_info->vol.bpc_log2; 10db0e: fa29 fa0a lsr.w sl, r9, sl rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 10db12: 4652 mov r2, sl 10db14: f7ff fe96 bl 10d844 if (rc != RC_OK) 10db18: 2800 cmp r0, #0 10db1a: d13c bne.n 10db96 <== ALWAYS TAKEN save_ofs = ofs = start & (fs_info->vol.bpc - 1); 10db1c: 3e01 subs r6, #1 10db1e: ea06 0909 and.w r9, r6, r9 uint32_t cmpltd = 0; 10db22: 4606 mov r6, r0 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 10db24: 4648 mov r0, r9 c = MIN(count, (fs_info->vol.bpc - ofs)); 10db26: 68a3 ldr r3, [r4, #8] sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 10db28: 9a03 ldr r2, [sp, #12] c = MIN(count, (fs_info->vol.bpc - ofs)); 10db2a: 1a1b subs r3, r3, r0 10db2c: 42ab cmp r3, r5 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10db2e: f1a2 0102 sub.w r1, r2, #2 10db32: bf28 it cs 10db34: 462b movcs r3, r5 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10db36: b922 cbnz r2, 10db42 10db38: 7da2 ldrb r2, [r4, #22] <== NOT EXECUTED 10db3a: 0792 lsls r2, r2, #30 <== NOT EXECUTED return fs_info->vol.rdir_loc; 10db3c: bf18 it ne <== NOT EXECUTED 10db3e: 6aa1 ldrne r1, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10db40: d103 bne.n 10db4a <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10db42: 7962 ldrb r2, [r4, #5] 10db44: 4091 lsls r1, r2 10db46: 6be2 ldr r2, [r4, #60] ; 0x3c 10db48: 4411 add r1, r2 sec += (ofs >> fs_info->vol.sec_log2); 10db4a: f894 c002 ldrb.w ip, [r4, #2] count -= c; 10db4e: 1aed subs r5, r5, r3 byte = ofs & (fs_info->vol.bps - 1); 10db50: 8822 ldrh r2, [r4, #0] sec += (ofs >> fs_info->vol.sec_log2); 10db52: fa20 fc0c lsr.w ip, r0, ip byte = ofs & (fs_info->vol.bps - 1); 10db56: 3a01 subs r2, #1 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 10db58: 4002 ands r2, r0 10db5a: eb08 0006 add.w r0, r8, r6 10db5e: 4461 add r1, ip 10db60: 9000 str r0, [sp, #0] 10db62: 4620 mov r0, r4 cmpltd += c; 10db64: 441e add r6, r3 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 10db66: f7fe ff8f bl 10ca88 <_fat_block_read> if ( ret < 0 ) 10db6a: 2800 cmp r0, #0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10db6c: aa03 add r2, sp, #12 if ( ret < 0 ) 10db6e: db37 blt.n 10dbe0 <== ALWAYS TAKEN save_cln = cur_cln; 10db70: f8dd b00c ldr.w fp, [sp, #12] rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10db74: 4620 mov r0, r4 10db76: 4659 mov r1, fp 10db78: f7ff fc54 bl 10d424 if ( rc != RC_OK ) 10db7c: b958 cbnz r0, 10db96 while (count > 0) 10db7e: 2d00 cmp r5, #0 10db80: d1d1 bne.n 10db26 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 10db82: 7b22 ldrb r2, [r4, #12] 10db84: f109 33ff add.w r3, r9, #4294967295 ; 0xffffffff 10db88: 4433 add r3, r6 return cmpltd; 10db8a: 4630 mov r0, r6 fat_fd->map.disk_cln = save_cln; 10db8c: f8c7 b038 str.w fp, [r7, #56] ; 0x38 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 10db90: 40d3 lsrs r3, r2 fat_fd->map.file_cln = cl_start + 10db92: 4453 add r3, sl 10db94: 637b str r3, [r7, #52] ; 0x34 } 10db96: b005 add sp, #20 10db98: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} count = fat_fd->fat_file_size - start; 10db9c: eba3 0509 sub.w r5, r3, r9 10dba0: e7a9 b.n 10daf6 return cmpltd; 10dba2: 4618 mov r0, r3 <== NOT EXECUTED } 10dba4: b005 add sp, #20 <== NOT EXECUTED 10dba6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10dbaa: 7da3 ldrb r3, [r4, #22] 10dbac: 0799 lsls r1, r3, #30 10dbae: d0a8 beq.n 10db02 sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 10dbb0: 69fa ldr r2, [r7, #28] if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10dbb2: b1c2 cbz r2, 10dbe6 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10dbb4: 7963 ldrb r3, [r4, #5] <== NOT EXECUTED 10dbb6: 3a02 subs r2, #2 <== NOT EXECUTED 10dbb8: 409a lsls r2, r3 <== NOT EXECUTED 10dbba: 6be3 ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 10dbbc: 441a add r2, r3 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, count, buf); 10dbbe: f8cd 8000 str.w r8, [sp] 10dbc2: 462b mov r3, r5 sec += (start >> fs_info->vol.sec_log2); 10dbc4: 78a1 ldrb r1, [r4, #2] ret = _fat_block_read(fs_info, sec, byte, count, buf); 10dbc6: 4620 mov r0, r4 sec += (start >> fs_info->vol.sec_log2); 10dbc8: fa29 f101 lsr.w r1, r9, r1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 10dbcc: 4411 add r1, r2 byte = start & (fs_info->vol.bps - 1); 10dbce: 8822 ldrh r2, [r4, #0] 10dbd0: 3a01 subs r2, #1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 10dbd2: ea02 0209 and.w r2, r2, r9 10dbd6: f7fe ff57 bl 10ca88 <_fat_block_read> if ( ret < 0 ) 10dbda: ea40 70e0 orr.w r0, r0, r0, asr #31 10dbde: e7da b.n 10db96 return -1; 10dbe0: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10dbe4: e7d7 b.n 10db96 <== NOT EXECUTED return fs_info->vol.rdir_loc; 10dbe6: 6aa2 ldr r2, [r4, #40] ; 0x28 10dbe8: e7e9 b.n 10dbbe 10dbea: bf00 nop =============================================================================== 0010e088 : { 10e088: b5f0 push {r4, r5, r6, r7, lr} 10e08a: b083 sub sp, #12 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10e08c: e9d1 6307 ldrd r6, r3, [r1, #28] { 10e090: 460d mov r5, r1 10e092: 4604 mov r4, r0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10e094: 2b01 cmp r3, #1 uint32_t cur_cln = fat_fd->cln; 10e096: 9601 str r6, [sp, #4] if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10e098: d020 beq.n 10e0dc while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10e09a: e9d4 3106 ldrd r3, r1, [r4, #24] fat_fd->fat_file_size = 0; 10e09e: 2200 movs r2, #0 10e0a0: 61aa str r2, [r5, #24] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10e0a2: 4033 ands r3, r6 10e0a4: 4299 cmp r1, r3 10e0a6: d80b bhi.n 10e0c0 <== NEVER TAKEN 10e0a8: e013 b.n 10e0d2 <== NOT EXECUTED 10e0aa: e9d4 3006 ldrd r3, r0, [r4, #24] 10e0ae: 9901 ldr r1, [sp, #4] fat_fd->fat_file_size += fs_info->vol.bpc; 10e0b0: 69aa ldr r2, [r5, #24] 10e0b2: 68a7 ldr r7, [r4, #8] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10e0b4: 400b ands r3, r1 10e0b6: 4283 cmp r3, r0 fat_fd->fat_file_size += fs_info->vol.bpc; 10e0b8: 443a add r2, r7 10e0ba: 61aa str r2, [r5, #24] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10e0bc: d20a bcs.n 10e0d4 10e0be: 460e mov r6, r1 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10e0c0: 4631 mov r1, r6 10e0c2: aa01 add r2, sp, #4 10e0c4: 4620 mov r0, r4 10e0c6: f7ff f9ad bl 10d424 if ( rc != RC_OK ) 10e0ca: 2800 cmp r0, #0 10e0cc: d0ed beq.n 10e0aa <== NEVER TAKEN } 10e0ce: b003 add sp, #12 10e0d0: bdf0 pop {r4, r5, r6, r7, pc} uint32_t save_cln = 0; 10e0d2: 4616 mov r6, r2 <== NOT EXECUTED return rc; 10e0d4: 2000 movs r0, #0 fat_fd->map.last_cln = save_cln; 10e0d6: 63ee str r6, [r5, #60] ; 0x3c } 10e0d8: b003 add sp, #12 10e0da: bdf0 pop {r4, r5, r6, r7, pc} if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 10e0dc: 6a48 ldr r0, [r1, #36] ; 0x24 10e0de: 2800 cmp r0, #0 10e0e0: d1db bne.n 10e09a <== ALWAYS TAKEN 10e0e2: 7da3 ldrb r3, [r4, #22] 10e0e4: 079b lsls r3, r3, #30 10e0e6: d0d8 beq.n 10e09a fat_fd->fat_file_size = fs_info->vol.rdir_size; 10e0e8: 6b63 ldr r3, [r4, #52] ; 0x34 10e0ea: 618b str r3, [r1, #24] return rc; 10e0ec: e7ef b.n 10e0ce 10e0ee: bf00 nop =============================================================================== 0010dbec : if ( new_length >= fat_fd->fat_file_size ) 10dbec: 698b ldr r3, [r1, #24] { 10dbee: b570 push {r4, r5, r6, lr} uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 10dbf0: 2500 movs r5, #0 { 10dbf2: b082 sub sp, #8 uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 10dbf4: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff if ( new_length >= fat_fd->fat_file_size ) 10dbf8: 4293 cmp r3, r2 uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 10dbfa: e9cd 5400 strd r5, r4, [sp] if ( new_length >= fat_fd->fat_file_size ) 10dbfe: d91e bls.n 10dc3e assert(fat_fd->fat_file_size); 10dc00: b373 cbz r3, 10dc60 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 10dc02: 6884 ldr r4, [r0, #8] 10dc04: 4605 mov r5, r0 10dc06: 4414 add r4, r2 10dc08: 7b02 ldrb r2, [r0, #12] 10dc0a: 3c01 subs r4, #1 10dc0c: 40d4 lsrs r4, r2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 10dc0e: fa04 f202 lsl.w r2, r4, r2 10dc12: 4293 cmp r3, r2 10dc14: d913 bls.n 10dc3e if (cl_start != 0) 10dc16: 460e mov r6, r1 10dc18: b124 cbz r4, 10dc24 rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 10dc1a: ab01 add r3, sp, #4 10dc1c: 1e62 subs r2, r4, #1 10dc1e: f7ff fe11 bl 10d844 if (rc != RC_OK) 10dc22: b968 cbnz r0, 10dc40 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 10dc24: 466b mov r3, sp 10dc26: 4622 mov r2, r4 10dc28: 4631 mov r1, r6 10dc2a: 4628 mov r0, r5 10dc2c: f7ff fe0a bl 10d844 if (rc != RC_OK) 10dc30: b930 cbnz r0, 10dc40 rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 10dc32: 9900 ldr r1, [sp, #0] 10dc34: 4628 mov r0, r5 10dc36: f7ff fd23 bl 10d680 if (rc != RC_OK) 10dc3a: b908 cbnz r0, 10dc40 if (cl_start != 0) 10dc3c: b914 cbnz r4, 10dc44 return rc; 10dc3e: 2000 movs r0, #0 } 10dc40: b002 add sp, #8 10dc42: bd70 pop {r4, r5, r6, pc} rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 10dc44: 9901 ldr r1, [sp, #4] 10dc46: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff 10dc4a: 4628 mov r0, r5 10dc4c: f7ff fc60 bl 10d510 if ( rc != RC_OK ) 10dc50: 2800 cmp r0, #0 10dc52: d1f5 bne.n 10dc40 <== ALWAYS TAKEN fat_fd->map.disk_cln = new_last_cln; 10dc54: 9b01 ldr r3, [sp, #4] fat_fd->map.file_cln = cl_start - 1; 10dc56: 3c01 subs r4, #1 fat_fd->map.disk_cln = new_last_cln; 10dc58: e9c6 430d strd r4, r3, [r6, #52] ; 0x34 fat_fd->map.last_cln = new_last_cln; 10dc5c: 63f3 str r3, [r6, #60] ; 0x3c 10dc5e: e7ef b.n 10dc40 assert(fat_fd->fat_file_size); 10dc60: f64c 0398 movw r3, #51352 ; 0xc898 <== NOT EXECUTED 10dc64: f64c 02dc movw r2, #51420 ; 0xc8dc <== NOT EXECUTED 10dc68: f64c 00b0 movw r0, #51376 ; 0xc8b0 <== NOT EXECUTED 10dc6c: f2c0 0311 movt r3, #17 <== NOT EXECUTED 10dc70: f2c0 0211 movt r2, #17 <== NOT EXECUTED 10dc74: f44f 7139 mov.w r1, #740 ; 0x2e4 <== NOT EXECUTED 10dc78: f2c0 0011 movt r0, #17 <== NOT EXECUTED 10dc7c: f004 fbf0 bl 112460 <__assert_func> <== NOT EXECUTED =============================================================================== 0010df08 : { 10df08: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 10df0c: 4615 mov r5, r2 10df0e: b084 sub sp, #16 uint32_t c = 0; 10df10: 2200 movs r2, #0 10df12: 9202 str r2, [sp, #8] if ( count == 0 ) 10df14: 2b00 cmp r3, #0 10df16: d055 beq.n 10dfc4 <== ALWAYS TAKEN if (start >= fat_fd->size_limit) 10df18: 694c ldr r4, [r1, #20] 10df1a: 460f mov r7, r1 10df1c: 42ac cmp r4, r5 10df1e: f240 808d bls.w 10e03c <== ALWAYS TAKEN bool zero_fill = start > fat_fd->fat_file_size; 10df22: 698a ldr r2, [r1, #24] if (count > fat_fd->size_limit - start) 10df24: 1b64 subs r4, r4, r5 10df26: 429c cmp r4, r3 10df28: 4606 mov r6, r0 10df2a: bf28 it cs 10df2c: 461c movcs r4, r3 rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 10df2e: ab02 add r3, sp, #8 10df30: 42aa cmp r2, r5 10df32: eb05 0804 add.w r8, r5, r4 10df36: bf2c ite cs 10df38: 2200 movcs r2, #0 10df3a: 2201 movcc r2, #1 10df3c: 9300 str r3, [sp, #0] 10df3e: 4643 mov r3, r8 10df40: f7ff ff1a bl 10dd78 if (RC_OK == rc) 10df44: 2800 cmp r0, #0 10df46: d13a bne.n 10dfbe if (c != (start + count)) 10df48: 9b02 ldr r3, [sp, #8] 10df4a: 4598 cmp r8, r3 cln += (start >> fs_info->vol.bpc_log2); 10df4c: f896 800c ldrb.w r8, [r6, #12] count = c - start; 10df50: bf18 it ne 10df52: 1b5c subne r4, r3, r5 return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 10df54: 6a3b ldr r3, [r7, #32] 10df56: 2b01 cmp r3, #1 cln += (start >> fs_info->vol.bpc_log2); 10df58: fa25 f908 lsr.w r9, r5, r8 return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 10df5c: d047 beq.n 10dfee uint32_t cur_cln = 0; 10df5e: 2300 movs r3, #0 rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 10df60: 464a mov r2, r9 uint32_t cur_cln = 0; 10df62: 9303 str r3, [sp, #12] rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 10df64: 4639 mov r1, r7 10df66: ab03 add r3, sp, #12 10df68: 4630 mov r0, r6 10df6a: f7ff fc6b bl 10d844 if (RC_OK == rc) 10df6e: bb20 cbnz r0, 10dfba uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 10df70: fa09 f208 lsl.w r2, r9, r8 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 10df74: 4680 mov r8, r0 uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 10df76: 1aaa subs r2, r5, r2 uint32_t cmpltd = 0; 10df78: 4605 mov r5, r0 ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10df7a: f102 3aff add.w sl, r2, #4294967295 ; 0xffffffff while ( (RC_OK == rc) 10df7e: 2c00 cmp r4, #0 10df80: d055 beq.n 10e02e <== ALWAYS TAKEN c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 10df82: 68b3 ldr r3, [r6, #8] ret = fat_cluster_write(fs_info, 10df84: 4630 mov r0, r6 &buf[cmpltd]); 10df86: 990c ldr r1, [sp, #48] ; 0x30 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 10df88: 1a9b subs r3, r3, r2 ret = fat_cluster_write(fs_info, 10df8a: 42a3 cmp r3, r4 &buf[cmpltd]); 10df8c: 4429 add r1, r5 ret = fat_cluster_write(fs_info, 10df8e: bf28 it cs 10df90: 4623 movcs r3, r4 10df92: 9100 str r1, [sp, #0] 10df94: 9903 ldr r1, [sp, #12] 10df96: f7fe fe6f bl 10cc78 if (0 > ret) 10df9a: 2800 cmp r0, #0 10df9c: db3d blt.n 10e01a <== ALWAYS TAKEN if (0 < bytes_to_write) 10df9e: 1a24 subs r4, r4, r0 save_cln = cur_cln; 10dfa0: f8dd 800c ldr.w r8, [sp, #12] cmpltd += ret; 10dfa4: 4405 add r5, r0 if (0 < bytes_to_write) 10dfa6: d111 bne.n 10dfcc ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10dfa8: 7b32 ldrb r2, [r6, #12] 10dfaa: eb05 030a add.w r3, r5, sl return cmpltd; 10dfae: 4628 mov r0, r5 fat_fd->map.disk_cln = save_cln; 10dfb0: f8c7 8038 str.w r8, [r7, #56] ; 0x38 ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10dfb4: 40d3 lsrs r3, r2 fat_fd->map.file_cln = start_cln + 10dfb6: 444b add r3, r9 10dfb8: 637b str r3, [r7, #52] ; 0x34 if (0 > ret) 10dfba: 2800 cmp r0, #0 10dfbc: db2a blt.n 10e014 <== ALWAYS TAKEN } 10dfbe: b004 add sp, #16 10dfc0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} return cmpltd; 10dfc4: 4618 mov r0, r3 <== NOT EXECUTED } 10dfc6: b004 add sp, #16 <== NOT EXECUTED 10dfc8: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10dfcc: aa03 add r2, sp, #12 10dfce: 4641 mov r1, r8 10dfd0: 4630 mov r0, r6 10dfd2: f7ff fa27 bl 10d424 ofs_cln = 0; 10dfd6: 2200 movs r2, #0 while ( (RC_OK == rc) 10dfd8: 2800 cmp r0, #0 10dfda: d0d2 beq.n 10df82 <== NEVER TAKEN ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10dfdc: 7b32 ldrb r2, [r6, #12] <== NOT EXECUTED 10dfde: eb05 030a add.w r3, r5, sl <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 10dfe2: f8c7 8038 str.w r8, [r7, #56] ; 0x38 <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10dfe6: 40d3 lsrs r3, r2 <== NOT EXECUTED fat_fd->map.file_cln = start_cln + 10dfe8: 444b add r3, r9 <== NOT EXECUTED 10dfea: 637b str r3, [r7, #52] ; 0x34 <== NOT EXECUTED if (RC_OK != rc) 10dfec: e7e5 b.n 10dfba <== NOT EXECUTED return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 10dfee: 6a7b ldr r3, [r7, #36] ; 0x24 10dff0: 2b00 cmp r3, #0 10dff2: d1b4 bne.n 10df5e <== ALWAYS TAKEN 10dff4: 7db3 ldrb r3, [r6, #22] 10dff6: 079b lsls r3, r3, #30 10dff8: d0b1 beq.n 10df5e byte = start & (fs_info->vol.bpc -1); 10dffa: 68b2 ldr r2, [r6, #8] ret = fat_cluster_write(fs_info, 10dffc: 4623 mov r3, r4 cln = fat_fd->cln; 10dffe: 69f9 ldr r1, [r7, #28] ret = fat_cluster_write(fs_info, 10e000: 4630 mov r0, r6 10e002: 9c0c ldr r4, [sp, #48] ; 0x30 byte = start & (fs_info->vol.bpc -1); 10e004: 3a01 subs r2, #1 ret = fat_cluster_write(fs_info, 10e006: 4449 add r1, r9 10e008: 402a ands r2, r5 10e00a: 9400 str r4, [sp, #0] 10e00c: f7fe fe34 bl 10cc78 if (0 > ret) 10e010: 2800 cmp r0, #0 10e012: dad4 bge.n 10dfbe <== NEVER TAKEN rc = -1; 10e014: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10e018: e7d1 b.n 10dfbe <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10e01a: 4455 add r5, sl <== NOT EXECUTED 10e01c: f896 a00c ldrb.w sl, [r6, #12] <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 10e020: f8c7 8038 str.w r8, [r7, #56] ; 0x38 <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10e024: fa25 f50a lsr.w r5, r5, sl <== NOT EXECUTED fat_fd->map.file_cln = start_cln + 10e028: 444d add r5, r9 <== NOT EXECUTED 10e02a: 637d str r5, [r7, #52] ; 0x34 <== NOT EXECUTED if (0 > ret) 10e02c: e7f2 b.n 10e014 <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10e02e: 7b33 ldrb r3, [r6, #12] <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 10e030: 63b8 str r0, [r7, #56] ; 0x38 <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 10e032: fa2a f303 lsr.w r3, sl, r3 <== NOT EXECUTED fat_fd->map.file_cln = start_cln + 10e036: 444b add r3, r9 <== NOT EXECUTED 10e038: 637b str r3, [r7, #52] ; 0x34 <== NOT EXECUTED if (0 > ret) 10e03a: e7c0 b.n 10dfbe <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EFBIG); 10e03c: f006 fe20 bl 114c80 <__errno> <== NOT EXECUTED 10e040: 221b movs r2, #27 <== NOT EXECUTED 10e042: 4603 mov r3, r0 <== NOT EXECUTED 10e044: 601a str r2, [r3, #0] <== NOT EXECUTED 10e046: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10e04a: e7b8 b.n 10dfbe <== NOT EXECUTED =============================================================================== 0010e9e4 : sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 10e9e4: 6a0b ldr r3, [r1, #32] uint32_t le_new_length = 0; 10e9e6: 2200 movs r2, #0 { 10e9e8: b510 push {r4, lr} 10e9ea: b084 sub sp, #16 10e9ec: 468c mov ip, r1 uint32_t le_new_length = 0; 10e9ee: 9203 str r2, [sp, #12] if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e9f0: b923 cbnz r3, 10e9fc 10e9f2: 7d82 ldrb r2, [r0, #22] 10e9f4: 0792 lsls r2, r2, #30 return fs_info->vol.rdir_loc; 10e9f6: bf18 it ne 10e9f8: 6a83 ldrne r3, [r0, #40] ; 0x28 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e9fa: d104 bne.n 10ea06 <== NEVER TAKEN return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10e9fc: 7942 ldrb r2, [r0, #5] 10e9fe: 3b02 subs r3, #2 10ea00: 6bc1 ldr r1, [r0, #60] ; 0x3c 10ea02: 4093 lsls r3, r2 10ea04: 440b add r3, r1 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10ea06: f8dc 4024 ldr.w r4, [ip, #36] ; 0x24 10ea0a: 7881 ldrb r1, [r0, #2] byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 10ea0c: 8802 ldrh r2, [r0, #0] sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10ea0e: fa24 f101 lsr.w r1, r4, r1 byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1)); 10ea12: 3a01 subs r2, #1 10ea14: 4022 ands r2, r4 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10ea16: 4419 add r1, r3 if (fat_fd->fat_file_type == FAT_DIRECTORY) { 10ea18: f8dc 3010 ldr.w r3, [ip, #16] 10ea1c: b113 cbz r3, 10ea24 le_new_length = CT_LE_L(fat_fd->fat_file_size); 10ea1e: f8dc 3018 ldr.w r3, [ip, #24] 10ea22: 9303 str r3, [sp, #12] ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4, 10ea24: ac03 add r4, sp, #12 10ea26: 2304 movs r3, #4 10ea28: 321c adds r2, #28 10ea2a: 9400 str r4, [sp, #0] 10ea2c: f7fe f880 bl 10cb30 } 10ea30: 17c0 asrs r0, r0, #31 10ea32: b004 add sp, #16 10ea34: bd10 pop {r4, pc} 10ea36: bf00 nop =============================================================================== 0010e970 : { 10e970: b5f0 push {r4, r5, r6, r7, lr} uint16_t le_cl_hi = 0; 10e972: 2200 movs r2, #0 uint32_t new_cln = fat_fd->cln; 10e974: e9d1 7307 ldrd r7, r3, [r1, #28] { 10e978: b085 sub sp, #20 10e97a: 4604 mov r4, r0 uint16_t le_cl_hi = 0; 10e97c: f8ad 200e strh.w r2, [sp, #14] if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e980: b923 cbnz r3, 10e98c 10e982: 7d82 ldrb r2, [r0, #22] 10e984: 0792 lsls r2, r2, #30 return fs_info->vol.rdir_loc; 10e986: bf18 it ne 10e988: 6a83 ldrne r3, [r0, #40] ; 0x28 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e98a: d104 bne.n 10e996 <== NEVER TAKEN return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10e98c: 7962 ldrb r2, [r4, #5] 10e98e: 3b02 subs r3, #2 10e990: 4093 lsls r3, r2 10e992: 6be2 ldr r2, [r4, #60] ; 0x3c 10e994: 4413 add r3, r2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e996: 6a4a ldr r2, [r1, #36] ; 0x24 ret1 = fat_sector_write(fs_info, sec, 10e998: 4620 mov r0, r4 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e99a: 78a5 ldrb r5, [r4, #2] byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 10e99c: 8826 ldrh r6, [r4, #0] le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF)); 10e99e: f8ad 700c strh.w r7, [sp, #12] le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 10e9a2: 0c3f lsrs r7, r7, #16 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e9a4: fa22 f505 lsr.w r5, r2, r5 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 10e9a8: 3e01 subs r6, #1 10e9aa: 4016 ands r6, r2 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e9ac: 441d add r5, r3 ret1 = fat_sector_write(fs_info, sec, 10e9ae: ab03 add r3, sp, #12 10e9b0: f106 021a add.w r2, r6, #26 10e9b4: 4629 mov r1, r5 10e9b6: 9300 str r3, [sp, #0] 10e9b8: 2302 movs r3, #2 10e9ba: f7fe f8b9 bl 10cb30 10e9be: 4603 mov r3, r0 ret2 = fat_sector_write(fs_info, sec, 10e9c0: 4620 mov r0, r4 ret1 = fat_sector_write(fs_info, sec, 10e9c2: 461c mov r4, r3 ret2 = fat_sector_write(fs_info, sec, 10e9c4: f10d 030e add.w r3, sp, #14 10e9c8: 9300 str r3, [sp, #0] 10e9ca: f106 0214 add.w r2, r6, #20 10e9ce: 4629 mov r1, r5 10e9d0: 2302 movs r3, #2 le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16)); 10e9d2: f8ad 700e strh.w r7, [sp, #14] ret2 = fat_sector_write(fs_info, sec, 10e9d6: f7fe f8ab bl 10cb30 if ( (ret1 < 0) || (ret2 < 0) ) 10e9da: 4320 orrs r0, r4 } 10e9dc: 17c0 asrs r0, r0, #31 10e9de: b005 add sp, #20 10e9e0: bdf0 pop {r4, r5, r6, r7, pc} 10e9e2: bf00 nop =============================================================================== 0010e89c : sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln); 10e89c: 6a0b ldr r3, [r1, #32] { 10e89e: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 10e8a2: 4689 mov r9, r1 10e8a4: b085 sub sp, #20 10e8a6: 4604 mov r4, r0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e8a8: b923 cbnz r3, 10e8b4 10e8aa: 7d82 ldrb r2, [r0, #22] 10e8ac: 0792 lsls r2, r2, #30 return fs_info->vol.rdir_loc; 10e8ae: bf18 it ne 10e8b0: 6a83 ldrne r3, [r0, #40] ; 0x28 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 10e8b2: d104 bne.n 10e8be <== NEVER TAKEN return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 10e8b4: 7962 ldrb r2, [r4, #5] 10e8b6: 3b02 subs r3, #2 10e8b8: 6be5 ldr r5, [r4, #60] ; 0x3c 10e8ba: 4093 lsls r3, r2 10e8bc: 442b add r3, r5 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e8be: f8d9 2024 ldr.w r2, [r9, #36] ; 0x24 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 10e8c2: f10d 070e add.w r7, sp, #14 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e8c6: 78a5 ldrb r5, [r4, #2] msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 10e8c8: 4639 mov r1, r7 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 10e8ca: 8826 ldrh r6, [r4, #0] msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 10e8cc: f8d9 0048 ldr.w r0, [r9, #72] ; 0x48 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e8d0: fa22 f505 lsr.w r5, r2, r5 byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1); 10e8d4: 3e01 subs r6, #1 10e8d6: 4016 ands r6, r2 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 10e8d8: aa03 add r2, sp, #12 sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2); 10e8da: 441d add r5, r3 msdos_date_unix2dos(fat_fd->mtime, &date, &time_val); 10e8dc: f003 fed6 bl 11268c ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 10e8e0: ab03 add r3, sp, #12 10e8e2: f106 0216 add.w r2, r6, #22 10e8e6: 4629 mov r1, r5 10e8e8: 9300 str r3, [sp, #0] 10e8ea: 4620 mov r0, r4 10e8ec: 2302 movs r3, #2 10e8ee: f7fe f91f bl 10cb30 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 10e8f2: f106 0218 add.w r2, r6, #24 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET, 10e8f6: 4680 mov r8, r0 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET, 10e8f8: 4629 mov r1, r5 10e8fa: 2302 movs r3, #2 10e8fc: 4620 mov r0, r4 10e8fe: 9700 str r7, [sp, #0] 10e900: f7fe f916 bl 10cb30 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET, 10e904: 2302 movs r3, #2 if ( ret < 0 ) 10e906: 2800 cmp r0, #0 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET, 10e908: f106 0212 add.w r2, r6, #18 10e90c: 4629 mov r1, r5 10e90e: 4620 mov r0, r4 10e910: 9700 str r7, [sp, #0] rc = -1; 10e912: bfb4 ite lt 10e914: f04f 38ff movlt.w r8, #4294967295 ; 0xffffffff if ( ret < 0 ) 10e918: ea4f 78e8 movge.w r8, r8, asr #31 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET, 10e91c: f7fe f908 bl 10cb30 msdos_date_unix2dos(fat_fd->ctime, &date, &time_val); 10e920: aa03 add r2, sp, #12 rc = -1; 10e922: 2800 cmp r0, #0 msdos_date_unix2dos(fat_fd->ctime, &date, &time_val); 10e924: 4639 mov r1, r7 10e926: f8d9 0040 ldr.w r0, [r9, #64] ; 0x40 rc = -1; 10e92a: bfb8 it lt 10e92c: f04f 38ff movlt.w r8, #4294967295 ; 0xffffffff msdos_date_unix2dos(fat_fd->ctime, &date, &time_val); 10e930: f003 feac bl 11268c ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET, 10e934: ab03 add r3, sp, #12 10e936: f106 020e add.w r2, r6, #14 10e93a: 4629 mov r1, r5 10e93c: 9300 str r3, [sp, #0] 10e93e: 4620 mov r0, r4 10e940: 2302 movs r3, #2 10e942: f7fe f8f5 bl 10cb30 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 10e946: f106 0210 add.w r2, r6, #16 rc = -1; 10e94a: 2800 cmp r0, #0 ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 10e94c: 4629 mov r1, r5 10e94e: 4620 mov r0, r4 10e950: f04f 0302 mov.w r3, #2 10e954: 9700 str r7, [sp, #0] rc = -1; 10e956: bfb8 it lt 10e958: f04f 38ff movlt.w r8, #4294967295 ; 0xffffffff ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET, 10e95c: f7fe f8e8 bl 10cb30 rc = -1; 10e960: 2800 cmp r0, #0 } 10e962: bfac ite ge 10e964: 4640 movge r0, r8 10e966: f04f 30ff movlt.w r0, #4294967295 ; 0xffffffff 10e96a: b005 add sp, #20 10e96c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} =============================================================================== 0010d680 : while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d680: e9d0 3206 ldrd r3, r2, [r0, #24] { 10d684: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} uint32_t next_cln = 0; 10d688: 2600 movs r6, #0 { 10d68a: b082 sub sp, #8 10d68c: 4604 mov r4, r0 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d68e: 400b ands r3, r1 { 10d690: 4688 mov r8, r1 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d692: 429a cmp r2, r3 uint32_t next_cln = 0; 10d694: 9601 str r6, [sp, #4] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d696: d924 bls.n 10d6e2 <== ALWAYS TAKEN uint32_t cur_cln = chain; 10d698: 460d mov r5, r1 int rc = RC_OK, rc1 = RC_OK; 10d69a: 4637 mov r7, r6 10d69c: e00b b.n 10d6b6 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 10d69e: f7ff ff37 bl 10d510 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d6a2: e9d4 3206 ldrd r3, r2, [r4, #24] if ( rc != RC_OK ) 10d6a6: 2800 cmp r0, #0 10d6a8: bf18 it ne 10d6aa: 4607 movne r7, r0 cur_cln = next_cln; 10d6ac: 9d01 ldr r5, [sp, #4] freed_cls_cnt++; 10d6ae: 3601 adds r6, #1 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d6b0: 402b ands r3, r5 10d6b2: 4293 cmp r3, r2 10d6b4: d216 bcs.n 10d6e4 rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 10d6b6: 4629 mov r1, r5 10d6b8: aa01 add r2, sp, #4 10d6ba: 4620 mov r0, r4 10d6bc: f7ff feb2 bl 10d424 10d6c0: 4602 mov r2, r0 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 10d6c2: 4629 mov r1, r5 10d6c4: 4620 mov r0, r4 if ( rc != RC_OK ) 10d6c6: 2a00 cmp r2, #0 10d6c8: d0e9 beq.n 10d69e <== NEVER TAKEN if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d6ca: 6ce3 ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 10d6cc: 4617 mov r7, r2 <== NOT EXECUTED if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d6ce: 1c59 adds r1, r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 10d6d0: bf1c itt ne <== NOT EXECUTED 10d6d2: 199b addne r3, r3, r6 <== NOT EXECUTED 10d6d4: 64e3 strne r3, [r4, #76] ; 0x4c <== NOT EXECUTED fat_buf_release(fs_info); 10d6d6: f7ff f9cf bl 10ca78 <== NOT EXECUTED } 10d6da: 4638 mov r0, r7 <== NOT EXECUTED 10d6dc: b002 add sp, #8 <== NOT EXECUTED 10d6de: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; 10d6e2: 4637 mov r7, r6 <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d6e4: 6ce3 ldr r3, [r4, #76] ; 0x4c fat_buf_release(fs_info); 10d6e6: 4620 mov r0, r4 fs_info->vol.next_cl = chain; 10d6e8: f8c4 8054 str.w r8, [r4, #84] ; 0x54 if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d6ec: 1c5a adds r2, r3, #1 fs_info->vol.free_cls += freed_cls_cnt; 10d6ee: bf1c itt ne 10d6f0: 199b addne r3, r3, r6 10d6f2: 64e3 strne r3, [r4, #76] ; 0x4c fat_buf_release(fs_info); 10d6f4: f7ff f9c0 bl 10ca78 } 10d6f8: 4638 mov r0, r7 10d6fa: b002 add sp, #8 10d6fc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} =============================================================================== 0010d3ec : 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); 10d3ec: f8d0 3094 ldr.w r3, [r0, #148] ; 0x94 <== NOT EXECUTED 10d3f0: 2201 movs r2, #1 <== NOT EXECUTED { 10d3f2: b410 push {r4} <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 10d3f4: f8d0 4088 ldr.w r4, [r0, #136] ; 0x88 <== NOT EXECUTED 10d3f8: 1ac9 subs r1, r1, r3 <== NOT EXECUTED 10d3fa: 08c8 lsrs r0, r1, #3 <== NOT EXECUTED 10d3fc: f001 0107 and.w r1, r1, #7 <== NOT EXECUTED 10d400: fa02 f101 lsl.w r1, r2, r1 <== NOT EXECUTED 10d404: 5c23 ldrb r3, [r4, r0] <== NOT EXECUTED 10d406: ea23 0101 bic.w r1, r3, r1 <== NOT EXECUTED 10d40a: 5421 strb r1, [r4, r0] <== NOT EXECUTED } 10d40c: f85d 4b04 ldr.w r4, [sp], #4 <== NOT EXECUTED 10d410: 4770 bx lr <== NOT EXECUTED 10d412: bf00 nop =============================================================================== 0010d424 : uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 10d424: 2901 cmp r1, #1 { 10d426: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 10d42a: b082 sub sp, #8 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 10d42c: d928 bls.n 10d480 <== ALWAYS TAKEN 10d42e: 6c03 ldr r3, [r0, #64] ; 0x40 10d430: 460d mov r5, r1 10d432: 4604 mov r4, r0 10d434: 3301 adds r3, #1 10d436: 428b cmp r3, r1 10d438: d322 bcc.n 10d480 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d43a: 7d83 ldrb r3, [r0, #22] 10d43c: 4690 mov r8, r2 10d43e: 7881 ldrb r1, [r0, #2] fs_info->vol.afat_loc; 10d440: 6e02 ldr r2, [r0, #96] ; 0x60 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d442: 07de lsls r6, r3, #31 10d444: d426 bmi.n 10d494 10d446: 0798 lsls r0, r3, #30 10d448: bf4c ite mi 10d44a: ea4f 0a45 movmi.w sl, r5, lsl #1 10d44e: ea4f 0a85 movpl.w sl, r5, lsl #2 10d452: fa2a f101 lsr.w r1, sl, r1 10d456: eb01 0902 add.w r9, r1, r2 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 10d45a: 2201 movs r2, #1 10d45c: ab01 add r3, sp, #4 10d45e: 4649 mov r1, r9 10d460: 4620 mov r0, r4 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d462: 8827 ldrh r7, [r4, #0] rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 10d464: f7ff fac8 bl 10c9f8 if (rc != RC_OK) 10d468: 4606 mov r6, r0 10d46a: b978 cbnz r0, 10d48c return rc; switch ( fs_info->vol.type ) 10d46c: 7da2 ldrb r2, [r4, #22] ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d46e: 3f01 subs r7, #1 10d470: ea07 070a and.w r7, r7, sl switch ( fs_info->vol.type ) 10d474: 2a02 cmp r2, #2 10d476: d014 beq.n 10d4a2 10d478: 2a04 cmp r2, #4 10d47a: d01a beq.n 10d4b2 10d47c: 2a01 cmp r2, #1 10d47e: d020 beq.n 10d4c2 <== NEVER TAKEN *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 10d480: f04f 36ff mov.w r6, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d484: f007 fbfc bl 114c80 <__errno> <== NOT EXECUTED 10d488: 2305 movs r3, #5 <== NOT EXECUTED 10d48a: 6003 str r3, [r0, #0] <== NOT EXECUTED break; } return RC_OK; } 10d48c: 4630 mov r0, r6 <== NOT EXECUTED 10d48e: b002 add sp, #8 <== NOT EXECUTED 10d490: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d494: eb05 0a55 add.w sl, r5, r5, lsr #1 10d498: fa2a f101 lsr.w r1, sl, r1 10d49c: eb01 0902 add.w r9, r1, r2 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d4a0: e7db b.n 10d45a *ret_val = *((uint16_t *)(sec_buf + ofs)); 10d4a2: 9b01 ldr r3, [sp, #4] } 10d4a4: 4630 mov r0, r6 *ret_val = *((uint16_t *)(sec_buf + ofs)); 10d4a6: 5bdb ldrh r3, [r3, r7] 10d4a8: f8c8 3000 str.w r3, [r8] } 10d4ac: b002 add sp, #8 10d4ae: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} *ret_val = *((uint32_t *)(sec_buf + ofs)); 10d4b2: 9b01 ldr r3, [sp, #4] } 10d4b4: 4630 mov r0, r6 *ret_val = *((uint32_t *)(sec_buf + ofs)); 10d4b6: 59db ldr r3, [r3, r7] 10d4b8: f8c8 3000 str.w r3, [r8] } 10d4bc: b002 add sp, #8 10d4be: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} if ( ofs == (fs_info->vol.bps - 1) ) 10d4c2: 8820 ldrh r0, [r4, #0] *ret_val = (*(sec_buf + ofs)); 10d4c4: 9901 ldr r1, [sp, #4] if ( ofs == (fs_info->vol.bps - 1) ) 10d4c6: 3801 subs r0, #1 *ret_val = (*(sec_buf + ofs)); 10d4c8: 5dcb ldrb r3, [r1, r7] if ( ofs == (fs_info->vol.bps - 1) ) 10d4ca: 42b8 cmp r0, r7 *ret_val = (*(sec_buf + ofs)); 10d4cc: f8c8 3000 str.w r3, [r8] if ( ofs == (fs_info->vol.bps - 1) ) 10d4d0: d00e beq.n 10d4f0 *ret_val |= *(sec_buf + ofs + 1) << 8; 10d4d2: 440f add r7, r1 10d4d4: 787a ldrb r2, [r7, #1] 10d4d6: ea43 2302 orr.w r3, r3, r2, lsl #8 if ( FAT_CLUSTER_IS_ODD(cln) ) 10d4da: 07ea lsls r2, r5, #31 *ret_val = (*ret_val) >> FAT12_SHIFT; 10d4dc: bf4c ite mi 10d4de: 091b lsrmi r3, r3, #4 *ret_val = (*ret_val) & FAT_FAT12_MASK; 10d4e0: f3c3 030b ubfxpl r3, r3, #0, #12 } 10d4e4: 4630 mov r0, r6 *ret_val = (*ret_val) & FAT_FAT12_MASK; 10d4e6: f8c8 3000 str.w r3, [r8] } 10d4ea: b002 add sp, #8 10d4ec: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 10d4f0: ab01 add r3, sp, #4 10d4f2: f109 0101 add.w r1, r9, #1 10d4f6: 4620 mov r0, r4 10d4f8: f7ff fa7e bl 10c9f8 if (rc != RC_OK) 10d4fc: b930 cbnz r0, 10d50c *ret_val |= *sec_buf << 8; 10d4fe: 9a01 ldr r2, [sp, #4] 10d500: f8d8 3000 ldr.w r3, [r8] 10d504: 7812 ldrb r2, [r2, #0] 10d506: ea43 2302 orr.w r3, r3, r2, lsl #8 10d50a: e7e6 b.n 10d4da 10d50c: 4606 mov r6, r0 <== NOT EXECUTED 10d50e: e7bd b.n 10d48c <== NOT EXECUTED =============================================================================== 0010d358 : uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 10d358: f8d0 1090 ldr.w r1, [r0, #144] ; 0x90 <== NOT EXECUTED { 10d35c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 10d360: 2500 movs r5, #0 <== NOT EXECUTED { 10d362: 4604 mov r4, r0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 10d364: f06f 4670 mvn.w r6, #4026531840 ; 0xf0000000 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 10d368: b351 cbz r1, 10d3c0 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 10d36a: f8d4 0088 ldr.w r0, [r4, #136] ; 0x88 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 10d36e: f04f 0c00 mov.w ip, #0 <== NOT EXECUTED 10d372: e006 b.n 10d382 <== NOT EXECUTED fs_info->index++; 10d374: 428a cmp r2, r1 <== NOT EXECUTED 10d376: bf28 it cs <== NOT EXECUTED 10d378: 462a movcs r2, r5 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 10d37a: 458c cmp ip, r1 <== NOT EXECUTED fs_info->index++; 10d37c: f8c4 208c str.w r2, [r4, #140] ; 0x8c <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 10d380: d01d beq.n 10d3be <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 10d382: f8d4 308c ldr.w r3, [r4, #140] ; 0x8c <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) 10d386: f10c 0c01 add.w ip, ip, #1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 10d38a: f003 0707 and.w r7, r3, #7 <== NOT EXECUTED fs_info->index++; 10d38e: 1c5a adds r2, r3, #1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 10d390: 08db lsrs r3, r3, #3 <== NOT EXECUTED 10d392: f810 e003 ldrb.w lr, [r0, r3] <== NOT EXECUTED 10d396: 4403 add r3, r0 <== NOT EXECUTED 10d398: fa4e f807 asr.w r8, lr, r7 <== NOT EXECUTED 10d39c: f018 0f01 tst.w r8, #1 <== NOT EXECUTED 10d3a0: d1e8 bne.n 10d374 <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 10d3a2: 2201 movs r2, #1 <== NOT EXECUTED 10d3a4: fa02 f707 lsl.w r7, r2, r7 <== NOT EXECUTED 10d3a8: ea47 0e0e orr.w lr, r7, lr <== NOT EXECUTED 10d3ac: f883 e000 strb.w lr, [r3] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 10d3b0: f8d4 0094 ldr.w r0, [r4, #148] ; 0x94 <== NOT EXECUTED 10d3b4: f8d4 308c ldr.w r3, [r4, #140] ; 0x8c <== NOT EXECUTED 10d3b8: 4418 add r0, r3 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 10d3ba: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 10d3be: 0049 lsls r1, r1, #1 <== NOT EXECUTED 10d3c0: f8d4 3094 ldr.w r3, [r4, #148] ; 0x94 <== NOT EXECUTED 10d3c4: 1af3 subs r3, r6, r3 <== NOT EXECUTED 10d3c6: 428b cmp r3, r1 <== NOT EXECUTED 10d3c8: d90d bls.n 10d3e6 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 10d3ca: f8d4 0088 ldr.w r0, [r4, #136] ; 0x88 <== NOT EXECUTED fs_info->uino_pool_size <<= 1; 10d3ce: f8c4 1090 str.w r1, [r4, #144] ; 0x90 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 10d3d2: f005 f885 bl 1124e0 <== NOT EXECUTED 10d3d6: f8c4 0088 str.w r0, [r4, #136] ; 0x88 <== NOT EXECUTED if (fs_info->uino != NULL) 10d3da: b120 cbz r0, 10d3e6 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 10d3dc: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 <== NOT EXECUTED 10d3e0: f8c4 108c str.w r1, [r4, #140] ; 0x8c <== NOT EXECUTED 10d3e4: e7c0 b.n 10d368 <== NOT EXECUTED return 0; 10d3e6: 2000 movs r0, #0 <== NOT EXECUTED 10d3e8: e7e7 b.n 10d3ba <== NOT EXECUTED 10d3ea: bf00 nop =============================================================================== 0010d310 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 10d310: b570 push {r4, r5, r6, lr} 10d312: b084 sub sp, #16 10d314: 4604 mov r4, r0 ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 10d316: 2500 movs r5, #0 uint32_t cur_cln = start_cln; 10d318: 9103 str r1, [sp, #12] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d31a: e00e b.n 10d33a ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 10d31c: 68a3 ldr r3, [r4, #8] 10d31e: 9500 str r5, [sp, #0] 10d320: f7ff fc3e bl 10cba0 if ( ret != fs_info->vol.bpc ) 10d324: 68a1 ldr r1, [r4, #8] ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 10d326: 4603 mov r3, r0 { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10d328: aa03 add r2, sp, #12 10d32a: 4620 mov r0, r4 if ( ret != fs_info->vol.bpc ) 10d32c: 4299 cmp r1, r3 10d32e: d10e bne.n 10d34e <== ALWAYS TAKEN rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 10d330: 9903 ldr r1, [sp, #12] 10d332: f000 f877 bl 10d424 if ( rc != RC_OK ) 10d336: b940 cbnz r0, 10d34a while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d338: 9903 ldr r1, [sp, #12] 10d33a: 69a3 ldr r3, [r4, #24] ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 10d33c: 2200 movs r2, #0 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d33e: 69e6 ldr r6, [r4, #28] ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 10d340: 4620 mov r0, r4 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 10d342: 400b ands r3, r1 10d344: 42b3 cmp r3, r6 10d346: d3e9 bcc.n 10d31c return rc; } } return rc; 10d348: 4610 mov r0, r2 } 10d34a: b004 add sp, #16 10d34c: bd70 pop {r4, r5, r6, pc} return -1; 10d34e: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED } 10d352: b004 add sp, #16 <== NOT EXECUTED 10d354: bd70 pop {r4, r5, r6, pc} <== NOT EXECUTED 10d356: bf00 nop =============================================================================== 0010cd50 : * 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) { 10cd50: 460a mov r2, r1 10cd52: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 10cd56: 2300 movs r3, #0 { 10cd58: b0a7 sub sp, #156 ; 0x9c 10cd5a: 4604 mov r4, r0 vol->fd = open(device, O_RDWR); 10cd5c: 2102 movs r1, #2 10cd5e: 4610 mov r0, r2 rtems_bdbuf_buffer *block = NULL; 10cd60: 9308 str r3, [sp, #32] vol->fd = open(device, O_RDWR); 10cd62: f7f8 ffe1 bl 105d28 if (vol->fd < 0) 10cd66: 2800 cmp r0, #0 vol->fd = open(device, O_RDWR); 10cd68: 66a0 str r0, [r4, #104] ; 0x68 if (vol->fd < 0) 10cd6a: f2c0 81d4 blt.w 10d116 <== ALWAYS TAKEN { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 10cd6e: a90c add r1, sp, #48 ; 0x30 10cd70: f7f8 fc84 bl 10567c if (rc != 0) 10cd74: 2800 cmp r0, #0 10cd76: f040 81aa bne.w 10d0ce <== ALWAYS TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 10cd7a: 9b10 ldr r3, [sp, #64] ; 0x40 close(vol->fd); 10cd7c: 6ea0 ldr r0, [r4, #104] ; 0x68 if (!S_ISBLK(stat_buf.st_mode)) 10cd7e: f403 4370 and.w r3, r3, #61440 ; 0xf000 10cd82: f5b3 4fc0 cmp.w r3, #24576 ; 0x6000 10cd86: f040 81a3 bne.w 10d0d0 <== ALWAYS TAKEN return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 10cd8a: f244 2109 movw r1, #16905 ; 0x4209 10cd8e: f104 026c add.w r2, r4, #108 ; 0x6c 10cd92: f2c4 0104 movt r1, #16388 ; 0x4004 10cd96: f7ff fa49 bl 10c22c 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) { 10cd9a: 4605 mov r5, r0 10cd9c: 2800 cmp r0, #0 10cd9e: f040 8196 bne.w 10d0ce <== ALWAYS TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } vol->dev = stat_buf.st_rdev; 10cda2: e9dd 6714 ldrd r6, r7, [sp, #80] ; 0x50 /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 10cda6: aa08 add r2, sp, #32 10cda8: 6ee0 ldr r0, [r4, #108] ; 0x6c 10cdaa: 4629 mov r1, r5 vol->dev = stat_buf.st_rdev; 10cdac: e9c4 671c strd r6, r7, [r4, #112] ; 0x70 sc = rtems_bdbuf_read( vol->dd, 0, &block); 10cdb0: f005 f97e bl 1120b0 if (sc != RTEMS_SUCCESSFUL) 10cdb4: 2800 cmp r0, #0 10cdb6: f040 81a4 bne.w 10d102 <== ALWAYS TAKEN { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 10cdba: 9808 ldr r0, [sp, #32] 10cdbc: 69c3 ldr r3, [r0, #28] 10cdbe: 89da ldrh r2, [r3, #14] 10cdc0: f8b3 100b ldrh.w r1, [r3, #11] 10cdc4: f893 b00d ldrb.w fp, [r3, #13] 10cdc8: 9202 str r2, [sp, #8] 10cdca: 7c1a ldrb r2, [r3, #16] 10cdcc: f8b3 8011 ldrh.w r8, [r3, #17] 10cdd0: f8b3 9013 ldrh.w r9, [r3, #19] 10cdd4: 9203 str r2, [sp, #12] 10cdd6: f893 2028 ldrb.w r2, [r3, #40] ; 0x28 10cdda: f8b3 a016 ldrh.w sl, [r3, #22] vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 10cdde: 6a1e ldr r6, [r3, #32] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 10cde0: 6a5f ldr r7, [r3, #36] ; 0x24 memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 10cde2: 9206 str r2, [sp, #24] } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 10cde4: 6ada ldr r2, [r3, #44] ; 0x2c 10cde6: 8e1b ldrh r3, [r3, #48] ; 0x30 10cde8: 9104 str r1, [sp, #16] 10cdea: 9207 str r2, [sp, #28] 10cdec: 9305 str r3, [sp, #20] sc = rtems_bdbuf_release( block); 10cdee: f005 f9ef bl 1121d0 if (sc != RTEMS_SUCCESSFUL) 10cdf2: 9904 ldr r1, [sp, #16] 10cdf4: 2800 cmp r0, #0 10cdf6: f040 8184 bne.w 10d102 <== ALWAYS TAKEN (vol->bps != 1024) && 10cdfa: f5a1 6300 sub.w r3, r1, #2048 ; 0x800 10cdfe: f24f 72ff movw r2, #63487 ; 0xf7ff 10ce02: 401a ands r2, r3 if ( (vol->bps != 512) && 10ce04: f5a1 7000 sub.w r0, r1, #512 ; 0x200 10ce08: f64f 53ff movw r3, #65023 ; 0xfdff vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 10ce0c: 8021 strh r1, [r4, #0] if ( (vol->bps != 512) && 10ce0e: 4003 ands r3, r0 (vol->bps != 2048) && 10ce10: 2a00 cmp r2, #0 10ce12: bf18 it ne 10ce14: 2b00 cmpne r3, #0 10ce16: f040 816a bne.w 10d0ee <== ALWAYS TAKEN for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 10ce1a: 058a lsls r2, r1, #22 10ce1c: ea4f 2351 mov.w r3, r1, lsr #9 10ce20: 70e5 strb r5, [r4, #3] 10ce22: d408 bmi.n 10ce36 <== NEVER TAKEN 10ce24: 2201 movs r2, #1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 10ce26: 105b asrs r3, r3, #1 <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 10ce28: 1c50 adds r0, r2, #1 <== NOT EXECUTED 10ce2a: 4694 mov ip, r2 <== NOT EXECUTED 10ce2c: b2c2 uxtb r2, r0 <== NOT EXECUTED 10ce2e: 07d8 lsls r0, r3, #31 <== NOT EXECUTED 10ce30: d5f9 bpl.n 10ce26 <== NOT EXECUTED 10ce32: f884 c003 strb.w ip, [r4, #3] <== NOT EXECUTED for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 10ce36: 07ca lsls r2, r1, #31 10ce38: f04f 0300 mov.w r3, #0 10ce3c: 70a3 strb r3, [r4, #2] 10ce3e: 460b mov r3, r1 10ce40: d408 bmi.n 10ce54 <== ALWAYS TAKEN 10ce42: 2201 movs r2, #1 i >>= 1, vol->sec_log2++); 10ce44: 105b asrs r3, r3, #1 for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 10ce46: 1c50 adds r0, r2, #1 10ce48: 4694 mov ip, r2 10ce4a: b2c2 uxtb r2, r0 10ce4c: 07d8 lsls r0, r3, #31 10ce4e: d5f9 bpl.n 10ce44 10ce50: f884 c002 strb.w ip, [r4, #2] sc = rtems_bdbuf_set_block_size (vol->dd, vol->bps, true); 10ce54: 6ee0 ldr r0, [r4, #108] ; 0x6c 10ce56: 2201 movs r2, #1 10ce58: f005 fa74 bl 112344 if (sc != RTEMS_SUCCESSFUL) 10ce5c: 4603 mov r3, r0 10ce5e: 2800 cmp r0, #0 10ce60: f040 8145 bne.w 10d0ee <== ALWAYS TAKEN vol->bytes_per_block = vol->bps; 10ce64: 8821 ldrh r1, [r4, #0] vol->sectors_per_block = 1; 10ce66: 2001 movs r0, #1 vol->bytes_per_block_log2 = vol->sec_log2; 10ce68: 78a2 ldrb r2, [r4, #2] vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 10ce6a: f884 b004 strb.w fp, [r4, #4] vol->bytes_per_block = vol->bps; 10ce6e: 6121 str r1, [r4, #16] vol->bytes_per_block_log2 = vol->sec_log2; 10ce70: 7522 strb r2, [r4, #20] vol->sectors_per_block = 1; 10ce72: 7360 strb r0, [r4, #13] if (vol->spc == 0) 10ce74: f1bb 0f00 cmp.w fp, #0 10ce78: f000 8139 beq.w 10d0ee <== ALWAYS TAKEN for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 10ce7c: f01b 0f01 tst.w fp, #1 10ce80: 46dc mov ip, fp 10ce82: 7163 strb r3, [r4, #5] 10ce84: d10c bne.n 10cea0 i >>= 1, vol->spc_log2++); 10ce86: ea4f 0c6c mov.w ip, ip, asr #1 for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 10ce8a: f100 0e01 add.w lr, r0, #1 10ce8e: 4603 mov r3, r0 10ce90: fa5f f08e uxtb.w r0, lr 10ce94: f01c 0f01 tst.w ip, #1 10ce98: d0f5 beq.n 10ce86 if (vol->spc != UINT32_C(1) << vol->spc_log2) 10ce9a: 2001 movs r0, #1 10ce9c: 7163 strb r3, [r4, #5] 10ce9e: 4098 lsls r0, r3 10cea0: 4583 cmp fp, r0 10cea2: f040 8124 bne.w 10d0ee <== ALWAYS TAKEN vol->bpc = ((uint32_t) vol->bps) << vol->spc_log2; 10cea6: fa01 f303 lsl.w r3, r1, r3 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 10ceaa: 2000 movs r0, #0 10ceac: 7320 strb r0, [r4, #12] 10ceae: 07d8 lsls r0, r3, #31 vol->bpc = ((uint32_t) vol->bps) << vol->spc_log2; 10ceb0: 60a3 str r3, [r4, #8] for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 10ceb2: d40b bmi.n 10cecc <== ALWAYS TAKEN 10ceb4: 2001 movs r0, #1 i >>= 1, vol->bpc_log2++); 10ceb6: 105b asrs r3, r3, #1 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 10ceb8: f100 0c01 add.w ip, r0, #1 10cebc: 4686 mov lr, r0 10cebe: fa5f f08c uxtb.w r0, ip 10cec2: f013 0f01 tst.w r3, #1 10cec6: d0f6 beq.n 10ceb6 10cec8: f884 e00c strb.w lr, [r4, #12] vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 10cecc: 9b03 ldr r3, [sp, #12] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 10cece: 1e48 subs r0, r1, #1 10ced0: 9204 str r2, [sp, #16] 10ced2: eb00 1048 add.w r0, r0, r8, lsl #5 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 10ced6: 9a02 ldr r2, [sp, #8] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 10ced8: f1ba 0f00 cmp.w sl, #0 10cedc: bf18 it ne 10cede: 4657 movne r7, sl vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 10cee0: 7563 strb r3, [r4, #21] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 10cee2: f1b9 0f00 cmp.w r9, #0 10cee6: bf18 it ne 10cee8: 464e movne r6, r9 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 10ceea: f8a4 802c strh.w r8, [r4, #44] ; 0x2c vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 10ceee: 8422 strh r2, [r4, #32] vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 10cef0: f007 fb56 bl 1145a0 <__divsi3> vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 10cef4: e9dd 2302 ldrd r2, r3, [sp, #8] vol->data_cls = data_secs / vol->spc; 10cef8: 4659 mov r1, fp 10cefa: 6267 str r7, [r4, #36] ; 0x24 10cefc: 63a6 str r6, [r4, #56] ; 0x38 vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 10cefe: fb07 2303 mla r3, r7, r3, r2 vol->rdir_size = vol->rdir_secs << vol->sec_log2; 10cf02: 9a04 ldr r2, [sp, #16] 10cf04: fa00 f202 lsl.w r2, r0, r2 vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 10cf08: 62a3 str r3, [r4, #40] ; 0x28 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 10cf0a: e9c4 020c strd r0, r2, [r4, #48] ; 0x30 vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 10cf0e: 4418 add r0, r3 10cf10: 63e0 str r0, [r4, #60] ; 0x3c vol->data_cls = data_secs / vol->spc; 10cf12: 1a30 subs r0, r6, r0 10cf14: f007 fa08 bl 114328 <__udivsi3> if ( vol->data_cls < FAT_FAT12_MAX_CLN) 10cf18: f640 73f4 movw r3, #4084 ; 0xff4 vol->data_cls = data_secs / vol->spc; 10cf1c: 6420 str r0, [r4, #64] ; 0x40 if ( vol->data_cls < FAT_FAT12_MAX_CLN) 10cf1e: 4298 cmp r0, r3 10cf20: f240 8086 bls.w 10d030 if ( vol->data_cls < FAT_FAT16_MAX_CLN) 10cf24: f64f 73f4 movw r3, #65524 ; 0xfff4 10cf28: 4298 cmp r0, r3 10cf2a: f200 808a bhi.w 10d042 vol->type = FAT_FAT16; 10cf2e: 2102 movs r1, #2 vol->mask = FAT_FAT16_MASK; 10cf30: f64f 72ff movw r2, #65535 ; 0xffff vol->eoc_val = FAT_FAT16_EOC; 10cf34: f64f 73f8 movw r3, #65528 ; 0xfff8 vol->type = FAT_FAT16; 10cf38: 75a1 strb r1, [r4, #22] vol->eoc_val = FAT_FAT16_EOC; 10cf3a: e9c4 2306 strd r2, r3, [r4, #24] } } } else { vol->rdir_cl = 0; 10cf3e: 2300 movs r3, #0 vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 10cf40: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff vol->rdir_cl = 0; 10cf44: 6463 str r3, [r4, #68] ; 0x44 vol->mirror = 0; 10cf46: f884 305c strb.w r3, [r4, #92] ; 0x5c vol->afat = 0; 10cf4a: f884 3064 strb.w r3, [r4, #100] ; 0x64 vol->free_cls = FAT_UNDEFINED_VALUE; 10cf4e: 64e2 str r2, [r4, #76] ; 0x4c vol->next_cl = FAT_UNDEFINED_VALUE; 10cf50: 6562 str r2, [r4, #84] ; 0x54 if (fs_info->c.state == FAT_CACHE_EMPTY) 10cf52: f894 309d ldrb.w r3, [r4, #157] ; 0x9d 10cf56: b113 cbz r3, 10cf5e 10cf58: 4620 mov r0, r4 10cf5a: f7ff fcc3 bl 10c8e4 } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 10cf5e: 6a61 ldr r1, [r4, #36] ; 0x24 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 10cf60: 2002 movs r0, #2 vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 10cf62: f894 2064 ldrb.w r2, [r4, #100] ; 0x64 10cf66: 8c23 ldrh r3, [r4, #32] 10cf68: fb01 3302 mla r3, r1, r2, r3 fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 10cf6c: 210c movs r1, #12 vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 10cf6e: 6623 str r3, [r4, #96] ; 0x60 fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 10cf70: f7ff f8bc bl 10c0ec 10cf74: f8c4 0080 str.w r0, [r4, #128] ; 0x80 if ( fs_info->vhash == NULL ) 10cf78: 2800 cmp r0, #0 10cf7a: f000 80df beq.w 10d13c <== ALWAYS TAKEN return &the_chain->Tail.Node; 10cf7e: 1d03 adds r3, r0, #4 head->previous = NULL; 10cf80: 2600 movs r6, #0 10cf82: e9c0 3600 strd r3, r6, [r0] return &the_chain->Tail.Node; 10cf86: f100 030c add.w r3, r0, #12 tail->previous = head; 10cf8a: 6143 str r3, [r0, #20] return &the_chain->Tail.Node; 10cf8c: f100 0310 add.w r3, r0, #16 head->next = tail; 10cf90: 60c3 str r3, [r0, #12] } 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)); 10cf92: 210c movs r1, #12 tail->previous = head; 10cf94: 6080 str r0, [r0, #8] head->previous = NULL; 10cf96: 6106 str r6, [r0, #16] 10cf98: 2002 movs r0, #2 10cf9a: f7ff f8a7 bl 10c0ec 10cf9e: 4603 mov r3, r0 10cfa0: f8c4 0084 str.w r0, [r4, #132] ; 0x84 if ( fs_info->rhash == NULL ) 10cfa4: 2800 cmp r0, #0 10cfa6: f000 80e9 beq.w 10d17c <== ALWAYS TAKEN return &the_chain->Tail.Node; 10cfaa: 1d02 adds r2, r0, #4 } 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; 10cfac: 78e1 ldrb r1, [r4, #3] head->next = tail; 10cfae: 6002 str r2, [r0, #0] return &the_chain->Tail.Node; 10cfb0: f100 020c add.w r2, r0, #12 tail->previous = head; 10cfb4: 6142 str r2, [r0, #20] fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 10cfb6: f44f 7080 mov.w r0, #256 ; 0x100 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 10cfba: 6ba2 ldr r2, [r4, #56] ; 0x38 fs_info->index = 0; 10cfbc: f8c4 608c str.w r6, [r4, #140] ; 0x8c fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 10cfc0: f8c4 0090 str.w r0, [r4, #144] ; 0x90 head->previous = NULL; 10cfc4: 605e str r6, [r3, #4] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 10cfc6: 408a lsls r2, r1 10cfc8: 611e str r6, [r3, #16] fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 10cfca: 2101 movs r1, #1 tail->previous = head; 10cfcc: 609b str r3, [r3, #8] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 10cfce: 0112 lsls r2, r2, #4 10cfd0: f8c4 2094 str.w r2, [r4, #148] ; 0x94 return &the_chain->Tail.Node; 10cfd4: f103 0210 add.w r2, r3, #16 head->next = tail; 10cfd8: 60da str r2, [r3, #12] fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 10cfda: f7ff f887 bl 10c0ec 10cfde: f8c4 0088 str.w r0, [r4, #136] ; 0x88 if ( fs_info->uino == NULL ) 10cfe2: 2800 cmp r0, #0 10cfe4: f000 80d8 beq.w 10d198 <== ALWAYS TAKEN 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)); 10cfe8: 8820 ldrh r0, [r4, #0] 10cfea: 2101 movs r1, #1 10cfec: f7ff f87e bl 10c0ec 10cff0: f8c4 00a4 str.w r0, [r4, #164] ; 0xa4 if (fs_info->sec_buf == NULL) 10cff4: 2800 cmp r0, #0 10cff6: f000 80ab beq.w 10d150 <== ALWAYS TAKEN return (sec_num & (vol->spc - 1)) == 0; 10cffa: 7923 ldrb r3, [r4, #4] 10cffc: 6be2 ldr r2, [r4, #60] ; 0x3c 10cffe: 3b01 subs r3, #1 /* * 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) 10d000: 4213 tst r3, r2 10d002: d111 bne.n 10d028 <== ALWAYS TAKEN && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 10d004: 7da2 ldrb r2, [r4, #22] 10d006: 2a04 cmp r2, #4 10d008: d002 beq.n 10d010 return (sec_num & (vol->spc - 1)) == 0; 10d00a: 6aa2 ldr r2, [r4, #40] ; 0x28 && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 10d00c: 4213 tst r3, r2 10d00e: d10b bne.n 10d028 <== ALWAYS TAKEN { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 10d010: 68a1 ldr r1, [r4, #8] 10d012: 2201 movs r2, #1 10d014: 6ee0 ldr r0, [r4, #108] ; 0x6c 10d016: f005 f995 bl 112344 if (sc == RTEMS_SUCCESSFUL) 10d01a: b928 cbnz r0, 10d028 { vol->bytes_per_block = vol->bpc; 10d01c: 68a1 ldr r1, [r4, #8] vol->bytes_per_block_log2 = vol->bpc_log2; 10d01e: 7b22 ldrb r2, [r4, #12] vol->sectors_per_block = vol->spc; 10d020: 7923 ldrb r3, [r4, #4] vol->bytes_per_block = vol->bpc; 10d022: 6121 str r1, [r4, #16] vol->bytes_per_block_log2 = vol->bpc_log2; 10d024: 7522 strb r2, [r4, #20] vol->sectors_per_block = vol->spc; 10d026: 7363 strb r3, [r4, #13] } } return RC_OK; } 10d028: 4628 mov r0, r5 10d02a: b027 add sp, #156 ; 0x9c 10d02c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} vol->type = FAT_FAT12; 10d030: 2101 movs r1, #1 vol->mask = FAT_FAT12_MASK; 10d032: f640 72ff movw r2, #4095 ; 0xfff vol->eoc_val = FAT_FAT12_EOC; 10d036: f640 73f8 movw r3, #4088 ; 0xff8 vol->type = FAT_FAT12; 10d03a: 75a1 strb r1, [r4, #22] vol->eoc_val = FAT_FAT12_EOC; 10d03c: e9c4 2306 strd r2, r3, [r4, #24] 10d040: e77d b.n 10cf3e else if ( vol->data_cls < FAT_FAT32_MASK - 1 ) 10d042: f64f 73fd movw r3, #65533 ; 0xfffd 10d046: f6c0 73ff movt r3, #4095 ; 0xfff 10d04a: 4298 cmp r0, r3 10d04c: d84f bhi.n 10d0ee <== ALWAYS TAKEN vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 10d04e: 9b07 ldr r3, [sp, #28] vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 10d050: 9a06 ldr r2, [sp, #24] vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 10d052: 6463 str r3, [r4, #68] ; 0x44 vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 10d054: f022 037f bic.w r3, r2, #127 ; 0x7f 10d058: f884 305c strb.w r3, [r4, #92] ; 0x5c vol->eoc_val = FAT_FAT32_EOC; 10d05c: f64f 73f8 movw r3, #65528 ; 0xfff8 10d060: f6c0 73ff movt r3, #4095 ; 0xfff 10d064: 61e3 str r3, [r4, #28] vol->type = FAT_FAT32; 10d066: 2304 movs r3, #4 10d068: 75a3 strb r3, [r4, #22] vol->mask = FAT_FAT32_MASK; 10d06a: f06f 4370 mvn.w r3, #4026531840 ; 0xf0000000 10d06e: 61a3 str r3, [r4, #24] if (vol->mirror) 10d070: 0613 lsls r3, r2, #24 vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 10d072: bf4a itet mi 10d074: 9b06 ldrmi r3, [sp, #24] vol->afat = 0; 10d076: 2300 movpl r3, #0 vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 10d078: f003 030f andmi.w r3, r3, #15 10d07c: f884 3064 strb.w r3, [r4, #100] ; 0x64 vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 10d080: 9b05 ldr r3, [sp, #20] 10d082: f8a4 3048 strh.w r3, [r4, #72] ; 0x48 if( vol->info_sec == 0 ) 10d086: b393 cbz r3, 10d0ee ret = _fat_block_read(fs_info, vol->info_sec , 0, 10d088: ae09 add r6, sp, #36 ; 0x24 10d08a: 9905 ldr r1, [sp, #20] 10d08c: 2304 movs r3, #4 10d08e: 2200 movs r2, #0 10d090: 4620 mov r0, r4 10d092: 9600 str r6, [sp, #0] 10d094: f7ff fcf8 bl 10ca88 <_fat_block_read> if ( ret < 0 ) 10d098: 2800 cmp r0, #0 10d09a: db49 blt.n 10d130 <== ALWAYS TAKEN if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 10d09c: 9a09 ldr r2, [sp, #36] ; 0x24 10d09e: f245 2352 movw r3, #21074 ; 0x5252 10d0a2: f2c4 1361 movt r3, #16737 ; 0x4161 10d0a6: 429a cmp r2, r3 10d0a8: d11b bne.n 10d0e2 <== ALWAYS TAKEN ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 10d0aa: f8b4 1048 ldrh.w r1, [r4, #72] ; 0x48 10d0ae: 230c movs r3, #12 10d0b0: f44f 72f2 mov.w r2, #484 ; 0x1e4 10d0b4: 4620 mov r0, r4 10d0b6: 9600 str r6, [sp, #0] 10d0b8: f7ff fce6 bl 10ca88 <_fat_block_read> if ( ret < 0 ) 10d0bc: 2800 cmp r0, #0 10d0be: db31 blt.n 10d124 <== ALWAYS TAKEN FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 10d0c0: e9dd 230a ldrd r2, r3, [sp, #40] ; 0x28 vol->free_cls = vol->free_cls_in_fs_info; 10d0c4: e9c4 2213 strd r2, r2, [r4, #76] ; 0x4c vol->next_cl = vol->next_cl_in_fs_info; 10d0c8: e9c4 3315 strd r3, r3, [r4, #84] ; 0x54 10d0cc: e741 b.n 10cf52 close(vol->fd); 10d0ce: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 10d0d0: f7f8 fa06 bl 1054e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 10d0d4: f007 fdd4 bl 114c80 <__errno> <== NOT EXECUTED 10d0d8: 2306 movs r3, #6 <== NOT EXECUTED 10d0da: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d0de: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d0e0: e7a2 b.n 10d028 <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) 10d0e2: f894 309d ldrb.w r3, [r4, #157] ; 0x9d <== NOT EXECUTED 10d0e6: b113 cbz r3, 10d0ee <== NOT EXECUTED 10d0e8: 4620 mov r0, r4 <== NOT EXECUTED 10d0ea: f7ff fbfb bl 10c8e4 <== NOT EXECUTED close(vol->fd); 10d0ee: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10d0f0: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d0f4: f7f8 f9f4 bl 1054e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10d0f8: f007 fdc2 bl 114c80 <__errno> <== NOT EXECUTED 10d0fc: 2316 movs r3, #22 <== NOT EXECUTED 10d0fe: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d100: e792 b.n 10d028 <== NOT EXECUTED close(vol->fd); 10d102: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 10d104: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d108: f7f8 f9ea bl 1054e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 10d10c: f007 fdb8 bl 114c80 <__errno> <== NOT EXECUTED 10d110: 2305 movs r3, #5 <== NOT EXECUTED 10d112: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d114: e788 b.n 10d028 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 10d116: f007 fdb3 bl 114c80 <__errno> <== NOT EXECUTED 10d11a: 2306 movs r3, #6 <== NOT EXECUTED 10d11c: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d120: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d122: e781 b.n 10d028 <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) 10d124: f894 309d ldrb.w r3, [r4, #157] ; 0x9d <== NOT EXECUTED 10d128: b113 cbz r3, 10d130 <== NOT EXECUTED 10d12a: 4620 mov r0, r4 <== NOT EXECUTED 10d12c: f7ff fbda bl 10c8e4 <== NOT EXECUTED close(vol->fd); 10d130: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED return -1; 10d132: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d136: f7f8 f9d3 bl 1054e0 <== NOT EXECUTED return -1; 10d13a: e775 b.n 10d028 <== NOT EXECUTED close(vol->fd); 10d13c: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d13e: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d142: f7f8 f9cd bl 1054e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d146: f007 fd9b bl 114c80 <__errno> <== NOT EXECUTED 10d14a: 230c movs r3, #12 <== NOT EXECUTED 10d14c: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d14e: e76b b.n 10d028 <== NOT EXECUTED close(vol->fd); 10d150: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d152: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d156: f7f8 f9c3 bl 1054e0 <== NOT EXECUTED free(fs_info->vhash); 10d15a: f8d4 0080 ldr.w r0, [r4, #128] ; 0x80 <== NOT EXECUTED 10d15e: f7f8 fa41 bl 1055e4 <== NOT EXECUTED free(fs_info->rhash); 10d162: f8d4 0084 ldr.w r0, [r4, #132] ; 0x84 <== NOT EXECUTED 10d166: f7f8 fa3d bl 1055e4 <== NOT EXECUTED free(fs_info->uino); 10d16a: f8d4 0088 ldr.w r0, [r4, #136] ; 0x88 <== NOT EXECUTED 10d16e: f7f8 fa39 bl 1055e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d172: f007 fd85 bl 114c80 <__errno> <== NOT EXECUTED 10d176: 230c movs r3, #12 <== NOT EXECUTED 10d178: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d17a: e755 b.n 10d028 <== NOT EXECUTED close(vol->fd); 10d17c: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d17e: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d182: f7f8 f9ad bl 1054e0 <== NOT EXECUTED free(fs_info->vhash); 10d186: f8d4 0080 ldr.w r0, [r4, #128] ; 0x80 <== NOT EXECUTED 10d18a: f7f8 fa2b bl 1055e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d18e: f007 fd77 bl 114c80 <__errno> <== NOT EXECUTED 10d192: 230c movs r3, #12 <== NOT EXECUTED 10d194: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d196: e747 b.n 10d028 <== NOT EXECUTED close(vol->fd); 10d198: 6ea0 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d19a: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff <== NOT EXECUTED close(vol->fd); 10d19e: f7f8 f99f bl 1054e0 <== NOT EXECUTED free(fs_info->vhash); 10d1a2: f8d4 0080 ldr.w r0, [r4, #128] ; 0x80 <== NOT EXECUTED 10d1a6: f7f8 fa1d bl 1055e4 <== NOT EXECUTED free(fs_info->rhash); 10d1aa: f8d4 0084 ldr.w r0, [r4, #132] ; 0x84 <== NOT EXECUTED 10d1ae: f7f8 fa19 bl 1055e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d1b2: f007 fd65 bl 114c80 <__errno> <== NOT EXECUTED 10d1b6: 230c movs r3, #12 <== NOT EXECUTED 10d1b8: 6003 str r3, [r0, #0] <== NOT EXECUTED 10d1ba: e735 b.n 10d028 <== NOT EXECUTED =============================================================================== 0010d700 : { 10d700: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10d704: b087 sub sp, #28 10d706: 461f mov r7, r3 10d708: f89d 3044 ldrb.w r3, [sp, #68] ; 0x44 *cls_added = 0; 10d70c: f04f 0900 mov.w r9, #0 while (*cls_added != count && i < data_cls_val) 10d710: 4692 mov sl, r2 if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 10d712: 6d44 ldr r4, [r0, #84] ; 0x54 { 10d714: 4606 mov r6, r0 10d716: e9cd 3102 strd r3, r1, [sp, #8] uint32_t data_cls_val = fs_info->vol.data_cls + 2; 10d71a: 6c03 ldr r3, [r0, #64] ; 0x40 if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls) 10d71c: 1ea2 subs r2, r4, #2 *cls_added = 0; 10d71e: f8c7 9000 str.w r9, [r7] uint32_t data_cls_val = fs_info->vol.data_cls + 2; 10d722: f103 0802 add.w r8, r3, #2 uint32_t cl4find = 2; 10d726: 4293 cmp r3, r2 10d728: bf98 it ls 10d72a: 2402 movls r4, #2 while (*cls_added != count && i < data_cls_val) 10d72c: 45ca cmp sl, r9 10d72e: bf18 it ne 10d730: f1b8 0f02 cmpne.w r8, #2 10d734: d95b bls.n 10d7ee <== ALWAYS TAKEN uint32_t i = 2; 10d736: 2502 movs r5, #2 uint32_t save_cln = FAT_UNDEFINED_VALUE; 10d738: f04f 3bff mov.w fp, #4294967295 ; 0xffffffff 10d73c: e017 b.n 10d76e *chain = cl4find; 10d73e: 9b03 ldr r3, [sp, #12] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 10d740: 4621 mov r1, r4 10d742: 4630 mov r0, r6 *chain = cl4find; 10d744: 601c str r4, [r3, #0] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 10d746: f7ff fee3 bl 10d510 if ( rc != RC_OK ) 10d74a: 2800 cmp r0, #0 10d74c: d177 bne.n 10d83e <== ALWAYS TAKEN if (zero_fill) 10d74e: 9b02 ldr r3, [sp, #8] 10d750: 2b00 cmp r3, #0 10d752: d13e bne.n 10d7d2 (*cls_added)++; 10d754: 683b ldr r3, [r7, #0] 10d756: 46a3 mov fp, r4 10d758: 3301 adds r3, #1 10d75a: 603b str r3, [r7, #0] cl4find++; 10d75c: 3401 adds r4, #1 i++; 10d75e: 3501 adds r5, #1 cl4find = 2; 10d760: 45a0 cmp r8, r4 10d762: bf98 it ls 10d764: 2402 movls r4, #2 while (*cls_added != count && i < data_cls_val) 10d766: 459a cmp sl, r3 10d768: bf18 it ne 10d76a: 45a8 cmpne r8, r5 10d76c: d941 bls.n 10d7f2 rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 10d76e: aa05 add r2, sp, #20 10d770: 4621 mov r1, r4 10d772: 4630 mov r0, r6 uint32_t next_cln = 0; 10d774: f8cd 9014 str.w r9, [sp, #20] rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 10d778: f7ff fe54 bl 10d424 if ( rc != RC_OK ) 10d77c: 2800 cmp r0, #0 10d77e: d14d bne.n 10d81c <== ALWAYS TAKEN if (next_cln == FAT_GENFAT_FREE) 10d780: 9a05 ldr r2, [sp, #20] if (*cls_added != 0) 10d782: 683b ldr r3, [r7, #0] if (next_cln == FAT_GENFAT_FREE) 10d784: 2a00 cmp r2, #0 10d786: d1e9 bne.n 10d75c rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 10d788: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff if (*cls_added == 0) 10d78c: 2b00 cmp r3, #0 10d78e: d0d6 beq.n 10d73e rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 10d790: 4621 mov r1, r4 10d792: 4630 mov r0, r6 10d794: f7ff febc bl 10d510 if ( rc != RC_OK ) 10d798: 2800 cmp r0, #0 10d79a: d14e bne.n 10d83a <== ALWAYS TAKEN rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 10d79c: 4659 mov r1, fp 10d79e: 4622 mov r2, r4 10d7a0: 4630 mov r0, r6 10d7a2: f7ff feb5 bl 10d510 if ( rc != RC_OK ) 10d7a6: 2800 cmp r0, #0 10d7a8: d0d1 beq.n 10d74e <== NEVER TAKEN 10d7aa: 4603 mov r3, r0 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 10d7ac: 9302 str r3, [sp, #8] <== NOT EXECUTED 10d7ae: 4630 mov r0, r6 <== NOT EXECUTED 10d7b0: 9b03 ldr r3, [sp, #12] <== NOT EXECUTED 10d7b2: 6819 ldr r1, [r3, #0] <== NOT EXECUTED 10d7b4: f7ff ff64 bl 10d680 <== NOT EXECUTED (void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 10d7b8: 2200 movs r2, #0 <== NOT EXECUTED 10d7ba: 4621 mov r1, r4 <== NOT EXECUTED 10d7bc: 4630 mov r0, r6 <== NOT EXECUTED 10d7be: f7ff fea7 bl 10d510 <== NOT EXECUTED fat_buf_release(fs_info); 10d7c2: 4630 mov r0, r6 <== NOT EXECUTED 10d7c4: f7ff f958 bl 10ca78 <== NOT EXECUTED return rc; 10d7c8: 9b02 ldr r3, [sp, #8] <== NOT EXECUTED } 10d7ca: 4618 mov r0, r3 <== NOT EXECUTED 10d7cc: b007 add sp, #28 <== NOT EXECUTED 10d7ce: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED fat_cluster_set(fs_info, cl4find, 0, fs_info->vol.bpc, 0); 10d7d2: f8cd 9000 str.w r9, [sp] 10d7d6: 2200 movs r2, #0 10d7d8: 68b3 ldr r3, [r6, #8] 10d7da: 4621 mov r1, r4 10d7dc: 4630 mov r0, r6 10d7de: f7ff f9df bl 10cba0 if (fs_info->vol.bpc != bytes_written) 10d7e2: 68b3 ldr r3, [r6, #8] 10d7e4: 4283 cmp r3, r0 10d7e6: d0b5 beq.n 10d754 <== NEVER TAKEN rc = -1; 10d7e8: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d7ec: e7de b.n 10d7ac <== NOT EXECUTED uint32_t save_cln = FAT_UNDEFINED_VALUE; 10d7ee: f04f 3bff mov.w fp, #4294967295 ; 0xffffffff <== NOT EXECUTED *last_cl = save_cln; 10d7f2: 9b10 ldr r3, [sp, #64] ; 0x40 fat_buf_release(fs_info); 10d7f4: 4630 mov r0, r6 *last_cl = save_cln; 10d7f6: f8c3 b000 str.w fp, [r3] if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d7fa: 6cf3 ldr r3, [r6, #76] ; 0x4c fs_info->vol.next_cl = save_cln; 10d7fc: f8c6 b054 str.w fp, [r6, #84] ; 0x54 if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 10d800: 1c5a adds r2, r3, #1 fs_info->vol.free_cls -= (*cls_added); 10d802: bf1e ittt ne 10d804: 683a ldrne r2, [r7, #0] 10d806: 1a9b subne r3, r3, r2 10d808: 64f3 strne r3, [r6, #76] ; 0x4c return RC_OK; 10d80a: 2300 movs r3, #0 10d80c: 9302 str r3, [sp, #8] fat_buf_release(fs_info); 10d80e: f7ff f933 bl 10ca78 return RC_OK; 10d812: 9b02 ldr r3, [sp, #8] } 10d814: 4618 mov r0, r3 10d816: b007 add sp, #28 10d818: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} if (*cls_added != 0) 10d81c: 683a ldr r2, [r7, #0] <== NOT EXECUTED 10d81e: 4603 mov r3, r0 <== NOT EXECUTED 10d820: 2a00 cmp r2, #0 <== NOT EXECUTED 10d822: d0f7 beq.n 10d814 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 10d824: 9302 str r3, [sp, #8] <== NOT EXECUTED 10d826: 4630 mov r0, r6 <== NOT EXECUTED 10d828: 9b03 ldr r3, [sp, #12] <== NOT EXECUTED 10d82a: 6819 ldr r1, [r3, #0] <== NOT EXECUTED 10d82c: f7ff ff28 bl 10d680 <== NOT EXECUTED return rc; 10d830: 9b02 ldr r3, [sp, #8] <== NOT EXECUTED } 10d832: 4618 mov r0, r3 <== NOT EXECUTED 10d834: b007 add sp, #28 <== NOT EXECUTED 10d836: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 10d83a: 4603 mov r3, r0 <== NOT EXECUTED 10d83c: e7f2 b.n 10d824 <== NOT EXECUTED 10d83e: 4603 mov r3, r0 <== NOT EXECUTED 10d840: e7e8 b.n 10d814 <== NOT EXECUTED 10d842: bf00 nop =============================================================================== 0010cb30 : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 10cb30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10cb34: b083 sub sp, #12 10cb36: f8dd a030 ldr.w sl, [sp, #48] ; 0x30 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 10cb3a: 461d mov r5, r3 10cb3c: b373 cbz r3, 10cb9c 10cb3e: 4606 mov r6, r0 10cb40: 460f mov r7, r1 10cb42: 4691 mov r9, r2 ssize_t cmpltd = 0; 10cb44: f04f 0800 mov.w r8, #0 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); 10cb48: f04f 0b01 mov.w fp, #1 10cb4c: e008 b.n 10cb60 if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 10cb4e: 9801 ldr r0, [sp, #4] 10cb50: 4448 add r0, r9 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; 10cb52: 4699 mov r9, r3 memcpy((sec_buf + ofs), (buff + cmpltd), c); 10cb54: f008 eb54 blx 115200 while(count > 0) 10cb58: 1b2d subs r5, r5, r4 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 10cb5a: f886 b09c strb.w fp, [r6, #156] ; 0x9c 10cb5e: d019 beq.n 10cb94 <== NEVER TAKEN c = MIN(count, (fs_info->vol.bps - ofs)); 10cb60: 8834 ldrh r4, [r6, #0] rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 10cb62: 4639 mov r1, r7 if (c == fs_info->vol.bytes_per_block) 10cb64: 6932 ldr r2, [r6, #16] rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 10cb66: ab01 add r3, sp, #4 10cb68: 4630 mov r0, r6 sec_num++; 10cb6a: 3701 adds r7, #1 c = MIN(count, (fs_info->vol.bps - ofs)); 10cb6c: eba4 0409 sub.w r4, r4, r9 10cb70: 42ac cmp r4, r5 10cb72: bf28 it cs 10cb74: 462c movcs r4, r5 if (c == fs_info->vol.bytes_per_block) 10cb76: 42a2 cmp r2, r4 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 10cb78: bf0c ite eq 10cb7a: 2202 moveq r2, #2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 10cb7c: 2201 movne r2, #1 10cb7e: f7ff ff3b bl 10c9f8 memcpy((sec_buf + ofs), (buff + cmpltd), c); 10cb82: eb0a 0108 add.w r1, sl, r8 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 10cb86: 4603 mov r3, r0 memcpy((sec_buf + ofs), (buff + cmpltd), c); 10cb88: 4622 mov r2, r4 cmpltd +=c; 10cb8a: 44a0 add r8, r4 if (rc != RC_OK) 10cb8c: 2800 cmp r0, #0 10cb8e: d0de beq.n 10cb4e <== NEVER TAKEN return -1; 10cb90: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff <== NOT EXECUTED } return cmpltd; } 10cb94: 4640 mov r0, r8 10cb96: b003 add sp, #12 10cb98: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} ssize_t cmpltd = 0; 10cb9c: 4698 mov r8, r3 <== NOT EXECUTED 10cb9e: e7f9 b.n 10cb94 <== NOT EXECUTED =============================================================================== 0010d510 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 10d510: 2901 cmp r1, #1 { 10d512: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} uint8_t *sec_buf = NULL; 10d516: f04f 0300 mov.w r3, #0 { 10d51a: b083 sub sp, #12 uint8_t *sec_buf = NULL; 10d51c: 9301 str r3, [sp, #4] if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 10d51e: f240 80a7 bls.w 10d670 <== ALWAYS TAKEN 10d522: 6c03 ldr r3, [r0, #64] ; 0x40 10d524: 460d mov r5, r1 10d526: 4604 mov r4, r0 10d528: 3301 adds r3, #1 10d52a: 428b cmp r3, r1 10d52c: f0c0 80a0 bcc.w 10d670 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d530: 4616 mov r6, r2 10d532: 7d82 ldrb r2, [r0, #22] fs_info->vol.afat_loc; 10d534: 6e01 ldr r1, [r0, #96] ; 0x60 sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d536: 7883 ldrb r3, [r0, #2] 10d538: 07d7 lsls r7, r2, #31 10d53a: d424 bmi.n 10d586 10d53c: 0790 lsls r0, r2, #30 10d53e: bf4c ite mi 10d540: 006f lslmi r7, r5, #1 10d542: 00af lslpl r7, r5, #2 10d544: fa27 f303 lsr.w r3, r7, r3 10d548: eb03 0901 add.w r9, r3, r1 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 10d54c: 2201 movs r2, #1 10d54e: ab01 add r3, sp, #4 10d550: 4649 mov r1, r9 10d552: 4620 mov r0, r4 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d554: f8b4 8000 ldrh.w r8, [r4] rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 10d558: f7ff fa4e bl 10c9f8 if (rc != RC_OK) 10d55c: b980 cbnz r0, 10d580 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d55e: f108 33ff add.w r3, r8, #4294967295 ; 0xffffffff 10d562: 403b ands r3, r7 return rc; switch ( fs_info->vol.type ) 10d564: 7da7 ldrb r7, [r4, #22] 10d566: 2f02 cmp r7, #2 10d568: d014 beq.n 10d594 10d56a: 2f04 cmp r7, #4 10d56c: d037 beq.n 10d5de 10d56e: 2f01 cmp r7, #1 10d570: d018 beq.n 10d5a4 <== NEVER TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 10d572: f007 fb85 bl 114c80 <__errno> <== NOT EXECUTED 10d576: 4603 mov r3, r0 <== NOT EXECUTED 10d578: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d57c: 2205 movs r2, #5 <== NOT EXECUTED 10d57e: 601a str r2, [r3, #0] <== NOT EXECUTED break; } return RC_OK; } 10d580: b003 add sp, #12 10d582: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 10d586: eb05 0755 add.w r7, r5, r5, lsr #1 10d58a: fa27 f303 lsr.w r3, r7, r3 10d58e: eb03 0901 add.w r9, r3, r1 ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 10d592: e7db b.n 10d54c *((uint16_t *)(sec_buf + ofs)) = 10d594: 9a01 ldr r2, [sp, #4] (uint16_t )(CT_LE_W(in_val)); 10d596: 52d6 strh r6, [r2, r3] fs_info->c.modified = true; 10d598: 2301 movs r3, #1 10d59a: f884 309c strb.w r3, [r4, #156] ; 0x9c } 10d59e: b003 add sp, #12 10d5a0: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} if ( FAT_CLUSTER_IS_ODD(cln) ) 10d5a4: 07e9 lsls r1, r5, #31 *(sec_buf + ofs) &= 0x0F; 10d5a6: 9a01 ldr r2, [sp, #4] fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 10d5a8: b2b6 uxth r6, r6 if ( FAT_CLUSTER_IS_ODD(cln) ) 10d5aa: d526 bpl.n 10d5fa *(sec_buf + ofs) &= 0x0F; 10d5ac: 5cd1 ldrb r1, [r2, r3] fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 10d5ae: 0136 lsls r6, r6, #4 10d5b0: b2b6 uxth r6, r6 *(sec_buf + ofs) &= 0x0F; 10d5b2: f001 010f and.w r1, r1, #15 10d5b6: 54d1 strb r1, [r2, r3] *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 10d5b8: 9901 ldr r1, [sp, #4] 10d5ba: 5cca ldrb r2, [r1, r3] 10d5bc: 4332 orrs r2, r6 10d5be: 54ca strb r2, [r1, r3] if ( ofs == (fs_info->vol.bps - 1) ) 10d5c0: 8822 ldrh r2, [r4, #0] 10d5c2: f884 709c strb.w r7, [r4, #156] ; 0x9c 10d5c6: 3a01 subs r2, #1 10d5c8: 429a cmp r2, r3 10d5ca: d02f beq.n 10d62c *(sec_buf + ofs + 1) &= 0x00; 10d5cc: 9a01 ldr r2, [sp, #4] 10d5ce: 3301 adds r3, #1 10d5d0: 54d0 strb r0, [r2, r3] *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 10d5d2: 9901 ldr r1, [sp, #4] 10d5d4: 5cca ldrb r2, [r1, r3] 10d5d6: ea42 2616 orr.w r6, r2, r6, lsr #8 10d5da: 54ce strb r6, [r1, r3] 10d5dc: e7d0 b.n 10d580 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 10d5de: 9901 ldr r1, [sp, #4] fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 10d5e0: f026 4670 bic.w r6, r6, #4026531840 ; 0xf0000000 10d5e4: 2501 movs r5, #1 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 10d5e6: 58ca ldr r2, [r1, r3] 10d5e8: f002 4270 and.w r2, r2, #4026531840 ; 0xf0000000 *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 10d5ec: 4316 orrs r6, r2 10d5ee: 50ce str r6, [r1, r3] 10d5f0: f884 509c strb.w r5, [r4, #156] ; 0x9c } 10d5f4: b003 add sp, #12 10d5f6: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} *(sec_buf + ofs) &= 0x00; 10d5fa: 54d0 strb r0, [r2, r3] fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 10d5fc: f3c6 060b ubfx r6, r6, #0, #12 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 10d600: 9901 ldr r1, [sp, #4] 10d602: 5cca ldrb r2, [r1, r3] 10d604: 4332 orrs r2, r6 10d606: 54ca strb r2, [r1, r3] if ( ofs == (fs_info->vol.bps - 1) ) 10d608: 8822 ldrh r2, [r4, #0] 10d60a: f884 709c strb.w r7, [r4, #156] ; 0x9c 10d60e: 3a01 subs r2, #1 10d610: 429a cmp r2, r3 10d612: d01e beq.n 10d652 <== ALWAYS TAKEN *(sec_buf + ofs + 1) &= 0xF0; 10d614: 9901 ldr r1, [sp, #4] 10d616: 3301 adds r3, #1 10d618: 5cca ldrb r2, [r1, r3] 10d61a: f022 020f bic.w r2, r2, #15 10d61e: 54ca strb r2, [r1, r3] *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 10d620: 9901 ldr r1, [sp, #4] 10d622: 5cca ldrb r2, [r1, r3] 10d624: ea42 2616 orr.w r6, r2, r6, lsr #8 10d628: 54ce strb r6, [r1, r3] 10d62a: e7a9 b.n 10d580 rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 10d62c: ab01 add r3, sp, #4 10d62e: f109 0101 add.w r1, r9, #1 10d632: 463a mov r2, r7 10d634: 4620 mov r0, r4 10d636: f7ff f9df bl 10c9f8 if (rc != RC_OK) 10d63a: 2800 cmp r0, #0 10d63c: d1a0 bne.n 10d580 <== ALWAYS TAKEN *sec_buf &= 0x00; 10d63e: 9b01 ldr r3, [sp, #4] 10d640: 7018 strb r0, [r3, #0] *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 10d642: 9a01 ldr r2, [sp, #4] 10d644: 7813 ldrb r3, [r2, #0] 10d646: ea43 2616 orr.w r6, r3, r6, lsr #8 10d64a: 7016 strb r6, [r2, #0] 10d64c: f884 709c strb.w r7, [r4, #156] ; 0x9c } 10d650: e796 b.n 10d580 rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 10d652: ab01 add r3, sp, #4 <== NOT EXECUTED 10d654: f109 0101 add.w r1, r9, #1 <== NOT EXECUTED 10d658: 463a mov r2, r7 <== NOT EXECUTED 10d65a: 4620 mov r0, r4 <== NOT EXECUTED 10d65c: f7ff f9cc bl 10c9f8 <== NOT EXECUTED if (rc != RC_OK) 10d660: 2800 cmp r0, #0 <== NOT EXECUTED 10d662: d18d bne.n 10d580 <== NOT EXECUTED *sec_buf &= 0xF0; 10d664: 9a01 ldr r2, [sp, #4] <== NOT EXECUTED 10d666: 7813 ldrb r3, [r2, #0] <== NOT EXECUTED 10d668: f023 030f bic.w r3, r3, #15 <== NOT EXECUTED 10d66c: 7013 strb r3, [r2, #0] <== NOT EXECUTED 10d66e: e7e8 b.n 10d642 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 10d670: f007 fb06 bl 114c80 <__errno> <== NOT EXECUTED 10d674: 2205 movs r2, #5 <== NOT EXECUTED 10d676: 4603 mov r3, r0 <== NOT EXECUTED 10d678: 601a str r2, [r3, #0] <== NOT EXECUTED 10d67a: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff <== NOT EXECUTED 10d67e: e77f b.n 10d580 <== NOT EXECUTED =============================================================================== 0010d23c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 10d23c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 10d240: 4605 mov r5, r0 int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 10d242: f7ff ffbb bl 10d1bc if ( rc != RC_OK ) 10d246: 1e07 subs r7, r0, #0 10d248: 4606 mov r6, r0 rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 10d24a: f8d5 4080 ldr.w r4, [r5, #128] ; 0x80 if ( rc != RC_OK ) 10d24e: bf18 it ne 10d250: 2701 movne r7, #1 10d252: 427f negs r7, r7 return _Chain_Immutable_head( the_chain )->next; 10d254: 46a0 mov r8, r4 10d256: f858 0b04 ldr.w r0, [r8], #4 if ( !_Chain_Is_empty(the_chain)) 10d25a: 4580 cmp r8, r0 10d25c: d009 beq.n 10d272 new_first = old_first->next; 10d25e: 6803 ldr r3, [r0, #0] head->next = new_first; 10d260: 6023 str r3, [r4, #0] new_first->previous = head; 10d262: 605c str r4, [r3, #4] while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 10d264: f7f8 f9be bl 1055e4 return _Chain_Immutable_head( the_chain )->next; 10d268: 6820 ldr r0, [r4, #0] if ( !_Chain_Is_empty(the_chain)) 10d26a: 4580 cmp r8, r0 10d26c: d1f7 bne.n 10d25e rtems_chain_control *the_chain = fs_info->vhash + i; 10d26e: f8d5 4080 ldr.w r4, [r5, #128] ; 0x80 return _Chain_Immutable_head( the_chain )->next; 10d272: 46a0 mov r8, r4 return &the_chain->Tail.Node; 10d274: f104 0910 add.w r9, r4, #16 return _Chain_Immutable_head( the_chain )->next; 10d278: f858 0f0c ldr.w r0, [r8, #12]! if ( !_Chain_Is_empty(the_chain)) 10d27c: 4548 cmp r0, r9 10d27e: d008 beq.n 10d292 <== NEVER TAKEN new_first = old_first->next; 10d280: 6803 ldr r3, [r0, #0] <== NOT EXECUTED head->next = new_first; 10d282: 60e3 str r3, [r4, #12] <== NOT EXECUTED new_first->previous = head; 10d284: f8c3 8004 str.w r8, [r3, #4] <== NOT EXECUTED free(node); 10d288: f7f8 f9ac bl 1055e4 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 10d28c: 68e0 ldr r0, [r4, #12] <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 10d28e: 4581 cmp r9, r0 <== NOT EXECUTED 10d290: d1f6 bne.n 10d280 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 10d292: f8d5 4084 ldr.w r4, [r5, #132] ; 0x84 return _Chain_Immutable_head( the_chain )->next; 10d296: 46a0 mov r8, r4 10d298: f858 0b04 ldr.w r0, [r8], #4 if ( !_Chain_Is_empty(the_chain)) 10d29c: 4580 cmp r8, r0 10d29e: d009 beq.n 10d2b4 <== NEVER TAKEN new_first = old_first->next; 10d2a0: 6803 ldr r3, [r0, #0] <== NOT EXECUTED head->next = new_first; 10d2a2: 6023 str r3, [r4, #0] <== NOT EXECUTED new_first->previous = head; 10d2a4: 605c str r4, [r3, #4] <== NOT EXECUTED while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL ) free(node); 10d2a6: f7f8 f99d bl 1055e4 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 10d2aa: 6820 ldr r0, [r4, #0] <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 10d2ac: 4540 cmp r0, r8 <== NOT EXECUTED 10d2ae: d1f7 bne.n 10d2a0 <== NOT EXECUTED rtems_chain_control *the_chain = fs_info->rhash + i; 10d2b0: f8d5 4084 ldr.w r4, [r5, #132] ; 0x84 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 10d2b4: 46a0 mov r8, r4 return &the_chain->Tail.Node; 10d2b6: f104 0910 add.w r9, r4, #16 return _Chain_Immutable_head( the_chain )->next; 10d2ba: f858 0f0c ldr.w r0, [r8, #12]! if ( !_Chain_Is_empty(the_chain)) 10d2be: 4581 cmp r9, r0 10d2c0: d008 beq.n 10d2d4 <== NEVER TAKEN new_first = old_first->next; 10d2c2: 6803 ldr r3, [r0, #0] <== NOT EXECUTED head->next = new_first; 10d2c4: 60e3 str r3, [r4, #12] <== NOT EXECUTED new_first->previous = head; 10d2c6: f8c3 8004 str.w r8, [r3, #4] <== NOT EXECUTED free(node); 10d2ca: f7f8 f98b bl 1055e4 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 10d2ce: 68e0 ldr r0, [r4, #12] <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 10d2d0: 4581 cmp r9, r0 <== NOT EXECUTED 10d2d2: d1f6 bne.n 10d2c2 <== NOT EXECUTED } free(fs_info->vhash); 10d2d4: f8d5 0080 ldr.w r0, [r5, #128] ; 0x80 10d2d8: f7f8 f984 bl 1055e4 free(fs_info->rhash); 10d2dc: f8d5 0084 ldr.w r0, [r5, #132] ; 0x84 10d2e0: f7f8 f980 bl 1055e4 free(fs_info->uino); 10d2e4: f8d5 0088 ldr.w r0, [r5, #136] ; 0x88 10d2e8: f7f8 f97c bl 1055e4 free(fs_info->sec_buf); 10d2ec: f8d5 00a4 ldr.w r0, [r5, #164] ; 0xa4 10d2f0: f7f8 f978 bl 1055e4 close(fs_info->vol.fd); 10d2f4: 6ea8 ldr r0, [r5, #104] ; 0x68 10d2f6: f7f8 f8f3 bl 1054e0 if (rc) 10d2fa: b916 cbnz r6, 10d302 errno = EIO; return rc; } 10d2fc: 4638 mov r0, r7 10d2fe: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} errno = EIO; 10d302: f007 fcbd bl 114c80 <__errno> <== NOT EXECUTED 10d306: 2305 movs r3, #5 <== NOT EXECUTED 10d308: 6003 str r3, [r0, #0] <== NOT EXECUTED } 10d30a: 4638 mov r0, r7 <== NOT EXECUTED 10d30c: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED =============================================================================== 0010d1bc : return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 10d1bc: b5f0 push {r4, r5, r6, r7, lr} 10d1be: 4604 mov r4, r0 if (fs_info->vol.type == FAT_FAT32) 10d1c0: 7d83 ldrb r3, [r0, #22] { 10d1c2: b085 sub sp, #20 if (fs_info->vol.type == FAT_FAT32) 10d1c4: 2b04 cmp r3, #4 10d1c6: d010 beq.n 10d1ea return RC_OK; 10d1c8: 2500 movs r5, #0 if (fs_info->c.state == FAT_CACHE_EMPTY) 10d1ca: f894 309d ldrb.w r3, [r4, #157] ; 0x9d 10d1ce: b113 cbz r3, 10d1d6 10d1d0: 4620 mov r0, r4 10d1d2: f7ff fb87 bl 10c8e4 if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 10d1d6: 6ee0 ldr r0, [r4, #108] ; 0x6c 10d1d8: f005 f86c bl 1122b4 rc = -1; 10d1dc: 2800 cmp r0, #0 10d1de: bf18 it ne 10d1e0: f04f 35ff movne.w r5, #4294967295 ; 0xffffffff return rc; } 10d1e4: 4628 mov r0, r5 10d1e6: b005 add sp, #20 10d1e8: bdf0 pop {r4, r5, r6, r7, pc} uint32_t free_count = fs_info->vol.free_cls; 10d1ea: 6cc2 ldr r2, [r0, #76] ; 0x4c if (free_count != fs_info->vol.free_cls_in_fs_info) 10d1ec: e9d0 1614 ldrd r1, r6, [r0, #80] ; 0x50 10d1f0: 428a cmp r2, r1 10d1f2: d113 bne.n 10d21c <== ALWAYS TAKEN if (next_free != fs_info->vol.next_cl_in_fs_info) 10d1f4: 6d83 ldr r3, [r0, #88] ; 0x58 10d1f6: 429e cmp r6, r3 10d1f8: d0e6 beq.n 10d1c8 10d1fa: 2500 movs r5, #0 10d1fc: af03 add r7, sp, #12 fs_info->vol.next_cl_in_fs_info = next_free; 10d1fe: 65a6 str r6, [r4, #88] ; 0x58 ret2 = fat_sector_write(fs_info, 10d200: 2304 movs r3, #4 10d202: 9700 str r7, [sp, #0] 10d204: f44f 72f6 mov.w r2, #492 ; 0x1ec 10d208: f8b4 1048 ldrh.w r1, [r4, #72] ; 0x48 10d20c: 4620 mov r0, r4 uint32_t le_next_free = CT_LE_L(next_free); 10d20e: 9603 str r6, [sp, #12] ret2 = fat_sector_write(fs_info, 10d210: f7ff fc8e bl 10cb30 if ( (ret1 < 0) || (ret2 < 0) ) 10d214: ea45 75d0 orr.w r5, r5, r0, lsr #31 10d218: 426d negs r5, r5 10d21a: e7d6 b.n 10d1ca ret1 = fat_sector_write(fs_info, 10d21c: af03 add r7, sp, #12 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; 10d21e: 6502 str r2, [r0, #80] ; 0x50 <== NOT EXECUTED uint32_t le_free_count = CT_LE_L(free_count); 10d220: 9203 str r2, [sp, #12] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 10d222: f44f 72f4 mov.w r2, #488 ; 0x1e8 <== NOT EXECUTED 10d226: 9700 str r7, [sp, #0] <== NOT EXECUTED 10d228: f8b0 1048 ldrh.w r1, [r0, #72] ; 0x48 <== NOT EXECUTED 10d22c: f7ff fc80 bl 10cb30 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) 10d230: 6da3 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) 10d232: 0fc5 lsrs r5, r0, #31 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) 10d234: 429e cmp r6, r3 <== NOT EXECUTED 10d236: d0ef beq.n 10d218 <== NOT EXECUTED 10d238: e7e1 b.n 10d1fe <== NOT EXECUTED 10d23a: bf00 nop =============================================================================== 0010e1fc : fat_file_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 10e1fc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10e200: 4683 mov fp, r0 int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 10e202: 6940 ldr r0, [r0, #20] { 10e204: b0ad sub sp, #180 ; 0xb4 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 10e206: 2400 movs r4, #0 { 10e208: 4691 mov r9, r2 10e20a: 9104 str r1, [sp, #16] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 10e20c: 2220 movs r2, #32 msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 10e20e: f8d0 a008 ldr.w sl, [r0, #8] memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 10e212: 4621 mov r1, r4 dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 10e214: f04f 37ff mov.w r7, #4294967295 ; 0xffffffff 10e218: a80c add r0, sp, #48 ; 0x30 { 10e21a: 461e mov r6, r3 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 10e21c: f8db 5008 ldr.w r5, [fp, #8] fat_file_fd_t *fat_fd = NULL; 10e220: 9407 str r4, [sp, #28] uint16_t time_val = 0; 10e222: f8ad 4018 strh.w r4, [sp, #24] uint16_t date = 0; 10e226: f8ad 401a strh.w r4, [sp, #26] dir_pos->sname.ofs = 0; 10e22a: e9cd 4408 strd r4, r4, [sp, #32] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 10e22e: e9cd 770a strd r7, r7, [sp, #40] ; 0x28 memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 10e232: f007 fa55 bl 1156e0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 10e236: 2240 movs r2, #64 ; 0x40 10e238: 4621 mov r1, r4 10e23a: a81c add r0, sp, #112 ; 0x70 10e23c: f007 fa50 bl 1156e0 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 10e240: f5b6 7f82 cmp.w r6, #260 ; 0x104 10e244: f300 8142 bgt.w 10e4cc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (fs_info->converter, 10e248: 230b movs r3, #11 10e24a: f8da 00cc ldr.w r0, [sl, #204] ; 0xcc 10e24e: 4632 mov r2, r6 10e250: 9300 str r3, [sp, #0] 10e252: 4649 mov r1, r9 10e254: ab0c add r3, sp, #48 ; 0x30 10e256: f000 fa55 bl 10e704 name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 10e25a: 9005 str r0, [sp, #20] 10e25c: 2800 cmp r0, #0 10e25e: f000 813b beq.w 10e4d8 <== ALWAYS TAKEN /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ now = time(NULL); 10e262: 4620 mov r0, r4 *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 10e264: f88d 403c strb.w r4, [sp, #60] ; 0x3c now = time(NULL); 10e268: f009 fe66 bl 117f38