RTEMS 4.10.2Annotated Report
Tue Dec 13 20:26:36 2011
00009dc0 <IMFS_Set_handlers>:
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
9dc0: e5903000 ldr r3, [r0]
9dc4: e593304c ldr r3, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
9dc8: e5902010 ldr r2, [r0, #16]
switch( node->type ) {
9dcc: e2433001 sub r3, r3, #1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
9dd0: e5922034 ldr r2, [r2, #52] ; 0x34
switch( node->type ) {
9dd4: e3530006 cmp r3, #6
9dd8: 979ff103 ldrls pc, [pc, r3, lsl #2]
9ddc: ea000008 b 9e04 <IMFS_Set_handlers+0x44> <== NOT EXECUTED
9de0: 00009e2c .word 0x00009e2c <== NOT EXECUTED
9de4: 00009e3c .word 0x00009e3c <== NOT EXECUTED
9de8: 00009e1c .word 0x00009e1c <== NOT EXECUTED
9dec: 00009e1c .word 0x00009e1c <== NOT EXECUTED
9df0: 00009e0c .word 0x00009e0c <== NOT EXECUTED
9df4: 00009e0c .word 0x00009e0c <== NOT EXECUTED
9df8: 00009dfc .word 0x00009dfc <== NOT EXECUTED
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
9dfc: e59f3048 ldr r3, [pc, #72] ; 9e4c <IMFS_Set_handlers+0x8c>
9e00: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
9e04: e3a00000 mov r0, #0
9e08: e12fff1e bx lr
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
9e0c: e5923008 ldr r3, [r2, #8]
9e10: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
9e14: e3a00000 mov r0, #0
9e18: e12fff1e bx lr
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
9e1c: e59f302c ldr r3, [pc, #44] ; 9e50 <IMFS_Set_handlers+0x90>
9e20: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
9e24: e3a00000 mov r0, #0
9e28: e12fff1e bx lr
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
9e2c: e592300c ldr r3, [r2, #12]
9e30: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
9e34: e3a00000 mov r0, #0
9e38: e12fff1e bx lr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
9e3c: e59f3010 ldr r3, [pc, #16] ; 9e54 <IMFS_Set_handlers+0x94>
9e40: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
9e44: e3a00000 mov r0, #0
9e48: e12fff1e bx lr
00009b44 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9b44: e92d40f0 push {r4, r5, r6, r7, lr}
9b48: e1a01801 lsl r1, r1, #16
9b4c: e1a02802 lsl r2, r2, #16
9b50: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
9b54: e5904000 ldr r4, [r0]
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9b58: e1a07821 lsr r7, r1, #16
9b5c: e1a06822 lsr r6, r2, #16
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
9b60: eb0004f0 bl af28 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
9b64: e1d453bc ldrh r5, [r4, #60] ; 0x3c
9b68: e3500000 cmp r0, #0
9b6c: 11550000 cmpne r5, r0
9b70: 03a05000 moveq r5, #0
9b74: 13a05001 movne r5, #1
9b78: 1a000009 bne 9ba4 <IMFS_chown+0x60>
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
9b7c: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
9b80: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
9b84: e1a0000d mov r0, sp
9b88: e1a01005 mov r1, r5
9b8c: ebffe16e bl 214c <gettimeofday>
9b90: e59d3000 ldr r3, [sp]
9b94: e5843048 str r3, [r4, #72] ; 0x48
9b98: e1a00005 mov r0, r5
return 0;
}
9b9c: e28dd008 add sp, sp, #8
9ba0: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
9ba4: eb0016da bl f714 <__errno> <== NOT EXECUTED
9ba8: e3a03001 mov r3, #1 <== NOT EXECUTED
9bac: e5803000 str r3, [r0] <== NOT EXECUTED
9bb0: e3e00000 mvn r0, #0 <== NOT EXECUTED
9bb4: eafffff8 b 9b9c <IMFS_chown+0x58> <== NOT EXECUTED
00009c78 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
9c78: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
9c7c: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
9c80: e1a05001 mov r5, r1
9c84: e59d6014 ldr r6, [sp, #20]
9c88: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
9c8c: 01a07004 moveq r7, r4
9c90: 1a000001 bne 9c9c <IMFS_create_node+0x24>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
9c94: e1a00007 mov r0, r7 <== NOT EXECUTED
9c98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
9c9c: e59f210c ldr r2, [pc, #268] ; 9db0 <IMFS_create_node+0x138>
9ca0: e5922000 ldr r2, [r2]
9ca4: e592202c ldr r2, [r2, #44] ; 0x2c
9ca8: e1a00005 mov r0, r5
9cac: e1c32002 bic r2, r3, r2
9cb0: ebffffc0 bl 9bb8 <IMFS_allocate_node>
if ( !node )
9cb4: e2507000 subs r7, r0, #0
9cb8: 0afffff5 beq 9c94 <IMFS_create_node+0x1c>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
9cbc: e2455001 sub r5, r5, #1
9cc0: e3550006 cmp r5, #6
9cc4: 979ff105 ldrls pc, [pc, r5, lsl #2]
9cc8: ea000033 b 9d9c <IMFS_create_node+0x124> <== NOT EXECUTED
9ccc: 00009d80 .word 0x00009d80 <== NOT EXECUTED
9cd0: 00009d6c .word 0x00009d6c <== NOT EXECUTED
9cd4: 00009ce8 .word 0x00009ce8 <== NOT EXECUTED
9cd8: 00009ce8 .word 0x00009ce8 <== NOT EXECUTED
9cdc: 00009d3c .word 0x00009d3c <== NOT EXECUTED
9ce0: 00009d24 .word 0x00009d24 <== NOT EXECUTED
9ce4: 00009d60 .word 0x00009d60 <== NOT EXECUTED
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
9ce8: e5963000 ldr r3, [r6]
9cec: e5873050 str r3, [r7, #80] ; 0x50
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
9cf0: e5943010 ldr r3, [r4, #16]
9cf4: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
9cf8: e5923004 ldr r3, [r2, #4]
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
9cfc: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
9d00: e2833001 add r3, r3, #1
9d04: e5823004 str r3, [r2, #4]
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
9d08: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
9d0c: e5873038 str r3, [r7, #56] ; 0x38
9d10: e2800050 add r0, r0, #80 ; 0x50
9d14: e1a01007 mov r1, r7
9d18: ebfff0fa bl 6108 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
9d1c: e1a00007 mov r0, r7
9d20: e8bd80f0 pop {r4, r5, r6, r7, pc}
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
9d24: e3a03000 mov r3, #0 <== NOT EXECUTED
9d28: e3a02000 mov r2, #0 <== NOT EXECUTED
9d2c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED
9d30: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
9d34: e3a03000 mov r3, #0 <== NOT EXECUTED
9d38: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
9d3c: e3a03000 mov r3, #0
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
9d40: e3a01000 mov r1, #0
9d44: e3a02000 mov r2, #0
9d48: e5871050 str r1, [r7, #80] ; 0x50
9d4c: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
9d50: e5873060 str r3, [r7, #96] ; 0x60
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
9d54: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
9d58: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0;
break;
9d5c: eaffffe3 b 9cf0 <IMFS_create_node+0x78>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
9d60: e3a03000 mov r3, #0
9d64: e5873050 str r3, [r7, #80] ; 0x50
break;
9d68: eaffffe0 b 9cf0 <IMFS_create_node+0x78>
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
9d6c: e5962004 ldr r2, [r6, #4]
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
9d70: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
9d74: e5872054 str r2, [r7, #84] ; 0x54
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
9d78: e5873050 str r3, [r7, #80] ; 0x50
node->info.device.minor = info->device.minor;
break;
9d7c: eaffffdb b 9cf0 <IMFS_create_node+0x78>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9d80: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
9d84: e2873050 add r3, r7, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9d88: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
9d8c: e3a02000 mov r2, #0
9d90: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
9d94: e5873058 str r3, [r7, #88] ; 0x58
9d98: eaffffd4 b 9cf0 <IMFS_create_node+0x78>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
9d9c: e59f0010 ldr r0, [pc, #16] ; 9db4 <IMFS_create_node+0x13c> <== NOT EXECUTED
9da0: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED
9da4: e59f200c ldr r2, [pc, #12] ; 9db8 <IMFS_create_node+0x140> <== NOT EXECUTED
9da8: e59f300c ldr r3, [pc, #12] ; 9dbc <IMFS_create_node+0x144> <== NOT EXECUTED
9dac: eb0003d8 bl ad14 <__assert_func> <== NOT EXECUTED
00003f28 <IMFS_dump_directory>:
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3f28: e3500000 cmp r0, #0
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
3f2c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3f30: e1a05001 mov r5, r1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3f34: 0a000021 beq 3fc0 <IMFS_dump_directory+0x98>
assert( level >= 0 );
3f38: e3510000 cmp r1, #0
3f3c: ba000029 blt 3fe8 <IMFS_dump_directory+0xc0>
assert( the_directory->type == IMFS_DIRECTORY );
3f40: e590304c ldr r3, [r0, #76] ; 0x4c
3f44: e3530001 cmp r3, #1
3f48: 1a000021 bne 3fd4 <IMFS_dump_directory+0xac>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3f4c: e5907050 ldr r7, [r0, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3f50: e2808054 add r8, r0, #84 ; 0x54
3f54: e1570008 cmp r7, r8
3f58: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
3f5c: e59f6098 ldr r6, [pc, #152] ; 3ffc <IMFS_dump_directory+0xd4>
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
3f60: e281a001 add sl, r1, #1
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
3f64: e3a04000 mov r4, #0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
3f68: e5963000 ldr r3, [r6]
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
3f6c: e2844001 add r4, r4, #1
fprintf(stdout, "...." );
3f70: e5933008 ldr r3, [r3, #8]
3f74: e59f0084 ldr r0, [pc, #132] ; 4000 <IMFS_dump_directory+0xd8>
3f78: e3a01001 mov r1, #1
3f7c: e3a02004 mov r2, #4
3f80: eb0042ef bl 14b44 <fwrite>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
3f84: e1550004 cmp r5, r4
3f88: aafffff6 bge 3f68 <IMFS_dump_directory+0x40>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
3f8c: e1a00007 mov r0, r7
3f90: ebffff7a bl 3d80 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
3f94: e597304c ldr r3, [r7, #76] ; 0x4c
3f98: e3530001 cmp r3, #1
3f9c: 0a000003 beq 3fb0 <IMFS_dump_directory+0x88>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
3fa0: e5977000 ldr r7, [r7]
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3fa4: e1570008 cmp r7, r8
3fa8: 1affffed bne 3f64 <IMFS_dump_directory+0x3c>
3fac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
3fb0: e1a00007 mov r0, r7
3fb4: e1a0100a mov r1, sl
3fb8: ebffffda bl 3f28 <IMFS_dump_directory>
3fbc: eafffff7 b 3fa0 <IMFS_dump_directory+0x78>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3fc0: e59f003c ldr r0, [pc, #60] ; 4004 <IMFS_dump_directory+0xdc><== NOT EXECUTED
3fc4: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED
3fc8: e59f2038 ldr r2, [pc, #56] ; 4008 <IMFS_dump_directory+0xe0><== NOT EXECUTED
3fcc: e59f3038 ldr r3, [pc, #56] ; 400c <IMFS_dump_directory+0xe4><== NOT EXECUTED
3fd0: eb000225 bl 486c <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
3fd4: e59f0028 ldr r0, [pc, #40] ; 4004 <IMFS_dump_directory+0xdc><== NOT EXECUTED
3fd8: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED
3fdc: e59f2024 ldr r2, [pc, #36] ; 4008 <IMFS_dump_directory+0xe0><== NOT EXECUTED
3fe0: e59f3028 ldr r3, [pc, #40] ; 4010 <IMFS_dump_directory+0xe8><== NOT EXECUTED
3fe4: eb000220 bl 486c <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
3fe8: e59f0014 ldr r0, [pc, #20] ; 4004 <IMFS_dump_directory+0xdc><== NOT EXECUTED
3fec: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED
3ff0: e59f2010 ldr r2, [pc, #16] ; 4008 <IMFS_dump_directory+0xe0><== NOT EXECUTED
3ff4: e59f3018 ldr r3, [pc, #24] ; 4014 <IMFS_dump_directory+0xec><== NOT EXECUTED
3ff8: eb00021b bl 486c <__assert_func> <== NOT EXECUTED
00009fe0 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
9fe0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
9fe4: e3d25007 bics r5, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
9fe8: e24dd02c sub sp, sp, #44 ; 0x2c
9fec: e58d2000 str r2, [sp]
9ff0: e1a0a000 mov sl, r0
9ff4: e1a04001 mov r4, r1
9ff8: e1a07003 mov r7, r3
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
9ffc: 1a0000b8 bne a2e4 <IMFS_eval_path+0x304>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a000: e5936000 ldr r6, [r3]
a004: e28d8004 add r8, sp, #4
a008: e28d9028 add r9, sp, #40 ; 0x28
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
a00c: e1a02008 mov r2, r8
a010: e1a03009 mov r3, r9
a014: e08a0005 add r0, sl, r5
a018: e1a01004 mov r1, r4
a01c: eb00029d bl aa98 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
a020: e5973000 ldr r3, [r7]
a024: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
a028: e1a0b000 mov fp, r0
pathnamelen -= len;
a02c: e59d2028 ldr r2, [sp, #40] ; 0x28
i += len;
if ( !pathloc->node_access )
a030: 0a000078 beq a218 <IMFS_eval_path+0x238>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a034: e3500000 cmp r0, #0
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
a038: e0855002 add r5, r5, r2
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
a03c: e0624004 rsb r4, r2, r4
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a040: 1a00000f bne a084 <IMFS_eval_path+0xa4>
* new fs root node and let let the mounted filesystem set the handlers.
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
a044: e593204c ldr r2, [r3, #76] ; 0x4c
a048: e3520001 cmp r2, #1
a04c: 0a000076 beq a22c <IMFS_eval_path+0x24c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a050: e1a00007 mov r0, r7
a054: ebffff59 bl 9dc0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a058: e59d1000 ldr r1, [sp]
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a05c: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a060: e1a00007 mov r0, r7
a064: ebffff7b bl 9e58 <IMFS_evaluate_permission>
a068: e3500000 cmp r0, #0
a06c: 1a000036 bne a14c <IMFS_eval_path+0x16c>
rtems_set_errno_and_return_minus_one( EACCES );
a070: eb0015a7 bl f714 <__errno>
a074: e3a0300d mov r3, #13
a078: e5803000 str r3, [r0]
a07c: e3e0b000 mvn fp, #0
a080: ea000031 b a14c <IMFS_eval_path+0x16c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
a084: e596104c ldr r1, [r6, #76] ; 0x4c
a088: e3510001 cmp r1, #1
a08c: 0a000053 beq a1e0 <IMFS_eval_path+0x200>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
a090: e35b0003 cmp fp, #3
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a094: e1a06003 mov r6, r3
switch( type ) {
a098: 0a000006 beq a0b8 <IMFS_eval_path+0xd8>
a09c: e35b0004 cmp fp, #4
a0a0: 0a000025 beq a13c <IMFS_eval_path+0x15c>
a0a4: e35b0002 cmp fp, #2
a0a8: 0a000013 beq a0fc <IMFS_eval_path+0x11c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
a0ac: e35b0004 cmp fp, #4
a0b0: 1affffd5 bne a00c <IMFS_eval_path+0x2c>
a0b4: eaffffe2 b a044 <IMFS_eval_path+0x64> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0b8: e593304c ldr r3, [r3, #76] ; 0x4c
a0bc: e3530003 cmp r3, #3
a0c0: 0a00004c beq a1f8 <IMFS_eval_path+0x218>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
a0c4: e3530004 cmp r3, #4
a0c8: 0a00007a beq a2b8 <IMFS_eval_path+0x2d8>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a0cc: e3530001 cmp r3, #1
a0d0: 1a000069 bne a27c <IMFS_eval_path+0x29c>
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
a0d4: e1a00006 mov r0, r6
a0d8: e1a01008 mov r1, r8
a0dc: eb00023e bl a9dc <IMFS_find_match_in_dir>
if ( !node )
a0e0: e2506000 subs r6, r0, #0
a0e4: 0a00004b beq a218 <IMFS_eval_path+0x238>
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
a0e8: e596304c ldr r3, [r6, #76] ; 0x4c
a0ec: e3530001 cmp r3, #1
a0f0: 0a000018 beq a158 <IMFS_eval_path+0x178>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
a0f4: e5876000 str r6, [r7]
break;
a0f8: eaffffc3 b a00c <IMFS_eval_path+0x2c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
a0fc: e59f11f4 ldr r1, [pc, #500] ; a2f8 <IMFS_eval_path+0x318>
a100: e5912000 ldr r2, [r1]
a104: e5922018 ldr r2, [r2, #24]
a108: e1520003 cmp r2, r3
a10c: 0affffbe beq a00c <IMFS_eval_path+0x2c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
a110: e597c010 ldr ip, [r7, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
a114: e59c201c ldr r2, [ip, #28]
a118: e1520003 cmp r2, r3
a11c: 0a00006e beq a2dc <IMFS_eval_path+0x2fc>
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
a120: e5936008 ldr r6, [r3, #8]
a124: e3560000 cmp r6, #0
a128: 1afffff1 bne a0f4 <IMFS_eval_path+0x114>
rtems_set_errno_and_return_minus_one( ENOENT );
a12c: eb001578 bl f714 <__errno>
a130: e580b000 str fp, [r0]
a134: e3e0b000 mvn fp, #0
a138: ea000003 b a14c <IMFS_eval_path+0x16c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a13c: eb001574 bl f714 <__errno>
a140: e3a0305b mov r3, #91 ; 0x5b
a144: e5803000 str r3, [r0]
a148: e3e0b000 mvn fp, #0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
a14c: e1a0000b mov r0, fp
a150: e28dd02c add sp, sp, #44 ; 0x2c
a154: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
a158: e596305c ldr r3, [r6, #92] ; 0x5c
a15c: e3530000 cmp r3, #0
a160: 108ab005 addne fp, sl, r5
a164: 0affffe2 beq a0f4 <IMFS_eval_path+0x114>
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a168: e5db0000 ldrb r0, [fp]
a16c: ebffe3aa bl 301c <rtems_filesystem_is_separator>
a170: e3500000 cmp r0, #0
++(*index);
--(*len);
a174: e1a0c00b mov ip, fp
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a178: 0a00000c beq a1b0 <IMFS_eval_path+0x1d0>
a17c: e5db3000 ldrb r3, [fp]
a180: e3530000 cmp r3, #0
a184: 0a000041 beq a290 <IMFS_eval_path+0x2b0>
a188: e3540000 cmp r4, #0
a18c: e28bb001 add fp, fp, #1
a190: 0a000007 beq a1b4 <IMFS_eval_path+0x1d4>
a194: e5db0000 ldrb r0, [fp]
a198: ebffe39f bl 301c <rtems_filesystem_is_separator>
a19c: e3500000 cmp r0, #0
++(*index);
a1a0: e2855001 add r5, r5, #1
--(*len);
a1a4: e2444001 sub r4, r4, #1
a1a8: e1a0c00b mov ip, fp
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a1ac: 1afffff2 bne a17c <IMFS_eval_path+0x19c>
a1b0: e5db3000 ldrb r3, [fp]
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
a1b4: e353002e cmp r3, #46 ; 0x2e
a1b8: 1a000034 bne a290 <IMFS_eval_path+0x2b0>
a1bc: e08a3005 add r3, sl, r5
a1c0: e5d33001 ldrb r3, [r3, #1]
a1c4: e353002e cmp r3, #46 ; 0x2e
a1c8: 1a000030 bne a290 <IMFS_eval_path+0x2b0>
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
node = node->Parent;
a1cc: e5966008 ldr r6, [r6, #8]
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
a1d0: e2855002 add r5, r5, #2
pathnamelen -= 2;
a1d4: e2444002 sub r4, r4, #2
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
a1d8: e5876000 str r6, [r7]
a1dc: eaffff8a b a00c <IMFS_eval_path+0x2c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a1e0: e1a00007 mov r0, r7
a1e4: ebffff1b bl 9e58 <IMFS_evaluate_permission>
a1e8: e3500000 cmp r0, #0
a1ec: 0affff9f beq a070 <IMFS_eval_path+0x90>
a1f0: e5973000 ldr r3, [r7]
a1f4: eaffffa5 b a090 <IMFS_eval_path+0xb0>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
a1f8: e1a00007 mov r0, r7
a1fc: e3a01000 mov r1, #0
a200: ebffff2e bl 9ec0 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
a204: e5976000 ldr r6, [r7]
if ( !node )
a208: e3560000 cmp r6, #0
a20c: 0a00001a beq a27c <IMFS_eval_path+0x29c>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
a210: e596304c ldr r3, [r6, #76] ; 0x4c
a214: eaffffac b a0cc <IMFS_eval_path+0xec>
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
a218: eb00153d bl f714 <__errno>
a21c: e3a03002 mov r3, #2
a220: e5803000 str r3, [r0]
a224: e3e0b000 mvn fp, #0
a228: eaffffc7 b a14c <IMFS_eval_path+0x16c>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
a22c: e593c05c ldr ip, [r3, #92] ; 0x5c
a230: e35c0000 cmp ip, #0
a234: 0affff85 beq a050 <IMFS_eval_path+0x70>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a238: e28cc01c add ip, ip, #28 <== NOT EXECUTED
a23c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a240: e1a0e007 mov lr, r7
a244: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a248: e59d1028 ldr r1, [sp, #40] ; 0x28
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a24c: e59c2000 ldr r2, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a250: e0610005 rsb r0, r1, r5
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a254: e58e2000 str r2, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a258: e08a0000 add r0, sl, r0
a25c: e0841001 add r1, r4, r1
a260: e59d2000 ldr r2, [sp]
a264: e1a03007 mov r3, r7
a268: e597c00c ldr ip, [r7, #12]
a26c: e1a0e00f mov lr, pc
a270: e59cf000 ldr pc, [ip]
a274: e1a0b000 mov fp, r0
a278: eaffffb3 b a14c <IMFS_eval_path+0x16c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
a27c: eb001524 bl f714 <__errno>
a280: e3a03014 mov r3, #20
a284: e5803000 str r3, [r0]
a288: e3e0b000 mvn fp, #0
a28c: eaffffae b a14c <IMFS_eval_path+0x16c>
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a290: e596e05c ldr lr, [r6, #92] ; 0x5c
a294: e28ee01c add lr, lr, #28
a298: e8be000f ldm lr!, {r0, r1, r2, r3}
a29c: e1a05007 mov r5, r7
a2a0: e8a5000f stmia r5!, {r0, r1, r2, r3}
a2a4: e59e2000 ldr r2, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i],
a2a8: e1a0000c mov r0, ip
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a2ac: e5852000 str r2, [r5]
return (*pathloc->ops->evalpath_h)( &pathname[i],
a2b0: e1a01004 mov r1, r4
a2b4: eaffffe9 b a260 <IMFS_eval_path+0x280>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
a2b8: e1a00007 mov r0, r7
a2bc: e3a01000 mov r1, #0
a2c0: ebffff16 bl 9f20 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
a2c4: e3700001 cmn r0, #1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
a2c8: e1a0b000 mov fp, r0
node = pathloc->node_access;
a2cc: e5976000 ldr r6, [r7]
if ( result == -1 )
a2d0: 0affff9d beq a14c <IMFS_eval_path+0x16c>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
a2d4: e596304c ldr r3, [r6, #76] ; 0x4c
a2d8: eaffff7b b a0cc <IMFS_eval_path+0xec>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
a2dc: e28cc008 add ip, ip, #8
a2e0: eaffffd5 b a23c <IMFS_eval_path+0x25c>
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
a2e4: e59f0010 ldr r0, [pc, #16] ; a2fc <IMFS_eval_path+0x31c> <== NOT EXECUTED
a2e8: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED
a2ec: e59f200c ldr r2, [pc, #12] ; a300 <IMFS_eval_path+0x320> <== NOT EXECUTED
a2f0: e59f300c ldr r3, [pc, #12] ; a304 <IMFS_eval_path+0x324> <== NOT EXECUTED
a2f4: eb000286 bl ad14 <__assert_func> <== NOT EXECUTED
0000a3dc <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
a3dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a3e0: e24dd02c sub sp, sp, #44 ; 0x2c
a3e4: e1a07001 mov r7, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a3e8: e5916000 ldr r6, [r1]
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
a3ec: e58d2000 str r2, [sp]
a3f0: e1a0a000 mov sl, r0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
a3f4: eb0018cb bl 10728 <strlen>
a3f8: e3a05000 mov r5, #0
a3fc: e28d8004 add r8, sp, #4
a400: e1a04000 mov r4, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
a404: e28d3028 add r3, sp, #40 ; 0x28
a408: e08a0005 add r0, sl, r5
a40c: e1a01004 mov r1, r4
a410: e1a02008 mov r2, r8
a414: eb00019f bl aa98 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
a418: e5973000 ldr r3, [r7]
a41c: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
a420: e1a09000 mov r9, r0
pathlen -= len;
a424: e59db028 ldr fp, [sp, #40] ; 0x28
i += len;
if ( !pathloc->node_access )
a428: 0a00003b beq a51c <IMFS_evaluate_for_make+0x140>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a42c: e3500000 cmp r0, #0
a430: 1a000006 bne a450 <IMFS_evaluate_for_make+0x74>
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
a434: eb0014b6 bl f714 <__errno>
a438: e3a03011 mov r3, #17
a43c: e5803000 str r3, [r0]
a440: e3e06000 mvn r6, #0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
a444: e1a00006 mov r0, r6
a448: e28dd02c add sp, sp, #44 ; 0x2c
a44c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
a450: e596104c ldr r1, [r6, #76] ; 0x4c
a454: e3510001 cmp r1, #1
a458: 0a000052 beq a5a8 <IMFS_evaluate_for_make+0x1cc>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
a45c: e085500b add r5, r5, fp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
a460: e06b4004 rsb r4, fp, r4
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a464: e1a06003 mov r6, r3
switch( type ) {
a468: e3590004 cmp r9, #4
a46c: 979ff109 ldrls pc, [pc, r9, lsl #2]
a470: eaffffe3 b a404 <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED
a474: 0000a434 .word 0x0000a434 <== NOT EXECUTED
a478: 0000a404 .word 0x0000a404 <== NOT EXECUTED
a47c: 0000a4ec .word 0x0000a4ec <== NOT EXECUTED
a480: 0000a49c .word 0x0000a49c <== NOT EXECUTED
a484: 0000a488 .word 0x0000a488 <== NOT EXECUTED
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a488: eb0014a1 bl f714 <__errno>
a48c: e3a0305b mov r3, #91 ; 0x5b
a490: e5803000 str r3, [r0]
a494: e3e06000 mvn r6, #0
a498: eaffffe9 b a444 <IMFS_evaluate_for_make+0x68>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
a49c: e593304c ldr r3, [r3, #76] ; 0x4c
a4a0: e3530003 cmp r3, #3
a4a4: 0a00006c beq a65c <IMFS_evaluate_for_make+0x280>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
a4a8: e3530004 cmp r3, #4
a4ac: 0a00006a beq a65c <IMFS_evaluate_for_make+0x280>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
a4b0: e3560000 cmp r6, #0
a4b4: 0a000063 beq a648 <IMFS_evaluate_for_make+0x26c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a4b8: e596304c ldr r3, [r6, #76] ; 0x4c
a4bc: e3530001 cmp r3, #1
a4c0: 1a000060 bne a648 <IMFS_evaluate_for_make+0x26c>
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
a4c4: e1a00006 mov r0, r6
a4c8: e1a01008 mov r1, r8
a4cc: eb000142 bl a9dc <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
a4d0: e2506000 subs r6, r0, #0
a4d4: 0a000039 beq a5c0 <IMFS_evaluate_for_make+0x1e4>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
a4d8: e596304c ldr r3, [r6, #76] ; 0x4c
a4dc: e3530001 cmp r3, #1
a4e0: 0a000012 beq a530 <IMFS_evaluate_for_make+0x154>
i += 2;
pathlen -= 2;
node = node->Parent;
}
pathloc->node_access = node;
a4e4: e5876000 str r6, [r7]
a4e8: eaffffc5 b a404 <IMFS_evaluate_for_make+0x28>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
a4ec: e59f11ec ldr r1, [pc, #492] ; a6e0 <IMFS_evaluate_for_make+0x304>
a4f0: e5912000 ldr r2, [r1]
a4f4: e5922018 ldr r2, [r2, #24]
a4f8: e1520003 cmp r2, r3
a4fc: 0affffc0 beq a404 <IMFS_evaluate_for_make+0x28>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
a500: e597c010 ldr ip, [r7, #16]
a504: e59c201c ldr r2, [ip, #28]
a508: e1520003 cmp r2, r3
a50c: 0a000069 beq a6b8 <IMFS_evaluate_for_make+0x2dc>
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
a510: e5936008 ldr r6, [r3, #8]
a514: e3560000 cmp r6, #0
a518: 1afffff1 bne a4e4 <IMFS_evaluate_for_make+0x108>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
a51c: eb00147c bl f714 <__errno>
a520: e3a03002 mov r3, #2
a524: e5803000 str r3, [r0]
a528: e3e06000 mvn r6, #0
a52c: eaffffc4 b a444 <IMFS_evaluate_for_make+0x68>
*/
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
a530: e596305c ldr r3, [r6, #92] ; 0x5c
a534: e3530000 cmp r3, #0
a538: 108a9005 addne r9, sl, r5
a53c: 1a000008 bne a564 <IMFS_evaluate_for_make+0x188>
a540: eaffffe7 b a4e4 <IMFS_evaluate_for_make+0x108>
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a544: e5d93000 ldrb r3, [r9]
a548: e3530000 cmp r3, #0
a54c: 0a00004a beq a67c <IMFS_evaluate_for_make+0x2a0>
a550: e3540000 cmp r4, #0
a554: e2899001 add r9, r9, #1
a558: 0a000007 beq a57c <IMFS_evaluate_for_make+0x1a0>
++(*index);
a55c: e2855001 add r5, r5, #1
--(*len);
a560: e2444001 sub r4, r4, #1
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a564: e5d90000 ldrb r0, [r9]
a568: ebffe2ab bl 301c <rtems_filesystem_is_separator>
a56c: e3500000 cmp r0, #0
++(*index);
--(*len);
a570: e1a0c009 mov ip, r9
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
a574: 1afffff2 bne a544 <IMFS_evaluate_for_make+0x168>
a578: e5d93000 ldrb r3, [r9]
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
a57c: e353002e cmp r3, #46 ; 0x2e
a580: 1a00003d bne a67c <IMFS_evaluate_for_make+0x2a0>
a584: e08a3005 add r3, sl, r5
a588: e5d33001 ldrb r3, [r3, #1]
a58c: e353002e cmp r3, #46 ; 0x2e
a590: 1a000039 bne a67c <IMFS_evaluate_for_make+0x2a0>
pathloc,
name );
}
i += 2;
pathlen -= 2;
node = node->Parent;
a594: e5966008 ldr r6, [r6, #8]
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
a598: e2855002 add r5, r5, #2
pathlen -= 2;
a59c: e2444002 sub r4, r4, #2
node = node->Parent;
}
pathloc->node_access = node;
a5a0: e5876000 str r6, [r7]
a5a4: eaffff96 b a404 <IMFS_evaluate_for_make+0x28>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a5a8: e1a00007 mov r0, r7
a5ac: ebfffe29 bl 9e58 <IMFS_evaluate_permission>
a5b0: e3500000 cmp r0, #0
a5b4: 0a00001e beq a634 <IMFS_evaluate_for_make+0x258>
a5b8: e5973000 ldr r3, [r7]
a5bc: eaffffa6 b a45c <IMFS_evaluate_for_make+0x80>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
a5c0: e59d3028 ldr r3, [sp, #40] ; 0x28
a5c4: e59de000 ldr lr, [sp]
a5c8: e0633005 rsb r3, r3, r5
a5cc: e08a3003 add r3, sl, r3
a5d0: e58e3000 str r3, [lr]
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
a5d4: e7da0005 ldrb r0, [sl, r5]
a5d8: e3500000 cmp r0, #0
a5dc: 0a000008 beq a604 <IMFS_evaluate_for_make+0x228>
a5e0: e08a5005 add r5, sl, r5
a5e4: ea000002 b a5f4 <IMFS_evaluate_for_make+0x218>
a5e8: e5f50001 ldrb r0, [r5, #1]!
a5ec: e3500000 cmp r0, #0
a5f0: 0a000003 beq a604 <IMFS_evaluate_for_make+0x228>
if ( !IMFS_is_separator( path[ i ] ) )
a5f4: ebffe288 bl 301c <rtems_filesystem_is_separator>
a5f8: e3500000 cmp r0, #0
a5fc: 1afffff9 bne a5e8 <IMFS_evaluate_for_make+0x20c>
a600: eaffffc5 b a51c <IMFS_evaluate_for_make+0x140>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a604: e1a00007 mov r0, r7
a608: ebfffdec bl 9dc0 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
a60c: e5973000 ldr r3, [r7]
a610: e593304c ldr r3, [r3, #76] ; 0x4c
a614: e3530001 cmp r3, #1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a618: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
a61c: 1a000009 bne a648 <IMFS_evaluate_for_make+0x26c>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
a620: e1a00007 mov r0, r7
a624: e3a01003 mov r1, #3
a628: ebfffe0a bl 9e58 <IMFS_evaluate_permission>
a62c: e3500000 cmp r0, #0
a630: 1affff83 bne a444 <IMFS_evaluate_for_make+0x68>
rtems_set_errno_and_return_minus_one( EACCES );
a634: eb001436 bl f714 <__errno>
a638: e3a0300d mov r3, #13
a63c: e5803000 str r3, [r0]
a640: e3e06000 mvn r6, #0
a644: eaffff7e b a444 <IMFS_evaluate_for_make+0x68>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
a648: eb001431 bl f714 <__errno>
a64c: e3a03014 mov r3, #20
a650: e5803000 str r3, [r0]
a654: e3e06000 mvn r6, #0
a658: eaffff79 b a444 <IMFS_evaluate_for_make+0x68>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
a65c: e1a00007 mov r0, r7
a660: e3a01000 mov r1, #0
a664: ebffff27 bl a308 <IMFS_evaluate_link>
if ( result == -1 )
a668: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
a66c: e1a06000 mov r6, r0
if ( result == -1 )
a670: 0affff73 beq a444 <IMFS_evaluate_for_make+0x68>
a674: e5976000 ldr r6, [r7]
a678: eaffff8c b a4b0 <IMFS_evaluate_for_make+0xd4>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
a67c: e596e05c ldr lr, [r6, #92] ; 0x5c
a680: e28ee01c add lr, lr, #28
a684: e8be000f ldm lr!, {r0, r1, r2, r3}
a688: e1a04007 mov r4, r7
a68c: e8a4000f stmia r4!, {r0, r1, r2, r3}
a690: e59e2000 ldr r2, [lr]
a694: e5842000 str r2, [r4]
return (*pathloc->ops->evalformake_h)( &path[i],
a698: e1a0000c mov r0, ip
a69c: e1a01007 mov r1, r7
a6a0: e59d2000 ldr r2, [sp]
a6a4: e597300c ldr r3, [r7, #12]
a6a8: e1a0e00f mov lr, pc
a6ac: e593f004 ldr pc, [r3, #4]
a6b0: e1a06000 mov r6, r0
a6b4: eaffff62 b a444 <IMFS_evaluate_for_make+0x68>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
a6b8: e28cc008 add ip, ip, #8
a6bc: e8bc000f ldm ip!, {r0, r1, r2, r3}
a6c0: e1a04007 mov r4, r7
a6c4: e8a4000f stmia r4!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a6c8: e59d0028 ldr r0, [sp, #40] ; 0x28
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
a6cc: e59c2000 ldr r2, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a6d0: e0600005 rsb r0, r0, r5
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
a6d4: e5842000 str r2, [r4]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a6d8: e08a0000 add r0, sl, r0
a6dc: eaffffee b a69c <IMFS_evaluate_for_make+0x2c0>
00009ec0 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
IMFS_jnode_t *jnode = node->node_access;
9ec0: e5903000 ldr r3, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
9ec4: e593204c ldr r2, [r3, #76] ; 0x4c
9ec8: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9ecc: e92d4030 push {r4, r5, lr}
9ed0: e1a04000 mov r4, r0
9ed4: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
9ed8: 1a00000d bne 9f14 <IMFS_evaluate_hard_link+0x54>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
9edc: e5933050 ldr r3, [r3, #80] ; 0x50
9ee0: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
9ee4: ebffffb5 bl 9dc0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9ee8: e1a00004 mov r0, r4
9eec: e1a01005 mov r1, r5
9ef0: ebffffd8 bl 9e58 <IMFS_evaluate_permission>
9ef4: e3500000 cmp r0, #0
9ef8: 13a00000 movne r0, #0
9efc: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
9f00: eb001603 bl f714 <__errno> <== NOT EXECUTED
9f04: e3a0300d mov r3, #13 <== NOT EXECUTED
9f08: e5803000 str r3, [r0] <== NOT EXECUTED
9f0c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result;
}
9f10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
9f14: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED
9f18: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED
9f1c: ebffefb0 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00009e58 <IMFS_evaluate_permission>:
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
9e58: e3d13007 bics r3, r1, #7
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
9e5c: e92d4070 push {r4, r5, r6, lr}
9e60: e1a05001 mov r5, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
9e64: 1a000010 bne 9eac <IMFS_evaluate_permission+0x54>
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
9e68: e5904000 ldr r4, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
9e6c: eb00042d bl af28 <geteuid>
9e70: e1a06000 mov r6, r0
st_gid = getegid();
9e74: eb000426 bl af14 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
9e78: e1d433bc ldrh r3, [r4, #60] ; 0x3c
9e7c: e1530006 cmp r3, r6
flags_to_test <<= 6;
9e80: 01a05305 lsleq r5, r5, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
9e84: 0a000002 beq 9e94 <IMFS_evaluate_permission+0x3c>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
9e88: e1d433be ldrh r3, [r4, #62] ; 0x3e
9e8c: e1530000 cmp r3, r0
flags_to_test <<= 3;
9e90: 01a05185 lsleq r5, r5, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
9e94: e5940030 ldr r0, [r4, #48] ; 0x30
9e98: e0050000 and r0, r5, r0
9e9c: e1550000 cmp r5, r0
9ea0: 13a00000 movne r0, #0
9ea4: 03a00001 moveq r0, #1
return 1;
return 0;
}
9ea8: e8bd8070 pop {r4, r5, r6, pc}
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
9eac: eb001618 bl f714 <__errno> <== NOT EXECUTED
9eb0: e3a03001 mov r3, #1 <== NOT EXECUTED
9eb4: e5803000 str r3, [r0] <== NOT EXECUTED
9eb8: e3e00000 mvn r0, #0 <== NOT EXECUTED
9ebc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009f20 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9f20: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
9f24: e5906000 ldr r6, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
9f28: e596304c ldr r3, [r6, #76] ; 0x4c
9f2c: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9f30: e24dd004 sub sp, sp, #4
9f34: e1a04000 mov r4, r0
9f38: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
9f3c: 1a000024 bne 9fd4 <IMFS_evaluate_sym_link+0xb4>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
9f40: e5963008 ldr r3, [r6, #8]
9f44: e3530000 cmp r3, #0
9f48: 0a00001e beq 9fc8 <IMFS_evaluate_sym_link+0xa8>
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
9f4c: e5803000 str r3, [r0]
rtems_filesystem_get_sym_start_loc(
9f50: e1a0100d mov r1, sp
9f54: e5960050 ldr r0, [r6, #80] ; 0x50
9f58: e1a02004 mov r2, r4
9f5c: eb00054a bl b48c <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
9f60: e59d3000 ldr r3, [sp]
9f64: e5966050 ldr r6, [r6, #80] ; 0x50
9f68: e0866003 add r6, r6, r3
9f6c: e1a00006 mov r0, r6
9f70: eb0019ec bl 10728 <strlen>
9f74: e1a02005 mov r2, r5
9f78: e1a01000 mov r1, r0
9f7c: e1a03004 mov r3, r4
9f80: e1a00006 mov r0, r6
9f84: eb000015 bl 9fe0 <IMFS_eval_path>
9f88: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
9f8c: e1a00004 mov r0, r4
9f90: ebffff8a bl 9dc0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9f94: e1a00004 mov r0, r4
9f98: e1a01005 mov r1, r5
9f9c: ebffffad bl 9e58 <IMFS_evaluate_permission>
9fa0: e3500000 cmp r0, #0
9fa4: 0a000002 beq 9fb4 <IMFS_evaluate_sym_link+0x94>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
9fa8: e1a00006 mov r0, r6
9fac: e28dd004 add sp, sp, #4
9fb0: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
9fb4: eb0015d6 bl f714 <__errno> <== NOT EXECUTED
9fb8: e3a0300d mov r3, #13 <== NOT EXECUTED
9fbc: e5803000 str r3, [r0] <== NOT EXECUTED
9fc0: e3e06000 mvn r6, #0 <== NOT EXECUTED
9fc4: eafffff7 b 9fa8 <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
9fc8: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED
9fcc: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED
9fd0: ebffef83 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
9fd4: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED
9fd8: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED
9fdc: ebffef80 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000e3f4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
e3f4: e92d4070 push {r4, r5, r6, lr}
e3f8: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
e3fc: e5904000 ldr r4, [r0]
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
e400: e1a06001 mov r6, r1
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
e404: ebfff2c7 bl af28 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
e408: e1d453bc ldrh r5, [r4, #60] ; 0x3c
e40c: e3500000 cmp r0, #0
e410: 11550000 cmpne r5, r0
e414: 03a05000 moveq r5, #0
e418: 13a05001 movne r5, #1
e41c: 1a00000e bne e45c <IMFS_fchmod+0x68>
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
e420: e5943030 ldr r3, [r4, #48] ; 0x30
e424: e1a06a06 lsl r6, r6, #20
e428: e3c33eff bic r3, r3, #4080 ; 0xff0
e42c: e3c3300f bic r3, r3, #15
e430: e1a06a26 lsr r6, r6, #20
e434: e1866003 orr r6, r6, r3
e438: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
e43c: e1a0000d mov r0, sp
e440: e1a01005 mov r1, r5
e444: ebffcf40 bl 214c <gettimeofday>
e448: e59d3000 ldr r3, [sp]
e44c: e5843048 str r3, [r4, #72] ; 0x48
e450: e1a00005 mov r0, r5
return 0;
}
e454: e28dd008 add sp, sp, #8
e458: e8bd8070 pop {r4, r5, r6, pc}
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
e45c: eb0004ac bl f714 <__errno> <== NOT EXECUTED
e460: e3a03001 mov r3, #1 <== NOT EXECUTED
e464: e5803000 str r3, [r0] <== NOT EXECUTED
e468: e3e00000 mvn r0, #0 <== NOT EXECUTED
e46c: eafffff8 b e454 <IMFS_fchmod+0x60> <== NOT EXECUTED
0000a870 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
a870: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
a874: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
a878: e1a01000 mov r1, r0 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
a87c: e1a04000 mov r4, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
a880: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED
a884: ebfffb62 bl 9614 <pipe_release> <== NOT EXECUTED
if (! err) {
a888: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a88c: 0a000002 beq a89c <IMFS_fifo_close+0x2c> <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
a890: ba00000e blt a8d0 <IMFS_fifo_close+0x60> <== NOT EXECUTED
}
a894: e1a00006 mov r0, r6 <== NOT EXECUTED
a898: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
a89c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a8a0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
a8a4: e5843014 str r3, [r4, #20] <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
a8a8: e1a00005 mov r0, r5 <== NOT EXECUTED
a8ac: eb0001b6 bl af8c <rtems_libio_is_file_open> <== NOT EXECUTED
a8b0: e3500000 cmp r0, #0 <== NOT EXECUTED
a8b4: 1afffff6 bne a894 <IMFS_fifo_close+0x24> <== NOT EXECUTED
a8b8: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED
a8bc: e3530000 cmp r3, #0 <== NOT EXECUTED
a8c0: 1afffff3 bne a894 <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
a8c4: e1a00005 mov r0, r5 <== NOT EXECUTED
a8c8: ebffddf6 bl 20a8 <free> <== NOT EXECUTED
a8cc: eafffff0 b a894 <IMFS_fifo_close+0x24> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
a8d0: eb00138f bl f714 <__errno> <== NOT EXECUTED
a8d4: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
a8d8: e5806000 str r6, [r0] <== NOT EXECUTED
a8dc: e3e06000 mvn r6, #0 <== NOT EXECUTED
a8e0: eaffffeb b a894 <IMFS_fifo_close+0x24> <== NOT EXECUTED
0000a73c <IMFS_fifo_ioctl>:
void *buffer
)
{
int err;
if (command == FIONBIO) {
a73c: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED
a740: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED
a744: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED
a748: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
a74c: e92d4010 push {r4, lr} <== NOT EXECUTED
a750: e1a03002 mov r3, r2 <== NOT EXECUTED
int err;
if (command == FIONBIO) {
a754: 0a00000a beq a784 <IMFS_fifo_ioctl+0x48> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
a758: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED
a75c: e1a03000 mov r3, r0 <== NOT EXECUTED
a760: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED
a764: ebfffa9d bl 91e0 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
a768: e3500000 cmp r0, #0 <== NOT EXECUTED
a76c: a8bd8010 popge {r4, pc} <== NOT EXECUTED
a770: e2604000 rsb r4, r0, #0 <== NOT EXECUTED
a774: eb0013e6 bl f714 <__errno> <== NOT EXECUTED
a778: e5804000 str r4, [r0] <== NOT EXECUTED
a77c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a780: e8bd8010 pop {r4, pc} <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
a784: e3520000 cmp r2, #0 <== NOT EXECUTED
a788: 03a0400e moveq r4, #14 <== NOT EXECUTED
a78c: 0afffff8 beq a774 <IMFS_fifo_ioctl+0x38> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
a790: e5924000 ldr r4, [r2] <== NOT EXECUTED
a794: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a798: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a79c: 05903014 ldreq r3, [r0, #20] <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a7a0: 13833001 orrne r3, r3, #1 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a7a4: 03c33001 biceq r3, r3, #1 <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a7a8: 15803014 strne r3, [r0, #20] <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a7ac: 05803014 streq r3, [r0, #20] <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a7b0: 13a00000 movne r0, #0 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a7b4: 01a00004 moveq r0, r4 <== NOT EXECUTED
a7b8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000a6e4 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a6e4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a6e8: e1a0c000 mov ip, r0 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
a6ec: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a6f0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
a6f4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
a6f8: e58dc000 str ip, [sp] <== NOT EXECUTED
a6fc: ebfffa99 bl 9168 <pipe_lseek> <== NOT EXECUTED
a700: e1a03000 mov r3, r0 <== NOT EXECUTED
a704: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
a708: e3540000 cmp r4, #0 <== NOT EXECUTED
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
a70c: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
a710: ba000003 blt a724 <IMFS_fifo_lseek+0x40> <== NOT EXECUTED
}
a714: e1a01004 mov r1, r4 <== NOT EXECUTED
a718: e1a00003 mov r0, r3 <== NOT EXECUTED
a71c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a720: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
a724: eb0013fa bl f714 <__errno> <== NOT EXECUTED
a728: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
a72c: e5805000 str r5, [r0] <== NOT EXECUTED
a730: e3e03000 mvn r3, #0 <== NOT EXECUTED
a734: e3e04000 mvn r4, #0 <== NOT EXECUTED
a738: eafffff5 b a714 <IMFS_fifo_lseek+0x30> <== NOT EXECUTED
0000a818 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
a818: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
a81c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
a820: e1a03000 mov r3, r0 <== NOT EXECUTED
a824: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
a828: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
a82c: ebfffa84 bl 9244 <pipe_read> <== NOT EXECUTED
if (err > 0)
a830: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a834: da000007 ble a858 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
a838: e1a0000d mov r0, sp <== NOT EXECUTED
a83c: e3a01000 mov r1, #0 <== NOT EXECUTED
a840: ebffde41 bl 214c <gettimeofday> <== NOT EXECUTED
a844: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a848: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
a84c: e1a00005 mov r0, r5 <== NOT EXECUTED
a850: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a854: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
a858: 0afffffb beq a84c <IMFS_fifo_read+0x34> <== NOT EXECUTED
a85c: eb0013ac bl f714 <__errno> <== NOT EXECUTED
a860: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
a864: e5805000 str r5, [r0] <== NOT EXECUTED
a868: e3e05000 mvn r5, #0 <== NOT EXECUTED
a86c: eafffff6 b a84c <IMFS_fifo_read+0x34> <== NOT EXECUTED
0000a7bc <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
a7bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
a7c0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
a7c4: e1a03000 mov r3, r0 <== NOT EXECUTED
a7c8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
a7cc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
a7d0: ebfffb09 bl 93fc <pipe_write> <== NOT EXECUTED
if (err > 0) {
a7d4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a7d8: da000008 ble a800 <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
a7dc: e1a0000d mov r0, sp <== NOT EXECUTED
a7e0: e3a01000 mov r1, #0 <== NOT EXECUTED
a7e4: ebffde58 bl 214c <gettimeofday> <== NOT EXECUTED
a7e8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a7ec: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a7f0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
a7f4: e1a00005 mov r0, r5 <== NOT EXECUTED
a7f8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a7fc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
a800: 0afffffb beq a7f4 <IMFS_fifo_write+0x38> <== NOT EXECUTED
a804: eb0013c2 bl f714 <__errno> <== NOT EXECUTED
a808: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
a80c: e5805000 str r5, [r0] <== NOT EXECUTED
a810: e3e05000 mvn r5, #0 <== NOT EXECUTED
a814: eafffff6 b a7f4 <IMFS_fifo_write+0x38> <== NOT EXECUTED
0000a9dc <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
a9dc: e92d4070 push {r4, r5, r6, lr}
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
a9e0: e2505000 subs r5, r0, #0
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
a9e4: e1a04001 mov r4, r1
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
a9e8: 0a000020 beq aa70 <IMFS_find_match_in_dir+0x94>
if ( !name )
a9ec: e3510000 cmp r1, #0
a9f0: 0a00000c beq aa28 <IMFS_find_match_in_dir+0x4c>
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
a9f4: e1a00001 mov r0, r1
a9f8: e59f1084 ldr r1, [pc, #132] ; aa84 <IMFS_find_match_in_dir+0xa8>
a9fc: eb00166d bl 103b8 <strcmp>
aa00: e3500000 cmp r0, #0
aa04: 0a000005 beq aa20 <IMFS_find_match_in_dir+0x44>
return directory;
if ( !strcmp( name, dotdotname ) )
aa08: e1a00004 mov r0, r4
aa0c: e59f1074 ldr r1, [pc, #116] ; aa88 <IMFS_find_match_in_dir+0xac>
aa10: eb001668 bl 103b8 <strcmp>
aa14: e3500000 cmp r0, #0
return directory->Parent;
aa18: 05955008 ldreq r5, [r5, #8]
*/
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
aa1c: 1a000004 bne aa34 <IMFS_find_match_in_dir+0x58>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
aa20: e1a00005 mov r0, r5
aa24: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
aa28: e3a05000 mov r5, #0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
aa2c: e1a00005 mov r0, r5
aa30: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
aa34: e5956050 ldr r6, [r5, #80] ; 0x50
aa38: e2855054 add r5, r5, #84 ; 0x54
aa3c: e1560005 cmp r6, r5
aa40: 1a000003 bne aa54 <IMFS_find_match_in_dir+0x78>
aa44: eafffff7 b aa28 <IMFS_find_match_in_dir+0x4c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
aa48: e5966000 ldr r6, [r6]
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
aa4c: e1560005 cmp r6, r5
aa50: 0afffff4 beq aa28 <IMFS_find_match_in_dir+0x4c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
aa54: e1a00004 mov r0, r4
aa58: e286100c add r1, r6, #12
aa5c: eb001655 bl 103b8 <strcmp>
aa60: e3500000 cmp r0, #0
aa64: 1afffff7 bne aa48 <IMFS_find_match_in_dir+0x6c>
aa68: e1a05006 mov r5, r6
aa6c: eaffffeb b aa20 <IMFS_find_match_in_dir+0x44>
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
aa70: e59f0014 ldr r0, [pc, #20] ; aa8c <IMFS_find_match_in_dir+0xb0><== NOT EXECUTED
aa74: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED
aa78: e59f2010 ldr r2, [pc, #16] ; aa90 <IMFS_find_match_in_dir+0xb4><== NOT EXECUTED
aa7c: e59f3010 ldr r3, [pc, #16] ; aa94 <IMFS_find_match_in_dir+0xb8><== NOT EXECUTED
aa80: eb0000a3 bl ad14 <__assert_func> <== NOT EXECUTED
0000a924 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a924: e92d4070 push {r4, r5, r6, lr}
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
a928: e1a0c000 mov ip, r0
a92c: e5bc401c ldr r4, [ip, #28]!
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a930: e24dd014 sub sp, sp, #20
a934: e1a0e000 mov lr, r0
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
a938: e8bc000f ldm ip!, {r0, r1, r2, r3}
a93c: e1a0600d mov r6, sp
a940: e8a6000f stmia r6!, {r0, r1, r2, r3}
a944: e59c2000 ldr r2, [ip]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
a948: e3a03000 mov r3, #0
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
a94c: e5862000 str r2, [r6]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
a950: e58e301c str r3, [lr, #28]
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
a954: e1a0500d mov r5, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a958: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
a95c: e58d4000 str r4, [sp]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
a960: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a964: ebfffd15 bl 9dc0 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
a968: e594304c ldr r3, [r4, #76] ; 0x4c
a96c: e3530001 cmp r3, #1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a970: e2842054 add r2, r4, #84 ; 0x54
a974: 1a000010 bne a9bc <IMFS_fsunmount+0x98>
a978: e5943050 ldr r3, [r4, #80] ; 0x50
a97c: e1530002 cmp r3, r2
a980: 0a00000d beq a9bc <IMFS_fsunmount+0x98>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
a984: e3540000 cmp r4, #0
a988: 0a000008 beq a9b0 <IMFS_fsunmount+0x8c>
if ( jnode->type == IMFS_DIRECTORY ) {
a98c: e594304c ldr r3, [r4, #76] ; 0x4c
a990: e3530001 cmp r3, #1
a994: 1affffef bne a958 <IMFS_fsunmount+0x34>
a998: e5943050 ldr r3, [r4, #80] ; 0x50
a99c: e2842054 add r2, r4, #84 ; 0x54
a9a0: e1530002 cmp r3, r2
a9a4: 0affffeb beq a958 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a9a8: e2534000 subs r4, r3, #0
a9ac: 1affffe9 bne a958 <IMFS_fsunmount+0x34>
a9b0: e3a00000 mov r0, #0
return 0;
}
a9b4: e28dd014 add sp, sp, #20
a9b8: e8bd8070 pop {r4, r5, r6, pc}
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
a9bc: e3a00000 mov r0, #0
a9c0: e1a0100d mov r1, sp
a9c4: ebffdc33 bl 1a98 <IMFS_unlink>
if (result != 0)
a9c8: e3500000 cmp r0, #0
a9cc: 01a04006 moveq r4, r6
a9d0: 0affffeb beq a984 <IMFS_fsunmount+0x60>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a9d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a9d8: eafffff5 b a9b4 <IMFS_fsunmount+0x90> <== NOT EXECUTED
00001660 <IMFS_initialize_support>:
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
1660: e59fc0dc ldr ip, [pc, #220] ; 1744 <IMFS_initialize_support+0xe4>
1664: e59cc000 ldr ip, [ip]
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
1668: e35c0010 cmp ip, #16
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
166c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
1670: e1a04000 mov r4, r0
1674: e1a07001 mov r7, r1
1678: e1a08002 mov r8, r2
167c: e1a06003 mov r6, r3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
1680: 0a000008 beq 16a8 <IMFS_initialize_support+0x48>
1684: e3a03000 mov r3, #0
1688: e3a02020 mov r2, #32
168c: e15c0002 cmp ip, r2
1690: e2833001 add r3, r3, #1
1694: 0a000003 beq 16a8 <IMFS_initialize_support+0x48>
1698: e3530005 cmp r3, #5
169c: e1a02082 lsl r2, r2, #1
16a0: 1afffff9 bne 168c <IMFS_initialize_support+0x2c>
16a4: e3a0c080 mov ip, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
16a8: e59f5098 ldr r5, [pc, #152] ; 1748 <IMFS_initialize_support+0xe8>
16ac: e585c000 str ip, [r5]
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
16b0: eb002160 bl 9c38 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
16b4: e59fe090 ldr lr, [pc, #144] ; 174c <IMFS_initialize_support+0xec>
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
16b8: e584001c str r0, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
16bc: e8be000f ldm lr!, {r0, r1, r2, r3}
16c0: e284c038 add ip, r4, #56 ; 0x38
16c4: e8ac000f stmia ip!, {r0, r1, r2, r3}
16c8: e8be000f ldm lr!, {r0, r1, r2, r3}
16cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
16d0: e89e000f ldm lr, {r0, r1, r2, r3}
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
16d4: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
16d8: e88c000f stm ip, {r0, r1, r2, r3}
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
16dc: e5846024 str r6, [r4, #36] ; 0x24
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
16e0: e3a00001 mov r0, #1
16e4: e3a01010 mov r1, #16
16e8: eb0001d8 bl 1e50 <calloc>
if ( !fs_info ) {
16ec: e3500000 cmp r0, #0
16f0: 0a00000c beq 1728 <IMFS_initialize_support+0xc8>
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
16f4: e5952004 ldr r2, [r5, #4]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
16f8: e594101c ldr r1, [r4, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
16fc: e3a03001 mov r3, #1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1700: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
1704: e580600c str r6, [r0, #12]
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
1708: e5808008 str r8, [r0, #8]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
170c: e0822003 add r2, r2, r3
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
1710: e5840034 str r0, [r4, #52] ; 0x34
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
1714: e5813038 str r3, [r1, #56] ; 0x38
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1718: e5852004 str r2, [r5, #4]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
171c: eb001e93 bl 9170 <rtems_pipe_initialize>
1720: e3a00000 mov r0, #0
return 0;
}
1724: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
1728: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
172c: eb00025d bl 20a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
1730: eb0037f7 bl f714 <__errno> <== NOT EXECUTED
1734: e3a0300c mov r3, #12 <== NOT EXECUTED
1738: e5803000 str r3, [r0] <== NOT EXECUTED
173c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1740: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00001750 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
1750: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
1754: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
1758: e24dd048 sub sp, sp, #72 ; 0x48
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
175c: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
1760: e1d333b4 ldrh r3, [r3, #52] ; 0x34
1764: e3530007 cmp r3, #7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
1768: e1a05001 mov r5, r1
176c: e1a06002 mov r6, r2
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
1770: 8a00001e bhi 17f0 <IMFS_link+0xa0>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
1774: e1a00002 mov r0, r2
1778: eb003bea bl 10728 <strlen>
177c: e28d4004 add r4, sp, #4
1780: e1a01000 mov r1, r0
1784: e1a02004 mov r2, r4
1788: e28d3044 add r3, sp, #68 ; 0x44
178c: e1a00006 mov r0, r6
1790: eb0024c0 bl aa98 <IMFS_get_token>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
1794: e3a03ca2 mov r3, #41472 ; 0xa200
1798: e28dc028 add ip, sp, #40 ; 0x28
179c: e1a00005 mov r0, r5
17a0: e1a02004 mov r2, r4
17a4: e2433001 sub r3, r3, #1
17a8: e3a01003 mov r1, #3
17ac: e58dc000 str ip, [sp]
17b0: eb002130 bl 9c78 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
17b4: e3500000 cmp r0, #0
17b8: 0a000011 beq 1804 <IMFS_link+0xb4>
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
17bc: e59d3028 ldr r3, [sp, #40] ; 0x28
17c0: e1d323b4 ldrh r2, [r3, #52] ; 0x34
17c4: e2822001 add r2, r2, #1
17c8: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
17cc: e28d003c add r0, sp, #60 ; 0x3c
17d0: e3a01000 mov r1, #0
17d4: eb00025c bl 214c <gettimeofday>
17d8: e59d203c ldr r2, [sp, #60] ; 0x3c
17dc: e59d3028 ldr r3, [sp, #40] ; 0x28
17e0: e5832048 str r2, [r3, #72] ; 0x48
17e4: e3a00000 mov r0, #0
return 0;
}
17e8: e28dd048 add sp, sp, #72 ; 0x48
17ec: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
17f0: eb0037c7 bl f714 <__errno>
17f4: e3a0301f mov r3, #31
17f8: e5803000 str r3, [r0]
17fc: e3e00000 mvn r0, #0
1800: eafffff8 b 17e8 <IMFS_link+0x98>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
1804: eb0037c2 bl f714 <__errno> <== NOT EXECUTED
1808: e3a0300c mov r3, #12 <== NOT EXECUTED
180c: e5803000 str r3, [r0] <== NOT EXECUTED
1810: e3e00000 mvn r0, #0 <== NOT EXECUTED
1814: eafffff3 b 17e8 <IMFS_link+0x98> <== NOT EXECUTED
0000d3a0 <IMFS_memfile_addblock>:
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
d3a0: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
d3a4: e92d4030 push {r4, r5, lr}
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
d3a8: 0a00000f beq d3ec <IMFS_memfile_addblock+0x4c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d3ac: e593304c ldr r3, [r3, #76] ; 0x4c
d3b0: e3530005 cmp r3, #5
d3b4: 1a000012 bne d404 <IMFS_memfile_addblock+0x64>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
d3b8: e3a02001 mov r2, #1
d3bc: ebfffe99 bl ce28 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
d3c0: e5904000 ldr r4, [r0]
d3c4: e3540000 cmp r4, #0
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
d3c8: e1a05000 mov r5, r0
if ( *block_entry_ptr )
d3cc: 13a00000 movne r0, #0
d3d0: 18bd8030 popne {r4, r5, pc}
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
d3d4: ebfffe86 bl cdf4 <memfile_alloc_block>
if ( !memory )
d3d8: e3500000 cmp r0, #0
return 1;
*block_entry_ptr = memory;
d3dc: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
d3e0: 03a00001 moveq r0, #1
return 1;
*block_entry_ptr = memory;
d3e4: 11a00004 movne r0, r4
return 0;
}
d3e8: e8bd8030 pop {r4, r5, pc}
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
d3ec: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED
d3f0: e2811001 add r1, r1, #1 <== NOT EXECUTED
d3f4: e59f0020 ldr r0, [pc, #32] ; d41c <IMFS_memfile_addblock+0x7c><== NOT EXECUTED
d3f8: e59f2020 ldr r2, [pc, #32] ; d420 <IMFS_memfile_addblock+0x80><== NOT EXECUTED
d3fc: e59f3020 ldr r3, [pc, #32] ; d424 <IMFS_memfile_addblock+0x84><== NOT EXECUTED
d400: ebfff643 bl ad14 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d404: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED
d408: e2811001 add r1, r1, #1 <== NOT EXECUTED
d40c: e59f0008 ldr r0, [pc, #8] ; d41c <IMFS_memfile_addblock+0x7c><== NOT EXECUTED
d410: e59f2008 ldr r2, [pc, #8] ; d420 <IMFS_memfile_addblock+0x80><== NOT EXECUTED
d414: e59f300c ldr r3, [pc, #12] ; d428 <IMFS_memfile_addblock+0x88><== NOT EXECUTED
d418: ebfff63d bl ad14 <__assert_func> <== NOT EXECUTED
0000d42c <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
d42c: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d430: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
d434: e24dd004 sub sp, sp, #4
d438: e1a08001 mov r8, r1
d43c: e1a06002 mov r6, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d440: 0a00004f beq d584 <IMFS_memfile_extend+0x158>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d444: e594304c ldr r3, [r4, #76] ; 0x4c
d448: e3530005 cmp r3, #5
d44c: 1a000046 bne d56c <IMFS_memfile_extend+0x140>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
d450: e59f3144 ldr r3, [pc, #324] ; d59c <IMFS_memfile_extend+0x170>
d454: e593b000 ldr fp, [r3]
d458: e1a0312b lsr r3, fp, #2
d45c: e0213393 mla r1, r3, r3, r3
d460: e0223391 mla r2, r1, r3, r3
d464: e3a03000 mov r3, #0
d468: e1530006 cmp r3, r6
d46c: e2423001 sub r3, r2, #1
d470: e002039b mul r2, fp, r3
d474: da000034 ble d54c <IMFS_memfile_extend+0x120>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
d478: e5947054 ldr r7, [r4, #84] ; 0x54
d47c: e1560007 cmp r6, r7
d480: e594a050 ldr sl, [r4, #80] ; 0x50
d484: da000027 ble d528 <IMFS_memfile_extend+0xfc>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
d488: e1a0cfcb asr ip, fp, #31
d48c: e1a0300c mov r3, ip
d490: e1a0200b mov r2, fp
d494: e1a00008 mov r0, r8
d498: e1a01006 mov r1, r6
d49c: e58dc000 str ip, [sp]
d4a0: eb003116 bl 19900 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d4a4: e59dc000 ldr ip, [sp]
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
d4a8: e1a05000 mov r5, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d4ac: e1a01007 mov r1, r7
d4b0: e1a0000a mov r0, sl
d4b4: e1a0200b mov r2, fp
d4b8: e1a0300c mov r3, ip
d4bc: eb00310f bl 19900 <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
d4c0: e1550000 cmp r5, r0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d4c4: e1a0a000 mov sl, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
d4c8: 3a00001b bcc d53c <IMFS_memfile_extend+0x110>
d4cc: e1a07000 mov r7, r0
d4d0: ea000002 b d4e0 <IMFS_memfile_extend+0xb4>
d4d4: e2877001 add r7, r7, #1
d4d8: e1550007 cmp r5, r7
d4dc: 3a000016 bcc d53c <IMFS_memfile_extend+0x110>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
d4e0: e1a00004 mov r0, r4
d4e4: e1a01007 mov r1, r7
d4e8: ebffffac bl d3a0 <IMFS_memfile_addblock>
d4ec: e3500000 cmp r0, #0
d4f0: 0afffff7 beq d4d4 <IMFS_memfile_extend+0xa8>
d4f4: ea000003 b d508 <IMFS_memfile_extend+0xdc> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
d4f8: e1a01007 mov r1, r7 <== NOT EXECUTED
d4fc: e1a00004 mov r0, r4 <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
d500: e2477001 sub r7, r7, #1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
d504: ebfffef5 bl d0e0 <IMFS_memfile_remove_block> <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
d508: e15a0007 cmp sl, r7 <== NOT EXECUTED
d50c: 9afffff9 bls d4f8 <IMFS_memfile_extend+0xcc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
d510: eb00087f bl f714 <__errno> <== NOT EXECUTED
d514: e3a0301c mov r3, #28 <== NOT EXECUTED
d518: e5803000 str r3, [r0] <== NOT EXECUTED
d51c: e3e00000 mvn r0, #0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
d520: e28dd004 add sp, sp, #4
d524: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc}
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
d528: 1a000001 bne d534 <IMFS_memfile_extend+0x108>
d52c: e158000a cmp r8, sl
d530: 8affffd4 bhi d488 <IMFS_memfile_extend+0x5c>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
d534: e3a00000 mov r0, #0
return 0;
d538: eafffff8 b d520 <IMFS_memfile_extend+0xf4>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
d53c: e5846054 str r6, [r4, #84] ; 0x54
d540: e5848050 str r8, [r4, #80] ; 0x50
d544: e3a00000 mov r0, #0
d548: eafffff4 b d520 <IMFS_memfile_extend+0xf4>
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
d54c: 1a000001 bne d558 <IMFS_memfile_extend+0x12c>
d550: e1520008 cmp r2, r8
d554: 8affffc7 bhi d478 <IMFS_memfile_extend+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
d558: eb00086d bl f714 <__errno> <== NOT EXECUTED
d55c: e3a03016 mov r3, #22 <== NOT EXECUTED
d560: e5803000 str r3, [r0] <== NOT EXECUTED
d564: e3e00000 mvn r0, #0 <== NOT EXECUTED
d568: eaffffec b d520 <IMFS_memfile_extend+0xf4> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d56c: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED
d570: e2811001 add r1, r1, #1 <== NOT EXECUTED
d574: e59f0024 ldr r0, [pc, #36] ; d5a0 <IMFS_memfile_extend+0x174><== NOT EXECUTED
d578: e59f2024 ldr r2, [pc, #36] ; d5a4 <IMFS_memfile_extend+0x178><== NOT EXECUTED
d57c: e59f3024 ldr r3, [pc, #36] ; d5a8 <IMFS_memfile_extend+0x17c><== NOT EXECUTED
d580: ebfff5e3 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d584: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED
d588: e2811001 add r1, r1, #1 <== NOT EXECUTED
d58c: e59f000c ldr r0, [pc, #12] ; d5a0 <IMFS_memfile_extend+0x174><== NOT EXECUTED
d590: e59f200c ldr r2, [pc, #12] ; d5a4 <IMFS_memfile_extend+0x178><== NOT EXECUTED
d594: e59f3010 ldr r3, [pc, #16] ; d5ac <IMFS_memfile_extend+0x180><== NOT EXECUTED
d598: ebfff5dd bl ad14 <__assert_func> <== NOT EXECUTED
0000ce28 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ce28: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
ce2c: e2504000 subs r4, r0, #0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ce30: e24dd004 sub sp, sp, #4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
ce34: 0a000073 beq d008 <IMFS_memfile_get_block_pointer+0x1e0>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
ce38: e594304c ldr r3, [r4, #76] ; 0x4c
ce3c: e3530005 cmp r3, #5
ce40: 1a00006b bne cff4 <IMFS_memfile_get_block_pointer+0x1cc>
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ce44: e59f31f8 ldr r3, [pc, #504] ; d044 <IMFS_memfile_get_block_pointer+0x21c>
ce48: e5935000 ldr r5, [r3]
ce4c: e1a05125 lsr r5, r5, #2
ce50: e2453001 sub r3, r5, #1
ce54: e1510003 cmp r1, r3
ce58: 9a000019 bls cec4 <IMFS_memfile_get_block_pointer+0x9c>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
ce5c: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED
ce60: e2463001 sub r3, r6, #1 <== NOT EXECUTED
ce64: e1510003 cmp r1, r3 <== NOT EXECUTED
ce68: 8a000025 bhi cf04 <IMFS_memfile_get_block_pointer+0xdc> <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
ce6c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ce70: e1a00006 mov r0, r6 <== NOT EXECUTED
ce74: e1a01005 mov r1, r5 <== NOT EXECUTED
ce78: e58d2000 str r2, [sp] <== NOT EXECUTED
ce7c: eb002ff2 bl 18e4c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ce80: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ce84: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ce88: e1a00006 mov r0, r6 <== NOT EXECUTED
ce8c: eb002faa bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
ce90: e59d2000 ldr r2, [sp] <== NOT EXECUTED
ce94: e3520000 cmp r2, #0 <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ce98: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
ce9c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
cea0: 0a000047 beq cfc4 <IMFS_memfile_get_block_pointer+0x19c> <== NOT EXECUTED
if ( !p ) {
cea4: e3530000 cmp r3, #0 <== NOT EXECUTED
cea8: 0a00004c beq cfe0 <IMFS_memfile_get_block_pointer+0x1b8> <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
ceac: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
ceb0: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
ceb4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
ceb8: 0a000034 beq cf90 <IMFS_memfile_get_block_pointer+0x168> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
cebc: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED
cec0: ea000005 b cedc <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
cec4: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
cec8: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) {
cecc: 0a000035 beq cfa8 <IMFS_memfile_get_block_pointer+0x180>
if ( !p ) {
ced0: e3500000 cmp r0, #0
ced4: 0a000002 beq cee4 <IMFS_memfile_get_block_pointer+0xbc>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
ced8: e0800101 add r0, r0, r1, lsl #2
/*
* This means the requested block number is out of range.
*/
return 0;
}
cedc: e28dd004 add sp, sp, #4
cee0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
cee4: e58d1000 str r1, [sp]
cee8: ebffffc1 bl cdf4 <memfile_alloc_block>
if ( !p )
ceec: e3500000 cmp r0, #0
cef0: e59d1000 ldr r1, [sp]
return 0;
info->indirect = p;
cef4: 15840058 strne r0, [r4, #88] ; 0x58
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
cef8: 1afffff6 bne ced8 <IMFS_memfile_get_block_pointer+0xb0>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
cefc: e3a00000 mov r0, #0 <== NOT EXECUTED
cf00: eafffff5 b cedc <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
cf04: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED
cf08: e2433001 sub r3, r3, #1 <== NOT EXECUTED
cf0c: e1510003 cmp r1, r3 <== NOT EXECUTED
cf10: 8afffff9 bhi cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
cf14: e0666001 rsb r6, r6, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
cf18: e1a00006 mov r0, r6 <== NOT EXECUTED
cf1c: e1a01005 mov r1, r5 <== NOT EXECUTED
cf20: e58d2000 str r2, [sp] <== NOT EXECUTED
cf24: eb002fc8 bl 18e4c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cf28: e1a01005 mov r1, r5 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
cf2c: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cf30: e1a00006 mov r0, r6 <== NOT EXECUTED
cf34: eb002f80 bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
cf38: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cf3c: e1a08000 mov r8, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
cf40: eb002f7d bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
cf44: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
cf48: e1a06000 mov r6, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
cf4c: e1a00008 mov r0, r8 <== NOT EXECUTED
cf50: eb002fbd bl 18e4c <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
cf54: e59d2000 ldr r2, [sp] <== NOT EXECUTED
cf58: e3520000 cmp r2, #0 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
cf5c: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
cf60: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
cf64: 0a000013 beq cfb8 <IMFS_memfile_get_block_pointer+0x190> <== NOT EXECUTED
if ( !p ) {
cf68: e3530000 cmp r3, #0 <== NOT EXECUTED
cf6c: 0a00002f beq d030 <IMFS_memfile_get_block_pointer+0x208> <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
cf70: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
cf74: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
cf78: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
cf7c: 0a000026 beq d01c <IMFS_memfile_get_block_pointer+0x1f4> <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
cf80: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED
if ( !p2 ) {
cf84: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
cf88: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
cf8c: 1affffca bne cebc <IMFS_memfile_get_block_pointer+0x94> <== NOT EXECUTED
p2 = memfile_alloc_block();
cf90: ebffff97 bl cdf4 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
cf94: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
cf98: 15850000 strne r0, [r5] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
cf9c: 0affffd6 beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
cfa0: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED
cfa4: eaffffcc b cedc <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
cfa8: e3500000 cmp r0, #0
cfac: 1affffc9 bne ced8 <IMFS_memfile_get_block_pointer+0xb0>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
cfb0: e3a00000 mov r0, #0 <== NOT EXECUTED
cfb4: eaffffc8 b cedc <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
cfb8: e3530000 cmp r3, #0 <== NOT EXECUTED
cfbc: 0affffce beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
cfc0: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p1 )
cfc4: e3530000 cmp r3, #0 <== NOT EXECUTED
cfc8: 0affffcb beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
cfcc: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p2 )
cfd0: e3500000 cmp r0, #0 <== NOT EXECUTED
cfd4: 0affffc8 beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
cfd8: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED
cfdc: eaffffbe b cedc <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
cfe0: ebffff83 bl cdf4 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
cfe4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
cfe8: 0affffc3 beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
cfec: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
cff0: eaffffad b ceac <IMFS_memfile_get_block_pointer+0x84> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
cff4: e59f004c ldr r0, [pc, #76] ; d048 <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED
cff8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED
cffc: e59f2048 ldr r2, [pc, #72] ; d04c <IMFS_memfile_get_block_pointer+0x224><== NOT EXECUTED
d000: e59f3048 ldr r3, [pc, #72] ; d050 <IMFS_memfile_get_block_pointer+0x228><== NOT EXECUTED
d004: ebfff742 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d008: e59f0038 ldr r0, [pc, #56] ; d048 <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED
d00c: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED
d010: e59f2034 ldr r2, [pc, #52] ; d04c <IMFS_memfile_get_block_pointer+0x224><== NOT EXECUTED
d014: e59f3038 ldr r3, [pc, #56] ; d054 <IMFS_memfile_get_block_pointer+0x22c><== NOT EXECUTED
d018: ebfff73d bl ad14 <__assert_func> <== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
d01c: ebffff74 bl cdf4 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
d020: e2502000 subs r2, r0, #0 <== NOT EXECUTED
d024: 0affffb4 beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
d028: e5862000 str r2, [r6] <== NOT EXECUTED
d02c: eaffffd3 b cf80 <IMFS_memfile_get_block_pointer+0x158> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
d030: ebffff6f bl cdf4 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
d034: e2503000 subs r3, r0, #0 <== NOT EXECUTED
d038: 0affffaf beq cefc <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0;
info->triply_indirect = p;
d03c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
d040: eaffffca b cf70 <IMFS_memfile_get_block_pointer+0x148> <== NOT EXECUTED
0000da48 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
da48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
da4c: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
da50: e24dd014 sub sp, sp, #20
da54: e1a08003 mov r8, r3
da58: e1a0a001 mov sl, r1
da5c: e1a0b002 mov fp, r2
da60: e59d5038 ldr r5, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
da64: 0a000089 beq dc90 <IMFS_memfile_read+0x248>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
da68: e599304c ldr r3, [r9, #76] ; 0x4c
da6c: e2432005 sub r2, r3, #5
da70: e3520001 cmp r2, #1
da74: 8a000096 bhi dcd4 <IMFS_memfile_read+0x28c>
/*
* Error checks on arguments
*/
assert( dest );
da78: e3580000 cmp r8, #0
da7c: 0a00008e beq dcbc <IMFS_memfile_read+0x274>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
da80: e3550000 cmp r5, #0
da84: 0a000076 beq dc64 <IMFS_memfile_read+0x21c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
da88: e3530006 cmp r3, #6
da8c: 0a00005a beq dbfc <IMFS_memfile_read+0x1b4>
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
da90: e5993054 ldr r3, [r9, #84] ; 0x54
da94: e3a02000 mov r2, #0
da98: e1520003 cmp r2, r3
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
da9c: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
daa0: e5992050 ldr r2, [r9, #80] ; 0x50
daa4: e0851001 add r1, r5, r1
daa8: da00004f ble dbec <IMFS_memfile_read+0x1a4>
my_length = the_jnode->info.file.size - start;
daac: e0635002 rsb r5, r3, r2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
dab0: e59f624c ldr r6, [pc, #588] ; dd04 <IMFS_memfile_read+0x2bc>
dab4: e5964000 ldr r4, [r6]
dab8: e1a0000a mov r0, sl
dabc: e1a02004 mov r2, r4
dac0: e1a03fc2 asr r3, r2, #31
dac4: e1a0100b mov r1, fp
dac8: e98d000c stmib sp, {r2, r3}
dacc: eb0030b5 bl 19da8 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
dad0: e1a0100b mov r1, fp
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
dad4: e1a0c000 mov ip, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
dad8: e99d000c ldmib sp, {r2, r3}
dadc: e1a0000a mov r0, sl
dae0: e58dc000 str ip, [sp]
dae4: eb002f85 bl 19900 <__divdi3>
if ( start_offset ) {
dae8: e59dc000 ldr ip, [sp]
daec: e35c0000 cmp ip, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
daf0: e1a07000 mov r7, r0
if ( start_offset ) {
daf4: 01a0a00c moveq sl, ip
daf8: 0a000013 beq db4c <IMFS_memfile_read+0x104>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
dafc: e1a00009 mov r0, r9
db00: e1a01007 mov r1, r7
db04: e3a02000 mov r2, #0
db08: e58dc000 str ip, [sp]
db0c: ebfffcc5 bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
db10: e3500000 cmp r0, #0
db14: e59dc000 ldr ip, [sp]
db18: 0a000073 beq dcec <IMFS_memfile_read+0x2a4>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
db1c: e06ca004 rsb sl, ip, r4
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
db20: e5901000 ldr r1, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
db24: e155000a cmp r5, sl
db28: 31a0a005 movcc sl, r5
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
db2c: e1a00008 mov r0, r8
db30: e081100c add r1, r1, ip
db34: e1a0200a mov r2, sl
db38: eb000903 bl ff4c <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
db3c: e5964000 ldr r4, [r6]
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
db40: e088800a add r8, r8, sl
block++;
db44: e2877001 add r7, r7, #1
my_length -= to_copy;
db48: e06a5005 rsb r5, sl, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
db4c: e1550004 cmp r5, r4
db50: 3a000010 bcc db98 <IMFS_memfile_read+0x150>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
db54: e1a00009 mov r0, r9
db58: e1a01007 mov r1, r7
db5c: e3a02000 mov r2, #0
db60: ebfffcb0 bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
db64: e3500000 cmp r0, #0
db68: 0a000042 beq dc78 <IMFS_memfile_read+0x230>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
db6c: e5901000 ldr r1, [r0]
db70: e1a02004 mov r2, r4
db74: e1a00008 mov r0, r8
db78: eb0008f3 bl ff4c <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
db7c: e5963000 ldr r3, [r6]
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
db80: e0645005 rsb r5, r4, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
db84: e1530005 cmp r3, r5
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
db88: e0888004 add r8, r8, r4
block++;
db8c: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
db90: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
db94: 9affffee bls db54 <IMFS_memfile_read+0x10c>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
db98: e3550000 cmp r5, #0
db9c: 0a00000a beq dbcc <IMFS_memfile_read+0x184>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
dba0: e1a01007 mov r1, r7
dba4: e1a00009 mov r0, r9
dba8: e3a02000 mov r2, #0
dbac: ebfffc9d bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
dbb0: e2503000 subs r3, r0, #0
dbb4: 0a00003a beq dca4 <IMFS_memfile_read+0x25c>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
dbb8: e1a00008 mov r0, r8
dbbc: e5931000 ldr r1, [r3]
dbc0: e1a02005 mov r2, r5
dbc4: eb0008e0 bl ff4c <memcpy>
copied += my_length;
dbc8: e08aa005 add sl, sl, r5
}
IMFS_update_atime( the_jnode );
dbcc: e28d000c add r0, sp, #12
dbd0: e3a01000 mov r1, #0
dbd4: ebffd15c bl 214c <gettimeofday>
dbd8: e59d300c ldr r3, [sp, #12]
dbdc: e5893040 str r3, [r9, #64] ; 0x40
return copied;
dbe0: e1a0000a mov r0, sl
}
dbe4: e28dd014 add sp, sp, #20
dbe8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
dbec: 1affffaf bne dab0 <IMFS_memfile_read+0x68>
dbf0: e1510002 cmp r1, r2
dbf4: 9affffad bls dab0 <IMFS_memfile_read+0x68>
dbf8: eaffffab b daac <IMFS_memfile_read+0x64>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
dbfc: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED
dc00: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
dc04: e1a00003 mov r0, r3 <== NOT EXECUTED
dc08: e1a01004 mov r1, r4 <== NOT EXECUTED
dc0c: e3a02000 mov r2, #0 <== NOT EXECUTED
dc10: e050000a subs r0, r0, sl <== NOT EXECUTED
dc14: e0c1100b sbc r1, r1, fp <== NOT EXECUTED
dc18: e1520001 cmp r2, r1 <== NOT EXECUTED
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
dc1c: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
dc20: da00000b ble dc54 <IMFS_memfile_read+0x20c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
dc24: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
dc28: e082100a add r1, r2, sl <== NOT EXECUTED
dc2c: e1a00008 mov r0, r8 <== NOT EXECUTED
dc30: e1a02005 mov r2, r5 <== NOT EXECUTED
dc34: eb0008c4 bl ff4c <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
dc38: e28d000c add r0, sp, #12 <== NOT EXECUTED
dc3c: e3a01000 mov r1, #0 <== NOT EXECUTED
dc40: ebffd141 bl 214c <gettimeofday> <== NOT EXECUTED
dc44: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
return my_length;
dc48: e1a00005 mov r0, r5 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
IMFS_update_atime( the_jnode );
dc4c: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED
return my_length;
dc50: eaffffe3 b dbe4 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
dc54: 1afffff3 bne dc28 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED
dc58: e1550000 cmp r5, r0 <== NOT EXECUTED
dc5c: 8afffff0 bhi dc24 <IMFS_memfile_read+0x1dc> <== NOT EXECUTED
dc60: eafffff0 b dc28 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
dc64: eb0006aa bl f714 <__errno> <== NOT EXECUTED
dc68: e3a03016 mov r3, #22 <== NOT EXECUTED
dc6c: e5803000 str r3, [r0] <== NOT EXECUTED
dc70: e3e00000 mvn r0, #0 <== NOT EXECUTED
dc74: eaffffda b dbe4 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
dc78: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED
dc7c: e2811003 add r1, r1, #3 <== NOT EXECUTED
dc80: e59f0080 ldr r0, [pc, #128] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dc84: e59f2080 ldr r2, [pc, #128] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dc88: e59f3080 ldr r3, [pc, #128] ; dd10 <IMFS_memfile_read+0x2c8><== NOT EXECUTED
dc8c: ebfff420 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
dc90: e59f0070 ldr r0, [pc, #112] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dc94: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED
dc98: e59f206c ldr r2, [pc, #108] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dc9c: e59f3070 ldr r3, [pc, #112] ; dd14 <IMFS_memfile_read+0x2cc><== NOT EXECUTED
dca0: ebfff41b bl ad14 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
dca4: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED
dca8: e2811001 add r1, r1, #1 <== NOT EXECUTED
dcac: e59f0054 ldr r0, [pc, #84] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dcb0: e59f2054 ldr r2, [pc, #84] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dcb4: e59f3054 ldr r3, [pc, #84] ; dd10 <IMFS_memfile_read+0x2c8><== NOT EXECUTED
dcb8: ebfff415 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
dcbc: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED
dcc0: e2811002 add r1, r1, #2 <== NOT EXECUTED
dcc4: e59f003c ldr r0, [pc, #60] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dcc8: e59f203c ldr r2, [pc, #60] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dccc: e59f3044 ldr r3, [pc, #68] ; dd18 <IMFS_memfile_read+0x2d0><== NOT EXECUTED
dcd0: ebfff40f bl ad14 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
dcd4: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED
dcd8: e2811001 add r1, r1, #1 <== NOT EXECUTED
dcdc: e59f0024 ldr r0, [pc, #36] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dce0: e59f2024 ldr r2, [pc, #36] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dce4: e59f3030 ldr r3, [pc, #48] ; dd1c <IMFS_memfile_read+0x2d4><== NOT EXECUTED
dce8: ebfff409 bl ad14 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
dcec: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED
dcf0: e2811002 add r1, r1, #2 <== NOT EXECUTED
dcf4: e59f000c ldr r0, [pc, #12] ; dd08 <IMFS_memfile_read+0x2c0><== NOT EXECUTED
dcf8: e59f200c ldr r2, [pc, #12] ; dd0c <IMFS_memfile_read+0x2c4><== NOT EXECUTED
dcfc: e59f300c ldr r3, [pc, #12] ; dd10 <IMFS_memfile_read+0x2c8><== NOT EXECUTED
dd00: ebfff403 bl ad14 <__assert_func> <== NOT EXECUTED
0000d130 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
d130: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d134: e250a000 subs sl, r0, #0
d138: 0a00004f beq d27c <IMFS_memfile_remove+0x14c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d13c: e59a304c ldr r3, [sl, #76] ; 0x4c
d140: e3530005 cmp r3, #5
d144: 1a000052 bne d294 <IMFS_memfile_remove+0x164>
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
d148: e59f615c ldr r6, [pc, #348] ; d2ac <IMFS_memfile_remove+0x17c>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
d14c: e59a3058 ldr r3, [sl, #88] ; 0x58
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
d150: e5967000 ldr r7, [r6]
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
d154: e3530000 cmp r3, #0
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
d158: e1a07127 lsr r7, r7, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
d15c: 128a0058 addne r0, sl, #88 ; 0x58
d160: 11a01007 movne r1, r7
d164: 1bffffbb blne d058 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
d168: e59a305c ldr r3, [sl, #92] ; 0x5c
d16c: e3530000 cmp r3, #0
d170: 0a000014 beq d1c8 <IMFS_memfile_remove+0x98>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
d174: e5962000 ldr r2, [r6] <== NOT EXECUTED
d178: e1b02122 lsrs r2, r2, #2 <== NOT EXECUTED
d17c: 0a00000e beq d1bc <IMFS_memfile_remove+0x8c> <== NOT EXECUTED
d180: e3a02000 mov r2, #0 <== NOT EXECUTED
d184: e1a04002 mov r4, r2 <== NOT EXECUTED
d188: ea000000 b d190 <IMFS_memfile_remove+0x60> <== NOT EXECUTED
d18c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
d190: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED
d194: e3510000 cmp r1, #0 <== NOT EXECUTED
d198: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
d19c: 10830002 addne r0, r3, r2 <== NOT EXECUTED
d1a0: 11a01007 movne r1, r7 <== NOT EXECUTED
d1a4: 1bffffab blne d058 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
d1a8: e5963000 ldr r3, [r6] <== NOT EXECUTED
d1ac: e2844001 add r4, r4, #1 <== NOT EXECUTED
d1b0: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
d1b4: e1a02004 mov r2, r4 <== NOT EXECUTED
d1b8: 3afffff3 bcc d18c <IMFS_memfile_remove+0x5c> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
d1bc: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED
d1c0: e1a01007 mov r1, r7 <== NOT EXECUTED
d1c4: ebffffa3 bl d058 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
d1c8: e59a0060 ldr r0, [sl, #96] ; 0x60
d1cc: e3500000 cmp r0, #0
d1d0: 0a000027 beq d274 <IMFS_memfile_remove+0x144>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
d1d4: e5963000 ldr r3, [r6] <== NOT EXECUTED
d1d8: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
d1dc: 0a000021 beq d268 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
d1e0: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
d1e4: e3550000 cmp r5, #0 <== NOT EXECUTED
d1e8: 13a09000 movne r9, #0 <== NOT EXECUTED
d1ec: 11a08009 movne r8, r9 <== NOT EXECUTED
d1f0: 0a00001c beq d268 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
d1f4: e3530000 cmp r3, #0 <== NOT EXECUTED
d1f8: 0a00000d beq d234 <IMFS_memfile_remove+0x104> <== NOT EXECUTED
d1fc: e3a00000 mov r0, #0 <== NOT EXECUTED
d200: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( p[j] ) {
d204: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED
d208: e3530000 cmp r3, #0 <== NOT EXECUTED
d20c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
d210: 10850000 addne r0, r5, r0 <== NOT EXECUTED
d214: 11a01007 movne r1, r7 <== NOT EXECUTED
d218: 1bffff8e blne d058 <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
d21c: e5963000 ldr r3, [r6] <== NOT EXECUTED
d220: e2844001 add r4, r4, #1 <== NOT EXECUTED
d224: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
d228: e1a00004 mov r0, r4 <== NOT EXECUTED
d22c: 3afffff4 bcc d204 <IMFS_memfile_remove+0xd4> <== NOT EXECUTED
d230: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
d234: e0800009 add r0, r0, r9 <== NOT EXECUTED
d238: e1a01007 mov r1, r7 <== NOT EXECUTED
d23c: ebffff85 bl d058 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
d240: e5963000 ldr r3, [r6] <== NOT EXECUTED
d244: e2888001 add r8, r8, #1 <== NOT EXECUTED
d248: e1a03123 lsr r3, r3, #2 <== NOT EXECUTED
d24c: e1530008 cmp r3, r8 <== NOT EXECUTED
d250: 9a000004 bls d268 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
d254: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
d258: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
d25c: e3550000 cmp r5, #0 <== NOT EXECUTED
d260: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED
d264: 1affffe2 bne d1f4 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
d268: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED
d26c: e1a01007 mov r1, r7 <== NOT EXECUTED
d270: ebffff78 bl d058 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
d274: e3a00000 mov r0, #0
d278: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d27c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED
d280: e2811002 add r1, r1, #2 <== NOT EXECUTED
d284: e59f0024 ldr r0, [pc, #36] ; d2b0 <IMFS_memfile_remove+0x180><== NOT EXECUTED
d288: e59f2024 ldr r2, [pc, #36] ; d2b4 <IMFS_memfile_remove+0x184><== NOT EXECUTED
d28c: e59f3024 ldr r3, [pc, #36] ; d2b8 <IMFS_memfile_remove+0x188><== NOT EXECUTED
d290: ebfff69f bl ad14 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d294: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED
d298: e2811002 add r1, r1, #2 <== NOT EXECUTED
d29c: e59f000c ldr r0, [pc, #12] ; d2b0 <IMFS_memfile_remove+0x180><== NOT EXECUTED
d2a0: e59f200c ldr r2, [pc, #12] ; d2b4 <IMFS_memfile_remove+0x184><== NOT EXECUTED
d2a4: e59f3010 ldr r3, [pc, #16] ; d2bc <IMFS_memfile_remove+0x18c><== NOT EXECUTED
d2a8: ebfff699 bl ad14 <__assert_func> <== NOT EXECUTED
0000d0e0 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
d0e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d0e4: e3a02000 mov r2, #0 <== NOT EXECUTED
d0e8: ebffff4e bl ce28 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
d0ec: e2503000 subs r3, r0, #0 <== NOT EXECUTED
d0f0: 0a000005 beq d10c <IMFS_memfile_remove_block+0x2c> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
*block_ptr = 0;
d0f4: e3a02000 mov r2, #0 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( block_ptr ) {
ptr = *block_ptr;
d0f8: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
d0fc: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
d100: ebffff33 bl cdd4 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
d104: e3a00001 mov r0, #1 <== NOT EXECUTED
d108: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d10c: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED
d110: e2811002 add r1, r1, #2 <== NOT EXECUTED
d114: e59f0008 ldr r0, [pc, #8] ; d124 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED
d118: e59f2008 ldr r2, [pc, #8] ; d128 <IMFS_memfile_remove_block+0x48><== NOT EXECUTED
d11c: e59f3008 ldr r3, [pc, #8] ; d12c <IMFS_memfile_remove_block+0x4c><== NOT EXECUTED
d120: ebfff6fb bl ad14 <__assert_func> <== NOT EXECUTED
0000d6c4 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
d6c4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d6c8: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
d6cc: e24dd014 sub sp, sp, #20
d6d0: e1a06001 mov r6, r1
d6d4: e1a07002 mov r7, r2
d6d8: e1a08003 mov r8, r3
d6dc: e59da038 ldr sl, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d6e0: 0a000079 beq d8cc <IMFS_memfile_write+0x208>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d6e4: e599304c ldr r3, [r9, #76] ; 0x4c
d6e8: e3530005 cmp r3, #5
d6ec: 1a000070 bne d8b4 <IMFS_memfile_write+0x1f0>
/*
* Error check arguments
*/
assert( source );
d6f0: e3580000 cmp r8, #0
d6f4: 0a000085 beq d910 <IMFS_memfile_write+0x24c>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
d6f8: e35a0000 cmp sl, #0
d6fc: 0a000062 beq d88c <IMFS_memfile_write+0x1c8>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
d700: e5993054 ldr r3, [r9, #84] ; 0x54
d704: e3530000 cmp r3, #0
d708: e08a1001 add r1, sl, r1
d70c: ba000054 blt d864 <IMFS_memfile_write+0x1a0>
d710: 0a000050 beq d858 <IMFS_memfile_write+0x194>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d714: e59f520c ldr r5, [pc, #524] ; d928 <IMFS_memfile_write+0x264>
d718: e5954000 ldr r4, [r5]
d71c: e1a00006 mov r0, r6
d720: e1a02004 mov r2, r4
d724: e1a03fc2 asr r3, r2, #31
d728: e1a01007 mov r1, r7
d72c: e98d000c stmib sp, {r2, r3}
d730: eb00319c bl 19da8 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d734: e1a01007 mov r1, r7
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d738: e1a0b000 mov fp, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d73c: e99d000c ldmib sp, {r2, r3}
d740: e1a00006 mov r0, r6
d744: eb00306d bl 19900 <__divdi3>
if ( start_offset ) {
d748: e35b0000 cmp fp, #0
d74c: 01a0700a moveq r7, sl
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d750: e1a06000 mov r6, r0
if ( start_offset ) {
d754: 01a0a00b moveq sl, fp
d758: 1a000028 bne d800 <IMFS_memfile_write+0x13c>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d75c: e1570004 cmp r7, r4
d760: 3a000010 bcc d7a8 <IMFS_memfile_write+0xe4>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d764: e1a00009 mov r0, r9
d768: e1a01006 mov r1, r6
d76c: e3a02000 mov r2, #0
d770: ebfffdac bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d774: e3500000 cmp r0, #0
d778: 0a000048 beq d8a0 <IMFS_memfile_write+0x1dc>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
d77c: e1a01008 mov r1, r8
d780: e5900000 ldr r0, [r0]
d784: e1a02004 mov r2, r4
d788: eb0009ef bl ff4c <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d78c: e5953000 ldr r3, [r5]
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
d790: e0647007 rsb r7, r4, r7
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d794: e1530007 cmp r3, r7
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
d798: e0888004 add r8, r8, r4
block++;
d79c: e2866001 add r6, r6, #1
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
d7a0: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d7a4: 9affffee bls d764 <IMFS_memfile_write+0xa0>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
d7a8: e3570000 cmp r7, #0
d7ac: 0a00000a beq d7dc <IMFS_memfile_write+0x118>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d7b0: e1a01006 mov r1, r6
d7b4: e1a00009 mov r0, r9
d7b8: e3a02000 mov r2, #0
d7bc: ebfffd99 bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d7c0: e3500000 cmp r0, #0
d7c4: 0a00004b beq d8f8 <IMFS_memfile_write+0x234>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
d7c8: e5900000 ldr r0, [r0]
d7cc: e1a01008 mov r1, r8
d7d0: e1a02007 mov r2, r7
d7d4: eb0009dc bl ff4c <memcpy>
my_length = 0;
copied += to_copy;
d7d8: e08aa007 add sl, sl, r7
}
IMFS_mtime_ctime_update( the_jnode );
d7dc: e28d000c add r0, sp, #12
d7e0: e3a01000 mov r1, #0
d7e4: ebffd258 bl 214c <gettimeofday>
d7e8: e59d300c ldr r3, [sp, #12]
d7ec: e5893048 str r3, [r9, #72] ; 0x48
d7f0: e5893044 str r3, [r9, #68] ; 0x44
return copied;
}
d7f4: e1a0000a mov r0, sl
d7f8: e28dd014 add sp, sp, #20
d7fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d800: e1a00009 mov r0, r9
d804: e1a01006 mov r1, r6
d808: e3a02000 mov r2, #0
d80c: ebfffd85 bl ce28 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d810: e3500000 cmp r0, #0
d814: 0a000032 beq d8e4 <IMFS_memfile_write+0x220>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
d818: e06b3004 rsb r3, fp, r4
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
d81c: e5900000 ldr r0, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
d820: e153000a cmp r3, sl
d824: 21a0300a movcs r3, sl
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
d828: e1a01008 mov r1, r8
d82c: e1a02003 mov r2, r3
d830: e080000b add r0, r0, fp
d834: e58d3000 str r3, [sp]
d838: eb0009c3 bl ff4c <memcpy>
src += to_copy;
d83c: e59d3000 ldr r3, [sp]
block++;
my_length -= to_copy;
copied += to_copy;
d840: e5954000 ldr r4, [r5]
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
d844: e063700a rsb r7, r3, sl
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
d848: e0888003 add r8, r8, r3
block++;
d84c: e2866001 add r6, r6, #1
my_length -= to_copy;
copied += to_copy;
d850: e1a0a003 mov sl, r3
d854: eaffffc0 b d75c <IMFS_memfile_write+0x98>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
d858: e5993050 ldr r3, [r9, #80] ; 0x50
d85c: e1530001 cmp r3, r1
d860: 2affffab bcs d714 <IMFS_memfile_write+0x50>
status = IMFS_memfile_extend( the_jnode, last_byte );
d864: e1a00009 mov r0, r9
d868: e3a02000 mov r2, #0
d86c: ebfffeee bl d42c <IMFS_memfile_extend>
if ( status )
d870: e3500000 cmp r0, #0
d874: 0affffa6 beq d714 <IMFS_memfile_write+0x50>
rtems_set_errno_and_return_minus_one( ENOSPC );
d878: eb0007a5 bl f714 <__errno> <== NOT EXECUTED
d87c: e3a0301c mov r3, #28 <== NOT EXECUTED
d880: e5803000 str r3, [r0] <== NOT EXECUTED
d884: e3e0a000 mvn sl, #0 <== NOT EXECUTED
d888: eaffffd9 b d7f4 <IMFS_memfile_write+0x130> <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
d88c: eb0007a0 bl f714 <__errno> <== NOT EXECUTED
d890: e3a03016 mov r3, #22 <== NOT EXECUTED
d894: e5803000 str r3, [r0] <== NOT EXECUTED
d898: e3e0a000 mvn sl, #0 <== NOT EXECUTED
d89c: eaffffd4 b d7f4 <IMFS_memfile_write+0x130> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d8a0: e59f0084 ldr r0, [pc, #132] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d8a4: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED
d8a8: e59f2080 ldr r2, [pc, #128] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d8ac: e59f3080 ldr r3, [pc, #128] ; d934 <IMFS_memfile_write+0x270><== NOT EXECUTED
d8b0: ebfff517 bl ad14 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d8b4: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED
d8b8: e2811003 add r1, r1, #3 <== NOT EXECUTED
d8bc: e59f0068 ldr r0, [pc, #104] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d8c0: e59f2068 ldr r2, [pc, #104] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d8c4: e59f306c ldr r3, [pc, #108] ; d938 <IMFS_memfile_write+0x274><== NOT EXECUTED
d8c8: ebfff511 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d8cc: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED
d8d0: e2811003 add r1, r1, #3 <== NOT EXECUTED
d8d4: e59f0050 ldr r0, [pc, #80] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d8d8: e59f2050 ldr r2, [pc, #80] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d8dc: e59f3058 ldr r3, [pc, #88] ; d93c <IMFS_memfile_write+0x278><== NOT EXECUTED
d8e0: ebfff50b bl ad14 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d8e4: e59f0040 ldr r0, [pc, #64] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d8e8: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED
d8ec: e59f203c ldr r2, [pc, #60] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d8f0: e59f303c ldr r3, [pc, #60] ; d934 <IMFS_memfile_write+0x270><== NOT EXECUTED
d8f4: ebfff506 bl ad14 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d8f8: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED
d8fc: e2811002 add r1, r1, #2 <== NOT EXECUTED
d900: e59f0024 ldr r0, [pc, #36] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d904: e59f2024 ldr r2, [pc, #36] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d908: e59f3024 ldr r3, [pc, #36] ; d934 <IMFS_memfile_write+0x270><== NOT EXECUTED
d90c: ebfff500 bl ad14 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
d910: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED
d914: e2811003 add r1, r1, #3 <== NOT EXECUTED
d918: e59f000c ldr r0, [pc, #12] ; d92c <IMFS_memfile_write+0x268><== NOT EXECUTED
d91c: e59f200c ldr r2, [pc, #12] ; d930 <IMFS_memfile_write+0x26c><== NOT EXECUTED
d920: e59f3018 ldr r3, [pc, #24] ; d940 <IMFS_memfile_write+0x27c><== NOT EXECUTED
d924: ebfff4fa bl ad14 <__assert_func> <== NOT EXECUTED
00001818 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
1818: e92d41f0 push {r4, r5, r6, r7, r8, lr}
181c: e24dd040 sub sp, sp, #64 ; 0x40
1820: e1a04001 mov r4, r1
1824: e1a07002 mov r7, r2
1828: e1a06003 mov r6, r3
182c: e1a08000 mov r8, r0
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
1830: eb003bbc bl 10728 <strlen>
1834: e28d5004 add r5, sp, #4
1838: e1a01000 mov r1, r0
183c: e28d303c add r3, sp, #60 ; 0x3c
1840: e1a00008 mov r0, r8
1844: e1a02005 mov r2, r5
1848: eb002492 bl aa98 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
184c: e2043a0f and r3, r4, #61440 ; 0xf000
1850: e3530901 cmp r3, #16384 ; 0x4000
1854: 0a00001b beq 18c8 <IMFS_mknod+0xb0>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
1858: e3530902 cmp r3, #32768 ; 0x8000
185c: 03a01005 moveq r1, #5
1860: 0a000005 beq 187c <IMFS_mknod+0x64>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
1864: e3530a06 cmp r3, #24576 ; 0x6000
1868: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
186c: 058d7028 streq r7, [sp, #40] ; 0x28
1870: 058d602c streq r6, [sp, #44] ; 0x2c
1874: 03a01002 moveq r1, #2
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
1878: 1a00000a bne 18a8 <IMFS_mknod+0x90>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
187c: e28dc028 add ip, sp, #40 ; 0x28
1880: e59d0058 ldr r0, [sp, #88] ; 0x58
1884: e1a02005 mov r2, r5
1888: e1a03004 mov r3, r4
188c: e58dc000 str ip, [sp]
1890: eb0020f8 bl 9c78 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
1894: e3500000 cmp r0, #0
1898: 13a00000 movne r0, #0
189c: 0a00000b beq 18d0 <IMFS_mknod+0xb8>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
18a0: e28dd040 add sp, sp, #64 ; 0x40
18a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
18a8: e3530a01 cmp r3, #4096 ; 0x1000
18ac: 03a01007 moveq r1, #7
18b0: 0afffff1 beq 187c <IMFS_mknod+0x64>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
18b4: eb003796 bl f714 <__errno> <== NOT EXECUTED
18b8: e3a03016 mov r3, #22 <== NOT EXECUTED
18bc: e5803000 str r3, [r0] <== NOT EXECUTED
18c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
18c4: eafffff5 b 18a0 <IMFS_mknod+0x88> <== NOT EXECUTED
18c8: e3a01001 mov r1, #1
18cc: eaffffea b 187c <IMFS_mknod+0x64>
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
18d0: eb00378f bl f714 <__errno> <== NOT EXECUTED
18d4: e3a0300c mov r3, #12 <== NOT EXECUTED
18d8: e5803000 str r3, [r0] <== NOT EXECUTED
18dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
18e0: eaffffee b 18a0 <IMFS_mknod+0x88> <== NOT EXECUTED
000018e4 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
18e4: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
18e8: e593204c ldr r2, [r3, #76] ; 0x4c
18ec: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
18f0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
18f4: 1a000002 bne 1904 <IMFS_mount+0x20>
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
18f8: e583005c str r0, [r3, #92] ; 0x5c
18fc: e3a00000 mov r0, #0
return 0;
}
1900: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1904: eb003782 bl f714 <__errno> <== NOT EXECUTED
1908: e3a03014 mov r3, #20 <== NOT EXECUTED
190c: e5803000 str r3, [r0] <== NOT EXECUTED
1910: e3e00000 mvn r0, #0 <== NOT EXECUTED
1914: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00003d80 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
3d80: e92d4030 push {r4, r5, lr}
assert( the_jnode );
3d84: e2504000 subs r4, r0, #0
3d88: 0a000055 beq 3ee4 <IMFS_print_jnode+0x164>
fprintf(stdout, "%s", the_jnode->name );
3d8c: e59f5164 ldr r5, [pc, #356] ; 3ef8 <IMFS_print_jnode+0x178>
3d90: e5953000 ldr r3, [r5]
3d94: e284000c add r0, r4, #12
3d98: e5931008 ldr r1, [r3, #8]
3d9c: eb004053 bl 13ef0 <fputs>
switch( the_jnode->type ) {
3da0: e594204c ldr r2, [r4, #76] ; 0x4c
3da4: e2423001 sub r3, r2, #1
3da8: e3530006 cmp r3, #6
3dac: 979ff103 ldrls pc, [pc, r3, lsl #2]
3db0: ea000011 b 3dfc <IMFS_print_jnode+0x7c> <== NOT EXECUTED
3db4: 00003e20 .word 0x00003e20 <== NOT EXECUTED
3db8: 00003e3c .word 0x00003e3c <== NOT EXECUTED
3dbc: 00003e58 .word 0x00003e58 <== NOT EXECUTED
3dc0: 00003e84 .word 0x00003e84 <== NOT EXECUTED
3dc4: 00003eb0 .word 0x00003eb0 <== NOT EXECUTED
3dc8: 00003ec8 .word 0x00003ec8 <== NOT EXECUTED
3dcc: 00003dd0 .word 0x00003dd0 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
3dd0: e5953000 ldr r3, [r5] <== NOT EXECUTED
3dd4: e3a01001 mov r1, #1 <== NOT EXECUTED
3dd8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
3ddc: e3a02012 mov r2, #18 <== NOT EXECUTED
3de0: e59f0114 ldr r0, [pc, #276] ; 3efc <IMFS_print_jnode+0x17c><== NOT EXECUTED
3de4: eb004356 bl 14b44 <fwrite> <== NOT EXECUTED
assert(0);
3de8: e59f0110 ldr r0, [pc, #272] ; 3f00 <IMFS_print_jnode+0x180><== NOT EXECUTED
3dec: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED
3df0: e59f210c ldr r2, [pc, #268] ; 3f04 <IMFS_print_jnode+0x184><== NOT EXECUTED
3df4: e59f310c ldr r3, [pc, #268] ; 3f08 <IMFS_print_jnode+0x188><== NOT EXECUTED
3df8: eb00029b bl 486c <__assert_func> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3dfc: e5953000 ldr r3, [r5] <== NOT EXECUTED
3e00: e59f1104 ldr r1, [pc, #260] ; 3f0c <IMFS_print_jnode+0x18c><== NOT EXECUTED
3e04: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
3e08: eb003fd7 bl 13d6c <fprintf> <== NOT EXECUTED
assert(0);
3e0c: e59f00ec ldr r0, [pc, #236] ; 3f00 <IMFS_print_jnode+0x180><== NOT EXECUTED
3e10: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED
3e14: e59f20e8 ldr r2, [pc, #232] ; 3f04 <IMFS_print_jnode+0x184><== NOT EXECUTED
3e18: e59f30e8 ldr r3, [pc, #232] ; 3f08 <IMFS_print_jnode+0x188><== NOT EXECUTED
3e1c: eb000292 bl 486c <__assert_func> <== NOT EXECUTED
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
3e20: e5953000 ldr r3, [r5]
3e24: e3a0002f mov r0, #47 ; 0x2f
3e28: e5931008 ldr r1, [r3, #8]
3e2c: eb003fea bl 13ddc <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
3e30: e59f00d8 ldr r0, [pc, #216] ; 3f10 <IMFS_print_jnode+0x190>
}
3e34: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
3e38: ea004733 b 15b0c <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3e3c: e5952000 ldr r2, [r5]
3e40: e5943054 ldr r3, [r4, #84] ; 0x54
3e44: e5920008 ldr r0, [r2, #8]
3e48: e59f10c4 ldr r1, [pc, #196] ; 3f14 <IMFS_print_jnode+0x194>
3e4c: e5942050 ldr r2, [r4, #80] ; 0x50
3e50: eb003fc5 bl 13d6c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
3e54: eafffff5 b 3e30 <IMFS_print_jnode+0xb0>
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
3e58: e5953000 ldr r3, [r5] <== NOT EXECUTED
3e5c: e3a01001 mov r1, #1 <== NOT EXECUTED
3e60: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
3e64: e3a02013 mov r2, #19 <== NOT EXECUTED
3e68: e59f00a8 ldr r0, [pc, #168] ; 3f18 <IMFS_print_jnode+0x198><== NOT EXECUTED
3e6c: eb004334 bl 14b44 <fwrite> <== NOT EXECUTED
assert(0);
3e70: e59f0088 ldr r0, [pc, #136] ; 3f00 <IMFS_print_jnode+0x180><== NOT EXECUTED
3e74: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED
3e78: e59f2084 ldr r2, [pc, #132] ; 3f04 <IMFS_print_jnode+0x184><== NOT EXECUTED
3e7c: e59f3084 ldr r3, [pc, #132] ; 3f08 <IMFS_print_jnode+0x188><== NOT EXECUTED
3e80: eb000279 bl 486c <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3e84: e5953000 ldr r3, [r5] <== NOT EXECUTED
3e88: e3a01001 mov r1, #1 <== NOT EXECUTED
3e8c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
3e90: e3a02013 mov r2, #19 <== NOT EXECUTED
3e94: e59f007c ldr r0, [pc, #124] ; 3f18 <IMFS_print_jnode+0x198><== NOT EXECUTED
3e98: eb004329 bl 14b44 <fwrite> <== NOT EXECUTED
assert(0);
3e9c: e59f005c ldr r0, [pc, #92] ; 3f00 <IMFS_print_jnode+0x180> <== NOT EXECUTED
3ea0: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED
3ea4: e59f2058 ldr r2, [pc, #88] ; 3f04 <IMFS_print_jnode+0x184> <== NOT EXECUTED
3ea8: e59f3058 ldr r3, [pc, #88] ; 3f08 <IMFS_print_jnode+0x188> <== NOT EXECUTED
3eac: eb00026e bl 486c <__assert_func> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
3eb0: e5953000 ldr r3, [r5]
3eb4: e5942050 ldr r2, [r4, #80] ; 0x50
3eb8: e5930008 ldr r0, [r3, #8]
3ebc: e59f1058 ldr r1, [pc, #88] ; 3f1c <IMFS_print_jnode+0x19c>
3ec0: eb003fa9 bl 13d6c <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
3ec4: eaffffd9 b 3e30 <IMFS_print_jnode+0xb0>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
3ec8: e5952000 ldr r2, [r5] <== NOT EXECUTED
3ecc: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3ed0: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
3ed4: e59f1044 ldr r1, [pc, #68] ; 3f20 <IMFS_print_jnode+0x1a0> <== NOT EXECUTED
3ed8: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
3edc: eb003fa2 bl 13d6c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
3ee0: eaffffd2 b 3e30 <IMFS_print_jnode+0xb0> <== NOT EXECUTED
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
3ee4: e59f0014 ldr r0, [pc, #20] ; 3f00 <IMFS_print_jnode+0x180> <== NOT EXECUTED
3ee8: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
3eec: e59f2010 ldr r2, [pc, #16] ; 3f04 <IMFS_print_jnode+0x184> <== NOT EXECUTED
3ef0: e59f302c ldr r3, [pc, #44] ; 3f24 <IMFS_print_jnode+0x1a4> <== NOT EXECUTED
3ef4: eb00025c bl 486c <__assert_func> <== NOT EXECUTED
00001924 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
1924: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
1928: e593004c ldr r0, [r3, #76] ; 0x4c
192c: e3500004 cmp r0, #4
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
1930: e92d4010 push {r4, lr}
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
1934: 1a000013 bne 1988 <IMFS_readlink+0x64>
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1938: e3520000 cmp r2, #0
193c: 0a00000f beq 1980 <IMFS_readlink+0x5c>
1940: e5930050 ldr r0, [r3, #80] ; 0x50
1944: e5d0c000 ldrb ip, [r0]
1948: e35c0000 cmp ip, #0
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
194c: 13a04000 movne r4, #0
1950: 11a00004 movne r0, r4
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1954: 0a000009 beq 1980 <IMFS_readlink+0x5c>
1958: e2800001 add r0, r0, #1
195c: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
1960: e7c1c004 strb ip, [r1, r4]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1964: e1a04000 mov r4, r0
1968: 98bd8010 popls {r4, pc}
196c: e593c050 ldr ip, [r3, #80] ; 0x50
1970: e7dcc000 ldrb ip, [ip, r0]
1974: e35c0000 cmp ip, #0
1978: 1afffff6 bne 1958 <IMFS_readlink+0x34>
197c: e8bd8010 pop {r4, pc}
1980: e3a00000 mov r0, #0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
1984: e8bd8010 pop {r4, pc} <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
1988: eb003761 bl f714 <__errno> <== NOT EXECUTED
198c: e3a03016 mov r3, #22 <== NOT EXECUTED
1990: e5803000 str r3, [r0] <== NOT EXECUTED
1994: e3e00000 mvn r0, #0 <== NOT EXECUTED
1998: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000ac20 <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
ac20: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
ac24: e593204c ldr r2, [r3, #76] ; 0x4c
ac28: e2422002 sub r2, r2, #2
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ac2c: e92d4030 push {r4, r5, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
ac30: e3520005 cmp r2, #5
ac34: 979ff102 ldrls pc, [pc, r2, lsl #2]
ac38: ea00002a b ace8 <IMFS_stat+0xc8> <== NOT EXECUTED
ac3c: 0000acd4 .word 0x0000acd4 <== NOT EXECUTED
ac40: 0000ace8 .word 0x0000ace8 <== NOT EXECUTED
ac44: 0000ac54 .word 0x0000ac54 <== NOT EXECUTED
ac48: 0000acfc .word 0x0000acfc <== NOT EXECUTED
ac4c: 0000acfc .word 0x0000acfc <== NOT EXECUTED
ac50: 0000ac54 .word 0x0000ac54 <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
ac54: e3a04000 mov r4, #0 <== NOT EXECUTED
ac58: e3a05000 mov r5, #0 <== NOT EXECUTED
ac5c: e5814020 str r4, [r1, #32] <== NOT EXECUTED
ac60: e5815024 str r5, [r1, #36] ; 0x24 <== NOT EXECUTED
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
ac64: e5932030 ldr r2, [r3, #48] ; 0x30
ac68: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
ac6c: e5932038 ldr r2, [r3, #56] ; 0x38
ac70: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
ac74: e5932040 ldr r2, [r3, #64] ; 0x40
ac78: e5812028 str r2, [r1, #40] ; 0x28
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
ac7c: e5902010 ldr r2, [r0, #16]
ac80: e5922034 ldr r2, [r2, #52] ; 0x34
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
ac84: e1d353b4 ldrh r5, [r3, #52] ; 0x34
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
ac88: e592c000 ldr ip, [r2]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
ac8c: e59f207c ldr r2, [pc, #124] ; ad10 <IMFS_stat+0xf0>
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
ac90: e1c151b0 strh r5, [r1, #16]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
ac94: e5924000 ldr r4, [r2]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
ac98: e3a02cff mov r2, #65280 ; 0xff00
ac9c: e28220fe add r2, r2, #254 ; 0xfe
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
aca0: e5930044 ldr r0, [r3, #68] ; 0x44
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
aca4: e5812000 str r2, [r1]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
aca8: e1d323bc ldrh r2, [r3, #60] ; 0x3c
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
acac: e5810030 str r0, [r1, #48] ; 0x30
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
acb0: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
acb4: e5930048 ldr r0, [r3, #72] ; 0x48
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
acb8: e1d333be ldrh r3, [r3, #62] ; 0x3e
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
acbc: e5810038 str r0, [r1, #56] ; 0x38
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
acc0: e5814040 str r4, [r1, #64] ; 0x40
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
acc4: e581c004 str ip, [r1, #4]
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
acc8: e1c131b4 strh r3, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
accc: e3a00000 mov r0, #0
return 0;
}
acd0: e8bd8030 pop {r4, r5, pc}
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
acd4: e2832050 add r2, r3, #80 ; 0x50
acd8: e8921004 ldm r2, {r2, ip}
acdc: e581c01c str ip, [r1, #28]
ace0: e5812018 str r2, [r1, #24]
break;
ace4: eaffffde b ac64 <IMFS_stat+0x44>
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ace8: eb001289 bl f714 <__errno> <== NOT EXECUTED
acec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
acf0: e5803000 str r3, [r0] <== NOT EXECUTED
acf4: e3e00000 mvn r0, #0 <== NOT EXECUTED
acf8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
acfc: e2835050 add r5, r3, #80 ; 0x50
ad00: e8950030 ldm r5, {r4, r5}
ad04: e5814020 str r4, [r1, #32]
ad08: e5815024 str r5, [r1, #36] ; 0x24
break;
ad0c: eaffffd4 b ac64 <IMFS_stat+0x44>
00001a00 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1a00: e92d40f0 push {r4, r5, r6, r7, lr}
1a04: e1a06000 mov r6, r0
1a08: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
1a0c: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1a10: e1a07002 mov r7, r2
1a14: e1a05001 mov r5, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
1a18: eb003b42 bl 10728 <strlen>
1a1c: e28d4004 add r4, sp, #4
1a20: e1a01000 mov r1, r0
1a24: e1a02004 mov r2, r4
1a28: e28d303c add r3, sp, #60 ; 0x3c
1a2c: e1a00007 mov r0, r7
1a30: eb002418 bl aa98 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
1a34: e1a00005 mov r0, r5
1a38: eb003b26 bl 106d8 <strdup>
if (info.sym_link.name == NULL) {
1a3c: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
1a40: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
1a44: 0a00000e beq 1a84 <IMFS_symlink+0x84>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
1a48: e3a03ca2 mov r3, #41472 ; 0xa200
1a4c: e28dc028 add ip, sp, #40 ; 0x28
1a50: e1a00006 mov r0, r6
1a54: e1a02004 mov r2, r4
1a58: e2433001 sub r3, r3, #1
1a5c: e3a01004 mov r1, #4
1a60: e58dc000 str ip, [sp]
1a64: eb002083 bl 9c78 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
1a68: e3500000 cmp r0, #0
1a6c: 13a00000 movne r0, #0
1a70: 0a000001 beq 1a7c <IMFS_symlink+0x7c>
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
1a74: e28dd040 add sp, sp, #64 ; 0x40
1a78: e8bd80f0 pop {r4, r5, r6, r7, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
1a7c: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
1a80: eb000188 bl 20a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
1a84: eb003722 bl f714 <__errno> <== NOT EXECUTED
1a88: e3a0300c mov r3, #12 <== NOT EXECUTED
1a8c: e5803000 str r3, [r0] <== NOT EXECUTED
1a90: e3e00000 mvn r0, #0 <== NOT EXECUTED
1a94: eafffff6 b 1a74 <IMFS_symlink+0x74> <== NOT EXECUTED
00001a98 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1a98: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
1a9c: e5915000 ldr r5, [r1]
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1aa0: e595304c ldr r3, [r5, #76] ; 0x4c
1aa4: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1aa8: e24dd01c sub sp, sp, #28
1aac: e1a04001 mov r4, r1
1ab0: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1ab4: 0a000006 beq 1ad4 <IMFS_unlink+0x3c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
1ab8: e1a00006 mov r0, r6
1abc: e1a01004 mov r1, r4
1ac0: e5943008 ldr r3, [r4, #8]
1ac4: e1a0e00f mov lr, pc
1ac8: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
1acc: e28dd01c add sp, sp, #28
1ad0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
1ad4: e595e050 ldr lr, [r5, #80] ; 0x50
1ad8: e35e0000 cmp lr, #0
1adc: 0a00001f beq 1b60 <IMFS_unlink+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
1ae0: e1a07001 mov r7, r1
1ae4: e8b7000f ldm r7!, {r0, r1, r2, r3}
1ae8: e1a0c00d mov ip, sp
1aec: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
1af0: e28d801c add r8, sp, #28
1af4: e528e01c str lr, [r8, #-28]!
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
1af8: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1afc: e1a0000d mov r0, sp
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
1b00: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1b04: eb0020ad bl 9dc0 <IMFS_Set_handlers>
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
1b08: e5953050 ldr r3, [r5, #80] ; 0x50
1b0c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
1b10: e3520001 cmp r2, #1
1b14: 0a000008 beq 1b3c <IMFS_unlink+0xa4>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1b18: e2422001 sub r2, r2, #1
1b1c: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
1b20: e28d0014 add r0, sp, #20
1b24: e3a01000 mov r1, #0
1b28: eb000187 bl 214c <gettimeofday>
1b2c: e5953050 ldr r3, [r5, #80] ; 0x50
1b30: e59d2014 ldr r2, [sp, #20]
1b34: e5832048 str r2, [r3, #72] ; 0x48
1b38: eaffffde b 1ab8 <IMFS_unlink+0x20>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
1b3c: e1a0100d mov r1, sp
1b40: e1a00006 mov r0, r6
1b44: e59d3008 ldr r3, [sp, #8]
1b48: e1a0e00f mov lr, pc
1b4c: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
1b50: e3500000 cmp r0, #0
1b54: 13e00000 mvnne r0, #0
1b58: 0affffd6 beq 1ab8 <IMFS_unlink+0x20>
1b5c: eaffffda b 1acc <IMFS_unlink+0x34>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
1b60: eb0036eb bl f714 <__errno> <== NOT EXECUTED
1b64: e3a03016 mov r3, #22 <== NOT EXECUTED
1b68: e5803000 str r3, [r0] <== NOT EXECUTED
1b6c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b70: eaffffd5 b 1acc <IMFS_unlink+0x34> <== NOT EXECUTED
00001b74 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1b74: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1b78: e593204c ldr r2, [r3, #76] ; 0x4c
1b7c: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1b80: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1b84: 1a000005 bne 1ba0 <IMFS_unmount+0x2c>
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
1b88: e593205c ldr r2, [r3, #92] ; 0x5c
1b8c: e3520000 cmp r2, #0
1b90: 0a000007 beq 1bb4 <IMFS_unmount+0x40>
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
1b94: e3a00000 mov r0, #0
1b98: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
1b9c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1ba0: eb0036db bl f714 <__errno> <== NOT EXECUTED
1ba4: e3a03014 mov r3, #20 <== NOT EXECUTED
1ba8: e5803000 str r3, [r0] <== NOT EXECUTED
1bac: e3e00000 mvn r0, #0 <== NOT EXECUTED
1bb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
1bb4: eb0036d6 bl f714 <__errno> <== NOT EXECUTED
1bb8: e3a03016 mov r3, #22 <== NOT EXECUTED
1bbc: e5803000 str r3, [r0] <== NOT EXECUTED
1bc0: e3e00000 mvn r0, #0 <== NOT EXECUTED
1bc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000231c <RTEMS_Malloc_Initialize>:
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
231c: e59f30d0 ldr r3, [pc, #208] ; 23f4 <RTEMS_Malloc_Initialize+0xd8>
2320: e5933000 ldr r3, [r3]
2324: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
2328: e92d4070 push {r4, r5, r6, lr}
232c: e1a05000 mov r5, r0
2330: e1a06001 mov r6, r1
2334: e1a04002 mov r4, r2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
2338: 11a0e00f movne lr, pc
233c: 1593f000 ldrne pc, [r3]
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
2340: ebffffe1 bl 22cc <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
2344: e59f30ac ldr r3, [pc, #172] ; 23f8 <RTEMS_Malloc_Initialize+0xdc>
2348: e5933000 ldr r3, [r3]
234c: e3530000 cmp r3, #0
2350: 0a000006 beq 2370 <RTEMS_Malloc_Initialize+0x54>
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2354: e1a00005 mov r0, r5 <== NOT EXECUTED
2358: e1a01004 mov r1, r4 <== NOT EXECUTED
235c: e1a0e00f mov lr, pc <== NOT EXECUTED
2360: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2364: e0856006 add r6, r5, r6 <== NOT EXECUTED
2368: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
236c: e1a05000 mov r5, r0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
2370: e59f4084 ldr r4, [pc, #132] ; 23fc <RTEMS_Malloc_Initialize+0xe0>
2374: e5d41000 ldrb r1, [r4]
2378: e3510000 cmp r1, #0
237c: 1a000018 bne 23e4 <RTEMS_Malloc_Initialize+0xc8>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
2380: e59f3078 ldr r3, [pc, #120] ; 2400 <RTEMS_Malloc_Initialize+0xe4>
2384: e5d33028 ldrb r3, [r3, #40] ; 0x28
2388: e3530000 cmp r3, #0
238c: 1a00000e bne 23cc <RTEMS_Malloc_Initialize+0xb0>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
2390: e59f406c ldr r4, [pc, #108] ; 2404 <RTEMS_Malloc_Initialize+0xe8>
2394: e1a01005 mov r1, r5
2398: e1a02006 mov r2, r6
239c: e5940000 ldr r0, [r4]
23a0: e3a03004 mov r3, #4
23a4: eb0010b3 bl 6678 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
23a8: e3500000 cmp r0, #0
23ac: 0a00000e beq 23ec <RTEMS_Malloc_Initialize+0xd0>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
23b0: e59f5050 ldr r5, [pc, #80] ; 2408 <RTEMS_Malloc_Initialize+0xec>
23b4: e5940000 ldr r0, [r4]
23b8: e5954000 ldr r4, [r5]
23bc: eb0013bf bl 72c0 <_Protected_heap_Get_size>
23c0: e0800004 add r0, r0, r4
23c4: e5850000 str r0, [r5]
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
23c8: e8bd8070 pop {r4, r5, r6, pc}
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
23cc: e1a00005 mov r0, r5
23d0: e1a02006 mov r2, r6
23d4: eb003718 bl 1003c <memset>
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
23d8: e5d43000 ldrb r3, [r4]
23dc: e3530000 cmp r3, #0
23e0: 0affffea beq 2390 <RTEMS_Malloc_Initialize+0x74>
23e4: e59f4018 ldr r4, [pc, #24] ; 2404 <RTEMS_Malloc_Initialize+0xe8>
23e8: eafffff0 b 23b0 <RTEMS_Malloc_Initialize+0x94>
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
23ec: e280001a add r0, r0, #26 <== NOT EXECUTED
23f0: eb000e7b bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
000060f0 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
60f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
60f4: e250a000 subs sl, r0, #0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
60f8: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
60fc: 0a000031 beq 61c8 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
return;
if ( !print_handler )
6100: e59f4110 ldr r4, [pc, #272] ; 6218 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
6104: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED
6108: e3570000 cmp r7, #0 <== NOT EXECUTED
610c: 0a00002d beq 61c8 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
6110: e37a0001 cmn sl, #1 <== NOT EXECUTED
6114: 0a000032 beq 61e4 <Stack_check_Dump_threads_usage+0xf4> <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
6118: e59a80f4 ldr r8, [sl, #244] ; 0xf4 <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
611c: e28a50c4 add r5, sl, #196 ; 0xc4 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
6120: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED
6124: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
6128: e2466010 sub r6, r6, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
612c: e1a00009 mov r0, r9 <== NOT EXECUTED
6130: e1a01006 mov r1, r6 <== NOT EXECUTED
6134: ebffffd7 bl 6098 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
6138: e250b000 subs fp, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
613c: 10899006 addne r9, r9, r6 <== NOT EXECUTED
6140: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
6144: e35a0000 cmp sl, #0 <== NOT EXECUTED
6148: 0a00002c beq 6200 <Stack_check_Dump_threads_usage+0x110> <== NOT EXECUTED
(*print_handler)(
614c: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED
6150: e28d2008 add r2, sp, #8 <== NOT EXECUTED
6154: e3a01005 mov r1, #5 <== NOT EXECUTED
6158: e1a0000a mov r0, sl <== NOT EXECUTED
615c: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED
6160: eb001821 bl c1ec <rtems_object_get_name> <== NOT EXECUTED
6164: e1a0200a mov r2, sl <== NOT EXECUTED
6168: e1a03000 mov r3, r0 <== NOT EXECUTED
616c: e59f10a8 ldr r1, [pc, #168] ; 621c <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED
6170: e1a00009 mov r0, r9 <== NOT EXECUTED
6174: e1a0e00f mov lr, pc <== NOT EXECUTED
6178: e12fff17 bx r7 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
617c: e5953000 ldr r3, [r5] <== NOT EXECUTED
6180: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
6184: e2433001 sub r3, r3, #1 <== NOT EXECUTED
6188: e0823003 add r3, r2, r3 <== NOT EXECUTED
618c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
6190: e58d8000 str r8, [sp] <== NOT EXECUTED
6194: e58d6004 str r6, [sp, #4] <== NOT EXECUTED
6198: e59f1080 ldr r1, [pc, #128] ; 6220 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
619c: e1a0e00f mov lr, pc <== NOT EXECUTED
61a0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
61a4: e5943000 ldr r3, [r4] <== NOT EXECUTED
61a8: e3530000 cmp r3, #0 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
61ac: e59f3064 ldr r3, [pc, #100] ; 6218 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
61b0: 0a000006 beq 61d0 <Stack_check_Dump_threads_usage+0xe0> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
61b4: e1a0200b mov r2, fp <== NOT EXECUTED
61b8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
61bc: e59f1060 ldr r1, [pc, #96] ; 6224 <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED
61c0: e1a0e00f mov lr, pc <== NOT EXECUTED
61c4: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
}
}
61c8: e28dd010 add sp, sp, #16 <== NOT EXECUTED
61cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
61d0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
61d4: e59f104c ldr r1, [pc, #76] ; 6228 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
61d8: e1a0e00f mov lr, pc <== NOT EXECUTED
61dc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
61e0: eafffff8 b 61c8 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
61e4: e59f5040 ldr r5, [pc, #64] ; 622c <Stack_check_Dump_threads_usage+0x13c><== NOT EXECUTED
61e8: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
61ec: e3530000 cmp r3, #0 <== NOT EXECUTED
61f0: 13a08000 movne r8, #0 <== NOT EXECUTED
61f4: 11a0a008 movne sl, r8 <== NOT EXECUTED
61f8: 1affffc8 bne 6120 <Stack_check_Dump_threads_usage+0x30> <== NOT EXECUTED
61fc: eafffff1 b 61c8 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
6200: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
6204: e59f1024 ldr r1, [pc, #36] ; 6230 <Stack_check_Dump_threads_usage+0x140><== NOT EXECUTED
6208: e3e02000 mvn r2, #0 <== NOT EXECUTED
620c: e1a0e00f mov lr, pc <== NOT EXECUTED
6210: e12fff17 bx r7 <== NOT EXECUTED
6214: eaffffd8 b 617c <Stack_check_Dump_threads_usage+0x8c> <== NOT EXECUTED
00006098 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
6098: e2803010 add r3, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
609c: e3c11003 bic r1, r1, #3 <== NOT EXECUTED
60a0: e0831001 add r1, r3, r1 <== NOT EXECUTED
60a4: e1530001 cmp r3, r1 <== NOT EXECUTED
60a8: 2a00000c bcs 60e0 <Stack_check_find_high_water_mark+0x48> <== NOT EXECUTED
if (*base != U32_PATTERN)
60ac: e3a02ca6 mov r2, #42496 ; 0xa600 <== NOT EXECUTED
60b0: e242205b sub r2, r2, #91 ; 0x5b <== NOT EXECUTED
60b4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
60b8: e1822802 orr r2, r2, r2, lsl #16 <== NOT EXECUTED
60bc: e1500002 cmp r0, r2 <== NOT EXECUTED
60c0: 0a000003 beq 60d4 <Stack_check_find_high_water_mark+0x3c> <== NOT EXECUTED
60c4: ea000007 b 60e8 <Stack_check_find_high_water_mark+0x50> <== NOT EXECUTED
60c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
60cc: e1520000 cmp r2, r0 <== NOT EXECUTED
60d0: 1a000004 bne 60e8 <Stack_check_find_high_water_mark+0x50> <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
60d4: e2833004 add r3, r3, #4 <== NOT EXECUTED
60d8: e1510003 cmp r1, r3 <== NOT EXECUTED
60dc: 8afffff9 bhi 60c8 <Stack_check_find_high_water_mark+0x30> <== NOT EXECUTED
60e0: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
60e4: e12fff1e bx lr <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
60e8: e1a00003 mov r0, r3 <== NOT EXECUTED
60ec: e12fff1e bx lr <== NOT EXECUTED
00043b98 <T.57>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
43b98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
43b9c: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
43ba0: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
43ba4: e58d1020 str r1, [sp, #32] <== NOT EXECUTED
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
43ba8: e5c26000 strb r6, [r2] <== NOT EXECUTED
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
43bac: e28d1024 add r1, sp, #36 ; 0x24 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
43bb0: e58d201c str r2, [sp, #28] <== NOT EXECUTED
43bb4: e1a04003 mov r4, r3 <== NOT EXECUTED
43bb8: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
43bbc: ebfffeec bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
43bc0: e3500000 cmp r0, #0 <== NOT EXECUTED
43bc4: da000001 ble 43bd0 <T.57+0x38> <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
43bc8: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
43bcc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
43bd0: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
43bd4: e5910000 ldr r0, [r1] <== NOT EXECUTED
end_bit = test_bit + (window * direction);
if (end_bit < 0)
43bd8: e0905584 adds r5, r0, r4, lsl #11 <== NOT EXECUTED
43bdc: 41a05006 movmi r5, r6 <== NOT EXECUTED
43be0: 4a000003 bmi 43bf4 <T.57+0x5c> <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
43be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
43be8: e592300c ldr r3, [r2, #12] <== NOT EXECUTED
43bec: e1550003 cmp r5, r3 <== NOT EXECUTED
end_bit = control->size - 1;
43bf0: 22435001 subcs r5, r3, #1 <== NOT EXECUTED
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
43bf4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
43bf8: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED
43bfc: e1a02540 asr r2, r0, #10 <== NOT EXECUTED
43c00: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
map_bits = &map[map_index];
43c04: e59d9024 ldr r9, [sp, #36] ; 0x24 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
43c08: e1a01104 lsl r1, r4, #2 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43c0c: e1a02fa4 lsr r2, r4, #31 <== NOT EXECUTED
if (end_bit < 0)
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
43c10: e1a0a2c0 asr sl, r0, #5 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
43c14: e58d1010 str r1, [sp, #16] <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43c18: e58d200c str r2, [sp, #12] <== NOT EXECUTED
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
43c1c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
map_bits = &map[map_index];
43c20: e089910a add r9, r9, sl, lsl #2 <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
43c24: e200301f and r3, r0, #31 <== NOT EXECUTED
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
43c28: e20a801f and r8, sl, #31 <== NOT EXECUTED
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
43c2c: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
43c30: e59cc000 ldr ip, [ip] <== NOT EXECUTED
43c34: e35c0000 cmp ip, #0 <== NOT EXECUTED
43c38: e58dc000 str ip, [sp] <== NOT EXECUTED
43c3c: 0a00003a beq 43d2c <T.57+0x194> <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
43c40: e1a01284 lsl r1, r4, #5 <== NOT EXECUTED
43c44: e08ab004 add fp, sl, r4 <== NOT EXECUTED
43c48: e58d1018 str r1, [sp, #24] <== NOT EXECUTED
43c4c: e1a0b28b lsl fp, fp, #5 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
43c50: e3a06001 mov r6, #1 <== NOT EXECUTED
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
43c54: e358001f cmp r8, #31 <== NOT EXECUTED
43c58: 8a00003f bhi 43d5c <T.57+0x1c4> <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
43c5c: e1a02816 lsl r2, r6, r8 <== NOT EXECUTED
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
43c60: e59dc000 ldr ip, [sp] <== NOT EXECUTED
43c64: e112000c tst r2, ip <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
43c68: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
43c6c: 0a000013 beq 43cc0 <T.57+0x128> <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
43c70: e1a01316 lsl r1, r6, r3 <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
43c74: e5997000 ldr r7, [r9] <== NOT EXECUTED
43c78: e1110007 tst r1, r7 <== NOT EXECUTED
43c7c: 1a00004a bne 43dac <T.57+0x214> <== NOT EXECUTED
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
43c80: e1550000 cmp r5, r0 <== NOT EXECUTED
43c84: 10833004 addne r3, r3, r4 <== NOT EXECUTED
43c88: 10802004 addne r2, r0, r4 <== NOT EXECUTED
43c8c: 1a000009 bne 43cb8 <T.57+0x120> <== NOT EXECUTED
43c90: ea00000a b 43cc0 <T.57+0x128> <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
43c94: e1a01316 lsl r1, r6, r3 <== NOT EXECUTED
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
43c98: e1a00002 mov r0, r2 <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
43c9c: e1110007 tst r1, r7 <== NOT EXECUTED
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
43ca0: e0822004 add r2, r2, r4 <== NOT EXECUTED
43ca4: e0833004 add r3, r3, r4 <== NOT EXECUTED
return 0;
}
if (test_bit == end_bit)
43ca8: e064c002 rsb ip, r4, r2 <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
43cac: 1a00003e bne 43dac <T.57+0x214> <== NOT EXECUTED
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
43cb0: e155000c cmp r5, ip <== NOT EXECUTED
43cb4: 0a000001 beq 43cc0 <T.57+0x128> <== NOT EXECUTED
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
43cb8: e353001f cmp r3, #31 <== NOT EXECUTED
43cbc: 9afffff4 bls 43c94 <T.57+0xfc> <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
43cc0: e3540000 cmp r4, #0 <== NOT EXECUTED
43cc4: d3a0001f movle r0, #31 <== NOT EXECUTED
43cc8: c3a00000 movgt r0, #0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43ccc: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
43cd0: d1a03000 movle r3, r0 <== NOT EXECUTED
43cd4: c1a03000 movgt r3, r0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
43cd8: e08b0000 add r0, fp, r0 <== NOT EXECUTED
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43cdc: e1550000 cmp r5, r0 <== NOT EXECUTED
43ce0: b3a02000 movlt r2, #0 <== NOT EXECUTED
43ce4: a2022001 andge r2, r2, #1 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
43ce8: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43cec: e3520000 cmp r2, #0 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
43cf0: e0899001 add r9, r9, r1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
43cf4: e084a00a add sl, r4, sl <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
43cf8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
43cfc: 1a00004c bne 43e34 <T.57+0x29c> <== NOT EXECUTED
43d00: e1550000 cmp r5, r0 <== NOT EXECUTED
43d04: c3a01000 movgt r1, #0 <== NOT EXECUTED
43d08: d3a01001 movle r1, #1 <== NOT EXECUTED
43d0c: e3540000 cmp r4, #0 <== NOT EXECUTED
43d10: d3a01000 movle r1, #0 <== NOT EXECUTED
43d14: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED
43d18: e3510000 cmp r1, #0 <== NOT EXECUTED
43d1c: e08bb00c add fp, fp, ip <== NOT EXECUTED
43d20: 1a000037 bne 43e04 <T.57+0x26c> <== NOT EXECUTED
43d24: e0848008 add r8, r4, r8 <== NOT EXECUTED
43d28: eaffffc9 b 43c54 <T.57+0xbc> <== NOT EXECUTED
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
43d2c: e3540000 cmp r4, #0 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
43d30: d1e03288 mvnle r3, r8, lsl #5 <== NOT EXECUTED
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
43d34: c2688020 rsbgt r8, r8, #32 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
43d38: d2888001 addle r8, r8, #1 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
43d3c: e0020894 mul r2, r4, r8 <== NOT EXECUTED
*
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
43d40: e3c0001f bic r0, r0, #31 <== NOT EXECUTED
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
43d44: c59d3000 ldrgt r3, [sp] <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
43d48: d0830000 addle r0, r3, r0 <== NOT EXECUTED
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
43d4c: c0800288 addgt r0, r0, r8, lsl #5 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
43d50: d3a0301f movle r3, #31 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
43d54: e08aa002 add sl, sl, r2 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
43d58: e0899102 add r9, r9, r2, lsl #2 <== NOT EXECUTED
map_index += direction * bits_skipped;
}
search_bits += direction;
43d5c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
43d60: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
43d64: e3540000 cmp r4, #0 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
43d68: e0811002 add r1, r1, r2 <== NOT EXECUTED
43d6c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
43d70: da000029 ble 43e1c <T.57+0x284> <== NOT EXECUTED
43d74: e1550000 cmp r5, r0 <== NOT EXECUTED
43d78: c3a01000 movgt r1, #0 <== NOT EXECUTED
43d7c: d3a01001 movle r1, #1 <== NOT EXECUTED
43d80: e3a02000 mov r2, #0 <== NOT EXECUTED
43d84: e3a08000 mov r8, #0 <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
43d88: e1110002 tst r1, r2 <== NOT EXECUTED
43d8c: 1affffa6 bne 43c2c <T.57+0x94> <== NOT EXECUTED
43d90: e1550000 cmp r5, r0 <== NOT EXECUTED
43d94: a3540000 cmpge r4, #0 <== NOT EXECUTED
43d98: d3a02000 movle r2, #0 <== NOT EXECUTED
43d9c: c3a02001 movgt r2, #1 <== NOT EXECUTED
43da0: caffffa1 bgt 43c2c <T.57+0x94> <== NOT EXECUTED
43da4: e1a00002 mov r0, r2 <== NOT EXECUTED
43da8: eaffff86 b 43bc8 <T.57+0x30> <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
43dac: e1c71001 bic r1, r7, r1 <== NOT EXECUTED
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
43db0: e3510000 cmp r1, #0 <== NOT EXECUTED
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
43db4: e5891000 str r1, [r9] <== NOT EXECUTED
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
43db8: 059d1008 ldreq r1, [sp, #8] <== NOT EXECUTED
43dbc: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED
43dc0: 05913000 ldreq r3, [r1] <== NOT EXECUTED
43dc4: 01c33002 biceq r3, r3, r2 <== NOT EXECUTED
43dc8: 05813000 streq r3, [r1] <== NOT EXECUTED
1 << search_offset);
control->free--;
43dcc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
43dd0: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED
43dd4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
43dd8: e2411001 sub r1, r1, #1 <== NOT EXECUTED
43ddc: e58c1010 str r1, [ip, #16] <== NOT EXECUTED
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
43de0: e5932000 ldr r2, [r3] <== NOT EXECUTED
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
43de4: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
*found = true;
43de8: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
43dec: e3a03001 mov r3, #1 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
43df0: e5810000 str r0, [r1] <== NOT EXECUTED
*found = true;
43df4: e5cc3000 strb r3, [ip] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
43df8: e3a00000 mov r0, #0 <== NOT EXECUTED
43dfc: e5c23000 strb r3, [r2] <== NOT EXECUTED
43e00: eaffff70 b 43bc8 <T.57+0x30> <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
43e04: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
43e08: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
43e0c: e08cc001 add ip, ip, r1 <== NOT EXECUTED
43e10: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
43e14: e3a01001 mov r1, #1 <== NOT EXECUTED
43e18: eaffffd9 b 43d84 <T.57+0x1ec> <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
43e1c: e1550000 cmp r5, r0 <== NOT EXECUTED
43e20: c3a01000 movgt r1, #0 <== NOT EXECUTED
43e24: d3a01001 movle r1, #1 <== NOT EXECUTED
43e28: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
43e2c: e3a0801f mov r8, #31 <== NOT EXECUTED
43e30: eaffffd4 b 43d88 <T.57+0x1f0> <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
43e34: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
43e38: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
43e3c: e08cc001 add ip, ip, r1 <== NOT EXECUTED
43e40: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
43e44: e1550000 cmp r5, r0 <== NOT EXECUTED
43e48: c3a01000 movgt r1, #0 <== NOT EXECUTED
43e4c: d3a01001 movle r1, #1 <== NOT EXECUTED
43e50: e3a02001 mov r2, #1 <== NOT EXECUTED
43e54: e3a0801f mov r8, #31 <== NOT EXECUTED
43e58: eaffffca b 43d88 <T.57+0x1f0> <== NOT EXECUTED
00000454 <_Barrier_Manager_initialization>:
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
}
454: e12fff1e bx lr
00000458 <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
}
458: e12fff1e bx lr
0000045c <_Event_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
}
45c: e12fff1e bx lr
00000478 <_Extension_Manager_initialization>:
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
}
478: e12fff1e bx lr
0000c4e8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c4e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
c4ec: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
c4f0: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c4f4: e24dd01c sub sp, sp, #28
c4f8: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
c4fc: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c500: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
c504: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c508: e1a0b003 mov fp, r3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
c50c: e590a008 ldr sl, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
c510: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
c514: 2a000076 bcs c6f4 <_Heap_Allocate_aligned_with_boundary+0x20c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
c518: e3530000 cmp r3, #0
c51c: 1a000072 bne c6ec <_Heap_Allocate_aligned_with_boundary+0x204>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c520: e157000a cmp r7, sl
c524: 03a06000 moveq r6, #0
c528: 0a000074 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218>
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c52c: e59d300c ldr r3, [sp, #12]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c530: e2651004 rsb r1, r5, #4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c534: e2833007 add r3, r3, #7
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c538: e3a06000 mov r6, #0
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c53c: e58d3010 str r3, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c540: e58d1014 str r1, [sp, #20]
c544: ea000004 b c55c <_Heap_Allocate_aligned_with_boundary+0x74>
boundary
);
}
}
if ( alloc_begin != 0 ) {
c548: e3540000 cmp r4, #0
c54c: 1a000059 bne c6b8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
break;
}
block = block->next;
c550: e59aa008 ldr sl, [sl, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c554: e157000a cmp r7, sl
c558: 0a000068 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
c55c: e59a9004 ldr r9, [sl, #4]
c560: e59d2000 ldr r2, [sp]
c564: e1520009 cmp r2, r9
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
c568: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
c56c: 2afffff7 bcs c550 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
c570: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
c574: 028a4008 addeq r4, sl, #8
c578: 0afffff2 beq c548 <_Heap_Allocate_aligned_with_boundary+0x60>
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c57c: e59d1014 ldr r1, [sp, #20]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
c580: e3c99001 bic r9, r9, #1
c584: e08a9009 add r9, sl, r9
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
c588: e5973014 ldr r3, [r7, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c58c: e59d2010 ldr r2, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c590: e0814009 add r4, r1, r9
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
c594: e58d3004 str r3, [sp, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
c598: e1a00004 mov r0, r4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c59c: e0633002 rsb r3, r3, r2
c5a0: e1a01008 mov r1, r8
c5a4: e0839009 add r9, r3, r9
c5a8: eb003227 bl 18e4c <__umodsi3>
c5ac: e0604004 rsb r4, r0, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
c5b0: e28a3008 add r3, sl, #8
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
c5b4: e1590004 cmp r9, r4
c5b8: e58d3008 str r3, [sp, #8]
c5bc: 2a000003 bcs c5d0 <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
c5c0: e1a00009 mov r0, r9
c5c4: e1a01008 mov r1, r8
c5c8: eb00321f bl 18e4c <__umodsi3>
c5cc: e0604009 rsb r4, r0, r9
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
c5d0: e35b0000 cmp fp, #0
c5d4: 0a000025 beq c670 <_Heap_Allocate_aligned_with_boundary+0x188>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
c5d8: e0849005 add r9, r4, r5
c5dc: e1a00009 mov r0, r9
c5e0: e1a0100b mov r1, fp
c5e4: eb003218 bl 18e4c <__umodsi3>
c5e8: e0600009 rsb r0, r0, r9
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
c5ec: e1590000 cmp r9, r0
c5f0: 93a03000 movls r3, #0
c5f4: 83a03001 movhi r3, #1
c5f8: e1540000 cmp r4, r0
c5fc: 23a03000 movcs r3, #0
c600: e3530000 cmp r3, #0
c604: 0a000019 beq c670 <_Heap_Allocate_aligned_with_boundary+0x188>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
c608: e59d1008 ldr r1, [sp, #8]
c60c: e0819005 add r9, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
c610: e1590000 cmp r9, r0
c614: 958d6018 strls r6, [sp, #24]
c618: 9a000002 bls c628 <_Heap_Allocate_aligned_with_boundary+0x140>
c61c: eaffffcb b c550 <_Heap_Allocate_aligned_with_boundary+0x68>
c620: e1590000 cmp r9, r0
c624: 8a000037 bhi c708 <_Heap_Allocate_aligned_with_boundary+0x220>
return 0;
}
alloc_begin = boundary_line - alloc_size;
c628: e0654000 rsb r4, r5, r0
c62c: e1a01008 mov r1, r8
c630: e1a00004 mov r0, r4
c634: eb003204 bl 18e4c <__umodsi3>
c638: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
c63c: e0846005 add r6, r4, r5
c640: e1a00006 mov r0, r6
c644: e1a0100b mov r1, fp
c648: eb0031ff bl 18e4c <__umodsi3>
c64c: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
c650: e1560000 cmp r6, r0
c654: 93a03000 movls r3, #0
c658: 83a03001 movhi r3, #1
c65c: e1540000 cmp r4, r0
c660: 23a03000 movcs r3, #0
c664: e3530000 cmp r3, #0
c668: 1affffec bne c620 <_Heap_Allocate_aligned_with_boundary+0x138>
c66c: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
c670: e59d2008 ldr r2, [sp, #8]
c674: e1520004 cmp r2, r4
c678: 8affffb4 bhi c550 <_Heap_Allocate_aligned_with_boundary+0x68>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
c67c: e59d100c ldr r1, [sp, #12]
c680: e1a00004 mov r0, r4
c684: eb0031f0 bl 18e4c <__umodsi3>
c688: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000
c68c: e28998ff add r9, r9, #16711680 ; 0xff0000
c690: e2899cff add r9, r9, #65280 ; 0xff00
c694: e28990f8 add r9, r9, #248 ; 0xf8
c698: e0899004 add r9, r9, r4
if ( free_size >= min_block_size || free_size == 0 ) {
c69c: e59d1004 ldr r1, [sp, #4]
c6a0: e0603009 rsb r3, r0, r9
c6a4: e1590000 cmp r9, r0
c6a8: 11510003 cmpne r1, r3
c6ac: 8affffa7 bhi c550 <_Heap_Allocate_aligned_with_boundary+0x68>
boundary
);
}
}
if ( alloc_begin != 0 ) {
c6b0: e3540000 cmp r4, #0
c6b4: 0affffa5 beq c550 <_Heap_Allocate_aligned_with_boundary+0x68>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
c6b8: e597304c ldr r3, [r7, #76] ; 0x4c
c6bc: e0833006 add r3, r3, r6
c6c0: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
c6c4: e1a0100a mov r1, sl
c6c8: e1a03005 mov r3, r5
c6cc: e1a00007 mov r0, r7
c6d0: e1a02004 mov r2, r4
c6d4: ebffe87f bl 68d8 <_Heap_Block_allocate>
c6d8: e1a00004 mov r0, r4
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
c6dc: e5973044 ldr r3, [r7, #68] ; 0x44
c6e0: e1530006 cmp r3, r6
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
c6e4: 35876044 strcc r6, [r7, #68] ; 0x44
c6e8: ea000002 b c6f8 <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
c6ec: e1550003 cmp r5, r3
c6f0: 9a000006 bls c710 <_Heap_Allocate_aligned_with_boundary+0x228>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
c6f4: e3a00000 mov r0, #0
}
return (void *) alloc_begin;
}
c6f8: e28dd01c add sp, sp, #28
c6fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c700: e3a00000 mov r0, #0
c704: eafffff4 b c6dc <_Heap_Allocate_aligned_with_boundary+0x1f4>
c708: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
c70c: eaffff8f b c550 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
c710: e3580000 cmp r8, #0
c714: 01a08002 moveq r8, r2
c718: eaffff80 b c520 <_Heap_Allocate_aligned_with_boundary+0x38>
00007688 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
7688: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
768c: e59f35dc ldr r3, [pc, #1500] ; 7c70 <_Heap_Walk+0x5e8>
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
7690: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
7694: e5933000 ldr r3, [r3]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
7698: e59f25d4 ldr r2, [pc, #1492] ; 7c74 <_Heap_Walk+0x5ec>
769c: e59fa5d4 ldr sl, [pc, #1492] ; 7c78 <_Heap_Walk+0x5f0>
76a0: 01a0a002 moveq sl, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
76a4: e3530003 cmp r3, #3
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
76a8: e5902010 ldr r2, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
76ac: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
76b0: e24dd03c sub sp, sp, #60 ; 0x3c
76b4: e1a04000 mov r4, r0
76b8: e1a08001 mov r8, r1
uintptr_t const page_size = heap->page_size;
76bc: e58d2020 str r2, [sp, #32]
uintptr_t const min_block_size = heap->min_block_size;
76c0: e590b014 ldr fp, [r0, #20]
Heap_Block *const last_block = heap->last_block;
76c4: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *block = heap->first_block;
76c8: e5905020 ldr r5, [r0, #32]
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
76cc: 0a000002 beq 76dc <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
76d0: e3a00001 mov r0, #1
block = next_block;
}
return true;
}
76d4: e28dd03c add sp, sp, #60 ; 0x3c
76d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
76dc: e5900018 ldr r0, [r0, #24]
76e0: e594101c ldr r1, [r4, #28]
76e4: e2842008 add r2, r4, #8
76e8: e892000c ldm r2, {r2, r3}
76ec: e59dc024 ldr ip, [sp, #36] ; 0x24
76f0: e98d0003 stmib sp, {r0, r1}
76f4: e58d2014 str r2, [sp, #20]
76f8: e58d3018 str r3, [sp, #24]
76fc: e59f2578 ldr r2, [pc, #1400] ; 7c7c <_Heap_Walk+0x5f4>
7700: e58db000 str fp, [sp]
7704: e58d500c str r5, [sp, #12]
7708: e58dc010 str ip, [sp, #16]
770c: e1a00008 mov r0, r8
7710: e3a01000 mov r1, #0
7714: e59d3020 ldr r3, [sp, #32]
7718: e1a0e00f mov lr, pc
771c: e12fff1a bx sl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
7720: e59d2020 ldr r2, [sp, #32]
7724: e3520000 cmp r2, #0
7728: 0a000032 beq 77f8 <_Heap_Walk+0x170>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
772c: e59d3020 ldr r3, [sp, #32]
7730: e2139003 ands r9, r3, #3
7734: 1a000036 bne 7814 <_Heap_Walk+0x18c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
7738: e1a0000b mov r0, fp
773c: e59d1020 ldr r1, [sp, #32]
7740: ebffe534 bl c18 <__umodsi3>
7744: e2506000 subs r6, r0, #0
7748: 1a000038 bne 7830 <_Heap_Walk+0x1a8>
);
return false;
}
if (
774c: e2850008 add r0, r5, #8
7750: e59d1020 ldr r1, [sp, #32]
7754: ebffe52f bl c18 <__umodsi3>
7758: e2509000 subs r9, r0, #0
775c: 1a00003b bne 7850 <_Heap_Walk+0x1c8>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
7760: e5957004 ldr r7, [r5, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
7764: e2176001 ands r6, r7, #1
7768: 0a000040 beq 7870 <_Heap_Walk+0x1e8>
);
return false;
}
if ( first_block->prev_size != page_size ) {
776c: e5953000 ldr r3, [r5]
7770: e59dc020 ldr ip, [sp, #32]
7774: e15c0003 cmp ip, r3
7778: 1a000016 bne 77d8 <_Heap_Walk+0x150>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
777c: e59d2024 ldr r2, [sp, #36] ; 0x24
7780: e5923004 ldr r3, [r2, #4]
7784: e3c33001 bic r3, r3, #1
7788: e0823003 add r3, r2, r3
778c: e5939004 ldr r9, [r3, #4]
7790: e2199001 ands r9, r9, #1
7794: 0a000114 beq 7bec <_Heap_Walk+0x564>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7798: e5949008 ldr r9, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
779c: e5943010 ldr r3, [r4, #16]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
77a0: e1540009 cmp r4, r9
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
77a4: e58d3028 str r3, [sp, #40] ; 0x28
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
77a8: 0a00006e beq 7968 <_Heap_Walk+0x2e0>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
77ac: e5942020 ldr r2, [r4, #32]
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
77b0: e1520009 cmp r2, r9
77b4: 9a000034 bls 788c <_Heap_Walk+0x204>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
77b8: e1a00008 mov r0, r8
77bc: e1a03009 mov r3, r9
77c0: e3a01001 mov r1, #1
77c4: e59f24b4 ldr r2, [pc, #1204] ; 7c80 <_Heap_Walk+0x5f8>
77c8: e1a0e00f mov lr, pc
77cc: e12fff1a bx sl
77d0: e3a00000 mov r0, #0
77d4: eaffffbe b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
77d8: e1a00008 mov r0, r8
77dc: e58dc000 str ip, [sp]
77e0: e3a01001 mov r1, #1
77e4: e59f2498 ldr r2, [pc, #1176] ; 7c84 <_Heap_Walk+0x5fc>
77e8: e1a0e00f mov lr, pc
77ec: e12fff1a bx sl
77f0: e1a00009 mov r0, r9
77f4: eaffffb6 b 76d4 <_Heap_Walk+0x4c>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
77f8: e1a00008 mov r0, r8
77fc: e3a01001 mov r1, #1
7800: e59f2480 ldr r2, [pc, #1152] ; 7c88 <_Heap_Walk+0x600>
7804: e1a0e00f mov lr, pc
7808: e12fff1a bx sl
780c: e59d0020 ldr r0, [sp, #32]
7810: eaffffaf b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
7814: e1a00008 mov r0, r8
7818: e3a01001 mov r1, #1
781c: e59f2468 ldr r2, [pc, #1128] ; 7c8c <_Heap_Walk+0x604>
7820: e1a0e00f mov lr, pc
7824: e12fff1a bx sl
7828: e3a00000 mov r0, #0
782c: eaffffa8 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
7830: e1a00008 mov r0, r8
7834: e1a0300b mov r3, fp
7838: e3a01001 mov r1, #1
783c: e59f244c ldr r2, [pc, #1100] ; 7c90 <_Heap_Walk+0x608>
7840: e1a0e00f mov lr, pc
7844: e12fff1a bx sl
7848: e1a00009 mov r0, r9
784c: eaffffa0 b 76d4 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
7850: e1a00008 mov r0, r8
7854: e1a03005 mov r3, r5
7858: e3a01001 mov r1, #1
785c: e59f2430 ldr r2, [pc, #1072] ; 7c94 <_Heap_Walk+0x60c>
7860: e1a0e00f mov lr, pc
7864: e12fff1a bx sl
7868: e1a00006 mov r0, r6
786c: eaffff98 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
7870: e1a00008 mov r0, r8
7874: e3a01001 mov r1, #1
7878: e59f2418 ldr r2, [pc, #1048] ; 7c98 <_Heap_Walk+0x610>
787c: e1a0e00f mov lr, pc
7880: e12fff1a bx sl
7884: e1a00006 mov r0, r6
7888: eaffff91 b 76d4 <_Heap_Walk+0x4c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
788c: e594c024 ldr ip, [r4, #36] ; 0x24
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
7890: e159000c cmp r9, ip
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7894: e58dc02c str ip, [sp, #44] ; 0x2c
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
7898: 8affffc6 bhi 77b8 <_Heap_Walk+0x130>
);
return false;
}
if (
789c: e2890008 add r0, r9, #8
78a0: e1a01003 mov r1, r3
78a4: e58d201c str r2, [sp, #28]
78a8: ebffe4da bl c18 <__umodsi3>
78ac: e3500000 cmp r0, #0
78b0: e59d201c ldr r2, [sp, #28]
78b4: 1a0000d3 bne 7c08 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
78b8: e5993004 ldr r3, [r9, #4]
78bc: e3c33001 bic r3, r3, #1
78c0: e0893003 add r3, r9, r3
78c4: e5933004 ldr r3, [r3, #4]
78c8: e3130001 tst r3, #1
78cc: 1a0000df bne 7c50 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
78d0: e599c00c ldr ip, [r9, #12]
78d4: e15c0004 cmp ip, r4
78d8: 1a0000d3 bne 7c2c <_Heap_Walk+0x5a4>
78dc: e58d7030 str r7, [sp, #48] ; 0x30
78e0: e58db034 str fp, [sp, #52] ; 0x34
78e4: e59d702c ldr r7, [sp, #44] ; 0x2c
78e8: e59db028 ldr fp, [sp, #40] ; 0x28
78ec: e58d502c str r5, [sp, #44] ; 0x2c
78f0: e58d6038 str r6, [sp, #56] ; 0x38
78f4: e1a0500c mov r5, ip
78f8: e58d4028 str r4, [sp, #40] ; 0x28
78fc: e1a06002 mov r6, r2
7900: ea000011 b 794c <_Heap_Walk+0x2c4>
7904: e1560009 cmp r6, r9
7908: 8affffaa bhi 77b8 <_Heap_Walk+0x130>
790c: e1590007 cmp r9, r7
);
return false;
}
if (
7910: e2890008 add r0, r9, #8
7914: e1a0100b mov r1, fp
7918: 8affffa6 bhi 77b8 <_Heap_Walk+0x130>
791c: ebffe4bd bl c18 <__umodsi3>
7920: e3500000 cmp r0, #0
7924: 1a0000b7 bne 7c08 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
7928: e5993004 ldr r3, [r9, #4]
792c: e3c33001 bic r3, r3, #1
7930: e0833009 add r3, r3, r9
7934: e5933004 ldr r3, [r3, #4]
7938: e3130001 tst r3, #1
793c: 1a0000c3 bne 7c50 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
7940: e599200c ldr r2, [r9, #12]
7944: e1540002 cmp r4, r2
7948: 1a0000b6 bne 7c28 <_Heap_Walk+0x5a0>
(*printer)(
794c: e1a04009 mov r4, r9
return false;
}
prev_block = free_block;
free_block = free_block->next;
7950: e5999008 ldr r9, [r9, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
7954: e1550009 cmp r5, r9
7958: 1affffe9 bne 7904 <_Heap_Walk+0x27c>
795c: e28d4028 add r4, sp, #40 ; 0x28
7960: e89408b0 ldm r4, {r4, r5, r7, fp}
7964: e59d6038 ldr r6, [sp, #56] ; 0x38
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7968: e59d3024 ldr r3, [sp, #36] ; 0x24
796c: e1530005 cmp r3, r5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
7970: 158db028 strne fp, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7974: 0affff55 beq 76d0 <_Heap_Walk+0x48>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7978: e3c77001 bic r7, r7, #1
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
797c: e21610ff ands r1, r6, #255 ; 0xff
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
7980: e0876005 add r6, r7, r5
7984: 0a000012 beq 79d4 <_Heap_Walk+0x34c>
(*printer)(
7988: e1a03005 mov r3, r5
798c: e58d7000 str r7, [sp]
7990: e1a00008 mov r0, r8
7994: e3a01000 mov r1, #0
7998: e59f22fc ldr r2, [pc, #764] ; 7c9c <_Heap_Walk+0x614>
799c: e1a0e00f mov lr, pc
79a0: e12fff1a bx sl
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
79a4: e5943020 ldr r3, [r4, #32]
79a8: e1530006 cmp r3, r6
79ac: 9a000013 bls 7a00 <_Heap_Walk+0x378>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
79b0: e1a00008 mov r0, r8
79b4: e58d6000 str r6, [sp]
79b8: e1a03005 mov r3, r5
79bc: e3a01001 mov r1, #1
79c0: e59f22d8 ldr r2, [pc, #728] ; 7ca0 <_Heap_Walk+0x618>
79c4: e1a0e00f mov lr, pc
79c8: e12fff1a bx sl
79cc: e3a00000 mov r0, #0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
79d0: eaffff3f b 76d4 <_Heap_Walk+0x4c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
79d4: e58d7000 str r7, [sp]
79d8: e5953000 ldr r3, [r5]
79dc: e1a00008 mov r0, r8
79e0: e58d3004 str r3, [sp, #4]
79e4: e59f22b8 ldr r2, [pc, #696] ; 7ca4 <_Heap_Walk+0x61c>
79e8: e1a03005 mov r3, r5
79ec: e1a0e00f mov lr, pc
79f0: e12fff1a bx sl
79f4: e5943020 ldr r3, [r4, #32]
79f8: e1530006 cmp r3, r6
79fc: 8affffeb bhi 79b0 <_Heap_Walk+0x328>
7a00: e5943024 ldr r3, [r4, #36] ; 0x24
7a04: e1530006 cmp r3, r6
7a08: 3affffe8 bcc 79b0 <_Heap_Walk+0x328>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
7a0c: e1a00007 mov r0, r7
7a10: e59d1020 ldr r1, [sp, #32]
7a14: ebffe47f bl c18 <__umodsi3>
7a18: e2509000 subs r9, r0, #0
7a1c: 1a000055 bne 7b78 <_Heap_Walk+0x4f0>
);
return false;
}
if ( block_size < min_block_size ) {
7a20: e59d2028 ldr r2, [sp, #40] ; 0x28
7a24: e1520007 cmp r2, r7
7a28: 8a00005b bhi 7b9c <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin ) {
7a2c: e1550006 cmp r5, r6
7a30: 2a000064 bcs 7bc8 <_Heap_Walk+0x540>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
7a34: e5963004 ldr r3, [r6, #4]
7a38: e3130001 tst r3, #1
7a3c: 1a000036 bne 7b1c <_Heap_Walk+0x494>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
7a40: e595b004 ldr fp, [r5, #4]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7a44: e595200c ldr r2, [r5, #12]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7a48: e5943008 ldr r3, [r4, #8]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7a4c: e3cb7001 bic r7, fp, #1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7a50: e1530002 cmp r3, r2
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
7a54: e594100c ldr r1, [r4, #12]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
7a58: e0859007 add r9, r5, r7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7a5c: 059f0244 ldreq r0, [pc, #580] ; 7ca8 <_Heap_Walk+0x620>
7a60: 0a000003 beq 7a74 <_Heap_Walk+0x3ec>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
7a64: e59f3240 ldr r3, [pc, #576] ; 7cac <_Heap_Walk+0x624>
7a68: e1520004 cmp r2, r4
7a6c: e59f023c ldr r0, [pc, #572] ; 7cb0 <_Heap_Walk+0x628>
7a70: 11a00003 movne r0, r3
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7a74: e5953008 ldr r3, [r5, #8]
7a78: e1510003 cmp r1, r3
7a7c: 059f1230 ldreq r1, [pc, #560] ; 7cb4 <_Heap_Walk+0x62c>
7a80: 0a000003 beq 7a94 <_Heap_Walk+0x40c>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
7a84: e59fc220 ldr ip, [pc, #544] ; 7cac <_Heap_Walk+0x624>
7a88: e1530004 cmp r3, r4
7a8c: e59f1224 ldr r1, [pc, #548] ; 7cb8 <_Heap_Walk+0x630>
7a90: 11a0100c movne r1, ip
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7a94: e58d2000 str r2, [sp]
7a98: e98d0009 stmib sp, {r0, r3}
7a9c: e58d100c str r1, [sp, #12]
7aa0: e1a03005 mov r3, r5
7aa4: e1a00008 mov r0, r8
7aa8: e3a01000 mov r1, #0
7aac: e59f2208 ldr r2, [pc, #520] ; 7cbc <_Heap_Walk+0x634>
7ab0: e1a0e00f mov lr, pc
7ab4: e12fff1a bx sl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
7ab8: e5993000 ldr r3, [r9]
7abc: e1570003 cmp r7, r3
7ac0: 0a00000a beq 7af0 <_Heap_Walk+0x468>
(*printer)(
7ac4: e58d3004 str r3, [sp, #4]
7ac8: e1a00008 mov r0, r8
7acc: e58d7000 str r7, [sp]
7ad0: e58d9008 str r9, [sp, #8]
7ad4: e1a03005 mov r3, r5
7ad8: e3a01001 mov r1, #1
7adc: e59f21dc ldr r2, [pc, #476] ; 7cc0 <_Heap_Walk+0x638>
7ae0: e1a0e00f mov lr, pc
7ae4: e12fff1a bx sl
7ae8: e3a00000 mov r0, #0
7aec: eafffef8 b 76d4 <_Heap_Walk+0x4c>
);
return false;
}
if ( !prev_used ) {
7af0: e21b9001 ands r9, fp, #1
7af4: 0a000017 beq 7b58 <_Heap_Walk+0x4d0>
7af8: e5943008 ldr r3, [r4, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
7afc: e1530004 cmp r3, r4
7b00: 1a000003 bne 7b14 <_Heap_Walk+0x48c>
7b04: ea00000b b 7b38 <_Heap_Walk+0x4b0> <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
7b08: e5933008 ldr r3, [r3, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
7b0c: e1530004 cmp r3, r4
7b10: 0a000008 beq 7b38 <_Heap_Walk+0x4b0>
if ( free_block == block ) {
7b14: e1530005 cmp r3, r5
7b18: 1afffffa bne 7b08 <_Heap_Walk+0x480>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7b1c: e59d2024 ldr r2, [sp, #36] ; 0x24
7b20: e1520006 cmp r2, r6
7b24: 0afffee9 beq 76d0 <_Heap_Walk+0x48>
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
7b28: e5967004 ldr r7, [r6, #4]
7b2c: e1a05006 mov r5, r6
7b30: e2076001 and r6, r7, #1
7b34: eaffff8f b 7978 <_Heap_Walk+0x2f0>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
7b38: e1a00008 mov r0, r8
7b3c: e1a03005 mov r3, r5
7b40: e3a01001 mov r1, #1
7b44: e59f2178 ldr r2, [pc, #376] ; 7cc4 <_Heap_Walk+0x63c>
7b48: e1a0e00f mov lr, pc
7b4c: e12fff1a bx sl
7b50: e3a00000 mov r0, #0
7b54: eafffede b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !prev_used ) {
(*printer)(
7b58: e1a00008 mov r0, r8
7b5c: e1a03005 mov r3, r5
7b60: e3a01001 mov r1, #1
7b64: e59f215c ldr r2, [pc, #348] ; 7cc8 <_Heap_Walk+0x640>
7b68: e1a0e00f mov lr, pc
7b6c: e12fff1a bx sl
7b70: e1a00009 mov r0, r9
7b74: eafffed6 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
7b78: e1a00008 mov r0, r8
7b7c: e58d7000 str r7, [sp]
7b80: e1a03005 mov r3, r5
7b84: e3a01001 mov r1, #1
7b88: e59f213c ldr r2, [pc, #316] ; 7ccc <_Heap_Walk+0x644>
7b8c: e1a0e00f mov lr, pc
7b90: e12fff1a bx sl
7b94: e3a00000 mov r0, #0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
7b98: eafffecd b 76d4 <_Heap_Walk+0x4c>
}
if ( block_size < min_block_size ) {
(*printer)(
7b9c: e58d2004 str r2, [sp, #4]
7ba0: e1a00008 mov r0, r8
7ba4: e1a0b002 mov fp, r2
7ba8: e58d7000 str r7, [sp]
7bac: e1a03005 mov r3, r5
7bb0: e3a01001 mov r1, #1
7bb4: e59f2114 ldr r2, [pc, #276] ; 7cd0 <_Heap_Walk+0x648>
7bb8: e1a0e00f mov lr, pc
7bbc: e12fff1a bx sl
7bc0: e1a00009 mov r0, r9
block,
block_size,
min_block_size
);
return false;
7bc4: eafffec2 b 76d4 <_Heap_Walk+0x4c>
}
if ( next_block_begin <= block_begin ) {
(*printer)(
7bc8: e1a00008 mov r0, r8
7bcc: e58d6000 str r6, [sp]
7bd0: e1a03005 mov r3, r5
7bd4: e3a01001 mov r1, #1
7bd8: e59f20f4 ldr r2, [pc, #244] ; 7cd4 <_Heap_Walk+0x64c>
7bdc: e1a0e00f mov lr, pc
7be0: e12fff1a bx sl
7be4: e1a00009 mov r0, r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
7be8: eafffeb9 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
7bec: e1a00008 mov r0, r8
7bf0: e3a01001 mov r1, #1
7bf4: e59f20dc ldr r2, [pc, #220] ; 7cd8 <_Heap_Walk+0x650>
7bf8: e1a0e00f mov lr, pc
7bfc: e12fff1a bx sl
7c00: e1a00009 mov r0, r9
7c04: eafffeb2 b 76d4 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
7c08: e1a00008 mov r0, r8
7c0c: e1a03009 mov r3, r9
7c10: e3a01001 mov r1, #1
7c14: e59f20c0 ldr r2, [pc, #192] ; 7cdc <_Heap_Walk+0x654>
7c18: e1a0e00f mov lr, pc
7c1c: e12fff1a bx sl
7c20: e3a00000 mov r0, #0
7c24: eafffeaa b 76d4 <_Heap_Walk+0x4c>
);
return false;
}
if ( free_block->prev != prev_block ) {
7c28: e1a0c002 mov ip, r2
(*printer)(
7c2c: e1a00008 mov r0, r8
7c30: e58dc000 str ip, [sp]
7c34: e1a03009 mov r3, r9
7c38: e3a01001 mov r1, #1
7c3c: e59f209c ldr r2, [pc, #156] ; 7ce0 <_Heap_Walk+0x658>
7c40: e1a0e00f mov lr, pc
7c44: e12fff1a bx sl
7c48: e3a00000 mov r0, #0
7c4c: eafffea0 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
7c50: e1a00008 mov r0, r8
7c54: e1a03009 mov r3, r9
7c58: e3a01001 mov r1, #1
7c5c: e59f2080 ldr r2, [pc, #128] ; 7ce4 <_Heap_Walk+0x65c>
7c60: e1a0e00f mov lr, pc
7c64: e12fff1a bx sl
7c68: e3a00000 mov r0, #0
7c6c: eafffe98 b 76d4 <_Heap_Walk+0x4c>
00000460 <_Message_queue_Manager_initialization>:
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
}
460: e12fff1e bx lr
00006b48 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
6b48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
6b4c: e5908034 ldr r8, [r0, #52] ; 0x34
6b50: e3580000 cmp r8, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
6b54: e24dd014 sub sp, sp, #20
6b58: e1a05000 mov r5, r0
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
6b5c: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
6b60: 0a00009c beq 6dd8 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
6b64: e1d091b4 ldrh r9, [r0, #20]
6b68: e1d0a1b0 ldrh sl, [r0, #16]
6b6c: e1a01009 mov r1, r9
6b70: e1a0000a mov r0, sl
6b74: eb004870 bl 18d3c <__aeabi_uidiv>
6b78: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
6b7c: e1b03823 lsrs r3, r3, #16
6b80: 01a01009 moveq r1, r9
6b84: 01a06007 moveq r6, r7
6b88: 01a04003 moveq r4, r3
6b8c: 0a00000f beq 6bd0 <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
6b90: e5984000 ldr r4, [r8]
6b94: e3540000 cmp r4, #0
6b98: 11a01009 movne r1, r9
6b9c: 11a06007 movne r6, r7
6ba0: 13a04000 movne r4, #0
6ba4: 01a01009 moveq r1, r9
6ba8: 01a06007 moveq r6, r7
6bac: 1a000003 bne 6bc0 <_Objects_Extend_information+0x78>
6bb0: ea000006 b 6bd0 <_Objects_Extend_information+0x88> <== NOT EXECUTED
6bb4: e7982104 ldr r2, [r8, r4, lsl #2]
6bb8: e3520000 cmp r2, #0
6bbc: 0a000003 beq 6bd0 <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
6bc0: e2844001 add r4, r4, #1
6bc4: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
6bc8: e0866009 add r6, r6, r9
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
6bcc: 8afffff8 bhi 6bb4 <_Objects_Extend_information+0x6c>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
6bd0: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
6bd4: e35a0801 cmp sl, #65536 ; 0x10000
6bd8: 2a000064 bcs 6d70 <_Objects_Extend_information+0x228>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
6bdc: e5d50012 ldrb r0, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
6be0: e5952018 ldr r2, [r5, #24]
if ( information->auto_extend ) {
6be4: e3500000 cmp r0, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
6be8: e0000192 mul r0, r2, r1
if ( information->auto_extend ) {
6bec: 1a000061 bne 6d78 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
6bf0: e58d3000 str r3, [sp]
6bf4: eb000833 bl 8cc8 <_Workspace_Allocate_or_fatal_error>
6bf8: e59d3000 ldr r3, [sp]
6bfc: e1a09000 mov r9, r0
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
6c00: e1d521b0 ldrh r2, [r5, #16]
6c04: e1560002 cmp r6, r2
6c08: 3a000038 bcc 6cf0 <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
6c0c: e283c001 add ip, r3, #1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
6c10: e08c008c add r0, ip, ip, lsl #1
6c14: e08a0000 add r0, sl, r0
6c18: e0800007 add r0, r0, r7
6c1c: e1a00100 lsl r0, r0, #2
6c20: e88d1008 stm sp, {r3, ip}
6c24: eb000833 bl 8cf8 <_Workspace_Allocate>
if ( !object_blocks ) {
6c28: e250b000 subs fp, r0, #0
6c2c: e89d1008 ldm sp, {r3, ip}
6c30: 0a00006e beq 6df0 <_Objects_Extend_information+0x2a8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
6c34: e1d521b0 ldrh r2, [r5, #16]
6c38: e1570002 cmp r7, r2
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
6c3c: e08b818c add r8, fp, ip, lsl #3
6c40: e08bc10c add ip, fp, ip, lsl #2
6c44: 3a000051 bcc 6d90 <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6c48: e3570000 cmp r7, #0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
6c4c: 13a02000 movne r2, #0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
6c50: 11a01002 movne r1, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6c54: 0a000003 beq 6c68 <_Objects_Extend_information+0x120>
local_table[ index ] = NULL;
6c58: e7881102 str r1, [r8, r2, lsl #2]
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6c5c: e2822001 add r2, r2, #1
6c60: e1570002 cmp r7, r2
6c64: 8afffffb bhi 6c58 <_Objects_Extend_information+0x110>
6c68: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
6c6c: e1d511b4 ldrh r1, [r5, #20]
6c70: e0861001 add r1, r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6c74: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c78: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
6c7c: e78c0003 str r0, [ip, r3]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6c80: e78b0003 str r0, [fp, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c84: 2a000005 bcs 6ca0 <_Objects_Extend_information+0x158>
6c88: e0882106 add r2, r8, r6, lsl #2
6c8c: e1a03006 mov r3, r6
index < ( information->allocation_size + index_base );
index++ ) {
6c90: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c94: e1510003 cmp r1, r3
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
6c98: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c9c: 8afffffb bhi 6c90 <_Objects_Extend_information+0x148>
6ca0: e10f3000 mrs r3, CPSR
6ca4: e3832080 orr r2, r3, #128 ; 0x80
6ca8: e129f002 msr CPSR_fc, r2
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
6cac: e5952000 ldr r2, [r5]
6cb0: e1d510b4 ldrh r1, [r5, #4]
6cb4: e1a02c02 lsl r2, r2, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
6cb8: e1a0a80a lsl sl, sl, #16
information->maximum_id = _Objects_Build_id(
6cbc: e3822801 orr r2, r2, #65536 ; 0x10000
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
6cc0: e1a0a82a lsr sl, sl, #16
information->maximum_id = _Objects_Build_id(
6cc4: e1822d81 orr r2, r2, r1, lsl #27
6cc8: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
6ccc: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
6cd0: e585c030 str ip, [r5, #48] ; 0x30
information->local_table = local_table;
6cd4: e585801c str r8, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
6cd8: e585200c str r2, [r5, #12]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
6cdc: e1c5a1b0 strh sl, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
6ce0: e585b034 str fp, [r5, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
6ce4: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
6ce8: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
6cec: 1b000807 blne 8d10 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6cf0: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6cf4: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6cf8: e7839104 str r9, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6cfc: e1a01009 mov r1, r9
6d00: e1a00007 mov r0, r7
6d04: e1d521b4 ldrh r2, [r5, #20]
6d08: e5953018 ldr r3, [r5, #24]
6d0c: eb00153f bl c210 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6d10: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d14: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6d18: ea000008 b 6d40 <_Objects_Extend_information+0x1f8>
the_object->id = _Objects_Build_id(
6d1c: e5952000 ldr r2, [r5]
6d20: e1d5c0b4 ldrh ip, [r5, #4]
6d24: e1a02c02 lsl r2, r2, #24
6d28: e3822801 orr r2, r2, #65536 ; 0x10000
6d2c: e1822d8c orr r2, r2, ip, lsl #27
6d30: e1822006 orr r2, r2, r6
6d34: e5832008 str r2, [r3, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d38: ebfffcf2 bl 6108 <_Chain_Append>
index++;
6d3c: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6d40: e1a00007 mov r0, r7
6d44: ebfffd03 bl 6158 <_Chain_Get>
6d48: e2503000 subs r3, r0, #0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d4c: e1a01003 mov r1, r3
6d50: e1a00008 mov r0, r8
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6d54: 1afffff0 bne 6d1c <_Objects_Extend_information+0x1d4>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d58: e1d531b4 ldrh r3, [r5, #20]
information->inactive =
6d5c: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d60: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
6d64: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d68: e7813004 str r3, [r1, r4]
information->inactive =
6d6c: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
6d70: e28dd014 add sp, sp, #20
6d74: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
6d78: e58d3000 str r3, [sp]
6d7c: eb0007dd bl 8cf8 <_Workspace_Allocate>
if ( !new_object_block )
6d80: e2509000 subs r9, r0, #0
6d84: e59d3000 ldr r3, [sp]
6d88: 1affff9c bne 6c00 <_Objects_Extend_information+0xb8>
6d8c: eafffff7 b 6d70 <_Objects_Extend_information+0x228>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
6d90: e1a03103 lsl r3, r3, #2
6d94: e1a02003 mov r2, r3
6d98: e5951034 ldr r1, [r5, #52] ; 0x34
6d9c: e88d1008 stm sp, {r3, ip}
6da0: eb002469 bl ff4c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
6da4: e89d1008 ldm sp, {r3, ip}
6da8: e1a0000c mov r0, ip
6dac: e1a02003 mov r2, r3
6db0: e5951030 ldr r1, [r5, #48] ; 0x30
6db4: eb002464 bl ff4c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
6db8: e1d521b0 ldrh r2, [r5, #16]
6dbc: e0872002 add r2, r7, r2
6dc0: e1a02102 lsl r2, r2, #2
6dc4: e1a00008 mov r0, r8
6dc8: e595101c ldr r1, [r5, #28]
6dcc: eb00245e bl ff4c <memcpy>
6dd0: e89d1008 ldm sp, {r3, ip}
6dd4: eaffffa4 b 6c6c <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
6dd8: e1a04008 mov r4, r8
6ddc: e1d0a1b0 ldrh sl, [r0, #16]
6de0: e1d011b4 ldrh r1, [r0, #20]
6de4: e1a06007 mov r6, r7
6de8: e1a03008 mov r3, r8
6dec: eaffff77 b 6bd0 <_Objects_Extend_information+0x88>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
6df0: e1a00009 mov r0, r9
6df4: eb0007c5 bl 8d10 <_Workspace_Free>
return;
6df8: eaffffdc b 6d70 <_Objects_Extend_information+0x228>
000068a4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
68a4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
68a8: e1a04001 mov r4, r1
68ac: e24dd004 sub sp, sp, #4
68b0: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
68b4: e1a0100d mov r1, sp
68b8: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
68bc: e1a08002 mov r8, r2
68c0: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
68c4: eb000075 bl 6aa0 <_POSIX_Mutex_Get>
68c8: e3500000 cmp r0, #0
68cc: 0a00000a beq 68fc <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
68d0: e59f30dc ldr r3, [pc, #220] ; 69b4 <_POSIX_Condition_variables_Wait_support+0x110>
68d4: e5932000 ldr r2, [r3]
68d8: e2422001 sub r2, r2, #1
68dc: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
68e0: e1a0100d mov r1, sp
68e4: e1a00006 mov r0, r6
68e8: ebffff76 bl 66c8 <_POSIX_Condition_variables_Get>
switch ( location ) {
68ec: e59d3000 ldr r3, [sp]
68f0: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
68f4: e1a0a000 mov sl, r0
switch ( location ) {
68f8: 0a000003 beq 690c <_POSIX_Condition_variables_Wait_support+0x68>
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
if ( mutex_status )
68fc: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6900: e1a00005 mov r0, r5
6904: e28dd004 add sp, sp, #4
6908: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
690c: e5903014 ldr r3, [r0, #20]
6910: e3530000 cmp r3, #0
6914: 0a000005 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c>
6918: e5942000 ldr r2, [r4]
691c: e1530002 cmp r3, r2
6920: 0a000002 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c>
_Thread_Enable_dispatch();
6924: eb000c92 bl 9b74 <_Thread_Enable_dispatch>
6928: e3a05016 mov r5, #22
return EINVAL;
692c: eafffff3 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c>
}
(void) pthread_mutex_unlock( mutex );
6930: e1a00004 mov r0, r4
6934: eb0000e3 bl 6cc8 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
6938: e3570000 cmp r7, #0
693c: 0a000006 beq 695c <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
6940: eb000c8b bl 9b74 <_Thread_Enable_dispatch>
6944: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
6948: e1a00004 mov r0, r4
694c: eb0000bc bl 6c44 <pthread_mutex_lock>
if ( mutex_status )
6950: e3500000 cmp r0, #0
6954: 0affffe9 beq 6900 <_POSIX_Condition_variables_Wait_support+0x5c>
6958: eaffffe7 b 68fc <_POSIX_Condition_variables_Wait_support+0x58>
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
695c: e59f5054 ldr r5, [pc, #84] ; 69b8 <_POSIX_Condition_variables_Wait_support+0x114>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6960: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6964: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6968: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
696c: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
6970: e5961000 ldr r1, [r6]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
6974: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
6978: e5831020 str r1, [r3, #32]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
697c: e3a01001 mov r1, #1
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
6980: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6984: e1a00002 mov r0, r2
6988: e58a1048 str r1, [sl, #72] ; 0x48
698c: e59f2028 ldr r2, [pc, #40] ; 69bc <_POSIX_Condition_variables_Wait_support+0x118>
6990: e1a01008 mov r1, r8
6994: eb000dbc bl a08c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6998: eb000c75 bl 9b74 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
699c: e5953000 ldr r3, [r5]
69a0: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
69a4: e3550074 cmp r5, #116 ; 0x74
69a8: 13550000 cmpne r5, #0
69ac: 0affffe5 beq 6948 <_POSIX_Condition_variables_Wait_support+0xa4>
69b0: eaffffd2 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
0000e834 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
e834: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
e838: e5907008 ldr r7, [r0, #8]
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
e83c: e1a0ac27 lsr sl, r7, #24
e840: e20aa007 and sl, sl, #7
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
e844: e1a07807 lsl r7, r7, #16
e848: e59f5078 ldr r5, [pc, #120] ; e8c8 <_POSIX_Keys_Run_destructors+0x94>
e84c: e1a07727 lsr r7, r7, #14
e850: e28aa005 add sl, sl, #5
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
e854: e3a08000 mov r8, #0
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
e858: e1d541b0 ldrh r4, [r5, #16]
done = true;
for ( index = 1 ; index <= max ; ++index ) {
e85c: e3540000 cmp r4, #0
e860: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
e864: e3a06001 mov r6, #1
e868: e1a01006 mov r1, r6
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
e86c: e595301c ldr r3, [r5, #28]
e870: e7932106 ldr r2, [r3, r6, lsl #2]
if ( key != NULL && key->destructor != NULL ) {
e874: e3520000 cmp r2, #0
e878: 0a00000a beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
e87c: e5923010 ldr r3, [r2, #16]
e880: e3530000 cmp r3, #0
e884: 0a000007 beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
e888: e792210a ldr r2, [r2, sl, lsl #2]
e88c: e7920007 ldr r0, [r2, r7]
if ( value != NULL ) {
e890: e3500000 cmp r0, #0
e894: 0a000003 beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
key->Values [ thread_api ][ thread_index ] = NULL;
e898: e7828007 str r8, [r2, r7] <== NOT EXECUTED
(*key->destructor)( value );
e89c: e1a0e00f mov lr, pc <== NOT EXECUTED
e8a0: e12fff13 bx r3 <== NOT EXECUTED
e8a4: e1a01008 mov r1, r8 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
e8a8: e2866001 add r6, r6, #1
e8ac: e1a06806 lsl r6, r6, #16
e8b0: e1a06826 lsr r6, r6, #16
e8b4: e1540006 cmp r4, r6
e8b8: 2affffeb bcs e86c <_POSIX_Keys_Run_destructors+0x38>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
e8bc: e3510000 cmp r1, #0
e8c0: 0affffe4 beq e858 <_POSIX_Keys_Run_destructors+0x24>
e8c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000b004 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
b004: e92d41f0 push {r4, r5, r6, r7, r8, lr}
b008: e1a04000 mov r4, r0
b00c: e24dd010 sub sp, sp, #16
b010: e1a07001 mov r7, r1
b014: e1a06002 mov r6, r2
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
b018: e59f0118 ldr r0, [pc, #280] ; b138 <_POSIX_Message_queue_Receive_support+0x134>
b01c: e1a01004 mov r1, r4
b020: e28d200c add r2, sp, #12
b024: e1a05003 mov r5, r3
b028: e5dd8028 ldrb r8, [sp, #40] ; 0x28
b02c: eb000c43 bl e140 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
b030: e59d300c ldr r3, [sp, #12]
b034: e3530000 cmp r3, #0
b038: 0a000005 beq b054 <_POSIX_Message_queue_Receive_support+0x50>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
b03c: eb002f7f bl 16e40 <__errno>
b040: e3a03009 mov r3, #9
b044: e5803000 str r3, [r0]
b048: e3e00000 mvn r0, #0
}
b04c: e28dd010 add sp, sp, #16
b050: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
b054: e5903014 ldr r3, [r0, #20]
b058: e2032003 and r2, r3, #3
b05c: e3520001 cmp r2, #1
b060: 0a00002e beq b120 <_POSIX_Message_queue_Receive_support+0x11c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
b064: e5900010 ldr r0, [r0, #16]
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
b068: e5902068 ldr r2, [r0, #104] ; 0x68
b06c: e1520006 cmp r2, r6
b070: 8a000024 bhi b108 <_POSIX_Message_queue_Receive_support+0x104>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
b074: e3580000 cmp r8, #0
b078: 11a08723 lsrne r8, r3, #14
b07c: 12288001 eorne r8, r8, #1
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
b080: e28d3010 add r3, sp, #16
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
b084: e59dc02c ldr ip, [sp, #44] ; 0x2c
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
b088: e3e02000 mvn r2, #0
b08c: e5232008 str r2, [r3, #-8]!
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
b090: 12088001 andne r8, r8, #1
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
b094: e280001c add r0, r0, #28
b098: e1a01004 mov r1, r4
b09c: e1a02007 mov r2, r7
b0a0: e88d1100 stm sp, {r8, ip}
b0a4: eb00081a bl d114 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
b0a8: eb000e72 bl ea78 <_Thread_Enable_dispatch>
if (msg_prio) {
b0ac: e3550000 cmp r5, #0
b0b0: 0a000011 beq b0fc <_POSIX_Message_queue_Receive_support+0xf8>
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
b0b4: e59f4080 ldr r4, [pc, #128] ; b13c <_POSIX_Message_queue_Receive_support+0x138>
b0b8: e5943000 ldr r3, [r4]
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
b0bc: e5931024 ldr r1, [r3, #36] ; 0x24
b0c0: e0212fc1 eor r2, r1, r1, asr #31
b0c4: e0422fc1 sub r2, r2, r1, asr #31
b0c8: e5852000 str r2, [r5]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
b0cc: e5933034 ldr r3, [r3, #52] ; 0x34
b0d0: e3530000 cmp r3, #0
return length_out;
b0d4: 059d0008 ldreq r0, [sp, #8]
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
b0d8: 0affffdb beq b04c <_POSIX_Message_queue_Receive_support+0x48>
return length_out;
rtems_set_errno_and_return_minus_one(
b0dc: eb002f57 bl 16e40 <__errno>
b0e0: e5943000 ldr r3, [r4]
b0e4: e1a05000 mov r5, r0
b0e8: e5930034 ldr r0, [r3, #52] ; 0x34
b0ec: eb0000b6 bl b3cc <_POSIX_Message_queue_Translate_core_message_queue_return_code>
b0f0: e5850000 str r0, [r5]
b0f4: e3e00000 mvn r0, #0
b0f8: eaffffd3 b b04c <_POSIX_Message_queue_Receive_support+0x48>
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
b0fc: e59f4038 ldr r4, [pc, #56] ; b13c <_POSIX_Message_queue_Receive_support+0x138><== NOT EXECUTED
b100: e5943000 ldr r3, [r4] <== NOT EXECUTED
b104: eafffff0 b b0cc <_POSIX_Message_queue_Receive_support+0xc8><== NOT EXECUTED
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
b108: eb000e5a bl ea78 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
b10c: eb002f4b bl 16e40 <__errno>
b110: e3a0307a mov r3, #122 ; 0x7a
b114: e5803000 str r3, [r0]
b118: e3e00000 mvn r0, #0
b11c: eaffffca b b04c <_POSIX_Message_queue_Receive_support+0x48>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
b120: eb000e54 bl ea78 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
b124: eb002f45 bl 16e40 <__errno>
b128: e3a03009 mov r3, #9
b12c: e5803000 str r3, [r0]
b130: e3e00000 mvn r0, #0
b134: eaffffc4 b b04c <_POSIX_Message_queue_Receive_support+0x48>
0000b98c <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
b98c: e92d40f0 push {r4, r5, r6, r7, lr}
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
b990: e1a00001 mov r0, r1
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
b994: e1a06001 mov r6, r1
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
b998: e5917108 ldr r7, [r1, #264] ; 0x108
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
b99c: eb000b8a bl e7cc <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
b9a0: e1a00006 mov r0, r6
b9a4: eb000ba2 bl e834 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9a8: e2874040 add r4, r7, #64 ; 0x40
_POSIX_Keys_Run_destructors( deleted );
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
b9ac: e5965028 ldr r5, [r6, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9b0: ea000001 b b9bc <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
b9b4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
b9b8: e5835000 str r5, [r3] <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9bc: e1a00004 mov r0, r4
b9c0: ebfff0a7 bl 7c64 <_Thread_queue_Dequeue>
b9c4: e3500000 cmp r0, #0
b9c8: 1afffff9 bne b9b4 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
b9cc: e5973080 ldr r3, [r7, #128] ; 0x80
b9d0: e3530004 cmp r3, #4
b9d4: 0a000004 beq b9ec <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
b9d8: e3a03000 mov r3, #0
(void) _Workspace_Free( api );
b9dc: e1a00007 mov r0, r7
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
b9e0: e5863108 str r3, [r6, #264] ; 0x108
(void) _Workspace_Free( api );
}
b9e4: e8bd40f0 pop {r4, r5, r6, r7, lr}
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
b9e8: eafff4c8 b 8d10 <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
b9ec: e28700a4 add r0, r7, #164 ; 0xa4
b9f0: ebfff463 bl 8b84 <_Watchdog_Remove>
b9f4: eafffff7 b b9d8 <_POSIX_Threads_Delete_extension+0x4c>
0000f5f4 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
f5f4: e10f2000 mrs r2, CPSR
f5f8: e3823080 orr r3, r2, #128 ; 0x80
f5fc: e129f003 msr CPSR_fc, r3
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
f600: e59f1064 ldr r1, [pc, #100] ; f66c <_POSIX_signals_Clear_process_signals+0x78>
f604: e0803080 add r3, r0, r0, lsl #1
f608: e1a03103 lsl r3, r3, #2
f60c: e7911003 ldr r1, [r1, r3]
f610: e3510002 cmp r1, #2
f614: 0a00000c beq f64c <_POSIX_signals_Clear_process_signals+0x58>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
f618: e59f3050 ldr r3, [pc, #80] ; f670 <_POSIX_signals_Clear_process_signals+0x7c>
f61c: e5931000 ldr r1, [r3]
f620: e3a0c001 mov ip, #1
f624: e2400001 sub r0, r0, #1
f628: e1c1001c bic r0, r1, ip, lsl r0
if ( !_POSIX_signals_Pending )
f62c: e3500000 cmp r0, #0
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
f630: e5830000 str r0, [r3]
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
f634: 059f3038 ldreq r3, [pc, #56] ; f674 <_POSIX_signals_Clear_process_signals+0x80>
f638: 05931000 ldreq r1, [r3]
f63c: 02411001 subeq r1, r1, #1
f640: 05831000 streq r1, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
f644: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
f648: e12fff1e bx lr
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
f64c: e59f1024 ldr r1, [pc, #36] ; f678 <_POSIX_signals_Clear_process_signals+0x84>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
f650: e791c003 ldr ip, [r1, r3]
f654: e0813003 add r3, r1, r3
f658: e2833004 add r3, r3, #4
f65c: e15c0003 cmp ip, r3
f660: 0affffec beq f618 <_POSIX_signals_Clear_process_signals+0x24>
f664: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
}
f668: e12fff1e bx lr <== NOT EXECUTED
00000464 <_Partition_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
}
464: e12fff1e bx lr
00000474 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
}
474: e12fff1e bx lr
00000468 <_Region_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
}
468: e12fff1e bx lr
00007e88 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7e88: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
7e8c: e92d05f0 push {r4, r5, r6, r7, r8, sl}
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
7e90: e1a0c323 lsr ip, r3, #6
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7e94: e281503c add r5, r1, #60 ; 0x3c
7e98: e08cc08c add ip, ip, ip, lsl #1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
7e9c: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7ea0: e2814038 add r4, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7ea4: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
7ea8: e3a05000 mov r5, #0
7eac: e581503c str r5, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
7eb0: e5814040 str r4, [r1, #64] ; 0x40
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
7eb4: e080c10c add ip, r0, ip, lsl #2
block_state = the_thread_queue->state;
7eb8: e5906038 ldr r6, [r0, #56] ; 0x38
7ebc: 159fa178 ldrne sl, [pc, #376] ; 803c <_Thread_queue_Enqueue_priority+0x1b4>
if ( _Thread_queue_Is_reverse_search( priority ) )
7ec0: 1a00001c bne 7f38 <_Thread_queue_Enqueue_priority+0xb0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
7ec4: e28ca004 add sl, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7ec8: e10f8000 mrs r8, CPSR
7ecc: e3884080 orr r4, r8, #128 ; 0x80
7ed0: e129f004 msr CPSR_fc, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
7ed4: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7ed8: e154000a cmp r4, sl
7edc: 1a000009 bne 7f08 <_Thread_queue_Enqueue_priority+0x80>
7ee0: ea000052 b 8030 <_Thread_queue_Enqueue_priority+0x1a8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7ee4: e10f7000 mrs r7, CPSR
7ee8: e129f008 msr CPSR_fc, r8
7eec: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7ef0: e5947010 ldr r7, [r4, #16]
7ef4: e1160007 tst r6, r7
7ef8: 0a000033 beq 7fcc <_Thread_queue_Enqueue_priority+0x144>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7efc: e5944000 ldr r4, [r4]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7f00: e154000a cmp r4, sl
7f04: 0a000002 beq 7f14 <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
7f08: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
7f0c: e1530005 cmp r3, r5
7f10: 8afffff3 bhi 7ee4 <_Thread_queue_Enqueue_priority+0x5c>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7f14: e1a06008 mov r6, r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7f18: e590c030 ldr ip, [r0, #48] ; 0x30
7f1c: e35c0001 cmp ip, #1
7f20: 0a00002b beq 7fd4 <_Thread_queue_Enqueue_priority+0x14c>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
7f24: e5826000 str r6, [r2]
return the_thread_queue->sync_state;
7f28: e1a0000c mov r0, ip
}
7f2c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
7f30: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7f34: e129f008 msr CPSR_fc, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
7f38: e5da5000 ldrb r5, [sl]
7f3c: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7f40: e10f8000 mrs r8, CPSR
7f44: e3884080 orr r4, r8, #128 ; 0x80
7f48: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7f4c: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7f50: e154000c cmp r4, ip
7f54: 1a000009 bne 7f80 <_Thread_queue_Enqueue_priority+0xf8>
7f58: ea00000b b 7f8c <_Thread_queue_Enqueue_priority+0x104>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7f5c: e10f7000 mrs r7, CPSR
7f60: e129f008 msr CPSR_fc, r8
7f64: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7f68: e5947010 ldr r7, [r4, #16]
7f6c: e1160007 tst r6, r7
7f70: 0affffef beq 7f34 <_Thread_queue_Enqueue_priority+0xac>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
7f74: e5944004 ldr r4, [r4, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7f78: e154000c cmp r4, ip
7f7c: 0a000002 beq 7f8c <_Thread_queue_Enqueue_priority+0x104>
search_priority = search_thread->current_priority;
7f80: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
7f84: e1530005 cmp r3, r5
7f88: 3afffff3 bcc 7f5c <_Thread_queue_Enqueue_priority+0xd4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7f8c: e590c030 ldr ip, [r0, #48] ; 0x30
7f90: e35c0001 cmp ip, #1
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7f94: e1a06008 mov r6, r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7f98: 1affffe1 bne 7f24 <_Thread_queue_Enqueue_priority+0x9c>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7f9c: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7fa0: e3a03000 mov r3, #0
7fa4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7fa8: 0a000016 beq 8008 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
7fac: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7fb0: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7fb4: e5810044 str r0, [r1, #68] ; 0x44
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
7fb8: e5841000 str r1, [r4]
next_node->previous = the_node;
7fbc: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7fc0: e129f008 msr CPSR_fc, r8
7fc4: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7fc8: eaffffd7 b 7f2c <_Thread_queue_Enqueue_priority+0xa4>
7fcc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
7fd0: eaffffbc b 7ec8 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7fd4: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7fd8: e3a03000 mov r3, #0
7fdc: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7fe0: 0a000008 beq 8008 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7fe4: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7fe8: e5814000 str r4, [r1]
the_node->previous = previous_node;
7fec: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7ff0: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
7ff4: e5831000 str r1, [r3]
search_node->previous = the_node;
7ff8: e5841004 str r1, [r4, #4]
7ffc: e129f008 msr CPSR_fc, r8
8000: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004: eaffffc8 b 7f2c <_Thread_queue_Enqueue_priority+0xa4>
8008: e284403c add r4, r4, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
800c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8010: e5814000 str r4, [r1]
the_node->previous = previous_node;
8014: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
8018: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
801c: e5831000 str r1, [r3]
search_node->previous = the_node;
8020: e5841004 str r1, [r4, #4]
8024: e129f006 msr CPSR_fc, r6
8028: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
802c: eaffffbe b 7f2c <_Thread_queue_Enqueue_priority+0xa4>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8030: e1a06008 mov r6, r8
8034: e3e05000 mvn r5, #0
8038: eaffffb6 b 7f18 <_Thread_queue_Enqueue_priority+0x90>
00000470 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
}
470: e12fff1e bx lr
00016a3c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
16a3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
16a40: e24dd024 sub sp, sp, #36 ; 0x24
16a44: e28d700c add r7, sp, #12
16a48: e28d2018 add r2, sp, #24
16a4c: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
16a50: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
16a54: e282a004 add sl, r2, #4
16a58: e2872004 add r2, r7, #4
16a5c: e58d2000 str r2, [sp]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
16a60: e58d301c str r3, [sp, #28]
the_chain->last = _Chain_Head(the_chain);
16a64: e28d0018 add r0, sp, #24
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
16a68: e58d200c str r2, [sp, #12]
the_chain->permanent_null = NULL;
16a6c: e58d3010 str r3, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16a70: e2842008 add r2, r4, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16a74: e2843040 add r3, r4, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
16a78: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
16a7c: e58d0020 str r0, [sp, #32]
16a80: e58d7014 str r7, [sp, #20]
16a84: e59f91a0 ldr r9, [pc, #416] ; 16c2c <_Timer_server_Body+0x1f0>
16a88: e59fb1a0 ldr fp, [pc, #416] ; 16c30 <_Timer_server_Body+0x1f4>
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16a8c: e58d2008 str r2, [sp, #8]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16a90: e58d3004 str r3, [sp, #4]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16a94: e2846030 add r6, r4, #48 ; 0x30
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16a98: e2848068 add r8, r4, #104 ; 0x68
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
16a9c: e28d0018 add r0, sp, #24
16aa0: e5840078 str r0, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
16aa4: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
16aa8: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16aac: e1a00006 mov r0, r6
16ab0: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
16ab4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16ab8: e1a02007 mov r2, r7
16abc: eb00110f bl 1af00 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
16ac0: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
16ac4: e5941074 ldr r1, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
16ac8: e1550001 cmp r5, r1
16acc: 8a000022 bhi 16b5c <_Timer_server_Body+0x120>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
16ad0: 3a000018 bcc 16b38 <_Timer_server_Body+0xfc>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
16ad4: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
16ad8: e5940078 ldr r0, [r4, #120] ; 0x78
16adc: eb000253 bl 17430 <_Chain_Get>
if ( timer == NULL ) {
16ae0: e3500000 cmp r0, #0
16ae4: 0a00000b beq 16b18 <_Timer_server_Body+0xdc>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
16ae8: e5903038 ldr r3, [r0, #56] ; 0x38
16aec: e3530001 cmp r3, #1
16af0: 0a000015 beq 16b4c <_Timer_server_Body+0x110>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
16af4: e3530003 cmp r3, #3
16af8: 1afffff6 bne 16ad8 <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
16afc: e2801010 add r1, r0, #16
16b00: e1a00008 mov r0, r8
16b04: eb00112c bl 1afbc <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
16b08: e5940078 ldr r0, [r4, #120] ; 0x78
16b0c: eb000247 bl 17430 <_Chain_Get>
if ( timer == NULL ) {
16b10: e3500000 cmp r0, #0
16b14: 1afffff3 bne 16ae8 <_Timer_server_Body+0xac>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
16b18: e10f2000 mrs r2, CPSR
16b1c: e3823080 orr r3, r2, #128 ; 0x80
16b20: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
16b24: e59d3018 ldr r3, [sp, #24]
16b28: e15a0003 cmp sl, r3
16b2c: 0a00000f beq 16b70 <_Timer_server_Body+0x134>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
16b30: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
16b34: eaffffda b 16aa4 <_Timer_server_Body+0x68> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
16b38: e0652001 rsb r2, r5, r1
16b3c: e1a00008 mov r0, r8
16b40: e3a01001 mov r1, #1
16b44: eb0010be bl 1ae44 <_Watchdog_Adjust>
16b48: eaffffe1 b 16ad4 <_Timer_server_Body+0x98>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
16b4c: e2801010 add r1, r0, #16
16b50: e1a00006 mov r0, r6
16b54: eb001118 bl 1afbc <_Watchdog_Insert>
16b58: eaffffde b 16ad8 <_Timer_server_Body+0x9c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16b5c: e0611005 rsb r1, r1, r5
16b60: e1a00008 mov r0, r8
16b64: e1a02007 mov r2, r7
16b68: eb0010e4 bl 1af00 <_Watchdog_Adjust_to_chain>
16b6c: eaffffd8 b 16ad4 <_Timer_server_Body+0x98>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
16b70: e5840078 str r0, [r4, #120] ; 0x78
16b74: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
16b78: e59d300c ldr r3, [sp, #12]
16b7c: e59d2000 ldr r2, [sp]
16b80: e1520003 cmp r2, r3
16b84: 159d5000 ldrne r5, [sp]
16b88: 1a00000a bne 16bb8 <_Timer_server_Body+0x17c>
16b8c: ea000011 b 16bd8 <_Timer_server_Body+0x19c>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
16b90: e5932000 ldr r2, [r3]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
16b94: e3a00000 mov r0, #0
the_chain->first = new_first;
16b98: e58d200c str r2, [sp, #12]
16b9c: e5830008 str r0, [r3, #8]
new_first->previous = _Chain_Head(the_chain);
16ba0: e5827004 str r7, [r2, #4]
16ba4: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
16ba8: e2830020 add r0, r3, #32
16bac: e8900003 ldm r0, {r0, r1}
16bb0: e1a0e00f mov lr, pc
16bb4: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
16bb8: e10f1000 mrs r1, CPSR
16bbc: e3813080 orr r3, r1, #128 ; 0x80
16bc0: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
16bc4: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
16bc8: e1550003 cmp r5, r3
16bcc: 1affffef bne 16b90 <_Timer_server_Body+0x154>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
16bd0: e129f001 msr CPSR_fc, r1
16bd4: eaffffb0 b 16a9c <_Timer_server_Body+0x60>
}
} else {
ts->active = false;
16bd8: e3a02000 mov r2, #0
16bdc: e5c4207c strb r2, [r4, #124] ; 0x7c
16be0: e59f004c ldr r0, [pc, #76] ; 16c34 <_Timer_server_Body+0x1f8>
16be4: e5903000 ldr r3, [r0]
16be8: e2833001 add r3, r3, #1
16bec: e5803000 str r3, [r0]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
16bf0: e3a01008 mov r1, #8
16bf4: e5940000 ldr r0, [r4]
16bf8: eb000e15 bl 1a454 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
16bfc: e1a00004 mov r0, r4
16c00: ebffff61 bl 1698c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
16c04: e1a00004 mov r0, r4
16c08: ebffff75 bl 169e4 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
16c0c: eb000b52 bl 1995c <_Thread_Enable_dispatch>
ts->active = true;
16c10: e3a02001 mov r2, #1
16c14: e5c4207c strb r2, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16c18: e59d0008 ldr r0, [sp, #8]
16c1c: eb001147 bl 1b140 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16c20: e59d0004 ldr r0, [sp, #4]
16c24: eb001145 bl 1b140 <_Watchdog_Remove>
16c28: eaffff9b b 16a9c <_Timer_server_Body+0x60>
0000a970 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a970: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a974: e1a04000 mov r4, r0
a978: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a97c: e10f3000 mrs r3, CPSR
a980: e3832080 orr r2, r3, #128 ; 0x80
a984: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a988: e1a07000 mov r7, r0
a98c: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
a990: e1520007 cmp r2, r7
a994: 0a000018 beq a9fc <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a998: e3510000 cmp r1, #0
a99c: 1a000018 bne aa04 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a9a0: e3550000 cmp r5, #0
a9a4: 0a000014 beq a9fc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a9a8: e5926010 ldr r6, [r2, #16]
a9ac: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a9b0: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
a9b4: 2a000005 bcs a9d0 <_Watchdog_Adjust+0x60>
a9b8: ea000018 b aa20 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a9bc: e0555006 subs r5, r5, r6
a9c0: 0a00000d beq a9fc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a9c4: e5926010 ldr r6, [r2, #16]
a9c8: e1560005 cmp r6, r5
a9cc: 8a000013 bhi aa20 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a9d0: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a9d4: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a9d8: e1a00004 mov r0, r4
a9dc: eb00009e bl ac5c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a9e0: e10f3000 mrs r3, CPSR
a9e4: e3832080 orr r2, r3, #128 ; 0x80
a9e8: e129f002 msr CPSR_fc, r2
a9ec: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a9f0: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a9f4: e1a02001 mov r2, r1
a9f8: 1affffef bne a9bc <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a9fc: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
aa00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
aa04: e3510001 cmp r1, #1
aa08: 1afffffb bne a9fc <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
aa0c: e5921010 ldr r1, [r2, #16]
aa10: e0815005 add r5, r1, r5
aa14: e5825010 str r5, [r2, #16]
aa18: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
aa1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
aa20: e0655006 rsb r5, r5, r6
aa24: e5825010 str r5, [r2, #16]
break;
aa28: eafffff3 b a9fc <_Watchdog_Adjust+0x8c>
0001b1cc <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
1b1cc: e24dd004 sub sp, sp, #4
1b1d0: e58d0000 str r0, [sp]
1b1d4: eb0001f1 bl 1b9a0 <___DTOR_END__>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
1b1d8: ebffffe1 bl 1b164 <libc_wrapup>
rtems_shutdown_executive(status);
1b1dc: e59d0000 ldr r0, [sp]
1b1e0: eb00003e bl 1b2e0 <rtems_shutdown_executive>
1b1e4: eafffffe b 1b1e4 <_exit+0x18> <== NOT EXECUTED
00026870 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
26870: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
26874: e2534000 subs r4, r3, #0 <== NOT EXECUTED
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
26878: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2687c: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
26880: 01a05004 moveq r5, r4 <== NOT EXECUTED
26884: 0a00001d beq 26900 <_fat_block_read+0x90> <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
26888: e3a05000 mov r5, #0 <== NOT EXECUTED
2688c: e28db004 add fp, sp, #4 <== NOT EXECUTED
26890: e52b5004 str r5, [fp, #-4]! <== NOT EXECUTED
26894: e1a07002 mov r7, r2 <== NOT EXECUTED
26898: e1a06001 mov r6, r1 <== NOT EXECUTED
2689c: ea00000d b 268d8 <_fat_block_read+0x68> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
268a0: e1d980b0 ldrh r8, [r9] <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
268a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
268a8: e0678008 rsb r8, r7, r8 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
268ac: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
268b0: e1580004 cmp r8, r4 <== NOT EXECUTED
268b4: 21a08004 movcs r8, r4 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
268b8: e0811007 add r1, r1, r7 <== NOT EXECUTED
268bc: e1a02008 mov r2, r8 <== NOT EXECUTED
268c0: eb00840e bl 47900 <memcpy> <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
268c4: e0544008 subs r4, r4, r8 <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
268c8: e0885005 add r5, r8, r5 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
268cc: 0a00000b beq 26900 <_fat_block_read+0x90> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
268d0: e2866001 add r6, r6, #1 <== NOT EXECUTED
268d4: e1a0700a mov r7, sl <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
268d8: e1a0300d mov r3, sp <== NOT EXECUTED
268dc: e1a01006 mov r1, r6 <== NOT EXECUTED
268e0: e1a00009 mov r0, r9 <== NOT EXECUTED
268e4: e3a02001 mov r2, #1 <== NOT EXECUTED
268e8: ebfffe8d bl 26324 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
268ec: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
268f0: e250a000 subs sl, r0, #0 <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
268f4: e0830005 add r0, r3, r5 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
268f8: 0affffe8 beq 268a0 <_fat_block_read+0x30> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
268fc: e3e05000 mvn r5, #0 <== NOT EXECUTED
ofs = 0;
}
return cmpltd;
}
26900: e1a00005 mov r0, r5 <== NOT EXECUTED
26904: e28dd004 add sp, sp, #4 <== NOT EXECUTED
26908: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0002631c <_fat_block_release>:
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2631c: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED
26320: eaffffa4 b 261b8 <fat_buf_release> <== NOT EXECUTED
0002653c <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
2653c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
26540: e2535000 subs r5, r3, #0 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
26544: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
26548: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2654c: 01a06005 moveq r6, r5 <== NOT EXECUTED
26550: 0a00002d beq 2660c <_fat_block_write+0xd0> <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
26554: e3a06000 mov r6, #0 <== NOT EXECUTED
26558: e28db004 add fp, sp, #4 <== NOT EXECUTED
2655c: e52b6004 str r6, [fp, #-4]! <== NOT EXECUTED
26560: e1a08002 mov r8, r2 <== NOT EXECUTED
26564: e1a09001 mov r9, r1 <== NOT EXECUTED
26568: ea000015 b 265c4 <_fat_block_write+0x88> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2656c: e1a01009 mov r1, r9 <== NOT EXECUTED
26570: e1a0300d mov r3, sp <== NOT EXECUTED
26574: e3a02001 mov r2, #1 <== NOT EXECUTED
26578: e1a00007 mov r0, r7 <== NOT EXECUTED
2657c: ebffff68 bl 26324 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
26580: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
26584: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (rc != RC_OK)
26588: e35a0000 cmp sl, #0 <== NOT EXECUTED
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2658c: e0831006 add r1, r3, r6 <== NOT EXECUTED
26590: e1a02004 mov r2, r4 <== NOT EXECUTED
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
26594: 1a00001b bne 26608 <_fat_block_write+0xcc> <== NOT EXECUTED
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
26598: e59d3000 ldr r3, [sp] <== NOT EXECUTED
2659c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
265a0: e0800008 add r0, r0, r8 <== NOT EXECUTED
265a4: eb0084d5 bl 47900 <memcpy> <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
265a8: e3a03001 mov r3, #1 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
265ac: e0555004 subs r5, r5, r4 <== NOT EXECUTED
265b0: e5c73080 strb r3, [r7, #128] ; 0x80 <== NOT EXECUTED
memcpy((block->buffer + ofs), (buff + cmpltd), c);
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
265b4: e0846006 add r6, r4, r6 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
265b8: 0a000013 beq 2660c <_fat_block_write+0xd0> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
265bc: e2899001 add r9, r9, #1 <== NOT EXECUTED
265c0: e1a0800a mov r8, sl <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
265c4: e1d730b0 ldrh r3, [r7] <== NOT EXECUTED
265c8: e0684003 rsb r4, r8, r3 <== NOT EXECUTED
265cc: e1540005 cmp r4, r5 <== NOT EXECUTED
265d0: 21a04005 movcs r4, r5 <== NOT EXECUTED
if (c == fs_info->vol.bps)
265d4: e1530004 cmp r3, r4 <== NOT EXECUTED
265d8: 1affffe3 bne 2656c <_fat_block_write+0x30> <== NOT EXECUTED
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
265dc: e1a01009 mov r1, r9 <== NOT EXECUTED
265e0: e3a02002 mov r2, #2 <== NOT EXECUTED
265e4: e1a0300d mov r3, sp <== NOT EXECUTED
265e8: e1a00007 mov r0, r7 <== NOT EXECUTED
265ec: ebffff4c bl 26324 <fat_buf_access> <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
265f0: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
265f4: e1a0a000 mov sl, r0 <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
265f8: e35a0000 cmp sl, #0 <== NOT EXECUTED
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
265fc: e0831006 add r1, r3, r6 <== NOT EXECUTED
26600: e1a02004 mov r2, r4 <== NOT EXECUTED
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
26604: 0affffe3 beq 26598 <_fat_block_write+0x5c> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
26608: e3e06000 mvn r6, #0 <== NOT EXECUTED
ofs = 0;
}
return cmpltd;
}
2660c: e1a00006 mov r0, r6 <== NOT EXECUTED
26610: e28dd004 add sp, sp, #4 <== NOT EXECUTED
26614: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000404d8 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
404d8: e1a00001 mov r0, r1 <== NOT EXECUTED
404dc: e1a01002 mov r1, r2 <== NOT EXECUTED
404e0: e1a02003 mov r2, r3 <== NOT EXECUTED
404e4: eaffff81 b 402f0 <fcntl> <== NOT EXECUTED
0000af44 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
af44: e3a00001 mov r0, #1 <== NOT EXECUTED
af48: e12fff1e bx lr <== NOT EXECUTED
000021b4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
21b4: eaffffe4 b 214c <gettimeofday> <== NOT EXECUTED
0002a0bc <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
2a0bc: e1a00001 mov r0, r1 <== NOT EXECUTED
2a0c0: e1a01002 mov r1, r2 <== NOT EXECUTED
2a0c4: eaffff75 b 29ea0 <link> <== NOT EXECUTED
0002a308 <_lstat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
2a308: e1a00001 mov r0, r1 <== NOT EXECUTED
2a30c: e1a01002 mov r1, r2 <== NOT EXECUTED
2a310: eaffffc2 b 2a220 <lstat> <== NOT EXECUTED
0001b2c4 <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
1b2c4: e1a00001 mov r0, r1 <== NOT EXECUTED
1b2c8: e1a01002 mov r1, r2 <== NOT EXECUTED
1b2cc: ea00000e b 1b30c <realloc> <== NOT EXECUTED
0005e318 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
5e318: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
5e31c: e1a00001 mov r0, r1
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
5e320: e24dd048 sub sp, sp, #72 ; 0x48
5e324: e1a05001 mov r5, r1
5e328: e1a06002 mov r6, r2
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
5e32c: ebfea620 bl 7bb4 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
5e330: e2507000 subs r7, r0, #0
5e334: 1a00008b bne 5e568 <_rename_r+0x250>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
5e338: e28d4018 add r4, sp, #24
5e33c: e1a00005 mov r0, r5
5e340: e28d1044 add r1, sp, #68 ; 0x44
5e344: e1a02004 mov r2, r4
5e348: ebfeacf7 bl 972c <rtems_filesystem_get_start_loc>
5e34c: e1a08007 mov r8, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
5e350: e1a0e004 mov lr, r4
5e354: e8be000f ldm lr!, {r0, r1, r2, r3}
5e358: e28dc02c add ip, sp, #44 ; 0x2c
5e35c: e8ac000f stmia ip!, {r0, r1, r2, r3}
5e360: e59e3000 ldr r3, [lr]
name = old + old_parent_pathlen;
5e364: e0855007 add r5, r5, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
5e368: e58c3000 str r3, [ip]
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5e36c: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
5e370: e58d5040 str r5, [sp, #64] ; 0x40
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5e374: ebffb3bf bl 4b278 <strlen>
5e378: e1a01000 mov r1, r0
5e37c: e1a00005 mov r0, r5
5e380: ebfea5f6 bl 7b60 <rtems_filesystem_prefix_separators>
5e384: e0855000 add r5, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
5e388: e1a00005 mov r0, r5
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5e38c: e58d5040 str r5, [sp, #64] ; 0x40
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
5e390: ebffb3b8 bl 4b278 <strlen>
5e394: e28d702c add r7, sp, #44 ; 0x2c
5e398: e3a0c000 mov ip, #0
5e39c: e1a01000 mov r1, r0
5e3a0: e1a0200c mov r2, ip
5e3a4: e1a00005 mov r0, r5
5e3a8: e1a03007 mov r3, r7
5e3ac: e58dc000 str ip, [sp]
5e3b0: ebfea610 bl 7bf8 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
5e3b4: e3500000 cmp r0, #0
5e3b8: 1a00005b bne 5e52c <_rename_r+0x214>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
5e3bc: e28d5004 add r5, sp, #4
5e3c0: e1a00006 mov r0, r6
5e3c4: e28d1044 add r1, sp, #68 ; 0x44
5e3c8: e1a02005 mov r2, r5
5e3cc: ebfeacd6 bl 972c <rtems_filesystem_get_start_loc>
if ( !new_parent_loc.ops->evalformake_h ) {
5e3d0: e59d3010 ldr r3, [sp, #16]
5e3d4: e5933004 ldr r3, [r3, #4]
5e3d8: e3530000 cmp r3, #0
5e3dc: 0a00008f beq 5e620 <_rename_r+0x308>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
5e3e0: e59d0044 ldr r0, [sp, #68] ; 0x44
5e3e4: e1a01005 mov r1, r5
5e3e8: e0860000 add r0, r6, r0
5e3ec: e28d2040 add r2, sp, #64 ; 0x40
5e3f0: e1a0e00f mov lr, pc
5e3f4: e12fff13 bx r3
if ( result != 0 ) {
5e3f8: e3500000 cmp r0, #0
5e3fc: 1a000065 bne 5e598 <_rename_r+0x280>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
5e400: e59d3014 ldr r3, [sp, #20]
5e404: e59d2028 ldr r2, [sp, #40] ; 0x28
5e408: e1520003 cmp r2, r3
5e40c: 1a000027 bne 5e4b0 <_rename_r+0x198>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
5e410: e59d3010 ldr r3, [sp, #16]
5e414: e593c040 ldr ip, [r3, #64] ; 0x40
5e418: e35c0000 cmp ip, #0
5e41c: 0a00007a beq 5e60c <_rename_r+0x2f4>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
5e420: e59d3040 ldr r3, [sp, #64] ; 0x40
5e424: e1a00004 mov r0, r4
5e428: e1a01007 mov r1, r7
5e42c: e1a02005 mov r2, r5
5e430: e1a0e00f mov lr, pc
5e434: e12fff1c bx ip
rtems_filesystem_freenode( &new_parent_loc );
5e438: e59d3010 ldr r3, [sp, #16]
5e43c: e3530000 cmp r3, #0
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
5e440: e1a06000 mov r6, r0
rtems_filesystem_freenode( &new_parent_loc );
5e444: 0a000004 beq 5e45c <_rename_r+0x144>
5e448: e593301c ldr r3, [r3, #28]
5e44c: e3530000 cmp r3, #0
5e450: 11a00005 movne r0, r5
5e454: 11a0e00f movne lr, pc
5e458: 112fff13 bxne r3
if ( free_old_parentloc )
5e45c: e3580000 cmp r8, #0
5e460: 0a000007 beq 5e484 <_rename_r+0x16c>
rtems_filesystem_freenode( &old_parent_loc );
5e464: e59d3024 ldr r3, [sp, #36] ; 0x24
5e468: e3530000 cmp r3, #0
5e46c: 0a000004 beq 5e484 <_rename_r+0x16c>
5e470: e593301c ldr r3, [r3, #28]
5e474: e3530000 cmp r3, #0
5e478: 11a00004 movne r0, r4
5e47c: 11a0e00f movne lr, pc
5e480: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
5e484: e59d3038 ldr r3, [sp, #56] ; 0x38
5e488: e3530000 cmp r3, #0
5e48c: 0a000004 beq 5e4a4 <_rename_r+0x18c>
5e490: e593301c ldr r3, [r3, #28]
5e494: e3530000 cmp r3, #0
5e498: 11a00007 movne r0, r7
5e49c: 11a0e00f movne lr, pc
5e4a0: 112fff13 bxne r3
return result;
}
5e4a4: e1a00006 mov r0, r6
5e4a8: e28dd048 add sp, sp, #72 ; 0x48
5e4ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
5e4b0: e59d3010 ldr r3, [sp, #16]
5e4b4: e3530000 cmp r3, #0
5e4b8: 0a000004 beq 5e4d0 <_rename_r+0x1b8>
5e4bc: e593301c ldr r3, [r3, #28]
5e4c0: e3530000 cmp r3, #0
5e4c4: 11a00005 movne r0, r5
5e4c8: 11a0e00f movne lr, pc
5e4cc: 112fff13 bxne r3
if ( free_old_parentloc )
5e4d0: e3580000 cmp r8, #0
5e4d4: 0a000007 beq 5e4f8 <_rename_r+0x1e0>
rtems_filesystem_freenode( &old_parent_loc );
5e4d8: e59d3024 ldr r3, [sp, #36] ; 0x24
5e4dc: e3530000 cmp r3, #0
5e4e0: 0a000004 beq 5e4f8 <_rename_r+0x1e0>
5e4e4: e593301c ldr r3, [r3, #28]
5e4e8: e3530000 cmp r3, #0
5e4ec: 11a00004 movne r0, r4
5e4f0: 11a0e00f movne lr, pc
5e4f4: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
5e4f8: e59d3038 ldr r3, [sp, #56] ; 0x38
5e4fc: e3530000 cmp r3, #0
5e500: 0a000004 beq 5e518 <_rename_r+0x200>
5e504: e593301c ldr r3, [r3, #28]
5e508: e3530000 cmp r3, #0
5e50c: 11a00007 movne r0, r7
5e510: 11a0e00f movne lr, pc
5e514: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
5e518: ebff9848 bl 44640 <__errno>
5e51c: e3a03012 mov r3, #18
5e520: e5803000 str r3, [r0]
5e524: e3e06000 mvn r6, #0
5e528: eaffffdd b 5e4a4 <_rename_r+0x18c>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
5e52c: e3580000 cmp r8, #0
5e530: 1a000001 bne 5e53c <_rename_r+0x224>
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
5e534: e3e06000 mvn r6, #0 <== NOT EXECUTED
5e538: eaffffd9 b 5e4a4 <_rename_r+0x18c> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
5e53c: e59d3024 ldr r3, [sp, #36] ; 0x24
5e540: e3530000 cmp r3, #0
5e544: 0afffffa beq 5e534 <_rename_r+0x21c>
5e548: e593301c ldr r3, [r3, #28]
5e54c: e3530000 cmp r3, #0
5e550: 0afffff7 beq 5e534 <_rename_r+0x21c>
5e554: e1a00004 mov r0, r4
5e558: e1a0e00f mov lr, pc
5e55c: e12fff13 bx r3
5e560: e3e06000 mvn r6, #0
5e564: eaffffce b 5e4a4 <_rename_r+0x18c>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
5e568: e28d4018 add r4, sp, #24
5e56c: e3a0c000 mov ip, #0
5e570: e1a00005 mov r0, r5
5e574: e1a01007 mov r1, r7
5e578: e3a02002 mov r2, #2
5e57c: e1a03004 mov r3, r4
5e580: e58dc000 str ip, [sp]
5e584: ebfea5d7 bl 7ce8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
5e588: e3500000 cmp r0, #0
5e58c: 1affffe8 bne 5e534 <_rename_r+0x21c>
5e590: e3a08001 mov r8, #1
5e594: eaffff6d b 5e350 <_rename_r+0x38>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
5e598: e59d3010 ldr r3, [sp, #16]
5e59c: e3530000 cmp r3, #0
5e5a0: 0a000004 beq 5e5b8 <_rename_r+0x2a0>
5e5a4: e593301c ldr r3, [r3, #28]
5e5a8: e3530000 cmp r3, #0
5e5ac: 11a00005 movne r0, r5
5e5b0: 11a0e00f movne lr, pc
5e5b4: 112fff13 bxne r3
if ( free_old_parentloc )
5e5b8: e3580000 cmp r8, #0
5e5bc: 0a000007 beq 5e5e0 <_rename_r+0x2c8>
rtems_filesystem_freenode( &old_parent_loc );
5e5c0: e59d3024 ldr r3, [sp, #36] ; 0x24
5e5c4: e3530000 cmp r3, #0
5e5c8: 0a000004 beq 5e5e0 <_rename_r+0x2c8>
5e5cc: e593301c ldr r3, [r3, #28]
5e5d0: e3530000 cmp r3, #0
5e5d4: 11a00004 movne r0, r4
5e5d8: 11a0e00f movne lr, pc
5e5dc: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
5e5e0: e59d3038 ldr r3, [sp, #56] ; 0x38
5e5e4: e3530000 cmp r3, #0
5e5e8: 0affffd1 beq 5e534 <_rename_r+0x21c>
5e5ec: e593301c ldr r3, [r3, #28]
5e5f0: e3530000 cmp r3, #0
5e5f4: 0affffce beq 5e534 <_rename_r+0x21c>
5e5f8: e1a00007 mov r0, r7
5e5fc: e1a0e00f mov lr, pc
5e600: e12fff13 bx r3
5e604: e3e06000 mvn r6, #0
5e608: eaffffa5 b 5e4a4 <_rename_r+0x18c>
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
5e60c: e593301c ldr r3, [r3, #28]
5e610: e3530000 cmp r3, #0
5e614: 11a00005 movne r0, r5
5e618: 11a0e00f movne lr, pc
5e61c: 112fff13 bxne r3
if ( free_old_parentloc )
5e620: e3580000 cmp r8, #0
5e624: 0a000007 beq 5e648 <_rename_r+0x330>
rtems_filesystem_freenode( &old_parent_loc );
5e628: e59d3024 ldr r3, [sp, #36] ; 0x24
5e62c: e3530000 cmp r3, #0
5e630: 0a000004 beq 5e648 <_rename_r+0x330>
5e634: e593301c ldr r3, [r3, #28]
5e638: e3530000 cmp r3, #0
5e63c: 11a00004 movne r0, r4
5e640: 11a0e00f movne lr, pc
5e644: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
5e648: e59d3038 ldr r3, [sp, #56] ; 0x38
5e64c: e3530000 cmp r3, #0
5e650: 0a000004 beq 5e668 <_rename_r+0x350>
5e654: e593301c ldr r3, [r3, #28]
5e658: e3530000 cmp r3, #0
5e65c: 11a00007 movne r0, r7
5e660: 11a0e00f movne lr, pc
5e664: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTSUP );
5e668: ebff97f4 bl 44640 <__errno>
5e66c: e3a03086 mov r3, #134 ; 0x86
5e670: e5803000 str r3, [r0]
5e674: e3e06000 mvn r6, #0
5e678: eaffff89 b 5e4a4 <_rename_r+0x18c>
00009720 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
9720: e1a00001 mov r0, r1 <== NOT EXECUTED
9724: e1a01002 mov r1, r2 <== NOT EXECUTED
9728: eaffffc2 b 9638 <stat> <== NOT EXECUTED
0000e7c4 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
e7c4: e1a00001 mov r0, r1 <== NOT EXECUTED
e7c8: eaffff6c b e580 <unlink> <== NOT EXECUTED
00028e00 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
28e00: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
28e04: e2505000 subs r5, r0, #0
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
28e08: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
28e0c: 0a000031 beq 28ed8 <chdir+0xd8>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
28e10: eb008918 bl 4b278 <strlen>
28e14: e28d4004 add r4, sp, #4
28e18: e3a0c001 mov ip, #1
28e1c: e1a01000 mov r1, r0
28e20: e1a0200c mov r2, ip
28e24: e1a00005 mov r0, r5
28e28: e1a03004 mov r3, r4
28e2c: e58dc000 str ip, [sp]
28e30: ebff7bac bl 7ce8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
28e34: e3500000 cmp r0, #0
28e38: 1a000024 bne 28ed0 <chdir+0xd0>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
28e3c: e59d2010 ldr r2, [sp, #16]
28e40: e5923010 ldr r3, [r2, #16]
28e44: e3530000 cmp r3, #0
28e48: 0a000018 beq 28eb0 <chdir+0xb0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
28e4c: e1a00004 mov r0, r4
28e50: e1a0e00f mov lr, pc
28e54: e12fff13 bx r3
28e58: e3500001 cmp r0, #1
28e5c: 1a000022 bne 28eec <chdir+0xec>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
28e60: e59f50b8 ldr r5, [pc, #184] ; 28f20 <chdir+0x120>
28e64: e595c000 ldr ip, [r5]
28e68: e59c3010 ldr r3, [ip, #16]
28e6c: e3530000 cmp r3, #0
28e70: 0a000006 beq 28e90 <chdir+0x90>
28e74: e593301c ldr r3, [r3, #28]
28e78: e3530000 cmp r3, #0
28e7c: 0a000003 beq 28e90 <chdir+0x90>
28e80: e28c0004 add r0, ip, #4
28e84: e1a0e00f mov lr, pc
28e88: e12fff13 bx r3
28e8c: e595c000 ldr ip, [r5]
rtems_filesystem_current = loc;
28e90: e8b4000f ldm r4!, {r0, r1, r2, r3}
28e94: e28cc004 add ip, ip, #4
28e98: e8ac000f stmia ip!, {r0, r1, r2, r3}
28e9c: e5943000 ldr r3, [r4]
28ea0: e58c3000 str r3, [ip]
28ea4: e3a00000 mov r0, #0
return 0;
}
28ea8: e28dd018 add sp, sp, #24
28eac: e8bd8030 pop {r4, r5, pc}
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
28eb0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
28eb4: e3530000 cmp r3, #0 <== NOT EXECUTED
28eb8: 11a00004 movne r0, r4 <== NOT EXECUTED
28ebc: 11a0e00f movne lr, pc <== NOT EXECUTED
28ec0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
28ec4: eb006ddd bl 44640 <__errno> <== NOT EXECUTED
28ec8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
28ecc: e5803000 str r3, [r0] <== NOT EXECUTED
28ed0: e3e00000 mvn r0, #0
28ed4: eafffff3 b 28ea8 <chdir+0xa8>
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
28ed8: eb006dd8 bl 44640 <__errno>
28edc: e3a0300e mov r3, #14
28ee0: e5803000 str r3, [r0]
28ee4: e3e00000 mvn r0, #0
28ee8: eaffffee b 28ea8 <chdir+0xa8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
28eec: e59d3010 ldr r3, [sp, #16]
28ef0: e3530000 cmp r3, #0
28ef4: 0a000004 beq 28f0c <chdir+0x10c>
28ef8: e593301c ldr r3, [r3, #28]
28efc: e3530000 cmp r3, #0
28f00: 11a00004 movne r0, r4
28f04: 11a0e00f movne lr, pc
28f08: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
28f0c: eb006dcb bl 44640 <__errno>
28f10: e3a03014 mov r3, #20
28f14: e5803000 str r3, [r0]
28f18: e3e00000 mvn r0, #0
28f1c: eaffffe1 b 28ea8 <chdir+0xa8>
000077a8 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
77a8: e92d4070 push {r4, r5, r6, lr}
77ac: e24dd018 sub sp, sp, #24
77b0: e1a05001 mov r5, r1
77b4: e1a06000 mov r6, r0
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
77b8: eb010eae bl 4b278 <strlen>
77bc: e28d4004 add r4, sp, #4
77c0: e1a01000 mov r1, r0
77c4: e3a0c001 mov ip, #1
77c8: e1a00006 mov r0, r6
77cc: e3a02000 mov r2, #0
77d0: e1a03004 mov r3, r4
77d4: e58dc000 str ip, [sp]
77d8: eb000142 bl 7ce8 <rtems_filesystem_evaluate_path>
if ( status != 0 )
77dc: e3500000 cmp r0, #0
77e0: 1a000020 bne 7868 <chmod+0xc0>
return -1;
if ( !loc.handlers ){
77e4: e59d300c ldr r3, [sp, #12]
77e8: e3530000 cmp r3, #0
77ec: 0a000012 beq 783c <chmod+0x94>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
77f0: e593301c ldr r3, [r3, #28]
77f4: e3530000 cmp r3, #0
77f8: 0a00001c beq 7870 <chmod+0xc8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
77fc: e1a01005 mov r1, r5
7800: e1a00004 mov r0, r4
7804: e1a0e00f mov lr, pc
7808: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
780c: e59d3010 ldr r3, [sp, #16]
7810: e3530000 cmp r3, #0
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
7814: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
7818: 0a000004 beq 7830 <chmod+0x88>
781c: e593301c ldr r3, [r3, #28]
7820: e3530000 cmp r3, #0
7824: 11a00004 movne r0, r4
7828: 11a0e00f movne lr, pc
782c: 112fff13 bxne r3
return result;
}
7830: e1a00005 mov r0, r5
7834: e28dd018 add sp, sp, #24
7838: e8bd8070 pop {r4, r5, r6, pc}
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
783c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
7840: e3530000 cmp r3, #0 <== NOT EXECUTED
7844: 0a000004 beq 785c <chmod+0xb4> <== NOT EXECUTED
7848: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
784c: e3530000 cmp r3, #0 <== NOT EXECUTED
7850: 11a00004 movne r0, r4 <== NOT EXECUTED
7854: 11a0e00f movne lr, pc <== NOT EXECUTED
7858: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
785c: eb00f377 bl 44640 <__errno> <== NOT EXECUTED
7860: e3a03009 mov r3, #9 <== NOT EXECUTED
7864: e5803000 str r3, [r0] <== NOT EXECUTED
7868: e3e05000 mvn r5, #0
786c: eaffffef b 7830 <chmod+0x88>
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
7870: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
7874: e3530000 cmp r3, #0 <== NOT EXECUTED
7878: 0a000004 beq 7890 <chmod+0xe8> <== NOT EXECUTED
787c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
7880: e3530000 cmp r3, #0 <== NOT EXECUTED
7884: 11a00004 movne r0, r4 <== NOT EXECUTED
7888: 11a0e00f movne lr, pc <== NOT EXECUTED
788c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
7890: eb00f36a bl 44640 <__errno> <== NOT EXECUTED
7894: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
7898: e5803000 str r3, [r0] <== NOT EXECUTED
789c: e3e05000 mvn r5, #0 <== NOT EXECUTED
78a0: eaffffe2 b 7830 <chmod+0x88> <== NOT EXECUTED
00028f24 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
28f24: e92d40f0 push {r4, r5, r6, r7, lr}
28f28: e1a01801 lsl r1, r1, #16
28f2c: e24dd018 sub sp, sp, #24
28f30: e1a02802 lsl r2, r2, #16
28f34: e1a06821 lsr r6, r1, #16
28f38: e1a05822 lsr r5, r2, #16
28f3c: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
28f40: eb0088cc bl 4b278 <strlen>
28f44: e28d4004 add r4, sp, #4
28f48: e1a01000 mov r1, r0
28f4c: e3a0c001 mov ip, #1
28f50: e1a00007 mov r0, r7
28f54: e3a02000 mov r2, #0
28f58: e1a03004 mov r3, r4
28f5c: e58dc000 str ip, [sp]
28f60: ebff7b60 bl 7ce8 <rtems_filesystem_evaluate_path>
28f64: e3500000 cmp r0, #0
28f68: 1a00001c bne 28fe0 <chown+0xbc>
return -1;
if ( !loc.ops->chown_h ) {
28f6c: e59d2010 ldr r2, [sp, #16]
28f70: e5923018 ldr r3, [r2, #24]
28f74: e3530000 cmp r3, #0
28f78: 0a000010 beq 28fc0 <chown+0x9c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
28f7c: e1a02005 mov r2, r5
28f80: e1a01006 mov r1, r6
28f84: e1a00004 mov r0, r4
28f88: e1a0e00f mov lr, pc
28f8c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
28f90: e59d3010 ldr r3, [sp, #16]
28f94: e3530000 cmp r3, #0
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
28f98: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
28f9c: 0a000004 beq 28fb4 <chown+0x90>
28fa0: e593301c ldr r3, [r3, #28]
28fa4: e3530000 cmp r3, #0
28fa8: 11a00004 movne r0, r4
28fac: 11a0e00f movne lr, pc
28fb0: 112fff13 bxne r3
return result;
}
28fb4: e1a00005 mov r0, r5
28fb8: e28dd018 add sp, sp, #24
28fbc: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
28fc0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
28fc4: e3530000 cmp r3, #0 <== NOT EXECUTED
28fc8: 11a00004 movne r0, r4 <== NOT EXECUTED
28fcc: 11a0e00f movne lr, pc <== NOT EXECUTED
28fd0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
28fd4: eb006d99 bl 44640 <__errno> <== NOT EXECUTED
28fd8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
28fdc: e5803000 str r3, [r0] <== NOT EXECUTED
28fe0: e3e05000 mvn r5, #0
28fe4: eafffff2 b 28fb4 <chown+0x90>
00028fe8 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
28fe8: e92d4070 push {r4, r5, r6, lr}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
28fec: e59f50d8 ldr r5, [pc, #216] ; 290cc <chroot+0xe4>
28ff0: e59f30d8 ldr r3, [pc, #216] ; 290d0 <chroot+0xe8>
28ff4: e5954000 ldr r4, [r5]
28ff8: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
28ffc: e24dd018 sub sp, sp, #24
29000: e1a06000 mov r6, r0
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
29004: 0a000020 beq 2908c <chroot+0xa4>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
29008: e1a00006 mov r0, r6
2900c: ebffff7b bl 28e00 <chdir>
if (result) {
29010: e250c000 subs ip, r0, #0
29014: 1a000025 bne 290b0 <chroot+0xc8>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
29018: e28d4004 add r4, sp, #4
2901c: e1a0200c mov r2, ip
29020: e59f00ac ldr r0, [pc, #172] ; 290d4 <chroot+0xec>
29024: e3a01001 mov r1, #1
29028: e1a03004 mov r3, r4
2902c: e58dc000 str ip, [sp]
29030: ebff7b2c bl 7ce8 <rtems_filesystem_evaluate_path>
29034: e3500000 cmp r0, #0
29038: 1a00001c bne 290b0 <chroot+0xc8>
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
2903c: e595c000 ldr ip, [r5]
29040: e59c3024 ldr r3, [ip, #36] ; 0x24
29044: e3530000 cmp r3, #0
29048: 0a000007 beq 2906c <chroot+0x84>
2904c: e593301c ldr r3, [r3, #28]
29050: e3530000 cmp r3, #0
29054: 0a000004 beq 2906c <chroot+0x84>
29058: e28c0018 add r0, ip, #24
2905c: e1a0e00f mov lr, pc
29060: e12fff13 bx r3
29064: e59f3060 ldr r3, [pc, #96] ; 290cc <chroot+0xe4>
29068: e593c000 ldr ip, [r3]
rtems_filesystem_root = loc;
2906c: e8b4000f ldm r4!, {r0, r1, r2, r3}
29070: e28cc018 add ip, ip, #24
29074: e8ac000f stmia ip!, {r0, r1, r2, r3}
29078: e5943000 ldr r3, [r4]
2907c: e58c3000 str r3, [ip]
29080: e3a00000 mov r0, #0
return 0;
}
29084: e28dd018 add sp, sp, #24
29088: e8bd8070 pop {r4, r5, r6, pc}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
2908c: eb0005d3 bl 2a7e0 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
29090: e5953000 ldr r3, [r5]
29094: e1530004 cmp r3, r4
29098: 1affffda bne 29008 <chroot+0x20>
rtems_set_errno_and_return_minus_one( ENOTSUP );
2909c: eb006d67 bl 44640 <__errno> <== NOT EXECUTED
290a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
290a4: e5803000 str r3, [r0] <== NOT EXECUTED
290a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
290ac: eafffff4 b 29084 <chroot+0x9c> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
290b0: eb006d62 bl 44640 <__errno> <== NOT EXECUTED
290b4: e1a04000 mov r4, r0 <== NOT EXECUTED
290b8: eb006d60 bl 44640 <__errno> <== NOT EXECUTED
290bc: e5903000 ldr r3, [r0] <== NOT EXECUTED
290c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
290c4: e5843000 str r3, [r4] <== NOT EXECUTED
290c8: eaffffed b 29084 <chroot+0x9c> <== NOT EXECUTED
00002334 <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2334: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2338: e59f61a0 ldr r6, [pc, #416] ; 24e0 <create_disk+0x1ac>
233c: e5967000 ldr r7, [r6]
2340: e1500007 cmp r0, r7
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2344: e24dd004 sub sp, sp, #4
2348: e1a05000 mov r5, r0
234c: e1a04001 mov r4, r1
2350: e1a09002 mov r9, r2
2354: e1a0b003 mov fp, r3
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2358: 35968004 ldrcc r8, [r6, #4]
235c: 2a000043 bcs 2470 <create_disk+0x13c>
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
disktab_size = new_size;
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
2360: e7987185 ldr r7, [r8, r5, lsl #3]
2364: e1a0a185 lsl sl, r5, #3
2368: e3570000 cmp r7, #0
236c: e088800a add r8, r8, sl
2370: 05988004 ldreq r8, [r8, #4]
2374: 0a000026 beq 2414 <create_disk+0xe0>
2378: e5988004 ldr r8, [r8, #4]
237c: e1540008 cmp r4, r8
2380: 2a000023 bcs 2414 <create_disk+0xe0>
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
2384: e0976104 adds r6, r7, r4, lsl #2
2388: 0a000048 beq 24b0 <create_disk+0x17c>
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
238c: e7973104 ldr r3, [r7, r4, lsl #2]
2390: e3530000 cmp r3, #0
2394: 13a0000c movne r0, #12
2398: 0a000001 beq 23a4 <create_disk+0x70>
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
239c: e28dd004 add sp, sp, #4
23a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
23a4: e3a00034 mov r0, #52 ; 0x34
23a8: eb00042d bl 3464 <malloc>
if (dd == NULL) {
23ac: e2507000 subs r7, r0, #0
23b0: 0a00003e beq 24b0 <create_disk+0x17c>
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
23b4: e3590000 cmp r9, #0
23b8: 0a00000c beq 23f0 <create_disk+0xbc>
alloc_name = strdup(name);
23bc: e1a00009 mov r0, r9
23c0: eb004856 bl 14520 <strdup>
if (alloc_name == NULL) {
23c4: e3500000 cmp r0, #0
if (dd == NULL) {
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
alloc_name = strdup(name);
23c8: e1a08000 mov r8, r0
23cc: e1a09000 mov r9, r0
if (alloc_name == NULL) {
23d0: 0a00003e beq 24d0 <create_disk+0x19c>
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
23d4: e3a01c61 mov r1, #24832 ; 0x6100
23d8: e28110ff add r1, r1, #255 ; 0xff
23dc: e1a02005 mov r2, r5
23e0: e1a03004 mov r3, r4
23e4: eb000461 bl 3570 <mknod>
23e8: e3500000 cmp r0, #0
23ec: ba000031 blt 24b8 <create_disk+0x184>
}
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
23f0: e3a00000 mov r0, #0
dd->deleted = false;
*dd_entry = dd;
23f4: e5867000 str r7, [r6]
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
23f8: e5875000 str r5, [r7]
dd->name = alloc_name;
dd->uses = 0;
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
23fc: e58b7000 str r7, [fp]
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
2400: e5874004 str r4, [r7, #4]
dd->name = alloc_name;
2404: e5879010 str r9, [r7, #16]
dd->uses = 0;
2408: e5870014 str r0, [r7, #20]
dd->deleted = false;
240c: e5c70030 strb r0, [r7, #48] ; 0x30
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
2410: eaffffe1 b 239c <create_disk+0x68>
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
2414: e3580000 cmp r8, #0
2418: 03a03008 moveq r3, #8
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
241c: 11a03088 lslne r3, r8, #1
}
if (minor >= new_size) {
2420: e1540003 cmp r4, r3
new_size = minor + 1;
2424: 22843001 addcs r3, r4, #1
}
table = realloc(table, new_size * sizeof(*table));
2428: e1a00007 mov r0, r7
242c: e1a01103 lsl r1, r3, #2
2430: e58d3000 str r3, [sp]
2434: eb0006f3 bl 4008 <realloc>
if (table == NULL) {
2438: e2507000 subs r7, r0, #0
243c: e59d3000 ldr r3, [sp]
2440: 0a00001a beq 24b0 <create_disk+0x17c>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2444: e0682003 rsb r2, r8, r3
2448: e1a02102 lsl r2, r2, #2
244c: e0870108 add r0, r7, r8, lsl #2
2450: e3a01000 mov r1, #0
2454: eb0046b6 bl 13f34 <memset>
disktab [major].minor = table;
2458: e5962004 ldr r2, [r6, #4]
disktab [major].size = new_size;
245c: e59d3000 ldr r3, [sp]
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
2460: e082a00a add sl, r2, sl
disktab [major].size = new_size;
2464: e58a3004 str r3, [sl, #4]
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
2468: e7827185 str r7, [r2, r5, lsl #3]
246c: eaffffc4 b 2384 <create_disk+0x50>
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
2470: e1a0a087 lsl sl, r7, #1
if (major >= new_size) {
2474: e150000a cmp r0, sl
new_size = major + 1;
2478: 2285a001 addcs sl, r5, #1
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
247c: e5960004 ldr r0, [r6, #4]
if (major >= new_size) {
new_size = major + 1;
}
table = realloc(table, new_size * sizeof(*table));
2480: e1a0118a lsl r1, sl, #3
2484: eb0006df bl 4008 <realloc>
if (table == NULL) {
2488: e2508000 subs r8, r0, #0
248c: 0a000007 beq 24b0 <create_disk+0x17c>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2490: e067200a rsb r2, r7, sl <== NOT EXECUTED
2494: e0880187 add r0, r8, r7, lsl #3 <== NOT EXECUTED
2498: e1a02182 lsl r2, r2, #3 <== NOT EXECUTED
249c: e3a01000 mov r1, #0 <== NOT EXECUTED
24a0: eb0046a3 bl 13f34 <memset> <== NOT EXECUTED
disktab = table;
disktab_size = new_size;
24a4: e586a000 str sl, [r6] <== NOT EXECUTED
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
24a8: e5868004 str r8, [r6, #4] <== NOT EXECUTED
24ac: eaffffab b 2360 <create_disk+0x2c> <== NOT EXECUTED
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
24b0: e3a0001a mov r0, #26
24b4: eaffffb8 b 239c <create_disk+0x68>
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
24b8: e1a00008 mov r0, r8 <== NOT EXECUTED
24bc: eb00030f bl 3100 <free> <== NOT EXECUTED
free(dd);
24c0: e1a00007 mov r0, r7 <== NOT EXECUTED
24c4: eb00030d bl 3100 <free> <== NOT EXECUTED
24c8: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
24cc: eaffffb2 b 239c <create_disk+0x68> <== NOT EXECUTED
if (name != NULL) {
alloc_name = strdup(name);
if (alloc_name == NULL) {
free(dd);
24d0: e1a00007 mov r0, r7 <== NOT EXECUTED
24d4: eb000309 bl 3100 <free> <== NOT EXECUTED
24d8: e3a0001a mov r0, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
24dc: eaffffae b 239c <create_disk+0x68> <== NOT EXECUTED
000089b0 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
89b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
89b4: e3d2a007 bics sl, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
89b8: e1a09000 mov r9, r0
89bc: e1a04001 mov r4, r1
89c0: e1a0b003 mov fp, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
89c4: 1a000028 bne 8a6c <devFS_evaluate_path+0xbc>
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
89c8: e5937000 ldr r7, [r3]
if (!device_name_table)
89cc: e3570000 cmp r7, #0
89d0: 0a00002a beq 8a80 <devFS_evaluate_path+0xd0>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
89d4: e59f30b8 ldr r3, [pc, #184] ; 8a94 <devFS_evaluate_path+0xe4>
89d8: e5938000 ldr r8, [r3]
89dc: e3580000 cmp r8, #0
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
89e0: 11a0500a movne r5, sl
for (i = 0; i < rtems_device_table_size; i++) {
89e4: 0a000011 beq 8a30 <devFS_evaluate_path+0x80>
if (!device_name_table[i].device_name)
89e8: e08aa10a add sl, sl, sl, lsl #2
89ec: e797610a ldr r6, [r7, sl, lsl #2]
89f0: e3560000 cmp r6, #0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
89f4: e1a00009 mov r0, r9
89f8: e1a02004 mov r2, r4
89fc: e1a01006 mov r1, r6
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8a00: e2855001 add r5, r5, #1
if (!device_name_table[i].device_name)
8a04: e087a10a add sl, r7, sl, lsl #2
8a08: 0a000005 beq 8a24 <devFS_evaluate_path+0x74>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8a0c: eb000d69 bl bfb8 <strncmp>
8a10: e3500000 cmp r0, #0
8a14: 1a000002 bne 8a24 <devFS_evaluate_path+0x74>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8a18: e7d60004 ldrb r0, [r6, r4]
8a1c: e3500000 cmp r0, #0
8a20: 0a000007 beq 8a44 <devFS_evaluate_path+0x94>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8a24: e1580005 cmp r8, r5
8a28: e1a0a005 mov sl, r5
8a2c: 8affffed bhi 89e8 <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
8a30: eb0009aa bl b0e0 <__errno>
8a34: e3a03002 mov r3, #2
8a38: e5803000 str r3, [r0]
8a3c: e3e00000 mvn r0, #0
}
8a40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8a44: e59f304c ldr r3, [pc, #76] ; 8a98 <devFS_evaluate_path+0xe8>
8a48: e5933000 ldr r3, [r3]
8a4c: e5933028 ldr r3, [r3, #40] ; 0x28
8a50: e58b3010 str r3, [fp, #16]
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8a54: e59f3040 ldr r3, [pc, #64] ; 8a9c <devFS_evaluate_path+0xec>
8a58: e58b3008 str r3, [fp, #8]
pathloc->ops = &devFS_ops;
8a5c: e59f303c ldr r3, [pc, #60] ; 8aa0 <devFS_evaluate_path+0xf0>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
8a60: e58ba000 str sl, [fp]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
8a64: e58b300c str r3, [fp, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
8a68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
8a6c: eb00099b bl b0e0 <__errno> <== NOT EXECUTED
8a70: e3a03001 mov r3, #1 <== NOT EXECUTED
8a74: e5803000 str r3, [r0] <== NOT EXECUTED
8a78: e3e00000 mvn r0, #0 <== NOT EXECUTED
8a7c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
8a80: eb000996 bl b0e0 <__errno> <== NOT EXECUTED
8a84: e3a0300e mov r3, #14 <== NOT EXECUTED
8a88: e5803000 str r3, [r0] <== NOT EXECUTED
8a8c: e3e00000 mvn r0, #0 <== NOT EXECUTED
8a90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000137c <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
137c: e92d4070 push {r4, r5, r6, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
1380: e59f605c ldr r6, [pc, #92] ; 13e4 <devFS_initialize+0x68>
1384: e5963000 ldr r3, [r6]
1388: e0833103 add r3, r3, r3, lsl #2
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
138c: e1a04000 mov r4, r0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
1390: e1a00103 lsl r0, r3, #2
1394: eb001c55 bl 84f0 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
1398: e2505000 subs r5, r0, #0
139c: 0a00000b beq 13d0 <devFS_initialize+0x54>
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
13a0: e5962000 ldr r2, [r6]
13a4: e0822102 add r2, r2, r2, lsl #2
13a8: e1a02102 lsl r2, r2, #2
13ac: e3a01000 mov r1, #0
13b0: eb002978 bl b998 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
13b4: e59f302c ldr r3, [pc, #44] ; 13e8 <devFS_initialize+0x6c>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
13b8: e2832038 add r2, r3, #56 ; 0x38
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
13bc: e584501c str r5, [r4, #28]
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
13c0: e5842028 str r2, [r4, #40] ; 0x28
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
13c4: e5843024 str r3, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
13c8: e3a00000 mov r0, #0
return 0;
}
13cc: e8bd8070 pop {r4, r5, r6, pc}
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
13d0: eb002742 bl b0e0 <__errno> <== NOT EXECUTED
13d4: e3a0300c mov r3, #12 <== NOT EXECUTED
13d8: e5803000 str r3, [r0] <== NOT EXECUTED
13dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
13e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00001558 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
1558: e52de004 push {lr} ; (str lr, [sp, #-4]!)
155c: e24dd010 sub sp, sp, #16
1560: e1a03000 mov r3, r0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.command = command;
1564: e58d1004 str r1, [sp, #4]
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
1568: e5900038 ldr r0, [r0, #56] ; 0x38
args.iop = iop;
args.command = command;
args.buffer = buffer;
156c: e58d2008 str r2, [sp, #8]
status = rtems_io_control(
1570: e590100c ldr r1, [r0, #12]
1574: e1a0200d mov r2, sp
1578: e5900008 ldr r0, [r0, #8]
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
157c: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
1580: eb00107e bl 5780 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
1584: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
1588: 059d000c ldreq r0, [sp, #12]
np->major,
np->minor,
(void *) &args
);
if ( status )
158c: 1a000001 bne 1598 <devFS_ioctl+0x40>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
1590: e28dd010 add sp, sp, #16
1594: e8bd8000 pop {pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
1598: eb001d41 bl 8aa4 <rtems_deviceio_errno> <== NOT EXECUTED
159c: eafffffb b 1590 <devFS_ioctl+0x38> <== NOT EXECUTED
000013ec <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
13ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
13f0: e1a04000 mov r4, r0
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
13f4: e5d00000 ldrb r0, [r0]
13f8: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
13fc: e1a05001 mov r5, r1
1400: e1a06002 mov r6, r2
1404: e1a0b003 mov fp, r3
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
1408: 0a000036 beq 14e8 <devFS_mknod+0xfc>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
140c: e2053a0f and r3, r5, #61440 ; 0xf000
1410: e3530a02 cmp r3, #8192 ; 0x2000
1414: 13530a06 cmpne r3, #24576 ; 0x6000
1418: 03a03000 moveq r3, #0
141c: 13a03001 movne r3, #1
1420: 1a00003a bne 1510 <devFS_mknod+0x124>
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
1424: e59d2024 ldr r2, [sp, #36] ; 0x24
1428: e5928000 ldr r8, [r2]
if (!device_name_table)
142c: e3580000 cmp r8, #0
1430: 0a000040 beq 1538 <devFS_mknod+0x14c>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
1434: e59f2110 ldr r2, [pc, #272] ; 154c <devFS_mknod+0x160>
1438: e592a000 ldr sl, [r2]
143c: e35a0000 cmp sl, #0
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
1440: 13e09000 mvnne r9, #0
1444: 11a07003 movne r7, r3
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
1448: 1a000007 bne 146c <devFS_mknod+0x80>
144c: ea000034 b 1524 <devFS_mknod+0x138> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
1450: eb0029f8 bl bc38 <strcmp> <== NOT EXECUTED
1454: e3500000 cmp r0, #0 <== NOT EXECUTED
1458: 0a00001d beq 14d4 <devFS_mknod+0xe8> <== NOT EXECUTED
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
145c: e2877001 add r7, r7, #1 <== NOT EXECUTED
1460: e157000a cmp r7, sl <== NOT EXECUTED
1464: e1a03007 mov r3, r7 <== NOT EXECUTED
1468: 2a000009 bcs 1494 <devFS_mknod+0xa8> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
146c: e0833103 add r3, r3, r3, lsl #2
1470: e7983103 ldr r3, [r8, r3, lsl #2]
1474: e2531000 subs r1, r3, #0
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
1478: e1a00004 mov r0, r4
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
147c: 1afffff3 bne 1450 <devFS_mknod+0x64>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
1480: e1a09007 mov r9, r7
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
1484: e2877001 add r7, r7, #1
1488: e157000a cmp r7, sl
148c: e1a03007 mov r3, r7
1490: 3afffff5 bcc 146c <devFS_mknod+0x80>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
1494: e3790001 cmn r9, #1
1498: 0a000021 beq 1524 <devFS_mknod+0x138>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
149c: e10f7000 mrs r7, CPSR
14a0: e3873080 orr r3, r7, #128 ; 0x80
14a4: e129f003 msr CPSR_fc, r3
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
14a8: e0899109 add r9, r9, r9, lsl #2
14ac: e1a09109 lsl r9, r9, #2
14b0: e7884009 str r4, [r8, r9]
device_name_table[slot].device_name_length = strlen(path);
14b4: e1a00004 mov r0, r4
14b8: eb002aa6 bl bf58 <strlen>
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
14bc: e0888009 add r8, r8, r9
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
14c0: e5885010 str r5, [r8, #16]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
14c4: e9880841 stmib r8, {r0, r6, fp}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
14c8: e129f007 msr CPSR_fc, r7
14cc: e3a00000 mov r0, #0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
14d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
14d4: eb002701 bl b0e0 <__errno> <== NOT EXECUTED
14d8: e3a03011 mov r3, #17 <== NOT EXECUTED
14dc: e5803000 str r3, [r0] <== NOT EXECUTED
14e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
14e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
14e8: e5d43001 ldrb r3, [r4, #1]
14ec: e3530065 cmp r3, #101 ; 0x65
14f0: 1affffc5 bne 140c <devFS_mknod+0x20>
(path[2] == 'v') && (path[3] == '\0'))
14f4: e5d43002 ldrb r3, [r4, #2]
14f8: e3530076 cmp r3, #118 ; 0x76
14fc: 1affffc2 bne 140c <devFS_mknod+0x20>
1500: e5d40003 ldrb r0, [r4, #3]
1504: e3500000 cmp r0, #0
1508: 1affffbf bne 140c <devFS_mknod+0x20>
150c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
1510: eb0026f2 bl b0e0 <__errno> <== NOT EXECUTED
1514: e3a03016 mov r3, #22 <== NOT EXECUTED
1518: e5803000 str r3, [r0] <== NOT EXECUTED
151c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1520: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
1524: eb0026ed bl b0e0 <__errno> <== NOT EXECUTED
1528: e3a0300c mov r3, #12 <== NOT EXECUTED
152c: e5803000 str r3, [r0] <== NOT EXECUTED
1530: e3e00000 mvn r0, #0 <== NOT EXECUTED
1534: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
1538: eb0026e8 bl b0e0 <__errno> <== NOT EXECUTED
153c: e3a0300e mov r3, #14 <== NOT EXECUTED
1540: e5803000 str r3, [r0] <== NOT EXECUTED
1544: e3e00000 mvn r0, #0 <== NOT EXECUTED
1548: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000015e0 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
15e0: e92d4800 push {fp, lr} <== NOT EXECUTED
15e4: e1a03000 mov r3, r0 <== NOT EXECUTED
15e8: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
15ec: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
15f0: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
15f4: e3a02000 mov r2, #0 <== NOT EXECUTED
15f8: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
15fc: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
1600: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
1604: e283c00c add ip, r3, #12 <== NOT EXECUTED
1608: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
160c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
1610: e2820008 add r0, r2, #8 <== NOT EXECUTED
1614: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
1618: e1a0200d mov r2, sp <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
161c: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
1620: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
1624: eb0010b7 bl 5908 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
1628: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
162c: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
1630: 1a000001 bne 163c <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
1634: e28dd01c add sp, sp, #28 <== NOT EXECUTED
1638: e8bd8800 pop {fp, pc} <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
163c: eb001d18 bl 8aa4 <rtems_deviceio_errno> <== NOT EXECUTED
1640: eafffffb b 1634 <devFS_read+0x54> <== NOT EXECUTED
00001644 <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
1644: e5903000 ldr r3, [r0]
if (!the_dev)
1648: e3530000 cmp r3, #0
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
164c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
1650: 0a000007 beq 1674 <devFS_stat+0x30>
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
1654: e5930010 ldr r0, [r3, #16]
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
1658: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
165c: e5933008 ldr r3, [r3, #8]
1660: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
1664: e581000c str r0, [r1, #12]
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
1668: e5813018 str r3, [r1, #24]
buf->st_mode = the_dev->mode;
166c: e3a00000 mov r0, #0
return 0;
}
1670: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
1674: eb002699 bl b0e0 <__errno> <== NOT EXECUTED
1678: e3a0300e mov r3, #14 <== NOT EXECUTED
167c: e5803000 str r3, [r0] <== NOT EXECUTED
1680: e3e00000 mvn r0, #0 <== NOT EXECUTED
1684: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00001688 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
1688: e92d4800 push {fp, lr}
168c: e1a03000 mov r3, r0
1690: e24dd01c sub sp, sp, #28
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
1694: e5900014 ldr r0, [r0, #20]
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
1698: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
169c: e3a02000 mov r2, #0
16a0: e58d2018 str r2, [sp, #24]
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
16a4: e58d0014 str r0, [sp, #20]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
16a8: e5932038 ldr r2, [r3, #56] ; 0x38
args.iop = iop;
args.offset = iop->offset;
16ac: e283c00c add ip, r3, #12
16b0: e89c1800 ldm ip, {fp, ip}
args.buffer = (void *) buffer;
16b4: e58d100c str r1, [sp, #12]
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
16b8: e2820008 add r0, r2, #8
16bc: e8900003 ldm r0, {r0, r1}
16c0: e1a0200d mov r2, sp
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
16c4: e98d1800 stmib sp, {fp, ip}
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
16c8: e58d3000 str r3, [sp]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
16cc: eb0010a1 bl 5958 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
16d0: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
16d4: 059d0018 ldreq r0, [sp, #24]
np->major,
np->minor,
(void *) &args
);
if ( status )
16d8: 1a000001 bne 16e4 <devFS_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
16dc: e28dd01c add sp, sp, #28
16e0: e8bd8800 pop {fp, pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
16e4: eb001cee bl 8aa4 <rtems_deviceio_errno> <== NOT EXECUTED
16e8: eafffffb b 16dc <devFS_write+0x54> <== NOT EXECUTED
0000def0 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
def0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
def4: e24dd010 sub sp, sp, #16
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
def8: e88d0007 stm sp, {r0, r1, r2}
the_jnode = iop->file_info;
defc: e5903038 ldr r3, [r0, #56] ; 0x38
status = rtems_io_control(
df00: e1a0200d mov r2, sp
df04: e2830050 add r0, r3, #80 ; 0x50
df08: e8900003 ldm r0, {r0, r1}
df0c: eb0004ee bl f2cc <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
df10: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
df14: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
df18: 1a000001 bne df24 <device_ioctl+0x34>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
df1c: e28dd010 add sp, sp, #16
df20: e8bd8000 pop {pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
df24: eb0005a2 bl f5b4 <rtems_deviceio_errno> <== NOT EXECUTED
df28: eafffffb b df1c <device_ioctl+0x2c> <== NOT EXECUTED
0000df8c <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
df8c: e92d4800 push {fp, lr}
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
df90: e5903014 ldr r3, [r0, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
df94: e280c00c add ip, r0, #12
df98: e89c1800 ldm ip, {fp, ip}
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
df9c: e24dd01c sub sp, sp, #28
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
dfa0: e58d3014 str r3, [sp, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
dfa4: e98d1800 stmib sp, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
dfa8: e3a03000 mov r3, #0
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
dfac: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
dfb0: e58d3018 str r3, [sp, #24]
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
dfb4: e58d100c str r1, [sp, #12]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
dfb8: e58d0000 str r0, [sp]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
dfbc: e5903038 ldr r3, [r0, #56] ; 0x38
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
dfc0: e1a0200d mov r2, sp
dfc4: e2830050 add r0, r3, #80 ; 0x50
dfc8: e8900003 ldm r0, {r0, r1}
dfcc: eb0004e6 bl f36c <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
dfd0: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
dfd4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
dfd8: 1a000001 bne dfe4 <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
dfdc: e28dd01c add sp, sp, #28 <== NOT EXECUTED
dfe0: e8bd8800 pop {fp, pc} <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
dfe4: eb000572 bl f5b4 <rtems_deviceio_errno> <== NOT EXECUTED
dfe8: eafffffb b dfdc <device_read+0x50> <== NOT EXECUTED
0000df2c <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
df2c: e92d4800 push {fp, lr}
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
df30: e5903014 ldr r3, [r0, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
df34: e280c00c add ip, r0, #12
df38: e89c1800 ldm ip, {fp, ip}
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
df3c: e24dd01c sub sp, sp, #28
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
df40: e58d3014 str r3, [sp, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
df44: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
df48: e3a03000 mov r3, #0
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
df4c: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
df50: e58d3018 str r3, [sp, #24]
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
df54: e58d100c str r1, [sp, #12]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
df58: e58d0000 str r0, [sp]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
df5c: e5903038 ldr r3, [r0, #56] ; 0x38
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
df60: e1a0200d mov r2, sp
df64: e2830050 add r0, r3, #80 ; 0x50
df68: e8900003 ldm r0, {r0, r1}
df6c: eb000512 bl f3bc <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
df70: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
df74: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
df78: 1a000001 bne df84 <device_write+0x58>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
df7c: e28dd01c add sp, sp, #28
df80: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
df84: eb00058a bl f5b4 <rtems_deviceio_errno> <== NOT EXECUTED
df88: eafffffb b df7c <device_write+0x50> <== NOT EXECUTED
00001f6c <disk_unlock>:
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
1f6c: e59f3028 ldr r3, [pc, #40] ; 1f9c <disk_unlock+0x30>
1f70: e3a02000 mov r2, #0
}
}
static void
disk_unlock(void)
{
1f74: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
1f78: e5930008 ldr r0, [r3, #8]
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
1f7c: e5c3200c strb r2, [r3, #12]
sc = rtems_semaphore_release(diskdevs_mutex);
1f80: eb00132c bl 6c38 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
1f84: e3500000 cmp r0, #0
1f88: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
1f8c: e3e00585 mvn r0, #557842432 ; 0x21400000 <== NOT EXECUTED
1f90: e2400949 sub r0, r0, #1196032 ; 0x124000 <== NOT EXECUTED
1f94: e2400e11 sub r0, r0, #272 ; 0x110 <== NOT EXECUTED
1f98: eb001457 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
00003e2c <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3e2c: e59030b4 ldr r3, [r0, #180] ; 0xb4
3e30: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
3e34: e92d4030 push {r4, r5, lr}
3e38: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3e3c: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3e40: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3e44: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3e48: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
3e4c: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED
3e50: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED
3e54: e1510002 cmp r1, r2 <== NOT EXECUTED
3e58: 0a00000f beq 3e9c <drainOutput+0x70> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3e5c: e3a05002 mov r5, #2 <== NOT EXECUTED
3e60: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3e64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3e68: e3a01000 mov r1, #0 <== NOT EXECUTED
3e6c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
3e70: e1a02001 mov r2, r1 <== NOT EXECUTED
3e74: eb00064c bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3e78: e3500000 cmp r0, #0 <== NOT EXECUTED
3e7c: 1a000008 bne 3ea4 <drainOutput+0x78> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3e80: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3e84: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3e88: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
3e8c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED
3e90: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED
3e94: e1510002 cmp r1, r2 <== NOT EXECUTED
3e98: 1afffff0 bne 3e60 <drainOutput+0x34> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3e9c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3ea0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
3ea4: eb0007ce bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000279c <dup2>:
int dup2(
int fildes,
int fildes2
)
{
279c: e92d4070 push {r4, r5, r6, lr}
27a0: e24dd048 sub sp, sp, #72 ; 0x48
27a4: e1a05001 mov r5, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
27a8: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
27ac: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
27b0: eb00019c bl 2e28 <fstat>
if ( status == -1 )
27b4: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
27b8: e1a0400d mov r4, sp
if ( status == -1 )
27bc: 1a000002 bne 27cc <dup2+0x30>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
27c0: e3e00000 mvn r0, #0
}
27c4: e28dd048 add sp, sp, #72 ; 0x48
27c8: e8bd8070 pop {r4, r5, r6, pc}
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
27cc: e1a0100d mov r1, sp
27d0: e1a00005 mov r0, r5
27d4: eb000193 bl 2e28 <fstat>
if ( status == -1 )
27d8: e3700001 cmn r0, #1
27dc: 0afffff7 beq 27c0 <dup2+0x24>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
27e0: e1a00006 mov r0, r6 <== NOT EXECUTED
27e4: e1a02005 mov r2, r5 <== NOT EXECUTED
27e8: e3a01000 mov r1, #0 <== NOT EXECUTED
27ec: eb000087 bl 2a10 <fcntl> <== NOT EXECUTED
27f0: eafffff3 b 27c4 <dup2+0x28> <== NOT EXECUTED
0000389c <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
389c: e92d4010 push {r4, lr} <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
38a0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED
38a4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
38a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
38ac: e1a04001 mov r4, r1 <== NOT EXECUTED
38b0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
38b4: 0a000007 beq 38d8 <echo+0x3c> <== NOT EXECUTED
38b8: e59f3060 ldr r3, [pc, #96] ; 3920 <echo+0x84> <== NOT EXECUTED
38bc: e5933000 ldr r3, [r3] <== NOT EXECUTED
38c0: e0833000 add r3, r3, r0 <== NOT EXECUTED
38c4: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
38c8: e2503009 subs r3, r0, #9 <== NOT EXECUTED
38cc: 13a03001 movne r3, #1 <== NOT EXECUTED
38d0: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED
38d4: 1a000003 bne 38e8 <echo+0x4c> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
38d8: e1a01004 mov r1, r4 <== NOT EXECUTED
38dc: ebffff92 bl 372c <oproc> <== NOT EXECUTED
}
}
38e0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
38e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
38e8: e350000a cmp r0, #10 <== NOT EXECUTED
38ec: 0afffff9 beq 38d8 <echo+0x3c> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
38f0: e2203040 eor r3, r0, #64 ; 0x40 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
38f4: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
38f8: e1a0000d mov r0, sp <== NOT EXECUTED
38fc: e3a01002 mov r1, #2 <== NOT EXECUTED
3900: e1a02004 mov r2, r4 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
3904: e5cd3001 strb r3, [sp, #1] <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
3908: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
390c: ebffff3e bl 360c <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
3910: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3914: e2833002 add r3, r3, #2 <== NOT EXECUTED
3918: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
391c: eaffffef b 38e0 <echo+0x44> <== NOT EXECUTED
000294b8 <endgrent>:
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
if (group_fp != NULL)
294b8: e59f300c ldr r3, [pc, #12] ; 294cc <endgrent+0x14> <== NOT EXECUTED
294bc: e5930000 ldr r0, [r3] <== NOT EXECUTED
294c0: e3500000 cmp r0, #0 <== NOT EXECUTED
294c4: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
294c8: ea006ca9 b 44774 <fclose> <== NOT EXECUTED
000294d0 <endpwent>:
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
if (passwd_fp != NULL)
294d0: e59f300c ldr r3, [pc, #12] ; 294e4 <endpwent+0x14> <== NOT EXECUTED
294d4: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
294d8: e3500000 cmp r0, #0 <== NOT EXECUTED
294dc: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
294e0: ea006ca3 b 44774 <fclose> <== NOT EXECUTED
00003924 <erase>:
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
3924: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
3928: e3530000 cmp r3, #0 <== NOT EXECUTED
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
392c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
3930: e1a04000 mov r4, r0 <== NOT EXECUTED
3934: e1a06001 mov r6, r1 <== NOT EXECUTED
if (tty->ccount == 0)
3938: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return;
if (lineFlag) {
393c: e3510000 cmp r1, #0 <== NOT EXECUTED
3940: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED
3944: 1a000025 bne 39e0 <erase+0xbc> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
3948: e59f71d4 ldr r7, [pc, #468] ; 3b24 <erase+0x200> <== NOT EXECUTED
394c: ea000007 b 3970 <erase+0x4c> <== NOT EXECUTED
3950: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED
3954: 1a00005a bne 3ac4 <erase+0x1a0> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
3958: e3560000 cmp r6, #0 <== NOT EXECUTED
395c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
3960: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3964: e3530000 cmp r3, #0 <== NOT EXECUTED
3968: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
396c: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED
unsigned char c = tty->cbuf[--tty->ccount];
3970: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3974: e5843020 str r3, [r4, #32] <== NOT EXECUTED
3978: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
397c: e3120008 tst r2, #8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3980: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3984: 0afffff3 beq 3958 <erase+0x34> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
3988: e3560000 cmp r6, #0 <== NOT EXECUTED
398c: 1a000001 bne 3998 <erase+0x74> <== NOT EXECUTED
3990: e3120010 tst r2, #16 <== NOT EXECUTED
3994: 0a000046 beq 3ab4 <erase+0x190> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
3998: e3550009 cmp r5, #9 <== NOT EXECUTED
399c: 0a000020 beq 3a24 <erase+0x100> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
39a0: e5973000 ldr r3, [r7] <== NOT EXECUTED
39a4: e2855001 add r5, r5, #1 <== NOT EXECUTED
39a8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
39ac: e3130020 tst r3, #32 <== NOT EXECUTED
39b0: 1affffe6 bne 3950 <erase+0x2c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
39b4: e59f016c ldr r0, [pc, #364] ; 3b28 <erase+0x204> <== NOT EXECUTED
39b8: e3a01003 mov r1, #3 <== NOT EXECUTED
39bc: e1a02004 mov r2, r4 <== NOT EXECUTED
39c0: ebffff11 bl 360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
39c4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
39c8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
39cc: 12433001 subne r3, r3, #1 <== NOT EXECUTED
39d0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
}
}
if (!lineFlag)
39d4: e3560000 cmp r6, #0 <== NOT EXECUTED
39d8: 1affffe0 bne 3960 <erase+0x3c> <== NOT EXECUTED
39dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
39e0: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED
39e4: e2121008 ands r1, r2, #8 <== NOT EXECUTED
tty->ccount = 0;
39e8: 05801020 streq r1, [r0, #32] <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
39ec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
39f0: e2121010 ands r1, r2, #16 <== NOT EXECUTED
39f4: 1affffd3 bne 3948 <erase+0x24> <== NOT EXECUTED
tty->ccount = 0;
39f8: e5801020 str r1, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
39fc: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
3a00: e1a01004 mov r1, r4 <== NOT EXECUTED
3a04: ebffffa4 bl 389c <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
3a08: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3a0c: e3130020 tst r3, #32 <== NOT EXECUTED
3a10: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
3a14: e1a01004 mov r1, r4 <== NOT EXECUTED
3a18: e3a0000a mov r0, #10 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
3a1c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
3a20: eaffff9d b 389c <echo> <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3a24: e3530000 cmp r3, #0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
3a28: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3a2c: 0a000011 beq 3a78 <erase+0x154> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3a30: e5978000 ldr r8, [r7] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
3a34: e202ac02 and sl, r2, #512 ; 0x200 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3a38: e3a02000 mov r2, #0 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
3a3c: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
3a40: e3510009 cmp r1, #9 <== NOT EXECUTED
col = (col | 7) + 1;
3a44: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
}
else if (iscntrl (c)) {
3a48: e088c001 add ip, r8, r1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
3a4c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (c == '\t') {
col = (col | 7) + 1;
3a50: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
3a54: 0a000005 beq 3a70 <erase+0x14c> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3a58: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED
3a5c: e3110020 tst r1, #32 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
3a60: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3a64: 0a000001 beq 3a70 <erase+0x14c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
3a68: e35a0000 cmp sl, #0 <== NOT EXECUTED
col += 2;
3a6c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3a70: e1530002 cmp r3, r2 <== NOT EXECUTED
3a74: 1afffff0 bne 3a3c <erase+0x118> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
3a78: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3a7c: e1550003 cmp r5, r3 <== NOT EXECUTED
3a80: aaffffb4 bge 3958 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
3a84: e59f00a0 ldr r0, [pc, #160] ; 3b2c <erase+0x208> <== NOT EXECUTED
3a88: e3a01001 mov r1, #1 <== NOT EXECUTED
3a8c: e1a02004 mov r2, r4 <== NOT EXECUTED
3a90: ebfffedd bl 360c <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
3a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3a98: e2433001 sub r3, r3, #1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
3a9c: e1550003 cmp r5, r3 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
3aa0: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
3aa4: bafffff6 blt 3a84 <erase+0x160> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
3aa8: e3560000 cmp r6, #0 <== NOT EXECUTED
3aac: 1affffab bne 3960 <erase+0x3c> <== NOT EXECUTED
3ab0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
3ab4: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
3ab8: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
3abc: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
3ac0: eaffff75 b 389c <echo> <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
3ac4: e59f005c ldr r0, [pc, #92] ; 3b28 <erase+0x204> <== NOT EXECUTED
3ac8: e3a01003 mov r1, #3 <== NOT EXECUTED
3acc: e1a02004 mov r2, r4 <== NOT EXECUTED
3ad0: ebfffecd bl 360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3ad4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3ad8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3adc: 12433001 subne r3, r3, #1 <== NOT EXECUTED
3ae0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
3ae4: e5973000 ldr r3, [r7] <== NOT EXECUTED
3ae8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
3aec: e3130020 tst r3, #32 <== NOT EXECUTED
3af0: 0affffaf beq 39b4 <erase+0x90> <== NOT EXECUTED
3af4: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED
3af8: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED
3afc: 0affff95 beq 3958 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3b00: e59f0020 ldr r0, [pc, #32] ; 3b28 <erase+0x204> <== NOT EXECUTED
3b04: e3a01003 mov r1, #3 <== NOT EXECUTED
3b08: e1a02004 mov r2, r4 <== NOT EXECUTED
3b0c: ebfffebe bl 360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3b10: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3b14: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3b18: 12433001 subne r3, r3, #1 <== NOT EXECUTED
3b1c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3b20: eaffffab b 39d4 <erase+0xb0> <== NOT EXECUTED
00026324 <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
26324: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
26328: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2632c: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED
26330: e3500000 cmp r0, #0 <== NOT EXECUTED
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
26334: e1a08003 mov r8, r3 <== NOT EXECUTED
26338: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
2633c: e1a06001 mov r6, r1 <== NOT EXECUTED
26340: e1a07002 mov r7, r2 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
26344: 1594307c ldrne r3, [r4, #124] ; 0x7c <== NOT EXECUTED
26348: 1a00000d bne 26384 <fat_buf_access+0x60> <== NOT EXECUTED
{
if (op_type == FAT_OP_TYPE_READ)
2634c: e3520001 cmp r2, #1 <== NOT EXECUTED
26350: 0a000062 beq 264e0 <fat_buf_access+0x1bc> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
26354: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
26358: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
2635c: e1a02006 mov r2, r6 <== NOT EXECUTED
26360: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
26364: ebff7caf bl 5628 <rtems_bdbuf_get> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
26368: e3500000 cmp r0, #0 <== NOT EXECUTED
2636c: 1a00006d bne 26528 <fat_buf_access+0x204> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
26370: e3a03001 mov r3, #1 <== NOT EXECUTED
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
26374: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
26378: e584607c str r6, [r4, #124] ; 0x7c <== NOT EXECUTED
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
2637c: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED
26380: e1a03006 mov r3, r6 <== NOT EXECUTED
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
26384: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
26388: e1520003 cmp r2, r3 <== NOT EXECUTED
2638c: 83a05000 movhi r5, #0 <== NOT EXECUTED
26390: 9a00004d bls 264cc <fat_buf_access+0x1a8> <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
26394: e1560003 cmp r6, r3 <== NOT EXECUTED
26398: 0a000046 beq 264b8 <fat_buf_access+0x194> <== NOT EXECUTED
{
if (fs_info->c.modified)
2639c: e5d4a080 ldrb sl, [r4, #128] ; 0x80 <== NOT EXECUTED
263a0: e35a0000 cmp sl, #0 <== NOT EXECUTED
263a4: 0a000032 beq 26474 <fat_buf_access+0x150> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
263a8: e3550000 cmp r5, #0 <== NOT EXECUTED
263ac: 0a000002 beq 263bc <fat_buf_access+0x98> <== NOT EXECUTED
263b0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
263b4: e3530000 cmp r3, #0 <== NOT EXECUTED
263b8: 0a00004e beq 264f8 <fat_buf_access+0x1d4> <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
263bc: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
263c0: ebff7819 bl 442c <rtems_bdbuf_release_modified> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
263c4: e3a03000 mov r3, #0 <== NOT EXECUTED
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
263c8: e3500000 cmp r0, #0 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
fs_info->c.modified = 0;
263cc: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
263d0: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
263d4: 1a000053 bne 26528 <fat_buf_access+0x204> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
263d8: e3550000 cmp r5, #0 <== NOT EXECUTED
263dc: 0a000029 beq 26488 <fat_buf_access+0x164> <== NOT EXECUTED
263e0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
263e4: e3530000 cmp r3, #0 <== NOT EXECUTED
263e8: 1a000026 bne 26488 <fat_buf_access+0x164> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
263ec: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED
263f0: e3530001 cmp r3, #1 <== NOT EXECUTED
263f4: 9a000023 bls 26488 <fat_buf_access+0x164> <== NOT EXECUTED
263f8: e3a05001 mov r5, #1 <== NOT EXECUTED
263fc: e1a0a00d mov sl, sp <== NOT EXECUTED
26400: ea00000d b 2643c <fat_buf_access+0x118> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
26404: e59d3000 ldr r3, [sp] <== NOT EXECUTED
26408: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
2640c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
26410: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
26414: eb008539 bl 47900 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
26418: e59d0000 ldr r0, [sp] <== NOT EXECUTED
2641c: ebff7802 bl 442c <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26420: e2855001 add r5, r5, #1 <== NOT EXECUTED
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
26424: e3500000 cmp r0, #0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26428: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
2642c: 1a00000b bne 26460 <fat_buf_access+0x13c> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26430: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED
26434: e1530005 cmp r3, r5 <== NOT EXECUTED
26438: 9a000012 bls 26488 <fat_buf_access+0x164> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
2643c: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
26440: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
26444: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
26448: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
2644c: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED
26450: e1a0300d mov r3, sp <== NOT EXECUTED
26454: ebff7c73 bl 5628 <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
26458: e3500000 cmp r0, #0 <== NOT EXECUTED
2645c: 0affffe8 beq 26404 <fat_buf_access+0xe0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
26460: eb007876 bl 44640 <__errno> <== NOT EXECUTED
26464: e3a0300c mov r3, #12 <== NOT EXECUTED
26468: e5803000 str r3, [r0] <== NOT EXECUTED
2646c: e3e00000 mvn r0, #0 <== NOT EXECUTED
26470: ea000013 b 264c4 <fat_buf_access+0x1a0> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
26474: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
26478: ebff780d bl 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
2647c: e3500000 cmp r0, #0 <== NOT EXECUTED
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
26480: e5c4a081 strb sl, [r4, #129] ; 0x81 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
26484: 1a000027 bne 26528 <fat_buf_access+0x204> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
26488: e3570001 cmp r7, #1 <== NOT EXECUTED
2648c: 0a00001f beq 26510 <fat_buf_access+0x1ec> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
26490: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
26494: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
26498: e1a02006 mov r2, r6 <== NOT EXECUTED
2649c: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
264a0: ebff7c60 bl 5628 <rtems_bdbuf_get> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
264a4: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
264a8: 03a03001 moveq r3, #1 <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
264ac: 0584607c streq r6, [r4, #124] ; 0x7c <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_ACTUAL;
264b0: 05c43081 strbeq r3, [r4, #129] ; 0x81 <== NOT EXECUTED
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
264b4: 1a00001b bne 26528 <fat_buf_access+0x204> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
264b8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
264bc: e5883000 str r3, [r8] <== NOT EXECUTED
264c0: e3a00000 mov r0, #0 <== NOT EXECUTED
return RC_OK;
}
264c4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
264c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
264cc: e594501c ldr r5, [r4, #28] <== NOT EXECUTED
264d0: e1550003 cmp r5, r3 <== NOT EXECUTED
264d4: 93a05000 movls r5, #0 <== NOT EXECUTED
264d8: 83a05001 movhi r5, #1 <== NOT EXECUTED
264dc: eaffffac b 26394 <fat_buf_access+0x70> <== NOT EXECUTED
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
264e0: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
264e4: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
264e8: e1a02006 mov r2, r6 <== NOT EXECUTED
264ec: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
264f0: ebff7c80 bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
264f4: eaffff9b b 26368 <fat_buf_access+0x44> <== NOT EXECUTED
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
264f8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
264fc: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED
26500: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
26504: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
26508: eb0084fc bl 47900 <memcpy> <== NOT EXECUTED
2650c: eaffffaa b 263bc <fat_buf_access+0x98> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
26510: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
26514: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
26518: e1a02006 mov r2, r6 <== NOT EXECUTED
2651c: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
26520: ebff7c74 bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
26524: eaffffde b 264a4 <fat_buf_access+0x180> <== NOT EXECUTED
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
26528: eb007844 bl 44640 <__errno> <== NOT EXECUTED
2652c: e3a03005 mov r3, #5 <== NOT EXECUTED
26530: e5803000 str r3, [r0] <== NOT EXECUTED
26534: e3e00000 mvn r0, #0 <== NOT EXECUTED
26538: eaffffe1 b 264c4 <fat_buf_access+0x1a0> <== NOT EXECUTED
000261b8 <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
261b8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
261bc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
261c0: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED
261c4: e3500000 cmp r0, #0 <== NOT EXECUTED
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
261c8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
261cc: 0a000037 beq 262b0 <fat_buf_release+0xf8> <== NOT EXECUTED
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
261d0: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
261d4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
261d8: e1530002 cmp r3, r2 <== NOT EXECUTED
261dc: 33a05000 movcc r5, #0 <== NOT EXECUTED
261e0: 2a000034 bcs 262b8 <fat_buf_release+0x100> <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
261e4: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
261e8: e3530000 cmp r3, #0 <== NOT EXECUTED
261ec: 0a000038 beq 262d4 <fat_buf_release+0x11c> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
261f0: e3550000 cmp r5, #0 <== NOT EXECUTED
261f4: 0a000002 beq 26204 <fat_buf_release+0x4c> <== NOT EXECUTED
261f8: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
261fc: e3530000 cmp r3, #0 <== NOT EXECUTED
26200: 0a00003a beq 262f0 <fat_buf_release+0x138> <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
26204: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
26208: ebff7887 bl 442c <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2620c: e3500000 cmp r0, #0 <== NOT EXECUTED
26210: 1a00003c bne 26308 <fat_buf_release+0x150> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
26214: e3550000 cmp r5, #0 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
26218: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
2621c: 0a000030 beq 262e4 <fat_buf_release+0x12c> <== NOT EXECUTED
26220: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
26224: e3530000 cmp r3, #0 <== NOT EXECUTED
26228: 1a00002d bne 262e4 <fat_buf_release+0x12c> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2622c: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED
26230: e3530001 cmp r3, #1 <== NOT EXECUTED
26234: 9a00002a bls 262e4 <fat_buf_release+0x12c> <== NOT EXECUTED
26238: e3a05001 mov r5, #1 <== NOT EXECUTED
2623c: e1a0600d mov r6, sp <== NOT EXECUTED
26240: ea00000d b 2627c <fat_buf_release+0xc4> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
26244: e59d3000 ldr r3, [sp] <== NOT EXECUTED
26248: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
2624c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
26250: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
26254: eb0085a9 bl 47900 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
26258: e59d0000 ldr r0, [sp] <== NOT EXECUTED
2625c: ebff7872 bl 442c <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26260: e2855001 add r5, r5, #1 <== NOT EXECUTED
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
26264: e3500000 cmp r0, #0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26268: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
2626c: 1a00000b bne 262a0 <fat_buf_release+0xe8> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
26270: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED
26274: e1530005 cmp r3, r5 <== NOT EXECUTED
26278: 9a000019 bls 262e4 <fat_buf_release+0x12c> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
2627c: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
26280: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
26284: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
26288: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
2628c: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED
26290: e1a0300d mov r3, sp <== NOT EXECUTED
26294: ebff7ce3 bl 5628 <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
26298: e3500000 cmp r0, #0 <== NOT EXECUTED
2629c: 0affffe8 beq 26244 <fat_buf_release+0x8c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
262a0: eb0078e6 bl 44640 <__errno> <== NOT EXECUTED
262a4: e3a0300c mov r3, #12 <== NOT EXECUTED
262a8: e5803000 str r3, [r0] <== NOT EXECUTED
262ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
262b0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
262b4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
262b8: e594501c ldr r5, [r4, #28] <== NOT EXECUTED
262bc: e1530005 cmp r3, r5 <== NOT EXECUTED
262c0: 23a05000 movcs r5, #0 <== NOT EXECUTED
262c4: 33a05001 movcc r5, #1 <== NOT EXECUTED
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
262c8: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
262cc: e3530000 cmp r3, #0 <== NOT EXECUTED
262d0: 1affffc6 bne 261f0 <fat_buf_release+0x38> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
262d4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
262d8: ebff7875 bl 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
262dc: e3500000 cmp r0, #0 <== NOT EXECUTED
262e0: 1a000008 bne 26308 <fat_buf_release+0x150> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
262e4: e3a00000 mov r0, #0 <== NOT EXECUTED
262e8: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED
return RC_OK;
262ec: eaffffef b 262b0 <fat_buf_release+0xf8> <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
262f0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
262f4: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED
262f8: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
262fc: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
26300: eb00857e bl 47900 <memcpy> <== NOT EXECUTED
26304: eaffffbe b 26204 <fat_buf_release+0x4c> <== NOT EXECUTED
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
26308: eb0078cc bl 44640 <__errno> <== NOT EXECUTED
2630c: e3a03005 mov r3, #5 <== NOT EXECUTED
26310: e5803000 str r3, [r0] <== NOT EXECUTED
26314: e3e00000 mvn r0, #0 <== NOT EXECUTED
26318: eaffffe4 b 262b0 <fat_buf_release+0xf8> <== NOT EXECUTED
00026f98 <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
26f98: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
26f9c: e2513000 subs r3, r1, #0 <== NOT EXECUTED
26fa0: e1a0c002 mov ip, r2 <== NOT EXECUTED
26fa4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
26fa8: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
26fac: 1a000003 bne 26fc0 <fat_cluster_read+0x28> <== NOT EXECUTED
26fb0: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED
26fb4: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
26fb8: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
26fbc: 1a000003 bne 26fd0 <fat_cluster_read+0x38> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
26fc0: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED
26fc4: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED
26fc8: e2433002 sub r3, r3, #2 <== NOT EXECUTED
26fcc: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
26fd0: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED
26fd4: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED
26fd8: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
26fdc: e3a02000 mov r2, #0 <== NOT EXECUTED
26fe0: e58dc000 str ip, [sp] <== NOT EXECUTED
26fe4: ebfffe21 bl 26870 <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
26fe8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
26fec: e8bd8000 pop {pc} <== NOT EXECUTED
00026768 <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
26768: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2676c: e2513000 subs r3, r1, #0 <== NOT EXECUTED
26770: e1a0c002 mov ip, r2 <== NOT EXECUTED
26774: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
26778: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
2677c: 1a000003 bne 26790 <fat_cluster_write+0x28> <== NOT EXECUTED
26780: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED
26784: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
26788: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2678c: 1a000003 bne 267a0 <fat_cluster_write+0x38> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
26790: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED
26794: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED
26798: e2433002 sub r3, r3, #2 <== NOT EXECUTED
2679c: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
267a0: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED
267a4: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED
267a8: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
267ac: e3a02000 mov r2, #0 <== NOT EXECUTED
267b0: e58dc000 str ip, [sp] <== NOT EXECUTED
267b4: ebffff60 bl 2653c <_fat_block_write> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
267b8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
267bc: e8bd8000 pop {pc} <== NOT EXECUTED
00026618 <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
26618: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2661c: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
26620: e1d533bc ldrh r3, [r5, #60] ; 0x3c <== NOT EXECUTED
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
26624: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
26628: e28dc008 add ip, sp, #8 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
2662c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
26630: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
26634: e1a01003 mov r1, r3 <== NOT EXECUTED
26638: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED
2663c: e3a03004 mov r3, #4 <== NOT EXECUTED
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
26640: e1a04000 mov r4, r0 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
26644: e58dc000 str ip, [sp] <== NOT EXECUTED
26648: ebffffbb bl 2653c <_fat_block_write> <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
2664c: e3a03004 mov r3, #4 <== NOT EXECUTED
26650: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED
26654: e08dc003 add ip, sp, r3 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
26658: e1a06000 mov r6, r0 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
2665c: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED
26660: e1a00004 mov r0, r4 <== NOT EXECUTED
26664: e58dc000 str ip, [sp] <== NOT EXECUTED
26668: ebffffb3 bl 2653c <_fat_block_write> <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
2666c: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED
26670: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
26674: 13e00000 mvnne r0, #0 <== NOT EXECUTED
26678: e28dd00c add sp, sp, #12 <== NOT EXECUTED
2667c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00025d80 <fat_file_close>:
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
25d80: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
25d84: e3530001 cmp r3, #1 <== NOT EXECUTED
{
fat_fd->links_num--;
25d88: 82433001 subhi r3, r3, #1 <== NOT EXECUTED
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25d8c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
{
fat_fd->links_num--;
25d90: 85813008 strhi r3, [r1, #8] <== NOT EXECUTED
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25d94: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
25d98: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25d9c: e1a04001 mov r4, r1 <== NOT EXECUTED
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
{
fat_fd->links_num--;
25da0: 83a00000 movhi r0, #0 <== NOT EXECUTED
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
25da4: 88bd80f0 pophi {r4, r5, r6, r7, pc} <== NOT EXECUTED
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
25da8: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED
25dac: e2177001 ands r7, r7, #1 <== NOT EXECUTED
25db0: 0a00000d beq 25dec <fat_file_close+0x6c> <== NOT EXECUTED
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
25db4: e3a02000 mov r2, #0 <== NOT EXECUTED
25db8: ebfffe1d bl 25634 <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
25dbc: e3500000 cmp r0, #0 <== NOT EXECUTED
25dc0: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
25dc4: e1a00004 mov r0, r4 <== NOT EXECUTED
25dc8: ebff9ccb bl d0fc <_Chain_Extract> <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
25dcc: e1a00005 mov r0, r5 <== NOT EXECUTED
25dd0: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
25dd4: eb0000b6 bl 260b4 <fat_ino_is_unique> <== NOT EXECUTED
25dd8: e3500000 cmp r0, #0 <== NOT EXECUTED
25ddc: 1a00000d bne 25e18 <fat_file_close+0x98> <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
25de0: e1a00004 mov r0, r4 <== NOT EXECUTED
25de4: ebff87e1 bl 7d70 <free> <== NOT EXECUTED
25de8: ea000004 b 25e00 <fat_file_close+0x80> <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
25dec: e591100c ldr r1, [r1, #12] <== NOT EXECUTED
25df0: eb0000af bl 260b4 <fat_ino_is_unique> <== NOT EXECUTED
25df4: e3500000 cmp r0, #0 <== NOT EXECUTED
{
fat_fd->links_num = 0;
25df8: 15847008 strne r7, [r4, #8] <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
25dfc: 0a000002 beq 25e0c <fat_file_close+0x8c> <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
25e00: e1a00006 mov r0, r6 <== NOT EXECUTED
return rc;
}
25e04: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
25e08: ea0000ea b 261b8 <fat_buf_release> <== NOT EXECUTED
25e0c: e1a00004 mov r0, r4 <== NOT EXECUTED
25e10: ebff9cb9 bl d0fc <_Chain_Extract> <== NOT EXECUTED
25e14: eafffff1 b 25de0 <fat_file_close+0x60> <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
25e18: e1a00005 mov r0, r5 <== NOT EXECUTED
25e1c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
25e20: eb000099 bl 2608c <fat_free_unique_ino> <== NOT EXECUTED
25e24: eaffffed b 25de0 <fat_file_close+0x60> <== NOT EXECUTED
000253dc <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
253dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
253e0: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
253e4: e3530000 cmp r3, #0 <== NOT EXECUTED
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
253e8: e1a08000 mov r8, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
253ec: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
253f0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
253f4: e591201c ldr r2, [r1, #28] <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
253f8: 01a00003 moveq r0, r3 <== NOT EXECUTED
253fc: 1a000001 bne 25408 <fat_file_datasync+0x2c> <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
25400: e28dd008 add sp, sp, #8 <== NOT EXECUTED
25404: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
25408: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
2540c: e1a00005 mov r0, r5 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
25410: e58d3000 str r3, [sp] <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
25414: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
25418: eb000366 bl 261b8 <fat_buf_release> <== NOT EXECUTED
if (rc != RC_OK)
2541c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
25420: 01a0700d moveq r7, sp <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25424: 028d9004 addeq r9, sp, #4 <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
if (rc != RC_OK)
25428: 1a00002a bne 254d8 <fat_file_datasync+0xfc> <== NOT EXECUTED
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2542c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
25430: e285200c add r2, r5, #12 <== NOT EXECUTED
25434: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
25438: e0012002 and r2, r1, r2 <== NOT EXECUTED
2543c: e1520003 cmp r2, r3 <== NOT EXECUTED
25440: 2a000024 bcs 254d8 <fat_file_datasync+0xfc> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25444: e3510000 cmp r1, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
25448: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2544c: 0a00001c beq 254c4 <fat_file_datasync+0xe8> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25450: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
25454: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
25458: e2416002 sub r6, r1, #2 <== NOT EXECUTED
2545c: e0826316 add r6, r2, r6, lsl r3 <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
25460: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED
25464: e3530000 cmp r3, #0 <== NOT EXECUTED
25468: 0a00001d beq 254e4 <fat_file_datasync+0x108> <== NOT EXECUTED
2546c: e3a04000 mov r4, #0 <== NOT EXECUTED
25470: ea000006 b 25490 <fat_file_datasync+0xb4> <== NOT EXECUTED
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
25474: e59d0000 ldr r0, [sp] <== NOT EXECUTED
25478: ebff7e83 bl 4e8c <rtems_bdbuf_sync> <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
2547c: e3500000 cmp r0, #0 <== NOT EXECUTED
25480: 1a00000a bne 254b0 <fat_file_datasync+0xd4> <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
25484: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED
25488: e1530004 cmp r3, r4 <== NOT EXECUTED
2548c: 9a000013 bls 254e0 <fat_file_datasync+0x104> <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
25490: e0842006 add r2, r4, r6 <== NOT EXECUTED
25494: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED
25498: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
2549c: e1a0300d mov r3, sp <== NOT EXECUTED
254a0: ebff8094 bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
254a4: e3500000 cmp r0, #0 <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
254a8: e2844001 add r4, r4, #1 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
if (sc != RTEMS_SUCCESSFUL)
254ac: 0afffff0 beq 25474 <fat_file_datasync+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
254b0: eb007c62 bl 44640 <__errno> <== NOT EXECUTED
254b4: e3a03005 mov r3, #5 <== NOT EXECUTED
254b8: e5803000 str r3, [r0] <== NOT EXECUTED
254bc: e3e00000 mvn r0, #0 <== NOT EXECUTED
254c0: eaffffce b 25400 <fat_file_datasync+0x24> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
254c4: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED
254c8: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
254cc: 1593601c ldrne r6, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
254d0: 1affffe2 bne 25460 <fat_file_datasync+0x84> <== NOT EXECUTED
254d4: eaffffdd b 25450 <fat_file_datasync+0x74> <== NOT EXECUTED
rc = fat_buf_release(fs_info);
if (rc != RC_OK)
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
254d8: e1a0000a mov r0, sl <== NOT EXECUTED
254dc: eaffffc7 b 25400 <fat_file_datasync+0x24> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
254e0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
254e4: e1a00008 mov r0, r8 <== NOT EXECUTED
254e8: e1a02009 mov r2, r9 <== NOT EXECUTED
254ec: eb006901 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
254f0: e3500000 cmp r0, #0 <== NOT EXECUTED
254f4: 0affffcc beq 2542c <fat_file_datasync+0x50> <== NOT EXECUTED
254f8: eaffffc0 b 25400 <fat_file_datasync+0x24> <== NOT EXECUTED
0002573c <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
2573c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
25740: e1a08003 mov r8, r3 <== NOT EXECUTED
uint32_t old_last_cl;
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
25744: e5882000 str r2, [r8] <== NOT EXECUTED
if (new_length <= fat_fd->fat_file_size)
25748: e591b018 ldr fp, [r1, #24] <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
2574c: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
25750: e3a03000 mov r3, #0 <== NOT EXECUTED
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
25754: e152000b cmp r2, fp <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
25758: e1a04002 mov r4, r2 <== NOT EXECUTED
2575c: e1a05001 mov r5, r1 <== NOT EXECUTED
25760: e1a06000 mov r6, r0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
25764: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
25768: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
uint32_t new_length,
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2576c: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
25770: 9a000039 bls 2585c <fat_file_extend+0x120> <== NOT EXECUTED
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25774: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
25778: e3530001 cmp r3, #1 <== NOT EXECUTED
2577c: 0a00003a beq 2586c <fat_file_extend+0x130> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
25780: e1d720b6 ldrh r2, [r7, #6] <== NOT EXECUTED
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
25784: e2423001 sub r3, r2, #1 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
25788: e003a00b and sl, r3, fp <== NOT EXECUTED
2578c: e06aa002 rsb sl, sl, r2 <== NOT EXECUTED
25790: e00aa003 and sl, sl, r3 <== NOT EXECUTED
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
25794: e06bb004 rsb fp, fp, r4 <== NOT EXECUTED
if (bytes2add > bytes_remain)
25798: e15a000b cmp sl, fp <== NOT EXECUTED
2579c: 2a00002e bcs 2585c <fat_file_extend+0x120> <== NOT EXECUTED
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
257a0: e05bb00a subs fp, fp, sl <== NOT EXECUTED
257a4: 0a00002c beq 2585c <fat_file_extend+0x120> <== NOT EXECUTED
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
257a8: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED
257ac: e24b9001 sub r9, fp, #1 <== NOT EXECUTED
257b0: e1a09339 lsr r9, r9, r3 <== NOT EXECUTED
257b4: e2899001 add r9, r9, #1 <== NOT EXECUTED
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
257b8: e28dc008 add ip, sp, #8 <== NOT EXECUTED
257bc: e1a00006 mov r0, r6 <== NOT EXECUTED
257c0: e28d1010 add r1, sp, #16 <== NOT EXECUTED
257c4: e1a02009 mov r2, r9 <== NOT EXECUTED
257c8: e28d3004 add r3, sp, #4 <== NOT EXECUTED
257cc: e58dc000 str ip, [sp] <== NOT EXECUTED
257d0: eb0068df bl 3fb54 <fat_scan_fat_for_free_clusters> <== NOT EXECUTED
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
257d4: e3500000 cmp r0, #0 <== NOT EXECUTED
257d8: 11a08000 movne r8, r0 <== NOT EXECUTED
257dc: 1a00001f bne 25860 <fat_file_extend+0x124> <== NOT EXECUTED
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
257e0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
257e4: e19aa002 orrs sl, sl, r2 <== NOT EXECUTED
257e8: 0a000025 beq 25884 <fat_file_extend+0x148> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
257ec: e1590002 cmp r9, r2 <== NOT EXECUTED
257f0: 0a000008 beq 25818 <fat_file_extend+0xdc> <== NOT EXECUTED
*a_length = new_length -
257f4: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED
257f8: e1e01002 mvn r1, r2 <== NOT EXECUTED
257fc: e0819009 add r9, r1, r9 <== NOT EXECUTED
25800: e0449319 sub r9, r4, r9, lsl r3 <== NOT EXECUTED
25804: e1d730b6 ldrh r3, [r7, #6] <== NOT EXECUTED
25808: e2433001 sub r3, r3, #1 <== NOT EXECUTED
2580c: e00bb003 and fp, fp, r3 <== NOT EXECUTED
25810: e06bb009 rsb fp, fp, r9 <== NOT EXECUTED
25814: e588b000 str fp, [r8] <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
25818: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
2581c: e3530000 cmp r3, #0 <== NOT EXECUTED
25820: 1a00001c bne 25898 <fat_file_extend+0x15c> <== NOT EXECUTED
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
25824: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
25828: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
2582c: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED
25830: e585101c str r1, [r5, #28] <== NOT EXECUTED
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
25834: e3520000 cmp r2, #0 <== NOT EXECUTED
25838: 0a000004 beq 25850 <fat_file_extend+0x114> <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2583c: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
25840: e3530001 cmp r3, #1 <== NOT EXECUTED
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
25844: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
25848: e585303c str r3, [r5, #60] ; 0x3c <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2584c: 0a00001e beq 258cc <fat_file_extend+0x190> <== NOT EXECUTED
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
25850: e5854018 str r4, [r5, #24] <== NOT EXECUTED
25854: e3a08000 mov r8, #0 <== NOT EXECUTED
return RC_OK;
25858: ea000000 b 25860 <fat_file_extend+0x124> <== NOT EXECUTED
2585c: e3a08000 mov r8, #0 <== NOT EXECUTED
}
25860: e1a00008 mov r0, r8 <== NOT EXECUTED
25864: e28dd014 add sp, sp, #20 <== NOT EXECUTED
25868: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2586c: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED
25870: e3530000 cmp r3, #0 <== NOT EXECUTED
25874: 1affffc1 bne 25780 <fat_file_extend+0x44> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
25878: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED
2587c: e3130003 tst r3, #3 <== NOT EXECUTED
25880: 0affffbe beq 25780 <fat_file_extend+0x44> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
25884: eb007b6d bl 44640 <__errno> <== NOT EXECUTED
25888: e3a0301c mov r3, #28 <== NOT EXECUTED
2588c: e5803000 str r3, [r0] <== NOT EXECUTED
25890: e3e08000 mvn r8, #0 <== NOT EXECUTED
25894: eafffff1 b 25860 <fat_file_extend+0x124> <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
25898: e595103c ldr r1, [r5, #60] ; 0x3c <== NOT EXECUTED
2589c: e3710001 cmn r1, #1 <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
258a0: 158d100c strne r1, [sp, #12] <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
258a4: 0a000011 beq 258f0 <fat_file_extend+0x1b4> <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
258a8: e1a00006 mov r0, r6 <== NOT EXECUTED
258ac: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
258b0: eb00676f bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
258b4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
258b8: 1a000008 bne 258e0 <fat_file_extend+0x1a4> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
258bc: e1a00007 mov r0, r7 <== NOT EXECUTED
258c0: eb00023c bl 261b8 <fat_buf_release> <== NOT EXECUTED
258c4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
258c8: eaffffd9 b 25834 <fat_file_extend+0xf8> <== NOT EXECUTED
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
258cc: e1a00006 mov r0, r6 <== NOT EXECUTED
258d0: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
258d4: eb0003b9 bl 267c0 <fat_init_clusters_chain> <== NOT EXECUTED
if ( rc != RC_OK )
258d8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
258dc: 0affffdb beq 25850 <fat_file_extend+0x114> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
258e0: e1a00006 mov r0, r6 <== NOT EXECUTED
258e4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
258e8: eb006863 bl 3fa7c <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
258ec: eaffffdb b 25860 <fat_file_extend+0x124> <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
258f0: e1a01005 mov r1, r5 <== NOT EXECUTED
258f4: e28dc00c add ip, sp, #12 <== NOT EXECUTED
258f8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
258fc: e1a00006 mov r0, r6 <== NOT EXECUTED
25900: e3a02001 mov r2, #1 <== NOT EXECUTED
25904: e58dc000 str ip, [sp] <== NOT EXECUTED
25908: ebffff0f bl 2554c <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
2590c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
25910: 059d100c ldreq r1, [sp, #12] <== NOT EXECUTED
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
25914: 0affffe3 beq 258a8 <fat_file_extend+0x16c> <== NOT EXECUTED
25918: eafffff0 b 258e0 <fat_file_extend+0x1a4> <== NOT EXECUTED
0002554c <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
2554c: e92d000c push {r2, r3} <== NOT EXECUTED
25550: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
25554: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
25558: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
2555c: e3530001 cmp r3, #1 <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
25560: e28d3018 add r3, sp, #24 <== NOT EXECUTED
25564: e58d3000 str r3, [sp] <== NOT EXECUTED
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
25568: e3a02000 mov r2, #0 <== NOT EXECUTED
2556c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
fat_file_fd_t *fat_fd,
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
25570: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
25574: 0a000007 beq 25598 <fat_file_ioctl+0x4c> <== NOT EXECUTED
*ret = cur_cln;
break;
default:
errno = EINVAL;
25578: eb007c30 bl 44640 <__errno> <== NOT EXECUTED
2557c: e3a03016 mov r3, #22 <== NOT EXECUTED
25580: e5803000 str r3, [r0] <== NOT EXECUTED
25584: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
25588: e28dd008 add sp, sp, #8 <== NOT EXECUTED
2558c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
25590: e28dd008 add sp, sp, #8 <== NOT EXECUTED
25594: e12fff1e bx lr <== NOT EXECUTED
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
25598: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
2559c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
ret = va_arg(ap, uint32_t *);
255a0: e2833008 add r3, r3, #8 <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
255a4: e1520004 cmp r2, r4 <== NOT EXECUTED
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
ret = va_arg(ap, uint32_t *);
255a8: e58d3000 str r3, [sp] <== NOT EXECUTED
255ac: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
255b0: 2a00001a bcs 25620 <fat_file_ioctl+0xd4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
255b4: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
255b8: e3530001 cmp r3, #1 <== NOT EXECUTED
255bc: 0a000008 beq 255e4 <fat_file_ioctl+0x98> <== NOT EXECUTED
return RC_OK;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
255c0: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED
255c4: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED
255c8: e28d3004 add r3, sp, #4 <== NOT EXECUTED
255cc: ebffff53 bl 25320 <fat_file_lseek> <== NOT EXECUTED
if ( rc != RC_OK )
255d0: e3500000 cmp r0, #0 <== NOT EXECUTED
255d4: 1affffeb bne 25588 <fat_file_ioctl+0x3c> <== NOT EXECUTED
return rc;
*ret = cur_cln;
255d8: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
255dc: e5843000 str r3, [r4] <== NOT EXECUTED
break;
255e0: eaffffe8 b 25588 <fat_file_ioctl+0x3c> <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
255e4: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED
255e8: e3530000 cmp r3, #0 <== NOT EXECUTED
255ec: 1afffff3 bne 255c0 <fat_file_ioctl+0x74> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
255f0: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED
255f4: e3150003 tst r5, #3 <== NOT EXECUTED
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
255f8: 15843000 strne r3, [r4] <== NOT EXECUTED
255fc: 11a00003 movne r0, r3 <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
25600: 1affffe0 bne 25588 <fat_file_ioctl+0x3c> <== NOT EXECUTED
return RC_OK;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
25604: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED
25608: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED
2560c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
25610: ebffff42 bl 25320 <fat_file_lseek> <== NOT EXECUTED
if ( rc != RC_OK )
25614: e3500000 cmp r0, #0 <== NOT EXECUTED
25618: 0affffee beq 255d8 <fat_file_ioctl+0x8c> <== NOT EXECUTED
2561c: eaffffd9 b 25588 <fat_file_ioctl+0x3c> <== NOT EXECUTED
pos = va_arg(ap, uint32_t );
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
25620: eb007c06 bl 44640 <__errno> <== NOT EXECUTED
25624: e3a03005 mov r3, #5 <== NOT EXECUTED
25628: e5803000 str r3, [r0] <== NOT EXECUTED
2562c: e3e00000 mvn r0, #0 <== NOT EXECUTED
25630: eaffffd4 b 25588 <fat_file_ioctl+0x3c> <== NOT EXECUTED
00025320 <fat_file_lseek>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
25320: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
25324: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED
25328: e1580002 cmp r8, r2 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
2532c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
25330: e1a05001 mov r5, r1 <== NOT EXECUTED
25334: e1a06002 mov r6, r2 <== NOT EXECUTED
25338: e1a04000 mov r4, r0 <== NOT EXECUTED
2533c: e1a09003 mov r9, r3 <== NOT EXECUTED
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
25340: 0a000020 beq 253c8 <fat_file_lseek+0xa8> <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
25344: 35911038 ldrcc r1, [r1, #56] ; 0x38 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
25348: 2595101c ldrcs r1, [r5, #28] <== NOT EXECUTED
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
2534c: 30688002 rsbcc r8, r8, r2 <== NOT EXECUTED
}
else
{
cur_cln = fat_fd->cln;
25350: 21a08002 movcs r8, r2 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
25354: 358d1000 strcc r1, [sp] <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
25358: 258d1000 strcs r1, [sp] <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2535c: e3580000 cmp r8, #0 <== NOT EXECUTED
25360: 0a000012 beq 253b0 <fat_file_lseek+0x90> <== NOT EXECUTED
25364: e3a07000 mov r7, #0 <== NOT EXECUTED
25368: e1a0a00d mov sl, sp <== NOT EXECUTED
2536c: ea000002 b 2537c <fat_file_lseek+0x5c> <== NOT EXECUTED
25370: e1580007 cmp r8, r7 <== NOT EXECUTED
25374: 9a00000c bls 253ac <fat_file_lseek+0x8c> <== NOT EXECUTED
25378: e59d1000 ldr r1, [sp] <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2537c: e1a00004 mov r0, r4 <== NOT EXECUTED
25380: e1a0200d mov r2, sp <== NOT EXECUTED
25384: eb00695b bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
25388: e3500000 cmp r0, #0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2538c: e2877001 add r7, r7, #1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
25390: 0afffff6 beq 25370 <fat_file_lseek+0x50> <== NOT EXECUTED
return rc;
25394: e1a03000 mov r3, r0 <== NOT EXECUTED
25398: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
2539c: e1a01004 mov r1, r4 <== NOT EXECUTED
253a0: e1a00003 mov r0, r3 <== NOT EXECUTED
253a4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
253a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
253ac: e59d1000 ldr r1, [sp] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
253b0: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
253b4: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED
*disk_cln = cur_cln;
253b8: e3a03000 mov r3, #0 <== NOT EXECUTED
253bc: e5891000 str r1, [r9] <== NOT EXECUTED
253c0: e3a04000 mov r4, #0 <== NOT EXECUTED
253c4: eafffff4 b 2539c <fat_file_lseek+0x7c> <== NOT EXECUTED
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
253c8: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED
253cc: e3a04000 mov r4, #0 <== NOT EXECUTED
253d0: e5893000 str r3, [r9] <== NOT EXECUTED
253d4: e3a03000 mov r3, #0 <== NOT EXECUTED
253d8: eaffffef b 2539c <fat_file_lseek+0x7c> <== NOT EXECUTED
000254fc <fat_file_mark_removed>:
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
254fc: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
25500: e3530001 cmp r3, #1 <== NOT EXECUTED
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25504: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
25508: e1a04001 mov r4, r1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
2550c: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
25510: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED
25514: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
25518: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2551c: e2066001 and r6, r6, #1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
25520: ebff9ef5 bl d0fc <_Chain_Extract> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
25524: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED
25528: e1a02086 lsl r2, r6, #1 <== NOT EXECUTED
2552c: e0826006 add r6, r2, r6 <== NOT EXECUTED
25530: e0830106 add r0, r3, r6, lsl #2 <== NOT EXECUTED
25534: e1a01004 mov r1, r4 <== NOT EXECUTED
25538: ebff9ee4 bl d0d0 <_Chain_Append> <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
2553c: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED
25540: e3833001 orr r3, r3, #1 <== NOT EXECUTED
25544: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED
}
25548: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00025e28 <fat_file_open>:
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
25e28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
25e2c: e5915000 ldr r5, [r1] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
25e30: e3550001 cmp r5, #1 <== NOT EXECUTED
25e34: e1a08001 mov r8, r1 <== NOT EXECUTED
25e38: e1a0a000 mov sl, r0 <== NOT EXECUTED
25e3c: e1a09002 mov r9, r2 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
25e40: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
25e44: 0a000007 beq 25e68 <fat_file_open+0x40> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25e48: e3550000 cmp r5, #0 <== NOT EXECUTED
25e4c: 0a00005b beq 25fc0 <fat_file_open+0x198> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25e50: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED
25e54: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
25e58: e2455002 sub r5, r5, #2 <== NOT EXECUTED
25e5c: e0835215 add r5, r3, r5, lsl r2 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
25e60: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED
25e64: e1a05315 lsl r5, r5, r3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
25e68: e5983004 ldr r3, [r8, #4] <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
25e6c: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED
25e70: e08554a3 add r5, r5, r3, lsr #9 <== NOT EXECUTED
25e74: e202200f and r2, r2, #15 <== NOT EXECUTED
25e78: e0825205 add r5, r2, r5, lsl #4 <== NOT EXECUTED
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
25e7c: e2053001 and r3, r5, #1 <== NOT EXECUTED
25e80: e1a07083 lsl r7, r3, #1 <== NOT EXECUTED
25e84: e0877003 add r7, r7, r3 <== NOT EXECUTED
25e88: e594c064 ldr ip, [r4, #100] ; 0x64 <== NOT EXECUTED
25e8c: e1a07107 lsl r7, r7, #2 <== NOT EXECUTED
25e90: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED
25e94: e08cc007 add ip, ip, r7 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
25e98: e28cc004 add ip, ip, #4 <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
25e9c: e15c0003 cmp ip, r3 <== NOT EXECUTED
25ea0: 1a000003 bne 25eb4 <fat_file_open+0x8c> <== NOT EXECUTED
25ea4: ea00001e b 25f24 <fat_file_open+0xfc> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
25ea8: e5933000 ldr r3, [r3] <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
25eac: e15c0003 cmp ip, r3 <== NOT EXECUTED
25eb0: 0a00001b beq 25f24 <fat_file_open+0xfc> <== NOT EXECUTED
25eb4: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
25eb8: e3520001 cmp r2, #1 <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25ebc: e2420002 sub r0, r2, #2 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
25ec0: 0a00000a beq 25ef0 <fat_file_open+0xc8> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25ec4: e3520000 cmp r2, #0 <== NOT EXECUTED
25ec8: 1a000003 bne 25edc <fat_file_open+0xb4> <== NOT EXECUTED
25ecc: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED
25ed0: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25ed4: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25ed8: 1a000002 bne 25ee8 <fat_file_open+0xc0> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25edc: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED
25ee0: e5942030 ldr r2, [r4, #48] ; 0x30 <== NOT EXECUTED
25ee4: e0822110 add r2, r2, r0, lsl r1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
25ee8: e5d46003 ldrb r6, [r4, #3] <== NOT EXECUTED
25eec: e1a02612 lsl r2, r2, r6 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
25ef0: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
25ef4: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED
25ef8: e200000f and r0, r0, #15 <== NOT EXECUTED
25efc: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED
25f00: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED
25f04: e1550001 cmp r5, r1 <== NOT EXECUTED
25f08: 1affffe6 bne 25ea8 <fat_file_open+0x80> <== NOT EXECUTED
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
lfat_fd->links_num++;
25f0c: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
25f10: e2822001 add r2, r2, #1 <== NOT EXECUTED
25f14: e5832008 str r2, [r3, #8] <== NOT EXECUTED
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
25f18: e5893000 str r3, [r9] <== NOT EXECUTED
lfat_fd->links_num++;
25f1c: e3a00000 mov r0, #0 <== NOT EXECUTED
return rc;
25f20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
25f24: e594c068 ldr ip, [r4, #104] ; 0x68 <== NOT EXECUTED
25f28: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED
25f2c: e08cc007 add ip, ip, r7 <== NOT EXECUTED
25f30: e28cc004 add ip, ip, #4 <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
25f34: e153000c cmp r3, ip <== NOT EXECUTED
25f38: 1a000009 bne 25f64 <fat_file_open+0x13c> <== NOT EXECUTED
25f3c: e3e0b000 mvn fp, #0 <== NOT EXECUTED
25f40: ea000024 b 25fd8 <fat_file_open+0x1b0> <== NOT EXECUTED
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
25f44: e3550000 cmp r5, #0 <== NOT EXECUTED
25f48: 0a000021 beq 25fd4 <fat_file_open+0x1ac> <== NOT EXECUTED
25f4c: e593200c ldr r2, [r3, #12] <== NOT EXECUTED
25f50: e1550002 cmp r5, r2 <== NOT EXECUTED
25f54: 0a00001e beq 25fd4 <fat_file_open+0x1ac> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
25f58: e5933000 ldr r3, [r3] <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
25f5c: e15c0003 cmp ip, r3 <== NOT EXECUTED
25f60: 0afffff5 beq 25f3c <fat_file_open+0x114> <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
25f64: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
25f68: e3520001 cmp r2, #1 <== NOT EXECUTED
25f6c: 0a00000b beq 25fa0 <fat_file_open+0x178> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25f70: e3520000 cmp r2, #0 <== NOT EXECUTED
25f74: 1a000003 bne 25f88 <fat_file_open+0x160> <== NOT EXECUTED
25f78: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED
25f7c: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25f80: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25f84: 1a000003 bne 25f98 <fat_file_open+0x170> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25f88: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED
25f8c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
25f90: e2422002 sub r2, r2, #2 <== NOT EXECUTED
25f94: e0802112 add r2, r0, r2, lsl r1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
25f98: e5d40003 ldrb r0, [r4, #3] <== NOT EXECUTED
25f9c: e1a02012 lsl r2, r2, r0 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
25fa0: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
25fa4: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED
25fa8: e200000f and r0, r0, #15 <== NOT EXECUTED
25fac: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED
25fb0: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED
25fb4: e1550001 cmp r5, r1 <== NOT EXECUTED
25fb8: 1affffe6 bne 25f58 <fat_file_open+0x130> <== NOT EXECUTED
25fbc: eaffffe0 b 25f44 <fat_file_open+0x11c> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25fc0: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
25fc4: e3130003 tst r3, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25fc8: 1594501c ldrne r5, [r4, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25fcc: 1affffa3 bne 25e60 <fat_file_open+0x38> <== NOT EXECUTED
25fd0: eaffff9e b 25e50 <fat_file_open+0x28> <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
25fd4: e3a0b000 mov fp, #0 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
25fd8: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED
25fdc: ebff8927 bl 8480 <malloc> <== NOT EXECUTED
if ( lfat_fd == NULL )
25fe0: e3500000 cmp r0, #0 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
25fe4: e1a06000 mov r6, r0 <== NOT EXECUTED
25fe8: e5890000 str r0, [r9] <== NOT EXECUTED
if ( lfat_fd == NULL )
25fec: 0a000021 beq 26078 <fat_file_open+0x250> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
25ff0: e3a01000 mov r1, #0 <== NOT EXECUTED
25ff4: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED
25ff8: eb0086c7 bl 47b1c <memset> <== NOT EXECUTED
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
25ffc: e5d6c030 ldrb ip, [r6, #48] ; 0x30 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
26000: e898000f ldm r8, {r0, r1, r2, r3} <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
26004: e3cce001 bic lr, ip, #1 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
26008: e286c020 add ip, r6, #32 <== NOT EXECUTED
if ( rc != RC_OK )
2600c: e35b0000 cmp fp, #0 <== NOT EXECUTED
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
26010: e3e08000 mvn r8, #0 <== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
26014: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
26018: e3a03001 mov r3, #1 <== NOT EXECUTED
2601c: e5863008 str r3, [r6, #8] <== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
26020: e5c6e030 strb lr, [r6, #48] ; 0x30 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
26024: e586803c str r8, [r6, #60] ; 0x3c <== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
lfat_fd->ino = key;
26028: 1586500c strne r5, [r6, #12] <== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
2602c: 0a000005 beq 26048 <fat_file_open+0x220> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
26030: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
26034: e1a01006 mov r1, r6 <== NOT EXECUTED
26038: e0800007 add r0, r0, r7 <== NOT EXECUTED
2603c: ebff9c23 bl d0d0 <_Chain_Append> <== NOT EXECUTED
26040: e3a00000 mov r0, #0 <== NOT EXECUTED
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
26044: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
26048: e1a0000a mov r0, sl <== NOT EXECUTED
2604c: eb00001e bl 260cc <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
26050: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
26054: e586000c str r0, [r6, #12] <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
26058: 1afffff4 bne 26030 <fat_file_open+0x208> <== NOT EXECUTED
{
free((*fat_fd));
2605c: e5990000 ldr r0, [r9] <== NOT EXECUTED
26060: ebff8742 bl 7d70 <free> <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
26064: eb007975 bl 44640 <__errno> <== NOT EXECUTED
26068: e3a0300c mov r3, #12 <== NOT EXECUTED
2606c: e5803000 str r3, [r0] <== NOT EXECUTED
26070: e1a00008 mov r0, r8 <== NOT EXECUTED
26074: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
26078: eb007970 bl 44640 <__errno> <== NOT EXECUTED
2607c: e3a0300c mov r3, #12 <== NOT EXECUTED
26080: e5803000 str r3, [r0] <== NOT EXECUTED
26084: e3e00000 mvn r0, #0 <== NOT EXECUTED
26088: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00025b74 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
25b74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
25b78: e2535000 subs r5, r3, #0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
25b7c: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
25b80: e1a06000 mov r6, r0 <== NOT EXECUTED
25b84: e1a0a001 mov sl, r1 <== NOT EXECUTED
25b88: e1a04002 mov r4, r2 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
25b8c: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
25b90: 0a00004d beq 25ccc <fat_file_read+0x158> <== NOT EXECUTED
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
25b94: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
25b98: e1530002 cmp r3, r2 <== NOT EXECUTED
25b9c: 9a00004a bls 25ccc <fat_file_read+0x158> <== NOT EXECUTED
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
25ba0: e1550003 cmp r5, r3 <== NOT EXECUTED
25ba4: 9a00004b bls 25cd8 <fat_file_read+0x164> <== NOT EXECUTED
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
25ba8: e0645003 rsb r5, r4, r3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25bac: e59a3020 ldr r3, [sl, #32] <== NOT EXECUTED
25bb0: e3530001 cmp r3, #1 <== NOT EXECUTED
{
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
25bb4: e3a03000 mov r3, #0 <== NOT EXECUTED
25bb8: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25bbc: 0a000049 beq 25ce8 <fat_file_read+0x174> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
25bc0: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED
25bc4: e1a03334 lsr r3, r4, r3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
25bc8: e28db010 add fp, sp, #16 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
25bcc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
25bd0: e1a02003 mov r2, r3 <== NOT EXECUTED
25bd4: e1a00006 mov r0, r6 <== NOT EXECUTED
25bd8: e1a0100a mov r1, sl <== NOT EXECUTED
25bdc: e1a0300b mov r3, fp <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
25be0: e1d790b6 ldrh r9, [r7, #6] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
25be4: ebfffdcd bl 25320 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
25be8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
25bec: 11a00008 movne r0, r8 <== NOT EXECUTED
25bf0: 1a000036 bne 25cd0 <fat_file_read+0x15c> <== NOT EXECUTED
return rc;
while (count > 0)
25bf4: e3550000 cmp r5, #0 <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
25bf8: e2499001 sub r9, r9, #1 <== NOT EXECUTED
25bfc: e0049009 and r9, r4, r9 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
25c00: 01a00005 moveq r0, r5 <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
25c04: e58d9008 str r9, [sp, #8] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
25c08: 01a08000 moveq r8, r0 <== NOT EXECUTED
25c0c: 01a09000 moveq r9, r0 <== NOT EXECUTED
25c10: 0a000051 beq 25d5c <fat_file_read+0x1e8> <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
25c14: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED
25c18: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED
25c1c: e58da00c str sl, [sp, #12] <== NOT EXECUTED
25c20: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
25c24: e59da038 ldr sl, [sp, #56] ; 0x38 <== NOT EXECUTED
25c28: ea000003 b 25c3c <fat_file_read+0xc8> <== NOT EXECUTED
return rc;
while (count > 0)
25c2c: e0555004 subs r5, r5, r4 <== NOT EXECUTED
25c30: 0a000047 beq 25d54 <fat_file_read+0x1e0> <== NOT EXECUTED
25c34: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED
25c38: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
25c3c: e1d740b6 ldrh r4, [r7, #6] <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
25c40: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
25c44: e0614004 rsb r4, r1, r4 <== NOT EXECUTED
25c48: e1540005 cmp r4, r5 <== NOT EXECUTED
25c4c: 21a04005 movcs r4, r5 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25c50: e3500000 cmp r0, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
25c54: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25c58: e2400002 sub r0, r0, #2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25c5c: 1a000003 bne 25c70 <fat_file_read+0xfc> <== NOT EXECUTED
25c60: e5d3c00a ldrb ip, [r3, #10] <== NOT EXECUTED
25c64: e31c0003 tst ip, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25c68: 1593e01c ldrne lr, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25c6c: 1a000002 bne 25c7c <fat_file_read+0x108> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25c70: e593c030 ldr ip, [r3, #48] ; 0x30 <== NOT EXECUTED
25c74: e5d3e005 ldrb lr, [r3, #5] <== NOT EXECUTED
25c78: e08cee10 add lr, ip, r0, lsl lr <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
25c7c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
25c80: e0022001 and r2, r2, r1 <== NOT EXECUTED
25c84: e08ac008 add ip, sl, r8 <== NOT EXECUTED
25c88: e1a03004 mov r3, r4 <== NOT EXECUTED
25c8c: e1a00006 mov r0, r6 <== NOT EXECUTED
25c90: e08e1931 add r1, lr, r1, lsr r9 <== NOT EXECUTED
25c94: e58dc000 str ip, [sp] <== NOT EXECUTED
25c98: eb0002f4 bl 26870 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
25c9c: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
25ca0: e0888004 add r8, r8, r4 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25ca4: e1a0200b mov r2, fp <== NOT EXECUTED
25ca8: e1a00006 mov r0, r6 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
25cac: ba000026 blt 25d4c <fat_file_read+0x1d8> <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
25cb0: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25cb4: e1a01009 mov r1, r9 <== NOT EXECUTED
25cb8: eb00670e bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
25cbc: e2501000 subs r1, r0, #0 <== NOT EXECUTED
25cc0: 0affffd9 beq 25c2c <fat_file_read+0xb8> <== NOT EXECUTED
25cc4: e1a00001 mov r0, r1 <== NOT EXECUTED
25cc8: ea000000 b 25cd0 <fat_file_read+0x15c> <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
25ccc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25cd0: e28dd014 add sp, sp, #20 <== NOT EXECUTED
25cd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
25cd8: e0652003 rsb r2, r5, r3 <== NOT EXECUTED
25cdc: e1540002 cmp r4, r2 <== NOT EXECUTED
25ce0: 9affffb1 bls 25bac <fat_file_read+0x38> <== NOT EXECUTED
25ce4: eaffffaf b 25ba8 <fat_file_read+0x34> <== NOT EXECUTED
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25ce8: e59a3024 ldr r3, [sl, #36] ; 0x24 <== NOT EXECUTED
25cec: e3530000 cmp r3, #0 <== NOT EXECUTED
25cf0: 1affffb2 bne 25bc0 <fat_file_read+0x4c> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
25cf4: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED
25cf8: e3130003 tst r3, #3 <== NOT EXECUTED
25cfc: 0affffaf beq 25bc0 <fat_file_read+0x4c> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
25d00: e59a301c ldr r3, [sl, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25d04: e3530000 cmp r3, #0 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25d08: 15d71005 ldrbne r1, [r7, #5] <== NOT EXECUTED
25d0c: 15972030 ldrne r2, [r7, #48] ; 0x30 <== NOT EXECUTED
25d10: 12433002 subne r3, r3, #2 <== NOT EXECUTED
25d14: 10823113 addne r3, r2, r3, lsl r1 <== NOT EXECUTED
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
25d18: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
25d1c: 0597301c ldreq r3, [r7, #28] <== NOT EXECUTED
25d20: e5d71002 ldrb r1, [r7, #2] <== NOT EXECUTED
25d24: e59dc038 ldr ip, [sp, #56] ; 0x38 <== NOT EXECUTED
25d28: e2422001 sub r2, r2, #1 <== NOT EXECUTED
25d2c: e0831134 add r1, r3, r4, lsr r1 <== NOT EXECUTED
25d30: e0042002 and r2, r4, r2 <== NOT EXECUTED
25d34: e1a00006 mov r0, r6 <== NOT EXECUTED
25d38: e1a03005 mov r3, r5 <== NOT EXECUTED
25d3c: e58dc000 str ip, [sp] <== NOT EXECUTED
25d40: eb0002ca bl 26870 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
25d44: e3500000 cmp r0, #0 <== NOT EXECUTED
25d48: aaffffe0 bge 25cd0 <fat_file_read+0x15c> <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
25d4c: e3e00000 mvn r0, #0 <== NOT EXECUTED
25d50: eaffffde b 25cd0 <fat_file_read+0x15c> <== NOT EXECUTED
25d54: e59da00c ldr sl, [sp, #12] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
25d58: e1a00008 mov r0, r8 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
25d5c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
25d60: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED
25d64: e2424001 sub r4, r2, #1 <== NOT EXECUTED
25d68: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
25d6c: e0848008 add r8, r4, r8 <== NOT EXECUTED
25d70: e08c8338 add r8, ip, r8, lsr r3 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
25d74: e58a9038 str r9, [sl, #56] ; 0x38 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
25d78: e58a8034 str r8, [sl, #52] ; 0x34 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
25d7c: eaffffd3 b 25cd0 <fat_file_read+0x15c> <== NOT EXECUTED
00025240 <fat_file_reopen>:
* RC_OK
*/
int
fat_file_reopen(fat_file_fd_t *fat_fd)
{
fat_fd->links_num++;
25240: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
25244: e2833001 add r3, r3, #1 <== NOT EXECUTED
25248: e5803008 str r3, [r0, #8] <== NOT EXECUTED
return RC_OK;
}
2524c: e3a00000 mov r0, #0 <== NOT EXECUTED
25250: e12fff1e bx lr <== NOT EXECUTED
00025254 <fat_file_size>:
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25254: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25258: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
2525c: e3530001 cmp r3, #1 <== NOT EXECUTED
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
25260: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
25264: e1a05001 mov r5, r1 <== NOT EXECUTED
25268: e1a08000 mov r8, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2526c: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
25270: e591601c ldr r6, [r1, #28] <== NOT EXECUTED
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25274: 0a000020 beq 252fc <fat_file_size+0xa8> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
25278: e3a03000 mov r3, #0 <== NOT EXECUTED
2527c: e5853018 str r3, [r5, #24] <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
25280: e284100c add r1, r4, #12 <== NOT EXECUTED
25284: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
25288: e0061001 and r1, r6, r1 <== NOT EXECUTED
2528c: e1510002 cmp r1, r2 <== NOT EXECUTED
25290: 2a000015 bcs 252ec <fat_file_size+0x98> <== NOT EXECUTED
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
25294: e28d7004 add r7, sp, #4 <== NOT EXECUTED
25298: e5276004 str r6, [r7, #-4]! <== NOT EXECUTED
2529c: ea00000a b 252cc <fat_file_size+0x78> <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
252a0: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED
252a4: e1d430b6 ldrh r3, [r4, #6] <== NOT EXECUTED
252a8: e0823003 add r3, r2, r3 <== NOT EXECUTED
252ac: e5853018 str r3, [r5, #24] <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
252b0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
252b4: e284100c add r1, r4, #12 <== NOT EXECUTED
252b8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
252bc: e0031001 and r1, r3, r1 <== NOT EXECUTED
252c0: e1510002 cmp r1, r2 <== NOT EXECUTED
252c4: 2a000009 bcs 252f0 <fat_file_size+0x9c> <== NOT EXECUTED
252c8: e1a06003 mov r6, r3 <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
252cc: e1a01006 mov r1, r6 <== NOT EXECUTED
252d0: e1a00008 mov r0, r8 <== NOT EXECUTED
252d4: e1a0200d mov r2, sp <== NOT EXECUTED
252d8: eb006986 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
252dc: e3500000 cmp r0, #0 <== NOT EXECUTED
252e0: 0affffee beq 252a0 <fat_file_size+0x4c> <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
252e4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
252e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
252ec: e1a06003 mov r6, r3 <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
252f0: e585603c str r6, [r5, #60] ; 0x3c <== NOT EXECUTED
252f4: e3a00000 mov r0, #0 <== NOT EXECUTED
return rc;
252f8: eafffff9 b 252e4 <fat_file_size+0x90> <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
252fc: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED
25300: e3500000 cmp r0, #0 <== NOT EXECUTED
25304: 1affffdb bne 25278 <fat_file_size+0x24> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
25308: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
2530c: e3130003 tst r3, #3 <== NOT EXECUTED
25310: 0affffd8 beq 25278 <fat_file_size+0x24> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
25314: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
25318: e5813018 str r3, [r1, #24] <== NOT EXECUTED
return rc;
2531c: eafffff0 b 252e4 <fat_file_size+0x90> <== NOT EXECUTED
00025634 <fat_file_truncate>:
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
25634: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
25638: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
2563c: e1530002 cmp r3, r2 <== NOT EXECUTED
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
25640: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
25644: e1a05001 mov r5, r1 <== NOT EXECUTED
25648: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2564c: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
25650: 9a00002d bls 2570c <fat_file_truncate+0xd8> <== NOT EXECUTED
uint32_t new_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
25654: e3a06000 mov r6, #0 <== NOT EXECUTED
25658: e58d6004 str r6, [sp, #4] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
2565c: e3530000 cmp r3, #0 <== NOT EXECUTED
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
25660: e3e06000 mvn r6, #0 <== NOT EXECUTED
25664: e58d6000 str r6, [sp] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
25668: 0a00002a beq 25718 <fat_file_truncate+0xe4> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
2566c: e1dc60b6 ldrh r6, [ip, #6] <== NOT EXECUTED
25670: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED
25674: e2466001 sub r6, r6, #1 <== NOT EXECUTED
25678: e0866002 add r6, r6, r2 <== NOT EXECUTED
2567c: e1a06c36 lsr r6, r6, ip <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
25680: e1530c16 cmp r3, r6, lsl ip <== NOT EXECUTED
25684: 9a000020 bls 2570c <fat_file_truncate+0xd8> <== NOT EXECUTED
return RC_OK;
if (cl_start != 0)
25688: e3560000 cmp r6, #0 <== NOT EXECUTED
2568c: 0a000004 beq 256a4 <fat_file_truncate+0x70> <== NOT EXECUTED
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
25690: e2462001 sub r2, r6, #1 <== NOT EXECUTED
25694: e1a0300d mov r3, sp <== NOT EXECUTED
25698: ebffff20 bl 25320 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
2569c: e3500000 cmp r0, #0 <== NOT EXECUTED
256a0: 1a00001a bne 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
256a4: e1a00004 mov r0, r4 <== NOT EXECUTED
256a8: e1a01005 mov r1, r5 <== NOT EXECUTED
256ac: e1a02006 mov r2, r6 <== NOT EXECUTED
256b0: e28d3004 add r3, sp, #4 <== NOT EXECUTED
256b4: ebffff19 bl 25320 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
256b8: e3500000 cmp r0, #0 <== NOT EXECUTED
256bc: 1a000013 bne 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
256c0: e1a00004 mov r0, r4 <== NOT EXECUTED
256c4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
256c8: eb0068eb bl 3fa7c <fat_free_fat_clusters_chain> <== NOT EXECUTED
if (rc != RC_OK)
256cc: e3500000 cmp r0, #0 <== NOT EXECUTED
256d0: 1a00000e bne 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
return rc;
if (cl_start != 0)
256d4: e3560000 cmp r6, #0 <== NOT EXECUTED
256d8: 0a00000c beq 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
256dc: e1a00004 mov r0, r4 <== NOT EXECUTED
256e0: e59d1000 ldr r1, [sp] <== NOT EXECUTED
256e4: e3e02000 mvn r2, #0 <== NOT EXECUTED
256e8: eb0067e1 bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
256ec: e3500000 cmp r0, #0 <== NOT EXECUTED
256f0: 1a000006 bne 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
256f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
256f8: e2466001 sub r6, r6, #1 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
256fc: e585303c str r3, [r5, #60] ; 0x3c <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
25700: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
25704: e5853038 str r3, [r5, #56] ; 0x38 <== NOT EXECUTED
25708: ea000000 b 25710 <fat_file_truncate+0xdc> <== NOT EXECUTED
fat_fd->map.last_cln = new_last_cln;
2570c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return RC_OK;
}
25710: e28dd008 add sp, sp, #8 <== NOT EXECUTED
25714: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
25718: e3a01f9b mov r1, #620 ; 0x26c <== NOT EXECUTED
2571c: e2811001 add r1, r1, #1 <== NOT EXECUTED
25720: e59f0008 ldr r0, [pc, #8] ; 25730 <fat_file_truncate+0xfc> <== NOT EXECUTED
25724: e59f2008 ldr r2, [pc, #8] ; 25734 <fat_file_truncate+0x100><== NOT EXECUTED
25728: e59f3008 ldr r3, [pc, #8] ; 25738 <fat_file_truncate+0x104><== NOT EXECUTED
2572c: eb000d39 bl 28c18 <__assert_func> <== NOT EXECUTED
0002591c <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2591c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
25920: e2534000 subs r4, r3, #0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
25924: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
25928: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2592c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
25930: e1a08002 mov r8, r2 <== NOT EXECUTED
25934: e1a07001 mov r7, r1 <== NOT EXECUTED
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
25938: 01a00004 moveq r0, r4 <== NOT EXECUTED
2593c: 0a00005a beq 25aac <fat_file_write+0x190> <== NOT EXECUTED
return cmpltd;
if ( start > fat_fd->fat_file_size )
25940: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
25944: e1530002 cmp r3, r2 <== NOT EXECUTED
{
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
25948: e3a03000 mov r3, #0 <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
2594c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
{
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
25950: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
uint32_t c = 0;
if ( count == 0 )
return cmpltd;
if ( start > fat_fd->fat_file_size )
25954: 3a000076 bcc 25b34 <fat_file_write+0x218> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
25958: e5913014 ldr r3, [r1, #20] <== NOT EXECUTED
2595c: e1540003 cmp r4, r3 <== NOT EXECUTED
25960: 8a000073 bhi 25b34 <fat_file_write+0x218> <== NOT EXECUTED
25964: e0643003 rsb r3, r4, r3 <== NOT EXECUTED
25968: e1520003 cmp r2, r3 <== NOT EXECUTED
2596c: 8a000070 bhi 25b34 <fat_file_write+0x218> <== NOT EXECUTED
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
25970: e084a002 add sl, r4, r2 <== NOT EXECUTED
25974: e1a0200a mov r2, sl <== NOT EXECUTED
25978: e28d3010 add r3, sp, #16 <== NOT EXECUTED
2597c: ebffff6e bl 2573c <fat_file_extend> <== NOT EXECUTED
if (rc != RC_OK)
25980: e3500000 cmp r0, #0 <== NOT EXECUTED
25984: 1a000048 bne 25aac <fat_file_write+0x190> <== NOT EXECUTED
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
25988: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2598c: e15a0003 cmp sl, r3 <== NOT EXECUTED
count = c - start;
25990: 10684003 rsbne r4, r8, r3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25994: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED
25998: e3530001 cmp r3, #1 <== NOT EXECUTED
2599c: 0a000044 beq 25ab4 <fat_file_write+0x198> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
259a0: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED
259a4: e1a03338 lsr r3, r8, r3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
259a8: e28db014 add fp, sp, #20 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
259ac: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
259b0: e1a02003 mov r2, r3 <== NOT EXECUTED
259b4: e1a00005 mov r0, r5 <== NOT EXECUTED
259b8: e1a01007 mov r1, r7 <== NOT EXECUTED
259bc: e1a0300b mov r3, fp <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
259c0: e1d6a0b6 ldrh sl, [r6, #6] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
259c4: ebfffe55 bl 25320 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
259c8: e3500000 cmp r0, #0 <== NOT EXECUTED
259cc: 1a000036 bne 25aac <fat_file_write+0x190> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
259d0: e24aa001 sub sl, sl, #1 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
259d4: e3540000 cmp r4, #0 <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
259d8: e008a00a and sl, r8, sl <== NOT EXECUTED
259dc: e58da008 str sl, [sp, #8] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
259e0: 01a09000 moveq r9, r0 <== NOT EXECUTED
259e4: 01a08000 moveq r8, r0 <== NOT EXECUTED
259e8: 0a000058 beq 25b50 <fat_file_write+0x234> <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
259ec: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED
259f0: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED
259f4: e1a08000 mov r8, r0 <== NOT EXECUTED
259f8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
259fc: e58d700c str r7, [sp, #12] <== NOT EXECUTED
25a00: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED
25a04: ea000004 b 25a1c <fat_file_write+0x100> <== NOT EXECUTED
return rc;
while (count > 0)
25a08: e0544007 subs r4, r4, r7 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
25a0c: e0888007 add r8, r8, r7 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
25a10: 0a00004c beq 25b48 <fat_file_write+0x22c> <== NOT EXECUTED
25a14: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED
25a18: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
25a1c: e1d6c0b6 ldrh ip, [r6, #6] <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
25a20: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
25a24: e061c00c rsb ip, r1, ip <== NOT EXECUTED
25a28: e15c0004 cmp ip, r4 <== NOT EXECUTED
25a2c: 21a0c004 movcs ip, r4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25a30: e3500000 cmp r0, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
25a34: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25a38: e2400002 sub r0, r0, #2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25a3c: 1a000003 bne 25a50 <fat_file_write+0x134> <== NOT EXECUTED
25a40: e5d3e00a ldrb lr, [r3, #10] <== NOT EXECUTED
25a44: e31e0003 tst lr, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25a48: 1593701c ldrne r7, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25a4c: 1a000002 bne 25a5c <fat_file_write+0x140> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25a50: e593e030 ldr lr, [r3, #48] ; 0x30 <== NOT EXECUTED
25a54: e5d37005 ldrb r7, [r3, #5] <== NOT EXECUTED
25a58: e08e7710 add r7, lr, r0, lsl r7 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
25a5c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
25a60: e0022001 and r2, r2, r1 <== NOT EXECUTED
25a64: e08ae008 add lr, sl, r8 <== NOT EXECUTED
25a68: e1a0300c mov r3, ip <== NOT EXECUTED
25a6c: e1a00005 mov r0, r5 <== NOT EXECUTED
25a70: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED
25a74: e58de000 str lr, [sp] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
25a78: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
25a7c: eb0002ae bl 2653c <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
25a80: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25a84: e1a0200b mov r2, fp <== NOT EXECUTED
25a88: e1a00005 mov r0, r5 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
25a8c: ba000026 blt 25b2c <fat_file_write+0x210> <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
25a90: e59d9014 ldr r9, [sp, #20] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25a94: e1a01009 mov r1, r9 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
25a98: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
25a9c: eb006795 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
25aa0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
25aa4: 0affffd7 beq 25a08 <fat_file_write+0xec> <== NOT EXECUTED
25aa8: e1a00001 mov r0, r1 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
25aac: e28dd018 add sp, sp, #24 <== NOT EXECUTED
25ab0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
25ab4: e5973024 ldr r3, [r7, #36] ; 0x24 <== NOT EXECUTED
25ab8: e3530000 cmp r3, #0 <== NOT EXECUTED
25abc: 1affffb7 bne 259a0 <fat_file_write+0x84> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
25ac0: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED
25ac4: e3130003 tst r3, #3 <== NOT EXECUTED
25ac8: 0affffb4 beq 259a0 <fat_file_write+0x84> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
25acc: e597201c ldr r2, [r7, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25ad0: e3520000 cmp r2, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
25ad4: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25ad8: 1a000003 bne 25aec <fat_file_write+0x1d0> <== NOT EXECUTED
25adc: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
25ae0: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
25ae4: 1593301c ldrne r3, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
25ae8: 1a000003 bne 25afc <fat_file_write+0x1e0> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
25aec: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
25af0: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
25af4: e2422002 sub r2, r2, #2 <== NOT EXECUTED
25af8: e0813312 add r3, r1, r2, lsl r3 <== NOT EXECUTED
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
25afc: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED
25b00: e5d61002 ldrb r1, [r6, #2] <== NOT EXECUTED
25b04: e59dc03c ldr ip, [sp, #60] ; 0x3c <== NOT EXECUTED
25b08: e2422001 sub r2, r2, #1 <== NOT EXECUTED
25b0c: e0831138 add r1, r3, r8, lsr r1 <== NOT EXECUTED
25b10: e0082002 and r2, r8, r2 <== NOT EXECUTED
25b14: e1a00005 mov r0, r5 <== NOT EXECUTED
25b18: e1a03004 mov r3, r4 <== NOT EXECUTED
25b1c: e58dc000 str ip, [sp] <== NOT EXECUTED
25b20: eb000285 bl 2653c <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
25b24: e3500000 cmp r0, #0 <== NOT EXECUTED
25b28: aaffffdf bge 25aac <fat_file_write+0x190> <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
25b2c: e3e00000 mvn r0, #0 <== NOT EXECUTED
25b30: eaffffdd b 25aac <fat_file_write+0x190> <== NOT EXECUTED
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
25b34: eb007ac1 bl 44640 <__errno> <== NOT EXECUTED
25b38: e3a03005 mov r3, #5 <== NOT EXECUTED
25b3c: e5803000 str r3, [r0] <== NOT EXECUTED
25b40: e3e00000 mvn r0, #0 <== NOT EXECUTED
25b44: eaffffd8 b 25aac <fat_file_write+0x190> <== NOT EXECUTED
25b48: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
25b4c: e1a00008 mov r0, r8 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
25b50: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
25b54: e2412001 sub r2, r1, #1 <== NOT EXECUTED
25b58: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED
25b5c: e0828008 add r8, r2, r8 <== NOT EXECUTED
25b60: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
25b64: e0828338 add r8, r2, r8, lsr r3 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
25b68: e5879038 str r9, [r7, #56] ; 0x38 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
25b6c: e5878034 str r8, [r7, #52] ; 0x34 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
25b70: eaffffcd b 25aac <fat_file_write+0x190> <== NOT EXECUTED
0003fa7c <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
3fa7c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
3fa80: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fa84: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
3fa88: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED
3fa8c: e0013003 and r3, r1, r3 <== NOT EXECUTED
)
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
3fa90: e3a07000 mov r7, #0 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
3fa94: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fa98: e1520003 cmp r2, r3 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
3fa9c: e1a06000 mov r6, r0 <== NOT EXECUTED
3faa0: e1a09001 mov r9, r1 <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
3faa4: e58d7000 str r7, [sp] <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3faa8: 91a08007 movls r8, r7 <== NOT EXECUTED
3faac: 9a00001d bls 3fb28 <fat_free_fat_clusters_chain+0xac> <== NOT EXECUTED
3fab0: e1a04001 mov r4, r1 <== NOT EXECUTED
3fab4: e1a08007 mov r8, r7 <== NOT EXECUTED
3fab8: e1a0a00d mov sl, sp <== NOT EXECUTED
3fabc: ea000009 b 3fae8 <fat_free_fat_clusters_chain+0x6c> <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
3fac0: ebfffeeb bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
3fac4: e59d4000 ldr r4, [sp] <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fac8: e285200c add r2, r5, #12 <== NOT EXECUTED
3facc: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
if ( rc != RC_OK )
3fad0: e3500000 cmp r0, #0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fad4: e0042002 and r2, r4, r2 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
if ( rc != RC_OK )
3fad8: 11a08000 movne r8, r0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fadc: e1520003 cmp r2, r3 <== NOT EXECUTED
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
3fae0: e2877001 add r7, r7, #1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
3fae4: 2a00000f bcs 3fb28 <fat_free_fat_clusters_chain+0xac> <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
3fae8: e1a01004 mov r1, r4 <== NOT EXECUTED
3faec: e1a0200d mov r2, sp <== NOT EXECUTED
3faf0: e1a00006 mov r0, r6 <== NOT EXECUTED
3faf4: ebffff7f bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
3faf8: e1a01004 mov r1, r4 <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
3fafc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
3fb00: e1a02004 mov r2, r4 <== NOT EXECUTED
3fb04: e1a00006 mov r0, r6 <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
3fb08: 0affffec beq 3fac0 <fat_free_fat_clusters_chain+0x44> <== NOT EXECUTED
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
3fb0c: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED
3fb10: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
3fb14: 10873003 addne r3, r7, r3 <== NOT EXECUTED
3fb18: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED
fat_buf_release(fs_info);
3fb1c: e1a00005 mov r0, r5 <== NOT EXECUTED
3fb20: ebff99a4 bl 261b8 <fat_buf_release> <== NOT EXECUTED
return rc;
3fb24: ea000007 b 3fb48 <fat_free_fat_clusters_chain+0xcc> <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
3fb28: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED
3fb2c: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
3fb30: 10873003 addne r3, r7, r3 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
3fb34: e5859044 str r9, [r5, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
fs_info->vol.free_cls += freed_cls_cnt;
3fb38: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED
fat_buf_release(fs_info);
3fb3c: e1a00005 mov r0, r5 <== NOT EXECUTED
3fb40: ebff999c bl 261b8 <fat_buf_release> <== NOT EXECUTED
3fb44: e1a04008 mov r4, r8 <== NOT EXECUTED
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
3fb48: e1a00004 mov r0, r4 <== NOT EXECUTED
3fb4c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3fb50: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0002608c <fat_free_unique_ino>:
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
2608c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
26090: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED
26094: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED
26098: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
2609c: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED
260a0: e2021007 and r1, r2, #7 <== NOT EXECUTED
260a4: e3a0c001 mov ip, #1 <== NOT EXECUTED
260a8: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED
260ac: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED
}
260b0: e12fff1e bx lr <== NOT EXECUTED
0003f8f8 <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
3f8f8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
3f8fc: e3a03000 mov r3, #0 <== NOT EXECUTED
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
3f900: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_bdbuf_buffer *block0 = NULL;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
3f904: e3510001 cmp r1, #1 <== NOT EXECUTED
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
3f908: e1a05001 mov r5, r1 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
3f90c: e58d3000 str r3, [sp] <== NOT EXECUTED
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
3f910: e1a0a002 mov sl, r2 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
3f914: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
rtems_bdbuf_buffer *block0 = NULL;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
3f918: 9a000021 bls 3f9a4 <fat_get_fat_cluster+0xac> <== NOT EXECUTED
3f91c: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
3f920: e2833001 add r3, r3, #1 <== NOT EXECUTED
3f924: e1510003 cmp r1, r3 <== NOT EXECUTED
3f928: 8a00001d bhi 3f9a4 <fat_get_fat_cluster+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
3f92c: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
3f930: e3130001 tst r3, #1 <== NOT EXECUTED
3f934: 1a000020 bne 3f9bc <fat_get_fat_cluster+0xc4> <== NOT EXECUTED
3f938: e3130002 tst r3, #2 <== NOT EXECUTED
3f93c: 15d48002 ldrbne r8, [r4, #2] <== NOT EXECUTED
3f940: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f944: 05d48002 ldrbeq r8, [r4, #2] <== NOT EXECUTED
3f948: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f94c: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED
3f950: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED
3f954: 10838836 addne r8, r3, r6, lsr r8 <== NOT EXECUTED
3f958: 00838836 addeq r8, r3, r6, lsr r8 <== NOT EXECUTED
fs_info->vol.afat_loc;
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, &block0);
3f95c: e1a00004 mov r0, r4 <== NOT EXECUTED
3f960: e1a01008 mov r1, r8 <== NOT EXECUTED
3f964: e3a02001 mov r2, #1 <== NOT EXECUTED
3f968: e1a0300d mov r3, sp <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f96c: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
3f970: ebff9a6b bl 26324 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
3f974: e3500000 cmp r0, #0 <== NOT EXECUTED
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
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, &block0);
3f978: e1a0700d mov r7, sp <== NOT EXECUTED
if (rc != RC_OK)
3f97c: 1a00000c bne 3f9b4 <fat_get_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
3f980: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f984: e2499001 sub r9, r9, #1 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
3f988: e3520002 cmp r2, #2 <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f98c: e0066009 and r6, r6, r9 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
3f990: 0a00000e beq 3f9d0 <fat_get_fat_cluster+0xd8> <== NOT EXECUTED
3f994: e3520004 cmp r2, #4 <== NOT EXECUTED
3f998: 0a000025 beq 3fa34 <fat_get_fat_cluster+0x13c> <== NOT EXECUTED
3f99c: e3520001 cmp r2, #1 <== NOT EXECUTED
3f9a0: 0a00000f beq 3f9e4 <fat_get_fat_cluster+0xec> <== NOT EXECUTED
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
3f9a4: eb001325 bl 44640 <__errno> <== NOT EXECUTED
3f9a8: e3a03005 mov r3, #5 <== NOT EXECUTED
3f9ac: e5803000 str r3, [r0] <== NOT EXECUTED
3f9b0: e3e00000 mvn r0, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
3f9b4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3f9b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
3f9bc: e5d48002 ldrb r8, [r4, #2] <== NOT EXECUTED
3f9c0: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f9c4: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED
3f9c8: e0838836 add r8, r3, r6, lsr r8 <== NOT EXECUTED
3f9cc: eaffffe2 b 3f95c <fat_get_fat_cluster+0x64> <== NOT EXECUTED
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
3f9d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f9d4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f9d8: e19330b6 ldrh r3, [r3, r6] <== NOT EXECUTED
3f9dc: e58a3000 str r3, [sl] <== NOT EXECUTED
break;
3f9e0: eafffff3 b 3f9b4 <fat_get_fat_cluster+0xbc> <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
3f9e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
3f9e8: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
3f9ec: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
3f9f0: e2400001 sub r0, r0, #1 <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
3f9f4: e7d13006 ldrb r3, [r1, r6] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
3f9f8: e1500006 cmp r0, r6 <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
3f9fc: e58a3000 str r3, [sl] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
3fa00: 0a000010 beq 3fa48 <fat_get_fat_cluster+0x150> <== NOT EXECUTED
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
3fa04: e0816006 add r6, r1, r6 <== NOT EXECUTED
3fa08: e5d62001 ldrb r2, [r6, #1] <== NOT EXECUTED
3fa0c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3fa10: e58a3000 str r3, [sl] <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
3fa14: e2150001 ands r0, r5, #1 <== NOT EXECUTED
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
3fa18: 01a03a03 lsleq r3, r3, #20 <== NOT EXECUTED
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
3fa1c: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
3fa20: 01a03a23 lsreq r3, r3, #20 <== NOT EXECUTED
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
3fa24: 158a3000 strne r3, [sl] <== NOT EXECUTED
3fa28: 13a00000 movne r0, #0 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
3fa2c: 058a3000 streq r3, [sl] <== NOT EXECUTED
3fa30: eaffffdf b 3f9b4 <fat_get_fat_cluster+0xbc> <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
3fa34: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3fa38: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3fa3c: e7933006 ldr r3, [r3, r6] <== NOT EXECUTED
3fa40: e58a3000 str r3, [sl] <== NOT EXECUTED
break;
3fa44: eaffffda b 3f9b4 <fat_get_fat_cluster+0xbc> <== NOT EXECUTED
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
3fa48: e1a00004 mov r0, r4 <== NOT EXECUTED
3fa4c: e2881001 add r1, r8, #1 <== NOT EXECUTED
3fa50: e1a0300d mov r3, sp <== NOT EXECUTED
3fa54: ebff9a32 bl 26324 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
3fa58: e3500000 cmp r0, #0 <== NOT EXECUTED
3fa5c: 1affffd4 bne 3f9b4 <fat_get_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
3fa60: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3fa64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3fa68: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3fa6c: e59a3000 ldr r3, [sl] <== NOT EXECUTED
3fa70: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3fa74: e58a3000 str r3, [sl] <== NOT EXECUTED
3fa78: eaffffe5 b 3fa14 <fat_get_fat_cluster+0x11c> <== NOT EXECUTED
000260cc <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
260cc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
260d0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
260d4: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
260d8: e3a05000 mov r5, #0 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
260dc: e3510000 cmp r1, #0 <== NOT EXECUTED
260e0: e1a02001 mov r2, r1 <== NOT EXECUTED
260e4: 0a000019 beq 26150 <fat_get_unique_ino+0x84> <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
260e8: e284006c add r0, r4, #108 ; 0x6c <== NOT EXECUTED
260ec: e8900009 ldm r0, {r0, r3} <== NOT EXECUTED
260f0: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED
260f4: e203c007 and ip, r3, #7 <== NOT EXECUTED
260f8: e1a02c56 asr r2, r6, ip <== NOT EXECUTED
260fc: e3120001 tst r2, #1 <== NOT EXECUTED
26100: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED
26104: 0a00001b beq 26178 <fat_get_unique_ino+0xac> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
26108: e3a02000 mov r2, #0 <== NOT EXECUTED
2610c: ea000006 b 2612c <fat_get_unique_ino+0x60> <== NOT EXECUTED
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
26110: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED
26114: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED
26118: e203c007 and ip, r3, #7 <== NOT EXECUTED
2611c: e1a07c56 asr r7, r6, ip <== NOT EXECUTED
26120: e3170001 tst r7, #1 <== NOT EXECUTED
26124: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED
26128: 0a000012 beq 26178 <fat_get_unique_ino+0xac> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
2612c: e2833001 add r3, r3, #1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
26130: e1510003 cmp r1, r3 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
26134: e2822001 add r2, r2, #1 <== 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;
26138: 81a0c003 movhi ip, r3 <== NOT EXECUTED
2613c: 91a0c005 movls ip, r5 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
26140: e1520001 cmp r2, r1 <== 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;
26144: e584c070 str ip, [r4, #112] ; 0x70 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
26148: 3afffff0 bcc 26110 <fat_get_unique_ino+0x44> <== NOT EXECUTED
2614c: e1a02001 mov r2, r1 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
26150: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
26154: e26336ff rsb r3, r3, #267386880 ; 0xff00000 <== NOT EXECUTED
26158: e2833aff add r3, r3, #1044480 ; 0xff000 <== NOT EXECUTED
2615c: e2833eff add r3, r3, #4080 ; 0xff0 <== NOT EXECUTED
26160: e1a01082 lsl r1, r2, #1 <== NOT EXECUTED
26164: e283300f add r3, r3, #15 <== NOT EXECUTED
26168: e1510003 cmp r1, r3 <== NOT EXECUTED
2616c: 3a000008 bcc 26194 <fat_get_unique_ino+0xc8> <== NOT EXECUTED
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
26170: e3a00000 mov r0, #0 <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
26174: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
26178: e3a03001 mov r3, #1 <== NOT EXECUTED
2617c: e186cc13 orr ip, r6, r3, lsl ip <== NOT EXECUTED
26180: e5c7c000 strb ip, [r7] <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
26184: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
26188: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED
2618c: e0800003 add r0, r0, r3 <== NOT EXECUTED
26190: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
26194: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
26198: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
2619c: ebff8c47 bl 92c0 <realloc> <== NOT EXECUTED
if (fs_info->uino != NULL)
261a0: e3500000 cmp r0, #0 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
261a4: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED
if (fs_info->uino != NULL)
261a8: 0afffff0 beq 26170 <fat_get_unique_ino+0xa4> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
261ac: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED
261b0: e5841070 str r1, [r4, #112] ; 0x70 <== NOT EXECUTED
261b4: eaffffc8 b 260dc <fat_get_unique_ino+0x10> <== NOT EXECUTED
000267c0 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
267c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
267c4: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
267c8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
267cc: e58d1000 str r1, [sp] <== NOT EXECUTED
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
267d0: e1a05000 mov r5, r0 <== NOT EXECUTED
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
267d4: e3a01001 mov r1, #1 <== NOT EXECUTED
267d8: e1d400b6 ldrh r0, [r4, #6] <== NOT EXECUTED
267dc: ebff83df bl 7760 <calloc> <== NOT EXECUTED
if ( buf == NULL )
267e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
267e4: 11a0700d movne r7, sp <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
267e8: 0a00001b beq 2685c <fat_init_clusters_chain+0x9c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
267ec: e59d3000 ldr r3, [sp] <== NOT EXECUTED
267f0: e594e00c ldr lr, [r4, #12] <== NOT EXECUTED
267f4: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
267f8: e1a01003 mov r1, r3 <== NOT EXECUTED
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
267fc: e003300e and r3, r3, lr <== NOT EXECUTED
26800: e153000c cmp r3, ip <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
26804: e1a02006 mov r2, r6 <== NOT EXECUTED
26808: e1a00005 mov r0, r5 <== NOT EXECUTED
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2680c: 2a00000e bcs 2684c <fat_init_clusters_chain+0x8c> <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
26810: ebffffd4 bl 26768 <fat_cluster_write> <== NOT EXECUTED
26814: e1a08000 mov r8, r0 <== NOT EXECUTED
if ( ret == -1 )
26818: e3780001 cmn r8, #1 <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2681c: e1a0200d mov r2, sp <== NOT EXECUTED
26820: e1a00005 mov r0, r5 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
26824: 0a000003 beq 26838 <fat_init_clusters_chain+0x78> <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
26828: e59d1000 ldr r1, [sp] <== NOT EXECUTED
2682c: eb006431 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
26830: e2508000 subs r8, r0, #0 <== NOT EXECUTED
26834: 0affffec beq 267ec <fat_init_clusters_chain+0x2c> <== NOT EXECUTED
{
free(buf);
26838: e1a00006 mov r0, r6 <== NOT EXECUTED
2683c: ebff854b bl 7d70 <free> <== NOT EXECUTED
}
}
free(buf);
return rc;
}
26840: e1a00008 mov r0, r8 <== NOT EXECUTED
26844: e28dd004 add sp, sp, #4 <== NOT EXECUTED
26848: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
free(buf);
return rc;
}
}
free(buf);
2684c: e1a00006 mov r0, r6 <== NOT EXECUTED
26850: ebff8546 bl 7d70 <free> <== NOT EXECUTED
26854: e3a08000 mov r8, #0 <== NOT EXECUTED
return rc;
26858: eafffff8 b 26840 <fat_init_clusters_chain+0x80> <== NOT EXECUTED
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
2685c: eb007777 bl 44640 <__errno> <== NOT EXECUTED
26860: e3a03005 mov r3, #5 <== NOT EXECUTED
26864: e5803000 str r3, [r0] <== NOT EXECUTED
26868: e3e08000 mvn r8, #0 <== NOT EXECUTED
2686c: eafffff3 b 26840 <fat_init_clusters_chain+0x80> <== NOT EXECUTED
0002690c <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2690c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
26910: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED
26914: e1a05000 mov r5, r0 <== NOT EXECUTED
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;
26918: e3a06000 mov r6, #0 <== NOT EXECUTED
rc = stat(mt_entry->dev, &stat_buf);
2691c: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED
26920: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED
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;
26924: e58d60b4 str r6, [sp, #180] ; 0xb4 <== NOT EXECUTED
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
26928: e5954034 ldr r4, [r5, #52] ; 0x34 <== NOT EXECUTED
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
2692c: ebff8b41 bl 9638 <stat> <== NOT EXECUTED
if (rc == -1)
26930: e3700001 cmn r0, #1 <== NOT EXECUTED
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
26934: e1a07000 mov r7, r0 <== NOT EXECUTED
if (rc == -1)
26938: 0a0000e9 beq 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
2693c: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED
26940: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
26944: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
26948: 1a000151 bne 26e94 <fat_init_volume_info+0x588> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
2694c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED
26950: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
26954: ebff7fa0 bl 67dc <rtems_disk_obtain> <== NOT EXECUTED
if (vol->dd == NULL)
26958: e3500000 cmp r0, #0 <== NOT EXECUTED
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
2695c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if (vol->dd == NULL)
26960: 0a000168 beq 26f08 <fat_init_volume_info+0x5fc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
26964: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED
26968: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
2696c: e1a02006 mov r2, r6 <== NOT EXECUTED
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
26970: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED
26974: e5841058 str r1, [r4, #88] ; 0x58 <== NOT EXECUTED
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
26978: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED
2697c: ebff7b5d bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
26980: e3500000 cmp r0, #0 <== NOT EXECUTED
26984: 1a00015d bne 26f00 <fat_init_volume_info+0x5f4> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
26988: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED
2698c: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED
26990: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
26994: e28d0004 add r0, sp, #4 <== NOT EXECUTED
26998: eb0083d8 bl 47900 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release( block);
2699c: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED
269a0: ebff76c3 bl 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
269a4: e3500000 cmp r0, #0 <== NOT EXECUTED
269a8: 1a00015b bne 26f1c <fat_init_volume_info+0x610> <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
269ac: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED
269b0: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED
269b4: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
269b8: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
269bc: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED
if ( (vol->bps != 512) &&
269c0: e3520b01 cmp r2, #1024 ; 0x400 <== NOT EXECUTED
269c4: 13520c02 cmpne r2, #512 ; 0x200 <== NOT EXECUTED
269c8: 03a01000 moveq r1, #0 <== NOT EXECUTED
269cc: 13a01001 movne r1, #1 <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
269d0: e1c420b0 strh r2, [r4] <== NOT EXECUTED
if ( (vol->bps != 512) &&
269d4: 0a0000c5 beq 26cf0 <fat_init_volume_info+0x3e4> <== NOT EXECUTED
269d8: e3520b02 cmp r2, #2048 ; 0x800 <== NOT EXECUTED
269dc: 0a000001 beq 269e8 <fat_init_volume_info+0xdc> <== NOT EXECUTED
269e0: e3520a01 cmp r2, #4096 ; 0x1000 <== NOT EXECUTED
269e4: 1a000131 bne 26eb0 <fat_init_volume_info+0x5a4> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
269e8: e3a03000 mov r3, #0 <== NOT EXECUTED
269ec: e5c43003 strb r3, [r4, #3] <== NOT EXECUTED
269f0: e1a034a2 lsr r3, r2, #9 <== NOT EXECUTED
269f4: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
269f8: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED
269fc: e2822001 add r2, r2, #1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
26a00: e3130001 tst r3, #1 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
26a04: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
26a08: 0afffffa beq 269f8 <fat_init_volume_info+0xec> <== NOT EXECUTED
26a0c: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
26a10: e1d410b0 ldrh r1, [r4] <== NOT EXECUTED
26a14: e3a03000 mov r3, #0 <== NOT EXECUTED
26a18: e3110001 tst r1, #1 <== NOT EXECUTED
26a1c: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED
26a20: e1a03001 mov r3, r1 <== NOT EXECUTED
26a24: 1a000008 bne 26a4c <fat_init_volume_info+0x140> <== NOT EXECUTED
26a28: e3a02001 mov r2, #1 <== NOT EXECUTED
26a2c: ea000000 b 26a34 <fat_init_volume_info+0x128> <== NOT EXECUTED
26a30: e1a02000 mov r2, r0 <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
26a34: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED
26a38: e2820001 add r0, r2, #1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
26a3c: e3130001 tst r3, #1 <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
26a40: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
26a44: 0afffff9 beq 26a30 <fat_init_volume_info+0x124> <== NOT EXECUTED
26a48: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
26a4c: e5dd3011 ldrb r3, [sp, #17] <== NOT EXECUTED
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
26a50: e3530000 cmp r3, #0 <== NOT EXECUTED
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
26a54: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
26a58: 0a000114 beq 26eb0 <fat_init_volume_info+0x5a4> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
26a5c: e3a02000 mov r2, #0 <== NOT EXECUTED
26a60: e3130001 tst r3, #1 <== NOT EXECUTED
26a64: e5c42005 strb r2, [r4, #5] <== NOT EXECUTED
26a68: 1a000008 bne 26a90 <fat_init_volume_info+0x184> <== NOT EXECUTED
26a6c: e3a02001 mov r2, #1 <== NOT EXECUTED
26a70: ea000000 b 26a78 <fat_init_volume_info+0x16c> <== NOT EXECUTED
26a74: e1a02000 mov r2, r0 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
26a78: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED
26a7c: e2820001 add r0, r2, #1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
26a80: e3130001 tst r3, #1 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
26a84: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
26a88: 0afffff9 beq 26a74 <fat_init_volume_info+0x168> <== NOT EXECUTED
26a8c: e5c42005 strb r2, [r4, #5] <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
/*
* "bytes per cluster" value greater than 32K is invalid
*/
if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
26a90: e1a03211 lsl r3, r1, r2 <== NOT EXECUTED
26a94: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
26a98: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
26a9c: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
26aa0: e1c430b6 strh r3, [r4, #6] <== NOT EXECUTED
26aa4: 8a000101 bhi 26eb0 <fat_init_volume_info+0x5a4> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
26aa8: e3a02000 mov r2, #0 <== NOT EXECUTED
26aac: e3130001 tst r3, #1 <== NOT EXECUTED
26ab0: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED
26ab4: 1a000008 bne 26adc <fat_init_volume_info+0x1d0> <== NOT EXECUTED
26ab8: e3a02001 mov r2, #1 <== NOT EXECUTED
26abc: ea000000 b 26ac4 <fat_init_volume_info+0x1b8> <== NOT EXECUTED
26ac0: e1a02000 mov r2, r0 <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
26ac4: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED
26ac8: e2820001 add r0, r2, #1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
26acc: e3130001 tst r3, #1 <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
26ad0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
26ad4: 0afffff9 beq 26ac0 <fat_init_volume_info+0x1b4> <== NOT EXECUTED
26ad8: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
26adc: e5dd6014 ldrb r6, [sp, #20] <== NOT EXECUTED
26ae0: e5c46009 strb r6, [r4, #9] <== NOT EXECUTED
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
26ae4: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED
26ae8: e5dd7013 ldrb r7, [sp, #19] <== NOT EXECUTED
26aec: e1837407 orr r7, r3, r7, lsl #8 <== NOT EXECUTED
26af0: e1c471b4 strh r7, [r4, #20] <== NOT EXECUTED
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
26af4: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED
26af8: e5dd3015 ldrb r3, [sp, #21] <== NOT EXECUTED
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
26afc: e2410001 sub r0, r1, #1 <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
26b00: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
26b04: e0800283 add r0, r0, r3, lsl #5 <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
26b08: e1c432b0 strh r3, [r4, #32] <== NOT EXECUTED
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
26b0c: eb00d6de bl 5c68c <__aeabi_idiv> <== NOT EXECUTED
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
26b10: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED
26b14: e1a03310 lsl r3, r0, r3 <== NOT EXECUTED
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
26b18: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
26b1c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
26b20: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED
26b24: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED
26b28: e1932402 orrs r2, r3, r2, lsl #8 <== NOT EXECUTED
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
26b2c: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED
26b30: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED
26b34: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED
26b38: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED
26b3c: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED
26b40: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED
26b44: 01833001 orreq r3, r3, r1 <== NOT EXECUTED
26b48: 01832c02 orreq r2, r3, r2, lsl #24 <== NOT EXECUTED
26b4c: e5842018 str r2, [r4, #24] <== NOT EXECUTED
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
26b50: e5d4c009 ldrb ip, [r4, #9] <== NOT EXECUTED
26b54: e594e018 ldr lr, [r4, #24] <== NOT EXECUTED
26b58: e1d411b4 ldrh r1, [r4, #20] <== NOT EXECUTED
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
26b5c: e0807007 add r7, r0, r7 <== NOT EXECUTED
26b60: e0237296 mla r3, r6, r2, r7 <== NOT EXECUTED
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
26b64: e0221c9e mla r2, lr, ip, r1 <== NOT EXECUTED
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
26b68: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
26b6c: e584201c str r2, [r4, #28] <== NOT EXECUTED
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
26b70: e5dd1018 ldrb r1, [sp, #24] <== NOT EXECUTED
26b74: e5dd2017 ldrb r2, [sp, #23] <== NOT EXECUTED
26b78: e1922401 orrs r2, r2, r1, lsl #8 <== NOT EXECUTED
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
26b7c: 05dd2026 ldrbeq r2, [sp, #38] ; 0x26 <== NOT EXECUTED
26b80: 05dd1025 ldrbeq r1, [sp, #37] ; 0x25 <== NOT EXECUTED
26b84: 01a02802 lsleq r2, r2, #16 <== NOT EXECUTED
26b88: 05dd0024 ldrbeq r0, [sp, #36] ; 0x24 <== NOT EXECUTED
26b8c: 01822401 orreq r2, r2, r1, lsl #8 <== NOT EXECUTED
26b90: 05dd1027 ldrbeq r1, [sp, #39] ; 0x27 <== NOT EXECUTED
26b94: 01822000 orreq r2, r2, r0 <== NOT EXECUTED
26b98: 01822c01 orreq r2, r2, r1, lsl #24 <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
26b9c: e0630002 rsb r0, r3, r2 <== NOT EXECUTED
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);
26ba0: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
26ba4: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED
26ba8: eb00d673 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
26bac: e3a03eff mov r3, #4080 ; 0xff0 <== NOT EXECUTED
26bb0: e2833004 add r3, r3, #4 <== NOT EXECUTED
26bb4: e1500003 cmp r0, r3 <== NOT EXECUTED
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
26bb8: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
26bbc: 8a000050 bhi 26d04 <fat_init_volume_info+0x3f8> <== NOT EXECUTED
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
26bc0: e3a02eff mov r2, #4080 ; 0xff0 <== NOT EXECUTED
vol->eoc_val = FAT_FAT12_EOC;
26bc4: e1a03002 mov r3, r2 <== NOT EXECUTED
26bc8: e2833008 add r3, r3, #8 <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
26bcc: e282200f add r2, r2, #15 <== NOT EXECUTED
vol->data_cls = data_secs / vol->spc;
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
26bd0: e3a01001 mov r1, #1 <== NOT EXECUTED
26bd4: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
26bd8: e584200c str r2, [r4, #12] <== NOT EXECUTED
vol->eoc_val = FAT_FAT12_EOC;
26bdc: e5843010 str r3, [r4, #16] <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
26be0: e3a03000 mov r3, #0 <== NOT EXECUTED
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
26be4: e3e02000 mvn r2, #0 <== NOT EXECUTED
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
26be8: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED
vol->free_cls = 0xFFFFFFFF;
vol->next_cl = 0xFFFFFFFF;
26bec: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
26bf0: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
vol->mirror = 0;
26bf4: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
26bf8: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
26bfc: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
26c00: ebfffd6c bl 261b8 <fat_buf_release> <== NOT EXECUTED
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
26c04: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED
26c08: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
26c0c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
26c10: e0232190 mla r3, r0, r1, r2 <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
26c14: e3a00002 mov r0, #2 <== NOT EXECUTED
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
26c18: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
26c1c: e3a0100c mov r1, #12 <== NOT EXECUTED
26c20: ebff82ce bl 7760 <calloc> <== NOT EXECUTED
if ( fs_info->vhash == NULL )
26c24: e3500000 cmp r0, #0 <== NOT EXECUTED
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
26c28: e1a03000 mov r3, r0 <== NOT EXECUTED
26c2c: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED
if ( fs_info->vhash == NULL )
26c30: 0a0000d0 beq 26f78 <fat_init_volume_info+0x66c> <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
26c34: e280200c add r2, r0, #12 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
26c38: e280c004 add ip, r0, #4 <== NOT EXECUTED
the_chain->permanent_null = NULL;
26c3c: e3a05000 mov r5, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
26c40: e280e010 add lr, r0, #16 <== NOT EXECUTED
the_chain->permanent_null = NULL;
26c44: e5835004 str r5, [r3, #4] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
26c48: e5833008 str r3, [r3, #8] <== NOT EXECUTED
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
26c4c: e3a00002 mov r0, #2 <== NOT EXECUTED
26c50: e3a0100c mov r1, #12 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
26c54: e583e00c str lr, [r3, #12] <== NOT EXECUTED
26c58: e583c000 str ip, [r3] <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
26c5c: e5822008 str r2, [r2, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
26c60: e5825004 str r5, [r2, #4] <== NOT EXECUTED
26c64: ebff82bd bl 7760 <calloc> <== NOT EXECUTED
if ( fs_info->rhash == NULL )
26c68: e1500005 cmp r0, r5 <== NOT EXECUTED
}
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));
26c6c: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED
if ( fs_info->rhash == NULL )
26c70: 0a0000bc beq 26f68 <fat_init_volume_info+0x65c> <== NOT EXECUTED
rtems_disk_release(vol->dd);
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
26c74: e280300c add r3, r0, #12 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
26c78: e2802004 add r2, r0, #4 <== NOT EXECUTED
26c7c: e2801010 add r1, r0, #16 <== NOT EXECUTED
26c80: e580100c str r1, [r0, #12] <== NOT EXECUTED
26c84: e8800024 stm r0, {r2, r5} <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
26c88: e5800008 str r0, [r0, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
26c8c: e5835004 str r5, [r3, #4] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
26c90: e5833008 str r3, [r3, #8] <== NOT EXECUTED
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
26c94: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED
26c98: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED
26c9c: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
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;
26ca0: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
26ca4: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED
26ca8: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
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;
26cac: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
26cb0: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
26cb4: e3a01001 mov r1, #1 <== NOT EXECUTED
26cb8: ebff82a8 bl 7760 <calloc> <== NOT EXECUTED
if ( fs_info->uino == NULL )
26cbc: e3500000 cmp r0, #0 <== NOT EXECUTED
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;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
26cc0: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED
if ( fs_info->uino == NULL )
26cc4: 0a00009b beq 26f38 <fat_init_volume_info+0x62c> <== NOT EXECUTED
rtems_disk_release(vol->dd);
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));
26cc8: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED
26ccc: e3a01001 mov r1, #1 <== NOT EXECUTED
26cd0: ebff82a2 bl 7760 <calloc> <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
26cd4: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_disk_release(vol->dd);
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));
26cd8: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
26cdc: 11a07005 movne r7, r5 <== NOT EXECUTED
26ce0: 0a000079 beq 26ecc <fat_init_volume_info+0x5c0> <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
26ce4: e1a00007 mov r0, r7 <== NOT EXECUTED
26ce8: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED
26cec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
26cf0: e1a03ca3 lsr r3, r3, #25 <== NOT EXECUTED
26cf4: e3130001 tst r3, #1 <== NOT EXECUTED
26cf8: e5c41003 strb r1, [r4, #3] <== NOT EXECUTED
26cfc: 0affff3c beq 269f4 <fat_init_volume_info+0xe8> <== NOT EXECUTED
26d00: eaffff42 b 26a10 <fat_init_volume_info+0x104> <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
26d04: e3a03cff mov r3, #65280 ; 0xff00 <== NOT EXECUTED
26d08: e28330f4 add r3, r3, #244 ; 0xf4 <== NOT EXECUTED
26d0c: e1500003 cmp r0, r3 <== NOT EXECUTED
26d10: 9a000054 bls 26e68 <fat_init_volume_info+0x55c> <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
26d14: e3a03004 mov r3, #4 <== NOT EXECUTED
26d18: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
26d1c: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED
26d20: e584300c str r3, [r4, #12] <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
26d24: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED
26d28: e5843010 str r3, [r4, #16] <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
26d2c: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED
26d30: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED
26d34: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED
26d38: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
26d3c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
26d40: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED
26d44: e1833001 orr r3, r3, r1 <== NOT EXECUTED
26d48: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
26d4c: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
26d50: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED
26d54: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED
if (vol->mirror)
26d58: e3530000 cmp r3, #0 <== NOT EXECUTED
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
26d5c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
if (vol->mirror)
26d60: 0a000049 beq 26e8c <fat_init_volume_info+0x580> <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
26d64: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED
26d68: e203300f and r3, r3, #15 <== NOT EXECUTED
26d6c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
26d70: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED
26d74: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED
26d78: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
if( vol->info_sec == 0 )
26d7c: e3510000 cmp r1, #0 <== NOT EXECUTED
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
26d80: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED
if( vol->info_sec == 0 )
26d84: 0a000049 beq 26eb0 <fat_init_volume_info+0x5a4> <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
26d88: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED
26d8c: e1a00005 mov r0, r5 <== NOT EXECUTED
26d90: e3a02000 mov r2, #0 <== NOT EXECUTED
26d94: e3a03004 mov r3, #4 <== NOT EXECUTED
26d98: e58d6000 str r6, [sp] <== NOT EXECUTED
26d9c: ebfffeb3 bl 26870 <_fat_block_read> <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
26da0: e3500000 cmp r0, #0 <== NOT EXECUTED
26da4: ba00006b blt 26f58 <fat_init_volume_info+0x64c> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
26da8: e5dd30aa ldrb r3, [sp, #170] ; 0xaa <== NOT EXECUTED
26dac: e5dd20a9 ldrb r2, [sp, #169] ; 0xa9 <== NOT EXECUTED
26db0: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
26db4: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED
26db8: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
26dbc: e5dd20ab ldrb r2, [sp, #171] ; 0xab <== NOT EXECUTED
26dc0: e1833001 orr r3, r3, r1 <== NOT EXECUTED
26dc4: e1832c02 orr r2, r3, r2, lsl #24 <== NOT EXECUTED
26dc8: e59f31c4 ldr r3, [pc, #452] ; 26f94 <fat_init_volume_info+0x688><== NOT EXECUTED
26dcc: e1520003 cmp r2, r3 <== NOT EXECUTED
26dd0: 1a000034 bne 26ea8 <fat_init_volume_info+0x59c> <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
26dd4: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED
26dd8: e1a00005 mov r0, r5 <== NOT EXECUTED
26ddc: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED
26de0: e3a0300c mov r3, #12 <== NOT EXECUTED
26de4: e58d6000 str r6, [sp] <== NOT EXECUTED
26de8: ebfffea0 bl 26870 <_fat_block_read> <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
26dec: e3500000 cmp r0, #0 <== NOT EXECUTED
26df0: ba000056 blt 26f50 <fat_init_volume_info+0x644> <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
26df4: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED
26df8: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED
26dfc: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED
26e00: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
26e04: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
26e08: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED
26e0c: e1833001 orr r3, r3, r1 <== NOT EXECUTED
26e10: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
26e14: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
26e18: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED
26e1c: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED
26e20: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED
26e24: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
26e28: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
26e2c: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED
26e30: e1833001 orr r3, r3, r1 <== NOT EXECUTED
26e34: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
26e38: e3e01000 mvn r1, #0 <== NOT EXECUTED
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
26e3c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
26e40: e1a00005 mov r0, r5 <== NOT EXECUTED
26e44: e1a02001 mov r2, r1 <== NOT EXECUTED
26e48: ebfffdf2 bl 26618 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
26e4c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
26e50: 0affff69 beq 26bfc <fat_init_volume_info+0x2f0> <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
26e54: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
26e58: ebfffcd6 bl 261b8 <fat_buf_release> <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
26e5c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26e60: ebff7ef1 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
return rc;
26e64: eaffff9e b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
vol->mask = FAT_FAT16_MASK;
26e68: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
26e6c: e3a03cff mov r3, #65280 ; 0xff00 <== NOT EXECUTED
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
vol->mask = FAT_FAT16_MASK;
26e70: e2422001 sub r2, r2, #1 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
26e74: e28330f8 add r3, r3, #248 ; 0xf8 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
26e78: e3a01002 mov r1, #2 <== NOT EXECUTED
26e7c: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
26e80: e584200c str r2, [r4, #12] <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
26e84: e5843010 str r3, [r4, #16] <== NOT EXECUTED
26e88: eaffff54 b 26be0 <fat_init_volume_info+0x2d4> <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
26e8c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED
26e90: eaffffb6 b 26d70 <fat_init_volume_info+0x464> <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
26e94: eb0075e9 bl 44640 <__errno> <== NOT EXECUTED
26e98: e3a03019 mov r3, #25 <== NOT EXECUTED
26e9c: e5803000 str r3, [r0] <== NOT EXECUTED
26ea0: e3e07000 mvn r7, #0 <== NOT EXECUTED
26ea4: eaffff8e b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
26ea8: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
26eac: ebfffcc1 bl 261b8 <fat_buf_release> <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
26eb0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26eb4: ebff7edc bl 6a2c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
26eb8: eb0075e0 bl 44640 <__errno> <== NOT EXECUTED
26ebc: e3a03016 mov r3, #22 <== NOT EXECUTED
26ec0: e5803000 str r3, [r0] <== NOT EXECUTED
26ec4: e3e07000 mvn r7, #0 <== NOT EXECUTED
26ec8: eaffff85 b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
26ecc: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26ed0: ebff7ed5 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
26ed4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
26ed8: ebff83a4 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->rhash);
26edc: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
26ee0: ebff83a2 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->uino);
26ee4: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
26ee8: ebff83a0 bl 7d70 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
26eec: eb0075d3 bl 44640 <__errno> <== NOT EXECUTED
26ef0: e3a0300c mov r3, #12 <== NOT EXECUTED
26ef4: e5803000 str r3, [r0] <== NOT EXECUTED
26ef8: e3e07000 mvn r7, #0 <== NOT EXECUTED
26efc: eaffff78 b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
26f00: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f04: ebff7ec8 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO);
26f08: eb0075cc bl 44640 <__errno> <== NOT EXECUTED
26f0c: e3a03005 mov r3, #5 <== NOT EXECUTED
26f10: e5803000 str r3, [r0] <== NOT EXECUTED
26f14: e3e07000 mvn r7, #0 <== NOT EXECUTED
26f18: eaffff71 b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
26f1c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f20: ebff7ec1 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
26f24: eb0075c5 bl 44640 <__errno> <== NOT EXECUTED
26f28: e3a03005 mov r3, #5 <== NOT EXECUTED
26f2c: e5803000 str r3, [r0] <== NOT EXECUTED
26f30: e3e07000 mvn r7, #0 <== NOT EXECUTED
26f34: eaffff6a b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
26f38: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f3c: ebff7eba bl 6a2c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
26f40: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
26f44: ebff8389 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->rhash);
26f48: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
26f4c: eaffffe5 b 26ee8 <fat_init_volume_info+0x5dc> <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
26f50: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
26f54: ebfffc97 bl 261b8 <fat_buf_release> <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
26f58: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f5c: ebff7eb2 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
26f60: e3e07000 mvn r7, #0 <== NOT EXECUTED
return -1;
26f64: eaffff5e b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
26f68: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f6c: ebff7eae bl 6a2c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
26f70: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
26f74: eaffffdb b 26ee8 <fat_init_volume_info+0x5dc> <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
26f78: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26f7c: ebff7eaa bl 6a2c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
26f80: eb0075ae bl 44640 <__errno> <== NOT EXECUTED
26f84: e3a0300c mov r3, #12 <== NOT EXECUTED
26f88: e5803000 str r3, [r0] <== NOT EXECUTED
26f8c: e3e07000 mvn r7, #0 <== NOT EXECUTED
26f90: eaffff53 b 26ce4 <fat_init_volume_info+0x3d8> <== NOT EXECUTED
000260b4 <fat_ino_is_unique>:
inline bool
fat_ino_is_unique(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
260b4: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
260b8: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
return (ino >= fs_info->uino_base);
}
260bc: e1500001 cmp r0, r1 <== NOT EXECUTED
260c0: 83a00000 movhi r0, #0 <== NOT EXECUTED
260c4: 93a00001 movls r0, #1 <== NOT EXECUTED
260c8: e12fff1e bx lr <== NOT EXECUTED
0003fb54 <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
3fb54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
3fb58: e3a0b000 mov fp, #0 <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
3fb5c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
3fb60: e58db00c str fp, [sp, #12] <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
3fb64: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
3fb68: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
3fb6c: e3520000 cmp r2, #0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
3fb70: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t *cls_added,
uint32_t *last_cl
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
3fb74: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
3fb78: e583b000 str fp, [r3] <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
3fb7c: e1a0a003 mov sl, r3 <== NOT EXECUTED
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
3fb80: e58d2000 str r2, [sp] <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
3fb84: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
3fb88: 01a0b002 moveq fp, r2 <== NOT EXECUTED
3fb8c: 0a00003f beq 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
3fb90: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3fb94: e5925044 ldr r5, [r2, #68] ; 0x44 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
3fb98: e2877002 add r7, r7, #2 <== NOT EXECUTED
*cls_added = 0;
if (count == 0)
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
3fb9c: e3750001 cmn r5, #1 <== NOT EXECUTED
3fba0: 03a05002 moveq r5, #2 <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
3fba4: e3570002 cmp r7, #2 <== NOT EXECUTED
3fba8: 9a00003b bls 3fc9c <fat_scan_fat_for_free_clusters+0x148> <== NOT EXECUTED
3fbac: e3a06002 mov r6, #2 <== NOT EXECUTED
3fbb0: e28d900c add r9, sp, #12 <== NOT EXECUTED
3fbb4: ea000011 b 3fc00 <fat_scan_fat_for_free_clusters+0xac> <== NOT EXECUTED
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
3fbb8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
3fbbc: e5825000 str r5, [r2] <== NOT EXECUTED
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3fbc0: e3e02000 mvn r2, #0 <== NOT EXECUTED
3fbc4: ebfffeaa bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3fbc8: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3fbcc: 1a00002f bne 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
3fbd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3fbd4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
3fbd8: e2833001 add r3, r3, #1 <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3fbdc: e1520003 cmp r2, r3 <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
3fbe0: e58a3000 str r3, [sl] <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3fbe4: 0a000044 beq 3fcfc <fat_scan_fat_for_free_clusters+0x1a8> <== NOT EXECUTED
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
3fbe8: e1a0b005 mov fp, r5 <== NOT EXECUTED
}
}
i++;
cl4find++;
3fbec: e2855001 add r5, r5, #1 <== NOT EXECUTED
if (cl4find >= data_cls_val)
3fbf0: e1570005 cmp r7, r5 <== NOT EXECUTED
3fbf4: 93a05002 movls r5, #2 <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
3fbf8: e1570006 cmp r7, r6 <== NOT EXECUTED
3fbfc: 9a000026 bls 3fc9c <fat_scan_fat_for_free_clusters+0x148> <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
3fc00: e1a01005 mov r1, r5 <== NOT EXECUTED
3fc04: e1a02009 mov r2, r9 <== NOT EXECUTED
3fc08: e1a00004 mov r0, r4 <== NOT EXECUTED
3fc0c: ebffff39 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3fc10: e3500000 cmp r0, #0 <== NOT EXECUTED
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
}
}
i++;
3fc14: e2866001 add r6, r6, #1 <== NOT EXECUTED
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
3fc18: 1a00002c bne 3fcd0 <fat_scan_fat_for_free_clusters+0x17c> <== NOT EXECUTED
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
3fc1c: e59d800c ldr r8, [sp, #12] <== NOT EXECUTED
3fc20: e3580000 cmp r8, #0 <== NOT EXECUTED
3fc24: 1afffff0 bne 3fbec <fat_scan_fat_for_free_clusters+0x98> <== NOT EXECUTED
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
3fc28: e59a3000 ldr r3, [sl] <== NOT EXECUTED
3fc2c: e3530000 cmp r3, #0 <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3fc30: e1a01005 mov r1, r5 <== NOT EXECUTED
3fc34: e3e02000 mvn r2, #0 <== NOT EXECUTED
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3fc38: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
3fc3c: 0affffdd beq 3fbb8 <fat_scan_fat_for_free_clusters+0x64> <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3fc40: e1a00004 mov r0, r4 <== NOT EXECUTED
3fc44: ebfffe8a bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
3fc48: e1a0100b mov r1, fp <== NOT EXECUTED
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
3fc4c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
3fc50: e1a02005 mov r2, r5 <== NOT EXECUTED
3fc54: e1a00004 mov r0, r4 <== NOT EXECUTED
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
3fc58: 1a000034 bne 3fd30 <fat_scan_fat_for_free_clusters+0x1dc> <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
3fc5c: ebfffe84 bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3fc60: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3fc64: 0affffd9 beq 3fbd0 <fat_scan_fat_for_free_clusters+0x7c> <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
3fc68: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
3fc6c: e5901000 ldr r1, [r0] <== NOT EXECUTED
3fc70: e1a00004 mov r0, r4 <== NOT EXECUTED
3fc74: ebffff80 bl 3fa7c <fat_free_fat_clusters_chain> <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
3fc78: e1a00004 mov r0, r4 <== NOT EXECUTED
3fc7c: e1a01005 mov r1, r5 <== NOT EXECUTED
3fc80: e1a02008 mov r2, r8 <== NOT EXECUTED
3fc84: ebfffe7a bl 3f674 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
3fc88: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3fc8c: ebff9949 bl 261b8 <fat_buf_release> <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
3fc90: e1a0000b mov r0, fp <== NOT EXECUTED
3fc94: e28dd010 add sp, sp, #16 <== NOT EXECUTED
3fc98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3fc9c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3fca0: e5903040 ldr r3, [r0, #64] ; 0x40 <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
3fca4: e580b044 str fp, [r0, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3fca8: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
3fcac: 159a2000 ldrne r2, [sl] <== NOT EXECUTED
3fcb0: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED
*last_cl = save_cln;
3fcb4: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
fs_info->vol.free_cls -= (*cls_added);
3fcb8: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED
*last_cl = save_cln;
3fcbc: e582b000 str fp, [r2] <== NOT EXECUTED
fat_buf_release(fs_info);
3fcc0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3fcc4: ebff993b bl 261b8 <fat_buf_release> <== NOT EXECUTED
3fcc8: e3a0b000 mov fp, #0 <== NOT EXECUTED
return RC_OK;
3fccc: eaffffef b 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
3fcd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED
3fcd4: e3530000 cmp r3, #0 <== NOT EXECUTED
3fcd8: e1a08000 mov r8, r0 <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
3fcdc: 01a0b008 moveq fp, r8 <== NOT EXECUTED
3fce0: 0affffea beq 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
3fce4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3fce8: e1a00004 mov r0, r4 <== NOT EXECUTED
3fcec: e5931000 ldr r1, [r3] <== NOT EXECUTED
3fcf0: ebffff61 bl 3fa7c <fat_free_fat_clusters_chain> <== NOT EXECUTED
3fcf4: e1a0b008 mov fp, r8 <== NOT EXECUTED
3fcf8: eaffffe4 b 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3fcfc: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3fd00: e5903040 ldr r3, [r0, #64] ; 0x40 <== NOT EXECUTED
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
3fd04: e5805044 str r5, [r0, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3fd08: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
3fd0c: 159a2000 ldrne r2, [sl] <== NOT EXECUTED
3fd10: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED
*last_cl = save_cln;
3fd14: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
fs_info->vol.free_cls -= (*cls_added);
3fd18: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED
*last_cl = save_cln;
3fd1c: e5825000 str r5, [r2] <== NOT EXECUTED
fat_buf_release(fs_info);
3fd20: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3fd24: ebff9923 bl 261b8 <fat_buf_release> <== NOT EXECUTED
3fd28: e3a0b000 mov fp, #0 <== NOT EXECUTED
return rc;
3fd2c: eaffffd7 b 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
3fd30: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3fd34: e5931000 ldr r1, [r3] <== NOT EXECUTED
3fd38: ebffff4f bl 3fa7c <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
3fd3c: eaffffd3 b 3fc90 <fat_scan_fat_for_free_clusters+0x13c> <== NOT EXECUTED
0003f674 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
3f674: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
3f678: e3a03000 mov r3, #0 <== NOT EXECUTED
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
3f67c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
3f680: e3510001 cmp r1, #1 <== NOT EXECUTED
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
3f684: e1a05001 mov r5, r1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
3f688: e58d3000 str r3, [sp] <== NOT EXECUTED
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
3f68c: e1a0b002 mov fp, r2 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
3f690: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
3f694: 9a000021 bls 3f720 <fat_set_fat_cluster+0xac> <== NOT EXECUTED
3f698: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
3f69c: e2833001 add r3, r3, #1 <== NOT EXECUTED
3f6a0: e1510003 cmp r1, r3 <== NOT EXECUTED
3f6a4: 8a00001d bhi 3f720 <fat_set_fat_cluster+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
3f6a8: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
3f6ac: e3130001 tst r3, #1 <== NOT EXECUTED
3f6b0: 1a000020 bne 3f738 <fat_set_fat_cluster+0xc4> <== NOT EXECUTED
3f6b4: e3130002 tst r3, #2 <== NOT EXECUTED
3f6b8: 15d4a002 ldrbne sl, [r4, #2] <== NOT EXECUTED
3f6bc: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f6c0: 05d4a002 ldrbeq sl, [r4, #2] <== NOT EXECUTED
3f6c4: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f6c8: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED
3f6cc: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED
3f6d0: 1083aa36 addne sl, r3, r6, lsr sl <== NOT EXECUTED
3f6d4: 0083aa36 addeq sl, r3, r6, lsr sl <== NOT EXECUTED
fs_info->vol.afat_loc;
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, &block0);
3f6d8: e1a00004 mov r0, r4 <== NOT EXECUTED
3f6dc: e1a0100a mov r1, sl <== NOT EXECUTED
3f6e0: e3a02001 mov r2, #1 <== NOT EXECUTED
3f6e4: e1a0300d mov r3, sp <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f6e8: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
3f6ec: ebff9b0c bl 26324 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
3f6f0: e3500000 cmp r0, #0 <== NOT EXECUTED
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
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, &block0);
3f6f4: e1a0800d mov r8, sp <== NOT EXECUTED
if (rc != RC_OK)
3f6f8: 1a00000c bne 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
3f6fc: e5d4700a ldrb r7, [r4, #10] <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f700: e2499001 sub r9, r9, #1 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
3f704: e3570002 cmp r7, #2 <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
3f708: e0066009 and r6, r6, r9 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
3f70c: 0a00000e beq 3f74c <fat_set_fat_cluster+0xd8> <== NOT EXECUTED
3f710: e3570004 cmp r7, #4 <== NOT EXECUTED
3f714: 0a00002e beq 3f7d4 <fat_set_fat_cluster+0x160> <== NOT EXECUTED
3f718: e3570001 cmp r7, #1 <== NOT EXECUTED
3f71c: 0a000010 beq 3f764 <fat_set_fat_cluster+0xf0> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
3f720: eb0013c6 bl 44640 <__errno> <== NOT EXECUTED
3f724: e3a03005 mov r3, #5 <== NOT EXECUTED
3f728: e5803000 str r3, [r0] <== NOT EXECUTED
3f72c: e3e00000 mvn r0, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
3f730: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3f734: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
3f738: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED
3f73c: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
3f740: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED
3f744: e083aa36 add sl, r3, r6, lsr sl <== NOT EXECUTED
3f748: eaffffe2 b 3f6d8 <fat_set_fat_cluster+0x64> <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
3f74c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f750: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f754: e183b0b6 strh fp, [r3, r6] <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
3f758: e3a03001 mov r3, #1 <== NOT EXECUTED
3f75c: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
3f760: eafffff2 b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
3f764: e3150001 tst r5, #1 <== NOT EXECUTED
3f768: 0a000023 beq 3f7fc <fat_set_fat_cluster+0x188> <== NOT EXECUTED
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
3f76c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f770: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
3f774: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
3f778: e202200f and r2, r2, #15 <== NOT EXECUTED
3f77c: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
3f780: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f784: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
3f788: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
3f78c: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
3f790: e182282b orr r2, r2, fp, lsr #16 <== NOT EXECUTED
3f794: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
3f798: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED
3f79c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3f7a0: e1530006 cmp r3, r6 <== NOT EXECUTED
3f7a4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED
3f7a8: 0a00002e beq 3f868 <fat_set_fat_cluster+0x1f4> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
3f7ac: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f7b0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f7b4: e2866001 add r6, r6, #1 <== NOT EXECUTED
3f7b8: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
3f7bc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f7c0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
3f7c4: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
3f7c8: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED
3f7cc: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED
3f7d0: eaffffd6 b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
3f7d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f7d8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
3f7dc: e7932006 ldr r2, [r3, r6] <== NOT EXECUTED
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
3f7e0: e3cbb20f bic fp, fp, #-268435456 ; 0xf0000000 <== NOT EXECUTED
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
3f7e4: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
3f7e8: e182b00b orr fp, r2, fp <== NOT EXECUTED
3f7ec: e783b006 str fp, [r3, r6] <== NOT EXECUTED
3f7f0: e3a03001 mov r3, #1 <== NOT EXECUTED
3f7f4: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
3f7f8: eaffffcc b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
3f7fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f800: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f804: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
3f808: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f80c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
3f810: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
3f814: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
3f818: e1a0ba2b lsr fp, fp, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
3f81c: e182200b orr r2, r2, fp <== NOT EXECUTED
3f820: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
3f824: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED
3f828: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3f82c: e1530006 cmp r3, r6 <== NOT EXECUTED
3f830: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED
3f834: 0a00001c beq 3f8ac <fat_set_fat_cluster+0x238> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
3f838: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f83c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f840: e2866001 add r6, r6, #1 <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
3f844: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
3f848: e3c2200f bic r2, r2, #15 <== NOT EXECUTED
3f84c: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
3f850: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f854: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
3f858: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED
3f85c: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED
3f860: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED
3f864: eaffffb1 b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
3f868: e28a1001 add r1, sl, #1 <== NOT EXECUTED
3f86c: e1a0300d mov r3, sp <== NOT EXECUTED
3f870: e1a00004 mov r0, r4 <== NOT EXECUTED
3f874: e1a02007 mov r2, r7 <== NOT EXECUTED
3f878: ebff9aa9 bl 26324 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
3f87c: e3500000 cmp r0, #0 <== NOT EXECUTED
3f880: 1affffaa bne 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
3f884: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f888: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3f88c: e5c30000 strb r0, [r3] <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
3f890: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f894: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
3f898: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3f89c: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED
3f8a0: e5c3b000 strb fp, [r3] <== NOT EXECUTED
3f8a4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED
3f8a8: eaffffa0 b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
3f8ac: e28a1001 add r1, sl, #1 <== NOT EXECUTED
3f8b0: e1a0300d mov r3, sp <== NOT EXECUTED
3f8b4: e1a00004 mov r0, r4 <== NOT EXECUTED
3f8b8: e1a02007 mov r2, r7 <== NOT EXECUTED
3f8bc: ebff9a98 bl 26324 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
3f8c0: e3500000 cmp r0, #0 <== NOT EXECUTED
3f8c4: 1affff99 bne 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
3f8c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f8cc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
3f8d0: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3f8d4: e3c2200f bic r2, r2, #15 <== NOT EXECUTED
3f8d8: e5c32000 strb r2, [r3] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
3f8dc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f8e0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
3f8e4: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3f8e8: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED
3f8ec: e5c3b000 strb fp, [r3] <== NOT EXECUTED
3f8f0: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED
3f8f4: eaffff8d b 3f730 <fat_set_fat_cluster+0xbc> <== NOT EXECUTED
00026680 <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
26680: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
26684: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
26688: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED
2668c: e2155004 ands r5, r5, #4 <== NOT EXECUTED
26690: 1a00002e bne 26750 <fat_shutdown_drive+0xd0> <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
}
fat_buf_release(fs_info);
26694: e1a00004 mov r0, r4 <== NOT EXECUTED
26698: ebfffec6 bl 261b8 <fat_buf_release> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
2669c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
266a0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
266a4: ebff74d9 bl 3a10 <rtems_bdbuf_syncdev> <== NOT EXECUTED
266a8: e3500000 cmp r0, #0 <== NOT EXECUTED
266ac: 13e05000 mvnne r5, #0 <== NOT EXECUTED
266b0: e3a08000 mov r8, #0 <== NOT EXECUTED
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
266b4: e5946064 ldr r6, [r4, #100] ; 0x64 <== NOT EXECUTED
266b8: e0866008 add r6, r6, r8 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
266bc: ea000000 b 266c4 <fat_shutdown_drive+0x44> <== NOT EXECUTED
free(node);
266c0: ebff85aa bl 7d70 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
266c4: e1a00006 mov r0, r6 <== NOT EXECUTED
266c8: ebff9a94 bl d120 <_Chain_Get> <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
266cc: e2507000 subs r7, r0, #0 <== NOT EXECUTED
266d0: 1afffffa bne 266c0 <fat_shutdown_drive+0x40> <== NOT EXECUTED
266d4: e288800c add r8, r8, #12 <== NOT EXECUTED
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
266d8: e3580018 cmp r8, #24 <== NOT EXECUTED
266dc: 1afffff4 bne 266b4 <fat_shutdown_drive+0x34> <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
266e0: e5946068 ldr r6, [r4, #104] ; 0x68 <== NOT EXECUTED
266e4: e0866007 add r6, r6, r7 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
266e8: ea000000 b 266f0 <fat_shutdown_drive+0x70> <== NOT EXECUTED
free(node);
266ec: ebff859f bl 7d70 <free> <== NOT EXECUTED
266f0: e1a00006 mov r0, r6 <== NOT EXECUTED
266f4: ebff9a89 bl d120 <_Chain_Get> <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
266f8: e3500000 cmp r0, #0 <== NOT EXECUTED
266fc: 1afffffa bne 266ec <fat_shutdown_drive+0x6c> <== NOT EXECUTED
26700: e287700c add r7, r7, #12 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
26704: e3570018 cmp r7, #24 <== NOT EXECUTED
26708: 1afffff4 bne 266e0 <fat_shutdown_drive+0x60> <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
2670c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
26710: ebff8596 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->rhash);
26714: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
26718: ebff8594 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->uino);
2671c: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
26720: ebff8592 bl 7d70 <free> <== NOT EXECUTED
free(fs_info->sec_buf);
26724: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED
26728: ebff8590 bl 7d70 <free> <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
2672c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
26730: ebff80bd bl 6a2c <rtems_disk_release> <== NOT EXECUTED
if (rc)
26734: e3550000 cmp r5, #0 <== NOT EXECUTED
26738: 0a000002 beq 26748 <fat_shutdown_drive+0xc8> <== NOT EXECUTED
errno = EIO;
2673c: eb0077bf bl 44640 <__errno> <== NOT EXECUTED
26740: e3a03005 mov r3, #5 <== NOT EXECUTED
26744: e5803000 str r3, [r0] <== NOT EXECUTED
return rc;
}
26748: e1a00005 mov r0, r5 <== NOT EXECUTED
2674c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
26750: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED
26754: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
26758: ebffffae bl 26618 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
2675c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
26760: 13e05000 mvnne r5, #0 <== NOT EXECUTED
26764: eaffffca b 26694 <fat_shutdown_drive+0x14> <== NOT EXECUTED
0004017c <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
4017c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
40180: e59f3158 ldr r3, [pc, #344] ; 402e0 <fchdir+0x164> <== NOT EXECUTED
40184: e5933000 ldr r3, [r3] <== NOT EXECUTED
40188: e1500003 cmp r0, r3 <== NOT EXECUTED
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
4018c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
40190: 2a000040 bcs 40298 <fchdir+0x11c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
40194: e59f3148 ldr r3, [pc, #328] ; 402e4 <fchdir+0x168> <== NOT EXECUTED
40198: e5934000 ldr r4, [r3] <== NOT EXECUTED
4019c: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
401a0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
401a4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
401a8: 0a00003a beq 40298 <fchdir+0x11c> <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !iop->pathinfo.ops ) {
401ac: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
401b0: e3530000 cmp r3, #0 <== NOT EXECUTED
401b4: 0a000044 beq 402cc <fchdir+0x150> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type_h ) {
401b8: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
401bc: e3530000 cmp r3, #0 <== NOT EXECUTED
401c0: 0a000041 beq 402cc <fchdir+0x150> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
401c4: e2844018 add r4, r4, #24 <== NOT EXECUTED
401c8: e1a00004 mov r0, r4 <== NOT EXECUTED
401cc: e1a0e00f mov lr, pc <== NOT EXECUTED
401d0: e12fff13 bx r3 <== NOT EXECUTED
401d4: e3500001 cmp r0, #1 <== NOT EXECUTED
401d8: e1a0e000 mov lr, r0 <== NOT EXECUTED
401dc: 1a000028 bne 40284 <fchdir+0x108> <== NOT EXECUTED
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
401e0: e59f6100 ldr r6, [pc, #256] ; 402e8 <fchdir+0x16c> <== NOT EXECUTED
401e4: e5967000 ldr r7, [r6] <== NOT EXECUTED
401e8: e287c004 add ip, r7, #4 <== NOT EXECUTED
401ec: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
401f0: e28d5004 add r5, sp, #4 <== NOT EXECUTED
401f4: e1a08005 mov r8, r5 <== NOT EXECUTED
401f8: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED
401fc: e59c3000 ldr r3, [ip] <== NOT EXECUTED
40200: e5883000 str r3, [r8] <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
40204: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
40208: e2877004 add r7, r7, #4 <== NOT EXECUTED
4020c: e8a7000f stmia r7!, {r0, r1, r2, r3} <== NOT EXECUTED
40210: e5943000 ldr r3, [r4] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
40214: e3a07000 mov r7, #0 <== NOT EXECUTED
40218: e28d4018 add r4, sp, #24 <== NOT EXECUTED
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
rtems_filesystem_current = iop->pathinfo;
4021c: e58c3000 str r3, [ip] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
40220: e1a0100e mov r1, lr <== NOT EXECUTED
40224: e1a02007 mov r2, r7 <== NOT EXECUTED
40228: e59f00bc ldr r0, [pc, #188] ; 402ec <fchdir+0x170> <== NOT EXECUTED
4022c: e1a03004 mov r3, r4 <== NOT EXECUTED
40230: e58d7000 str r7, [sp] <== NOT EXECUTED
40234: ebff1eab bl 7ce8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
40238: e1500007 cmp r0, r7 <== NOT EXECUTED
4023c: 1a00001a bne 402ac <fchdir+0x130> <== NOT EXECUTED
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
40240: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
40244: e3530000 cmp r3, #0 <== NOT EXECUTED
40248: 0a000004 beq 40260 <fchdir+0xe4> <== NOT EXECUTED
4024c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
40250: e3530000 cmp r3, #0 <== NOT EXECUTED
40254: 11a00005 movne r0, r5 <== NOT EXECUTED
40258: 11a0e00f movne lr, pc <== NOT EXECUTED
4025c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_current = loc;
40260: e596c000 ldr ip, [r6] <== NOT EXECUTED
40264: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
40268: e28cc004 add ip, ip, #4 <== NOT EXECUTED
4026c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
40270: e5943000 ldr r3, [r4] <== NOT EXECUTED
40274: e58c3000 str r3, [ip] <== NOT EXECUTED
40278: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
4027c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
40280: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
40284: eb0010ed bl 44640 <__errno> <== NOT EXECUTED
40288: e3a03014 mov r3, #20 <== NOT EXECUTED
4028c: e5803000 str r3, [r0] <== NOT EXECUTED
40290: e3e00000 mvn r0, #0 <== NOT EXECUTED
40294: eafffff8 b 4027c <fchdir+0x100> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
40298: eb0010e8 bl 44640 <__errno> <== NOT EXECUTED
4029c: e3a03009 mov r3, #9 <== NOT EXECUTED
402a0: e5803000 str r3, [r0] <== NOT EXECUTED
402a4: e3e00000 mvn r0, #0 <== NOT EXECUTED
402a8: eafffff3 b 4027c <fchdir+0x100> <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
402ac: e596c000 ldr ip, [r6] <== NOT EXECUTED
402b0: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED
402b4: e28cc004 add ip, ip, #4 <== NOT EXECUTED
402b8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
402bc: e5983000 ldr r3, [r8] <== NOT EXECUTED
402c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
402c4: e58c3000 str r3, [ip] <== NOT EXECUTED
return -1;
402c8: eaffffeb b 4027c <fchdir+0x100> <== NOT EXECUTED
if ( !iop->pathinfo.ops ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type_h ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
402cc: eb0010db bl 44640 <__errno> <== NOT EXECUTED
402d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
402d4: e5803000 str r3, [r0] <== NOT EXECUTED
402d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
402dc: eaffffe6 b 4027c <fchdir+0x100> <== NOT EXECUTED
000290d8 <fchmod>:
mode_t mode
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
290d8: e59f3070 ldr r3, [pc, #112] ; 29150 <fchmod+0x78> <== NOT EXECUTED
290dc: e5932000 ldr r2, [r3] <== NOT EXECUTED
290e0: e1500002 cmp r0, r2 <== NOT EXECUTED
int fchmod(
int fd,
mode_t mode
)
{
290e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
290e8: 2a00000e bcs 29128 <fchmod+0x50> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
290ec: e59f3060 ldr r3, [pc, #96] ; 29154 <fchmod+0x7c> <== NOT EXECUTED
290f0: e5933000 ldr r3, [r3] <== NOT EXECUTED
290f4: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
290f8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
290fc: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED
29100: 0a000008 beq 29128 <fchmod+0x50> <== NOT EXECUTED
/*
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
29104: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED
29108: e592201c ldr r2, [r2, #28] <== NOT EXECUTED
2910c: e3520000 cmp r2, #0 <== NOT EXECUTED
29110: 0a000009 beq 2913c <fchmod+0x64> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
29114: e2830018 add r0, r3, #24 <== NOT EXECUTED
29118: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
2911c: e1a0e00f mov lr, pc <== NOT EXECUTED
29120: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED
}
29124: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
29128: eb006d44 bl 44640 <__errno> <== NOT EXECUTED
2912c: e3a03009 mov r3, #9 <== NOT EXECUTED
29130: e5803000 str r3, [r0] <== NOT EXECUTED
29134: e3e00000 mvn r0, #0 <== NOT EXECUTED
29138: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2913c: eb006d3f bl 44640 <__errno> <== NOT EXECUTED
29140: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
29144: e5803000 str r3, [r0] <== NOT EXECUTED
29148: e3e00000 mvn r0, #0 <== NOT EXECUTED
2914c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00029158 <fchown>:
gid_t group
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
29158: e59f3098 ldr r3, [pc, #152] ; 291f8 <fchown+0xa0> <== NOT EXECUTED
2915c: e5933000 ldr r3, [r3] <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
29160: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
29164: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
29168: e1500003 cmp r0, r3 <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
2916c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
29170: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
29174: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
29178: 2a00000f bcs 291bc <fchown+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
2917c: e59f3078 ldr r3, [pc, #120] ; 291fc <fchown+0xa4> <== NOT EXECUTED
29180: e5933000 ldr r3, [r3] <== NOT EXECUTED
29184: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
29188: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
2918c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
29190: 0a000009 beq 291bc <fchown+0x64> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
29194: e3130004 tst r3, #4 <== NOT EXECUTED
29198: 0a00000c beq 291d0 <fchown+0x78> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
2919c: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
291a0: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
291a4: e3530000 cmp r3, #0 <== NOT EXECUTED
291a8: 0a00000d beq 291e4 <fchown+0x8c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
291ac: e2800018 add r0, r0, #24 <== NOT EXECUTED
291b0: e1a0e00f mov lr, pc <== NOT EXECUTED
291b4: e12fff13 bx r3 <== NOT EXECUTED
}
291b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
291bc: eb006d1f bl 44640 <__errno> <== NOT EXECUTED
291c0: e3a03009 mov r3, #9 <== NOT EXECUTED
291c4: e5803000 str r3, [r0] <== NOT EXECUTED
291c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
291cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
291d0: eb006d1a bl 44640 <__errno> <== NOT EXECUTED
291d4: e3a03016 mov r3, #22 <== NOT EXECUTED
291d8: e5803000 str r3, [r0] <== NOT EXECUTED
291dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
291e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
291e4: eb006d15 bl 44640 <__errno> <== NOT EXECUTED
291e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
291ec: e5803000 str r3, [r0] <== NOT EXECUTED
291f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
291f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000402f0 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
402f0: e92d000e push {r1, r2, r3}
402f4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
402f8: e59f31d0 ldr r3, [pc, #464] ; 404d0 <fcntl+0x1e0>
402fc: e5933000 ldr r3, [r3]
int fcntl(
int fd,
int cmd,
...
)
{
40300: e24dd004 sub sp, sp, #4
int ret;
va_list ap;
va_start( ap, cmd );
40304: e28d2028 add r2, sp, #40 ; 0x28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
40308: e1500003 cmp r0, r3
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
4030c: e58d2000 str r2, [sp]
int fcntl(
int fd,
int cmd,
...
)
{
40310: e59d4024 ldr r4, [sp, #36] ; 0x24
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
40314: 2a000061 bcs 404a0 <fcntl+0x1b0>
iop = rtems_libio_iop( fd );
40318: e59f81b4 ldr r8, [pc, #436] ; 404d4 <fcntl+0x1e4>
4031c: e5986000 ldr r6, [r8]
40320: e0865300 add r5, r6, r0, lsl #6
rtems_libio_check_is_open(iop);
40324: e595c014 ldr ip, [r5, #20]
40328: e31c0c01 tst ip, #256 ; 0x100
4032c: 0a00005b beq 404a0 <fcntl+0x1b0>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
40330: e3540009 cmp r4, #9
40334: 979ff104 ldrls pc, [pc, r4, lsl #2]
40338: ea00002c b 403f0 <fcntl+0x100>
4033c: 00040404 .word 0x00040404
40340: 00040464 .word 0x00040464
40344: 00040470 .word 0x00040470
40348: 00040490 .word 0x00040490
4034c: 00040388 .word 0x00040388
40350: 00040364 .word 0x00040364
40354: 00040364 .word 0x00040364
40358: 00040364 .word 0x00040364
4035c: 00040364 .word 0x00040364
40360: 00040364 .word 0x00040364
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
40364: eb0010b5 bl 44640 <__errno>
40368: e3a03086 mov r3, #134 ; 0x86
4036c: e5803000 str r3, [r0]
40370: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
40374: e1a00006 mov r0, r6
40378: e28dd004 add sp, sp, #4
4037c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
40380: e28dd00c add sp, sp, #12
40384: e12fff1e bx lr
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
40388: e5920000 ldr r0, [r2]
4038c: ebff1fc8 bl 82b4 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
40390: e5953014 ldr r3, [r5, #20]
40394: e3c00f7f bic r0, r0, #508 ; 0x1fc
40398: e3c00002 bic r0, r0, #2
4039c: e1a00b00 lsl r0, r0, #22
403a0: e3c33c02 bic r3, r3, #512 ; 0x200
403a4: e1a00b20 lsr r0, r0, #22
403a8: e3c33001 bic r3, r3, #1
403ac: e1800003 orr r0, r0, r3
403b0: e5850014 str r0, [r5, #20]
403b4: e3a06000 mov r6, #0
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
403b8: e595303c ldr r3, [r5, #60] ; 0x3c
403bc: e5933030 ldr r3, [r3, #48] ; 0x30
403c0: e3530000 cmp r3, #0
403c4: 0affffea beq 40374 <fcntl+0x84>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
403c8: e1a00004 mov r0, r4
403cc: e1a01005 mov r1, r5
403d0: e1a0e00f mov lr, pc
403d4: e12fff13 bx r3
if (err) {
403d8: e2504000 subs r4, r0, #0
403dc: 0affffe4 beq 40374 <fcntl+0x84>
errno = err;
403e0: eb001096 bl 44640 <__errno> <== NOT EXECUTED
403e4: e5804000 str r4, [r0] <== NOT EXECUTED
403e8: e3e06000 mvn r6, #0 <== NOT EXECUTED
403ec: eaffffe0 b 40374 <fcntl+0x84> <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
403f0: eb001092 bl 44640 <__errno>
403f4: e3a03016 mov r3, #22
403f8: e5803000 str r3, [r0]
403fc: e3e06000 mvn r6, #0
40400: eaffffdb b 40374 <fcntl+0x84>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
40404: e5927000 ldr r7, [r2]
if ( fd2 )
40408: e3570000 cmp r7, #0
4040c: 0a000028 beq 404b4 <fcntl+0x1c4>
diop = rtems_libio_iop( fd2 );
40410: e1530007 cmp r3, r7 <== NOT EXECUTED
40414: 93a09000 movls r9, #0 <== NOT EXECUTED
40418: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED
4041c: 91a07009 movls r7, r9 <== NOT EXECUTED
40420: 81a09007 movhi r9, r7 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
40424: e2858018 add r8, r5, #24
40428: e8b8000f ldm r8!, {r0, r1, r2, r3}
4042c: e287a018 add sl, r7, #24
40430: e8aa000f stmia sl!, {r0, r1, r2, r3}
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
40434: e595203c ldr r2, [r5, #60] ; 0x3c
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
40438: e5981000 ldr r1, [r8]
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
4043c: e5953038 ldr r3, [r5, #56] ; 0x38
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
40440: e0666009 rsb r6, r6, r9
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
40444: e58a1000 str r1, [sl]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
40448: e587203c str r2, [r7, #60] ; 0x3c
diop->file_info = iop->file_info;
4044c: e5873038 str r3, [r7, #56] ; 0x38
diop->flags = iop->flags;
40450: e587c014 str ip, [r7, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
40454: e1a06346 asr r6, r6, #6
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
40458: e3560000 cmp r6, #0
4045c: aaffffd5 bge 403b8 <fcntl+0xc8>
40460: eaffffc3 b 40374 <fcntl+0x84> <== NOT EXECUTED
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
40464: e1a0c5ac lsr ip, ip, #11
40468: e20c6001 and r6, ip, #1
4046c: eaffffd1 b 403b8 <fcntl+0xc8>
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
40470: e5926000 ldr r6, [r2]
40474: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
40478: 138ccb02 orrne ip, ip, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
4047c: 03cccb02 biceq ip, ip, #2048 ; 0x800
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
40480: 1585c014 strne ip, [r5, #20]
40484: 13a06000 movne r6, #0
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
40488: 0585c014 streq ip, [r5, #20]
4048c: eaffffc9 b 403b8 <fcntl+0xc8>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
40490: e1a0000c mov r0, ip
40494: ebff1ee6 bl 8034 <rtems_libio_to_fcntl_flags>
40498: e1a06000 mov r6, r0
4049c: eaffffed b 40458 <fcntl+0x168>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
404a0: eb001066 bl 44640 <__errno> <== NOT EXECUTED
404a4: e3a03009 mov r3, #9 <== NOT EXECUTED
404a8: e5803000 str r3, [r0] <== NOT EXECUTED
404ac: e3e06000 mvn r6, #0 <== NOT EXECUTED
404b0: eaffffaf b 40374 <fcntl+0x84> <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
404b4: ebff1f50 bl 81fc <rtems_libio_allocate>
if ( diop == 0 ) {
404b8: e2507000 subs r7, r0, #0
404bc: 0affffc9 beq 403e8 <fcntl+0xf8>
404c0: e5986000 ldr r6, [r8]
404c4: e595c014 ldr ip, [r5, #20]
404c8: e1a09007 mov r9, r7
404cc: eaffffd4 b 40424 <fcntl+0x134>
00002c08 <fdatasync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2c08: e59f3070 ldr r3, [pc, #112] ; 2c80 <fdatasync+0x78>
2c0c: e5933000 ldr r3, [r3]
2c10: e1500003 cmp r0, r3
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
2c14: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2c18: 2a00000e bcs 2c58 <fdatasync+0x50>
iop = rtems_libio_iop( fd );
2c1c: e59f3060 ldr r3, [pc, #96] ; 2c84 <fdatasync+0x7c>
2c20: e5933000 ldr r3, [r3]
2c24: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2c28: e5903014 ldr r3, [r0, #20]
2c2c: e3130c01 tst r3, #256 ; 0x100
2c30: 0a000008 beq 2c58 <fdatasync+0x50>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2c34: e3130004 tst r3, #4
2c38: 0a000006 beq 2c58 <fdatasync+0x50>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
2c3c: e590303c ldr r3, [r0, #60] ; 0x3c
2c40: e593302c ldr r3, [r3, #44] ; 0x2c
2c44: e3530000 cmp r3, #0
2c48: 0a000007 beq 2c6c <fdatasync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
2c4c: e1a0e00f mov lr, pc <== NOT EXECUTED
2c50: e12fff13 bx r3 <== NOT EXECUTED
}
2c54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2c58: eb00378d bl 10a94 <__errno>
2c5c: e3a03009 mov r3, #9
2c60: e5803000 str r3, [r0]
2c64: e3e00000 mvn r0, #0
2c68: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2c6c: eb003788 bl 10a94 <__errno>
2c70: e3a03086 mov r3, #134 ; 0x86
2c74: e5803000 str r3, [r0]
2c78: e3e00000 mvn r0, #0
2c7c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000972c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
972c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
9730: e59f5400 ldr r5, [pc, #1024] ; 9b38 <fifo_open+0x40c>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
9734: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
9738: e3a01000 mov r1, #0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
973c: e24dd00c sub sp, sp, #12
9740: e1a04000 mov r4, r0
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
9744: e1a02001 mov r2, r1
9748: e5950000 ldr r0, [r5]
974c: ebfff016 bl 57ac <rtems_semaphore_obtain>
9750: e2509000 subs r9, r0, #0
9754: 13e08003 mvnne r8, #3
9758: 1a00001c bne 97d0 <fifo_open+0xa4>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
975c: e5946000 ldr r6, [r4] <== NOT EXECUTED
if (pipe == NULL) {
9760: e3560000 cmp r6, #0 <== NOT EXECUTED
9764: 0a00001c beq 97dc <fifo_open+0xb0> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
9768: e3a01000 mov r1, #0 <== NOT EXECUTED
976c: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED
9770: e1a02001 mov r2, r1 <== NOT EXECUTED
9774: ebfff00c bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
9778: e5943000 ldr r3, [r4] <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
977c: e3500000 cmp r0, #0 <== NOT EXECUTED
9780: 01a08000 moveq r8, r0 <== NOT EXECUTED
9784: 13e08003 mvnne r8, #3 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
9788: e3530000 cmp r3, #0 <== NOT EXECUTED
978c: 0a0000bc beq 9a84 <fifo_open+0x358> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
9790: e5950000 ldr r0, [r5] <== NOT EXECUTED
9794: ebfff04c bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
9798: e3580000 cmp r8, #0 <== NOT EXECUTED
979c: 1a00000b bne 97d0 <fifo_open+0xa4> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
97a0: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
97a4: e2033006 and r3, r3, #6 <== NOT EXECUTED
97a8: e3530004 cmp r3, #4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
97ac: e5945000 ldr r5, [r4] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
97b0: 0a000093 beq 9a04 <fifo_open+0x2d8> <== NOT EXECUTED
97b4: e3530006 cmp r3, #6 <== NOT EXECUTED
97b8: 0a00007d beq 99b4 <fifo_open+0x288> <== NOT EXECUTED
97bc: e3530002 cmp r3, #2 <== NOT EXECUTED
97c0: 0a000057 beq 9924 <fifo_open+0x1f8> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
97c4: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
97c8: ebfff03f bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
97cc: e3a08000 mov r8, #0 <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
97d0: e1a00008 mov r0, r8
97d4: e28dd00c add sp, sp, #12
97d8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
97dc: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED
97e0: ebffe309 bl 240c <malloc> <== NOT EXECUTED
if (pipe == NULL)
97e4: e3500000 cmp r0, #0 <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
97e8: e1a06000 mov r6, r0 <== NOT EXECUTED
97ec: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (pipe == NULL)
97f0: 0a0000ce beq 9b30 <fifo_open+0x404> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
97f4: e1a02000 mov r2, r0 <== NOT EXECUTED
97f8: e4829004 str r9, [r2], #4 <== NOT EXECUTED
97fc: e2822004 add r2, r2, #4 <== NOT EXECUTED
9800: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9804: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9808: e4829004 str r9, [r2], #4 <== NOT EXECUTED
980c: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9810: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9814: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9818: e4829004 str r9, [r2], #4 <== NOT EXECUTED
981c: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9820: e4829004 str r9, [r2], #4 <== NOT EXECUTED
9824: e4829004 str r9, [r2], #4 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
9828: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
982c: e5829000 str r9, [r2] <== NOT EXECUTED
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
9830: e1a00003 mov r0, r3 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
9834: e5863004 str r3, [r6, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
9838: ebffe2f3 bl 240c <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
983c: e3500000 cmp r0, #0 <== NOT EXECUTED
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
9840: e5860000 str r0, [r6] <== NOT EXECUTED
if (! pipe->Buffer)
9844: 0a0000b7 beq 9b28 <fifo_open+0x3fc> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
9848: e59f82ec ldr r8, [pc, #748] ; 9b3c <fifo_open+0x410> <== NOT EXECUTED
984c: e5d80000 ldrb r0, [r8] <== NOT EXECUTED
9850: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED
9854: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED
9858: e1a01009 mov r1, r9 <== NOT EXECUTED
985c: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED
9860: e1a02009 mov r2, r9 <== NOT EXECUTED
9864: e286302c add r3, r6, #44 ; 0x2c <== NOT EXECUTED
9868: eb000907 bl bc8c <rtems_barrier_create> <== NOT EXECUTED
986c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
9870: 1a0000aa bne 9b20 <fifo_open+0x3f4> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
9874: e5d80000 ldrb r0, [r8] <== NOT EXECUTED
9878: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED
987c: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED
9880: e2863030 add r3, r6, #48 ; 0x30 <== NOT EXECUTED
9884: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED
9888: e1a02001 mov r2, r1 <== NOT EXECUTED
988c: eb0008fe bl bc8c <rtems_barrier_create> <== NOT EXECUTED
9890: e2503000 subs r3, r0, #0 <== NOT EXECUTED
9894: 1a00009f bne 9b18 <fifo_open+0x3ec> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
9898: e5d80000 ldrb r0, [r8] <== NOT EXECUTED
989c: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED
98a0: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED
98a4: e286c028 add ip, r6, #40 ; 0x28 <== NOT EXECUTED
98a8: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED
98ac: e3a01001 mov r1, #1 <== NOT EXECUTED
98b0: e3a02010 mov r2, #16 <== NOT EXECUTED
98b4: e58dc000 str ip, [sp] <== NOT EXECUTED
98b8: ebffef20 bl 5540 <rtems_semaphore_create> <== NOT EXECUTED
98bc: e3500000 cmp r0, #0 <== NOT EXECUTED
98c0: 1a000092 bne 9b10 <fifo_open+0x3e4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
98c4: e28da004 add sl, sp, #4 <== NOT EXECUTED
98c8: e596102c ldr r1, [r6, #44] ; 0x2c <== NOT EXECUTED
98cc: e1a0200a mov r2, sl <== NOT EXECUTED
98d0: e59f0268 ldr r0, [pc, #616] ; 9b40 <fifo_open+0x414> <== NOT EXECUTED
98d4: ebfff59d bl 6f50 <_Objects_Get> <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
98d8: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
98dc: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
98e0: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
98e4: ebfff7f6 bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
98e8: e1a0200a mov r2, sl <== NOT EXECUTED
98ec: e5961030 ldr r1, [r6, #48] ; 0x30 <== NOT EXECUTED
98f0: e59f0248 ldr r0, [pc, #584] ; 9b40 <fifo_open+0x414> <== NOT EXECUTED
98f4: ebfff595 bl 6f50 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
98f8: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
98fc: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
9900: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
9904: ebfff7ee bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
9908: e5d83000 ldrb r3, [r8] <== NOT EXECUTED
990c: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED
9910: e2833001 add r3, r3, #1 <== NOT EXECUTED
9914: e5c83000 strb r3, [r8] <== NOT EXECUTED
c = 'a';
9918: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED
991c: 05c83000 strbeq r3, [r8] <== NOT EXECUTED
9920: eaffff90 b 9768 <fifo_open+0x3c> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
9924: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
9928: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
992c: e3530000 cmp r3, #0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
9930: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
9934: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
9938: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
993c: e5853010 str r3, [r5, #16] <== NOT EXECUTED
9940: 0a00006a beq 9af0 <fifo_open+0x3c4> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
9944: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
9948: e3530000 cmp r3, #0 <== NOT EXECUTED
994c: 1affff9c bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
9950: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
9954: e3130001 tst r3, #1 <== NOT EXECUTED
9958: 1affff99 bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
995c: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED
9960: ea000006 b 9980 <fifo_open+0x254> <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
9964: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9968: ebffef8f bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
996c: e3500000 cmp r0, #0 <== NOT EXECUTED
9970: 1a00000a bne 99a0 <fifo_open+0x274> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
9974: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
9978: e1530006 cmp r3, r6 <== NOT EXECUTED
997c: 1affff90 bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
9980: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9984: ebffefd0 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
9988: e3a01000 mov r1, #0 <== NOT EXECUTED
998c: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
9990: eb000921 bl be1c <rtems_barrier_wait> <== NOT EXECUTED
9994: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
9998: e1a02001 mov r2, r1 <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
999c: 0afffff0 beq 9964 <fifo_open+0x238> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
99a0: e3e08003 mvn r8, #3 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
99a4: e1a00004 mov r0, r4 <== NOT EXECUTED
99a8: e1a01007 mov r1, r7 <== NOT EXECUTED
99ac: ebffff18 bl 9614 <pipe_release> <== NOT EXECUTED
return err;
99b0: eaffff86 b 97d0 <fifo_open+0xa4> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
99b4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
99b8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
99bc: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
99c0: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
99c4: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
99c8: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
99cc: e5853010 str r3, [r5, #16] <== NOT EXECUTED
99d0: 0a00003e beq 9ad0 <fifo_open+0x3a4> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
99d4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
99d8: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
99dc: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
99e0: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
99e4: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
99e8: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
99ec: e5853014 str r3, [r5, #20] <== NOT EXECUTED
99f0: 1affff73 bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
99f4: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
99f8: e28d1008 add r1, sp, #8 <== NOT EXECUTED
99fc: eb0008ed bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
9a00: eaffff6f b 97c4 <fifo_open+0x98> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
9a04: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
9a08: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9a0c: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
9a10: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9a14: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
9a18: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9a1c: e5853014 str r3, [r5, #20] <== NOT EXECUTED
9a20: 0a00002e beq 9ae0 <fifo_open+0x3b4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
9a24: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
9a28: e3530000 cmp r3, #0 <== NOT EXECUTED
9a2c: 1affff64 bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
9a30: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
9a34: e3130001 tst r3, #1 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
9a38: 05956020 ldreq r6, [r5, #32] <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
9a3c: 0a000007 beq 9a60 <fifo_open+0x334> <== NOT EXECUTED
9a40: ea00002e b 9b00 <fifo_open+0x3d4> <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
9a44: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9a48: ebffef57 bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
9a4c: e3500000 cmp r0, #0 <== NOT EXECUTED
9a50: 1affffd2 bne 99a0 <fifo_open+0x274> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
9a54: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
9a58: e1530006 cmp r3, r6 <== NOT EXECUTED
9a5c: 1affff58 bne 97c4 <fifo_open+0x98> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
9a60: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9a64: ebffef98 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
9a68: e3a01000 mov r1, #0 <== NOT EXECUTED
9a6c: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED
9a70: eb0008e9 bl be1c <rtems_barrier_wait> <== NOT EXECUTED
9a74: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
9a78: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
9a7c: 0afffff0 beq 9a44 <fifo_open+0x318> <== NOT EXECUTED
9a80: eaffffc6 b 99a0 <fifo_open+0x274> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
9a84: e3580000 cmp r8, #0 <== NOT EXECUTED
9a88: 1a000003 bne 9a9c <fifo_open+0x370> <== NOT EXECUTED
pipe_free(pipe);
else
*pipep = pipe;
9a8c: e5846000 str r6, [r4] <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
9a90: e5950000 ldr r0, [r5] <== NOT EXECUTED
9a94: ebffef8c bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
9a98: eaffff40 b 97a0 <fifo_open+0x74> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
9a9c: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED
9aa0: eb0008aa bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
9aa4: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED
9aa8: eb0008a8 bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
9aac: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED
9ab0: ebffef14 bl 5708 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
9ab4: e5960000 ldr r0, [r6] <== NOT EXECUTED
9ab8: ebffe17a bl 20a8 <free> <== NOT EXECUTED
free(pipe);
9abc: e1a00006 mov r0, r6 <== NOT EXECUTED
9ac0: ebffe178 bl 20a8 <free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
9ac4: e5950000 ldr r0, [r5] <== NOT EXECUTED
9ac8: ebffef7f bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
9acc: eaffff3f b 97d0 <fifo_open+0xa4> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
9ad0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED
9ad4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
9ad8: eb0008b6 bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
9adc: eaffffbc b 99d4 <fifo_open+0x2a8> <== NOT EXECUTED
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
9ae0: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
9ae4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
9ae8: eb0008b2 bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
9aec: eaffffcc b 9a24 <fifo_open+0x2f8> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
9af0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED
9af4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
9af8: eb0008ae bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
9afc: eaffff90 b 9944 <fifo_open+0x218> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
9b00: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9b04: ebffef70 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
9b08: e3e08005 mvn r8, #5 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
9b0c: eaffffa4 b 99a4 <fifo_open+0x278> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
9b10: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED
9b14: eb00088d bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
9b18: e59a002c ldr r0, [sl, #44] ; 0x2c <== NOT EXECUTED
9b1c: eb00088b bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
9b20: e59a0000 ldr r0, [sl] <== NOT EXECUTED
9b24: ebffe15f bl 20a8 <free> <== NOT EXECUTED
err_buf:
free(pipe);
9b28: e1a0000a mov r0, sl <== NOT EXECUTED
9b2c: ebffe15d bl 20a8 <free> <== NOT EXECUTED
9b30: e3e0800b mvn r8, #11 <== NOT EXECUTED
9b34: eaffffe2 b 9ac4 <fifo_open+0x398> <== NOT EXECUTED
00002c88 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2c88: e59f30ec ldr r3, [pc, #236] ; 2d7c <fpathconf+0xf4>
2c8c: e5933000 ldr r3, [r3]
2c90: e1500003 cmp r0, r3
long fpathconf(
int fd,
int name
)
{
2c94: e52de004 push {lr} ; (str lr, [sp, #-4]!)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2c98: 2a000032 bcs 2d68 <fpathconf+0xe0>
iop = rtems_libio_iop(fd);
2c9c: e59f30dc ldr r3, [pc, #220] ; 2d80 <fpathconf+0xf8>
2ca0: e5933000 ldr r3, [r3]
2ca4: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2ca8: e5903014 ldr r3, [r0, #20]
2cac: e3130c01 tst r3, #256 ; 0x100
2cb0: 0a00002c beq 2d68 <fpathconf+0xe0>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2cb4: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2cb8: e351000b cmp r1, #11
2cbc: 979ff101 ldrls pc, [pc, r1, lsl #2]
2cc0: ea00000d b 2cfc <fpathconf+0x74>
2cc4: 00002d10 .word 0x00002d10
2cc8: 00002d18 .word 0x00002d18
2ccc: 00002d20 .word 0x00002d20
2cd0: 00002d28 .word 0x00002d28
2cd4: 00002d30 .word 0x00002d30
2cd8: 00002d38 .word 0x00002d38
2cdc: 00002d40 .word 0x00002d40
2ce0: 00002d48 .word 0x00002d48
2ce4: 00002d50 .word 0x00002d50
2ce8: 00002d58 .word 0x00002d58
2cec: 00002d60 .word 0x00002d60
2cf0: 00002cf4 .word 0x00002cf4
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2cf4: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2cf8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2cfc: eb003764 bl 10a94 <__errno>
2d00: e3a03016 mov r3, #22
2d04: e5803000 str r3, [r0]
2d08: e3e00000 mvn r0, #0
break;
}
return return_value;
}
2d0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
2d10: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2d14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2d18: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2d1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2d20: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2d24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2d28: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2d2c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
2d30: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2d34: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2d38: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2d3c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2d40: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2d44: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
2d48: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2d4c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2d50: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2d54: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2d58: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2d60: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2d64: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
2d68: eb003749 bl 10a94 <__errno>
2d6c: e3a03009 mov r3, #9
2d70: e5803000 str r3, [r0]
2d74: e3e00000 mvn r0, #0
2d78: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000020a8 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
20a8: e59f3088 ldr r3, [pc, #136] ; 2138 <free+0x90>
20ac: e593200c ldr r2, [r3, #12]
20b0: e92d4030 push {r4, r5, lr}
20b4: e2822001 add r2, r2, #1
if ( !ptr )
20b8: e2504000 subs r4, r0, #0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
20bc: e583200c str r2, [r3, #12]
if ( !ptr )
20c0: 08bd8030 popeq {r4, r5, pc}
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
20c4: e59f3070 ldr r3, [pc, #112] ; 213c <free+0x94>
20c8: e5933000 ldr r3, [r3]
20cc: e3530003 cmp r3, #3
20d0: 0a000012 beq 2120 <free+0x78>
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
20d4: e59f3064 ldr r3, [pc, #100] ; 2140 <free+0x98>
20d8: e5933000 ldr r3, [r3]
20dc: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
20e0: 11a00004 movne r0, r4
20e4: 11a0e00f movne lr, pc
20e8: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
20ec: e59f5050 ldr r5, [pc, #80] ; 2144 <free+0x9c>
20f0: e1a01004 mov r1, r4
20f4: e5950000 ldr r0, [r5]
20f8: eb001461 bl 7284 <_Protected_heap_Free>
20fc: e3500000 cmp r0, #0
2100: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
2104: e5952000 ldr r2, [r5] <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
2108: e59f0038 ldr r0, [pc, #56] ; 2148 <free+0xa0> <== NOT EXECUTED
210c: e2822018 add r2, r2, #24 <== NOT EXECUTED
2110: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
2114: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
2118: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
211c: ea000397 b 2f80 <printk> <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2120: eb00005d bl 229c <malloc_is_system_state_OK>
2124: e3500000 cmp r0, #0
2128: 1affffe9 bne 20d4 <free+0x2c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
212c: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
2130: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
2134: ea00006b b 22e8 <malloc_deferred_free> <== NOT EXECUTED
0002a6cc <free_user_env>:
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
2a6cc: e59f3058 ldr r3, [pc, #88] ; 2a72c <free_user_env+0x60> <== NOT EXECUTED
2a6d0: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2a6d4: e92d4010 push {r4, lr} <== NOT EXECUTED
2a6d8: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
2a6dc: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2a6e0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
2a6e4: e3530000 cmp r3, #0 <== NOT EXECUTED
2a6e8: 0a000004 beq 2a700 <free_user_env+0x34> <== NOT EXECUTED
2a6ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a6f0: e3530000 cmp r3, #0 <== NOT EXECUTED
2a6f4: 12800004 addne r0, r0, #4 <== NOT EXECUTED
2a6f8: 11a0e00f movne lr, pc <== NOT EXECUTED
2a6fc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
2a700: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
2a704: e3530000 cmp r3, #0 <== NOT EXECUTED
2a708: 0a000004 beq 2a720 <free_user_env+0x54> <== NOT EXECUTED
2a70c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a710: e3530000 cmp r3, #0 <== NOT EXECUTED
2a714: 12840018 addne r0, r4, #24 <== NOT EXECUTED
2a718: 11a0e00f movne lr, pc <== NOT EXECUTED
2a71c: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
2a720: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
2a724: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
2a728: eaff7590 b 7d70 <free> <== NOT EXECUTED
0001af38 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
1af38: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
1af3c: e2515000 subs r5, r1, #0
1af40: 0a000023 beq 1afd4 <fstat+0x9c>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
1af44: e59f309c ldr r3, [pc, #156] ; 1afe8 <fstat+0xb0>
1af48: e5933000 ldr r3, [r3]
1af4c: e1500003 cmp r0, r3
1af50: 2a000015 bcs 1afac <fstat+0x74>
1af54: e59f3090 ldr r3, [pc, #144] ; 1afec <fstat+0xb4>
1af58: e5934000 ldr r4, [r3]
1af5c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
1af60: e5943014 ldr r3, [r4, #20]
1af64: e3130c01 tst r3, #256 ; 0x100
1af68: 0a00000f beq 1afac <fstat+0x74>
if ( !iop->handlers )
1af6c: e594303c ldr r3, [r4, #60] ; 0x3c
1af70: e3530000 cmp r3, #0
1af74: 0a00000c beq 1afac <fstat+0x74>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
1af78: e5933018 ldr r3, [r3, #24]
1af7c: e3530000 cmp r3, #0
1af80: 0a00000e beq 1afc0 <fstat+0x88>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
1af84: e3a01000 mov r1, #0
1af88: e3a02048 mov r2, #72 ; 0x48
1af8c: e1a00005 mov r0, r5
1af90: ebffd429 bl 1003c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
1af94: e2840018 add r0, r4, #24
1af98: e1a01005 mov r1, r5
1af9c: e594303c ldr r3, [r4, #60] ; 0x3c
1afa0: e1a0e00f mov lr, pc
1afa4: e593f018 ldr pc, [r3, #24]
}
1afa8: e8bd8030 pop {r4, r5, pc}
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
1afac: ebffd1d8 bl f714 <__errno>
1afb0: e3a03009 mov r3, #9
1afb4: e5803000 str r3, [r0]
1afb8: e3e00000 mvn r0, #0
1afbc: e8bd8030 pop {r4, r5, pc}
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1afc0: ebffd1d3 bl f714 <__errno> <== NOT EXECUTED
1afc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1afc8: e5803000 str r3, [r0] <== NOT EXECUTED
1afcc: e3e00000 mvn r0, #0 <== NOT EXECUTED
1afd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
1afd4: ebffd1ce bl f714 <__errno>
1afd8: e3a0300e mov r3, #14
1afdc: e5803000 str r3, [r0]
1afe0: e3e00000 mvn r0, #0
1afe4: e8bd8030 pop {r4, r5, pc}
000292c4 <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
292c4: e59f3070 ldr r3, [pc, #112] ; 2933c <fsync+0x78>
292c8: e5933000 ldr r3, [r3]
292cc: e1500003 cmp r0, r3
#include <rtems/seterr.h>
int fsync(
int fd
)
{
292d0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
292d4: 2a00000e bcs 29314 <fsync+0x50>
iop = rtems_libio_iop( fd );
292d8: e59f3060 ldr r3, [pc, #96] ; 29340 <fsync+0x7c>
292dc: e5933000 ldr r3, [r3]
292e0: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
292e4: e5903014 ldr r3, [r0, #20]
292e8: e3130c01 tst r3, #256 ; 0x100
292ec: 0a000008 beq 29314 <fsync+0x50>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
292f0: e590303c ldr r3, [r0, #60] ; 0x3c
292f4: e3530000 cmp r3, #0
292f8: 0a000005 beq 29314 <fsync+0x50>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
292fc: e5933028 ldr r3, [r3, #40] ; 0x28
29300: e3530000 cmp r3, #0
29304: 0a000007 beq 29328 <fsync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
29308: e1a0e00f mov lr, pc
2930c: e12fff13 bx r3
}
29310: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
29314: eb006cc9 bl 44640 <__errno> <== NOT EXECUTED
29318: e3a03009 mov r3, #9 <== NOT EXECUTED
2931c: e5803000 str r3, [r0] <== NOT EXECUTED
29320: e3e00000 mvn r0, #0 <== NOT EXECUTED
29324: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
29328: eb006cc4 bl 44640 <__errno>
2932c: e3a03086 mov r3, #134 ; 0x86
29330: e5803000 str r3, [r0]
29334: e3e00000 mvn r0, #0
29338: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000ae04 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
ae04: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
ae08: e59f30fc ldr r3, [pc, #252] ; af0c <ftruncate+0x108>
ae0c: e5933000 ldr r3, [r3]
ae10: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
ae14: e24dd014 sub sp, sp, #20
ae18: e1a05001 mov r5, r1
ae1c: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
ae20: 2a000025 bcs aebc <ftruncate+0xb8>
iop = rtems_libio_iop( fd );
ae24: e59f30e4 ldr r3, [pc, #228] ; af10 <ftruncate+0x10c>
ae28: e5934000 ldr r4, [r3]
ae2c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
ae30: e5943014 ldr r3, [r4, #20]
ae34: e3130c01 tst r3, #256 ; 0x100
ae38: 0a00001f beq aebc <ftruncate+0xb8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
ae3c: e3130004 tst r3, #4
ae40: 0a000022 beq aed0 <ftruncate+0xcc>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
ae44: e284c018 add ip, r4, #24
ae48: e8bc000f ldm ip!, {r0, r1, r2, r3}
ae4c: e1a0700d mov r7, sp
ae50: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
ae54: e59d200c ldr r2, [sp, #12]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
ae58: e1a03007 mov r3, r7
if ( !loc.ops->node_type_h )
ae5c: e5927010 ldr r7, [r2, #16]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
ae60: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
ae64: e3570000 cmp r7, #0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
ae68: e5832000 str r2, [r3]
if ( !loc.ops->node_type_h )
ae6c: 0a00001c beq aee4 <ftruncate+0xe0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
ae70: e1a0000d mov r0, sp
ae74: e1a0e00f mov lr, pc
ae78: e12fff17 bx r7
ae7c: e3500001 cmp r0, #1
ae80: 0a00001c beq aef8 <ftruncate+0xf4>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
ae84: e5943014 ldr r3, [r4, #20]
ae88: e3130004 tst r3, #4
ae8c: 0a00000f beq aed0 <ftruncate+0xcc>
if ( !iop->handlers->ftruncate_h )
ae90: e594303c ldr r3, [r4, #60] ; 0x3c
ae94: e5933020 ldr r3, [r3, #32]
ae98: e3530000 cmp r3, #0
ae9c: 0a000010 beq aee4 <ftruncate+0xe0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
aea0: e1a00004 mov r0, r4
aea4: e1a01005 mov r1, r5
aea8: e1a02006 mov r2, r6
aeac: e1a0e00f mov lr, pc
aeb0: e12fff13 bx r3
}
aeb4: e28dd014 add sp, sp, #20
aeb8: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
aebc: eb001214 bl f714 <__errno> <== NOT EXECUTED
aec0: e3a03009 mov r3, #9 <== NOT EXECUTED
aec4: e5803000 str r3, [r0] <== NOT EXECUTED
aec8: e3e00000 mvn r0, #0 <== NOT EXECUTED
aecc: eafffff8 b aeb4 <ftruncate+0xb0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
aed0: eb00120f bl f714 <__errno> <== NOT EXECUTED
aed4: e3a03016 mov r3, #22 <== NOT EXECUTED
aed8: e5803000 str r3, [r0] <== NOT EXECUTED
aedc: e3e00000 mvn r0, #0 <== NOT EXECUTED
aee0: eafffff3 b aeb4 <ftruncate+0xb0> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
aee4: eb00120a bl f714 <__errno> <== NOT EXECUTED
aee8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
aeec: e5803000 str r3, [r0] <== NOT EXECUTED
aef0: e3e00000 mvn r0, #0 <== NOT EXECUTED
aef4: eaffffee b aeb4 <ftruncate+0xb0> <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
aef8: eb001205 bl f714 <__errno>
aefc: e3a03015 mov r3, #21
af00: e5803000 str r3, [r0]
af04: e3e00000 mvn r0, #0
af08: eaffffe9 b aeb4 <ftruncate+0xb0>
0005e234 <getdents>:
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5e234: e59f30b8 ldr r3, [pc, #184] ; 5e2f4 <getdents+0xc0>
5e238: e5933000 ldr r3, [r3]
5e23c: e1500003 cmp r0, r3
5e240: 359f30b0 ldrcc r3, [pc, #176] ; 5e2f8 <getdents+0xc4>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5e244: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5e248: 35934000 ldrcc r4, [r3]
5e24c: 23a04000 movcs r4, #0
5e250: 30844300 addcc r4, r4, r0, lsl #6
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e254: e284c018 add ip, r4, #24
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5e258: e24dd014 sub sp, sp, #20
5e25c: e1a06001 mov r6, r1
5e260: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e264: e8bc000f ldm ip!, {r0, r1, r2, r3}
5e268: e1a0700d mov r7, sp
5e26c: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
5e270: e59d200c ldr r2, [sp, #12]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e274: e1a03007 mov r3, r7
if ( !loc.ops->node_type_h )
5e278: e5927010 ldr r7, [r2, #16]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e27c: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
5e280: e3570000 cmp r7, #0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e284: e5832000 str r2, [r3]
if ( !loc.ops->node_type_h )
5e288: 0a000014 beq 5e2e0 <getdents+0xac>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5e28c: e1a0000d mov r0, sp
5e290: e1a0e00f mov lr, pc
5e294: e12fff17 bx r7
5e298: e3500001 cmp r0, #1
5e29c: 1a00000a bne 5e2cc <getdents+0x98>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
5e2a0: e594303c ldr r3, [r4, #60] ; 0x3c
5e2a4: e5933008 ldr r3, [r3, #8]
5e2a8: e3530000 cmp r3, #0
5e2ac: 0a00000b beq 5e2e0 <getdents+0xac>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5e2b0: e1a00004 mov r0, r4
5e2b4: e1a01006 mov r1, r6
5e2b8: e1a02005 mov r2, r5
5e2bc: e1a0e00f mov lr, pc
5e2c0: e12fff13 bx r3
}
5e2c4: e28dd014 add sp, sp, #20
5e2c8: e8bd80f0 pop {r4, r5, r6, r7, pc}
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5e2cc: ebff98db bl 44640 <__errno>
5e2d0: e3a03014 mov r3, #20
5e2d4: e5803000 str r3, [r0]
5e2d8: e3e00000 mvn r0, #0
5e2dc: eafffff8 b 5e2c4 <getdents+0x90>
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5e2e0: ebff98d6 bl 44640 <__errno> <== NOT EXECUTED
5e2e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5e2e8: e5803000 str r3, [r0] <== NOT EXECUTED
5e2ec: e3e00000 mvn r0, #0 <== NOT EXECUTED
5e2f0: eafffff3 b 5e2c4 <getdents+0x90> <== NOT EXECUTED
0002947c <getgid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
gid_t getgid( void )
{
2947c: e59f3008 ldr r3, [pc, #8] ; 2948c <getgid+0x10> <== NOT EXECUTED
29480: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Gid;
}
29484: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
29488: e12fff1e bx lr <== NOT EXECUTED
00029ae8 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
29ae8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
29aec: e59d801c ldr r8, [sp, #28]
29af0: e1a05000 mov r5, r0
29af4: e1a0a001 mov sl, r1
29af8: e1a04002 mov r4, r2
29afc: e1a07003 mov r7, r3
FILE *fp;
int match;
init_etc_passwd_group();
29b00: ebffffb2 bl 299d0 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
29b04: e59f00b0 ldr r0, [pc, #176] ; 29bbc <getgr_r+0xd4>
29b08: e59f10b0 ldr r1, [pc, #176] ; 29bc0 <getgr_r+0xd8>
29b0c: eb006d3b bl 45000 <fopen>
29b10: e2506000 subs r6, r0, #0
29b14: 1a000006 bne 29b34 <getgr_r+0x4c>
29b18: ea000022 b 29ba8 <getgr_r+0xc0> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
29b1c: e5940000 ldr r0, [r4]
29b20: eb00836c bl 4a8d8 <strcmp>
29b24: e2700001 rsbs r0, r0, #1
29b28: 33a00000 movcc r0, #0
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
29b2c: e3500000 cmp r0, #0
29b30: 1a00000f bne 29b74 <getgr_r+0x8c>
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
29b34: e1a01004 mov r1, r4
29b38: e1a02007 mov r2, r7
29b3c: e1a03008 mov r3, r8
29b40: e1a00006 mov r0, r6
29b44: ebfffee1 bl 296d0 <scangr>
29b48: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
29b4c: e1a01005 mov r1, r5
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
29b50: 0a00000d beq 29b8c <getgr_r+0xa4>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
29b54: e3550000 cmp r5, #0
29b58: 1affffef bne 29b1c <getgr_r+0x34>
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
29b5c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
29b60: e150000a cmp r0, sl <== NOT EXECUTED
29b64: 13a00000 movne r0, #0 <== NOT EXECUTED
29b68: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
29b6c: e3500000 cmp r0, #0 <== NOT EXECUTED
29b70: 0affffef beq 29b34 <getgr_r+0x4c> <== NOT EXECUTED
fclose(fp);
29b74: e1a00006 mov r0, r6
29b78: eb006afd bl 44774 <fclose>
*result = grp;
29b7c: e59d3020 ldr r3, [sp, #32]
29b80: e3a00000 mov r0, #0
29b84: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
29b88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
29b8c: eb006aab bl 44640 <__errno> <== NOT EXECUTED
29b90: e3a03016 mov r3, #22 <== NOT EXECUTED
29b94: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
29b98: e1a00006 mov r0, r6 <== NOT EXECUTED
29b9c: eb006af4 bl 44774 <fclose> <== NOT EXECUTED
29ba0: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
29ba4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
29ba8: eb006aa4 bl 44640 <__errno> <== NOT EXECUTED
29bac: e3a03016 mov r3, #22 <== NOT EXECUTED
29bb0: e5803000 str r3, [r0] <== NOT EXECUTED
29bb4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
29bb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00029824 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
29824: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
29828: e59f4030 ldr r4, [pc, #48] ; 29860 <getgrent+0x3c> <== NOT EXECUTED
2982c: e5940000 ldr r0, [r4] <== NOT EXECUTED
29830: e3500000 cmp r0, #0 <== NOT EXECUTED
29834: 1a000001 bne 29840 <getgrent+0x1c> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
29838: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &grent;
}
2983c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
29840: e2841008 add r1, r4, #8 <== NOT EXECUTED
29844: e2842018 add r2, r4, #24 <== NOT EXECUTED
29848: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
2984c: ebffff9f bl 296d0 <scangr> <== NOT EXECUTED
29850: e3500000 cmp r0, #0 <== NOT EXECUTED
29854: 12840008 addne r0, r4, #8 <== NOT EXECUTED
29858: 18bd8010 popne {r4, pc} <== NOT EXECUTED
2985c: eafffff5 b 29838 <getgrent+0x14> <== NOT EXECUTED
00029c00 <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
29c00: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
29c04: e59f1030 ldr r1, [pc, #48] ; 29c3c <getgrgid+0x3c> <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
29c08: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
29c0c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
29c10: e28dc004 add ip, sp, #4 <== NOT EXECUTED
29c14: e2812010 add r2, r1, #16 <== NOT EXECUTED
29c18: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
29c1c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
29c20: e58dc000 str ip, [sp] <== NOT EXECUTED
29c24: ebffffe6 bl 29bc4 <getgrgid_r> <== NOT EXECUTED
29c28: e3500000 cmp r0, #0 <== NOT EXECUTED
29c2c: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
29c30: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
29c34: e28dd008 add sp, sp, #8 <== NOT EXECUTED
29c38: e8bd8000 pop {pc} <== NOT EXECUTED
00029bc4 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
29bc4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
29bc8: e1a0c002 mov ip, r2 <== NOT EXECUTED
29bcc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
29bd0: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
29bd4: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
29bd8: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
29bdc: e1a0300c mov r3, ip <== NOT EXECUTED
29be0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
29be4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
29be8: e1a0200e mov r2, lr <== NOT EXECUTED
29bec: e3a00000 mov r0, #0 <== NOT EXECUTED
29bf0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
29bf4: ebffffbb bl 29ae8 <getgr_r> <== NOT EXECUTED
}
29bf8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
29bfc: e8bd8000 pop {pc} <== NOT EXECUTED
00029ce0 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
29ce0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
29ce4: e59d801c ldr r8, [sp, #28]
29ce8: e1a05000 mov r5, r0
29cec: e1a0a001 mov sl, r1
29cf0: e1a04002 mov r4, r2
29cf4: e1a07003 mov r7, r3
FILE *fp;
int match;
init_etc_passwd_group();
29cf8: ebffff34 bl 299d0 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
29cfc: e59f00b0 ldr r0, [pc, #176] ; 29db4 <getpw_r+0xd4>
29d00: e59f10b0 ldr r1, [pc, #176] ; 29db8 <getpw_r+0xd8>
29d04: eb006cbd bl 45000 <fopen>
29d08: e2506000 subs r6, r0, #0
29d0c: 1a000006 bne 29d2c <getpw_r+0x4c>
29d10: ea000022 b 29da0 <getpw_r+0xc0> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
29d14: e5940000 ldr r0, [r4]
29d18: eb0082ee bl 4a8d8 <strcmp>
29d1c: e2700001 rsbs r0, r0, #1
29d20: 33a00000 movcc r0, #0
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
29d24: e3500000 cmp r0, #0
29d28: 1a00000f bne 29d6c <getpw_r+0x8c>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
29d2c: e1a01004 mov r1, r4
29d30: e1a02007 mov r2, r7
29d34: e1a03008 mov r3, r8
29d38: e1a00006 mov r0, r6
29d3c: ebfffec8 bl 29864 <scanpw>
29d40: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
29d44: e1a01005 mov r1, r5
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
29d48: 0a00000d beq 29d84 <getpw_r+0xa4>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
29d4c: e3550000 cmp r5, #0
29d50: 1affffef bne 29d14 <getpw_r+0x34>
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
29d54: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
29d58: e150000a cmp r0, sl <== NOT EXECUTED
29d5c: 13a00000 movne r0, #0 <== NOT EXECUTED
29d60: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
29d64: e3500000 cmp r0, #0 <== NOT EXECUTED
29d68: 0affffef beq 29d2c <getpw_r+0x4c> <== NOT EXECUTED
fclose(fp);
29d6c: e1a00006 mov r0, r6
29d70: eb006a7f bl 44774 <fclose>
*result = pwd;
29d74: e59d3020 ldr r3, [sp, #32]
29d78: e3a00000 mov r0, #0
29d7c: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
29d80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
29d84: eb006a2d bl 44640 <__errno> <== NOT EXECUTED
29d88: e3a03016 mov r3, #22 <== NOT EXECUTED
29d8c: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
29d90: e1a00006 mov r0, r6 <== NOT EXECUTED
29d94: eb006a76 bl 44774 <fclose> <== NOT EXECUTED
29d98: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
29d9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
29da0: eb006a26 bl 44640 <__errno> <== NOT EXECUTED
29da4: e3a03016 mov r3, #22 <== NOT EXECUTED
29da8: e5803000 str r3, [r0] <== NOT EXECUTED
29dac: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
29db0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00029990 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
29990: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
29994: e59f4030 ldr r4, [pc, #48] ; 299cc <getpwent+0x3c> <== NOT EXECUTED
29998: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
2999c: e3500000 cmp r0, #0 <== NOT EXECUTED
299a0: 1a000001 bne 299ac <getpwent+0x1c> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
299a4: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &pwent;
}
299a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
299ac: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED
299b0: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED
299b4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
299b8: ebffffa9 bl 29864 <scanpw> <== NOT EXECUTED
299bc: e3500000 cmp r0, #0 <== NOT EXECUTED
299c0: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED
299c4: 18bd8010 popne {r4, pc} <== NOT EXECUTED
299c8: eafffff5 b 299a4 <getpwent+0x14> <== NOT EXECUTED
00029df8 <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
29df8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
29dfc: e59f1030 ldr r1, [pc, #48] ; 29e34 <getpwuid+0x3c> <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
29e00: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
29e04: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
29e08: e28dc004 add ip, sp, #4 <== NOT EXECUTED
29e0c: e281201c add r2, r1, #28 <== NOT EXECUTED
29e10: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
29e14: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
29e18: e58dc000 str ip, [sp] <== NOT EXECUTED
29e1c: ebffffe6 bl 29dbc <getpwuid_r> <== NOT EXECUTED
29e20: e3500000 cmp r0, #0 <== NOT EXECUTED
29e24: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
29e28: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
29e2c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
29e30: e8bd8000 pop {pc} <== NOT EXECUTED
00029dbc <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
29dbc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
29dc0: e1a0c002 mov ip, r2 <== NOT EXECUTED
29dc4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
29dc8: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
29dcc: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
29dd0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
29dd4: e1a0300c mov r3, ip <== NOT EXECUTED
29dd8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
29ddc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
29de0: e1a0200e mov r2, lr <== NOT EXECUTED
29de4: e3a00000 mov r0, #0 <== NOT EXECUTED
29de8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
29dec: ebffffbb bl 29ce0 <getpw_r> <== NOT EXECUTED
}
29df0: e28dd008 add sp, sp, #8 <== NOT EXECUTED
29df4: e8bd8000 pop {pc} <== NOT EXECUTED
0000214c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
214c: e92d4030 push {r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
2150: e2504000 subs r4, r0, #0
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
2154: e24dd008 sub sp, sp, #8
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
2158: 0a00000f beq 219c <gettimeofday+0x50>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
215c: e10f5000 mrs r5, CPSR
2160: e3853080 orr r3, r5, #128 ; 0x80
2164: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
2168: e1a0000d mov r0, sp
216c: eb0010f2 bl 653c <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2170: e129f005 msr CPSR_fc, r5
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
2174: e59f2034 ldr r2, [pc, #52] ; 21b0 <gettimeofday+0x64>
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
2178: e59d3004 ldr r3, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
217c: e0c10392 smull r0, r1, r2, r3
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
2180: e59d2000 ldr r2, [sp]
time->tv_usec = useconds;
2184: e1a03fc3 asr r3, r3, #31
2188: e0633341 rsb r3, r3, r1, asr #6
218c: e884000c stm r4, {r2, r3}
2190: e3a00000 mov r0, #0
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
2194: e28dd008 add sp, sp, #8
2198: e8bd8030 pop {r4, r5, pc}
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
219c: eb00355c bl f714 <__errno> <== NOT EXECUTED
21a0: e3a0300e mov r3, #14 <== NOT EXECUTED
21a4: e5803000 str r3, [r0] <== NOT EXECUTED
21a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
21ac: eafffff8 b 2194 <gettimeofday+0x48> <== NOT EXECUTED
00007e8c <getuid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
uid_t getuid( void )
{
7e8c: e59f3008 ldr r3, [pc, #8] ; 7e9c <getuid+0x10> <== NOT EXECUTED
7e90: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Uid;
}
7e94: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
7e98: e12fff1e bx lr <== NOT EXECUTED
00005790 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
5790: e92d000e push {r1, r2, r3}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
5794: e59f3090 ldr r3, [pc, #144] ; 582c <ioctl+0x9c>
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
5798: e52de004 push {lr} ; (str lr, [sp, #-4]!)
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
579c: e5933000 ldr r3, [r3]
57a0: e1500003 cmp r0, r3
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
57a4: e24dd004 sub sp, sp, #4
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
57a8: 2a000015 bcs 5804 <ioctl+0x74>
iop = rtems_libio_iop( fd );
57ac: e59f307c ldr r3, [pc, #124] ; 5830 <ioctl+0xa0>
57b0: e5933000 ldr r3, [r3]
57b4: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
57b8: e5903014 ldr r3, [r0, #20]
57bc: e3130c01 tst r3, #256 ; 0x100
57c0: 0a00000f beq 5804 <ioctl+0x74>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
57c4: e590303c ldr r3, [r0, #60] ; 0x3c
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
57c8: e28d2010 add r2, sp, #16
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
57cc: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
57d0: e58d2000 str r2, [sp]
57d4: e59d200c ldr r2, [sp, #12]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
57d8: 0a000009 beq 5804 <ioctl+0x74>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
57dc: e5933010 ldr r3, [r3, #16]
57e0: e3530000 cmp r3, #0
57e4: 0a00000b beq 5818 <ioctl+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
57e8: e59d1008 ldr r1, [sp, #8]
57ec: e1a0e00f mov lr, pc
57f0: e12fff13 bx r3
return rc;
}
57f4: e28dd004 add sp, sp, #4
57f8: e49de004 pop {lr} ; (ldr lr, [sp], #4)
57fc: e28dd00c add sp, sp, #12
5800: e12fff1e bx lr
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5804: eb003878 bl 139ec <__errno>
5808: e3a03009 mov r3, #9
580c: e5803000 str r3, [r0]
5810: e3e00000 mvn r0, #0
5814: eafffff6 b 57f4 <ioctl+0x64>
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5818: eb003873 bl 139ec <__errno> <== NOT EXECUTED
581c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5820: e5803000 str r3, [r0] <== NOT EXECUTED
5824: e3e00000 mvn r0, #0 <== NOT EXECUTED
5828: eafffff1 b 57f4 <ioctl+0x64> <== NOT EXECUTED
00003b30 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
3b30: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
3b34: e3130020 tst r3, #32 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
3b38: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3b3c: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
3b40: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
3b44: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
3b48: e1a05001 mov r5, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
3b4c: 0a000007 beq 3b70 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
3b50: e59f2198 ldr r2, [pc, #408] ; 3cf0 <iproc+0x1c0> <== NOT EXECUTED
3b54: e5922000 ldr r2, [r2] <== NOT EXECUTED
3b58: e0822004 add r2, r2, r4 <== NOT EXECUTED
3b5c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
3b60: e2022003 and r2, r2, #3 <== NOT EXECUTED
3b64: e3520001 cmp r2, #1 <== NOT EXECUTED
3b68: 02844020 addeq r4, r4, #32 <== NOT EXECUTED
3b6c: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
3b70: e354000d cmp r4, #13 <== NOT EXECUTED
3b74: 0a000012 beq 3bc4 <iproc+0x94> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3b78: e354000a cmp r4, #10 <== NOT EXECUTED
3b7c: 0a000034 beq 3c54 <iproc+0x124> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
3b80: e3540000 cmp r4, #0 <== NOT EXECUTED
3b84: 1a000015 bne 3be0 <iproc+0xb0> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
3b88: e59f3164 ldr r3, [pc, #356] ; 3cf4 <iproc+0x1c4> <== NOT EXECUTED
3b8c: e5932000 ldr r2, [r3] <== NOT EXECUTED
3b90: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
3b94: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3b98: e1530002 cmp r3, r2 <== NOT EXECUTED
3b9c: aa00000a bge 3bcc <iproc+0x9c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3ba0: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED
3ba4: e3120008 tst r2, #8 <== NOT EXECUTED
3ba8: 1a00002c bne 3c60 <iproc+0x130> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
3bac: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
3bb0: e2832001 add r2, r3, #1 <== NOT EXECUTED
3bb4: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
3bb8: e3a00000 mov r0, #0 <== NOT EXECUTED
3bbc: e5852020 str r2, [r5, #32] <== NOT EXECUTED
3bc0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
3bc4: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED
3bc8: 0a000001 beq 3bd4 <iproc+0xa4> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
3bcc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return 0;
}
3bd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
3bd4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
3bd8: 03a0400d moveq r4, #13 <== NOT EXECUTED
3bdc: 13a0400a movne r4, #10 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
3be0: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
3be4: e3130002 tst r3, #2 <== NOT EXECUTED
3be8: 0affffe6 beq 3b88 <iproc+0x58> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
3bec: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED
3bf0: e1520004 cmp r2, r4 <== NOT EXECUTED
3bf4: 0a000038 beq 3cdc <iproc+0x1ac> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
3bf8: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED
3bfc: e1520004 cmp r2, r4 <== NOT EXECUTED
3c00: 0a000030 beq 3cc8 <iproc+0x198> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
3c04: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED
3c08: e1520004 cmp r2, r4 <== NOT EXECUTED
3c0c: 0a000027 beq 3cb0 <iproc+0x180> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
3c10: e354000a cmp r4, #10 <== NOT EXECUTED
3c14: 0a00001b beq 3c88 <iproc+0x158> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
3c18: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED
3c1c: e1520004 cmp r2, r4 <== NOT EXECUTED
3c20: 0a000002 beq 3c30 <iproc+0x100> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
3c24: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED
3c28: e1520004 cmp r2, r4 <== NOT EXECUTED
3c2c: 1affffd5 bne 3b88 <iproc+0x58> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3c30: e3130008 tst r3, #8 <== NOT EXECUTED
3c34: 1a00001f bne 3cb8 <iproc+0x188> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
3c38: e285101c add r1, r5, #28 <== NOT EXECUTED
3c3c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
3c40: e2832001 add r2, r3, #1 <== NOT EXECUTED
3c44: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
3c48: e3a00001 mov r0, #1 <== NOT EXECUTED
3c4c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
return 1;
3c50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3c54: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
3c58: 13a0400d movne r4, #13 <== NOT EXECUTED
3c5c: eaffffdf b 3be0 <iproc+0xb0> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
3c60: e1a00004 mov r0, r4 <== NOT EXECUTED
3c64: e1a01005 mov r1, r5 <== NOT EXECUTED
3c68: ebffff0b bl 389c <echo> <== NOT EXECUTED
3c6c: e285101c add r1, r5, #28 <== NOT EXECUTED
3c70: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3c74: e2832001 add r2, r3, #1 <== NOT EXECUTED
3c78: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
3c7c: e3a00000 mov r0, #0 <== NOT EXECUTED
3c80: e5852020 str r2, [r5, #32] <== NOT EXECUTED
3c84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
3c88: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
3c8c: 11a00004 movne r0, r4 <== NOT EXECUTED
3c90: 11a01005 movne r1, r5 <== NOT EXECUTED
3c94: 1bffff00 blne 389c <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3c98: e285101c add r1, r5, #28 <== NOT EXECUTED
3c9c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
3ca0: e2832001 add r2, r3, #1 <== NOT EXECUTED
3ca4: e3a0000a mov r0, #10 <== NOT EXECUTED
3ca8: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED
3cac: e5852020 str r2, [r5, #32] <== NOT EXECUTED
3cb0: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
3cb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
3cb8: e1a00004 mov r0, r4 <== NOT EXECUTED
3cbc: e1a01005 mov r1, r5 <== NOT EXECUTED
3cc0: ebfffef5 bl 389c <echo> <== NOT EXECUTED
3cc4: eaffffdb b 3c38 <iproc+0x108> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
3cc8: e1a00005 mov r0, r5 <== NOT EXECUTED
3ccc: e3a01001 mov r1, #1 <== NOT EXECUTED
3cd0: ebffff13 bl 3924 <erase> <== NOT EXECUTED
3cd4: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
3cd8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
3cdc: e1a00005 mov r0, r5 <== NOT EXECUTED
3ce0: e3a01000 mov r1, #0 <== NOT EXECUTED
3ce4: ebffff0e bl 3924 <erase> <== NOT EXECUTED
3ce8: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
3cec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000e8cc <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
e8cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
e8d0: e24dd00c sub sp, sp, #12
e8d4: e1a04000 mov r4, r0
e8d8: e1a05001 mov r5, r1
e8dc: e1a08002 mov r8, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
e8e0: ebfff195 bl af3c <getpid>
e8e4: e1500004 cmp r0, r4
e8e8: 1a000096 bne eb48 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
e8ec: e3550000 cmp r5, #0
e8f0: 0a000099 beq eb5c <killinfo+0x290>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
e8f4: e2453001 sub r3, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
e8f8: e353001f cmp r3, #31
e8fc: 8a000096 bhi eb5c <killinfo+0x290>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
e900: e59f6280 ldr r6, [pc, #640] ; eb88 <killinfo+0x2bc>
e904: e1a07085 lsl r7, r5, #1
e908: e0872005 add r2, r7, r5
e90c: e0862102 add r2, r6, r2, lsl #2
e910: e5922008 ldr r2, [r2, #8]
e914: e3520001 cmp r2, #1
e918: 0a00003a beq ea08 <killinfo+0x13c>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
e91c: e3550008 cmp r5, #8
e920: 13550004 cmpne r5, #4
e924: 0a00003a beq ea14 <killinfo+0x148>
e928: e355000b cmp r5, #11
e92c: 0a000038 beq ea14 <killinfo+0x148>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
e930: e3a04001 mov r4, #1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
e934: e58d4004 str r4, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
e938: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
e93c: e3580000 cmp r8, #0
e940: e1a04314 lsl r4, r4, r3
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
e944: 15983000 ldrne r3, [r8]
e948: 158d3008 strne r3, [sp, #8]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
e94c: e59f3238 ldr r3, [pc, #568] ; eb8c <killinfo+0x2c0>
e950: e5932000 ldr r2, [r3]
e954: e2822001 add r2, r2, #1
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
e958: 058d8008 streq r8, [sp, #8]
e95c: e5832000 str r2, [r3]
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
e960: e59f3228 ldr r3, [pc, #552] ; eb90 <killinfo+0x2c4>
e964: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e968: e5903108 ldr r3, [r0, #264] ; 0x108
e96c: e59330cc ldr r3, [r3, #204] ; 0xcc
e970: e1d43003 bics r3, r4, r3
e974: 1a000014 bne e9cc <killinfo+0x100>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
e978: e59f1214 ldr r1, [pc, #532] ; eb94 <killinfo+0x2c8>
e97c: e4913004 ldr r3, [r1], #4
e980: e1530001 cmp r3, r1
e984: 0a000037 beq ea68 <killinfo+0x19c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e988: e5932030 ldr r2, [r3, #48] ; 0x30
e98c: e1140002 tst r4, r2
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
e990: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e994: e5932108 ldr r2, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e998: 0a000008 beq e9c0 <killinfo+0xf4>
e99c: ea00000a b e9cc <killinfo+0x100>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
e9a0: e5933000 ldr r3, [r3]
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
e9a4: e1530001 cmp r3, r1
e9a8: 0a00002e beq ea68 <killinfo+0x19c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e9ac: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
e9b0: e1140002 tst r4, r2 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
e9b4: e1a00003 mov r0, r3 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e9b8: e5932108 ldr r2, [r3, #264] ; 0x108 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e9bc: 1a000002 bne e9cc <killinfo+0x100> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
e9c0: e59220cc ldr r2, [r2, #204] ; 0xcc
e9c4: e1d42002 bics r2, r4, r2
e9c8: 0afffff4 beq e9a0 <killinfo+0xd4>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
e9cc: e3a03001 mov r3, #1
e9d0: e5c03074 strb r3, [r0, #116] ; 0x74
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
e9d4: e1a01005 mov r1, r5
e9d8: e1a0200d mov r2, sp
e9dc: eb0000f9 bl edc8 <_POSIX_signals_Unblock_thread>
e9e0: e3500000 cmp r0, #0
e9e4: 1a00001c bne ea5c <killinfo+0x190>
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9e8: e0875005 add r5, r7, r5
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
e9ec: e1a00004 mov r0, r4
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9f0: e1a05105 lsl r5, r5, #2
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
e9f4: eb0000e1 bl ed80 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9f8: e7963005 ldr r3, [r6, r5]
e9fc: e3530002 cmp r3, #2
ea00: 0a000007 beq ea24 <killinfo+0x158>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ea04: ebffe3ae bl 78c4 <_Thread_Enable_dispatch>
ea08: e3a00000 mov r0, #0
return 0;
}
ea0c: e28dd00c add sp, sp, #12
ea10: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
ea14: eb0001b6 bl f0f4 <pthread_self>
ea18: e1a01005 mov r1, r5
ea1c: eb000179 bl f008 <pthread_kill>
ea20: eafffff9 b ea0c <killinfo+0x140>
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
ea24: e59f016c ldr r0, [pc, #364] ; eb98 <killinfo+0x2cc>
ea28: ebffddca bl 6158 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
ea2c: e250c000 subs ip, r0, #0
ea30: 0a00004e beq eb70 <killinfo+0x2a4>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ea34: e1a0300d mov r3, sp
ea38: e8930007 ldm r3, {r0, r1, r2}
ea3c: e28c3008 add r3, ip, #8
ea40: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ea44: e59f0150 ldr r0, [pc, #336] ; eb9c <killinfo+0x2d0>
ea48: e1a0100c mov r1, ip
ea4c: e0800005 add r0, r0, r5
ea50: ebffddac bl 6108 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ea54: ebffe39a bl 78c4 <_Thread_Enable_dispatch>
ea58: eaffffea b ea08 <killinfo+0x13c>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
_Thread_Enable_dispatch();
ea5c: ebffe398 bl 78c4 <_Thread_Enable_dispatch>
ea60: e3a00000 mov r0, #0
return 0;
ea64: eaffffe8 b ea0c <killinfo+0x140>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
ea68: e59f3130 ldr r3, [pc, #304] ; eba0 <killinfo+0x2d4>
ea6c: e5d3c000 ldrb ip, [r3]
ea70: e59f812c ldr r8, [pc, #300] ; eba4 <killinfo+0x2d8>
ea74: e28cc001 add ip, ip, #1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ea78: e3a0a000 mov sl, #0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
ea7c: e5983008 ldr r3, [r8, #8]
ea80: e3530000 cmp r3, #0
ea84: 0a000020 beq eb0c <killinfo+0x240>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
ea88: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
ea8c: e1d301b0 ldrh r0, [r3, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ea90: e3500000 cmp r0, #0
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
ea94: e593e01c ldr lr, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
ea98: 0a00001b beq eb0c <killinfo+0x240>
ea9c: e3a03001 mov r3, #1
the_thread = (Thread_Control *) object_table[ index ];
eaa0: e79e2103 ldr r2, [lr, r3, lsl #2]
if ( !the_thread )
eaa4: e3520000 cmp r2, #0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eaa8: e2833001 add r3, r3, #1
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
eaac: 0a000014 beq eb04 <killinfo+0x238>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
eab0: e5921014 ldr r1, [r2, #20]
eab4: e151000c cmp r1, ip
eab8: 8a000011 bhi eb04 <killinfo+0x238>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
eabc: e5929108 ldr r9, [r2, #264] ; 0x108
eac0: e59990cc ldr r9, [r9, #204] ; 0xcc
eac4: e1d49009 bics r9, r4, r9
eac8: 0a00000d beq eb04 <killinfo+0x238>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
eacc: e151000c cmp r1, ip
ead0: 3a000009 bcc eafc <killinfo+0x230>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
ead4: e59a9010 ldr r9, [sl, #16]
ead8: e3590000 cmp r9, #0
eadc: 0a000008 beq eb04 <killinfo+0x238>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
eae0: e592b010 ldr fp, [r2, #16]
eae4: e35b0000 cmp fp, #0
eae8: 0a000003 beq eafc <killinfo+0x230>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
eaec: e3190201 tst r9, #268435456 ; 0x10000000
eaf0: 1a000003 bne eb04 <killinfo+0x238>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
eaf4: e31b0201 tst fp, #268435456 ; 0x10000000
eaf8: 0a000001 beq eb04 <killinfo+0x238>
eafc: e1a0c001 mov ip, r1
eb00: e1a0a002 mov sl, r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eb04: e1500003 cmp r0, r3
eb08: 2affffe4 bcs eaa0 <killinfo+0x1d4>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
eb0c: e59f3094 ldr r3, [pc, #148] ; eba8 <killinfo+0x2dc>
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eb10: e2888004 add r8, r8, #4
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
eb14: e1580003 cmp r8, r3
eb18: 1affffd7 bne ea7c <killinfo+0x1b0>
}
}
}
}
if ( interested ) {
eb1c: e35a0000 cmp sl, #0
eb20: 0affffb0 beq e9e8 <killinfo+0x11c>
eb24: e1a0000a mov r0, sl
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
eb28: e3a03001 mov r3, #1
eb2c: e5c03074 strb r3, [r0, #116] ; 0x74
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
eb30: e1a01005 mov r1, r5
eb34: e1a0200d mov r2, sp
eb38: eb0000a2 bl edc8 <_POSIX_signals_Unblock_thread>
eb3c: e3500000 cmp r0, #0
eb40: 0affffa8 beq e9e8 <killinfo+0x11c>
eb44: eaffffc4 b ea5c <killinfo+0x190> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
eb48: eb0002f1 bl f714 <__errno> <== NOT EXECUTED
eb4c: e3a03003 mov r3, #3 <== NOT EXECUTED
eb50: e5803000 str r3, [r0] <== NOT EXECUTED
eb54: e3e00000 mvn r0, #0 <== NOT EXECUTED
eb58: eaffffab b ea0c <killinfo+0x140> <== NOT EXECUTED
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
eb5c: eb0002ec bl f714 <__errno> <== NOT EXECUTED
eb60: e3a03016 mov r3, #22 <== NOT EXECUTED
eb64: e5803000 str r3, [r0] <== NOT EXECUTED
eb68: e3e00000 mvn r0, #0 <== NOT EXECUTED
eb6c: eaffffa6 b ea0c <killinfo+0x140> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
eb70: ebffe353 bl 78c4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
eb74: eb0002e6 bl f714 <__errno>
eb78: e3a0300b mov r3, #11
eb7c: e5803000 str r3, [r0]
eb80: e3e00000 mvn r0, #0
eb84: eaffffa0 b ea0c <killinfo+0x140>
00029ea0 <link>:
int link(
const char *existing,
const char *new
)
{
29ea0: e92d4070 push {r4, r5, r6, lr}
29ea4: e24dd034 sub sp, sp, #52 ; 0x34
29ea8: e1a05001 mov r5, r1
29eac: e1a06000 mov r6, r0
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
29eb0: eb0084f0 bl 4b278 <strlen>
29eb4: e28d4018 add r4, sp, #24
29eb8: e1a01000 mov r1, r0
29ebc: e3a0c001 mov ip, #1
29ec0: e1a00006 mov r0, r6
29ec4: e3a02000 mov r2, #0
29ec8: e1a03004 mov r3, r4
29ecc: e58dc000 str ip, [sp]
29ed0: ebff7784 bl 7ce8 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
29ed4: e3500000 cmp r0, #0
29ed8: 0a000003 beq 29eec <link+0x4c>
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
29edc: e3e05000 mvn r5, #0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
29ee0: e1a00005 mov r0, r5
29ee4: e28dd034 add sp, sp, #52 ; 0x34
29ee8: e8bd8070 pop {r4, r5, r6, pc}
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
29eec: e28d6004 add r6, sp, #4
29ef0: e1a00005 mov r0, r5
29ef4: e28d1030 add r1, sp, #48 ; 0x30
29ef8: e1a02006 mov r2, r6
29efc: ebff7e0a bl 972c <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
29f00: e59d3010 ldr r3, [sp, #16]
29f04: e5933004 ldr r3, [r3, #4]
29f08: e3530000 cmp r3, #0
29f0c: 0a000048 beq 2a034 <link+0x194>
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
29f10: e59d0030 ldr r0, [sp, #48] ; 0x30
29f14: e1a01006 mov r1, r6
29f18: e0850000 add r0, r5, r0
29f1c: e28d202c add r2, sp, #44 ; 0x2c
29f20: e1a0e00f mov lr, pc
29f24: e12fff13 bx r3
if ( result != 0 ) {
29f28: e2505000 subs r5, r0, #0
29f2c: 1a000034 bne 2a004 <link+0x164>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
29f30: e59d3028 ldr r3, [sp, #40] ; 0x28
29f34: e59d2014 ldr r2, [sp, #20]
29f38: e1520003 cmp r2, r3
29f3c: 1a00001b bne 29fb0 <link+0x110>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
29f40: e59d2010 ldr r2, [sp, #16]
29f44: e5923008 ldr r3, [r2, #8]
29f48: e3530000 cmp r3, #0
29f4c: 0a000044 beq 2a064 <link+0x1c4>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
29f50: e1a00004 mov r0, r4
29f54: e1a01006 mov r1, r6
29f58: e59d202c ldr r2, [sp, #44] ; 0x2c
29f5c: e1a0e00f mov lr, pc
29f60: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
29f64: e59d3024 ldr r3, [sp, #36] ; 0x24
29f68: e3530000 cmp r3, #0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
29f6c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
29f70: 0a000004 beq 29f88 <link+0xe8>
29f74: e593301c ldr r3, [r3, #28]
29f78: e3530000 cmp r3, #0
29f7c: 11a00004 movne r0, r4
29f80: 11a0e00f movne lr, pc
29f84: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
29f88: e59d3010 ldr r3, [sp, #16]
29f8c: e3530000 cmp r3, #0
29f90: 0affffd2 beq 29ee0 <link+0x40>
29f94: e593301c ldr r3, [r3, #28]
29f98: e3530000 cmp r3, #0
29f9c: 0affffcf beq 29ee0 <link+0x40>
29fa0: e1a00006 mov r0, r6
29fa4: e1a0e00f mov lr, pc
29fa8: e12fff13 bx r3
29fac: eaffffcb b 29ee0 <link+0x40>
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
29fb0: e59d3024 ldr r3, [sp, #36] ; 0x24
29fb4: e3530000 cmp r3, #0
29fb8: 0a000004 beq 29fd0 <link+0x130>
29fbc: e593301c ldr r3, [r3, #28]
29fc0: e3530000 cmp r3, #0
29fc4: 11a00004 movne r0, r4
29fc8: 11a0e00f movne lr, pc
29fcc: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
29fd0: e59d3010 ldr r3, [sp, #16]
29fd4: e3530000 cmp r3, #0
29fd8: 0a000004 beq 29ff0 <link+0x150>
29fdc: e593301c ldr r3, [r3, #28]
29fe0: e3530000 cmp r3, #0
29fe4: 11a00006 movne r0, r6
29fe8: 11a0e00f movne lr, pc
29fec: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
29ff0: eb006992 bl 44640 <__errno>
29ff4: e3a03012 mov r3, #18
29ff8: e5803000 str r3, [r0]
29ffc: e3e05000 mvn r5, #0
2a000: eaffffb6 b 29ee0 <link+0x40>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
2a004: e59d3024 ldr r3, [sp, #36] ; 0x24
2a008: e3530000 cmp r3, #0
2a00c: 0a000004 beq 2a024 <link+0x184>
2a010: e593301c ldr r3, [r3, #28]
2a014: e3530000 cmp r3, #0
2a018: 11a00004 movne r0, r4
2a01c: 11a0e00f movne lr, pc
2a020: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
2a024: eb006985 bl 44640 <__errno>
2a028: e5805000 str r5, [r0]
2a02c: e3e05000 mvn r5, #0
2a030: eaffffaa b 29ee0 <link+0x40>
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
2a034: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
2a038: e3530000 cmp r3, #0 <== NOT EXECUTED
2a03c: 0a000004 beq 2a054 <link+0x1b4> <== NOT EXECUTED
2a040: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a044: e3530000 cmp r3, #0 <== NOT EXECUTED
2a048: 11a00004 movne r0, r4 <== NOT EXECUTED
2a04c: 11a0e00f movne lr, pc <== NOT EXECUTED
2a050: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2a054: eb006979 bl 44640 <__errno> <== NOT EXECUTED
2a058: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2a05c: e5803000 str r3, [r0] <== NOT EXECUTED
2a060: eaffff9d b 29edc <link+0x3c> <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
2a064: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
2a068: e3530000 cmp r3, #0 <== NOT EXECUTED
2a06c: 0a000006 beq 2a08c <link+0x1ec> <== NOT EXECUTED
2a070: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a074: e3530000 cmp r3, #0 <== NOT EXECUTED
2a078: 0a000003 beq 2a08c <link+0x1ec> <== NOT EXECUTED
2a07c: e1a00004 mov r0, r4 <== NOT EXECUTED
2a080: e1a0e00f mov lr, pc <== NOT EXECUTED
2a084: e12fff13 bx r3 <== NOT EXECUTED
2a088: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2a08c: e3520000 cmp r2, #0 <== NOT EXECUTED
2a090: 0a000004 beq 2a0a8 <link+0x208> <== NOT EXECUTED
2a094: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2a098: e3530000 cmp r3, #0 <== NOT EXECUTED
2a09c: 11a00006 movne r0, r6 <== NOT EXECUTED
2a0a0: 11a0e00f movne lr, pc <== NOT EXECUTED
2a0a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2a0a8: eb006964 bl 44640 <__errno> <== NOT EXECUTED
2a0ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2a0b0: e5803000 str r3, [r0] <== NOT EXECUTED
2a0b4: e3e05000 mvn r5, #0 <== NOT EXECUTED
2a0b8: eaffff88 b 29ee0 <link+0x40> <== NOT EXECUTED
0001b004 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1b004: e59fc134 ldr ip, [pc, #308] ; 1b140 <lseek+0x13c>
1b008: e59cc000 ldr ip, [ip]
1b00c: e150000c cmp r0, ip
off_t lseek(
int fd,
off_t offset,
int whence
)
{
1b010: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1b014: 2a00003d bcs 1b110 <lseek+0x10c>
iop = rtems_libio_iop( fd );
1b018: e59fc124 ldr ip, [pc, #292] ; 1b144 <lseek+0x140>
1b01c: e59c4000 ldr r4, [ip]
1b020: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
1b024: e5940014 ldr r0, [r4, #20]
1b028: e3100c01 tst r0, #256 ; 0x100
1b02c: 0a000037 beq 1b110 <lseek+0x10c>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
1b030: e594c03c ldr ip, [r4, #60] ; 0x3c
1b034: e59c0014 ldr r0, [ip, #20]
1b038: e3500000 cmp r0, #0
1b03c: 0a000039 beq 1b128 <lseek+0x124>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
1b040: e3530001 cmp r3, #1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
1b044: e284600c add r6, r4, #12
1b048: e8960060 ldm r6, {r5, r6}
switch ( whence ) {
1b04c: 0a00002a beq 1b0fc <lseek+0xf8>
1b050: e3530002 cmp r3, #2
1b054: 0a00000d beq 1b090 <lseek+0x8c>
1b058: e3530000 cmp r3, #0
1b05c: 1a00001e bne 1b0dc <lseek+0xd8>
case SEEK_SET:
iop->offset = offset;
1b060: e584100c str r1, [r4, #12]
1b064: e5842010 str r2, [r4, #16]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1b068: e1a00004 mov r0, r4
1b06c: e1a0e00f mov lr, pc
1b070: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
1b074: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1b078: e1a02000 mov r2, r0
1b07c: e1a03001 mov r3, r1
if ( status == (off_t) -1 )
1b080: 0a00000e beq 1b0c0 <lseek+0xbc>
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1b084: e1a01003 mov r1, r3
1b088: e1a00002 mov r0, r2
1b08c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
1b090: e9940180 ldmib r4, {r7, r8}
1b094: e0977001 adds r7, r7, r1
1b098: e0a88002 adc r8, r8, r2
1b09c: e584700c str r7, [r4, #12]
1b0a0: e5848010 str r8, [r4, #16]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1b0a4: e1a00004 mov r0, r4
1b0a8: e1a0e00f mov lr, pc
1b0ac: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
1b0b0: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1b0b4: e1a02000 mov r2, r0
1b0b8: e1a03001 mov r3, r1
if ( status == (off_t) -1 )
1b0bc: 1afffff0 bne 1b084 <lseek+0x80>
1b0c0: e3710001 cmn r1, #1
1b0c4: 1affffee bne 1b084 <lseek+0x80>
iop->offset = old_offset;
1b0c8: e584500c str r5, [r4, #12]
1b0cc: e5846010 str r6, [r4, #16]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1b0d0: e1a01003 mov r1, r3
1b0d4: e1a00002 mov r0, r2
1b0d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1b0dc: ebffd18c bl f714 <__errno>
1b0e0: e3a03016 mov r3, #22
1b0e4: e5803000 str r3, [r0]
1b0e8: e3e02000 mvn r2, #0
1b0ec: e3e03000 mvn r3, #0
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1b0f0: e1a01003 mov r1, r3
1b0f4: e1a00002 mov r0, r2
1b0f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
1b0fc: e0917005 adds r7, r1, r5
1b100: e0a28006 adc r8, r2, r6
1b104: e584700c str r7, [r4, #12]
1b108: e5848010 str r8, [r4, #16]
break;
1b10c: eaffffd5 b 1b068 <lseek+0x64>
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
1b110: ebffd17f bl f714 <__errno> <== NOT EXECUTED
1b114: e3a03009 mov r3, #9 <== NOT EXECUTED
1b118: e5803000 str r3, [r0] <== NOT EXECUTED
1b11c: e3e02000 mvn r2, #0 <== NOT EXECUTED
1b120: e3e03000 mvn r3, #0 <== NOT EXECUTED
1b124: eaffffd6 b 1b084 <lseek+0x80> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1b128: ebffd179 bl f714 <__errno> <== NOT EXECUTED
1b12c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1b130: e5803000 str r3, [r0] <== NOT EXECUTED
1b134: e3e02000 mvn r2, #0 <== NOT EXECUTED
1b138: e3e03000 mvn r3, #0 <== NOT EXECUTED
1b13c: eaffffd0 b 1b084 <lseek+0x80> <== NOT EXECUTED
0002a220 <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2a220: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2a224: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2a228: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
2a22c: e1a06000 mov r6, r0 <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2a230: 0a00002f beq 2a2f4 <lstat+0xd4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2a234: eb00840f bl 4b278 <strlen> <== NOT EXECUTED
2a238: e28d4004 add r4, sp, #4 <== NOT EXECUTED
2a23c: e3a0c000 mov ip, #0 <== NOT EXECUTED
2a240: e1a01000 mov r1, r0 <== NOT EXECUTED
2a244: e1a0200c mov r2, ip <== NOT EXECUTED
2a248: e1a00006 mov r0, r6 <== NOT EXECUTED
2a24c: e1a03004 mov r3, r4 <== NOT EXECUTED
2a250: e58dc000 str ip, [sp] <== NOT EXECUTED
2a254: ebff76a3 bl 7ce8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
2a258: e2501000 subs r1, r0, #0 <== NOT EXECUTED
2a25c: 1a000022 bne 2a2ec <lstat+0xcc> <== NOT EXECUTED
return -1;
if ( !loc.handlers->fstat_h ){
2a260: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
2a264: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
2a268: e3530000 cmp r3, #0 <== NOT EXECUTED
2a26c: 0a000013 beq 2a2c0 <lstat+0xa0> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
2a270: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED
2a274: e1a00005 mov r0, r5 <== NOT EXECUTED
2a278: eb007627 bl 47b1c <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
2a27c: e1a01005 mov r1, r5 <== NOT EXECUTED
2a280: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
2a284: e1a00004 mov r0, r4 <== NOT EXECUTED
2a288: e1a0e00f mov lr, pc <== NOT EXECUTED
2a28c: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2a290: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2a294: e3530000 cmp r3, #0 <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
2a298: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2a29c: 0a000004 beq 2a2b4 <lstat+0x94> <== NOT EXECUTED
2a2a0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a2a4: e3530000 cmp r3, #0 <== NOT EXECUTED
2a2a8: 11a00004 movne r0, r4 <== NOT EXECUTED
2a2ac: 11a0e00f movne lr, pc <== NOT EXECUTED
2a2b0: 112fff13 bxne r3 <== NOT EXECUTED
return status;
}
2a2b4: e1a00005 mov r0, r5 <== NOT EXECUTED
2a2b8: e28dd018 add sp, sp, #24 <== NOT EXECUTED
2a2bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
2a2c0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2a2c4: e3530000 cmp r3, #0 <== NOT EXECUTED
2a2c8: 0a000004 beq 2a2e0 <lstat+0xc0> <== NOT EXECUTED
2a2cc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2a2d0: e3530000 cmp r3, #0 <== NOT EXECUTED
2a2d4: 11a00004 movne r0, r4 <== NOT EXECUTED
2a2d8: 11a0e00f movne lr, pc <== NOT EXECUTED
2a2dc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2a2e0: eb0068d6 bl 44640 <__errno> <== NOT EXECUTED
2a2e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2a2e8: e5803000 str r3, [r0] <== NOT EXECUTED
2a2ec: e3e05000 mvn r5, #0 <== NOT EXECUTED
2a2f0: eaffffef b 2a2b4 <lstat+0x94> <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
2a2f4: eb0068d1 bl 44640 <__errno> <== NOT EXECUTED
2a2f8: e3a0300e mov r3, #14 <== NOT EXECUTED
2a2fc: e5803000 str r3, [r0] <== NOT EXECUTED
2a300: e3e05000 mvn r5, #0 <== NOT EXECUTED
2a304: eaffffea b 2a2b4 <lstat+0x94> <== NOT EXECUTED
0000240c <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
240c: e59f30dc ldr r3, [pc, #220] ; 24f0 <malloc+0xe4>
2410: e5932004 ldr r2, [r3, #4]
2414: e2822001 add r2, r2, #1
2418: e92d4070 push {r4, r5, r6, lr}
241c: e5832004 str r2, [r3, #4]
2420: e1a04000 mov r4, r0
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2424: ebffffb3 bl 22f8 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
2428: e3540000 cmp r4, #0
242c: 0a00001f beq 24b0 <malloc+0xa4>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2430: e59f30bc ldr r3, [pc, #188] ; 24f4 <malloc+0xe8>
2434: e5933000 ldr r3, [r3]
2438: e3530003 cmp r3, #3
243c: 0a000018 beq 24a4 <malloc+0x98>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
2440: e59f30b0 ldr r3, [pc, #176] ; 24f8 <malloc+0xec>
2444: e3a02000 mov r2, #0
2448: e5930000 ldr r0, [r3]
244c: e1a01004 mov r1, r4
2450: e1a03002 mov r3, r2
2454: eb001377 bl 7238 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2458: e2506000 subs r6, r0, #0
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
245c: 11a05006 movne r5, r6
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2460: 0a000015 beq 24bc <malloc+0xb0>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2464: e59f3090 ldr r3, [pc, #144] ; 24fc <malloc+0xf0>
2468: e5933000 ldr r3, [r3]
246c: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
2470: 11a01004 movne r1, r4
2474: 11a00005 movne r0, r5
2478: 11a0e00f movne lr, pc
247c: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2480: e59f3078 ldr r3, [pc, #120] ; 2500 <malloc+0xf4>
2484: e5933000 ldr r3, [r3]
2488: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
248c: 11a00005 movne r0, r5
2490: 11a0e00f movne lr, pc
2494: 1593f004 ldrne pc, [r3, #4]
2498: e1a06005 mov r6, r5
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
249c: e1a00006 mov r0, r6
24a0: e8bd8070 pop {r4, r5, r6, pc}
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
24a4: ebffff7c bl 229c <malloc_is_system_state_OK>
24a8: e3500000 cmp r0, #0
24ac: 1affffe3 bne 2440 <malloc+0x34>
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
24b0: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
24b4: e1a00006 mov r0, r6 <== NOT EXECUTED
24b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
24bc: e59f3040 ldr r3, [pc, #64] ; 2504 <malloc+0xf8>
24c0: e5933000 ldr r3, [r3]
24c4: e3530000 cmp r3, #0
24c8: 0a000004 beq 24e0 <malloc+0xd4>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
24cc: e1a00004 mov r0, r4 <== NOT EXECUTED
24d0: e1a0e00f mov lr, pc <== NOT EXECUTED
24d4: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
24d8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
24dc: 1affffe0 bne 2464 <malloc+0x58> <== NOT EXECUTED
errno = ENOMEM;
24e0: eb00348b bl f714 <__errno>
24e4: e3a0300c mov r3, #12
24e8: e5803000 str r3, [r0]
return (void *) 0;
24ec: eaffffea b 249c <malloc+0x90>
000022e8 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
22e8: e1a01000 mov r1, r0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
22ec: e59f0000 ldr r0, [pc, #0] ; 22f4 <malloc_deferred_free+0xc><== NOT EXECUTED
22f0: ea000f84 b 6108 <_Chain_Append> <== NOT EXECUTED
000022f8 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
22f8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
22fc: ea000000 b 2304 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
2300: ebffff68 bl 20a8 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2304: e59f000c ldr r0, [pc, #12] ; 2318 <malloc_deferred_frees_process+0x20>
2308: eb000f92 bl 6158 <_Chain_Get>
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
230c: e3500000 cmp r0, #0
2310: 1afffffa bne 2300 <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
2314: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000d058 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
d058: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( block_table );
d05c: e2504000 subs r4, r0, #0
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
d060: e1a08001 mov r8, r1
/*
* Perform internal consistency checks
*/
assert( block_table );
d064: 0a000014 beq d0bc <memfile_free_blocks_in_table+0x64>
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
d068: e3510000 cmp r1, #0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
d06c: e5947000 ldr r7, [r4]
for ( i=0 ; i<entries ; i++ ) {
d070: da00000c ble d0a8 <memfile_free_blocks_in_table+0x50>
d074: e3a05000 mov r5, #0
d078: e1a06005 mov r6, r5
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
d07c: e1a0a005 mov sl, r5
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
d080: e7970005 ldr r0, [r7, r5]
d084: e3500000 cmp r0, #0
d088: 0a000001 beq d094 <memfile_free_blocks_in_table+0x3c>
memfile_free_block( b[i] );
d08c: ebffff50 bl cdd4 <memfile_free_block>
b[i] = 0;
d090: e787a005 str sl, [r7, r5]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
d094: e2866001 add r6, r6, #1
d098: e1580006 cmp r8, r6
d09c: e2855004 add r5, r5, #4
d0a0: cafffff6 bgt d080 <memfile_free_blocks_in_table+0x28>
d0a4: e5947000 ldr r7, [r4]
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
d0a8: e1a00007 mov r0, r7
d0ac: ebffff48 bl cdd4 <memfile_free_block>
*block_table = 0;
d0b0: e3a03000 mov r3, #0
d0b4: e5843000 str r3, [r4]
}
d0b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Perform internal consistency checks
*/
assert( block_table );
d0bc: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED
d0c0: e2811003 add r1, r1, #3 <== NOT EXECUTED
d0c4: e59f0008 ldr r0, [pc, #8] ; d0d4 <memfile_free_blocks_in_table+0x7c><== NOT EXECUTED
d0c8: e59f2008 ldr r2, [pc, #8] ; d0d8 <memfile_free_blocks_in_table+0x80><== NOT EXECUTED
d0cc: e59f3008 ldr r3, [pc, #8] ; d0dc <memfile_free_blocks_in_table+0x84><== NOT EXECUTED
d0d0: ebfff70f bl ad14 <__assert_func> <== NOT EXECUTED
0000d5b0 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
d5b0: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d5b4: e5904038 ldr r4, [r0, #56] ; 0x38
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
d5b8: e5943054 ldr r3, [r4, #84] ; 0x54
d5bc: e1530002 cmp r3, r2
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
d5c0: e24dd008 sub sp, sp, #8
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
d5c4: ba00000e blt d604 <memfile_ftruncate+0x54>
d5c8: 0a00000a beq d5f8 <memfile_ftruncate+0x48>
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
d5cc: e5841050 str r1, [r4, #80] ; 0x50
d5d0: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
d5d4: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
d5d8: e3a01000 mov r1, #0
d5dc: e1a0000d mov r0, sp
d5e0: ebffd2d9 bl 214c <gettimeofday>
d5e4: e59d3000 ldr r3, [sp]
d5e8: e5843040 str r3, [r4, #64] ; 0x40
d5ec: e3a00000 mov r0, #0
return 0;
}
d5f0: e28dd008 add sp, sp, #8
d5f4: e8bd8010 pop {r4, pc}
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
d5f8: e5943050 ldr r3, [r4, #80] ; 0x50
d5fc: e1530001 cmp r3, r1
d600: 2afffff1 bcs d5cc <memfile_ftruncate+0x1c>
return IMFS_memfile_extend( the_jnode, length );
d604: e1a00004 mov r0, r4 <== NOT EXECUTED
d608: ebffff87 bl d42c <IMFS_memfile_extend> <== NOT EXECUTED
d60c: eafffff7 b d5f0 <memfile_ftruncate+0x40> <== NOT EXECUTED
0000d610 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
d610: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d614: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
d618: e595304c ldr r3, [r5, #76] ; 0x4c
d61c: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
d620: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
d624: 0a00000d beq d660 <memfile_lseek+0x50>
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
d628: e1a00005 mov r0, r5
d62c: e284200c add r2, r4, #12
d630: e8920006 ldm r2, {r1, r2}
d634: ebffff7c bl d42c <IMFS_memfile_extend>
d638: e3500000 cmp r0, #0
d63c: 1a00001a bne d6ac <memfile_lseek+0x9c>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
d640: e2853050 add r3, r5, #80 ; 0x50
d644: e893000c ldm r3, {r2, r3}
d648: e984000c stmib r4, {r2, r3}
d64c: e284300c add r3, r4, #12
d650: e893000c ldm r3, {r2, r3}
}
return iop->offset;
}
d654: e1a01003 mov r1, r3
d658: e1a00002 mov r0, r2
d65c: e8bd8030 pop {r4, r5, pc}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
d660: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED
d664: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED
d668: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
d66c: e1510003 cmp r1, r3 <== NOT EXECUTED
d670: e590000c ldr r0, [r0, #12] <== NOT EXECUTED
d674: ca000007 bgt d698 <memfile_lseek+0x88> <== NOT EXECUTED
d678: 0a000004 beq d690 <memfile_lseek+0x80> <== NOT EXECUTED
d67c: e1a02000 mov r2, r0 <== NOT EXECUTED
d680: e1a03001 mov r3, r1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
d684: e1a01003 mov r1, r3 <== NOT EXECUTED
d688: e1a00002 mov r0, r2 <== NOT EXECUTED
d68c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
d690: e1500002 cmp r0, r2 <== NOT EXECUTED
d694: 9afffff8 bls d67c <memfile_lseek+0x6c> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
d698: e584200c str r2, [r4, #12] <== NOT EXECUTED
d69c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
d6a0: e1a01003 mov r1, r3 <== NOT EXECUTED
d6a4: e1a00002 mov r0, r2 <== NOT EXECUTED
d6a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
d6ac: eb000818 bl f714 <__errno> <== NOT EXECUTED
d6b0: e3a0301c mov r3, #28 <== NOT EXECUTED
d6b4: e5803000 str r3, [r0] <== NOT EXECUTED
d6b8: e3e02000 mvn r2, #0 <== NOT EXECUTED
d6bc: e3e03000 mvn r3, #0 <== NOT EXECUTED
d6c0: eaffffe3 b d654 <memfile_lseek+0x44> <== NOT EXECUTED
0000d988 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
d988: e92d4830 push {r4, r5, fp, lr}
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
d98c: e5903014 ldr r3, [r0, #20]
d990: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
d994: e24dd004 sub sp, sp, #4
d998: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d99c: e5905038 ldr r5, [r0, #56] ; 0x38
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
d9a0: 0a000002 beq d9b0 <memfile_open+0x28>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
d9a4: e595204c ldr r2, [r5, #76] ; 0x4c
d9a8: e3520006 cmp r2, #6
d9ac: 0a00000b beq d9e0 <memfile_open+0x58>
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
d9b0: e5952050 ldr r2, [r5, #80] ; 0x50
d9b4: e5951054 ldr r1, [r5, #84] ; 0x54
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
d9b8: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
d9bc: 1584200c strne r2, [r4, #12]
d9c0: 15841010 strne r1, [r4, #16]
d9c4: 15951054 ldrne r1, [r5, #84] ; 0x54
d9c8: 15952050 ldrne r2, [r5, #80] ; 0x50
iop->size = the_jnode->info.file.size;
d9cc: e5841008 str r1, [r4, #8]
d9d0: e5842004 str r2, [r4, #4]
d9d4: e3a00000 mov r0, #0
return 0;
}
d9d8: e28dd004 add sp, sp, #4
d9dc: e8bd8830 pop {r4, r5, fp, pc}
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
d9e0: e595c050 ldr ip, [r5, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
d9e4: e3a00000 mov r0, #0 <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
d9e8: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
d9ec: e3a01000 mov r1, #0 <== NOT EXECUTED
d9f0: e3a02000 mov r2, #0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
d9f4: e35c0000 cmp ip, #0 <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
d9f8: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
d9fc: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
da00: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
da04: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED
da08: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
da0c: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
da10: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
da14: 1a000004 bne da2c <memfile_open+0xa4> <== NOT EXECUTED
da18: e1a0b001 mov fp, r1 <== NOT EXECUTED
da1c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
da20: e1a01002 mov r1, r2 <== NOT EXECUTED
da24: e1a0200b mov r2, fp <== NOT EXECUTED
da28: eaffffe2 b d9b8 <memfile_open+0x30> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
da2c: e1a00005 mov r0, r5 <== NOT EXECUTED
da30: e58dc000 str ip, [sp] <== NOT EXECUTED
da34: ebffff22 bl d6c4 <IMFS_memfile_write> <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
da38: e3700001 cmn r0, #1 <== NOT EXECUTED
da3c: 0affffe5 beq d9d8 <memfile_open+0x50> <== NOT EXECUTED
da40: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
da44: eaffffd9 b d9b0 <memfile_open+0x28> <== NOT EXECUTED
00002518 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2518: e92d41f0 push {r4, r5, r6, r7, r8, lr}
251c: e1a06001 mov r6, r1
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2520: e2011a0f and r1, r1, #61440 ; 0xf000
2524: e3510901 cmp r1, #16384 ; 0x4000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2528: e24dd020 sub sp, sp, #32
252c: e1a05000 mov r5, r0
2530: e1a07002 mov r7, r2
2534: e1a08003 mov r8, r3
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2538: 0a00000d beq 2574 <mknod+0x5c>
253c: 9a000008 bls 2564 <mknod+0x4c>
2540: e3510a06 cmp r1, #24576 ; 0x6000
2544: 0a00000a beq 2574 <mknod+0x5c>
2548: e3510902 cmp r1, #32768 ; 0x8000
254c: 0a000008 beq 2574 <mknod+0x5c>
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2550: eb00346f bl f714 <__errno> <== NOT EXECUTED
2554: e3a03016 mov r3, #22 <== NOT EXECUTED
2558: e5803000 str r3, [r0] <== NOT EXECUTED
255c: e3e05000 mvn r5, #0 <== NOT EXECUTED
2560: ea000028 b 2608 <mknod+0xf0> <== NOT EXECUTED
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2564: e3510a01 cmp r1, #4096 ; 0x1000
2568: 0a000001 beq 2574 <mknod+0x5c>
256c: e3510a02 cmp r1, #8192 ; 0x2000
2570: 1afffff6 bne 2550 <mknod+0x38>
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2574: e28d4004 add r4, sp, #4
2578: e1a00005 mov r0, r5
257c: e28d101c add r1, sp, #28
2580: e1a02004 mov r2, r4
2584: eb000289 bl 2fb0 <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
2588: e59d3010 ldr r3, [sp, #16]
258c: e5933004 ldr r3, [r3, #4]
2590: e3530000 cmp r3, #0
2594: 0a000023 beq 2628 <mknod+0x110>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
2598: e59d001c ldr r0, [sp, #28]
259c: e1a01004 mov r1, r4
25a0: e0850000 add r0, r5, r0
25a4: e28d2018 add r2, sp, #24
25a8: e1a0e00f mov lr, pc
25ac: e12fff13 bx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
25b0: e3500000 cmp r0, #0
25b4: 1a00001e bne 2634 <mknod+0x11c>
return -1;
if ( !temp_loc.ops->mknod_h ) {
25b8: e59d3010 ldr r3, [sp, #16]
25bc: e593c014 ldr ip, [r3, #20]
25c0: e35c0000 cmp ip, #0
25c4: 0a000012 beq 2614 <mknod+0xfc>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
25c8: e1a03008 mov r3, r8
25cc: e58d4000 str r4, [sp]
25d0: e59d0018 ldr r0, [sp, #24]
25d4: e1a01006 mov r1, r6
25d8: e1a02007 mov r2, r7
25dc: e1a0e00f mov lr, pc
25e0: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
25e4: e59d3010 ldr r3, [sp, #16]
25e8: e3530000 cmp r3, #0
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
25ec: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
25f0: 0a000004 beq 2608 <mknod+0xf0>
25f4: e593301c ldr r3, [r3, #28]
25f8: e3530000 cmp r3, #0
25fc: 11a00004 movne r0, r4
2600: 11a0e00f movne lr, pc
2604: 112fff13 bxne r3
return result;
}
2608: e1a00005 mov r0, r5
260c: e28dd020 add sp, sp, #32
2610: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
2614: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2618: e3530000 cmp r3, #0 <== NOT EXECUTED
261c: 11a00004 movne r0, r4 <== NOT EXECUTED
2620: 11a0e00f movne lr, pc <== NOT EXECUTED
2624: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2628: eb003439 bl f714 <__errno> <== NOT EXECUTED
262c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2630: e5803000 str r3, [r0] <== NOT EXECUTED
2634: e3e05000 mvn r5, #0
2638: eafffff2 b 2608 <mknod+0xf0>
000026c8 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
26c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
26cc: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
26d0: e24dd028 sub sp, sp, #40 ; 0x28
26d4: e58d3004 str r3, [sp, #4]
26d8: e1a08000 mov r8, r0
26dc: e1a07001 mov r7, r1
26e0: e1a0a002 mov sl, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
26e4: 8a00009e bhi 2964 <mount+0x29c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
26e8: e1a00002 mov r0, r2
26ec: eb00232b bl b3a0 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
26f0: e3500000 cmp r0, #0
26f4: e58d000c str r0, [sp, #12]
26f8: 0a000099 beq 2964 <mount+0x29c>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
26fc: e2575000 subs r5, r7, #0
2700: 13a05001 movne r5, #1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2704: e3550000 cmp r5, #0
2708: 0a000090 beq 2950 <mount+0x288>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
270c: e1a00007 mov r0, r7
2710: e58d7010 str r7, [sp, #16]
2714: eb003803 bl 10728 <strlen>
2718: e58d0008 str r0, [sp, #8]
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
271c: e1a0000a mov r0, sl
2720: eb003800 bl 10728 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2724: e3580000 cmp r8, #0
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2728: e2806001 add r6, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
272c: 01a0b008 moveq fp, r8
2730: 0a000002 beq 2740 <mount+0x78>
2734: e1a00008 mov r0, r8
2738: eb0037fa bl 10728 <strlen>
273c: e280b001 add fp, r0, #1
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
2740: e59d3008 ldr r3, [sp, #8]
2744: e2831075 add r1, r3, #117 ; 0x75
2748: e0811006 add r1, r1, r6
274c: e081100b add r1, r1, fp
2750: e3a00001 mov r0, #1
2754: ebfffdbd bl 1e50 <calloc>
if ( mt_entry != NULL ) {
2758: e2504000 subs r4, r0, #0
275c: 0a000076 beq 293c <mount+0x274>
char *str = (char *) mt_entry + sizeof( *mt_entry );
2760: e2849074 add r9, r4, #116 ; 0x74
strcpy( str, filesystemtype );
2764: e1a0100a mov r1, sl
2768: e1a00009 mov r0, r9
276c: eb00379d bl 105e8 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
2770: e3580000 cmp r8, #0
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
str += filesystemtype_size;
2774: e0896006 add r6, r9, r6
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
2778: e584906c str r9, [r4, #108] ; 0x6c
str += filesystemtype_size;
if ( source_or_null != NULL ) {
277c: 0a000004 beq 2794 <mount+0xcc>
strcpy( str, source_or_null );
2780: e1a00006 mov r0, r6
2784: e1a01008 mov r1, r8
2788: eb003796 bl 105e8 <strcpy>
mt_entry->dev = str;
278c: e5846070 str r6, [r4, #112] ; 0x70
str += source_size;
2790: e086600b add r6, r6, fp
}
strcpy( str, target );
2794: e59d1010 ldr r1, [sp, #16]
2798: e1a00006 mov r0, r6
279c: eb003791 bl 105e8 <strcpy>
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
27a0: e59fe24c ldr lr, [pc, #588] ; 29f4 <mount+0x32c>
27a4: e8be000f ldm lr!, {r0, r1, r2, r3}
27a8: e284c038 add ip, r4, #56 ; 0x38
27ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
27b0: e8be000f ldm lr!, {r0, r1, r2, r3}
27b4: e8ac000f stmia ip!, {r0, r1, r2, r3}
27b8: e89e000f ldm lr, {r0, r1, r2, r3}
27bc: e88c000f stm ip, {r0, r1, r2, r3}
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
27c0: e59d3004 ldr r3, [sp, #4]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
27c4: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
27c8: e5846068 str r6, [r4, #104] ; 0x68
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
27cc: e5843030 str r3, [r4, #48] ; 0x30
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
27d0: e584402c str r4, [r4, #44] ; 0x2c
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
27d4: 1a000023 bne 2868 <mount+0x1a0>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
27d8: e59f3218 ldr r3, [pc, #536] ; 29f8 <mount+0x330>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
27dc: e5932000 ldr r2, [r3]
27e0: e2833004 add r3, r3, #4
27e4: e1520003 cmp r2, r3
27e8: 01a06005 moveq r6, r5
27ec: 1a00006d bne 29a8 <mount+0x2e0>
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
27f0: e59d104c ldr r1, [sp, #76] ; 0x4c
27f4: e1a00004 mov r0, r4
27f8: e59d300c ldr r3, [sp, #12]
27fc: e1a0e00f mov lr, pc
2800: e12fff13 bx r3
2804: e2507000 subs r7, r0, #0
2808: 1a00005a bne 2978 <mount+0x2b0>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
280c: e59f61e8 ldr r6, [pc, #488] ; 29fc <mount+0x334>
2810: e1a02007 mov r2, r7
2814: e1a01007 mov r1, r7
2818: e5960000 ldr r0, [r6]
281c: eb000be2 bl 57ac <rtems_semaphore_obtain>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2820: e1a01004 mov r1, r4
2824: e59f01cc ldr r0, [pc, #460] ; 29f8 <mount+0x330>
2828: eb000e36 bl 6108 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
282c: e5960000 ldr r0, [r6]
2830: eb000c25 bl 58cc <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
2834: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
2838: 059f31c0 ldreq r3, [pc, #448] ; 2a00 <mount+0x338>
283c: 0284401c addeq r4, r4, #28
2840: 0593c000 ldreq ip, [r3]
2844: 08b4000f ldmeq r4!, {r0, r1, r2, r3}
2848: 028cc018 addeq ip, ip, #24
284c: 08ac000f stmiaeq ip!, {r0, r1, r2, r3}
2850: 05943000 ldreq r3, [r4]
2854: 058c3000 streq r3, [ip]
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
2858: 11a00007 movne r0, r7
rtems_filesystem_root = mt_entry->mt_fs_root;
285c: 01a00005 moveq r0, r5
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
2860: e28dd028 add sp, sp, #40 ; 0x28
2864: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
2868: e28d6014 add r6, sp, #20
286c: e3a0c001 mov ip, #1
2870: e1a00007 mov r0, r7
2874: e59d1008 ldr r1, [sp, #8]
2878: e3a02007 mov r2, #7
287c: e1a03006 mov r3, r6
2880: e58dc000 str ip, [sp]
2884: ebfffde5 bl 2020 <rtems_filesystem_evaluate_path>
2888: e3700001 cmn r0, #1
288c: 0a000048 beq 29b4 <mount+0x2ec>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
2890: e59d3020 ldr r3, [sp, #32]
2894: e5933010 ldr r3, [r3, #16]
2898: e3530000 cmp r3, #0
289c: 0a000050 beq 29e4 <mount+0x31c>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
28a0: e1a00006 mov r0, r6
28a4: e1a0e00f mov lr, pc
28a8: e12fff13 bx r3
28ac: e3500001 cmp r0, #1
28b0: 1a000043 bne 29c4 <mount+0x2fc>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
28b4: e59f0148 ldr r0, [pc, #328] ; 2a04 <mount+0x33c>
28b8: e59d1014 ldr r1, [sp, #20]
28bc: ebffff63 bl 2650 <rtems_filesystem_mount_iterate>
28c0: e3500000 cmp r0, #0
28c4: 1a000042 bne 29d4 <mount+0x30c>
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
28c8: e59d1014 ldr r1, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
28cc: e59d2020 ldr r2, [sp, #32]
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
28d0: e5841008 str r1, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
28d4: e59d101c ldr r1, [sp, #28]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
28d8: e5923020 ldr r3, [r2, #32]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
28dc: e5841010 str r1, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
28e0: e59d1024 ldr r1, [sp, #36] ; 0x24
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
28e4: e3530000 cmp r3, #0
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
28e8: e5841018 str r1, [r4, #24]
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
28ec: e5842014 str r2, [r4, #20]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
28f0: 0a00003b beq 29e4 <mount+0x31c>
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
28f4: e1a00004 mov r0, r4
28f8: e1a0e00f mov lr, pc
28fc: e12fff13 bx r3
2900: e3500000 cmp r0, #0
2904: 0affffb9 beq 27f0 <mount+0x128>
return 0;
cleanup_and_bail:
free( mt_entry );
2908: e1a00004 mov r0, r4
290c: ebfffde5 bl 20a8 <free>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
2910: e596300c ldr r3, [r6, #12]
2914: e3530000 cmp r3, #0
2918: 0a000020 beq 29a0 <mount+0x2d8>
291c: e593301c ldr r3, [r3, #28]
2920: e3530000 cmp r3, #0
2924: 0a00001d beq 29a0 <mount+0x2d8>
2928: e1a00006 mov r0, r6
292c: e1a0e00f mov lr, pc
2930: e12fff13 bx r3
2934: e3e00000 mvn r0, #0
2938: eaffffc8 b 2860 <mount+0x198>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
293c: eb003374 bl f714 <__errno> <== NOT EXECUTED
2940: e3a0300c mov r3, #12 <== NOT EXECUTED
2944: e5803000 str r3, [r0] <== NOT EXECUTED
2948: e3e00000 mvn r0, #0 <== NOT EXECUTED
294c: eaffffc3 b 2860 <mount+0x198> <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2950: e3a03001 mov r3, #1
2954: e58d3008 str r3, [sp, #8]
2958: e59f30a8 ldr r3, [pc, #168] ; 2a08 <mount+0x340>
295c: e58d3010 str r3, [sp, #16]
2960: eaffff6d b 271c <mount+0x54>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
2964: eb00336a bl f714 <__errno>
2968: e3a03016 mov r3, #22
296c: e5803000 str r3, [r0]
2970: e3e00000 mvn r0, #0
2974: eaffffb9 b 2860 <mount+0x198>
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
2978: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
297c: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED
2980: e3530000 cmp r3, #0 <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
2984: 11a00004 movne r0, r4 <== NOT EXECUTED
2988: 11a0e00f movne lr, pc <== NOT EXECUTED
298c: 112fff13 bxne r3 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
2990: e1a00004 mov r0, r4 <== NOT EXECUTED
2994: ebfffdc3 bl 20a8 <free> <== NOT EXECUTED
if ( loc_to_free )
2998: e3560000 cmp r6, #0 <== NOT EXECUTED
299c: 1affffdb bne 2910 <mount+0x248> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
29a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
29a4: eaffffad b 2860 <mount+0x198> <== NOT EXECUTED
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
29a8: eb003359 bl f714 <__errno> <== NOT EXECUTED
29ac: e3a03016 mov r3, #22 <== NOT EXECUTED
29b0: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
29b4: e1a00004 mov r0, r4 <== NOT EXECUTED
29b8: ebfffdba bl 20a8 <free> <== NOT EXECUTED
29bc: e3e00000 mvn r0, #0 <== NOT EXECUTED
29c0: eaffffa6 b 2860 <mount+0x198> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
29c4: eb003352 bl f714 <__errno>
29c8: e3a03014 mov r3, #20
29cc: e5803000 str r3, [r0]
goto cleanup_and_bail;
29d0: eaffffcc b 2908 <mount+0x240>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
29d4: eb00334e bl f714 <__errno>
29d8: e3a03010 mov r3, #16
29dc: e5803000 str r3, [r0]
goto cleanup_and_bail;
29e0: eaffffc8 b 2908 <mount+0x240>
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
29e4: eb00334a bl f714 <__errno> <== NOT EXECUTED
29e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
29ec: e5803000 str r3, [r0] <== NOT EXECUTED
goto cleanup_and_bail;
29f0: eaffffc4 b 2908 <mount+0x240> <== NOT EXECUTED
0003699c <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
3699c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
369a0: e24dd0ac sub sp, sp, #172 ; 0xac <== NOT EXECUTED
369a4: e1a06000 mov r6, r0 <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
369a8: e28d5074 add r5, sp, #116 ; 0x74 <== NOT EXECUTED
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
369ac: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
369b0: e3a04000 mov r4, #0 <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
369b4: e285c008 add ip, r5, #8 <== NOT EXECUTED
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
369b8: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
369bc: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
369c0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
369c4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
369c8: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
369cc: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
369d0: e58d4074 str r4, [sp, #116] ; 0x74 <== NOT EXECUTED
369d4: e58c4000 str r4, [ip] <== NOT EXECUTED
369d8: e58d4078 str r4, [sp, #120] ; 0x78 <== NOT EXECUTED
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
369dc: e1a08003 mov r8, r3 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
369e0: e3e03000 mvn r3, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
369e4: e58d30a0 str r3, [sp, #160] ; 0xa0 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
369e8: e58d309c str r3, [sp, #156] ; 0x9c <== NOT EXECUTED
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
369ec: e28d9014 add r9, sp, #20 <== NOT EXECUTED
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
369f0: e5963000 ldr r3, [r6] <== NOT EXECUTED
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
369f4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
369f8: e1a07002 mov r7, r2 <== NOT EXECUTED
369fc: e1a0a001 mov sl, r1 <== NOT EXECUTED
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
36a00: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED
36a04: e1a01004 mov r1, r4 <== NOT EXECUTED
36a08: e1a00009 mov r0, r9 <== NOT EXECUTED
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
36a0c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
36a10: e58d40a4 str r4, [sp, #164] ; 0xa4 <== NOT EXECUTED
time_t time_ret = 0;
uint16_t time_val = 0;
36a14: e1cd4aba strh r4, [sp, #170] ; 0xaa <== NOT EXECUTED
uint16_t date = 0;
36a18: e1cd4ab8 strh r4, [sp, #168] ; 0xa8 <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
36a1c: e58d4094 str r4, [sp, #148] ; 0x94 <== NOT EXECUTED
dir_pos->sname.ofs = 0;
36a20: e58d4098 str r4, [sp, #152] ; 0x98 <== NOT EXECUTED
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
36a24: eb00443c bl 47b1c <memset> <== NOT EXECUTED
name_type = msdos_long_to_short (name, name_len,
36a28: e1a01008 mov r1, r8 <== NOT EXECUTED
36a2c: e1a02005 mov r2, r5 <== NOT EXECUTED
36a30: e3a0300b mov r3, #11 <== NOT EXECUTED
36a34: e1a00007 mov r0, r7 <== NOT EXECUTED
36a38: eb000811 bl 38a84 <msdos_long_to_short> <== NOT EXECUTED
36a3c: e1a0b000 mov fp, r0 <== NOT EXECUTED
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
/* set up last write date and time */
time_ret = time(NULL);
36a40: e1a00004 mov r0, r4 <== NOT EXECUTED
name_type = msdos_long_to_short (name, name_len,
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
36a44: e5cd4080 strb r4, [sp, #128] ; 0x80 <== NOT EXECUTED
/* set up last write date and time */
time_ret = time(NULL);
36a48: eb00667f bl 5044c <time> <== NOT EXECUTED
if ( time_ret == -1 )
36a4c: e3700001 cmn r0, #1 <== NOT EXECUTED
36a50: 0a00001d beq 36acc <msdos_creat_node+0x130> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
36a54: e28d10a8 add r1, sp, #168 ; 0xa8 <== NOT EXECUTED
36a58: e28d20aa add r2, sp, #170 ; 0xaa <== NOT EXECUTED
36a5c: eb002fc9 bl 42988 <msdos_date_unix2dos> <== NOT EXECUTED
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
36a60: e1ddeaba ldrh lr, [sp, #170] ; 0xaa <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
36a64: e1dd1ab8 ldrh r1, [sp, #168] ; 0xa8 <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
36a68: e35a0001 cmp sl, #1 <== NOT EXECUTED
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
36a6c: e58d4090 str r4, [sp, #144] ; 0x90 <== NOT EXECUTED
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
36a70: e1cde8ba strh lr, [sp, #138] ; 0x8a <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
36a74: e1cd18bc strh r1, [sp, #140] ; 0x8c <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
36a78: 0a000015 beq 36ad4 <msdos_creat_node+0x138> <== NOT EXECUTED
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
36a7c: e35a0003 cmp sl, #3 <== NOT EXECUTED
36a80: 0a000073 beq 36c54 <msdos_creat_node+0x2b8> <== NOT EXECUTED
* set "last access" date to today
*/
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
36a84: e5dd307f ldrb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
36a88: e3833020 orr r3, r3, #32 <== NOT EXECUTED
36a8c: e5cd307f strb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
36a90: e1a02007 mov r2, r7 <== NOT EXECUTED
36a94: e1a03008 mov r3, r8 <== NOT EXECUTED
36a98: e28d4094 add r4, sp, #148 ; 0x94 <== NOT EXECUTED
36a9c: e1a00006 mov r0, r6 <== NOT EXECUTED
36aa0: e3a01001 mov r1, #1 <== NOT EXECUTED
36aa4: e58db000 str fp, [sp] <== NOT EXECUTED
36aa8: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
36aac: eb0008fd bl 38ea8 <msdos_get_name_node> <== NOT EXECUTED
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
36ab0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
36ab4: 1a000001 bne 36ac0 <msdos_creat_node+0x124> <== NOT EXECUTED
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
36ab8: e35a0001 cmp sl, #1 <== NOT EXECUTED
36abc: 0a000008 beq 36ae4 <msdos_creat_node+0x148> <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
36ac0: e1a00007 mov r0, r7 <== NOT EXECUTED
36ac4: e28dd0ac add sp, sp, #172 ; 0xac <== NOT EXECUTED
36ac8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
36acc: e3e07000 mvn r7, #0 <== NOT EXECUTED
36ad0: eafffffa b 36ac0 <msdos_creat_node+0x124> <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
36ad4: e5dd307f ldrb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
36ad8: e3833010 orr r3, r3, #16 <== NOT EXECUTED
36adc: e5cd307f strb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
36ae0: eaffffea b 36a90 <msdos_creat_node+0xf4> <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
36ae4: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36ae8: e1a01004 mov r1, r4 <== NOT EXECUTED
36aec: e28d20a4 add r2, sp, #164 ; 0xa4 <== NOT EXECUTED
36af0: ebffbccc bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
36af4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
36af8: 1a000044 bne 36c10 <msdos_creat_node+0x274> <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
36afc: e59d30a4 ldr r3, [sp, #164] ; 0xa4 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
36b00: e3a02602 mov r2, #2097152 ; 0x200000 <== NOT EXECUTED
36b04: e5832014 str r2, [r3, #20] <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
36b08: e5837018 str r7, [r3, #24] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
36b0c: e583a010 str sl, [r3, #16] <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
36b10: e1a0e005 mov lr, r5 <== NOT EXECUTED
36b14: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
36b18: e1a0c009 mov ip, r9 <== NOT EXECUTED
36b1c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
36b20: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED
36b24: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
36b28: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED
36b2c: e2895020 add r5, r9, #32 <== NOT EXECUTED
36b30: e1a0c005 mov ip, r5 <== NOT EXECUTED
36b34: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
36b38: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED
36b3c: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
36b40: e59f31dc ldr r3, [pc, #476] ; 36d24 <msdos_creat_node+0x388><== NOT EXECUTED
36b44: e3a0200b mov r2, #11 <== NOT EXECUTED
36b48: e5931000 ldr r1, [r3] <== NOT EXECUTED
36b4c: e1a00009 mov r0, r9 <== NOT EXECUTED
36b50: eb00436a bl 47900 <memcpy> <== NOT EXECUTED
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
36b54: e59f31cc ldr r3, [pc, #460] ; 36d28 <msdos_creat_node+0x38c><== NOT EXECUTED
36b58: e1a00005 mov r0, r5 <== NOT EXECUTED
36b5c: e5931000 ldr r1, [r3] <== NOT EXECUTED
36b60: e3a0200b mov r2, #11 <== NOT EXECUTED
36b64: eb004365 bl 47900 <memcpy> <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
36b68: e59de00c ldr lr, [sp, #12] <== NOT EXECUTED
36b6c: e59e3020 ldr r3, [lr, #32] <== NOT EXECUTED
36b70: e3530001 cmp r3, #1 <== NOT EXECUTED
36b74: 0a00002c beq 36c2c <msdos_creat_node+0x290> <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
36b78: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
36b7c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
36b80: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED
36b84: e1cd24b8 strh r2, [sp, #72] ; 0x48 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
36b88: e1cd34be strh r3, [sp, #78] ; 0x4e <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
36b8c: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36b90: e59d10a4 ldr r1, [sp, #164] ; 0xa4 <== NOT EXECUTED
36b94: e3a02000 mov r2, #0 <== NOT EXECUTED
36b98: e3a03040 mov r3, #64 ; 0x40 <== NOT EXECUTED
36b9c: e58d9000 str r9, [sp] <== NOT EXECUTED
36ba0: ebffbb5d bl 2591c <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
36ba4: e3500000 cmp r0, #0 <== NOT EXECUTED
36ba8: ba00001d blt 36c24 <msdos_creat_node+0x288> <== NOT EXECUTED
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
36bac: e59d10a4 ldr r1, [sp, #164] ; 0xa4 <== NOT EXECUTED
36bb0: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
36bb4: e5912018 ldr r2, [r1, #24] <== NOT EXECUTED
36bb8: e1de30b6 ldrh r3, [lr, #6] <== NOT EXECUTED
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
36bbc: e591c01c ldr ip, [r1, #28] <== NOT EXECUTED
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
36bc0: e0823003 add r3, r2, r3 <== NOT EXECUTED
36bc4: e5813018 str r3, [r1, #24] <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
36bc8: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
36bcc: e1a0e82c lsr lr, ip, #16 <== NOT EXECUTED
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
36bd0: e3a02000 mov r2, #0 <== NOT EXECUTED
36bd4: e3a03020 mov r3, #32 <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
36bd8: e1cde2b8 strh lr, [sp, #40] ; 0x28 <== NOT EXECUTED
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
36bdc: e58d9000 str r9, [sp] <== NOT EXECUTED
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
36be0: e1cdc2be strh ip, [sp, #46] ; 0x2e <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
36be4: ebffbb4c bl 2591c <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
36be8: e3500000 cmp r0, #0 <== NOT EXECUTED
36bec: ba00000c blt 36c24 <msdos_creat_node+0x288> <== NOT EXECUTED
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
36bf0: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36bf4: e59d10a4 ldr r1, [sp, #164] ; 0xa4 <== NOT EXECUTED
36bf8: eb000695 bl 38654 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
36bfc: e2507000 subs r7, r0, #0 <== NOT EXECUTED
36c00: 0a000043 beq 36d14 <msdos_creat_node+0x378> <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
36c04: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36c08: e59d10a4 ldr r1, [sp, #164] ; 0xa4 <== NOT EXECUTED
36c0c: ebffbc5b bl 25d80 <fat_file_close> <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
36c10: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36c14: e1a01004 mov r1, r4 <== NOT EXECUTED
36c18: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
36c1c: eb0006bb bl 38710 <msdos_set_first_char4file_name> <== NOT EXECUTED
return rc;
36c20: eaffffa6 b 36ac0 <msdos_creat_node+0x124> <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
36c24: e3e07000 mvn r7, #0 <== NOT EXECUTED
36c28: eafffff5 b 36c04 <msdos_creat_node+0x268> <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
36c2c: e59e3024 ldr r3, [lr, #36] ; 0x24 <== NOT EXECUTED
36c30: e3530000 cmp r3, #0 <== NOT EXECUTED
36c34: 1affffcf bne 36b78 <msdos_creat_node+0x1dc> <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
36c38: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
36c3c: e5d1200a ldrb r2, [r1, #10] <== NOT EXECUTED
36c40: e3120004 tst r2, #4 <== NOT EXECUTED
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
36c44: 11c933b4 strhne r3, [r9, #52] ; 0x34 <== NOT EXECUTED
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
36c48: 11c933ba strhne r3, [r9, #58] ; 0x3a <== NOT EXECUTED
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
(fs_info->fat.vol.type & FAT_FAT32))
36c4c: 1affffce bne 36b8c <msdos_creat_node+0x1f0> <== NOT EXECUTED
36c50: eaffffc8 b 36b78 <msdos_creat_node+0x1dc> <== NOT EXECUTED
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
36c54: e59d30d4 ldr r3, [sp, #212] ; 0xd4 <== NOT EXECUTED
36c58: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
36c5c: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
36c60: e3520000 cmp r2, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
36c64: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
36c68: 1a000003 bne 36c7c <msdos_creat_node+0x2e0> <== NOT EXECUTED
36c6c: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
36c70: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
36c74: 1593c01c ldrne ip, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
36c78: 1a000003 bne 36c8c <msdos_creat_node+0x2f0> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
36c7c: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
36c80: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
36c84: e2422002 sub r2, r2, #2 <== NOT EXECUTED
36c88: e081c312 add ip, r1, r2, lsl r3 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
36c8c: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
36c90: e59d10d4 ldr r1, [sp, #212] ; 0xd4 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
36c94: e1de20b0 ldrh r2, [lr] <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
36c98: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
36c9c: e5de1002 ldrb r1, [lr, #2] <== NOT EXECUTED
36ca0: e2422001 sub r2, r2, #1 <== NOT EXECUTED
36ca4: e08c1133 add r1, ip, r3, lsr r1 <== NOT EXECUTED
36ca8: e0022003 and r2, r2, r3 <== NOT EXECUTED
36cac: e28dc054 add ip, sp, #84 ; 0x54 <== NOT EXECUTED
36cb0: e3a03020 mov r3, #32 <== NOT EXECUTED
36cb4: e58dc000 str ip, [sp] <== NOT EXECUTED
36cb8: ebffbeec bl 26870 <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
36cbc: e3500000 cmp r0, #0 <== NOT EXECUTED
36cc0: baffff81 blt 36acc <msdos_creat_node+0x130> <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
36cc4: e5dd305f ldrb r3, [sp, #95] ; 0x5f <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
36cc8: e5dd2061 ldrb r2, [sp, #97] ; 0x61 <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
36ccc: e5cd307f strb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
36cd0: e5cd2081 strb r2, [sp, #129] ; 0x81 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
36cd4: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
36cd8: e5dd307f ldrb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
36cdc: e585201c str r2, [r5, #28] <== NOT EXECUTED
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
36ce0: e1dd26b2 ldrh r2, [sp, #98] ; 0x62 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
36ce4: e3833020 orr r3, r3, #32 <== NOT EXECUTED
36ce8: e5cd307f strb r3, [sp, #127] ; 0x7f <== NOT EXECUTED
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
36cec: e1cd28b2 strh r2, [sp, #130] ; 0x82 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
36cf0: e1dd36b4 ldrh r3, [sp, #100] ; 0x64 <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
36cf4: e1dde6be ldrh lr, [sp, #110] ; 0x6e <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
36cf8: e1dd16b8 ldrh r1, [sp, #104] ; 0x68 <== NOT EXECUTED
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
/*
* set "last access" date to today
*/
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
36cfc: e1dd2ab8 ldrh r2, [sp, #168] ; 0xa8 <== NOT EXECUTED
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
36d00: e1cd38b4 strh r3, [sp, #132] ; 0x84 <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
36d04: e1cde8be strh lr, [sp, #142] ; 0x8e <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
36d08: e1cd18b8 strh r1, [sp, #136] ; 0x88 <== NOT EXECUTED
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
/*
* set "last access" date to today
*/
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
36d0c: e1cd28b6 strh r2, [sp, #134] ; 0x86 <== NOT EXECUTED
36d10: eaffff5e b 36a90 <msdos_creat_node+0xf4> <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
36d14: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
36d18: e59d10a4 ldr r1, [sp, #164] ; 0xa4 <== NOT EXECUTED
36d1c: ebffbc17 bl 25d80 <fat_file_close> <== NOT EXECUTED
36d20: eaffff66 b 36ac0 <msdos_creat_node+0x124> <== NOT EXECUTED
00042b10 <msdos_date_dos2unix>:
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
42b10: e59f310c ldr r3, [pc, #268] ; 42c24 <msdos_date_dos2unix+0x114><== NOT EXECUTED
42b14: e1d320bc ldrh r2, [r3, #12] <== NOT EXECUTED
42b18: e1520000 cmp r2, r0 <== NOT EXECUTED
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
42b1c: e92d00f0 push {r4, r5, r6, r7} <== NOT EXECUTED
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
42b20: 05932010 ldreq r2, [r3, #16] <== NOT EXECUTED
42b24: 0a00002e beq 42be4 <msdos_date_dos2unix+0xd4> <== NOT EXECUTED
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
42b28: e2005cfe and r5, r0, #65024 ; 0xfe00 <== NOT EXECUTED
for (y = 0; y < year; y++)
42b2c: e1b054a5 lsrs r5, r5, #9 <== NOT EXECUTED
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
42b30: e1c300bc strh r0, [r3, #12] <== NOT EXECUTED
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
42b34: 0a000037 beq 42c18 <msdos_date_dos2unix+0x108> <== NOT EXECUTED
42b38: e3a04f5b mov r4, #364 ; 0x16c <== NOT EXECUTED
42b3c: e2844002 add r4, r4, #2 <== NOT EXECUTED
42b40: e3a02000 mov r2, #0 <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
42b44: e3a06f5b mov r6, #364 ; 0x16c <== NOT EXECUTED
42b48: e2866001 add r6, r6, #1 <== NOT EXECUTED
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
42b4c: e1a0c002 mov ip, r2 <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
42b50: e1a07004 mov r7, r4 <== NOT EXECUTED
42b54: ea000002 b 42b64 <msdos_date_dos2unix+0x54> <== NOT EXECUTED
42b58: e31c0003 tst ip, #3 <== NOT EXECUTED
42b5c: 11a04006 movne r4, r6 <== NOT EXECUTED
42b60: 01a04007 moveq r4, r7 <== NOT EXECUTED
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
42b64: e28cc001 add ip, ip, #1 <== NOT EXECUTED
42b68: e155000c cmp r5, ip <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
42b6c: e0822004 add r2, r2, r4 <== NOT EXECUTED
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
42b70: 8afffff8 bhi 42b58 <msdos_date_dos2unix+0x48> <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
42b74: e59fc0ac ldr ip, [pc, #172] ; 42c28 <msdos_date_dos2unix+0x118><== NOT EXECUTED
42b78: e3150003 tst r5, #3 <== NOT EXECUTED
42b7c: e24c5018 sub r5, ip, #24 <== NOT EXECUTED
42b80: 11a0500c movne r5, ip <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
42b84: e2006e1e and r6, r0, #480 ; 0x1e0 <== NOT EXECUTED
if (month == 0) {
42b88: e1b062a6 lsrs r6, r6, #5 <== NOT EXECUTED
42b8c: 0a000008 beq 42bb4 <msdos_date_dos2unix+0xa4> <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
42b90: e2566001 subs r6, r6, #1 <== NOT EXECUTED
42b94: 0a000006 beq 42bb4 <msdos_date_dos2unix+0xa4> <== NOT EXECUTED
42b98: e3a0c000 mov ip, #0 <== NOT EXECUTED
days += months[m];
42b9c: e1a0408c lsl r4, ip, #1 <== NOT EXECUTED
42ba0: e19540b4 ldrh r4, [r5, r4] <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
42ba4: e28cc001 add ip, ip, #1 <== NOT EXECUTED
42ba8: e15c0006 cmp ip, r6 <== NOT EXECUTED
days += months[m];
42bac: e0822004 add r2, r2, r4 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
42bb0: 3afffff9 bcc 42b9c <msdos_date_dos2unix+0x8c> <== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
42bb4: e200001f and r0, r0, #31 <== NOT EXECUTED
42bb8: e2400001 sub r0, r0, #1 <== NOT EXECUTED
42bbc: e0802002 add r2, r0, r2 <== NOT EXECUTED
42bc0: e0820102 add r0, r2, r2, lsl #2 <== NOT EXECUTED
42bc4: e0820100 add r0, r2, r0, lsl #2 <== NOT EXECUTED
42bc8: e0820200 add r0, r2, r0, lsl #4 <== NOT EXECUTED
42bcc: e0822080 add r2, r2, r0, lsl #1 <== NOT EXECUTED
42bd0: e1a02382 lsl r2, r2, #7 <== NOT EXECUTED
42bd4: e282254b add r2, r2, #314572800 ; 0x12c00000 <== NOT EXECUTED
42bd8: e2822aea add r2, r2, #958464 ; 0xea000 <== NOT EXECUTED
42bdc: e2822c06 add r2, r2, #1536 ; 0x600 <== NOT EXECUTED
42be0: e5832010 str r2, [r3, #16] <== NOT EXECUTED
42be4: e2013b3e and r3, r1, #63488 ; 0xf800 <== NOT EXECUTED
42be8: e2010e7e and r0, r1, #2016 ; 0x7e0 <== NOT EXECUTED
42bec: e1a035a3 lsr r3, r3, #11 <== NOT EXECUTED
42bf0: e0634183 rsb r4, r3, r3, lsl #3 <== NOT EXECUTED
42bf4: e1a0c1a0 lsr ip, r0, #3 <== NOT EXECUTED
42bf8: e0833284 add r3, r3, r4, lsl #5 <== NOT EXECUTED
42bfc: e06c0080 rsb r0, ip, r0, lsl #1 <== NOT EXECUTED
42c00: e0800203 add r0, r0, r3, lsl #4 <== NOT EXECUTED
42c04: e201101f and r1, r1, #31 <== NOT EXECUTED
42c08: e0800001 add r0, r0, r1 <== NOT EXECUTED
}
return seconds + lastseconds;
}
42c0c: e0800002 add r0, r0, r2 <== NOT EXECUTED
42c10: e8bd00f0 pop {r4, r5, r6, r7} <== NOT EXECUTED
42c14: e12fff1e bx lr <== NOT EXECUTED
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
42c18: e1a02005 mov r2, r5 <== NOT EXECUTED
42c1c: e59f5008 ldr r5, [pc, #8] ; 42c2c <msdos_date_dos2unix+0x11c><== NOT EXECUTED
42c20: eaffffd7 b 42b84 <msdos_date_dos2unix+0x74> <== NOT EXECUTED
00042988 <msdos_date_unix2dos>:
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
42988: e59f316c ldr r3, [pc, #364] ; 42afc <msdos_date_unix2dos+0x174><== NOT EXECUTED
4298c: e593c000 ldr ip, [r3] <== NOT EXECUTED
42990: e15c0000 cmp ip, r0 <== NOT EXECUTED
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
42994: e92d05f0 push {r4, r5, r6, r7, r8, sl} <== NOT EXECUTED
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
42998: 0a000054 beq 42af0 <msdos_date_unix2dos+0x168> <== NOT EXECUTED
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
4299c: e59fc15c ldr ip, [pc, #348] ; 42b00 <msdos_date_unix2dos+0x178><== NOT EXECUTED
429a0: e59f415c ldr r4, [pc, #348] ; 42b04 <msdos_date_unix2dos+0x17c><== NOT EXECUTED
429a4: e0856094 umull r6, r5, r4, r0 <== NOT EXECUTED
429a8: e084709c umull r7, r4, ip, r0 <== NOT EXECUTED
429ac: e1a042a4 lsr r4, r4, #5 <== NOT EXECUTED
429b0: e086849c umull r8, r6, ip, r4 <== NOT EXECUTED
429b4: e28cc422 add ip, ip, #570425344 ; 0x22000000 <== NOT EXECUTED
429b8: e28cc822 add ip, ip, #2228224 ; 0x220000 <== NOT EXECUTED
429bc: e28ccc22 add ip, ip, #8704 ; 0x2200 <== NOT EXECUTED
429c0: e1a055a5 lsr r5, r5, #11 <== NOT EXECUTED
429c4: e28cc022 add ip, ip, #34 ; 0x22 <== NOT EXECUTED
429c8: e087a59c umull sl, r7, ip, r5 <== NOT EXECUTED
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
429cc: e59f8134 ldr r8, [pc, #308] ; 42b08 <msdos_date_unix2dos+0x180><== NOT EXECUTED
429d0: e08ca098 umull sl, ip, r8, r0 <== NOT EXECUTED
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
429d4: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED
429d8: e1a07227 lsr r7, r7, #4 <== NOT EXECUTED
429dc: e1a08306 lsl r8, r6, #6 <== NOT EXECUTED
429e0: e0877087 add r7, r7, r7, lsl #1 <== NOT EXECUTED
429e4: e0486106 sub r6, r8, r6, lsl #2 <== NOT EXECUTED
429e8: e0455187 sub r5, r5, r7, lsl #3 <== NOT EXECUTED
429ec: e1a08304 lsl r8, r4, #6 <== NOT EXECUTED
429f0: e0488104 sub r8, r8, r4, lsl #2 <== NOT EXECUTED
429f4: e1a05585 lsl r5, r5, #11 <== NOT EXECUTED
429f8: e0664004 rsb r4, r6, r4 <== NOT EXECUTED
429fc: e0854284 add r4, r5, r4, lsl #5 <== NOT EXECUTED
42a00: e0686000 rsb r6, r8, r0 <== NOT EXECUTED
42a04: e08460a6 add r6, r4, r6, lsr #1 <== NOT EXECUTED
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
42a08: e5935008 ldr r5, [r3, #8] <== NOT EXECUTED
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
42a0c: e1a0c82c lsr ip, ip, #16 <== NOT EXECUTED
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
42a10: e1a06806 lsl r6, r6, #16 <== NOT EXECUTED
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
42a14: e15c0005 cmp ip, r5 <== NOT EXECUTED
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
42a18: e1a06826 lsr r6, r6, #16 <== NOT EXECUTED
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
42a1c: e5830000 str r0, [r3] <== NOT EXECUTED
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
42a20: e1c360b4 strh r6, [r3, #4] <== NOT EXECUTED
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
42a24: 01d3c0b6 ldrheq ip, [r3, #6] <== NOT EXECUTED
42a28: 0a00002c beq 42ae0 <msdos_date_unix2dos+0x158> <== NOT EXECUTED
lastday = days;
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
42a2c: e3a07f5b mov r7, #364 ; 0x16c <== NOT EXECUTED
42a30: e1a05007 mov r5, r7 <== NOT EXECUTED
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
42a34: e3a00e7b mov r0, #1968 ; 0x7b0 <== NOT EXECUTED
42a38: e583c008 str ip, [r3, #8] <== NOT EXECUTED
42a3c: e2800002 add r0, r0, #2 <== NOT EXECUTED
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
42a40: e2877001 add r7, r7, #1 <== NOT EXECUTED
42a44: e2855002 add r5, r5, #2 <== NOT EXECUTED
42a48: ea000001 b 42a54 <msdos_date_unix2dos+0xcc> <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
42a4c: e064c00c rsb ip, r4, ip <== NOT EXECUTED
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
42a50: e2800001 add r0, r0, #1 <== NOT EXECUTED
inc = year & 0x03 ? 365 : 366;
42a54: e2108003 ands r8, r0, #3 <== NOT EXECUTED
42a58: 11a04007 movne r4, r7 <== NOT EXECUTED
42a5c: 01a04005 moveq r4, r5 <== NOT EXECUTED
if (days < inc)
42a60: e154000c cmp r4, ip <== NOT EXECUTED
42a64: 9afffff8 bls 42a4c <msdos_date_unix2dos+0xc4> <== NOT EXECUTED
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
42a68: e59f409c ldr r4, [pc, #156] ; 42b0c <msdos_date_unix2dos+0x184><== NOT EXECUTED
42a6c: e3580000 cmp r8, #0 <== NOT EXECUTED
42a70: e2445018 sub r5, r4, #24 <== NOT EXECUTED
42a74: 11a08004 movne r8, r4 <== NOT EXECUTED
42a78: 01a08005 moveq r8, r5 <== NOT EXECUTED
42a7c: e3a04000 mov r4, #0 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
42a80: e1a05084 lsl r5, r4, #1 <== NOT EXECUTED
42a84: e19850b5 ldrh r5, [r8, r5] <== NOT EXECUTED
42a88: e155000c cmp r5, ip <== NOT EXECUTED
42a8c: 8a000003 bhi 42aa0 <msdos_date_unix2dos+0x118> <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
42a90: e2844001 add r4, r4, #1 <== NOT EXECUTED
42a94: e354000c cmp r4, #12 <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
42a98: e065c00c rsb ip, r5, ip <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
42a9c: 1afffff7 bne 42a80 <msdos_date_unix2dos+0xf8> <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
42aa0: e08cc284 add ip, ip, r4, lsl #5 <== NOT EXECUTED
42aa4: e28cc021 add ip, ip, #33 ; 0x21 <== NOT EXECUTED
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
42aa8: e3a05e7b mov r5, #1968 ; 0x7b0 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
42aac: e1a0c80c lsl ip, ip, #16 <== NOT EXECUTED
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
42ab0: e285500c add r5, r5, #12 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
42ab4: e1a0c82c lsr ip, ip, #16 <== NOT EXECUTED
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
42ab8: e1500005 cmp r0, r5 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
42abc: e1c3c0b6 strh ip, [r3, #6] <== NOT EXECUTED
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
42ac0: 9a000006 bls 42ae0 <msdos_date_unix2dos+0x158> <== NOT EXECUTED
lastddate += (year - 1980) <<
42ac4: e2400e7b sub r0, r0, #1968 ; 0x7b0 <== NOT EXECUTED
42ac8: e240000c sub r0, r0, #12 <== NOT EXECUTED
42acc: e08cc480 add ip, ip, r0, lsl #9 <== NOT EXECUTED
42ad0: e1a0c80c lsl ip, ip, #16 <== NOT EXECUTED
42ad4: e59f3020 ldr r3, [pc, #32] ; 42afc <msdos_date_unix2dos+0x174><== NOT EXECUTED
42ad8: e1a0c82c lsr ip, ip, #16 <== NOT EXECUTED
42adc: e1c3c0b6 strh ip, [r3, #6] <== NOT EXECUTED
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
42ae0: e1c260b0 strh r6, [r2] <== NOT EXECUTED
*ddp = lastddate;
42ae4: e1c1c0b0 strh ip, [r1] <== NOT EXECUTED
}
42ae8: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} <== NOT EXECUTED
42aec: e12fff1e bx lr <== NOT EXECUTED
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
42af0: e1d3c0b6 ldrh ip, [r3, #6] <== NOT EXECUTED
42af4: e1d360b4 ldrh r6, [r3, #4] <== NOT EXECUTED
42af8: eafffff8 b 42ae0 <msdos_date_unix2dos+0x158> <== NOT EXECUTED
00042e10 <msdos_dir_chmod>:
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
42e10: e3a00000 mov r0, #0 <== NOT EXECUTED
42e14: e12fff1e bx lr <== NOT EXECUTED
00043664 <msdos_dir_close>:
int
msdos_dir_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
43664: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
43668: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
4366c: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
43670: e3a01000 mov r1, #0 <== NOT EXECUTED
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
43674: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
43678: e1a02001 mov r2, r1 <== NOT EXECUTED
4367c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
msdos_dir_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
43680: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
43684: ebff238e bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43688: e3500000 cmp r0, #0 <== NOT EXECUTED
4368c: 1a000007 bne 436b0 <msdos_dir_close+0x4c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
43690: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
43694: e1a01006 mov r1, r6 <== NOT EXECUTED
43698: ebff89b8 bl 25d80 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
4369c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
436a0: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
436a4: ebff23ce bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
436a8: e1a00004 mov r0, r4 <== NOT EXECUTED
436ac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
436b0: eb0003e2 bl 44640 <__errno> <== NOT EXECUTED
436b4: e3a03005 mov r3, #5 <== NOT EXECUTED
436b8: e5803000 str r3, [r0] <== NOT EXECUTED
436bc: e3e04000 mvn r4, #0 <== NOT EXECUTED
436c0: eafffff8 b 436a8 <msdos_dir_close+0x44> <== NOT EXECUTED
00038484 <msdos_dir_is_empty>:
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
38484: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
38488: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
3848c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
38490: e3a03000 mov r3, #0 <== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
38494: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
38498: e58d100c str r1, [sp, #12] <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
3849c: e5c23000 strb r3, [r2] <== NOT EXECUTED
384a0: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
384a4: e1d940b0 ldrh r4, [r9] <== NOT EXECUTED
384a8: e5995098 ldr r5, [r9, #152] ; 0x98 <== NOT EXECUTED
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
384ac: e59f6110 ldr r6, [pc, #272] ; 385c4 <msdos_dir_is_empty+0x140><== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
384b0: e1a0b000 mov fp, r0 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
384b4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
384b8: e1a03004 mov r3, r4 <== NOT EXECUTED
384bc: e1a0000b mov r0, fp <== NOT EXECUTED
384c0: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
384c4: e0020294 mul r2, r4, r2 <== NOT EXECUTED
384c8: e58d5000 str r5, [sp] <== NOT EXECUTED
384cc: ebffb5a8 bl 25b74 <fat_file_read> <== NOT EXECUTED
384d0: e3500000 cmp r0, #0 <== NOT EXECUTED
384d4: 0a00002e beq 38594 <msdos_dir_is_empty+0x110> <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
384d8: e350001f cmp r0, #31 <== NOT EXECUTED
384dc: da000030 ble 385a4 <msdos_dir_is_empty+0x120> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
384e0: e1d940b0 ldrh r4, [r9] <== NOT EXECUTED
384e4: e1500004 cmp r0, r4 <== NOT EXECUTED
384e8: 1a00002f bne 385ac <msdos_dir_is_empty+0x128> <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
384ec: e3540000 cmp r4, #0 <== NOT EXECUTED
384f0: 0a000025 beq 3858c <msdos_dir_is_empty+0x108> <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
384f4: e5995098 ldr r5, [r9, #152] ; 0x98 <== NOT EXECUTED
384f8: e3a07000 mov r7, #0 <== NOT EXECUTED
384fc: e1a08005 mov r8, r5 <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
38500: e7d5a007 ldrb sl, [r5, r7] <== NOT EXECUTED
38504: e35a00e5 cmp sl, #229 ; 0xe5 <== NOT EXECUTED
38508: 0a000017 beq 3856c <msdos_dir_is_empty+0xe8> <== NOT EXECUTED
3850c: e5d8300b ldrb r3, [r8, #11] <== NOT EXECUTED
38510: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
38514: e353000f cmp r3, #15 <== NOT EXECUTED
38518: 0a000013 beq 3856c <msdos_dir_is_empty+0xe8> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
3851c: e1a00008 mov r0, r8 <== NOT EXECUTED
38520: e5961000 ldr r1, [r6] <== NOT EXECUTED
38524: e3a0200b mov r2, #11 <== NOT EXECUTED
38528: eb004b9c bl 4b3a0 <strncmp> <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
3852c: e3500000 cmp r0, #0 <== NOT EXECUTED
38530: 0a00000d beq 3856c <msdos_dir_is_empty+0xe8> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
38534: e1a00008 mov r0, r8 <== NOT EXECUTED
38538: e5961004 ldr r1, [r6, #4] <== NOT EXECUTED
3853c: e3a0200b mov r2, #11 <== NOT EXECUTED
38540: eb004b96 bl 4b3a0 <strncmp> <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
38544: e3500000 cmp r0, #0 <== NOT EXECUTED
38548: 0a000007 beq 3856c <msdos_dir_is_empty+0xe8> <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
3854c: e35a0000 cmp sl, #0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
38550: 059d2008 ldreq r2, [sp, #8] <== NOT EXECUTED
38554: 03a03001 moveq r3, #1 <== NOT EXECUTED
38558: 05c23000 strbeq r3, [r2] <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
3855c: 13a00000 movne r0, #0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
38560: 01a0000a moveq r0, sl <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
38564: e28dd010 add sp, sp, #16 <== NOT EXECUTED
38568: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
3856c: e2877020 add r7, r7, #32 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
38570: e1570004 cmp r7, r4 <== NOT EXECUTED
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
38574: e2888020 add r8, r8, #32 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
38578: 3affffe0 bcc 38500 <msdos_dir_is_empty+0x7c> <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
3857c: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
38580: e2833001 add r3, r3, #1 <== NOT EXECUTED
38584: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
38588: eaffffc9 b 384b4 <msdos_dir_is_empty+0x30> <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
3858c: e5995098 ldr r5, [r9, #152] ; 0x98 <== NOT EXECUTED
38590: eafffff9 b 3857c <msdos_dir_is_empty+0xf8> <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
38594: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
38598: e3a03001 mov r3, #1 <== NOT EXECUTED
3859c: e5c23000 strb r3, [r2] <== NOT EXECUTED
return RC_OK;
385a0: eaffffef b 38564 <msdos_dir_is_empty+0xe0> <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
385a4: e3e00000 mvn r0, #0 <== NOT EXECUTED
385a8: eaffffed b 38564 <msdos_dir_is_empty+0xe0> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
385ac: e3a01fed mov r1, #948 ; 0x3b4 <== NOT EXECUTED
385b0: e2811001 add r1, r1, #1 <== NOT EXECUTED
385b4: e59f000c ldr r0, [pc, #12] ; 385c8 <msdos_dir_is_empty+0x144><== NOT EXECUTED
385b8: e59f200c ldr r2, [pc, #12] ; 385cc <msdos_dir_is_empty+0x148><== NOT EXECUTED
385bc: e59f300c ldr r3, [pc, #12] ; 385d0 <msdos_dir_is_empty+0x14c><== NOT EXECUTED
385c0: ebffc194 bl 28c18 <__assert_func> <== NOT EXECUTED
00042e18 <msdos_dir_lseek>:
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
switch (whence)
42e18: e3530001 cmp r3, #1 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
42e1c: e92d4010 push {r4, lr} <== NOT EXECUTED
switch (whence)
42e20: 93a03000 movls r3, #0 <== NOT EXECUTED
42e24: 93a04000 movls r4, #0 <== NOT EXECUTED
42e28: 9a000004 bls 42e40 <msdos_dir_lseek+0x28> <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
42e2c: eb000603 bl 44640 <__errno> <== NOT EXECUTED
42e30: e3a03016 mov r3, #22 <== NOT EXECUTED
42e34: e5803000 str r3, [r0] <== NOT EXECUTED
42e38: e3e04000 mvn r4, #0 <== NOT EXECUTED
42e3c: e3e03000 mvn r3, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
42e40: e1a01004 mov r1, r4 <== NOT EXECUTED
42e44: e1a00003 mov r0, r3 <== NOT EXECUTED
42e48: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000436c4 <msdos_dir_open>:
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
436c4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
436c8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
436cc: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
436d0: e3a01000 mov r1, #0 <== NOT EXECUTED
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
436d4: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
436d8: e1a02001 mov r2, r1 <== NOT EXECUTED
436dc: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
436e0: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
436e4: ebff2376 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
436e8: e3500000 cmp r0, #0 <== NOT EXECUTED
436ec: 1a00000a bne 4371c <msdos_dir_open+0x58> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
436f0: e1a00006 mov r0, r6 <== NOT EXECUTED
436f4: ebff86d1 bl 25240 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
436f8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
436fc: 03a02000 moveq r2, #0 <== NOT EXECUTED
43700: 03a03000 moveq r3, #0 <== NOT EXECUTED
43704: 0584200c streq r2, [r4, #12] <== NOT EXECUTED
43708: 05843010 streq r3, [r4, #16] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
4370c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
43710: ebff23b3 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
43714: e1a00006 mov r0, r6 <== NOT EXECUTED
43718: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
4371c: eb0003c7 bl 44640 <__errno> <== NOT EXECUTED
43720: e3a03005 mov r3, #5 <== NOT EXECUTED
43724: e5803000 str r3, [r0] <== NOT EXECUTED
43728: e3e06000 mvn r6, #0 <== NOT EXECUTED
4372c: eafffff8 b 43714 <msdos_dir_open+0x50> <== NOT EXECUTED
0004304c <msdos_dir_read>:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
4304c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
43050: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
43054: e24dde16 sub sp, sp, #352 ; 0x160 <== NOT EXECUTED
43058: e1a0a000 mov sl, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
4305c: e58d3024 str r3, [sp, #36] ; 0x24 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
43060: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
43064: e59a3028 ldr r3, [sl, #40] ; 0x28 <== NOT EXECUTED
43068: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
4306c: e3500001 cmp r0, #1 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
43070: e58d102c str r1, [sp, #44] ; 0x2c <== NOT EXECUTED
43074: e1a04002 mov r4, r2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
43078: e58d300c str r3, [sp, #12] <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
4307c: e28a600c add r6, sl, #12 <== NOT EXECUTED
43080: e8960060 ldm r6, {r5, r6} <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
43084: 0a00011c beq 434fc <msdos_dir_read+0x4b0> <== NOT EXECUTED
43088: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
4308c: e1d330b6 ldrh r3, [r3, #6] <== NOT EXECUTED
43090: e58d3030 str r3, [sp, #48] ; 0x30 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
43094: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
43098: e3a03000 mov r3, #0 <== NOT EXECUTED
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
4309c: e59c0094 ldr r0, [ip, #148] ; 0x94 <== NOT EXECUTED
430a0: e1a01003 mov r1, r3 <== NOT EXECUTED
430a4: e1a02003 mov r2, r3 <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
430a8: e58d3158 str r3, [sp, #344] ; 0x158 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
fat_file_fd_t *tmp_fat_fd = NULL;
430ac: e58d315c str r3, [sp, #348] ; 0x15c <== NOT EXECUTED
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
430b0: ebff2503 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
430b4: e250c000 subs ip, r0, #0 <== NOT EXECUTED
430b8: 1a000160 bne 43640 <msdos_dir_read+0x5f4> <== NOT EXECUTED
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
430bc: e59f2598 ldr r2, [pc, #1432] ; 4365c <msdos_dir_read+0x610><== NOT EXECUTED
430c0: e0831492 umull r1, r3, r2, r4 <== NOT EXECUTED
430c4: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
430c8: e0833203 add r3, r3, r3, lsl #4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
430cc: e1b03203 lsls r3, r3, #4 <== NOT EXECUTED
430d0: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
430d4: 0a00015e beq 43654 <msdos_dir_read+0x608> <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
430d8: e1a01006 mov r1, r6 <== NOT EXECUTED
430dc: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
430e0: e3a03000 mov r3, #0 <== NOT EXECUTED
430e4: e1a00005 mov r0, r5 <== NOT EXECUTED
430e8: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
430ec: eb0066c2 bl 5cbfc <__divdi3> <== NOT EXECUTED
430f0: e59db014 ldr fp, [sp, #20] <== NOT EXECUTED
430f4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
430f8: e28d3038 add r3, sp, #56 ; 0x38 <== NOT EXECUTED
430fc: e2833010 add r3, r3, #16 <== NOT EXECUTED
43100: e592c098 ldr ip, [r2, #152] ; 0x98 <== NOT EXECUTED
43104: e59f8554 ldr r8, [pc, #1364] ; 43660 <msdos_dir_read+0x614><== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
43108: e58db010 str fp, [sp, #16] <== NOT EXECUTED
4310c: e58db008 str fp, [sp, #8] <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
43110: e58d3034 str r3, [sp, #52] ; 0x34 <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
43114: e1a06000 mov r6, r0 <== NOT EXECUTED
43118: e3e09000 mvn r9, #0 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
4311c: e59a0028 ldr r0, [sl, #40] ; 0x28 <== NOT EXECUTED
43120: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
43124: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
43128: e59d3030 ldr r3, [sp, #48] ; 0x30 <== NOT EXECUTED
4312c: e58dc000 str ip, [sp] <== NOT EXECUTED
43130: ebff8a8f bl 25b74 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
43134: e350001f cmp r0, #31 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
43138: e1a07000 mov r7, r0 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
4313c: da00013c ble 43634 <msdos_dir_read+0x5e8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
43140: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
43144: e591c098 ldr ip, [r1, #152] ; 0x98 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
43148: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
4314c: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
43150: e1a0500c mov r5, ip <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
43154: 0a0000c0 beq 4345c <msdos_dir_read+0x410> <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
43158: e3a014b9 mov r1, #-1191182336 ; 0xb9000000 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
4315c: e3e02f46 mvn r2, #280 ; 0x118 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
43160: e1a01b41 asr r1, r1, #22 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
43164: e2422001 sub r2, r2, #1 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
43168: e58d101c str r1, [sp, #28] <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
4316c: e58d2028 str r2, [sp, #40] ; 0x28 <== NOT EXECUTED
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
43170: e3a04000 mov r4, #0 <== NOT EXECUTED
43174: ea000009 b 431a0 <msdos_dir_read+0x154> <== NOT EXECUTED
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
43178: e202203f and r2, r2, #63 ; 0x3f <== NOT EXECUTED
4317c: e352000f cmp r2, #15 <== NOT EXECUTED
43180: 0a00008a beq 433b0 <msdos_dir_read+0x364> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
43184: e2844020 add r4, r4, #32 <== NOT EXECUTED
43188: e1540007 cmp r4, r7 <== NOT EXECUTED
4318c: 2a000066 bcs 4332c <msdos_dir_read+0x2e0> <== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + i;
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
43190: e7dc3004 ldrb r3, [ip, r4] <== NOT EXECUTED
43194: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
43198: e08c5004 add r5, ip, r4 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
4319c: 0a0000ae beq 4345c <msdos_dir_read+0x410> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
431a0: e35300e5 cmp r3, #229 ; 0xe5 <== NOT EXECUTED
431a4: 0afffff6 beq 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
431a8: e5d5200b ldrb r2, [r5, #11] <== NOT EXECUTED
431ac: e3120008 tst r2, #8 <== NOT EXECUTED
431b0: 1afffff0 bne 43178 <msdos_dir_read+0x12c> <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
431b4: e202203f and r2, r2, #63 ; 0x3f <== NOT EXECUTED
431b8: e352000f cmp r2, #15 <== NOT EXECUTED
431bc: 0a00007b beq 433b0 <msdos_dir_read+0x364> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
431c0: e3560000 cmp r6, #0 <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
431c4: 12466001 subne r6, r6, #1 <== NOT EXECUTED
431c8: 13e09000 mvnne r9, #0 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
431cc: 1affffec bne 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
431d0: e59a0028 ldr r0, [sl, #40] ; 0x28 <== NOT EXECUTED
431d4: e28dcf56 add ip, sp, #344 ; 0x158 <== NOT EXECUTED
431d8: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
431dc: e3a02001 mov r2, #1 <== NOT EXECUTED
431e0: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
431e4: e58dc000 str ip, [sp] <== NOT EXECUTED
431e8: ebff88d7 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
431ec: e3500000 cmp r0, #0 <== NOT EXECUTED
431f0: 1a0000e2 bne 43580 <msdos_dir_read+0x534> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
431f4: e59dc158 ldr ip, [sp, #344] ; 0x158 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
431f8: e3e03000 mvn r3, #0 <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
431fc: e59a0028 ldr r0, [sl, #40] ; 0x28 <== NOT EXECUTED
43200: e28d1f52 add r1, sp, #328 ; 0x148 <== NOT EXECUTED
43204: e28d2f57 add r2, sp, #348 ; 0x15c <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
43208: e58d3154 str r3, [sp, #340] ; 0x154 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
4320c: e58dc148 str ip, [sp, #328] ; 0x148 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
43210: e58d3150 str r3, [sp, #336] ; 0x150 <== NOT EXECUTED
dir_pos.sname.ofs = i;
43214: e58d414c str r4, [sp, #332] ; 0x14c <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
43218: ebff8b02 bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
4321c: e3500000 cmp r0, #0 <== NOT EXECUTED
43220: 1a0000f9 bne 4360c <msdos_dir_read+0x5c0> <== NOT EXECUTED
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
tmp_dirent.d_ino = tmp_fat_fd->ino;
43224: e59d315c ldr r3, [sp, #348] ; 0x15c <== NOT EXECUTED
43228: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
4322c: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
43230: e58d3038 str r3, [sp, #56] ; 0x38 <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
43234: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
43238: e3790001 cmn r9, #1 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
4323c: e28d2e16 add r2, sp, #352 ; 0x160 <== NOT EXECUTED
43240: e3a01e11 mov r1, #272 ; 0x110 <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
43244: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
43248: e18210bc strh r1, [r2, ip] <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
4324c: e58d6040 str r6, [sp, #64] ; 0x40 <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
43250: 11a02006 movne r2, r6 <== NOT EXECUTED
43254: 11a03006 movne r3, r6 <== NOT EXECUTED
43258: 11a00006 movne r0, r6 <== NOT EXECUTED
4325c: 1a000002 bne 4326c <msdos_dir_read+0x220> <== NOT EXECUTED
43260: ea000036 b 43340 <msdos_dir_read+0x2f4> <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
43264: e2100001 ands r0, r0, #1 <== NOT EXECUTED
43268: 13a00080 movne r0, #128 ; 0x80 <== NOT EXECUTED
4326c: e7d51003 ldrb r1, [r5, r3] <== NOT EXECUTED
43270: e1a02b82 lsl r2, r2, #23 <== NOT EXECUTED
43274: e0801001 add r1, r0, r1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
43278: e2833001 add r3, r3, #1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
4327c: e0810c22 add r0, r1, r2, lsr #24 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
43280: e353000b cmp r3, #11 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
43284: e20020ff and r2, r0, #255 ; 0xff <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
43288: 1afffff5 bne 43264 <msdos_dir_read+0x218> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
4328c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
43290: e35b0000 cmp fp, #0 <== NOT EXECUTED
43294: 01530002 cmpeq r3, r2 <== NOT EXECUTED
43298: 1a000028 bne 43340 <msdos_dir_read+0x2f4> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
4329c: e59d0034 ldr r0, [sp, #52] ; 0x34 <== NOT EXECUTED
432a0: eb001ff4 bl 4b278 <strlen> <== NOT EXECUTED
432a4: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
432a8: e28d2e16 add r2, sp, #352 ; 0x160 <== NOT EXECUTED
432ac: e18200b1 strh r0, [r2, r1] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
432b0: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
432b4: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
432b8: e28d1038 add r1, sp, #56 ; 0x38 <== NOT EXECUTED
432bc: e083000c add r0, r3, ip <== NOT EXECUTED
432c0: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
432c4: eb00118d bl 47900 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
432c8: e28a300c add r3, sl, #12 <== NOT EXECUTED
432cc: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
432d0: e3a00e11 mov r0, #272 ; 0x110 <== NOT EXECUTED
432d4: e0922000 adds r2, r2, r0 <== NOT EXECUTED
432d8: e3a01000 mov r1, #0 <== NOT EXECUTED
432dc: e0a33001 adc r3, r3, r1 <== NOT EXECUTED
432e0: e58a200c str r2, [sl, #12] <== NOT EXECUTED
432e4: e58a3010 str r3, [sl, #16] <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
432e8: e59a0028 ldr r0, [sl, #40] ; 0x28 <== NOT EXECUTED
432ec: e59d115c ldr r1, [sp, #348] ; 0x15c <== NOT EXECUTED
432f0: ebff8aa2 bl 25d80 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
432f4: e3500000 cmp r0, #0 <== NOT EXECUTED
432f8: 1a0000a0 bne 43580 <msdos_dir_read+0x534> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
432fc: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
43300: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
43304: e2522e11 subs r2, r2, #272 ; 0x110 <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
43308: e2833e11 add r3, r3, #272 ; 0x110 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
4330c: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
43310: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
43314: 0a0000b5 beq 435f0 <msdos_dir_read+0x5a4> <== NOT EXECUTED
43318: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
4331c: e2844020 add r4, r4, #32 <== NOT EXECUTED
43320: e1540007 cmp r4, r7 <== NOT EXECUTED
43324: e591c098 ldr ip, [r1, #152] ; 0x98 <== NOT EXECUTED
43328: 3affff98 bcc 43190 <msdos_dir_read+0x144> <== NOT EXECUTED
4332c: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
43330: e59d3030 ldr r3, [sp, #48] ; 0x30 <== NOT EXECUTED
43334: e0822003 add r2, r2, r3 <== NOT EXECUTED
43338: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
4333c: eaffff76 b 4311c <msdos_dir_read+0xd0> <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
43340: e3a03007 mov r3, #7 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
43344: e7d52003 ldrb r2, [r5, r3] <== NOT EXECUTED
43348: e3520020 cmp r2, #32 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
4334c: e2839001 add r9, r3, #1 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
43350: 1a000074 bne 43528 <msdos_dir_read+0x4dc> <== NOT EXECUTED
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
43354: e1a09003 mov r9, r3 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
43358: e2533001 subs r3, r3, #1 <== NOT EXECUTED
4335c: 2afffff8 bcs 43344 <msdos_dir_read+0x2f8> <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
43360: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
43364: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED
43368: e3530020 cmp r3, #32 <== NOT EXECUTED
4336c: 13a00003 movne r0, #3 <== NOT EXECUTED
43370: 1a00008a bne 435a0 <msdos_dir_read+0x554> <== NOT EXECUTED
43374: e5d53009 ldrb r3, [r5, #9] <== NOT EXECUTED
43378: e3530020 cmp r3, #32 <== NOT EXECUTED
4337c: 13a00002 movne r0, #2 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
43380: e2853009 add r3, r5, #9 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
43384: 1a000085 bne 435a0 <msdos_dir_read+0x554> <== NOT EXECUTED
43388: e5533001 ldrb r3, [r3, #-1] <== NOT EXECUTED
4338c: e3530020 cmp r3, #32 <== NOT EXECUTED
43390: 1a000081 bne 4359c <msdos_dir_read+0x550> <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
43394: e3a03000 mov r3, #0 <== NOT EXECUTED
43398: e5c23000 strb r3, [r2] <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
4339c: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
433a0: e28d2e16 add r2, sp, #352 ; 0x160 <== NOT EXECUTED
433a4: e18290b1 strh r9, [r2, r1] <== NOT EXECUTED
433a8: e3e09000 mvn r9, #0 <== NOT EXECUTED
433ac: eaffffbf b 432b0 <msdos_dir_read+0x264> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
433b0: e3790001 cmn r9, #1 <== NOT EXECUTED
433b4: 0a00000c beq 433ec <msdos_dir_read+0x3a0> <== NOT EXECUTED
433b8: e1a0c00b mov ip, fp <== NOT EXECUTED
433bc: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
433c0: e203b03f and fp, r3, #63 ; 0x3f <== NOT EXECUTED
433c4: e15b000c cmp fp, ip <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
433c8: e58d1020 str r1, [sp, #32] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
433cc: 0a000018 beq 43434 <msdos_dir_read+0x3e8> <== NOT EXECUTED
433d0: e1a0b00c mov fp, ip <== NOT EXECUTED
433d4: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
433d8: e59dc020 ldr ip, [sp, #32] <== NOT EXECUTED
433dc: e3e09000 mvn r9, #0 <== NOT EXECUTED
433e0: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
433e4: e591c098 ldr ip, [r1, #152] ; 0x98 <== NOT EXECUTED
433e8: eaffff65 b 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
433ec: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
433f0: 0affff63 beq 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
433f4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
433f8: e203c03f and ip, r3, #63 ; 0x3f <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
433fc: e5d5300d ldrb r3, [r5, #13] <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
43400: e0829004 add r9, r2, r4 <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
43404: e59d0034 ldr r0, [sp, #52] ; 0x34 <== NOT EXECUTED
43408: e3a01000 mov r1, #0 <== NOT EXECUTED
4340c: e3a02c01 mov r2, #256 ; 0x100 <== NOT EXECUTED
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
43410: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
43414: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
43418: eb0011bf bl 47b1c <memset> <== NOT EXECUTED
4341c: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
43420: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
43424: e203b03f and fp, r3, #63 ; 0x3f <== NOT EXECUTED
43428: e15b000c cmp fp, ip <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
4342c: e1a092a9 lsr r9, r9, #5 <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
43430: 1affffe6 bne 433d0 <msdos_dir_read+0x384> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
43434: e5d5200d ldrb r2, [r5, #13] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
43438: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
4343c: e1520003 cmp r2, r3 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
43440: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
43444: 0a00000d beq 43480 <msdos_dir_read+0x434> <== NOT EXECUTED
43448: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
4344c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
43450: e3e09000 mvn r9, #0 <== NOT EXECUTED
43454: e591c098 ldr ip, [r1, #152] ; 0x98 <== NOT EXECUTED
43458: eaffff49 b 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
4345c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
43460: e5930094 ldr r0, [r3, #148] ; 0x94 <== NOT EXECUTED
return cmpltd;
43464: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
43468: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
4346c: ebff245c bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
43470: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
43474: e1a00003 mov r0, r3 <== NOT EXECUTED
43478: e28dde16 add sp, sp, #352 ; 0x160 <== NOT EXECUTED
4347c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
43480: e24cb001 sub fp, ip, #1 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
43484: e08b308b add r3, fp, fp, lsl #1 <== NOT EXECUTED
43488: e08b3103 add r3, fp, r3, lsl #2 <== NOT EXECUTED
4348c: e28d2038 add r2, sp, #56 ; 0x38 <== NOT EXECUTED
43490: e2831010 add r1, r3, #16 <== NOT EXECUTED
43494: e0821001 add r1, r2, r1 <== NOT EXECUTED
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
43498: e2855001 add r5, r5, #1 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
4349c: e3a02001 mov r2, #1 <== NOT EXECUTED
434a0: ea000006 b 434c0 <msdos_dir_read+0x474> <== NOT EXECUTED
tmp_dirent.d_name[o++] = *p;
if (*p == '\0')
break;
switch (q)
434a4: e350000a cmp r0, #10 <== NOT EXECUTED
434a8: 0a000011 beq 434f4 <msdos_dir_read+0x4a8> <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
434ac: e352000c cmp r2, #12 <== NOT EXECUTED
434b0: ca00002f bgt 43574 <msdos_dir_read+0x528> <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
434b4: e2855002 add r5, r5, #2 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
434b8: e2822001 add r2, r2, #1 <== NOT EXECUTED
434bc: e2811001 add r1, r1, #1 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
434c0: e35300fe cmp r3, #254 ; 0xfe <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
434c4: e2420001 sub r0, r2, #1 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
break;
tmp_dirent.d_name[o++] = *p;
434c8: e2833001 add r3, r3, #1 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
434cc: 8a000055 bhi 43628 <msdos_dir_read+0x5dc> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
434d0: e5d5c000 ldrb ip, [r5] <== NOT EXECUTED
434d4: e5c1c000 strb ip, [r1] <== NOT EXECUTED
if (*p == '\0')
434d8: e5d5c000 ldrb ip, [r5] <== NOT EXECUTED
434dc: e35c0000 cmp ip, #0 <== NOT EXECUTED
434e0: 0affff8c beq 43318 <msdos_dir_read+0x2cc> <== NOT EXECUTED
break;
switch (q)
434e4: e3500004 cmp r0, #4 <== NOT EXECUTED
434e8: 1affffed bne 434a4 <msdos_dir_read+0x458> <== NOT EXECUTED
{
case 4:
p += 5;
434ec: e2855005 add r5, r5, #5 <== NOT EXECUTED
break;
434f0: eafffff0 b 434b8 <msdos_dir_read+0x46c> <== NOT EXECUTED
case 10:
p += 4;
434f4: e2855004 add r5, r5, #4 <== NOT EXECUTED
break;
434f8: eaffffee b 434b8 <msdos_dir_read+0x46c> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
434fc: e59dc024 ldr ip, [sp, #36] ; 0x24 <== NOT EXECUTED
43500: e59c3024 ldr r3, [ip, #36] ; 0x24 <== NOT EXECUTED
43504: e3530000 cmp r3, #0 <== NOT EXECUTED
43508: 1afffede bne 43088 <msdos_dir_read+0x3c> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
4350c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
43510: e5d1300a ldrb r3, [r1, #10] <== NOT EXECUTED
43514: e3130003 tst r3, #3 <== NOT EXECUTED
43518: 0afffeda beq 43088 <msdos_dir_read+0x3c> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
4351c: e59c2018 ldr r2, [ip, #24] <== NOT EXECUTED
43520: e58d2030 str r2, [sp, #48] ; 0x30 <== NOT EXECUTED
43524: eafffeda b 43094 <msdos_dir_read+0x48> <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
43528: e3590000 cmp r9, #0 <== NOT EXECUTED
4352c: daffff8b ble 43360 <msdos_dir_read+0x314> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
43530: e28dc038 add ip, sp, #56 ; 0x38 <== NOT EXECUTED
43534: e28c1011 add r1, ip, #17 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
43538: e3a03000 mov r3, #0 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
4353c: e7d52003 ldrb r2, [r5, r3] <== NOT EXECUTED
43540: e5980000 ldr r0, [r8] <== NOT EXECUTED
43544: e0800002 add r0, r0, r2 <== NOT EXECUTED
43548: e5d00001 ldrb r0, [r0, #1] <== NOT EXECUTED
4354c: e2000003 and r0, r0, #3 <== NOT EXECUTED
43550: e3500001 cmp r0, #1 <== NOT EXECUTED
43554: e2833001 add r3, r3, #1 <== NOT EXECUTED
43558: 02822020 addeq r2, r2, #32 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
4355c: e1530009 cmp r3, r9 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
43560: e5412001 strb r2, [r1, #-1] <== NOT EXECUTED
43564: e1a02001 mov r2, r1 <== NOT EXECUTED
43568: e2811001 add r1, r1, #1 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
4356c: 1afffff2 bne 4353c <msdos_dir_read+0x4f0> <== NOT EXECUTED
43570: eaffff7b b 43364 <msdos_dir_read+0x318> <== NOT EXECUTED
43574: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
43578: e592c098 ldr ip, [r2, #152] ; 0x98 <== NOT EXECUTED
4357c: eaffff00 b 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
43580: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
43584: e1a03000 mov r3, r0 <== NOT EXECUTED
43588: e5910094 ldr r0, [r1, #148] ; 0x94 <== NOT EXECUTED
4358c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
43590: ebff2413 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
43594: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
43598: eaffffb5 b 43474 <msdos_dir_read+0x428> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
4359c: e3a00001 mov r0, #1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
435a0: e1a0e002 mov lr, r2 <== NOT EXECUTED
435a4: e3a0302e mov r3, #46 ; 0x2e <== NOT EXECUTED
len += i + 1; /* extension + dot */
435a8: e2899001 add r9, r9, #1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
435ac: e4ce3001 strb r3, [lr], #1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
435b0: e0899000 add r9, r9, r0 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
435b4: e085c000 add ip, r5, r0 <== NOT EXECUTED
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
435b8: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED
435bc: e5981000 ldr r1, [r8] <== NOT EXECUTED
435c0: e0811003 add r1, r1, r3 <== NOT EXECUTED
435c4: e5d11001 ldrb r1, [r1, #1] <== NOT EXECUTED
435c8: e2011003 and r1, r1, #3 <== NOT EXECUTED
435cc: e3510001 cmp r1, #1 <== NOT EXECUTED
435d0: e2855001 add r5, r5, #1 <== NOT EXECUTED
435d4: 02833020 addeq r3, r3, #32 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
435d8: e155000c cmp r5, ip <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
435dc: e5e23001 strb r3, [r2, #1]! <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
435e0: 1afffff4 bne 435b8 <msdos_dir_read+0x56c> <== NOT EXECUTED
435e4: e0899000 add r9, r9, r0 <== NOT EXECUTED
435e8: e08e2000 add r2, lr, r0 <== NOT EXECUTED
435ec: eaffff68 b 43394 <msdos_dir_read+0x348> <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
435f0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
435f4: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
435f8: e59c0094 ldr r0, [ip, #148] ; 0x94 <== NOT EXECUTED
435fc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
43600: ebff23f7 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
43604: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
return cmpltd;
43608: eaffff99 b 43474 <msdos_dir_read+0x428> <== NOT EXECUTED
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
4360c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
43610: e1a03000 mov r3, r0 <== NOT EXECUTED
43614: e5920094 ldr r0, [r2, #148] ; 0x94 <== NOT EXECUTED
43618: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
4361c: ebff23f0 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
43620: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
43624: eaffff92 b 43474 <msdos_dir_read+0x428> <== NOT EXECUTED
43628: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
4362c: e593c098 ldr ip, [r3, #152] ; 0x98 <== NOT EXECUTED
43630: eafffed3 b 43184 <msdos_dir_read+0x138> <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
43634: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
43638: e5920094 ldr r0, [r2, #148] ; 0x94 <== NOT EXECUTED
4363c: ebff23e8 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
43640: eb0003fe bl 44640 <__errno> <== NOT EXECUTED
43644: e3a03005 mov r3, #5 <== NOT EXECUTED
43648: e5803000 str r3, [r0] <== NOT EXECUTED
4364c: e3e03000 mvn r3, #0 <== NOT EXECUTED
43650: eaffff87 b 43474 <msdos_dir_read+0x428> <== NOT EXECUTED
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
43654: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
43658: eaffffe5 b 435f4 <msdos_dir_read+0x5a8> <== NOT EXECUTED
00042ef4 <msdos_dir_rmnod>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
42ef4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
42ef8: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
42efc: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
42f00: e3a03000 mov r3, #0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
42f04: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
42f08: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42f0c: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
42f10: e1a01003 mov r1, r3 <== NOT EXECUTED
42f14: e1a02003 mov r2, r3 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
42f18: e5cd3003 strb r3, [sp, #3] <== NOT EXECUTED
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
42f1c: e5945000 ldr r5, [r4] <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42f20: ebff2567 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
42f24: e3500000 cmp r0, #0 <== NOT EXECUTED
42f28: 1a000023 bne 42fbc <msdos_dir_rmnod+0xc8> <== NOT EXECUTED
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
42f2c: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
42f30: e3530001 cmp r3, #1 <== NOT EXECUTED
42f34: 8a000019 bhi 42fa0 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
42f38: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
42f3c: e1a01005 mov r1, r5 <== NOT EXECUTED
42f40: e28d2003 add r2, sp, #3 <== NOT EXECUTED
42f44: ebffd54e bl 38484 <msdos_dir_is_empty> <== NOT EXECUTED
if (rc != RC_OK)
42f48: e2507000 subs r7, r0, #0 <== NOT EXECUTED
42f4c: 1a00000e bne 42f8c <msdos_dir_rmnod+0x98> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
42f50: e5dd3003 ldrb r3, [sp, #3] <== NOT EXECUTED
42f54: e3530000 cmp r3, #0 <== NOT EXECUTED
42f58: 0a00001c beq 42fd0 <msdos_dir_rmnod+0xdc> <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
42f5c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
42f60: e5943000 ldr r3, [r4] <== NOT EXECUTED
42f64: e590201c ldr r2, [r0, #28] <== NOT EXECUTED
42f68: e1520003 cmp r2, r3 <== NOT EXECUTED
42f6c: 0a00000b beq 42fa0 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
42f70: e2851020 add r1, r5, #32 <== NOT EXECUTED
42f74: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
42f78: ebffd5e4 bl 38710 <msdos_set_first_char4file_name> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
42f7c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
42f80: 05940010 ldreq r0, [r4, #16] <== NOT EXECUTED
42f84: 01a01005 moveq r1, r5 <== NOT EXECUTED
42f88: 0bff895b bleq 254fc <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
42f8c: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
42f90: ebff2593 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
42f94: e1a00007 mov r0, r7 <== NOT EXECUTED
42f98: e28dd004 add sp, sp, #4 <== NOT EXECUTED
42f9c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
{
rtems_semaphore_release(fs_info->vol_sema);
42fa0: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
42fa4: ebff258e bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
42fa8: eb0005a4 bl 44640 <__errno> <== NOT EXECUTED
42fac: e3a03010 mov r3, #16 <== NOT EXECUTED
42fb0: e5803000 str r3, [r0] <== NOT EXECUTED
42fb4: e3e07000 mvn r7, #0 <== NOT EXECUTED
42fb8: eafffff5 b 42f94 <msdos_dir_rmnod+0xa0> <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
42fbc: eb00059f bl 44640 <__errno> <== NOT EXECUTED
42fc0: e3a03005 mov r3, #5 <== NOT EXECUTED
42fc4: e5803000 str r3, [r0] <== NOT EXECUTED
42fc8: e3e07000 mvn r7, #0 <== NOT EXECUTED
42fcc: eafffff0 b 42f94 <msdos_dir_rmnod+0xa0> <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
42fd0: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
42fd4: ebff2582 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
42fd8: eb000598 bl 44640 <__errno> <== NOT EXECUTED
42fdc: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED
42fe0: e5803000 str r3, [r0] <== NOT EXECUTED
42fe4: e3e07000 mvn r7, #0 <== NOT EXECUTED
42fe8: eaffffe9 b 42f94 <msdos_dir_rmnod+0xa0> <== NOT EXECUTED
00042e4c <msdos_dir_stat>:
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
42e4c: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42e50: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
42e54: e5925034 ldr r5, [r2, #52] ; 0x34 <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42e58: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42e5c: e3a01000 mov r1, #0 <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42e60: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42e64: e1a02001 mov r2, r1 <== NOT EXECUTED
42e68: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
42e6c: e5936000 ldr r6, [r3] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42e70: ebff2593 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
42e74: e2507000 subs r7, r0, #0 <== NOT EXECUTED
42e78: 1a000018 bne 42ee0 <msdos_dir_stat+0x94> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
42e7c: e596200c ldr r2, [r6, #12] <== NOT EXECUTED
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
42e80: e3a03c41 mov r3, #16640 ; 0x4100 <== NOT EXECUTED
42e84: e28330ff add r3, r3, #255 ; 0xff <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
42e88: e5842008 str r2, [r4, #8] <== NOT EXECUTED
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
42e8c: e584300c str r3, [r4, #12] <== NOT EXECUTED
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
42e90: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
42e94: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
42e98: e1a014a3 lsr r1, r3, #9 <== NOT EXECUTED
42e9c: e5841044 str r1, [r4, #68] ; 0x44 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
42ea0: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
42ea4: e5962040 ldr r2, [r6, #64] ; 0x40 <== NOT EXECUTED
42ea8: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
42eac: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED
42eb0: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
42eb4: e8840006 stm r4, {r1, r2} <== NOT EXECUTED
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
42eb8: e3a01000 mov r1, #0 <== NOT EXECUTED
42ebc: e3a02000 mov r2, #0 <== NOT EXECUTED
42ec0: e5841018 str r1, [r4, #24] <== NOT EXECUTED
42ec4: e584201c str r2, [r4, #28] <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
42ec8: e5843020 str r3, [r4, #32] <== NOT EXECUTED
42ecc: e5847024 str r7, [r4, #36] ; 0x24 <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
42ed0: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
42ed4: ebff25c2 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
42ed8: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
42edc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
42ee0: eb0005d6 bl 44640 <__errno> <== NOT EXECUTED
42ee4: e3a03005 mov r3, #5 <== NOT EXECUTED
42ee8: e5803000 str r3, [r0] <== NOT EXECUTED
42eec: e3e00000 mvn r0, #0 <== NOT EXECUTED
42ef0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00042fec <msdos_dir_sync>:
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
42fec: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
42ff0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
42ff4: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
42ff8: e3a01000 mov r1, #0 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
42ffc: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
43000: e1a02001 mov r2, r1 <== NOT EXECUTED
43004: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
int
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
43008: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
4300c: ebff252c bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43010: e3500000 cmp r0, #0 <== NOT EXECUTED
43014: 1a000007 bne 43038 <msdos_dir_sync+0x4c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
43018: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
4301c: e1a01006 mov r1, r6 <== NOT EXECUTED
43020: ebff88ed bl 253dc <fat_file_datasync> <== NOT EXECUTED
43024: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
43028: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
4302c: ebff256c bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
43030: e1a00004 mov r0, r4 <== NOT EXECUTED
43034: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
43038: eb000580 bl 44640 <__errno> <== NOT EXECUTED
4303c: e3a03005 mov r3, #5 <== NOT EXECUTED
43040: e5803000 str r3, [r0] <== NOT EXECUTED
43044: e3e04000 mvn r4, #0 <== NOT EXECUTED
43048: eafffff8 b 43030 <msdos_dir_sync+0x44> <== NOT EXECUTED
00036fa4 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
36fa4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
36fa8: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
36fac: e5937034 ldr r7, [r3, #52] ; 0x34 <== NOT EXECUTED
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
36fb0: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
36fb4: e1a04001 mov r4, r1 <== NOT EXECUTED
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
36fb8: e3a01000 mov r1, #0 <== NOT EXECUTED
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
36fbc: e58d2000 str r2, [sp] <== NOT EXECUTED
36fc0: e1a08000 mov r8, r0 <== NOT EXECUTED
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
36fc4: e1a02001 mov r2, r1 <== NOT EXECUTED
36fc8: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
36fcc: ebff553c bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
36fd0: e3500000 cmp r0, #0 <== NOT EXECUTED
36fd4: 1a000092 bne 37224 <msdos_eval4make+0x280> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
36fd8: e5940000 ldr r0, [r4] <== NOT EXECUTED
36fdc: e3500000 cmp r0, #0 <== NOT EXECUTED
36fe0: 0a000069 beq 3718c <msdos_eval4make+0x1e8> <== NOT EXECUTED
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
36fe4: ebffb895 bl 25240 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
36fe8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
36fec: 11a0b005 movne fp, r5 <== NOT EXECUTED
36ff0: 1a00001d bne 3706c <msdos_eval4make+0xc8> <== NOT EXECUTED
36ff4: e1a06005 mov r6, r5 <== NOT EXECUTED
36ff8: e28d9018 add r9, sp, #24 <== NOT EXECUTED
36ffc: e28db01c add fp, sp, #28 <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
37000: e088a006 add sl, r8, r6 <== NOT EXECUTED
37004: e1a0000a mov r0, sl <== NOT EXECUTED
37008: eb00509a bl 4b278 <strlen> <== NOT EXECUTED
3700c: e1a02009 mov r2, r9 <== NOT EXECUTED
37010: e1a01000 mov r1, r0 <== NOT EXECUTED
37014: e1a0300b mov r3, fp <== NOT EXECUTED
37018: e1a0000a mov r0, sl <== NOT EXECUTED
3701c: eb000661 bl 389a8 <msdos_get_token> <== NOT EXECUTED
i += token_len;
fat_fd = pathloc->node_access;
37020: e594c000 ldr ip, [r4] <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
37024: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
fat_fd = pathloc->node_access;
37028: e1a0a00c mov sl, ip <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
3702c: e0866002 add r6, r6, r2 <== NOT EXECUTED
fat_fd = pathloc->node_access;
switch (type)
37030: e3500004 cmp r0, #4 <== NOT EXECUTED
37034: 979ff100 ldrls pc, [pc, r0, lsl #2] <== NOT EXECUTED
37038: eafffff0 b 37000 <msdos_eval4make+0x5c> <== NOT EXECUTED
3703c: 00037178 .word 0x00037178 <== NOT EXECUTED
37040: 00037000 .word 0x00037000 <== NOT EXECUTED
37044: 00037130 .word 0x00037130 <== NOT EXECUTED
37048: 00037084 .word 0x00037084 <== NOT EXECUTED
3704c: 00037050 .word 0x00037050 <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
37050: eb00357a bl 44640 <__errno> <== NOT EXECUTED
37054: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
37058: e5803000 str r3, [r0] <== NOT EXECUTED
3705c: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
37060: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
37064: e1a0100a mov r1, sl <== NOT EXECUTED
37068: ebffbb44 bl 25d80 <fat_file_close> <== NOT EXECUTED
err:
rtems_semaphore_release(fs_info->vol_sema);
3706c: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
37070: ebff555b bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
37074: e1a0500b mov r5, fp <== NOT EXECUTED
return rc;
}
37078: e1a00005 mov r0, r5 <== NOT EXECUTED
3707c: e28dd020 add sp, sp, #32 <== NOT EXECUTED
37080: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
37084: e59c3010 ldr r3, [ip, #16] <== NOT EXECUTED
37088: e3530001 cmp r3, #1 <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
3708c: e1a00004 mov r0, r4 <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
37090: 1a000068 bne 37238 <msdos_eval4make+0x294> <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
37094: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
37098: eb0007ba bl 38f88 <msdos_find_name> <== NOT EXECUTED
if (rc)
3709c: e3500000 cmp r0, #0 <== NOT EXECUTED
370a0: 0affffd6 beq 37000 <msdos_eval4make+0x5c> <== NOT EXECUTED
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
370a4: e3a03c7d mov r3, #32000 ; 0x7d00 <== NOT EXECUTED
370a8: e2833001 add r3, r3, #1 <== NOT EXECUTED
370ac: e1500003 cmp r0, r3 <== NOT EXECUTED
370b0: 1a000019 bne 3711c <msdos_eval4make+0x178> <== NOT EXECUTED
break;
}
}
*name = &path[i - token_len];
370b4: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
370b8: e59d2000 ldr r2, [sp] <== NOT EXECUTED
370bc: e0633006 rsb r3, r3, r6 <== NOT EXECUTED
370c0: e0883003 add r3, r8, r3 <== NOT EXECUTED
370c4: e5823000 str r3, [r2] <== NOT EXECUTED
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
370c8: e7d80006 ldrb r0, [r8, r6] <== NOT EXECUTED
370cc: e3500000 cmp r0, #0 <== NOT EXECUTED
370d0: e0886006 add r6, r8, r6 <== NOT EXECUTED
370d4: 1a00000d bne 37110 <msdos_eval4make+0x16c> <== NOT EXECUTED
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
370d8: e594a000 ldr sl, [r4] <== NOT EXECUTED
if (fat_fd->fat_file_type != FAT_DIRECTORY)
370dc: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED
370e0: e3530001 cmp r3, #1 <== NOT EXECUTED
370e4: 1a000053 bne 37238 <msdos_eval4make+0x294> <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
370e8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
370ec: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
370f0: e593308c ldr r3, [r3, #140] ; 0x8c <== NOT EXECUTED
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
370f4: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
370f8: e5843008 str r3, [r4, #8] <== NOT EXECUTED
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
370fc: ebff5538 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
37100: eaffffdc b 37078 <msdos_eval4make+0xd4> <== NOT EXECUTED
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
37104: e5f60001 ldrb r0, [r6, #1]! <== NOT EXECUTED
37108: e3500000 cmp r0, #0 <== NOT EXECUTED
3710c: 0afffff1 beq 370d8 <msdos_eval4make+0x134> <== NOT EXECUTED
{
if (!msdos_is_separator(path[i]))
37110: ebff49a0 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
37114: e3500000 cmp r0, #0 <== NOT EXECUTED
37118: 1afffff9 bne 37104 <msdos_eval4make+0x160> <== NOT EXECUTED
{
errno = ENOENT;
3711c: eb003547 bl 44640 <__errno> <== NOT EXECUTED
37120: e3a03002 mov r3, #2 <== NOT EXECUTED
37124: e5803000 str r3, [r0] <== NOT EXECUTED
37128: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto error;
3712c: eaffffcb b 37060 <msdos_eval4make+0xbc> <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
37130: e59c3010 ldr r3, [ip, #16] <== NOT EXECUTED
37134: e3530001 cmp r3, #1 <== NOT EXECUTED
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
37138: e1a00004 mov r0, r4 <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
3713c: 1a00003d bne 37238 <msdos_eval4make+0x294> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
37140: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
37144: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
37148: e15c0003 cmp ip, r3 <== NOT EXECUTED
3714c: 0a000013 beq 371a0 <msdos_eval4make+0x1fc> <== NOT EXECUTED
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
37150: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
37154: eb00078b bl 38f88 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
37158: e3500000 cmp r0, #0 <== NOT EXECUTED
3715c: 0affffa7 beq 37000 <msdos_eval4make+0x5c> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
37160: e3a03c7d mov r3, #32000 ; 0x7d00 <== NOT EXECUTED
37164: e2833001 add r3, r3, #1 <== NOT EXECUTED
37168: e1500003 cmp r0, r3 <== NOT EXECUTED
3716c: e1a0b000 mov fp, r0 <== NOT EXECUTED
37170: 1affffba bne 37060 <msdos_eval4make+0xbc> <== NOT EXECUTED
37174: eaffffe8 b 3711c <msdos_eval4make+0x178> <== NOT EXECUTED
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
37178: eb003530 bl 44640 <__errno> <== NOT EXECUTED
3717c: e3a03011 mov r3, #17 <== NOT EXECUTED
37180: e5803000 str r3, [r0] <== NOT EXECUTED
37184: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto error;
37188: eaffffb4 b 37060 <msdos_eval4make+0xbc> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
3718c: eb00352b bl 44640 <__errno> <== NOT EXECUTED
37190: e3a03002 mov r3, #2 <== NOT EXECUTED
37194: e5803000 str r3, [r0] <== NOT EXECUTED
37198: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto err;
3719c: eaffffb2 b 3706c <msdos_eval4make+0xc8> <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
371a0: e59f20a4 ldr r2, [pc, #164] ; 3724c <msdos_eval4make+0x2a8><== NOT EXECUTED
371a4: e5923000 ldr r3, [r2] <== NOT EXECUTED
371a8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
371ac: e15c0003 cmp ip, r3 <== NOT EXECUTED
371b0: 0affff92 beq 37000 <msdos_eval4make+0x5c> <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
371b4: e281a008 add sl, r1, #8 <== NOT EXECUTED
371b8: e8ba000f ldm sl!, {r0, r1, r2, r3} <== NOT EXECUTED
371bc: e28d5004 add r5, sp, #4 <== NOT EXECUTED
371c0: e8a5000f stmia r5!, {r0, r1, r2, r3} <== NOT EXECUTED
*pathloc = newloc;
371c4: e28de004 add lr, sp, #4 <== NOT EXECUTED
371c8: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
371cc: e59ae000 ldr lr, [sl] <== NOT EXECUTED
*pathloc = newloc;
371d0: e1a0a004 mov sl, r4 <== NOT EXECUTED
371d4: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
371d8: e1a0000e mov r0, lr <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
371dc: e58ae000 str lr, [sl] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
371e0: e1a0100c mov r1, ip <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
371e4: e585e000 str lr, [r5] <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
371e8: ebffbae4 bl 25d80 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
371ec: e250b000 subs fp, r0, #0 <== NOT EXECUTED
371f0: 1affff9d bne 3706c <msdos_eval4make+0xc8> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
371f4: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
371f8: ebff54f9 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
371fc: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
37200: e0600006 rsb r0, r0, r6 <== NOT EXECUTED
37204: e0880000 add r0, r8, r0 <== NOT EXECUTED
37208: e1a01004 mov r1, r4 <== NOT EXECUTED
3720c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
37210: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
37214: e1a0e00f mov lr, pc <== NOT EXECUTED
37218: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
3721c: e1a05000 mov r5, r0 <== NOT EXECUTED
37220: eaffff94 b 37078 <msdos_eval4make+0xd4> <== NOT EXECUTED
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
37224: eb003505 bl 44640 <__errno> <== NOT EXECUTED
37228: e3a03005 mov r3, #5 <== NOT EXECUTED
3722c: e5803000 str r3, [r0] <== NOT EXECUTED
37230: e3e05000 mvn r5, #0 <== NOT EXECUTED
37234: eaffff8f b 37078 <msdos_eval4make+0xd4> <== NOT EXECUTED
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
37238: eb003500 bl 44640 <__errno> <== NOT EXECUTED
3723c: e3a03014 mov r3, #20 <== NOT EXECUTED
37240: e5803000 str r3, [r0] <== NOT EXECUTED
37244: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto error;
37248: eaffff84 b 37060 <msdos_eval4make+0xbc> <== NOT EXECUTED
00036d2c <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
36d2c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
36d30: e1a04003 mov r4, r3 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
36d34: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
36d38: e5939034 ldr r9, [r3, #52] ; 0x34 <== NOT EXECUTED
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
36d3c: e24dd024 sub sp, sp, #36 ; 0x24 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
36d40: e3a03000 mov r3, #0 <== NOT EXECUTED
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
36d44: e88d0005 stm sp, {r0, r2} <== NOT EXECUTED
36d48: e1a05001 mov r5, r1 <== NOT EXECUTED
int i = 0;
int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
36d4c: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
36d50: e1a01003 mov r1, r3 <== NOT EXECUTED
36d54: e1a02003 mov r2, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
36d58: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
36d5c: ebff55d8 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
36d60: e3500000 cmp r0, #0 <== NOT EXECUTED
36d64: 1a000083 bne 36f78 <msdos_eval_path+0x24c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
36d68: e5940000 ldr r0, [r4] <== NOT EXECUTED
36d6c: e3500000 cmp r0, #0 <== NOT EXECUTED
36d70: 0a000058 beq 36ed8 <msdos_eval_path+0x1ac> <== NOT EXECUTED
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
36d74: ebffb931 bl 25240 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
36d78: e2508000 subs r8, r0, #0 <== NOT EXECUTED
36d7c: 11a0b008 movne fp, r8 <== NOT EXECUTED
36d80: 1a000027 bne 36e24 <msdos_eval_path+0xf8> <== NOT EXECUTED
36d84: e1a06008 mov r6, r8 <== NOT EXECUTED
36d88: e28db020 add fp, sp, #32 <== NOT EXECUTED
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
36d8c: e59dc000 ldr ip, [sp] <== NOT EXECUTED
36d90: e1a01005 mov r1, r5 <== NOT EXECUTED
36d94: e28d201c add r2, sp, #28 <== NOT EXECUTED
36d98: e08c0006 add r0, ip, r6 <== NOT EXECUTED
36d9c: e1a0300b mov r3, fp <== NOT EXECUTED
36da0: eb000700 bl 389a8 <msdos_get_token> <== NOT EXECUTED
pathnamelen -= token_len;
36da4: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
36da8: e3500003 cmp r0, #3 <== NOT EXECUTED
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
36dac: e1a0a000 mov sl, r0 <== NOT EXECUTED
pathnamelen -= token_len;
36db0: e0625005 rsb r5, r2, r5 <== NOT EXECUTED
i += token_len;
36db4: e0866002 add r6, r6, r2 <== NOT EXECUTED
fat_fd = pathloc->node_access;
36db8: e5947000 ldr r7, [r4] <== NOT EXECUTED
switch (type)
36dbc: 0a00001e beq 36e3c <msdos_eval_path+0x110> <== NOT EXECUTED
36dc0: e3500004 cmp r0, #4 <== NOT EXECUTED
36dc4: 0a00000f beq 36e08 <msdos_eval_path+0xdc> <== NOT EXECUTED
36dc8: e3500002 cmp r0, #2 <== NOT EXECUTED
36dcc: 0a00002c beq 36e84 <msdos_eval_path+0x158> <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
36dd0: e3500000 cmp r0, #0 <== NOT EXECUTED
36dd4: 13500004 cmpne r0, #4 <== NOT EXECUTED
36dd8: 1affffeb bne 36d8c <msdos_eval_path+0x60> <== NOT EXECUTED
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
36ddc: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
36de0: e5972010 ldr r2, [r7, #16] <== NOT EXECUTED
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
36de4: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
36de8: e3520001 cmp r2, #1 <== NOT EXECUTED
loc->handlers = fs_info->directory_handlers;
36dec: 0593308c ldreq r3, [r3, #140] ; 0x8c <== NOT EXECUTED
else
loc->handlers = fs_info->file_handlers;
36df0: 15933090 ldrne r3, [r3, #144] ; 0x90 <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
36df4: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
else
loc->handlers = fs_info->file_handlers;
36df8: 15843008 strne r3, [r4, #8] <== NOT EXECUTED
*/
fat_fd = pathloc->node_access;
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
36dfc: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
36e00: ebff55f7 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
36e04: ea000009 b 36e30 <msdos_eval_path+0x104> <== NOT EXECUTED
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
36e08: eb00360c bl 44640 <__errno> <== NOT EXECUTED
36e0c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
36e10: e5803000 str r3, [r0] <== NOT EXECUTED
36e14: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
36e18: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
36e1c: e1a01007 mov r1, r7 <== NOT EXECUTED
36e20: ebffbbd6 bl 25d80 <fat_file_close> <== NOT EXECUTED
err:
rtems_semaphore_release(fs_info->vol_sema);
36e24: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
36e28: ebff55ed bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
36e2c: e1a0800b mov r8, fp <== NOT EXECUTED
return rc;
}
36e30: e1a00008 mov r0, r8 <== NOT EXECUTED
36e34: e28dd024 add sp, sp, #36 ; 0x24 <== NOT EXECUTED
36e38: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
36e3c: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
36e40: e3530001 cmp r3, #1 <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
36e44: e1a00004 mov r0, r4 <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
36e48: 1a00004f bne 36f8c <msdos_eval_path+0x260> <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
36e4c: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
36e50: eb00084c bl 38f88 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
36e54: e3500000 cmp r0, #0 <== NOT EXECUTED
36e58: 0affffcb beq 36d8c <msdos_eval_path+0x60> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
36e5c: e3a03c7d mov r3, #32000 ; 0x7d00 <== NOT EXECUTED
36e60: e2833001 add r3, r3, #1 <== NOT EXECUTED
36e64: e1500003 cmp r0, r3 <== NOT EXECUTED
36e68: e1a0b000 mov fp, r0 <== NOT EXECUTED
36e6c: 1affffe9 bne 36e18 <msdos_eval_path+0xec> <== NOT EXECUTED
{
errno = ENOENT;
36e70: eb0035f2 bl 44640 <__errno> <== NOT EXECUTED
36e74: e3a03002 mov r3, #2 <== NOT EXECUTED
36e78: e5803000 str r3, [r0] <== NOT EXECUTED
36e7c: e3e0b000 mvn fp, #0 <== NOT EXECUTED
36e80: eaffffe4 b 36e18 <msdos_eval_path+0xec> <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
36e84: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
36e88: e3530001 cmp r3, #1 <== NOT EXECUTED
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
36e8c: e1a00004 mov r0, r4 <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
36e90: 1a00003d bne 36f8c <msdos_eval_path+0x260> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
36e94: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
36e98: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
36e9c: e1570003 cmp r7, r3 <== NOT EXECUTED
36ea0: 0a000011 beq 36eec <msdos_eval_path+0x1c0> <== NOT EXECUTED
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
36ea4: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
36ea8: eb000836 bl 38f88 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
36eac: e3500000 cmp r0, #0 <== NOT EXECUTED
36eb0: 0affffb5 beq 36d8c <msdos_eval_path+0x60> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
36eb4: e3a03c7d mov r3, #32000 ; 0x7d00 <== NOT EXECUTED
36eb8: e2833001 add r3, r3, #1 <== NOT EXECUTED
36ebc: e1500003 cmp r0, r3 <== NOT EXECUTED
36ec0: e1a0b000 mov fp, r0 <== NOT EXECUTED
36ec4: 1affffd3 bne 36e18 <msdos_eval_path+0xec> <== NOT EXECUTED
{
errno = ENOENT;
36ec8: eb0035dc bl 44640 <__errno> <== NOT EXECUTED
36ecc: e3e0b000 mvn fp, #0 <== NOT EXECUTED
36ed0: e580a000 str sl, [r0] <== NOT EXECUTED
36ed4: eaffffcf b 36e18 <msdos_eval_path+0xec> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
36ed8: eb0035d8 bl 44640 <__errno> <== NOT EXECUTED
36edc: e3a03002 mov r3, #2 <== NOT EXECUTED
36ee0: e5803000 str r3, [r0] <== NOT EXECUTED
36ee4: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto err;
36ee8: eaffffcd b 36e24 <msdos_eval_path+0xf8> <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
36eec: e59f20ac ldr r2, [pc, #172] ; 36fa0 <msdos_eval_path+0x274><== NOT EXECUTED
36ef0: e5923000 ldr r3, [r2] <== NOT EXECUTED
36ef4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
36ef8: e1570003 cmp r7, r3 <== NOT EXECUTED
36efc: 0affffa2 beq 36d8c <msdos_eval_path+0x60> <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
36f00: e2818008 add r8, r1, #8 <== NOT EXECUTED
36f04: e8b8000f ldm r8!, {r0, r1, r2, r3} <== NOT EXECUTED
36f08: e28de008 add lr, sp, #8 <== NOT EXECUTED
36f0c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
*pathloc = newloc;
36f10: e28dc008 add ip, sp, #8 <== NOT EXECUTED
36f14: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
36f18: e598c000 ldr ip, [r8] <== NOT EXECUTED
*pathloc = newloc;
36f1c: e1a08004 mov r8, r4 <== NOT EXECUTED
36f20: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
36f24: e1a0000c mov r0, ip <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
36f28: e588c000 str ip, [r8] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
36f2c: e1a01007 mov r1, r7 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
36f30: e58ec000 str ip, [lr] <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
36f34: ebffbb91 bl 25d80 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
36f38: e250b000 subs fp, r0, #0 <== NOT EXECUTED
36f3c: 1affffb8 bne 36e24 <msdos_eval_path+0xf8> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
36f40: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
36f44: ebff55a6 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
36f48: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
36f4c: e59dc000 ldr ip, [sp] <== NOT EXECUTED
36f50: e0610006 rsb r0, r1, r6 <== NOT EXECUTED
36f54: e08c0000 add r0, ip, r0 <== NOT EXECUTED
36f58: e0851001 add r1, r5, r1 <== NOT EXECUTED
36f5c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
36f60: e1a03004 mov r3, r4 <== NOT EXECUTED
36f64: e594c00c ldr ip, [r4, #12] <== NOT EXECUTED
36f68: e1a0e00f mov lr, pc <== NOT EXECUTED
36f6c: e59cf000 ldr pc, [ip] <== NOT EXECUTED
36f70: e1a08000 mov r8, r0 <== NOT EXECUTED
36f74: eaffffad b 36e30 <msdos_eval_path+0x104> <== NOT EXECUTED
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
36f78: eb0035b0 bl 44640 <__errno> <== NOT EXECUTED
36f7c: e3a03005 mov r3, #5 <== NOT EXECUTED
36f80: e5803000 str r3, [r0] <== NOT EXECUTED
36f84: e3e08000 mvn r8, #0 <== NOT EXECUTED
36f88: eaffffa8 b 36e30 <msdos_eval_path+0x104> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTSUP;
36f8c: eb0035ab bl 44640 <__errno> <== NOT EXECUTED
36f90: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
36f94: e5803000 str r3, [r0] <== NOT EXECUTED
36f98: e3e0b000 mvn fp, #0 <== NOT EXECUTED
rc = -1;
goto error;
36f9c: eaffff9d b 36e18 <msdos_eval_path+0xec> <== NOT EXECUTED
00037258 <msdos_file_chmod>:
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
37258: e3a00000 mov r0, #0 <== NOT EXECUTED
3725c: e12fff1e bx lr <== NOT EXECUTED
0003775c <msdos_file_close>:
int
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
3775c: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
37760: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37764: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37768: e3a01000 mov r1, #0 <== NOT EXECUTED
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
3776c: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37770: e1a02001 mov r2, r1 <== NOT EXECUTED
37774: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
37778: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3777c: ebff5350 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
37780: e3500000 cmp r0, #0 <== NOT EXECUTED
37784: 1a00001a bne 377f4 <msdos_file_close+0x98> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
37788: e5d53030 ldrb r3, [r5, #48] ; 0x30 <== NOT EXECUTED
3778c: e3130001 tst r3, #1 <== NOT EXECUTED
37790: 0a000007 beq 377b4 <msdos_file_close+0x58> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
37794: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37798: e1a01005 mov r1, r5 <== NOT EXECUTED
3779c: ebffb977 bl 25d80 <fat_file_close> <== NOT EXECUTED
377a0: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
377a4: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
377a8: ebff538d bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
377ac: e1a00007 mov r0, r7 <== NOT EXECUTED
377b0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
377b4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
377b8: e1a01005 mov r1, r5 <== NOT EXECUTED
377bc: eb0003a4 bl 38654 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
377c0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
377c4: 1afffff6 bne 377a4 <msdos_file_close+0x48> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
377c8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
377cc: e1a01005 mov r1, r5 <== NOT EXECUTED
377d0: eb00037f bl 385d4 <msdos_set_file_size> <== NOT EXECUTED
if (rc != RC_OK)
377d4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
377d8: 1afffff1 bne 377a4 <msdos_file_close+0x48> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
377dc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
377e0: e1a01005 mov r1, r5 <== NOT EXECUTED
377e4: eb000425 bl 38880 <msdos_set_dir_wrt_time_and_date> <== NOT EXECUTED
if (rc != RC_OK)
377e8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
377ec: 0affffe8 beq 37794 <msdos_file_close+0x38> <== NOT EXECUTED
377f0: eaffffeb b 377a4 <msdos_file_close+0x48> <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
377f4: eb003391 bl 44640 <__errno> <== NOT EXECUTED
377f8: e3a03005 mov r3, #5 <== NOT EXECUTED
377fc: e5803000 str r3, [r0] <== NOT EXECUTED
37800: e3e07000 mvn r7, #0 <== NOT EXECUTED
37804: eaffffe8 b 377ac <msdos_file_close+0x50> <== NOT EXECUTED
00037378 <msdos_file_datasync>:
msdos_file_datasync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37378: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
3737c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37380: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37384: e3a01000 mov r1, #0 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
37388: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3738c: e1a02001 mov r2, r1 <== NOT EXECUTED
37390: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
int
msdos_file_datasync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
37394: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37398: ebff5449 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3739c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
373a0: 1a000006 bne 373c0 <msdos_file_datasync+0x48> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
373a4: e1a01006 mov r1, r6 <== NOT EXECUTED
373a8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
373ac: ebffb80a bl 253dc <fat_file_datasync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
373b0: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
373b4: ebff548a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
373b8: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
373bc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
373c0: eb00349e bl 44640 <__errno> <== NOT EXECUTED
373c4: e3a03005 mov r3, #5 <== NOT EXECUTED
373c8: e5803000 str r3, [r0] <== NOT EXECUTED
373cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
373d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00037494 <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
37494: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37498: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
3749c: e1a06002 mov r6, r2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
374a0: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
if (length >= fat_fd->fat_file_size)
374a4: e3a02000 mov r2, #0 <== NOT EXECUTED
374a8: e1520006 cmp r2, r6 <== NOT EXECUTED
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
374ac: e5938034 ldr r8, [r3, #52] ; 0x34 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
374b0: e1a04000 mov r4, r0 <== NOT EXECUTED
374b4: e1a07001 mov r7, r1 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
if (length >= fat_fd->fat_file_size)
374b8: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
374bc: ca000005 bgt 374d8 <msdos_file_ftruncate+0x44> <== NOT EXECUTED
374c0: 0a000002 beq 374d0 <msdos_file_ftruncate+0x3c> <== NOT EXECUTED
374c4: e3a0a000 mov sl, #0 <== NOT EXECUTED
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
374c8: e1a0000a mov r0, sl <== NOT EXECUTED
374cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
if (length >= fat_fd->fat_file_size)
374d0: e1530001 cmp r3, r1 <== NOT EXECUTED
374d4: 9afffffa bls 374c4 <msdos_file_ftruncate+0x30> <== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
374d8: e3a01000 mov r1, #0 <== NOT EXECUTED
374dc: e5980094 ldr r0, [r8, #148] ; 0x94 <== NOT EXECUTED
374e0: e1a02001 mov r2, r1 <== NOT EXECUTED
374e4: ebff53f6 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
374e8: e3500000 cmp r0, #0 <== NOT EXECUTED
374ec: 1a000013 bne 37540 <msdos_file_ftruncate+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
374f0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
374f4: e1a01005 mov r1, r5 <== NOT EXECUTED
374f8: e1a02007 mov r2, r7 <== NOT EXECUTED
374fc: ebffb84c bl 25634 <fat_file_truncate> <== NOT EXECUTED
if (rc != RC_OK)
37500: e250a000 subs sl, r0, #0 <== NOT EXECUTED
37504: 1a000009 bne 37530 <msdos_file_ftruncate+0x9c> <== NOT EXECUTED
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
37508: e15a0006 cmp sl, r6 <== NOT EXECUTED
3750c: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
37510: ca000002 bgt 37520 <msdos_file_ftruncate+0x8c> <== NOT EXECUTED
37514: 1a000005 bne 37530 <msdos_file_ftruncate+0x9c> <== NOT EXECUTED
37518: e1530007 cmp r3, r7 <== NOT EXECUTED
3751c: 9a000003 bls 37530 <msdos_file_ftruncate+0x9c> <== NOT EXECUTED
iop->size = fat_fd->fat_file_size = length;
37520: e3a03000 mov r3, #0 <== NOT EXECUTED
37524: e5843008 str r3, [r4, #8] <== NOT EXECUTED
37528: e5857018 str r7, [r5, #24] <== NOT EXECUTED
3752c: e5847004 str r7, [r4, #4] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
37530: e5980094 ldr r0, [r8, #148] ; 0x94 <== NOT EXECUTED
37534: ebff542a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
37538: e1a0000a mov r0, sl <== NOT EXECUTED
3753c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
37540: eb00343e bl 44640 <__errno> <== NOT EXECUTED
37544: e3a03005 mov r3, #5 <== NOT EXECUTED
37548: e5803000 str r3, [r0] <== NOT EXECUTED
3754c: e3e0a000 mvn sl, #0 <== NOT EXECUTED
37550: eaffffdc b 374c8 <msdos_file_ftruncate+0x34> <== NOT EXECUTED
00037250 <msdos_file_ioctl>:
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
int rc = RC_OK;
return rc;
}
37250: e3a00000 mov r0, #0 <== NOT EXECUTED
37254: e12fff1e bx lr <== NOT EXECUTED
00037554 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
37554: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37558: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
3755c: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
uint32_t real_size = 0;
37560: e3a03000 mov r3, #0 <== NOT EXECUTED
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
37564: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
37568: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3756c: e1a01003 mov r1, r3 <== NOT EXECUTED
37570: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
37574: e1a02003 mov r2, r3 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
uint32_t real_size = 0;
37578: e58d3000 str r3, [sp] <== NOT EXECUTED
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
3757c: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37580: ebff53cf bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
37584: e3500000 cmp r0, #0 <== NOT EXECUTED
37588: 1a00001b bne 375fc <msdos_file_lseek+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
3758c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37590: e1a01005 mov r1, r5 <== NOT EXECUTED
37594: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
37598: e1a0300d mov r3, sp <== NOT EXECUTED
3759c: ebffb866 bl 2573c <fat_file_extend> <== NOT EXECUTED
&real_size);
if (rc != RC_OK)
375a0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
375a4: 1a00000f bne 375e8 <msdos_file_lseek+0x94> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
375a8: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED
375ac: e59d3000 ldr r3, [sp] <== NOT EXECUTED
375b0: e1520003 cmp r2, r3 <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
375b4: 31a02003 movcc r2, r3 <== NOT EXECUTED
375b8: 35852018 strcc r2, [r5, #24] <== NOT EXECUTED
375bc: 3584200c strcc r2, [r4, #12] <== NOT EXECUTED
375c0: 35847010 strcc r7, [r4, #16] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
375c4: e9840084 stmib r4, {r2, r7} <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
375c8: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
375cc: ebff5404 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return iop->offset;
375d0: e284400c add r4, r4, #12 <== NOT EXECUTED
375d4: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
}
375d8: e1a01004 mov r1, r4 <== NOT EXECUTED
375dc: e1a00003 mov r0, r3 <== NOT EXECUTED
375e0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
375e4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
375e8: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
375ec: ebff53fc bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
375f0: e1a03007 mov r3, r7 <== NOT EXECUTED
375f4: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
375f8: eafffff6 b 375d8 <msdos_file_lseek+0x84> <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
375fc: eb00340f bl 44640 <__errno> <== NOT EXECUTED
37600: e3a03005 mov r3, #5 <== NOT EXECUTED
37604: e5803000 str r3, [r0] <== NOT EXECUTED
37608: e3e04000 mvn r4, #0 <== NOT EXECUTED
3760c: e3e03000 mvn r3, #0 <== NOT EXECUTED
37610: eafffff0 b 375d8 <msdos_file_lseek+0x84> <== NOT EXECUTED
00037808 <msdos_file_open>:
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37808: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
3780c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37810: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37814: e3a01000 mov r1, #0 <== NOT EXECUTED
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
37818: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3781c: e1a02001 mov r2, r1 <== NOT EXECUTED
37820: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
37824: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37828: ebff5325 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3782c: e3500000 cmp r0, #0 <== NOT EXECUTED
37830: 1a000011 bne 3787c <msdos_file_open+0x74> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
37834: e1a00006 mov r0, r6 <== NOT EXECUTED
37838: ebffb680 bl 25240 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
3783c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37840: 1a000009 bne 3786c <msdos_file_open+0x64> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
37844: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
37848: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
iop->offset = fat_fd->fat_file_size;
3784c: 15963018 ldrne r3, [r6, #24] <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
37850: 05963018 ldreq r3, [r6, #24] <== NOT EXECUTED
37854: 01a02007 moveq r2, r7 <== NOT EXECUTED
iop->offset = fat_fd->fat_file_size;
37858: 11a02007 movne r2, r7 <== NOT EXECUTED
3785c: 15847010 strne r7, [r4, #16] <== NOT EXECUTED
37860: 1584300c strne r3, [r4, #12] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
37864: e5842008 str r2, [r4, #8] <== NOT EXECUTED
37868: e5843004 str r3, [r4, #4] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
3786c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
37870: ebff535b bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
37874: e1a00007 mov r0, r7 <== NOT EXECUTED
37878: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
3787c: eb00336f bl 44640 <__errno> <== NOT EXECUTED
37880: e3a03005 mov r3, #5 <== NOT EXECUTED
37884: e5803000 str r3, [r0] <== NOT EXECUTED
37888: e3e07000 mvn r7, #0 <== NOT EXECUTED
3788c: eafffff8 b 37874 <msdos_file_open+0x6c> <== NOT EXECUTED
000376e0 <msdos_file_read>:
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
376e0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
376e4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
376e8: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
376ec: e1a05001 mov r5, r1 <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
376f0: e3a01000 mov r1, #0 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
376f4: e1a06000 mov r6, r0 <== NOT EXECUTED
376f8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
376fc: e1a07002 mov r7, r2 <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37700: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
37704: e1a02001 mov r2, r1 <== NOT EXECUTED
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
37708: e5968038 ldr r8, [r6, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3770c: ebff536c bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
37710: e3500000 cmp r0, #0 <== NOT EXECUTED
37714: 1a00000b bne 37748 <msdos_file_read+0x68> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
37718: e596200c ldr r2, [r6, #12] <== NOT EXECUTED
3771c: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED
37720: e1a01008 mov r1, r8 <== NOT EXECUTED
37724: e1a03007 mov r3, r7 <== NOT EXECUTED
37728: e58d5000 str r5, [sp] <== NOT EXECUTED
3772c: ebffb910 bl 25b74 <fat_file_read> <== NOT EXECUTED
37730: e1a05000 mov r5, r0 <== NOT EXECUTED
buffer);
rtems_semaphore_release(fs_info->vol_sema);
37734: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
37738: ebff53a9 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
}
3773c: e1a00005 mov r0, r5 <== NOT EXECUTED
37740: e28dd004 add sp, sp, #4 <== NOT EXECUTED
37744: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
37748: eb0033bc bl 44640 <__errno> <== NOT EXECUTED
3774c: e3a03005 mov r3, #5 <== NOT EXECUTED
37750: e5803000 str r3, [r0] <== NOT EXECUTED
37754: e3e05000 mvn r5, #0 <== NOT EXECUTED
37758: eafffff7 b 3773c <msdos_file_read+0x5c> <== NOT EXECUTED
00037308 <msdos_file_rmnod>:
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
37308: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
3730c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
37310: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
37314: e1a04001 mov r4, r1 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37318: e3a01000 mov r1, #0 <== NOT EXECUTED
3731c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
37320: e1a02001 mov r2, r1 <== NOT EXECUTED
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
37324: e5946000 ldr r6, [r4] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37328: ebff5465 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3732c: e3500000 cmp r0, #0 <== NOT EXECUTED
37330: 1a00000b bne 37364 <msdos_file_rmnod+0x5c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
37334: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
37338: e2861020 add r1, r6, #32 <== NOT EXECUTED
3733c: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
37340: eb0004f2 bl 38710 <msdos_set_first_char4file_name> <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
37344: e2507000 subs r7, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
37348: 05940010 ldreq r0, [r4, #16] <== NOT EXECUTED
3734c: 01a01006 moveq r1, r6 <== NOT EXECUTED
37350: 0bffb869 bleq 254fc <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
37354: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
37358: ebff54a1 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
3735c: e1a00007 mov r0, r7 <== NOT EXECUTED
37360: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
37364: eb0034b5 bl 44640 <__errno> <== NOT EXECUTED
37368: e3a03005 mov r3, #5 <== NOT EXECUTED
3736c: e5803000 str r3, [r0] <== NOT EXECUTED
37370: e3e07000 mvn r7, #0 <== NOT EXECUTED
37374: eafffff8 b 3735c <msdos_file_rmnod+0x54> <== NOT EXECUTED
00037260 <msdos_file_stat>:
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
37260: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
37264: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
37268: e5925034 ldr r5, [r2, #52] ; 0x34 <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3726c: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37270: e3a01000 mov r1, #0 <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
37274: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37278: e1a02001 mov r2, r1 <== NOT EXECUTED
3727c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
37280: e5936000 ldr r6, [r3] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37284: ebff548e bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
37288: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3728c: 1a000018 bne 372f4 <msdos_file_stat+0x94> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
37290: e596200c ldr r2, [r6, #12] <== NOT EXECUTED
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
37294: e3a03c82 mov r3, #33280 ; 0x8200 <== NOT EXECUTED
37298: e2433001 sub r3, r3, #1 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
3729c: e5842008 str r2, [r4, #8] <== NOT EXECUTED
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
372a0: e584300c str r3, [r4, #12] <== NOT EXECUTED
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
372a4: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
372a8: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
372ac: e1a014a3 lsr r1, r3, #9 <== NOT EXECUTED
372b0: e5841044 str r1, [r4, #68] ; 0x44 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
372b4: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
372b8: e5962040 ldr r2, [r6, #64] ; 0x40 <== NOT EXECUTED
372bc: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
372c0: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED
372c4: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
372c8: e8840006 stm r4, {r1, r2} <== NOT EXECUTED
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
372cc: e3a01000 mov r1, #0 <== NOT EXECUTED
372d0: e3a02000 mov r2, #0 <== NOT EXECUTED
372d4: e5841018 str r1, [r4, #24] <== NOT EXECUTED
372d8: e584201c str r2, [r4, #28] <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
372dc: e5843020 str r3, [r4, #32] <== NOT EXECUTED
372e0: e5847024 str r7, [r4, #36] ; 0x24 <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
372e4: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
372e8: ebff54bd bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
372ec: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
372f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
372f4: eb0034d1 bl 44640 <__errno> <== NOT EXECUTED
372f8: e3a03005 mov r3, #5 <== NOT EXECUTED
372fc: e5803000 str r3, [r0] <== NOT EXECUTED
37300: e3e00000 mvn r0, #0 <== NOT EXECUTED
37304: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000373d4 <msdos_file_sync>:
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
373d4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
373d8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
373dc: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
373e0: e3a01000 mov r1, #0 <== NOT EXECUTED
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
373e4: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
373e8: e1a02001 mov r2, r1 <== NOT EXECUTED
373ec: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
373f0: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
373f4: ebff5432 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
373f8: e3500000 cmp r0, #0 <== NOT EXECUTED
373fc: 1a00001f bne 37480 <msdos_file_sync+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
37400: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37404: e1a01005 mov r1, r5 <== NOT EXECUTED
37408: ebffb7f3 bl 253dc <fat_file_datasync> <== NOT EXECUTED
if (rc != RC_OK)
3740c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37410: 1a000016 bne 37470 <msdos_file_sync+0x9c> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
37414: e5d53030 ldrb r3, [r5, #48] ; 0x30 <== NOT EXECUTED
37418: e3130001 tst r3, #1 <== NOT EXECUTED
3741c: 1a00000e bne 3745c <msdos_file_sync+0x88> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
37420: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37424: e1a01005 mov r1, r5 <== NOT EXECUTED
37428: eb000489 bl 38654 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
3742c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37430: 1a00000e bne 37470 <msdos_file_sync+0x9c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
37434: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37438: e1a01005 mov r1, r5 <== NOT EXECUTED
3743c: eb000464 bl 385d4 <msdos_set_file_size> <== NOT EXECUTED
if (rc != RC_OK)
37440: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37444: 1a000009 bne 37470 <msdos_file_sync+0x9c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
37448: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
3744c: e1a01005 mov r1, r5 <== NOT EXECUTED
37450: eb00050a bl 38880 <msdos_set_dir_wrt_time_and_date> <== NOT EXECUTED
if (rc != RC_OK)
37454: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37458: 1a000004 bne 37470 <msdos_file_sync+0x9c> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
3745c: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
37460: ebff545f bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
37464: e3a07000 mov r7, #0 <== NOT EXECUTED
return RC_OK;
}
37468: e1a00007 mov r0, r7 <== NOT EXECUTED
3746c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
37470: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
37474: ebff545a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
}
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
37478: e1a00007 mov r0, r7 <== NOT EXECUTED
3747c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
37480: eb00346e bl 44640 <__errno> <== NOT EXECUTED
37484: e3a03005 mov r3, #5 <== NOT EXECUTED
37488: e5803000 str r3, [r0] <== NOT EXECUTED
3748c: e3e07000 mvn r7, #0 <== NOT EXECUTED
37490: eafffff4 b 37468 <msdos_file_sync+0x94> <== NOT EXECUTED
00037614 <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
37614: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
37618: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
3761c: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
37620: e1a07001 mov r7, r1 <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37624: e3a01000 mov r1, #0 <== NOT EXECUTED
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
37628: e1a04000 mov r4, r0 <== NOT EXECUTED
3762c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
37630: e1a0a002 mov sl, r2 <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37634: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
37638: e1a02001 mov r2, r1 <== NOT EXECUTED
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
3763c: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
37640: ebff539f bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
37644: e2508000 subs r8, r0, #0 <== NOT EXECUTED
37648: 1a00001b bne 376bc <msdos_file_write+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
3764c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
37650: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
37654: e1a0300a mov r3, sl <== NOT EXECUTED
37658: e1a01005 mov r1, r5 <== NOT EXECUTED
3765c: e58d7000 str r7, [sp] <== NOT EXECUTED
37660: ebffb8ad bl 2591c <fat_file_write> <== NOT EXECUTED
buffer);
if (ret < 0)
37664: e2507000 subs r7, r0, #0 <== NOT EXECUTED
37668: ba000018 blt 376d0 <msdos_file_write+0xbc> <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
3766c: e284200c add r2, r4, #12 <== NOT EXECUTED
37670: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
37674: e091a007 adds sl, r1, r7 <== NOT EXECUTED
37678: e0a2bfc7 adc fp, r2, r7, asr #31 <== NOT EXECUTED
3767c: e35b0000 cmp fp, #0 <== NOT EXECUTED
37680: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
37684: da000008 ble 376ac <msdos_file_write+0x98> <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset + ret;
37688: e0873001 add r3, r7, r1 <== NOT EXECUTED
3768c: e5853018 str r3, [r5, #24] <== NOT EXECUTED
37690: e3a08000 mov r8, #0 <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
37694: e9840108 stmib r4, {r3, r8} <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
37698: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
3769c: ebff53d0 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
}
376a0: e1a00007 mov r0, r7 <== NOT EXECUTED
376a4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
376a8: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
376ac: 1afffff8 bne 37694 <msdos_file_write+0x80> <== NOT EXECUTED
376b0: e15a0003 cmp sl, r3 <== NOT EXECUTED
376b4: 9afffff6 bls 37694 <msdos_file_write+0x80> <== NOT EXECUTED
376b8: eafffff2 b 37688 <msdos_file_write+0x74> <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
376bc: eb0033df bl 44640 <__errno> <== NOT EXECUTED
376c0: e3a03005 mov r3, #5 <== NOT EXECUTED
376c4: e5803000 str r3, [r0] <== NOT EXECUTED
376c8: e3e07000 mvn r7, #0 <== NOT EXECUTED
376cc: eafffff3 b 376a0 <msdos_file_write+0x8c> <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
376d0: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
376d4: ebff53c2 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
376d8: e3e07000 mvn r7, #0 <== NOT EXECUTED
return -1;
376dc: eaffffef b 376a0 <msdos_file_write+0x8c> <== NOT EXECUTED
00042c30 <msdos_filename_unix2dos>:
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
42c30: e92d0030 push {r4, r5} <== NOT EXECUTED
42c34: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
dn[i] = ' ';
42c38: e3a0c020 mov ip, #32 <== NOT EXECUTED
42c3c: e7c2c003 strb ip, [r2, r3] <== NOT EXECUTED
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
42c40: e2833001 add r3, r3, #1 <== NOT EXECUTED
42c44: e353000b cmp r3, #11 <== NOT EXECUTED
42c48: 1afffffb bne 42c3c <msdos_filename_unix2dos+0xc> <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
42c4c: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
42c50: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
42c54: 13a0c000 movne ip, #0 <== NOT EXECUTED
42c58: 03a0c001 moveq ip, #1 <== NOT EXECUTED
42c5c: e3510001 cmp r1, #1 <== NOT EXECUTED
42c60: 0353002e cmpeq r3, #46 ; 0x2e <== NOT EXECUTED
dn[0] = '.';
42c64: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED
42c68: 05c23000 strbeq r3, [r2] <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
42c6c: 0a000025 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
42c70: e35c0000 cmp ip, #0 <== NOT EXECUTED
42c74: 1a00005c bne 42dec <msdos_filename_unix2dos+0x1bc> <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
42c78: e3510000 cmp r1, #0 <== NOT EXECUTED
42c7c: 0a000021 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
42c80: e35c0000 cmp ip, #0 <== NOT EXECUTED
42c84: 1a000025 bne 42d20 <msdos_filename_unix2dos+0xf0> <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42c88: e3530000 cmp r3, #0 <== NOT EXECUTED
42c8c: 0a000028 beq 42d34 <msdos_filename_unix2dos+0x104> <== NOT EXECUTED
42c90: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
42c94: 0a000026 beq 42d34 <msdos_filename_unix2dos+0x104> <== NOT EXECUTED
if (msdos_map[c] == 0)
42c98: e59f416c ldr r4, [pc, #364] ; 42e0c <msdos_filename_unix2dos+0x1dc><== NOT EXECUTED
42c9c: e7d4c003 ldrb ip, [r4, r3] <== NOT EXECUTED
42ca0: e35c0000 cmp ip, #0 <== NOT EXECUTED
42ca4: 11a05000 movne r5, r0 <== NOT EXECUTED
42ca8: 13a03000 movne r3, #0 <== NOT EXECUTED
42cac: 1a000008 bne 42cd4 <msdos_filename_unix2dos+0xa4> <== NOT EXECUTED
42cb0: ea00001f b 42d34 <msdos_filename_unix2dos+0x104> <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42cb4: e7d0c003 ldrb ip, [r0, r3] <== NOT EXECUTED
42cb8: e35c0000 cmp ip, #0 <== NOT EXECUTED
42cbc: 0a00001b beq 42d30 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
42cc0: e35c002e cmp ip, #46 ; 0x2e <== NOT EXECUTED
42cc4: 0a000019 beq 42d30 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
if (msdos_map[c] == 0)
42cc8: e7d4c00c ldrb ip, [r4, ip] <== NOT EXECUTED
42ccc: e35c0000 cmp ip, #0 <== NOT EXECUTED
42cd0: 0a000016 beq 42d30 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42cd4: e2511001 subs r1, r1, #1 <== NOT EXECUTED
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
42cd8: e7c2c003 strb ip, [r2, r3] <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42cdc: 03a0c000 moveq ip, #0 <== NOT EXECUTED
42ce0: 13a0c001 movne ip, #1 <== NOT EXECUTED
42ce4: e2833001 add r3, r3, #1 <== NOT EXECUTED
42ce8: e3530007 cmp r3, #7 <== NOT EXECUTED
42cec: c3a0c000 movgt ip, #0 <== NOT EXECUTED
42cf0: d20cc001 andle ip, ip, #1 <== NOT EXECUTED
42cf4: e35c0000 cmp ip, #0 <== NOT EXECUTED
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
un++;
42cf8: e2855001 add r5, r5, #1 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42cfc: 1affffec bne 42cb4 <msdos_filename_unix2dos+0x84> <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
42d00: e3510000 cmp r1, #0 <== NOT EXECUTED
42d04: 1a00000b bne 42d38 <msdos_filename_unix2dos+0x108> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
42d08: e3a00000 mov r0, #0 <== NOT EXECUTED
42d0c: e8bd0030 pop {r4, r5} <== NOT EXECUTED
42d10: e12fff1e bx lr <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
42d14: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
42d18: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
42d1c: 1affffd9 bne 42c88 <msdos_filename_unix2dos+0x58> <== NOT EXECUTED
42d20: e2511001 subs r1, r1, #1 <== NOT EXECUTED
un++;
42d24: e2800001 add r0, r0, #1 <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
42d28: 1afffff9 bne 42d14 <msdos_filename_unix2dos+0xe4> <== NOT EXECUTED
42d2c: eafffff5 b 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
42d30: e1a00005 mov r0, r5 <== NOT EXECUTED
42d34: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
42d38: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
42d3c: e3530000 cmp r3, #0 <== NOT EXECUTED
42d40: 0afffff0 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
42d44: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
42d48: e285c001 add ip, r5, #1 <== NOT EXECUTED
unlen--;
42d4c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
42d50: 0a000008 beq 42d78 <msdos_filename_unix2dos+0x148> <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
42d54: e3510000 cmp r1, #0 <== NOT EXECUTED
42d58: 0affffea beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
42d5c: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
42d60: e3530000 cmp r3, #0 <== NOT EXECUTED
42d64: 0affffe7 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
42d68: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
42d6c: e28cc001 add ip, ip, #1 <== NOT EXECUTED
unlen--;
42d70: e2411001 sub r1, r1, #1 <== NOT EXECUTED
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
42d74: 1afffff6 bne 42d54 <msdos_filename_unix2dos+0x124> <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
42d78: e3510000 cmp r1, #0 <== NOT EXECUTED
42d7c: 0affffe1 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
42d80: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
42d84: e3530000 cmp r3, #0 <== NOT EXECUTED
42d88: 0affffde beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
if (msdos_map[c] == 0)
42d8c: e59f4078 ldr r4, [pc, #120] ; 42e0c <msdos_filename_unix2dos+0x1dc><== NOT EXECUTED
42d90: e7d40003 ldrb r0, [r4, r3] <== NOT EXECUTED
42d94: e3500000 cmp r0, #0 <== NOT EXECUTED
42d98: 13a03008 movne r3, #8 <== NOT EXECUTED
42d9c: 1a000007 bne 42dc0 <msdos_filename_unix2dos+0x190> <== NOT EXECUTED
42da0: eaffffd8 b 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
42da4: e5dc0001 ldrb r0, [ip, #1] <== NOT EXECUTED
42da8: e3500000 cmp r0, #0 <== NOT EXECUTED
42dac: 0affffd5 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
if (msdos_map[c] == 0)
42db0: e7d40000 ldrb r0, [r4, r0] <== NOT EXECUTED
42db4: e3500000 cmp r0, #0 <== NOT EXECUTED
42db8: e28cc001 add ip, ip, #1 <== NOT EXECUTED
42dbc: 0affffd1 beq 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
42dc0: e2511001 subs r1, r1, #1 <== NOT EXECUTED
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
42dc4: e7c20003 strb r0, [r2, r3] <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
42dc8: 03a00000 moveq r0, #0 <== NOT EXECUTED
42dcc: 13a00001 movne r0, #1 <== NOT EXECUTED
42dd0: e2833001 add r3, r3, #1 <== NOT EXECUTED
42dd4: e353000a cmp r3, #10 <== NOT EXECUTED
42dd8: c3a00000 movgt r0, #0 <== NOT EXECUTED
42ddc: d2000001 andle r0, r0, #1 <== NOT EXECUTED
42de0: e3500000 cmp r0, #0 <== NOT EXECUTED
42de4: 1affffee bne 42da4 <msdos_filename_unix2dos+0x174> <== NOT EXECUTED
42de8: eaffffc6 b 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
42dec: e5d04001 ldrb r4, [r0, #1] <== NOT EXECUTED
42df0: e354002e cmp r4, #46 ; 0x2e <== NOT EXECUTED
42df4: 03510002 cmpeq r1, #2 <== NOT EXECUTED
dn[0] = '.';
42df8: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED
dn[1] = '.';
42dfc: 05c23001 strbeq r3, [r2, #1] <== NOT EXECUTED
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
42e00: 05c23000 strbeq r3, [r2] <== NOT EXECUTED
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
42e04: 1affff9b bne 42c78 <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
42e08: eaffffbe b 42d08 <msdos_filename_unix2dos+0xd8> <== NOT EXECUTED
00038f88 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
38f88: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
38f8c: e24dd040 sub sp, sp, #64 ; 0x40 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
38f90: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38f94: e28d500c add r5, sp, #12 <== NOT EXECUTED
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
38f98: e3a04000 mov r4, #0 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38f9c: e285c008 add ip, r5, #8 <== NOT EXECUTED
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
38fa0: e593a034 ldr sl, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38fa4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38fa8: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38fac: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38fb0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38fb4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
38fb8: e1a07001 mov r7, r1 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38fbc: e58c4000 str r4, [ip] <== NOT EXECUTED
name_type = msdos_long_to_short (name,
38fc0: e1a01002 mov r1, r2 <== NOT EXECUTED
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
38fc4: e1a06000 mov r6, r0 <== NOT EXECUTED
38fc8: e1a08002 mov r8, r2 <== NOT EXECUTED
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
38fcc: e3a0300b mov r3, #11 <== NOT EXECUTED
38fd0: e1a02005 mov r2, r5 <== NOT EXECUTED
38fd4: e1a00007 mov r0, r7 <== NOT EXECUTED
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
38fd8: e58d403c str r4, [sp, #60] ; 0x3c <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38fdc: e58d400c str r4, [sp, #12] <== NOT EXECUTED
38fe0: e58d4010 str r4, [sp, #16] <== NOT EXECUTED
name_type = msdos_long_to_short (name,
38fe4: ebfffea6 bl 38a84 <msdos_long_to_short> <== NOT EXECUTED
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
38fe8: e1a01004 mov r1, r4 <== NOT EXECUTED
38fec: e58d0000 str r0, [sp] <== NOT EXECUTED
38ff0: e1a02007 mov r2, r7 <== NOT EXECUTED
38ff4: e1a03008 mov r3, r8 <== NOT EXECUTED
38ff8: e28d402c add r4, sp, #44 ; 0x2c <== NOT EXECUTED
38ffc: e1a00006 mov r0, r6 <== NOT EXECUTED
39000: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
39004: ebffffa7 bl 38ea8 <msdos_get_name_node> <== NOT EXECUTED
&dir_pos, node_entry);
if (rc != RC_OK)
39008: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3900c: 1a000019 bne 39078 <msdos_find_name+0xf0> <== NOT EXECUTED
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
39010: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED
39014: e3130008 tst r3, #8 <== NOT EXECUTED
39018: 1a000019 bne 39084 <msdos_find_name+0xfc> <== NOT EXECUTED
3901c: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
39020: e353000f cmp r3, #15 <== NOT EXECUTED
39024: 0a000016 beq 39084 <msdos_find_name+0xfc> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
39028: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
3902c: e1a01004 mov r1, r4 <== NOT EXECUTED
39030: e28d203c add r2, sp, #60 ; 0x3c <== NOT EXECUTED
39034: ebffb37b bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
39038: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3903c: 1a00000d bne 39078 <msdos_find_name+0xf0> <== NOT EXECUTED
return rc;
fat_fd->dir_pos = dir_pos;
39040: e59d703c ldr r7, [sp, #60] ; 0x3c <== NOT EXECUTED
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
39044: e5978008 ldr r8, [r7, #8] <== NOT EXECUTED
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
39048: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED
3904c: e287c020 add ip, r7, #32 <== NOT EXECUTED
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
39050: e3580001 cmp r8, #1 <== NOT EXECUTED
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
39054: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
39058: 0a00000c beq 39090 <msdos_find_name+0x108> <== NOT EXECUTED
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
3905c: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
39060: e5961000 ldr r1, [r6] <== NOT EXECUTED
39064: ebffb345 bl 25d80 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
39068: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3906c: 1a000030 bne 39134 <msdos_find_name+0x1ac> <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
39070: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
39074: e5863000 str r3, [r6] <== NOT EXECUTED
return rc;
}
39078: e1a00007 mov r0, r7 <== NOT EXECUTED
3907c: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED
39080: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
39084: e3a07c7d mov r7, #32000 ; 0x7d00 <== NOT EXECUTED
39088: e2877001 add r7, r7, #1 <== NOT EXECUTED
3908c: eafffff9 b 39078 <msdos_find_name+0xf0> <== NOT EXECUTED
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
39090: e1d521b4 ldrh r2, [r5, #20] <== NOT EXECUTED
39094: e1d531ba ldrh r3, [r5, #26] <== NOT EXECUTED
39098: e1833802 orr r3, r3, r2, lsl #16 <== NOT EXECUTED
3909c: e587301c str r3, [r7, #28] <== NOT EXECUTED
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
390a0: e1d501b8 ldrh r0, [r5, #24] <== NOT EXECUTED
390a4: e1d511b6 ldrh r1, [r5, #22] <== NOT EXECUTED
390a8: eb002698 bl 42b10 <msdos_date_dos2unix> <== NOT EXECUTED
390ac: e5870040 str r0, [r7, #64] ; 0x40 <== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
390b0: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED
390b4: e3130010 tst r3, #16 <== NOT EXECUTED
390b8: 1a000014 bne 39110 <msdos_find_name+0x188> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
390bc: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
390c0: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
390c4: e5832018 str r2, [r3, #24] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
390c8: e3a02005 mov r2, #5 <== NOT EXECUTED
390cc: e5832010 str r2, [r3, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
390d0: e3e02000 mvn r2, #0 <== NOT EXECUTED
390d4: e5832014 str r2, [r3, #20] <== NOT EXECUTED
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
390d8: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
390dc: e593101c ldr r1, [r3, #28] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
390e0: e3a00000 mov r0, #0 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
390e4: e3520000 cmp r2, #0 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
390e8: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
390ec: e5831038 str r1, [r3, #56] ; 0x38 <== NOT EXECUTED
if ((fat_fd->fat_file_size != 0) &&
390f0: 0a000003 beq 39104 <msdos_find_name+0x17c> <== NOT EXECUTED
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
390f4: e1da00b6 ldrh r0, [sl, #6] <== NOT EXECUTED
390f8: e1520000 cmp r2, r0 <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
390fc: 9583103c strls r1, [r3, #60] ; 0x3c <== NOT EXECUTED
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
39100: 9affffd5 bls 3905c <msdos_find_name+0xd4> <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
39104: e3e02000 mvn r2, #0 <== NOT EXECUTED
39108: e583203c str r2, [r3, #60] ; 0x3c <== NOT EXECUTED
3910c: eaffffd2 b 3905c <msdos_find_name+0xd4> <== NOT EXECUTED
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
39110: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
39114: e3a03602 mov r3, #2097152 ; 0x200000 <== NOT EXECUTED
39118: e5813014 str r3, [r1, #20] <== NOT EXECUTED
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
3911c: e5818010 str r8, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
39120: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
39124: ebffb04a bl 25254 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
39128: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3912c: 059d303c ldreq r3, [sp, #60] ; 0x3c <== NOT EXECUTED
39130: 0affffe8 beq 390d8 <msdos_find_name+0x150> <== NOT EXECUTED
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
39134: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
39138: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
3913c: ebffb30f bl 25d80 <fat_file_close> <== NOT EXECUTED
return rc;
39140: eaffffcc b 39078 <msdos_find_name+0xf0> <== NOT EXECUTED
00037aa0 <msdos_find_name_in_fat_file>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
37aa0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
37aa4: e24dd060 sub sp, sp, #96 ; 0x60 <== NOT EXECUTED
37aa8: e58d0030 str r0, [sp, #48] ; 0x30 <== NOT EXECUTED
37aac: e58d1028 str r1, [sp, #40] ; 0x28 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
37ab0: e59d1030 ldr r1, [sp, #48] ; 0x30 <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
37ab4: e59d0084 ldr r0, [sp, #132] ; 0x84 <== NOT EXECUTED
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
37ab8: e5911034 ldr r1, [r1, #52] ; 0x34 <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
37abc: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
37ac0: e3500000 cmp r0, #0 <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
37ac4: e58d3040 str r3, [sp, #64] ; 0x40 <== NOT EXECUTED
37ac8: e58d200c str r2, [sp, #12] <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
37acc: e58d1024 str r1, [sp, #36] ; 0x24 <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
37ad0: da00025f ble 38454 <msdos_find_name_in_fat_file+0x9b4> <== NOT EXECUTED
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
37ad4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
37ad8: e59dc08c ldr ip, [sp, #140] ; 0x8c <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
37adc: e3a03000 mov r3, #0 <== NOT EXECUTED
37ae0: e3520000 cmp r2, #0 <== NOT EXECUTED
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
37ae4: e3e02000 mvn r2, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
37ae8: e58c200c str r2, [ip, #12] <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
37aec: e58c3000 str r3, [ip] <== NOT EXECUTED
dir_pos->sname.ofs = 0;
37af0: e58c3004 str r3, [ip, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
37af4: e58c2008 str r2, [ip, #8] <== NOT EXECUTED
37af8: 0a000002 beq 37b08 <msdos_find_name_in_fat_file+0x68> <== NOT EXECUTED
37afc: e59d0088 ldr r0, [sp, #136] ; 0x88 <== NOT EXECUTED
37b00: e3500001 cmp r0, #1 <== NOT EXECUTED
37b04: 0a000005 beq 37b20 <msdos_find_name_in_fat_file+0x80> <== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
37b08: e59d1084 ldr r1, [sp, #132] ; 0x84 <== NOT EXECUTED
37b0c: e281300c add r3, r1, #12 <== NOT EXECUTED
37b10: e59f1954 ldr r1, [pc, #2388] ; 3846c <msdos_find_name_in_fat_file+0x9cc><== NOT EXECUTED
37b14: e0c2c391 smull ip, r2, r1, r3 <== NOT EXECUTED
37b18: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
37b1c: e0633142 rsb r3, r3, r2, asr #2 <== NOT EXECUTED
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37b20: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
37b24: e58d3038 str r3, [sp, #56] ; 0x38 <== NOT EXECUTED
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37b28: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
37b2c: e3530001 cmp r3, #1 <== NOT EXECUTED
37b30: 0a00016f beq 380f4 <msdos_find_name_in_fat_file+0x654> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
37b34: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
37b38: e1d290b6 ldrh r9, [r2, #6] <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
37b3c: e59d0038 ldr r0, [sp, #56] ; 0x38 <== NOT EXECUTED
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
37b40: e3a03000 mov r3, #0 <== NOT EXECUTED
37b44: e59dc024 ldr ip, [sp, #36] ; 0x24 <== NOT EXECUTED
37b48: e3a0a000 mov sl, #0 <== NOT EXECUTED
37b4c: e58d301c str r3, [sp, #28] <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
37b50: e2800001 add r0, r0, #1 <== NOT EXECUTED
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
37b54: e3e03000 mvn r3, #0 <== NOT EXECUTED
37b58: e58d3058 str r3, [sp, #88] ; 0x58 <== NOT EXECUTED
37b5c: e58d3054 str r3, [sp, #84] ; 0x54 <== NOT EXECUTED
37b60: e59cb098 ldr fp, [ip, #152] ; 0x98 <== NOT EXECUTED
37b64: e58da014 str sl, [sp, #20] <== NOT EXECUTED
37b68: e58da010 str sl, [sp, #16] <== NOT EXECUTED
37b6c: e58da02c str sl, [sp, #44] ; 0x2c <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
37b70: e58d0020 str r0, [sp, #32] <== NOT EXECUTED
37b74: e58da034 str sl, [sp, #52] ; 0x34 <== NOT EXECUTED
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
37b78: e1a0700a mov r7, sl <== NOT EXECUTED
37b7c: e1a0600a mov r6, sl <== NOT EXECUTED
37b80: e1a0800a mov r8, sl <== NOT EXECUTED
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
37b84: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
37b88: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
37b8c: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
37b90: e1a03009 mov r3, r9 <== NOT EXECUTED
37b94: e58db000 str fp, [sp] <== NOT EXECUTED
37b98: ebffb7f5 bl 25b74 <fat_file_read> <== NOT EXECUTED
37b9c: e3500000 cmp r0, #0 <== NOT EXECUTED
37ba0: 0a0001fa beq 38390 <msdos_find_name_in_fat_file+0x8f0> <== NOT EXECUTED
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
37ba4: e350001f cmp r0, #31 <== NOT EXECUTED
37ba8: da0001db ble 3831c <msdos_find_name_in_fat_file+0x87c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
37bac: e1500009 cmp r0, r9 <== NOT EXECUTED
37bb0: 1a000221 bne 3843c <msdos_find_name_in_fat_file+0x99c> <== NOT EXECUTED
37bb4: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
37bb8: e591b098 ldr fp, [r1, #152] ; 0x98 <== NOT EXECUTED
37bbc: e3a05000 mov r5, #0 <== NOT EXECUTED
37bc0: e1a0400b mov r4, fp <== NOT EXECUTED
37bc4: e59d1034 ldr r1, [sp, #52] ; 0x34 <== NOT EXECUTED
37bc8: e59dc02c ldr ip, [sp, #44] ; 0x2c <== NOT EXECUTED
37bcc: ea000018 b 37c34 <msdos_find_name_in_fat_file+0x194> <== NOT EXECUTED
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
37bd0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
37bd4: e3530000 cmp r3, #0 <== NOT EXECUTED
37bd8: 0a000002 beq 37be8 <msdos_find_name_in_fat_file+0x148> <== NOT EXECUTED
37bdc: e35a0000 cmp sl, #0 <== NOT EXECUTED
37be0: 01a0600a moveq r6, sl <== NOT EXECUTED
37be4: 01a0700a moveq r7, sl <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
37be8: e5d4300b ldrb r3, [r4, #11] <== NOT EXECUTED
37bec: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
37bf0: e353000f cmp r3, #15 <== NOT EXECUTED
37bf4: 0a00005a beq 37d64 <msdos_find_name_in_fat_file+0x2c4> <== NOT EXECUTED
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
37bf8: e3510000 cmp r1, #0 <== NOT EXECUTED
37bfc: 13a03000 movne r3, #0 <== NOT EXECUTED
37c00: 11a01003 movne r1, r3 <== NOT EXECUTED
37c04: 11a00003 movne r0, r3 <== NOT EXECUTED
37c08: 1a000027 bne 37cac <msdos_find_name_in_fat_file+0x20c> <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
37c0c: e59d3088 ldr r3, [sp, #136] ; 0x88 <== NOT EXECUTED
37c10: e3530001 cmp r3, #1 <== NOT EXECUTED
37c14: 0a00005e beq 37d94 <msdos_find_name_in_fat_file+0x2f4> <== NOT EXECUTED
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
37c18: e3e02000 mvn r2, #0 <== NOT EXECUTED
37c1c: e58d2054 str r2, [sp, #84] ; 0x54 <== NOT EXECUTED
37c20: e3a01000 mov r1, #0 <== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
37c24: e2855020 add r5, r5, #32 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c28: e1590005 cmp r9, r5 <== NOT EXECUTED
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
37c2c: e2844020 add r4, r4, #32 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c30: 9a000012 bls 37c80 <msdos_find_name_in_fat_file+0x1e0> <== NOT EXECUTED
/*
* See if the entry is empty or the remainder of the directory is
* empty ? Localise to make the code read better.
*/
bool entry_empty = (*MSDOS_DIR_ENTRY_TYPE(entry) ==
37c34: e7db2005 ldrb r2, [fp, r5] <== NOT EXECUTED
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
37c38: e3570000 cmp r7, #0 <== NOT EXECUTED
37c3c: 01a0800c moveq r8, ip <== NOT EXECUTED
37c40: 01a06005 moveq r6, r5 <== NOT EXECUTED
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
37c44: e3520000 cmp r2, #0 <== NOT EXECUTED
37c48: 0a00009a beq 37eb8 <msdos_find_name_in_fat_file+0x418> <== NOT EXECUTED
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
37c4c: e35200e5 cmp r2, #229 ; 0xe5 <== NOT EXECUTED
37c50: 1affffde bne 37bd0 <msdos_find_name_in_fat_file+0x130> <== NOT EXECUTED
{
if (create_node)
37c54: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
37c58: e3530000 cmp r3, #0 <== NOT EXECUTED
37c5c: 0afffff0 beq 37c24 <msdos_find_name_in_fat_file+0x184> <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
37c60: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
if (create_node)
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
37c64: e2877001 add r7, r7, #1 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
37c68: e1500007 cmp r0, r7 <== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
37c6c: e2855020 add r5, r5, #32 <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
37c70: 03a0a001 moveq sl, #1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c74: e1590005 cmp r9, r5 <== NOT EXECUTED
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
37c78: e2844020 add r4, r4, #32 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c7c: 8affffec bhi 37c34 <msdos_find_name_in_fat_file+0x194> <== NOT EXECUTED
37c80: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
37c84: e59dc02c ldr ip, [sp, #44] ; 0x2c <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c88: e0833009 add r3, r3, r9 <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
37c8c: e28cc001 add ip, ip, #1 <== NOT EXECUTED
37c90: e58d1034 str r1, [sp, #52] ; 0x34 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
37c94: e58d301c str r3, [sp, #28] <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
37c98: e58dc02c str ip, [sp, #44] ; 0x2c <== NOT EXECUTED
37c9c: eaffffb8 b 37b84 <msdos_find_name_in_fat_file+0xe4> <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
37ca0: e2100001 ands r0, r0, #1 <== NOT EXECUTED
37ca4: e7d42003 ldrb r2, [r4, r3] <== NOT EXECUTED
37ca8: 13a00080 movne r0, #128 ; 0x80 <== NOT EXECUTED
37cac: e0820000 add r0, r2, r0 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
37cb0: e2833001 add r3, r3, #1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
37cb4: e08000a1 add r0, r0, r1, lsr #1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
37cb8: e353000b cmp r3, #11 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
37cbc: e20010ff and r1, r0, #255 ; 0xff <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
37cc0: 1afffff6 bne 37ca0 <msdos_find_name_in_fat_file+0x200> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
37cc4: e28d0010 add r0, sp, #16 <== NOT EXECUTED
37cc8: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED
37ccc: e3520000 cmp r2, #0 <== NOT EXECUTED
37cd0: 01500001 cmpeq r0, r1 <== NOT EXECUTED
37cd4: 1affffcc bne 37c0c <msdos_find_name_in_fat_file+0x16c> <== NOT EXECUTED
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
37cd8: e59dc08c ldr ip, [sp, #140] ; 0x8c <== NOT EXECUTED
37cdc: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
37ce0: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
37ce4: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
37ce8: e3a02001 mov r2, #1 <== NOT EXECUTED
37cec: e58dc000 str ip, [sp] <== NOT EXECUTED
37cf0: ebffb615 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
37cf4: e3500000 cmp r0, #0 <== NOT EXECUTED
37cf8: 1a000017 bne 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
37cfc: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
37d00: e59d008c ldr r0, [sp, #140] ; 0x8c <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
37d04: e3730001 cmn r3, #1 <== NOT EXECUTED
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
37d08: e5805004 str r5, [r0, #4] <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
37d0c: 0a000009 beq 37d38 <msdos_find_name_in_fat_file+0x298> <== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
37d10: e28dc054 add ip, sp, #84 ; 0x54 <== NOT EXECUTED
37d14: e0030399 mul r3, r9, r3 <== NOT EXECUTED
37d18: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
37d1c: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
37d20: e3a02001 mov r2, #1 <== NOT EXECUTED
37d24: e58dc000 str ip, [sp] <== NOT EXECUTED
37d28: ebffb607 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
37d2c: e3500000 cmp r0, #0 <== NOT EXECUTED
37d30: 1a000009 bne 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
37d34: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
37d38: e59d108c ldr r1, [sp, #140] ; 0x8c <== NOT EXECUTED
37d3c: e59d2058 ldr r2, [sp, #88] ; 0x58 <== NOT EXECUTED
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
37d40: e5813008 str r3, [r1, #8] <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
37d44: e581200c str r2, [r1, #12] <== NOT EXECUTED
memcpy(name_dir_entry, entry,
37d48: e59d0090 ldr r0, [sp, #144] ; 0x90 <== NOT EXECUTED
37d4c: e1a01004 mov r1, r4 <== NOT EXECUTED
37d50: e3a02020 mov r2, #32 <== NOT EXECUTED
37d54: eb003ee9 bl 47900 <memcpy> <== NOT EXECUTED
37d58: e3a00000 mov r0, #0 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
37d5c: e28dd060 add sp, sp, #96 ; 0x60 <== NOT EXECUTED
37d60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
37d64: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
37d68: e3730001 cmn r3, #1 <== NOT EXECUTED
37d6c: 159d3010 ldrne r3, [sp, #16] <== NOT EXECUTED
37d70: 0a000013 beq 37dc4 <msdos_find_name_in_fat_file+0x324> <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
37d74: e202003f and r0, r2, #63 ; 0x3f <== NOT EXECUTED
37d78: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
37d7c: e1500002 cmp r0, r2 <== NOT EXECUTED
37d80: 0a000017 beq 37de4 <msdos_find_name_in_fat_file+0x344> <== NOT EXECUTED
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
37d84: e3e00000 mvn r0, #0 <== NOT EXECUTED
37d88: e58d0054 str r0, [sp, #84] ; 0x54 <== NOT EXECUTED
37d8c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
continue;
37d90: eaffffa3 b 37c24 <msdos_find_name_in_fat_file+0x184> <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
37d94: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
37d98: e3730001 cmn r3, #1 <== NOT EXECUTED
37d9c: 1affff9d bne 37c18 <msdos_find_name_in_fat_file+0x178> <== NOT EXECUTED
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
37da0: e1a00004 mov r0, r4 <== NOT EXECUTED
37da4: e59d1090 ldr r1, [sp, #144] ; 0x90 <== NOT EXECUTED
37da8: e3a0200b mov r2, #11 <== NOT EXECUTED
37dac: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
37db0: eb003ea8 bl 47858 <memcmp> <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
37db4: e3500000 cmp r0, #0 <== NOT EXECUTED
37db8: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
37dbc: 1affff95 bne 37c18 <msdos_find_name_in_fat_file+0x178> <== NOT EXECUTED
37dc0: eaffffc4 b 37cd8 <msdos_find_name_in_fat_file+0x238> <== NOT EXECUTED
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
37dc4: e3120040 tst r2, #64 ; 0x40 <== NOT EXECUTED
37dc8: 0a000003 beq 37ddc <msdos_find_name_in_fat_file+0x33c> <== NOT EXECUTED
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
37dcc: e59d0038 ldr r0, [sp, #56] ; 0x38 <== NOT EXECUTED
37dd0: e202203f and r2, r2, #63 ; 0x3f <== NOT EXECUTED
37dd4: e1520000 cmp r2, r0 <== NOT EXECUTED
37dd8: 0a0000b2 beq 380a8 <msdos_find_name_in_fat_file+0x608> <== NOT EXECUTED
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
37ddc: e3a01000 mov r1, #0 <== NOT EXECUTED
37de0: eaffff8f b 37c24 <msdos_find_name_in_fat_file+0x184> <== NOT EXECUTED
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
37de4: e5d4200d ldrb r2, [r4, #13] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
37de8: e1520003 cmp r2, r3 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
37dec: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
37df0: 1affffe3 bne 37d84 <msdos_find_name_in_fat_file+0x2e4> <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
37df4: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
37df8: e2411001 sub r1, r1, #1 <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
37dfc: e0813081 add r3, r1, r1, lsl #1 <== NOT EXECUTED
37e00: e0813103 add r3, r1, r3, lsl #2 <== NOT EXECUTED
37e04: e58d3034 str r3, [sp, #52] ; 0x34 <== NOT EXECUTED
37e08: e2842001 add r2, r4, #1 <== NOT EXECUTED
37e0c: e58d203c str r2, [sp, #60] ; 0x3c <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
37e10: e58d1014 str r1, [sp, #20] <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
37e14: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
37e18: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
37e1c: e0811002 add r1, r1, r2 <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
37e20: e3a03001 mov r3, #1 <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
37e24: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
37e28: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
37e2c: e58d5044 str r5, [sp, #68] ; 0x44 <== NOT EXECUTED
37e30: e58d0050 str r0, [sp, #80] ; 0x50 <== NOT EXECUTED
37e34: e58db04c str fp, [sp, #76] ; 0x4c <== NOT EXECUTED
37e38: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
37e3c: e1a0b007 mov fp, r7 <== NOT EXECUTED
37e40: e58da03c str sl, [sp, #60] ; 0x3c <== NOT EXECUTED
37e44: e3a03000 mov r3, #0 <== NOT EXECUTED
37e48: e58d4048 str r4, [sp, #72] ; 0x48 <== NOT EXECUTED
37e4c: e3a00001 mov r0, #1 <== NOT EXECUTED
37e50: e1a05002 mov r5, r2 <== NOT EXECUTED
37e54: e59d7084 ldr r7, [sp, #132] ; 0x84 <== NOT EXECUTED
37e58: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
37e5c: ea000006 b 37e7c <msdos_find_name_in_fat_file+0x3dc> <== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
37e60: e353000a cmp r3, #10 <== NOT EXECUTED
37e64: 0a000011 beq 37eb0 <msdos_find_name_in_fat_file+0x410> <== NOT EXECUTED
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
37e68: e350000c cmp r0, #12 <== NOT EXECUTED
37e6c: ca000094 bgt 380c4 <msdos_find_name_in_fat_file+0x624> <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
37e70: e2811002 add r1, r1, #2 <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
37e74: e2833001 add r3, r3, #1 <== NOT EXECUTED
37e78: e2800001 add r0, r0, #1 <== NOT EXECUTED
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
37e7c: e5d12000 ldrb r2, [r1] <== NOT EXECUTED
37e80: e3520000 cmp r2, #0 <== NOT EXECUTED
37e84: 0a000131 beq 38350 <msdos_find_name_in_fat_file+0x8b0> <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
37e88: e0834005 add r4, r3, r5 <== NOT EXECUTED
37e8c: e1570004 cmp r7, r4 <== NOT EXECUTED
37e90: da0000a0 ble 38118 <msdos_find_name_in_fat_file+0x678> <== NOT EXECUTED
37e94: e7da4003 ldrb r4, [sl, r3] <== NOT EXECUTED
37e98: e1540002 cmp r4, r2 <== NOT EXECUTED
37e9c: 1a00009d bne 38118 <msdos_find_name_in_fat_file+0x678> <== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
37ea0: e3530004 cmp r3, #4 <== NOT EXECUTED
37ea4: 1affffed bne 37e60 <msdos_find_name_in_fat_file+0x3c0> <== NOT EXECUTED
{
case 4:
p += 5;
37ea8: e2811005 add r1, r1, #5 <== NOT EXECUTED
break;
37eac: eafffff0 b 37e74 <msdos_find_name_in_fat_file+0x3d4> <== NOT EXECUTED
case 10:
p += 4;
37eb0: e2811004 add r1, r1, #4 <== NOT EXECUTED
break;
37eb4: eaffffee b 37e74 <msdos_find_name_in_fat_file+0x3d4> <== NOT EXECUTED
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
37eb8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
37ebc: e3520000 cmp r2, #0 <== NOT EXECUTED
37ec0: 0a000135 beq 3839c <msdos_find_name_in_fat_file+0x8fc> <== NOT EXECUTED
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
37ec4: e35a0000 cmp sl, #0 <== NOT EXECUTED
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
37ec8: 008772a9 addeq r7, r7, r9, lsr #5 <== NOT EXECUTED
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
37ecc: 004772a5 subeq r7, r7, r5, lsr #5 <== NOT EXECUTED
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
37ed0: e59d1088 ldr r1, [sp, #136] ; 0x88 <== NOT EXECUTED
37ed4: e3510002 cmp r1, #2 <== NOT EXECUTED
37ed8: 0a000137 beq 383bc <msdos_find_name_in_fat_file+0x91c> <== NOT EXECUTED
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
37edc: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
37ee0: e3520000 cmp r2, #0 <== NOT EXECUTED
37ee4: 0a00000f beq 37f28 <msdos_find_name_in_fat_file+0x488> <== NOT EXECUTED
37ee8: e3a03000 mov r3, #0 <== NOT EXECUTED
37eec: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
37ef0: e1a01003 mov r1, r3 <== NOT EXECUTED
37ef4: e1a02003 mov r2, r3 <== NOT EXECUTED
37ef8: e59dc090 ldr ip, [sp, #144] ; 0x90 <== NOT EXECUTED
37efc: ea000001 b 37f08 <msdos_find_name_in_fat_file+0x468> <== NOT EXECUTED
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
37f00: e2111001 ands r1, r1, #1 <== NOT EXECUTED
37f04: 13a01080 movne r1, #128 ; 0x80 <== NOT EXECUTED
37f08: e7dc0003 ldrb r0, [ip, r3] <== NOT EXECUTED
37f0c: e1a02b82 lsl r2, r2, #23 <== NOT EXECUTED
37f10: e0811000 add r1, r1, r0 <== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
37f14: e2833001 add r3, r3, #1 <== NOT EXECUTED
lfn_checksum =
37f18: e0811c22 add r1, r1, r2, lsr #24 <== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
37f1c: e353000b cmp r3, #11 <== NOT EXECUTED
lfn_checksum =
37f20: e20120ff and r2, r1, #255 ; 0xff <== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
37f24: 1afffff5 bne 37f00 <msdos_find_name_in_fat_file+0x460> <== NOT EXECUTED
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
37f28: e3570000 cmp r7, #0 <== NOT EXECUTED
37f2c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
37f30: 01a06007 moveq r6, r7 <== NOT EXECUTED
37f34: 03a03001 moveq r3, #1 <== NOT EXECUTED
37f38: 0a00011b beq 383ac <msdos_find_name_in_fat_file+0x90c> <== NOT EXECUTED
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
37f3c: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
37f40: e1580003 cmp r8, r3 <== NOT EXECUTED
37f44: 13a03001 movne r3, #1 <== NOT EXECUTED
37f48: 0a000116 beq 383a8 <msdos_find_name_in_fat_file+0x908> <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
37f4c: e59dc038 ldr ip, [sp, #56] ; 0x38 <== NOT EXECUTED
37f50: e35c0000 cmp ip, #0 <== NOT EXECUTED
37f54: ba000116 blt 383b4 <msdos_find_name_in_fat_file+0x914> <== NOT EXECUTED
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
37f58: e0000899 mul r0, r9, r8 <== NOT EXECUTED
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
37f5c: e3530000 cmp r3, #0 <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
37f60: e3e03000 mvn r3, #0 <== NOT EXECUTED
37f64: e58d3054 str r3, [sp, #84] ; 0x54 <== NOT EXECUTED
37f68: e58d3058 str r3, [sp, #88] ; 0x58 <== NOT EXECUTED
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
37f6c: e58d001c str r0, [sp, #28] <== NOT EXECUTED
37f70: e3a05000 mov r5, #0 <== NOT EXECUTED
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
37f74: 1a0000bf bne 38278 <msdos_find_name_in_fat_file+0x7d8> <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
return ret;
else if (ret != bts2rd)
37f78: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
37f7c: e58d1020 str r1, [sp, #32] <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
37f80: e1590006 cmp r9, r6 <== NOT EXECUTED
37f84: 93a03000 movls r3, #0 <== NOT EXECUTED
37f88: 91a07005 movls r7, r5 <== NOT EXECUTED
37f8c: 958d3018 strls r3, [sp, #24] <== NOT EXECUTED
37f90: 9a0000a1 bls 3821c <msdos_find_name_in_fat_file+0x77c> <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
37f94: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
37f98: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
37f9c: e2857001 add r7, r5, #1 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
37fa0: e2833001 add r3, r3, #1 <== NOT EXECUTED
37fa4: e1530007 cmp r3, r7 <== NOT EXECUTED
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
37fa8: e5924098 ldr r4, [r2, #152] ; 0x98 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
37fac: 03a0c020 moveq ip, #32 <== NOT EXECUTED
37fb0: e58d300c str r3, [sp, #12] <== NOT EXECUTED
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
37fb4: e0844006 add r4, r4, r6 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
37fb8: 01a05006 moveq r5, r6 <== NOT EXECUTED
37fbc: 058dc018 streq ip, [sp, #24] <== NOT EXECUTED
37fc0: 0a000073 beq 38194 <msdos_find_name_in_fat_file+0x6f4> <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
37fc4: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
37fc8: e1e03005 mvn r3, r5 <== NOT EXECUTED
37fcc: e0833002 add r3, r3, r2 <== NOT EXECUTED
37fd0: e20210ff and r1, r2, #255 ; 0xff <== NOT EXECUTED
37fd4: e3a00020 mov r0, #32 <== NOT EXECUTED
37fd8: e2811001 add r1, r1, #1 <== NOT EXECUTED
37fdc: e0832083 add r2, r3, r3, lsl #1 <== NOT EXECUTED
37fe0: e59dc040 ldr ip, [sp, #64] ; 0x40 <== NOT EXECUTED
37fe4: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
37fe8: e0671001 rsb r1, r7, r1 <== NOT EXECUTED
37fec: e1a05006 mov r5, r6 <== NOT EXECUTED
37ff0: e58d602c str r6, [sp, #44] ; 0x2c <== NOT EXECUTED
37ff4: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
37ff8: e59d6024 ldr r6, [sp, #36] ; 0x24 <== NOT EXECUTED
37ffc: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
38000: e201a0ff and sl, r1, #255 ; 0xff <== NOT EXECUTED
38004: e08cb003 add fp, ip, r3 <== NOT EXECUTED
38008: e1a08000 mov r8, r0 <== NOT EXECUTED
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
3800c: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
38010: e3730001 cmn r3, #1 <== NOT EXECUTED
{
lfn_start.cln = empty_space_offset;
38014: 059d1014 ldreq r1, [sp, #20] <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38018: e3a02020 mov r2, #32 <== NOT EXECUTED
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
3801c: 058d1054 streq r1, [sp, #84] ; 0x54 <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38020: e1a00004 mov r0, r4 <== NOT EXECUTED
38024: e3a01000 mov r1, #0 <== NOT EXECUTED
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
lfn_start.ofs = dir_entry;
38028: 058d5058 streq r5, [sp, #88] ; 0x58 <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
3802c: eb003eba bl 47b1c <memset> <== NOT EXECUTED
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
38030: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
38034: e5c4200d strb r2, [r4, #13] <== NOT EXECUTED
p = entry + 1;
38038: e1a0200b mov r2, fp <== NOT EXECUTED
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
3803c: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
38040: e2841001 add r1, r4, #1 <== NOT EXECUTED
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
38044: e5c10000 strb r0, [r1] <== NOT EXECUTED
if (*n != 0)
38048: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
3804c: e3a03001 mov r3, #1 <== NOT EXECUTED
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
if (*n != 0)
38050: e3500000 cmp r0, #0 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
38054: e2430001 sub r0, r3, #1 <== NOT EXECUTED
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
if (*n != 0)
n++;
38058: 12822001 addne r2, r2, #1 <== NOT EXECUTED
switch (i)
3805c: e3500004 cmp r0, #4 <== NOT EXECUTED
38060: 0a00000d beq 3809c <msdos_find_name_in_fat_file+0x5fc> <== NOT EXECUTED
38064: e350000a cmp r0, #10 <== NOT EXECUTED
38068: 0a0000b0 beq 38330 <msdos_find_name_in_fat_file+0x890> <== NOT EXECUTED
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
3806c: e353000c cmp r3, #12 <== NOT EXECUTED
38070: ca000030 bgt 38138 <msdos_find_name_in_fat_file+0x698> <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
38074: e2811002 add r1, r1, #2 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
38078: e2833001 add r3, r3, #1 <== NOT EXECUTED
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
3807c: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
38080: e5c10000 strb r0, [r1] <== NOT EXECUTED
if (*n != 0)
38084: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
38088: e3500000 cmp r0, #0 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
3808c: e2430001 sub r0, r3, #1 <== NOT EXECUTED
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
if (*n != 0)
n++;
38090: 12822001 addne r2, r2, #1 <== NOT EXECUTED
switch (i)
38094: e3500004 cmp r0, #4 <== NOT EXECUTED
38098: 1afffff1 bne 38064 <msdos_find_name_in_fat_file+0x5c4> <== NOT EXECUTED
{
case 4:
p += 5;
3809c: e2811005 add r1, r1, #5 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
380a0: e2833001 add r3, r3, #1 <== NOT EXECUTED
380a4: eafffff4 b 3807c <msdos_find_name_in_fat_file+0x5dc> <== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
380a8: e58dc054 str ip, [sp, #84] ; 0x54 <== NOT EXECUTED
lfn_start.ofs = dir_entry;
380ac: e58d5058 str r5, [sp, #88] ; 0x58 <== NOT EXECUTED
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
380b0: e3a01000 mov r1, #0 <== NOT EXECUTED
380b4: e5d4300d ldrb r3, [r4, #13] <== NOT EXECUTED
380b8: e7db2005 ldrb r2, [fp, r5] <== NOT EXECUTED
380bc: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
380c0: eaffff2b b 37d74 <msdos_find_name_in_fat_file+0x2d4> <== NOT EXECUTED
380c4: e1a0700b mov r7, fp <== NOT EXECUTED
380c8: e59d5044 ldr r5, [sp, #68] ; 0x44 <== NOT EXECUTED
380cc: e59d4048 ldr r4, [sp, #72] ; 0x48 <== NOT EXECUTED
380d0: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED
380d4: e59db04c ldr fp, [sp, #76] ; 0x4c <== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
380d8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
380dc: e3530000 cmp r3, #0 <== NOT EXECUTED
380e0: 1affff3d bne 37ddc <msdos_find_name_in_fat_file+0x33c> <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
380e4: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
380e8: e2911001 adds r1, r1, #1 <== NOT EXECUTED
380ec: 13a01001 movne r1, #1 <== NOT EXECUTED
380f0: eafffecb b 37c24 <msdos_find_name_in_fat_file+0x184> <== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
380f4: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
380f8: e3530000 cmp r3, #0 <== NOT EXECUTED
380fc: 1afffe8c bne 37b34 <msdos_find_name_in_fat_file+0x94> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
38100: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
38104: e5d1300a ldrb r3, [r1, #10] <== NOT EXECUTED
38108: e3130003 tst r3, #3 <== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
3810c: 15909018 ldrne r9, [r0, #24] <== NOT EXECUTED
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
38110: 1afffe89 bne 37b3c <msdos_find_name_in_fat_file+0x9c> <== NOT EXECUTED
38114: eafffe86 b 37b34 <msdos_find_name_in_fat_file+0x94> <== NOT EXECUTED
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
38118: e3e02000 mvn r2, #0 <== NOT EXECUTED
3811c: e1a0700b mov r7, fp <== NOT EXECUTED
38120: e59d5044 ldr r5, [sp, #68] ; 0x44 <== NOT EXECUTED
38124: e59d4048 ldr r4, [sp, #72] ; 0x48 <== NOT EXECUTED
38128: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED
3812c: e59db04c ldr fp, [sp, #76] ; 0x4c <== NOT EXECUTED
38130: e58d2054 str r2, [sp, #84] ; 0x54 <== NOT EXECUTED
break;
38134: eaffffe7 b 380d8 <msdos_find_name_in_fat_file+0x638> <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
38138: e3570001 cmp r7, #1 <== NOT EXECUTED
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
3813c: 038a3040 orreq r3, sl, #64 ; 0x40 <== NOT EXECUTED
p += 2;
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
38140: e5c4a000 strb sl, [r4] <== NOT EXECUTED
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
38144: 05c43000 strbeq r3, [r4] <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
38148: e5d4300b ldrb r3, [r4, #11] <== NOT EXECUTED
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
3814c: e2855020 add r5, r5, #32 <== NOT EXECUTED
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
38150: e383300f orr r3, r3, #15 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
38154: e1590005 cmp r9, r5 <== NOT EXECUTED
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
38158: e5c4300b strb r3, [r4, #11] <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
3815c: 9a000076 bls 3833c <msdos_find_name_in_fat_file+0x89c> <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
38160: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
38164: e2877001 add r7, r7, #1 <== NOT EXECUTED
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
38168: e5964098 ldr r4, [r6, #152] ; 0x98 <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
3816c: e24aa001 sub sl, sl, #1 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
38170: e1570000 cmp r7, r0 <== NOT EXECUTED
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
38174: e0844005 add r4, r4, r5 <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
38178: e2888020 add r8, r8, #32 <== NOT EXECUTED
lfn_entry++;
3817c: e20aa0ff and sl, sl, #255 ; 0xff <== NOT EXECUTED
38180: e24bb00d sub fp, fp, #13 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
38184: 1affffa0 bne 3800c <msdos_find_name_in_fat_file+0x56c> <== NOT EXECUTED
38188: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
3818c: e59d602c ldr r6, [sp, #44] ; 0x2c <== NOT EXECUTED
38190: e59d8014 ldr r8, [sp, #20] <== NOT EXECUTED
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
38194: e59dc08c ldr ip, [sp, #140] ; 0x8c <== NOT EXECUTED
38198: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
3819c: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
381a0: e3a02001 mov r2, #1 <== NOT EXECUTED
381a4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
381a8: e58dc000 str ip, [sp] <== NOT EXECUTED
381ac: ebffb4e6 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
381b0: e3500000 cmp r0, #0 <== NOT EXECUTED
381b4: 1afffee8 bne 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
381b8: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
381bc: e59d008c ldr r0, [sp, #140] ; 0x8c <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
381c0: e3730001 cmn r3, #1 <== NOT EXECUTED
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
381c4: e5805004 str r5, [r0, #4] <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
381c8: 0a000009 beq 381f4 <msdos_find_name_in_fat_file+0x754> <== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
381cc: e28dc054 add ip, sp, #84 ; 0x54 <== NOT EXECUTED
381d0: e0030399 mul r3, r9, r3 <== NOT EXECUTED
381d4: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
381d8: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
381dc: e3a02001 mov r2, #1 <== NOT EXECUTED
381e0: e58dc000 str ip, [sp] <== NOT EXECUTED
381e4: ebffb4d8 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
381e8: e3500000 cmp r0, #0 <== NOT EXECUTED
381ec: 1afffeda bne 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
381f0: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
381f4: e59d108c ldr r1, [sp, #140] ; 0x8c <== NOT EXECUTED
381f8: e5813008 str r3, [r1, #8] <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
381fc: e59d3058 ldr r3, [sp, #88] ; 0x58 <== NOT EXECUTED
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
38200: e1a00004 mov r0, r4 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
38204: e581300c str r3, [r1, #12] <== NOT EXECUTED
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
38208: e3a02020 mov r2, #32 <== NOT EXECUTED
3820c: e59d1090 ldr r1, [sp, #144] ; 0x90 <== NOT EXECUTED
38210: eb003dba bl 47900 <memcpy> <== NOT EXECUTED
38214: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
38218: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
3821c: e28d0020 add r0, sp, #32 <== NOT EXECUTED
38220: e8901001 ldm r0, {r0, ip} <== NOT EXECUTED
38224: e59c1098 ldr r1, [ip, #152] ; 0x98 <== NOT EXECUTED
38228: e0802006 add r2, r0, r6 <== NOT EXECUTED
3822c: e0816006 add r6, r1, r6 <== NOT EXECUTED
38230: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
38234: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
38238: e58d6000 str r6, [sp] <== NOT EXECUTED
3823c: ebffb5b6 bl 2591c <fat_file_write> <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
38240: e3700001 cmn r0, #1 <== NOT EXECUTED
38244: 0a00007a beq 38434 <msdos_find_name_in_fat_file+0x994> <== NOT EXECUTED
return ret;
else if (ret != length)
38248: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
3824c: e1510000 cmp r1, r0 <== NOT EXECUTED
38250: 1a000031 bne 3831c <msdos_find_name_in_fat_file+0x87c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
38254: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
38258: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
3825c: e0833009 add r3, r3, r9 <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
38260: e1520007 cmp r2, r7 <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
38264: e58d301c str r3, [sp, #28] <== NOT EXECUTED
empty_space_offset++;
38268: a2888001 addge r8, r8, #1 <== NOT EXECUTED
3826c: a1a05007 movge r5, r7 <== NOT EXECUTED
38270: a3a06000 movge r6, #0 <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
38274: ba00004e blt 383b4 <msdos_find_name_in_fat_file+0x914> <== NOT EXECUTED
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
38278: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
3827c: e591c098 ldr ip, [r1, #152] ; 0x98 <== NOT EXECUTED
38280: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
38284: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
38288: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3828c: e1a03009 mov r3, r9 <== NOT EXECUTED
38290: e58dc000 str ip, [sp] <== NOT EXECUTED
38294: ebffb636 bl 25b74 <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
38298: e1500009 cmp r0, r9 <== NOT EXECUTED
3829c: 0affff35 beq 37f78 <msdos_find_name_in_fat_file+0x4d8> <== NOT EXECUTED
{
if (ret != FAT_EOF)
382a0: e3500000 cmp r0, #0 <== NOT EXECUTED
382a4: 1a00001c bne 3831c <msdos_find_name_in_fat_file+0x87c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (mt_entry, fat_fd, empty_space_offset * bts2rd,
382a8: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
382ac: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
382b0: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
382b4: e28d305c add r3, sp, #92 ; 0x5c <== NOT EXECUTED
382b8: ebffb51f bl 2573c <fat_file_extend> <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
382bc: e2501000 subs r1, r0, #0 <== NOT EXECUTED
382c0: 11a00001 movne r0, r1 <== NOT EXECUTED
382c4: 1afffea4 bne 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
382c8: e59d205c ldr r2, [sp, #92] ; 0x5c <== NOT EXECUTED
382cc: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
382d0: e1520003 cmp r2, r3 <== NOT EXECUTED
382d4: e58d2020 str r2, [sp, #32] <== NOT EXECUTED
382d8: 1a00000f bne 3831c <msdos_find_name_in_fat_file+0x87c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
382dc: e59dc024 ldr ip, [sp, #36] ; 0x24 <== NOT EXECUTED
382e0: e1a02009 mov r2, r9 <== NOT EXECUTED
382e4: e59c0098 ldr r0, [ip, #152] ; 0x98 <== NOT EXECUTED
382e8: eb003e0b bl 47b1c <memset> <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
382ec: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
382f0: e590c098 ldr ip, [r0, #152] ; 0x98 <== NOT EXECUTED
382f4: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
382f8: e59d0030 ldr r0, [sp, #48] ; 0x30 <== NOT EXECUTED
382fc: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
38300: e1a03009 mov r3, r9 <== NOT EXECUTED
38304: e58dc000 str ip, [sp] <== NOT EXECUTED
38308: ebffb583 bl 2591c <fat_file_write> <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
3830c: e3700001 cmn r0, #1 <== NOT EXECUTED
38310: 0a000047 beq 38434 <msdos_find_name_in_fat_file+0x994> <== NOT EXECUTED
return ret;
else if (ret != bts2rd)
38314: e1500009 cmp r0, r9 <== NOT EXECUTED
38318: 0affff18 beq 37f80 <msdos_find_name_in_fat_file+0x4e0> <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
3831c: eb0030c7 bl 44640 <__errno> <== NOT EXECUTED
38320: e3a03005 mov r3, #5 <== NOT EXECUTED
38324: e5803000 str r3, [r0] <== NOT EXECUTED
38328: e3e00000 mvn r0, #0 <== NOT EXECUTED
3832c: eafffe8a b 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
38330: e2811004 add r1, r1, #4 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
38334: e2833001 add r3, r3, #1 <== NOT EXECUTED
38338: eaffff4f b 3807c <msdos_find_name_in_fat_file+0x5dc> <== NOT EXECUTED
3833c: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
38340: e59d602c ldr r6, [sp, #44] ; 0x2c <== NOT EXECUTED
38344: e59d8014 ldr r8, [sp, #20] <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
38348: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
3834c: eaffffb2 b 3821c <msdos_find_name_in_fat_file+0x77c> <== NOT EXECUTED
38350: e59d0050 ldr r0, [sp, #80] ; 0x50 <== NOT EXECUTED
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
38354: e59d1038 ldr r1, [sp, #56] ; 0x38 <== NOT EXECUTED
38358: e1510000 cmp r1, r0 <== NOT EXECUTED
3835c: e1a0700b mov r7, fp <== NOT EXECUTED
38360: e59d5044 ldr r5, [sp, #68] ; 0x44 <== NOT EXECUTED
38364: e59d4048 ldr r4, [sp, #72] ; 0x48 <== NOT EXECUTED
38368: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED
3836c: e59db04c ldr fp, [sp, #76] ; 0x4c <== NOT EXECUTED
38370: 1affff58 bne 380d8 <msdos_find_name_in_fat_file+0x638> <== NOT EXECUTED
38374: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
38378: e59d0084 ldr r0, [sp, #132] ; 0x84 <== NOT EXECUTED
3837c: e0833002 add r3, r3, r2 <== NOT EXECUTED
38380: e1530000 cmp r3, r0 <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
38384: 13e01000 mvnne r1, #0 <== NOT EXECUTED
38388: 158d1054 strne r1, [sp, #84] ; 0x54 <== NOT EXECUTED
3838c: eaffff51 b 380d8 <msdos_find_name_in_fat_file+0x638> <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
38390: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
38394: e3500000 cmp r0, #0 <== NOT EXECUTED
38398: 1afffecc bne 37ed0 <msdos_find_name_in_fat_file+0x430> <== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
3839c: e3a00c7d mov r0, #32000 ; 0x7d00 <== NOT EXECUTED
383a0: e2800001 add r0, r0, #1 <== NOT EXECUTED
383a4: eafffe6c b 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
383a8: e3a03000 mov r3, #0 <== NOT EXECUTED
383ac: e59d802c ldr r8, [sp, #44] ; 0x2c <== NOT EXECUTED
383b0: eafffee5 b 37f4c <msdos_find_name_in_fat_file+0x4ac> <== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
383b4: e3a00000 mov r0, #0 <== NOT EXECUTED
383b8: eafffe67 b 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
383bc: e0226899 mla r2, r9, r8, r6 <== NOT EXECUTED
383c0: e59dc038 ldr ip, [sp, #56] ; 0x38 <== NOT EXECUTED
383c4: e28c3001 add r3, ip, #1 <== NOT EXECUTED
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
383c8: e59dc090 ldr ip, [sp, #144] ; 0x90 <== NOT EXECUTED
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
383cc: e08302a2 add r0, r3, r2, lsr #5 <== NOT EXECUTED
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
383d0: e281107c add r1, r1, #124 ; 0x7c <== NOT EXECUTED
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
383d4: e3a03000 mov r3, #0 <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
383d8: e7dc2003 ldrb r2, [ip, r3] <== NOT EXECUTED
383dc: e3520020 cmp r2, #32 <== NOT EXECUTED
383e0: 1352002e cmpne r2, #46 ; 0x2e <== NOT EXECUTED
*c = '~';
383e4: 07cc1003 strbeq r1, [ip, r3] <== NOT EXECUTED
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
383e8: e2833001 add r3, r3, #1 <== NOT EXECUTED
383ec: e3530003 cmp r3, #3 <== NOT EXECUTED
383f0: 1afffff8 bne 383d8 <msdos_find_name_in_fat_file+0x938> <== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
383f4: e59d1090 ldr r1, [sp, #144] ; 0x90 <== NOT EXECUTED
383f8: e283307b add r3, r3, #123 ; 0x7b <== NOT EXECUTED
383fc: e5c13003 strb r3, [r1, #3] <== NOT EXECUTED
38400: e59f3068 ldr r3, [pc, #104] ; 38470 <msdos_find_name_in_fat_file+0x9d0><== NOT EXECUTED
38404: e59d1090 ldr r1, [sp, #144] ; 0x90 <== NOT EXECUTED
38408: e593c048 ldr ip, [r3, #72] ; 0x48 <== NOT EXECUTED
3840c: e3a0300c mov r3, #12 <== NOT EXECUTED
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
38410: e1a02350 asr r2, r0, r3 <== NOT EXECUTED
38414: e202200f and r2, r2, #15 <== NOT EXECUTED
38418: e7dc2002 ldrb r2, [ip, r2] <== NOT EXECUTED
3841c: e2433004 sub r3, r3, #4 <== NOT EXECUTED
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
for (i = 0; i < 4; i++, c++)
38420: e3730004 cmn r3, #4 <== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
38424: e5c12004 strb r2, [r1, #4] <== NOT EXECUTED
38428: e2811001 add r1, r1, #1 <== NOT EXECUTED
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
for (i = 0; i < 4; i++, c++)
3842c: 1afffff7 bne 38410 <msdos_find_name_in_fat_file+0x970> <== NOT EXECUTED
38430: eafffea9 b 37edc <msdos_find_name_in_fat_file+0x43c> <== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
38434: e3e00000 mvn r0, #0 <== NOT EXECUTED
38438: eafffe47 b 37d5c <msdos_find_name_in_fat_file+0x2bc> <== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
3843c: e3a01d11 mov r1, #1088 ; 0x440 <== NOT EXECUTED
38440: e2811009 add r1, r1, #9 <== NOT EXECUTED
38444: e59f0028 ldr r0, [pc, #40] ; 38474 <msdos_find_name_in_fat_file+0x9d4><== NOT EXECUTED
38448: e59f2028 ldr r2, [pc, #40] ; 38478 <msdos_find_name_in_fat_file+0x9d8><== NOT EXECUTED
3844c: e59f3028 ldr r3, [pc, #40] ; 3847c <msdos_find_name_in_fat_file+0x9dc><== NOT EXECUTED
38450: ebffc1f0 bl 28c18 <__assert_func> <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
38454: e3a01e41 mov r1, #1040 ; 0x410 <== NOT EXECUTED
38458: e2811009 add r1, r1, #9 <== NOT EXECUTED
3845c: e59f0010 ldr r0, [pc, #16] ; 38474 <msdos_find_name_in_fat_file+0x9d4><== NOT EXECUTED
38460: e59f2010 ldr r2, [pc, #16] ; 38478 <msdos_find_name_in_fat_file+0x9d8><== NOT EXECUTED
38464: e59f3014 ldr r3, [pc, #20] ; 38480 <msdos_find_name_in_fat_file+0x9e0><== NOT EXECUTED
38468: ebffc1ea bl 28c18 <__assert_func> <== NOT EXECUTED
00037938 <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
37938: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3793c: e1a08001 mov r8, r1 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37940: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
37944: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37948: e3510001 cmp r1, #1 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
3794c: e1a0b000 mov fp, r0 <== NOT EXECUTED
37950: e1a07002 mov r7, r2 <== NOT EXECUTED
37954: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
37958: e590a034 ldr sl, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
3795c: 0a000026 beq 379fc <msdos_find_node_by_cluster_num_in_fat_file+0xc4><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
37960: e1da60b6 ldrh r6, [sl, #6] <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37964: e59ac098 ldr ip, [sl, #152] ; 0x98 <== NOT EXECUTED
37968: e3a09000 mov r9, #0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
3796c: e1a0000b mov r0, fp <== NOT EXECUTED
37970: e1a01008 mov r1, r8 <== NOT EXECUTED
37974: e1a02009 mov r2, r9 <== NOT EXECUTED
37978: e1a03006 mov r3, r6 <== NOT EXECUTED
3797c: e58dc000 str ip, [sp] <== NOT EXECUTED
37980: ebffb87b bl 25b74 <fat_file_read> <== NOT EXECUTED
37984: e3500000 cmp r0, #0 <== NOT EXECUTED
37988: 0a000016 beq 379e8 <msdos_find_node_by_cluster_num_in_fat_file+0xb0><== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
3798c: e350001f cmp r0, #31 <== NOT EXECUTED
37990: da000034 ble 37a68 <msdos_find_node_by_cluster_num_in_fat_file+0x130><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
37994: e1500006 cmp r0, r6 <== NOT EXECUTED
37998: 1a000037 bne 37a7c <msdos_find_node_by_cluster_num_in_fat_file+0x144><== NOT EXECUTED
3799c: e59ac098 ldr ip, [sl, #152] ; 0x98 <== NOT EXECUTED
379a0: e3a04000 mov r4, #0 <== NOT EXECUTED
379a4: e1a0500c mov r5, ip <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
379a8: e7dc3004 ldrb r3, [ip, r4] <== NOT EXECUTED
379ac: e3530000 cmp r3, #0 <== NOT EXECUTED
379b0: 0a00000c beq 379e8 <msdos_find_node_by_cluster_num_in_fat_file+0xb0><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
379b4: e35300e5 cmp r3, #229 ; 0xe5 <== NOT EXECUTED
379b8: 0a000004 beq 379d0 <msdos_find_node_by_cluster_num_in_fat_file+0x98><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
379bc: e1d521b4 ldrh r2, [r5, #20] <== NOT EXECUTED
379c0: e1d531ba ldrh r3, [r5, #26] <== NOT EXECUTED
379c4: e1833802 orr r3, r3, r2, lsl #16 <== NOT EXECUTED
379c8: e1530007 cmp r3, r7 <== NOT EXECUTED
379cc: 0a000012 beq 37a1c <msdos_find_node_by_cluster_num_in_fat_file+0xe4><== NOT EXECUTED
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
379d0: e2844020 add r4, r4, #32 <== NOT EXECUTED
379d4: e1560004 cmp r6, r4 <== NOT EXECUTED
379d8: e2855020 add r5, r5, #32 <== NOT EXECUTED
379dc: 8afffff1 bhi 379a8 <msdos_find_node_by_cluster_num_in_fat_file+0x70><== NOT EXECUTED
379e0: e0899006 add r9, r9, r6 <== NOT EXECUTED
379e4: eaffffe0 b 3796c <msdos_find_node_by_cluster_num_in_fat_file+0x34><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
379e8: e3a06c7d mov r6, #32000 ; 0x7d00 <== NOT EXECUTED
379ec: e2866001 add r6, r6, #1 <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
379f0: e1a00006 mov r0, r6 <== NOT EXECUTED
379f4: e28dd008 add sp, sp, #8 <== NOT EXECUTED
379f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
379fc: e5983024 ldr r3, [r8, #36] ; 0x24 <== NOT EXECUTED
37a00: e3530000 cmp r3, #0 <== NOT EXECUTED
37a04: 1affffd5 bne 37960 <msdos_find_node_by_cluster_num_in_fat_file+0x28><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
37a08: e5da300a ldrb r3, [sl, #10] <== NOT EXECUTED
37a0c: e3130003 tst r3, #3 <== NOT EXECUTED
37a10: 0affffd2 beq 37960 <msdos_find_node_by_cluster_num_in_fat_file+0x28><== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
37a14: e5986018 ldr r6, [r8, #24] <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
37a18: eaffffd1 b 37964 <msdos_find_node_by_cluster_num_in_fat_file+0x2c><== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
37a1c: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
37a20: e1a0000b mov r0, fp <== NOT EXECUTED
37a24: e1a01008 mov r1, r8 <== NOT EXECUTED
37a28: e1a03009 mov r3, r9 <== NOT EXECUTED
37a2c: e3a02001 mov r2, #1 <== NOT EXECUTED
37a30: e58dc000 str ip, [sp] <== NOT EXECUTED
37a34: ebffb6c4 bl 2554c <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
37a38: e2506000 subs r6, r0, #0 <== NOT EXECUTED
37a3c: 1affffeb bne 379f0 <msdos_find_node_by_cluster_num_in_fat_file+0xb8><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
37a40: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = i;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
37a44: e3e03000 mvn r3, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
37a48: e582300c str r3, [r2, #12] <== NOT EXECUTED
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = i;
37a4c: e5824004 str r4, [r2, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
37a50: e5823008 str r3, [r2, #8] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
memcpy(dir_entry, entry,
37a54: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
37a58: e1a01005 mov r1, r5 <== NOT EXECUTED
37a5c: e3a02020 mov r2, #32 <== NOT EXECUTED
37a60: eb003fa6 bl 47900 <memcpy> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
37a64: eaffffe1 b 379f0 <msdos_find_node_by_cluster_num_in_fat_file+0xb8><== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
37a68: eb0032f4 bl 44640 <__errno> <== NOT EXECUTED
37a6c: e3a03005 mov r3, #5 <== NOT EXECUTED
37a70: e5803000 str r3, [r0] <== NOT EXECUTED
37a74: e3e06000 mvn r6, #0 <== NOT EXECUTED
37a78: eaffffdc b 379f0 <msdos_find_node_by_cluster_num_in_fat_file+0xb8><== NOT EXECUTED
assert(ret == bts2rd);
37a7c: e3a01e69 mov r1, #1680 ; 0x690 <== NOT EXECUTED
37a80: e2811005 add r1, r1, #5 <== NOT EXECUTED
37a84: e59f0008 ldr r0, [pc, #8] ; 37a94 <msdos_find_node_by_cluster_num_in_fat_file+0x15c><== NOT EXECUTED
37a88: e59f2008 ldr r2, [pc, #8] ; 37a98 <msdos_find_node_by_cluster_num_in_fat_file+0x160><== NOT EXECUTED
37a8c: e59f3008 ldr r3, [pc, #8] ; 37a9c <msdos_find_node_by_cluster_num_in_fat_file+0x164><== NOT EXECUTED
37a90: ebffc460 bl 28c18 <__assert_func> <== NOT EXECUTED
0001f374 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f374: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1f378: e1a05001 mov r5, r1 <== NOT EXECUTED
1f37c: e24dde2d sub sp, sp, #720 ; 0x2d0 <== NOT EXECUTED
1f380: e1a06000 mov r6, r0 <== NOT EXECUTED
int ret_val = 0;
int fd = -1;
int i;
msdos_format_param_t fmt_params;
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
1f384: e1a03000 mov r3, r0 <== NOT EXECUTED
1f388: e59f2e00 ldr r2, [pc, #3584] ; 20190 <msdos_format+0xe1c> <== NOT EXECUTED
1f38c: e3a01001 mov r1, #1 <== NOT EXECUTED
1f390: e1a00005 mov r0, r5 <== NOT EXECUTED
1f394: ebffff69 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"formating: %s\n", devname);
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f398: e1a00005 mov r0, r5 <== NOT EXECUTED
1f39c: e3a01002 mov r1, #2 <== NOT EXECUTED
1f3a0: e59f2dec ldr r2, [pc, #3564] ; 20194 <msdos_format+0xe20> <== NOT EXECUTED
1f3a4: e1a03006 mov r3, r6 <== NOT EXECUTED
1f3a8: ebffff64 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = stat(devname, &stat_buf);
1f3ac: e1a00006 mov r0, r6 <== NOT EXECUTED
1f3b0: e28d1f9f add r1, sp, #636 ; 0x27c <== NOT EXECUTED
1f3b4: ebffa89f bl 9638 <stat> <== NOT EXECUTED
ret_val = rc;
}
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) &&
1f3b8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1f3bc: 1a000007 bne 1f3e0 <msdos_format+0x6c> <== NOT EXECUTED
(!S_ISBLK(stat_buf.st_mode))) {
1f3c0: e59d3288 ldr r3, [sp, #648] ; 0x288 <== NOT EXECUTED
1f3c4: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1f3c8: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
1f3cc: 0a000010 beq 1f414 <msdos_format+0xa0> <== NOT EXECUTED
errno = ENOTTY;
1f3d0: eb00949a bl 44640 <__errno> <== NOT EXECUTED
1f3d4: e3a03019 mov r3, #25 <== NOT EXECUTED
1f3d8: e5803000 str r3, [r0] <== NOT EXECUTED
1f3dc: e3e04000 mvn r4, #0 <== NOT EXECUTED
1f3e0: e3a07000 mov r7, #0 <== NOT EXECUTED
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
1f3e4: e3e06000 mvn r6, #0 <== NOT EXECUTED
0xe5);
}
/*
* create master boot record
*/
if (ret_val == 0) {
1f3e8: e3540000 cmp r4, #0 <== NOT EXECUTED
1f3ec: 0a00005b beq 1f560 <msdos_format+0x1ec> <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
1f3f0: e3760001 cmn r6, #1 <== NOT EXECUTED
close(fd);
1f3f4: 11a00006 movne r0, r6 <== NOT EXECUTED
1f3f8: 1bffa129 blne 78a4 <close> <== NOT EXECUTED
}
if (dd != NULL) {
1f3fc: e3570000 cmp r7, #0 <== NOT EXECUTED
rtems_disk_release(dd);
1f400: 11a00007 movne r0, r7 <== NOT EXECUTED
1f404: 1bff9d88 blne 6a2c <rtems_disk_release> <== NOT EXECUTED
}
return ret_val;
}
1f408: e1a00004 mov r0, r4 <== NOT EXECUTED
1f40c: e28dde2d add sp, sp, #720 ; 0x2d0 <== NOT EXECUTED
1f410: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
1f414: e28d1fa5 add r1, sp, #660 ; 0x294 <== NOT EXECUTED
1f418: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
1f41c: ebff9cee bl 67dc <rtems_disk_obtain> <== NOT EXECUTED
if (dd == NULL) {
1f420: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1f424: 0a00034d beq 20160 <msdos_format+0xdec> <== NOT EXECUTED
/*
* open device for writing
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f428: e3a01002 mov r1, #2 <== NOT EXECUTED
1f42c: e59f2d64 ldr r2, [pc, #3428] ; 20198 <msdos_format+0xe24> <== NOT EXECUTED
1f430: e1a00005 mov r0, r5 <== NOT EXECUTED
1f434: ebffff41 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"open device\n");
fd = open(devname, O_RDWR);
1f438: e1a00006 mov r0, r6 <== NOT EXECUTED
1f43c: e3a01002 mov r1, #2 <== NOT EXECUTED
1f440: ebffa6b3 bl 8f14 <open> <== NOT EXECUTED
if (fd == -1)
1f444: e3700001 cmn r0, #1 <== NOT EXECUTED
* open device for writing
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"open device\n");
fd = open(devname, O_RDWR);
1f448: e1a06000 mov r6, r0 <== NOT EXECUTED
if (fd == -1)
1f44c: 01a04000 moveq r4, r0 <== NOT EXECUTED
1f450: 0affffe3 beq 1f3e4 <msdos_format+0x70> <== NOT EXECUTED
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
1f454: e28dcf8b add ip, sp, #556 ; 0x22c <== NOT EXECUTED
1f458: e1a01004 mov r1, r4 <== NOT EXECUTED
1f45c: e3a02050 mov r2, #80 ; 0x50 <== NOT EXECUTED
1f460: e1a0000c mov r0, ip <== NOT EXECUTED
1f464: e58dc020 str ip, [sp, #32] <== NOT EXECUTED
1f468: eb00a1ab bl 47b1c <memset> <== NOT EXECUTED
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
1f46c: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED
1f470: e58d322c str r3, [sp, #556] ; 0x22c <== NOT EXECUTED
fmt_params->totl_sector_cnt = dd->size;
1f474: e597c01c ldr ip, [r7, #28] <== NOT EXECUTED
total_size = dd->block_size * dd->size;
1f478: e0080c93 mul r8, r3, ip <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f47c: e1a00005 mov r0, r5 <== NOT EXECUTED
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
1f480: e3a09000 mov r9, #0 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f484: e3a01002 mov r1, #2 <== NOT EXECUTED
1f488: e59f2d0c ldr r2, [pc, #3340] ; 2019c <msdos_format+0xe28> <== NOT EXECUTED
1f48c: e58dc000 str ip, [sp] <== NOT EXECUTED
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
1f490: e58dc230 str ip, [sp, #560] ; 0x230 <== NOT EXECUTED
total_size = dd->block_size * dd->size;
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f494: e98d0300 stmib sp, {r8, r9} <== NOT EXECUTED
1f498: ebffff28 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
1f49c: e3550000 cmp r5, #0 <== NOT EXECUTED
1f4a0: 0a00025d beq 1fe1c <msdos_format+0xaa8> <== NOT EXECUTED
(rqdata->fat_num == 0)) {
1f4a4: e595c00c ldr ip, [r5, #12] <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
1f4a8: e35c0000 cmp ip, #0 <== NOT EXECUTED
1f4ac: 0a000133 beq 1f980 <msdos_format+0x60c> <== NOT EXECUTED
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
1f4b0: e35c0006 cmp ip, #6 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1f4b4: 83a02016 movhi r2, #22 <== NOT EXECUTED
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
1f4b8: 8a00023f bhi 1fdbc <msdos_format+0xa48> <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
1f4bc: e20cc0ff and ip, ip, #255 ; 0xff <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f4c0: e1a0300c mov r3, ip <== NOT EXECUTED
1f4c4: e1a00005 mov r0, r5 <== NOT EXECUTED
1f4c8: e3a01002 mov r1, #2 <== NOT EXECUTED
1f4cc: e59f2ccc ldr r2, [pc, #3276] ; 201a0 <msdos_format+0xe2c> <== NOT EXECUTED
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
1f4d0: e5cdc25c strb ip, [sp, #604] ; 0x25c <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f4d4: ebffff19 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
1f4d8: e3a03001 mov r3, #1 <== NOT EXECUTED
1f4dc: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
1f4e0: e5d53014 ldrb r3, [r5, #20] <== NOT EXECUTED
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
1f4e4: e3530001 cmp r3, #1 <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
1f4e8: 03a00000 moveq r0, #0 <== NOT EXECUTED
1f4ec: 05cd325e strbeq r3, [sp, #606] ; 0x25e <== NOT EXECUTED
1f4f0: 058d0014 streq r0, [sp, #20] <== NOT EXECUTED
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
1f4f4: 0a00012f beq 1f9b8 <msdos_format+0x644> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
1f4f8: e3530002 cmp r3, #2 <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
1f4fc: 03a01000 moveq r1, #0 <== NOT EXECUTED
1f500: 05cd325e strbeq r3, [sp, #606] ; 0x25e <== NOT EXECUTED
1f504: 058d1014 streq r1, [sp, #20] <== NOT EXECUTED
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
1f508: 0a00012a beq 1f9b8 <msdos_format+0x644> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
1f50c: e3530003 cmp r3, #3 <== NOT EXECUTED
1f510: 0a000124 beq 1f9a8 <msdos_format+0x634> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
1f514: e3530000 cmp r3, #0 <== NOT EXECUTED
1f518: 1a000256 bne 1fe78 <msdos_format+0xb04> <== NOT EXECUTED
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
1f51c: e59d2230 ldr r2, [sp, #560] ; 0x230 <== NOT EXECUTED
1f520: e3a03c7f mov r3, #32512 ; 0x7f00 <== NOT EXECUTED
1f524: e28330a7 add r3, r3, #167 ; 0xa7 <== NOT EXECUTED
1f528: e1520003 cmp r2, r3 <== NOT EXECUTED
1f52c: 8a0002b2 bhi 1fffc <msdos_format+0xc88> <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
1f530: e3a03001 mov r3, #1 <== NOT EXECUTED
1f534: e5cd325e strb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
1f538: e3a03002 mov r3, #2 <== NOT EXECUTED
1f53c: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
1f540: e3550000 cmp r5, #0 <== NOT EXECUTED
1f544: 13a0c000 movne ip, #0 <== NOT EXECUTED
1f548: 158dc014 strne ip, [sp, #20] <== NOT EXECUTED
1f54c: 1a000119 bne 1f9b8 <msdos_format+0x644> <== NOT EXECUTED
1f550: e59d2238 ldr r2, [sp, #568] ; 0x238 <== NOT EXECUTED
1f554: e58d5014 str r5, [sp, #20] <== NOT EXECUTED
1f558: e1a03002 mov r3, r2 <== NOT EXECUTED
1f55c: ea00011a b 1f9cc <msdos_format+0x658> <== NOT EXECUTED
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f560: e1a00005 mov r0, r5 <== NOT EXECUTED
1f564: e3a01002 mov r1, #2 <== NOT EXECUTED
1f568: e59f2c34 ldr r2, [pc, #3124] ; 201a4 <msdos_format+0xe30> <== NOT EXECUTED
1f56c: ebfffef3 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f570: e1a00006 mov r0, r6 <== NOT EXECUTED
1f574: e3a01000 mov r1, #0 <== NOT EXECUTED
1f578: e3a02000 mov r2, #0 <== NOT EXECUTED
1f57c: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
1f580: e59d422c ldr r4, [sp, #556] ; 0x22c <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f584: eb002acf bl 2a0c8 <lseek> <== NOT EXECUTED
1f588: e3510000 cmp r1, #0 <== NOT EXECUTED
1f58c: ba0000f9 blt 1f978 <msdos_format+0x604> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
1f590: e1a02004 mov r2, r4 <== NOT EXECUTED
1f594: e1a00006 mov r0, r6 <== NOT EXECUTED
1f598: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED
1f59c: ebffa710 bl 91e4 <read> <== NOT EXECUTED
1f5a0: e3500000 cmp r0, #0 <== NOT EXECUTED
1f5a4: ba0000f3 blt 1f978 <msdos_format+0x604> <== NOT EXECUTED
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f5a8: e1a00005 mov r0, r5 <== NOT EXECUTED
1f5ac: e3a01002 mov r1, #2 <== NOT EXECUTED
1f5b0: e59f2bf0 ldr r2, [pc, #3056] ; 201a8 <msdos_format+0xe34> <== NOT EXECUTED
1f5b4: ebfffee1 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
1f5b8: e59d3230 ldr r3, [sp, #560] ; 0x230 <== NOT EXECUTED
1f5bc: e3530801 cmp r3, #65536 ; 0x10000 <== NOT EXECUTED
1f5c0: 3a00021d bcc 1fe3c <msdos_format+0xac8> <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
1f5c4: e1a02803 lsl r2, r3, #16 <== NOT EXECUTED
1f5c8: e1a01823 lsr r1, r3, #16 <== NOT EXECUTED
1f5cc: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
1f5d0: e3a0c000 mov ip, #0 <== NOT EXECUTED
1f5d4: e1a02422 lsr r2, r2, #8 <== NOT EXECUTED
1f5d8: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED
1f5dc: e1a0ac23 lsr sl, r3, #24 <== NOT EXECUTED
1f5e0: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
1f5e4: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
1f5e8: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
1f5ec: e58d1014 str r1, [sp, #20] <== NOT EXECUTED
1f5f0: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
1f5f4: e58dc01c str ip, [sp, #28] <== NOT EXECUTED
* finally we are there: let's fill in the values into the MBR
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
1f5f8: e3a08000 mov r8, #0 <== NOT EXECUTED
1f5fc: e28d402c add r4, sp, #44 ; 0x2c <== NOT EXECUTED
1f600: e3a02f6f mov r2, #444 ; 0x1bc <== NOT EXECUTED
1f604: e2822002 add r2, r2, #2 <== NOT EXECUTED
1f608: e1a01008 mov r1, r8 <== NOT EXECUTED
1f60c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f610: eb00a141 bl 47b1c <memset> <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1f614: e28d0f8b add r0, sp, #556 ; 0x22c <== NOT EXECUTED
1f618: e58d0020 str r0, [sp, #32] <== NOT EXECUTED
1f61c: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
1f620: e3a03f7f mov r3, #508 ; 0x1fc <== NOT EXECUTED
1f624: e2833002 add r3, r3, #2 <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1f628: e2821033 add r1, r2, #51 ; 0x33 <== NOT EXECUTED
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
1f62c: e18480b3 strh r8, [r4, r3] <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1f630: e3a02008 mov r2, #8 <== NOT EXECUTED
1f634: e2840003 add r0, r4, #3 <== NOT EXECUTED
1f638: eb00a0b0 bl 47900 <memcpy> <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
1f63c: e59db244 ldr fp, [sp, #580] ; 0x244 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1f640: e5dd025d ldrb r0, [sp, #605] ; 0x25d <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
1f644: e1a0c42b lsr ip, fp, #8 <== NOT EXECUTED
1f648: e5cdc03e strb ip, [sp, #62] ; 0x3e <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1f64c: e5cd0041 strb r0, [sp, #65] ; 0x41 <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
1f650: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
1f654: e3e00000 mvn r0, #0 <== NOT EXECUTED
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
1f658: e59d122c ldr r1, [sp, #556] ; 0x22c <== NOT EXECUTED
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
1f65c: e5cd0044 strb r0, [sp, #68] ; 0x44 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1f660: e3a00006 mov r0, #6 <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
1f664: e5cdc03f strb ip, [sp, #63] ; 0x3f <== NOT EXECUTED
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1f668: e5cd0046 strb r0, [sp, #70] ; 0x46 <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
1f66c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
1f670: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
1f674: e59d2234 ldr r2, [sp, #564] ; 0x234 <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
1f678: e5dd325e ldrb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
1f67c: e1a09421 lsr r9, r1, #8 <== NOT EXECUTED
1f680: e5cd9038 strb r9, [sp, #56] ; 0x38 <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
1f684: e5cdc040 strb ip, [sp, #64] ; 0x40 <== NOT EXECUTED
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
1f688: e59d9238 ldr r9, [sp, #568] ; 0x238 <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
1f68c: e5cd004c strb r0, [sp, #76] ; 0x4c <== NOT EXECUTED
1f690: e28d0014 add r0, sp, #20 <== NOT EXECUTED
1f694: e8901001 ldm r0, {r0, ip} <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
1f698: e1a0e422 lsr lr, r2, #8 <== NOT EXECUTED
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
1f69c: e5cd1037 strb r1, [sp, #55] ; 0x37 <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
1f6a0: e5cd203a strb r2, [sp, #58] ; 0x3a <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
1f6a4: e3530004 cmp r3, #4 <== NOT EXECUTED
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
1f6a8: e3a01002 mov r1, #2 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
1f6ac: e3a02001 mov r2, #1 <== NOT EXECUTED
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
1f6b0: e5cd9039 strb r9, [sp, #57] ; 0x39 <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
1f6b4: e5cde03b strb lr, [sp, #59] ; 0x3b <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
1f6b8: e5cdc04d strb ip, [sp, #77] ; 0x4d <== NOT EXECUTED
1f6bc: e5cd004e strb r0, [sp, #78] ; 0x4e <== NOT EXECUTED
1f6c0: e5cda04f strb sl, [sp, #79] ; 0x4f <== NOT EXECUTED
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
1f6c4: e5cd103c strb r1, [sp, #60] ; 0x3c <== NOT EXECUTED
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
1f6c8: e5cdb03d strb fp, [sp, #61] ; 0x3d <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
1f6cc: e5cd8045 strb r8, [sp, #69] ; 0x45 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1f6d0: e5cd8047 strb r8, [sp, #71] ; 0x47 <== NOT EXECUTED
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
1f6d4: e5cd2048 strb r2, [sp, #72] ; 0x48 <== NOT EXECUTED
1f6d8: e5cd8049 strb r8, [sp, #73] ; 0x49 <== NOT EXECUTED
1f6dc: e5cd804a strb r8, [sp, #74] ; 0x4a <== NOT EXECUTED
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
1f6e0: e1a03008 mov r3, r8 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
1f6e4: e5cd804b strb r8, [sp, #75] ; 0x4b <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
1f6e8: 0a00025d beq 20064 <msdos_format+0xcf0> <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
1f6ec: e59db23c ldr fp, [sp, #572] ; 0x23c <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1f6f0: e59dc278 ldr ip, [sp, #632] ; 0x278 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1f6f4: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
1f6f8: e1a0e42b lsr lr, fp, #8 <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1f6fc: e280103c add r1, r0, #60 ; 0x3c <== NOT EXECUTED
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1f700: e1a09c2c lsr r9, ip, #24 <== NOT EXECUTED
1f704: e1a0842c lsr r8, ip, #8 <== NOT EXECUTED
1f708: e1a0a82c lsr sl, ip, #16 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1f70c: e3a0200b mov r2, #11 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
1f710: e5cde043 strb lr, [sp, #67] ; 0x43 <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1f714: e284002b add r0, r4, #43 ; 0x2b <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
1f718: e3a0e029 mov lr, #41 ; 0x29 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
1f71c: e5cd3051 strb r3, [sp, #81] ; 0x51 <== NOT EXECUTED
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
1f720: e5cd3050 strb r3, [sp, #80] ; 0x50 <== NOT EXECUTED
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
1f724: e5cde052 strb lr, [sp, #82] ; 0x52 <== NOT EXECUTED
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1f728: e5cd8054 strb r8, [sp, #84] ; 0x54 <== NOT EXECUTED
1f72c: e5cda055 strb sl, [sp, #85] ; 0x55 <== NOT EXECUTED
1f730: e5cd9056 strb r9, [sp, #86] ; 0x56 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
1f734: e5cdb042 strb fp, [sp, #66] ; 0x42 <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1f738: e5cdc053 strb ip, [sp, #83] ; 0x53 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1f73c: eb00a06f bl 47900 <memcpy> <== NOT EXECUTED
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
1f740: e5dd125e ldrb r1, [sp, #606] ; 0x25e <== NOT EXECUTED
1f744: e59f2a60 ldr r2, [pc, #2656] ; 201ac <msdos_format+0xe38> <== NOT EXECUTED
1f748: e59f3a60 ldr r3, [pc, #2656] ; 201b0 <msdos_format+0xe3c> <== NOT EXECUTED
1f74c: e3510001 cmp r1, #1 <== NOT EXECUTED
1f750: 01a01002 moveq r1, r2 <== NOT EXECUTED
1f754: 11a01003 movne r1, r3 <== NOT EXECUTED
1f758: e2840036 add r0, r4, #54 ; 0x36 <== NOT EXECUTED
1f75c: e3a02008 mov r2, #8 <== NOT EXECUTED
1f760: eb00a066 bl 47900 <memcpy> <== NOT EXECUTED
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
1f764: e3a03055 mov r3, #85 ; 0x55 <== NOT EXECUTED
1f768: e5cd322a strb r3, [sp, #554] ; 0x22a <== NOT EXECUTED
1f76c: e3e03055 mvn r3, #85 ; 0x55 <== NOT EXECUTED
1f770: e5cd322b strb r3, [sp, #555] ; 0x22b <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
1f774: e3e03014 mvn r3, #20 <== NOT EXECUTED
1f778: e5cd302c strb r3, [sp, #44] ; 0x2c <== NOT EXECUTED
FAT_SET_VAL8(mbr,1,0x3c);
1f77c: e3a0303c mov r3, #60 ; 0x3c <== NOT EXECUTED
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f780: e1a00005 mov r0, r5 <== NOT EXECUTED
1f784: e3a01002 mov r1, #2 <== NOT EXECUTED
1f788: e59f2a24 ldr r2, [pc, #2596] ; 201b4 <msdos_format+0xe40> <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
1f78c: e5cd302d strb r3, [sp, #45] ; 0x2d <== NOT EXECUTED
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
1f790: e28d802c add r8, sp, #44 ; 0x2c <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
FAT_SET_VAL8(mbr,2,0x90);
1f794: e3e0306f mvn r3, #111 ; 0x6f <== NOT EXECUTED
1f798: e5cd302e strb r3, [sp, #46] ; 0x2e <== NOT EXECUTED
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f79c: ebfffe67 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
1f7a0: e1a00006 mov r0, r6 <== NOT EXECUTED
1f7a4: e3a01000 mov r1, #0 <== NOT EXECUTED
1f7a8: e59d222c ldr r2, [sp, #556] ; 0x22c <== NOT EXECUTED
1f7ac: e1a03008 mov r3, r8 <== NOT EXECUTED
1f7b0: ebfffe79 bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
1f7b4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1f7b8: 1affff0c bne 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1f7bc: e59d3254 ldr r3, [sp, #596] ; 0x254 <== NOT EXECUTED
1f7c0: e3530000 cmp r3, #0 <== NOT EXECUTED
1f7c4: 1a0001d9 bne 1ff30 <msdos_format+0xbbc> <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
1f7c8: e59d3258 ldr r3, [sp, #600] ; 0x258 <== NOT EXECUTED
1f7cc: e3530000 cmp r3, #0 <== NOT EXECUTED
1f7d0: 1a0001ae bne 1fe90 <msdos_format+0xb1c> <== NOT EXECUTED
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
1f7d4: e59d223c ldr r2, [sp, #572] ; 0x23c <== NOT EXECUTED
1f7d8: e59dc22c ldr ip, [sp, #556] ; 0x22c <== NOT EXECUTED
1f7dc: e5dd325c ldrb r3, [sp, #604] ; 0x25c <== NOT EXECUTED
1f7e0: e58dc000 str ip, [sp] <== NOT EXECUTED
1f7e4: e0030392 mul r3, r2, r3 <== NOT EXECUTED
1f7e8: e3a0c000 mov ip, #0 <== NOT EXECUTED
1f7ec: e59d2234 ldr r2, [sp, #564] ; 0x234 <== NOT EXECUTED
1f7f0: e1a00005 mov r0, r5 <== NOT EXECUTED
1f7f4: e1a01006 mov r1, r6 <== NOT EXECUTED
1f7f8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1f7fc: ebfffe7a bl 1f1ec <msdos_format_fill_sectors> <== NOT EXECUTED
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
1f800: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1f804: 1afffef9 bne 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1f808: e59dc22c ldr ip, [sp, #556] ; 0x22c <== NOT EXECUTED
1f80c: e1a00005 mov r0, r5 <== NOT EXECUTED
1f810: e28d2f93 add r2, sp, #588 ; 0x24c <== NOT EXECUTED
1f814: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
1f818: e1a01006 mov r1, r6 <== NOT EXECUTED
1f81c: e58d4004 str r4, [sp, #4] <== NOT EXECUTED
1f820: e58dc000 str ip, [sp] <== NOT EXECUTED
1f824: ebfffe70 bl 1f1ec <msdos_format_fill_sectors> <== NOT EXECUTED
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
1f828: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1f82c: 1afffeef bne 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1f830: e5dd3274 ldrb r3, [sp, #628] ; 0x274 <== NOT EXECUTED
1f834: e3530000 cmp r3, #0 <== NOT EXECUTED
1f838: 0afffeec beq 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
memset(tmp_sec,0,sizeof(tmp_sec));
1f83c: e28d502c add r5, sp, #44 ; 0x2c <== NOT EXECUTED
1f840: e1a01004 mov r1, r4 <== NOT EXECUTED
1f844: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1f848: e1a00005 mov r0, r5 <== NOT EXECUTED
1f84c: eb00a0b2 bl 47b1c <memset> <== NOT EXECUTED
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
1f850: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
1f854: e280303c add r3, r0, #60 ; 0x3c <== NOT EXECUTED
1f858: e8930007 ldm r3, {r0, r1, r2} <== NOT EXECUTED
1f85c: e1a03005 mov r3, r5 <== NOT EXECUTED
1f860: e8a30003 stmia r3!, {r0, r1} <== NOT EXECUTED
1f864: e1a0c822 lsr ip, r2, #16 <== NOT EXECUTED
1f868: e1c320b0 strh r2, [r3] <== NOT EXECUTED
1f86c: e5c5c00a strb ip, [r5, #10] <== NOT EXECUTED
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
1f870: e1a00006 mov r0, r6 <== NOT EXECUTED
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
1f874: e3a0c008 mov ip, #8 <== NOT EXECUTED
ret_val = msdos_format_write_sec
1f878: e59d124c ldr r1, [sp, #588] ; 0x24c <== NOT EXECUTED
1f87c: e59d222c ldr r2, [sp, #556] ; 0x22c <== NOT EXECUTED
1f880: e1a03005 mov r3, r5 <== NOT EXECUTED
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
1f884: e5cdc037 strb ip, [sp, #55] ; 0x37 <== NOT EXECUTED
ret_val = msdos_format_write_sec
1f888: ebfffe43 bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
1f88c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1f890: 1afffed6 bne 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1f894: e5dd3274 ldrb r3, [sp, #628] ; 0x274 <== NOT EXECUTED
1f898: e3530000 cmp r3, #0 <== NOT EXECUTED
1f89c: 0afffed3 beq 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
1f8a0: e1a00005 mov r0, r5 <== NOT EXECUTED
1f8a4: e1a01004 mov r1, r4 <== NOT EXECUTED
1f8a8: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1f8ac: eb00a09a bl 47b1c <memset> <== NOT EXECUTED
switch(fmt_params.fattype) {
1f8b0: e5dd325e ldrb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
1f8b4: e3530002 cmp r3, #2 <== NOT EXECUTED
1f8b8: 0a0001ba beq 1ffa8 <msdos_format+0xc34> <== NOT EXECUTED
1f8bc: e3530004 cmp r3, #4 <== NOT EXECUTED
1f8c0: 0a0001a8 beq 1ff68 <msdos_format+0xbf4> <== NOT EXECUTED
1f8c4: e3530001 cmp r3, #1 <== NOT EXECUTED
1f8c8: 0a0001c1 beq 1ffd4 <msdos_format+0xc60> <== NOT EXECUTED
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
1f8cc: eb00935b bl 44640 <__errno> <== NOT EXECUTED
1f8d0: e3a03016 mov r3, #22 <== NOT EXECUTED
1f8d4: e5803000 str r3, [r0] <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
1f8d8: e5dd325e ldrb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
1f8dc: e3530004 cmp r3, #4 <== NOT EXECUTED
1f8e0: 1a000024 bne 1f978 <msdos_format+0x604> <== NOT EXECUTED
1f8e4: e3e04000 mvn r4, #0 <== NOT EXECUTED
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
1f8e8: e3e01007 mvn r1, #7 <== NOT EXECUTED
1f8ec: e5dd225c ldrb r2, [sp, #604] ; 0x25c <== NOT EXECUTED
1f8f0: e3e03000 mvn r3, #0 <== NOT EXECUTED
1f8f4: e5cd1034 strb r1, [sp, #52] ; 0x34 <== NOT EXECUTED
1f8f8: e3a0100f mov r1, #15 <== NOT EXECUTED
1f8fc: e5cd3036 strb r3, [sp, #54] ; 0x36 <== NOT EXECUTED
1f900: e5cd3035 strb r3, [sp, #53] ; 0x35 <== NOT EXECUTED
1f904: e5cd1037 strb r1, [sp, #55] ; 0x37 <== NOT EXECUTED
1f908: e2743001 rsbs r3, r4, #1 <== NOT EXECUTED
1f90c: 33a03000 movcc r3, #0 <== NOT EXECUTED
1f910: e3520000 cmp r2, #0 <== NOT EXECUTED
1f914: 03a03000 moveq r3, #0 <== NOT EXECUTED
}
for (i = 0;
1f918: e3530000 cmp r3, #0 <== NOT EXECUTED
1f91c: 0afffeb3 beq 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1f920: e59d123c ldr r1, [sp, #572] ; 0x23c <== NOT EXECUTED
1f924: e3a05000 mov r5, #0 <== NOT EXECUTED
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
1f928: e28d802c add r8, sp, #44 ; 0x2c <== NOT EXECUTED
1f92c: ea000000 b 1f934 <msdos_format+0x5c0> <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
1f930: e59d123c ldr r1, [sp, #572] ; 0x23c <== NOT EXECUTED
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
1f934: e59d3234 ldr r3, [sp, #564] ; 0x234 <== NOT EXECUTED
1f938: e59d222c ldr r2, [sp, #556] ; 0x22c <== NOT EXECUTED
1f93c: e0213195 mla r1, r5, r1, r3 <== NOT EXECUTED
1f940: e1a00006 mov r0, r6 <== NOT EXECUTED
1f944: e1a03008 mov r3, r8 <== NOT EXECUTED
1f948: ebfffe13 bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
1f94c: e5dd325c ldrb r3, [sp, #604] ; 0x25c <== NOT EXECUTED
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
1f950: e2855001 add r5, r5, #1 <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
1f954: e1530005 cmp r3, r5 <== NOT EXECUTED
1f958: d3a02000 movle r2, #0 <== NOT EXECUTED
1f95c: c3a02001 movgt r2, #1 <== NOT EXECUTED
1f960: e3500000 cmp r0, #0 <== NOT EXECUTED
1f964: 13a02000 movne r2, #0 <== NOT EXECUTED
1f968: e3520000 cmp r2, #0 <== NOT EXECUTED
1f96c: 1affffef bne 1f930 <msdos_format+0x5bc> <== NOT EXECUTED
1f970: e1a04000 mov r4, r0 <== NOT EXECUTED
1f974: eafffe9d b 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1f978: e3e04000 mvn r4, #0 <== NOT EXECUTED
1f97c: eafffe9b b 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
1f980: e3a0c002 mov ip, #2 <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f984: e1a0300c mov r3, ip <== NOT EXECUTED
1f988: e1a0100c mov r1, ip <== NOT EXECUTED
1f98c: e1a00005 mov r0, r5 <== NOT EXECUTED
1f990: e59f2808 ldr r2, [pc, #2056] ; 201a0 <msdos_format+0xe2c> <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
1f994: e5cdc25c strb ip, [sp, #604] ; 0x25c <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f998: ebfffde8 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
1f99c: e3a03001 mov r3, #1 <== NOT EXECUTED
1f9a0: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
1f9a4: eafffecd b 1f4e0 <msdos_format+0x16c> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
1f9a8: e3a03004 mov r3, #4 <== NOT EXECUTED
1f9ac: e3a02000 mov r2, #0 <== NOT EXECUTED
1f9b0: e5cd325e strb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
1f9b4: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
(rqdata->sectors_per_cluster > 0)) {
1f9b8: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
1f9bc: e3530000 cmp r3, #0 <== NOT EXECUTED
1f9c0: 059d2238 ldreq r2, [sp, #568] ; 0x238 <== NOT EXECUTED
1f9c4: 11a02003 movne r2, r3 <== NOT EXECUTED
1f9c8: 01a03002 moveq r3, r2 <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
1f9cc: e59da22c ldr sl, [sp, #556] ; 0x22c <== NOT EXECUTED
1f9d0: e3a04080 mov r4, #128 ; 0x80 <== NOT EXECUTED
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
1f9d4: e1540003 cmp r4, r3 <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
1f9d8: e3a08000 mov r8, #0 <== NOT EXECUTED
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1f9dc: e1a0100a mov r1, sl <== NOT EXECUTED
1f9e0: e3a00902 mov r0, #32768 ; 0x8000 <== NOT EXECUTED
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
1f9e4: 81a03002 movhi r3, r2 <== NOT EXECUTED
1f9e8: 8a000003 bhi 1f9fc <msdos_format+0x688> <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1f9ec: eb00f2e2 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
1f9f0: e1500004 cmp r0, r4 <== NOT EXECUTED
1f9f4: 2a00000d bcs 1fa30 <msdos_format+0x6bc> <== NOT EXECUTED
1f9f8: e1a03004 mov r3, r4 <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
1f9fc: e2888001 add r8, r8, #1 <== NOT EXECUTED
1fa00: e3580008 cmp r8, #8 <== NOT EXECUTED
1fa04: e1a040a4 lsr r4, r4, #1 <== NOT EXECUTED
1fa08: 0a0001de beq 20188 <msdos_format+0xe14> <== NOT EXECUTED
1fa0c: e1a02003 mov r2, r3 <== NOT EXECUTED
if (fmt_params->sectors_per_cluster >= onebit) {
1fa10: e1540003 cmp r4, r3 <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1fa14: e1a0100a mov r1, sl <== NOT EXECUTED
1fa18: e3a00902 mov r0, #32768 ; 0x8000 <== NOT EXECUTED
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
1fa1c: 81a03002 movhi r3, r2 <== NOT EXECUTED
1fa20: 8afffff5 bhi 1f9fc <msdos_format+0x688> <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1fa24: eb00f2d4 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
1fa28: e1500004 cmp r0, r4 <== NOT EXECUTED
1fa2c: 3afffff1 bcc 1f9f8 <msdos_format+0x684> <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
1fa30: e58d4238 str r4, [sp, #568] ; 0x238 <== NOT EXECUTED
}
}
}
}
if (ret_val == 0) {
1fa34: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
1fa38: e3500000 cmp r0, #0 <== NOT EXECUTED
1fa3c: 1a0000f1 bne 1fe08 <msdos_format+0xa94> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1fa40: e1a00005 mov r0, r5 <== NOT EXECUTED
1fa44: e3a01002 mov r1, #2 <== NOT EXECUTED
1fa48: e59f2768 ldr r2, [pc, #1896] ; 201b8 <msdos_format+0xe44> <== NOT EXECUTED
1fa4c: e59d3238 ldr r3, [sp, #568] ; 0x238 <== NOT EXECUTED
1fa50: ebfffdba bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
1fa54: e5dda25e ldrb sl, [sp, #606] ; 0x25e <== NOT EXECUTED
1fa58: e35a0004 cmp sl, #4 <== NOT EXECUTED
1fa5c: 0a0001b4 beq 20134 <msdos_format+0xdc0> <== NOT EXECUTED
fmt_params->fsinfo_sec = 1;
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
1fa60: e3a03001 mov r3, #1 <== NOT EXECUTED
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
1fa64: e3550000 cmp r5, #0 <== NOT EXECUTED
fmt_params->fsinfo_sec = 1;
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
1fa68: e58d3234 str r3, [sp, #564] ; 0x234 <== NOT EXECUTED
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
1fa6c: 0a0000fc beq 1fe64 <msdos_format+0xaf0> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
1fa70: e5954010 ldr r4, [r5, #16] <== NOT EXECUTED
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
1fa74: e3540000 cmp r4, #0 <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
1fa78: 12444001 subne r4, r4, #1 <== NOT EXECUTED
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
1fa7c: 0a0000f8 beq 1fe64 <msdos_format+0xaf0> <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
1fa80: e59d922c ldr r9, [sp, #556] ; 0x22c <== NOT EXECUTED
1fa84: e1a01089 lsl r1, r9, #1 <== NOT EXECUTED
1fa88: e1a012a1 lsr r1, r1, #5 <== NOT EXECUTED
1fa8c: e0844001 add r4, r4, r1 <== NOT EXECUTED
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
1fa90: e1a00004 mov r0, r4 <== NOT EXECUTED
1fa94: eb00f34c bl 5c7cc <__umodsi3> <== NOT EXECUTED
1fa98: e0600004 rsb r0, r0, r4 <== NOT EXECUTED
1fa9c: e58d0244 str r0, [sp, #580] ; 0x244 <== NOT EXECUTED
1faa0: e1a00280 lsl r0, r0, #5 <== NOT EXECUTED
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
1faa4: e249c001 sub ip, r9, #1 <== NOT EXECUTED
1faa8: e08c0000 add r0, ip, r0 <== NOT EXECUTED
1faac: e1a01009 mov r1, r9 <== NOT EXECUTED
1fab0: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
1fab4: eb00f2b0 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
1fab8: e59d2230 ldr r2, [sp, #560] ; 0x230 <== NOT EXECUTED
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
1fabc: e1a03000 mov r3, r0 <== NOT EXECUTED
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
1fac0: e59d0234 ldr r0, [sp, #564] ; 0x234 <== NOT EXECUTED
1fac4: e0602002 rsb r2, r0, r2 <== NOT EXECUTED
1fac8: e58d0028 str r0, [sp, #40] ; 0x28 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1facc: e1a01009 mov r1, r9 <== NOT EXECUTED
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
1fad0: e0632002 rsb r2, r3, r2 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1fad4: e3a00902 mov r0, #32768 ; 0x8000 <== NOT EXECUTED
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
1fad8: e58d2024 str r2, [sp, #36] ; 0x24 <== NOT EXECUTED
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
1fadc: e58d3248 str r3, [sp, #584] ; 0x248 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1fae0: eb00f2a5 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
1fae4: e59d4238 ldr r4, [sp, #568] ; 0x238 <== NOT EXECUTED
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
1fae8: e5dd125c ldrb r1, [sp, #604] ; 0x25c <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1faec: e1540000 cmp r4, r0 <== NOT EXECUTED
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
1faf0: e58d100c str r1, [sp, #12] <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1faf4: 9a000002 bls 1fb04 <msdos_format+0x790> <== NOT EXECUTED
sectors_per_cluster /= 2;
1faf8: e1a040a4 lsr r4, r4, #1 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1fafc: e1540000 cmp r4, r0 <== NOT EXECUTED
1fb00: 8afffffc bhi 1faf8 <msdos_format+0x784> <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1fb04: e3a00eff mov r0, #4080 ; 0xff0 <== NOT EXECUTED
1fb08: e3a0b801 mov fp, #65536 ; 0x10000 <== NOT EXECUTED
1fb0c: e2800005 add r0, r0, #5 <== NOT EXECUTED
1fb10: e24bb00b sub fp, fp, #11 <== NOT EXECUTED
1fb14: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
1fb18: e58db01c str fp, [sp, #28] <== NOT EXECUTED
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
1fb1c: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
1fb20: e1a01004 mov r1, r4 <== NOT EXECUTED
1fb24: eb00f294 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (fattype == FAT_FAT12) {
1fb28: e35a0001 cmp sl, #1 <== NOT EXECUTED
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
1fb2c: e1a08000 mov r8, r0 <== NOT EXECUTED
if (fattype == FAT_FAT12) {
1fb30: 0a000075 beq 1fd0c <msdos_format+0x998> <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
1fb34: e35a0002 cmp sl, #2 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1fb38: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fat_capacity = fatdata_cluster_cnt * 2;
1fb3c: 01a00080 lsleq r0, r0, #1 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
1fb40: 11a00108 lslne r0, r8, #2 <== NOT EXECUTED
}
sectors_per_fat = ((fat_capacity
1fb44: e0810000 add r0, r1, r0 <== NOT EXECUTED
1fb48: e1a01009 mov r1, r9 <== NOT EXECUTED
1fb4c: eb00f28a bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1fb50: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1fb54: e1a0b000 mov fp, r0 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1fb58: e2440001 sub r0, r4, #1 <== NOT EXECUTED
1fb5c: e0200b92 mla r0, r2, fp, r0 <== NOT EXECUTED
1fb60: e1a01004 mov r1, r4 <== NOT EXECUTED
1fb64: eb00f284 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
1fb68: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
1fb6c: e0600008 rsb r0, r0, r8 <== NOT EXECUTED
1fb70: e150000c cmp r0, ip <== NOT EXECUTED
1fb74: 93a03000 movls r3, #0 <== NOT EXECUTED
1fb78: 83a03001 movhi r3, #1 <== NOT EXECUTED
1fb7c: e35a0002 cmp sl, #2 <== NOT EXECUTED
1fb80: 13a03000 movne r3, #0 <== NOT EXECUTED
1fb84: e3530000 cmp r3, #0 <== NOT EXECUTED
1fb88: 0a00006e beq 1fd48 <msdos_format+0x9d4> <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
1fb8c: e1a04084 lsl r4, r4, #1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1fb90: e0030499 mul r3, r9, r4 <== NOT EXECUTED
1fb94: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
1fb98: e3a02000 mov r2, #0 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1fb9c: 9a00006d bls 1fd58 <msdos_format+0x9e4> <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
1fba0: eb0092a6 bl 44640 <__errno> <== NOT EXECUTED
1fba4: e3a03016 mov r3, #22 <== NOT EXECUTED
1fba8: e5803000 str r3, [r0] <== NOT EXECUTED
1fbac: e59d0234 ldr r0, [sp, #564] ; 0x234 <== NOT EXECUTED
1fbb0: e5dd125c ldrb r1, [sp, #604] ; 0x25c <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
1fbb4: e3a03000 mov r3, #0 <== NOT EXECUTED
1fbb8: e3e0c000 mvn ip, #0 <== NOT EXECUTED
1fbbc: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
1fbc0: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
1fbc4: e58d0028 str r0, [sp, #40] ; 0x28 <== NOT EXECUTED
1fbc8: e58d100c str r1, [sp, #12] <== NOT EXECUTED
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
1fbcc: e59d3248 ldr r3, [sp, #584] ; 0x248 <== NOT EXECUTED
1fbd0: e3530000 cmp r3, #0 <== NOT EXECUTED
1fbd4: 0a000083 beq 1fde8 <msdos_format+0xa74> <== NOT EXECUTED
fmt_params->root_dir_start_sec =
1fbd8: e59d123c ldr r1, [sp, #572] ; 0x23c <== NOT EXECUTED
1fbdc: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
1fbe0: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
1fbe4: e0220291 mla r2, r1, r2, r0 <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
1fbe8: e58d3250 str r3, [sp, #592] ; 0x250 <== NOT EXECUTED
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
1fbec: e58d224c str r2, [sp, #588] ; 0x24c <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
1fbf0: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
1fbf4: e3520000 cmp r2, #0 <== NOT EXECUTED
1fbf8: 1a000075 bne 1fdd4 <msdos_format+0xa60> <== NOT EXECUTED
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
1fbfc: e3550000 cmp r5, #0 <== NOT EXECUTED
1fc00: 059f15b4 ldreq r1, [pc, #1460] ; 201bc <msdos_format+0xe48><== NOT EXECUTED
1fc04: 0a000003 beq 1fc18 <msdos_format+0x8a4> <== NOT EXECUTED
(rqdata->OEMName != NULL)) {
1fc08: e5951000 ldr r1, [r5] <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
1fc0c: e59f35a8 ldr r3, [pc, #1448] ; 201bc <msdos_format+0xe48> <== NOT EXECUTED
1fc10: e3510000 cmp r1, #0 <== NOT EXECUTED
1fc14: 01a01003 moveq r1, r3 <== NOT EXECUTED
1fc18: e59f35a0 ldr r3, [pc, #1440] ; 201c0 <msdos_format+0xe4c> <== NOT EXECUTED
1fc1c: e59dc020 ldr ip, [sp, #32] <== NOT EXECUTED
1fc20: e5930000 ldr r0, [r3] <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
1fc24: e28c403c add r4, ip, #60 ; 0x3c <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
1fc28: e28c3034 add r3, ip, #52 ; 0x34 <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1fc2c: e3a08020 mov r8, #32 <== NOT EXECUTED
}
*to = '\0';
1fc30: e3a0e000 mov lr, #0 <== NOT EXECUTED
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1fc34: e5d12000 ldrb r2, [r1] <== NOT EXECUTED
1fc38: e080c002 add ip, r0, r2 <== NOT EXECUTED
1fc3c: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
1fc40: e31c0097 tst ip, #151 ; 0x97 <== NOT EXECUTED
*to++ = *from++;
1fc44: 15432001 strbne r2, [r3, #-1] <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1fc48: 05438001 strbeq r8, [r3, #-1] <== NOT EXECUTED
}
*to = '\0';
1fc4c: e4c3e001 strb lr, [r3], #1 <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
1fc50: 12811001 addne r1, r1, #1 <== NOT EXECUTED
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
1fc54: e1530004 cmp r3, r4 <== NOT EXECUTED
1fc58: 1afffff5 bne 1fc34 <msdos_format+0x8c0> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
1fc5c: e3550000 cmp r5, #0 <== NOT EXECUTED
1fc60: 0a0000be beq 1ff60 <msdos_format+0xbec> <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
1fc64: e5951004 ldr r1, [r5, #4] <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
1fc68: e3510000 cmp r1, #0 <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
1fc6c: 13a03001 movne r3, #1 <== NOT EXECUTED
1fc70: 15cd3274 strbne r3, [sp, #628] ; 0x274 <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
1fc74: 0a0000b9 beq 1ff60 <msdos_format+0xbec> <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
1fc78: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1fc7c: e3a08020 mov r8, #32 <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
1fc80: e2824048 add r4, r2, #72 ; 0x48 <== NOT EXECUTED
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
1fc84: e282303d add r3, r2, #61 ; 0x3d <== NOT EXECUTED
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
1fc88: e3a0e000 mov lr, #0 <== NOT EXECUTED
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1fc8c: e5d12000 ldrb r2, [r1] <== NOT EXECUTED
1fc90: e080c002 add ip, r0, r2 <== NOT EXECUTED
1fc94: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
1fc98: e31c0097 tst ip, #151 ; 0x97 <== NOT EXECUTED
*to++ = *from++;
1fc9c: 15432001 strbne r2, [r3, #-1] <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1fca0: 05438001 strbeq r8, [r3, #-1] <== NOT EXECUTED
}
*to = '\0';
1fca4: e4c3e001 strb lr, [r3], #1 <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
1fca8: 12811001 addne r1, r1, #1 <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
1fcac: e1530004 cmp r3, r4 <== NOT EXECUTED
1fcb0: 1afffff5 bne 1fc8c <msdos_format+0x918> <== NOT EXECUTED
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
1fcb4: e28d0fb1 add r0, sp, #708 ; 0x2c4 <== NOT EXECUTED
1fcb8: ebffb02a bl bd68 <rtems_clock_get_tod_timeval> <== NOT EXECUTED
if (rc == RTEMS_SUCCESSFUL) {
1fcbc: e3500000 cmp r0, #0 <== NOT EXECUTED
1fcc0: 1a0000ca bne 1fff0 <msdos_format+0xc7c> <== NOT EXECUTED
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
1fcc4: e59d32c4 ldr r3, [sp, #708] ; 0x2c4 <== NOT EXECUTED
1fcc8: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED
1fccc: e58d3278 str r3, [sp, #632] ; 0x278 <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(dd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
1fcd0: e3550000 cmp r5, #0 <== NOT EXECUTED
1fcd4: 0afffe21 beq 1f560 <msdos_format+0x1ec> <== NOT EXECUTED
(rqdata != NULL) &&
!(rqdata->quick_format)) {
1fcd8: e5d52016 ldrb r2, [r5, #22] <== NOT EXECUTED
1fcdc: e3520000 cmp r2, #0 <== NOT EXECUTED
1fce0: 1afffe1e bne 1f560 <msdos_format+0x1ec> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1fce4: e59dc22c ldr ip, [sp, #556] ; 0x22c <== NOT EXECUTED
1fce8: e59d3230 ldr r3, [sp, #560] ; 0x230 <== NOT EXECUTED
1fcec: e58dc000 str ip, [sp] <== NOT EXECUTED
1fcf0: e1a00005 mov r0, r5 <== NOT EXECUTED
1fcf4: e3a0c0e5 mov ip, #229 ; 0xe5 <== NOT EXECUTED
1fcf8: e1a01006 mov r1, r6 <== NOT EXECUTED
1fcfc: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1fd00: ebfffd39 bl 1f1ec <msdos_format_fill_sectors> <== NOT EXECUTED
1fd04: e1a04000 mov r4, r0 <== NOT EXECUTED
1fd08: eafffdb6 b 1f3e8 <msdos_format+0x74> <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1fd0c: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
1fd10: e0800080 add r0, r0, r0, lsl #1 <== NOT EXECUTED
1fd14: e08100a0 add r0, r1, r0, lsr #1 <== NOT EXECUTED
1fd18: e1a01009 mov r1, r9 <== NOT EXECUTED
1fd1c: eb00f216 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1fd20: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1fd24: e1a0b000 mov fp, r0 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1fd28: e2440001 sub r0, r4, #1 <== NOT EXECUTED
1fd2c: e0200b92 mla r0, r2, fp, r0 <== NOT EXECUTED
1fd30: e1a01004 mov r1, r4 <== NOT EXECUTED
1fd34: eb00f210 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
1fd38: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
1fd3c: e0600008 rsb r0, r0, r8 <== NOT EXECUTED
1fd40: e1500003 cmp r0, r3 <== NOT EXECUTED
1fd44: 8affff90 bhi 1fb8c <msdos_format+0x818> <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1fd48: e0030499 mul r3, r9, r4 <== NOT EXECUTED
1fd4c: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
1fd50: e3a02001 mov r2, #1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1fd54: 8affff91 bhi 1fba0 <msdos_format+0x82c> <== NOT EXECUTED
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
1fd58: e3520000 cmp r2, #0 <== NOT EXECUTED
1fd5c: 0affff6e beq 1fb1c <msdos_format+0x7a8> <== NOT EXECUTED
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
1fd60: e3550000 cmp r5, #0 <== NOT EXECUTED
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
1fd64: e58db23c str fp, [sp, #572] ; 0x23c <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
1fd68: e58d4238 str r4, [sp, #568] ; 0x238 <== NOT EXECUTED
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
1fd6c: 0a000102 beq 2017c <msdos_format+0xe08> <== NOT EXECUTED
1fd70: e5d54015 ldrb r4, [r5, #21] <== NOT EXECUTED
1fd74: e3540000 cmp r4, #0 <== NOT EXECUTED
1fd78: 0a0000ff beq 2017c <msdos_format+0xe08> <== NOT EXECUTED
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
1fd7c: e59f3440 ldr r3, [pc, #1088] ; 201c4 <msdos_format+0xe50> <== NOT EXECUTED
1fd80: e8930007 ldm r3, {r0, r1, r2} <== NOT EXECUTED
1fd84: e28d3fb1 add r3, sp, #708 ; 0x2c4 <== NOT EXECUTED
1fd88: e8a30003 stmia r3!, {r0, r1} <== NOT EXECUTED
if (NULL==memchr(valid_media_codes,
1fd8c: e28d0fb1 add r0, sp, #708 ; 0x2c4 <== NOT EXECUTED
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
1fd90: e5c32000 strb r2, [r3] <== NOT EXECUTED
if (NULL==memchr(valid_media_codes,
1fd94: e1a01004 mov r1, r4 <== NOT EXECUTED
1fd98: e3a02009 mov r2, #9 <== NOT EXECUTED
1fd9c: eb009e78 bl 47784 <memchr> <== NOT EXECUTED
1fda0: e3500000 cmp r0, #0 <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
1fda4: 15cd425d strbne r4, [sp, #605] ; 0x25d <== NOT EXECUTED
if (ret_val == 0) {
if ((rqdata != NULL) &&
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
1fda8: 1affff87 bne 1fbcc <msdos_format+0x858> <== NOT EXECUTED
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
1fdac: eb009223 bl 44640 <__errno> <== NOT EXECUTED
1fdb0: e3a03016 mov r3, #22 <== NOT EXECUTED
1fdb4: e5803000 str r3, [r0] <== NOT EXECUTED
1fdb8: e3e02000 mvn r2, #0 <== NOT EXECUTED
1fdbc: e59d3234 ldr r3, [sp, #564] ; 0x234 <== NOT EXECUTED
1fdc0: e5ddc25c ldrb ip, [sp, #604] ; 0x25c <== NOT EXECUTED
1fdc4: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
1fdc8: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED
1fdcc: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
1fdd0: eaffff7d b 1fbcc <msdos_format+0x858> <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
1fdd4: eb009219 bl 44640 <__errno> <== NOT EXECUTED
1fdd8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
1fddc: e3e04000 mvn r4, #0 <== NOT EXECUTED
1fde0: e5803000 str r3, [r0] <== NOT EXECUTED
1fde4: eafffd81 b 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
1fde8: e59d223c ldr r2, [sp, #572] ; 0x23c <== NOT EXECUTED
1fdec: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1fdf0: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
1fdf4: e0231392 mla r3, r2, r3, r1 <== NOT EXECUTED
1fdf8: e58d324c str r3, [sp, #588] ; 0x24c <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
1fdfc: e59d3238 ldr r3, [sp, #568] ; 0x238 <== NOT EXECUTED
1fe00: e58d3250 str r3, [sp, #592] ; 0x250 <== NOT EXECUTED
1fe04: eaffff79 b 1fbf0 <msdos_format+0x87c> <== NOT EXECUTED
1fe08: e59d1234 ldr r1, [sp, #564] ; 0x234 <== NOT EXECUTED
1fe0c: e5dd225c ldrb r2, [sp, #604] ; 0x25c <== NOT EXECUTED
1fe10: e58d1028 str r1, [sp, #40] ; 0x28 <== NOT EXECUTED
1fe14: e58d200c str r2, [sp, #12] <== NOT EXECUTED
1fe18: eaffff6b b 1fbcc <msdos_format+0x858> <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
1fe1c: e3a0c002 mov ip, #2 <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1fe20: e1a0100c mov r1, ip <== NOT EXECUTED
1fe24: e1a00005 mov r0, r5 <== NOT EXECUTED
1fe28: e59f2370 ldr r2, [pc, #880] ; 201a0 <msdos_format+0xe2c> <== NOT EXECUTED
1fe2c: e1a0300c mov r3, ip <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
1fe30: e5cdc25c strb ip, [sp, #604] ; 0x25c <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1fe34: ebfffcc1 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
1fe38: eafffdb7 b 1f51c <msdos_format+0x1a8> <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
1fe3c: e1a02423 lsr r2, r3, #8 <== NOT EXECUTED
1fe40: e3a0a000 mov sl, #0 <== NOT EXECUTED
1fe44: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
1fe48: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
1fe4c: e58d200c str r2, [sp, #12] <== NOT EXECUTED
1fe50: e58d301c str r3, [sp, #28] <== NOT EXECUTED
1fe54: e58da014 str sl, [sp, #20] <== NOT EXECUTED
1fe58: e58da018 str sl, [sp, #24] <== NOT EXECUTED
1fe5c: e58da010 str sl, [sp, #16] <== NOT EXECUTED
1fe60: eafffde4 b 1f5f8 <msdos_format+0x284> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
fmt_params->files_per_root_dir = 512;
1fe64: e35a0002 cmp sl, #2 <== NOT EXECUTED
1fe68: e3a04f7f mov r4, #508 ; 0x1fc <== NOT EXECUTED
1fe6c: 02844003 addeq r4, r4, #3 <== NOT EXECUTED
1fe70: 13a0403f movne r4, #63 ; 0x3f <== NOT EXECUTED
1fe74: eaffff01 b 1fa80 <msdos_format+0x70c> <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
1fe78: eb0091f0 bl 44640 <__errno> <== NOT EXECUTED
1fe7c: e3a03016 mov r3, #22 <== NOT EXECUTED
1fe80: e5803000 str r3, [r0] <== NOT EXECUTED
1fe84: e3e03000 mvn r3, #0 <== NOT EXECUTED
1fe88: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
1fe8c: eafffec9 b 1f9b8 <msdos_format+0x644> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
1fe90: e28d402c add r4, sp, #44 ; 0x2c <== NOT EXECUTED
1fe94: e3a01000 mov r1, #0 <== NOT EXECUTED
1fe98: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1fe9c: e1a00004 mov r0, r4 <== NOT EXECUTED
1fea0: eb009f1d bl 47b1c <memset> <== NOT EXECUTED
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
1fea4: e59d1258 ldr r1, [sp, #600] ; 0x258 <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1fea8: e3a08055 mov r8, #85 ; 0x55 <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
1feac: e3e03000 mvn r3, #0 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
1feb0: e3a0e052 mov lr, #82 ; 0x52 <== NOT EXECUTED
1feb4: e3a0c061 mov ip, #97 ; 0x61 <== NOT EXECUTED
1feb8: e3a00041 mov r0, #65 ; 0x41 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1febc: e3a02072 mov r2, #114 ; 0x72 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1fec0: e5cd822a strb r8, [sp, #554] ; 0x22a <== NOT EXECUTED
ret_val = msdos_format_gen_fsinfo(tmp_sec);
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
1fec4: e3510000 cmp r1, #0 <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1fec8: e3e08055 mvn r8, #85 ; 0x55 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
1fecc: e5cde02d strb lr, [sp, #45] ; 0x2d <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1fed0: e5cd2211 strb r2, [sp, #529] ; 0x211 <== NOT EXECUTED
1fed4: e5cd0212 strb r0, [sp, #530] ; 0x212 <== NOT EXECUTED
1fed8: e5cdc213 strb ip, [sp, #531] ; 0x213 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1fedc: e5cd822b strb r8, [sp, #555] ; 0x22b <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
1fee0: e5cd321b strb r3, [sp, #539] ; 0x21b <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
1fee4: e5cde02c strb lr, [sp, #44] ; 0x2c <== NOT EXECUTED
1fee8: e5cdc02e strb ip, [sp, #46] ; 0x2e <== NOT EXECUTED
1feec: e5cd002f strb r0, [sp, #47] ; 0x2f <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1fef0: e5cd2210 strb r2, [sp, #528] ; 0x210 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
1fef4: e5cd3214 strb r3, [sp, #532] ; 0x214 <== NOT EXECUTED
1fef8: e5cd3215 strb r3, [sp, #533] ; 0x215 <== NOT EXECUTED
1fefc: e5cd3216 strb r3, [sp, #534] ; 0x216 <== NOT EXECUTED
1ff00: e5cd3217 strb r3, [sp, #535] ; 0x217 <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
1ff04: e5cd3218 strb r3, [sp, #536] ; 0x218 <== NOT EXECUTED
1ff08: e5cd3219 strb r3, [sp, #537] ; 0x219 <== NOT EXECUTED
1ff0c: e5cd321a strb r3, [sp, #538] ; 0x21a <== NOT EXECUTED
ret_val = msdos_format_gen_fsinfo(tmp_sec);
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
1ff10: 0afffe2f beq 1f7d4 <msdos_format+0x460> <== NOT EXECUTED
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
1ff14: e1a03004 mov r3, r4 <== NOT EXECUTED
1ff18: e1a00006 mov r0, r6 <== NOT EXECUTED
1ff1c: e59d222c ldr r2, [sp, #556] ; 0x22c <== NOT EXECUTED
1ff20: ebfffc9d bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
1ff24: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1ff28: 1afffd30 bne 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
1ff2c: eafffe28 b 1f7d4 <msdos_format+0x460> <== NOT EXECUTED
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1ff30: e3a01002 mov r1, #2 <== NOT EXECUTED
1ff34: e59f228c ldr r2, [pc, #652] ; 201c8 <msdos_format+0xe54> <== NOT EXECUTED
1ff38: e1a00005 mov r0, r5 <== NOT EXECUTED
1ff3c: ebfffc7f bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
1ff40: e1a00006 mov r0, r6 <== NOT EXECUTED
1ff44: e1a03008 mov r3, r8 <== NOT EXECUTED
1ff48: e59d1254 ldr r1, [sp, #596] ; 0x254 <== NOT EXECUTED
1ff4c: e59d222c ldr r2, [sp, #556] ; 0x22c <== NOT EXECUTED
1ff50: ebfffc91 bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
1ff54: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1ff58: 0afffe1a beq 1f7c8 <msdos_format+0x454> <== NOT EXECUTED
1ff5c: eafffd23 b 1f3f0 <msdos_format+0x7c> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
1ff60: e59f1264 ldr r1, [pc, #612] ; 201cc <msdos_format+0xe58> <== NOT EXECUTED
1ff64: eaffff43 b 1fc78 <msdos_format+0x904> <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
1ff68: e5dd225d ldrb r2, [sp, #605] ; 0x25d <== NOT EXECUTED
1ff6c: e1e02c02 mvn r2, r2, lsl #24 <== NOT EXECUTED
1ff70: e1e02c22 mvn r2, r2, lsr #24 <== NOT EXECUTED
1ff74: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
1ff78: e5cd102d strb r1, [sp, #45] ; 0x2d <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1ff7c: e3e01007 mvn r1, #7 <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
1ff80: e3e03000 mvn r3, #0 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1ff84: e5cd1030 strb r1, [sp, #48] ; 0x30 <== NOT EXECUTED
1ff88: e3a0100f mov r1, #15 <== NOT EXECUTED
1ff8c: e5cd3032 strb r3, [sp, #50] ; 0x32 <== NOT EXECUTED
1ff90: e5cd1033 strb r1, [sp, #51] ; 0x33 <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
1ff94: e5cd202c strb r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1ff98: e5cd302e strb r3, [sp, #46] ; 0x2e <== NOT EXECUTED
1ff9c: e5cd302f strb r3, [sp, #47] ; 0x2f <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1ffa0: e5cd3031 strb r3, [sp, #49] ; 0x31 <== NOT EXECUTED
1ffa4: eafffe4f b 1f8e8 <msdos_format+0x574> <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL16(tmp_sec,0,0xff00|fmt_params.media_code);
1ffa8: e5dd225d ldrb r2, [sp, #605] ; 0x25d <== NOT EXECUTED
1ffac: e3e03000 mvn r3, #0 <== NOT EXECUTED
1ffb0: e5cd202c strb r2, [sp, #44] ; 0x2c <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
1ffb4: e3e02007 mvn r2, #7 <== NOT EXECUTED
1ffb8: e5cd202e strb r2, [sp, #46] ; 0x2e <== NOT EXECUTED
1ffbc: e5cd302f strb r3, [sp, #47] ; 0x2f <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL16(tmp_sec,0,0xff00|fmt_params.media_code);
1ffc0: e5cd302d strb r3, [sp, #45] ; 0x2d <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1ffc4: e5dd325c ldrb r3, [sp, #604] ; 0x25c <== NOT EXECUTED
1ffc8: e2533000 subs r3, r3, #0 <== NOT EXECUTED
1ffcc: 13a03001 movne r3, #1 <== NOT EXECUTED
1ffd0: eafffe50 b 1f918 <msdos_format+0x5a4> <== NOT EXECUTED
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
1ffd4: e5dd325d ldrb r3, [sp, #605] ; 0x25d <== NOT EXECUTED
1ffd8: e5cd302c strb r3, [sp, #44] ; 0x2c <== NOT EXECUTED
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
1ffdc: e3e03070 mvn r3, #112 ; 0x70 <== NOT EXECUTED
1ffe0: e5cd302d strb r3, [sp, #45] ; 0x2d <== NOT EXECUTED
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
1ffe4: e3e03000 mvn r3, #0 <== NOT EXECUTED
1ffe8: e5cd302e strb r3, [sp, #46] ; 0x2e <== NOT EXECUTED
break;
1ffec: eafffff4 b 1ffc4 <msdos_format+0xc50> <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
1fff0: eb00a5f4 bl 497c8 <rand> <== NOT EXECUTED
1fff4: e58d0278 str r0, [sp, #632] ; 0x278 <== NOT EXECUTED
1fff8: eaffff34 b 1fcd0 <msdos_format+0x95c> <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
1fffc: e3e034ff mvn r3, #-16777216 ; 0xff000000 <== NOT EXECUTED
20000: e243360e sub r3, r3, #14680064 ; 0xe00000 <== NOT EXECUTED
20004: e2433e16 sub r3, r3, #352 ; 0x160 <== NOT EXECUTED
20008: e1520003 cmp r2, r3 <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
2000c: 93a03002 movls r3, #2 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
20010: 958d3238 strls r3, [sp, #568] ; 0x238 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
20014: 95cd325e strbls r3, [sp, #606] ; 0x25e <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
20018: 9afffd48 bls 1f540 <msdos_format+0x1cc> <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
2001c: e3a03101 mov r3, #1073741824 ; 0x40000000 <== NOT EXECUTED
20020: e0933008 adds r3, r3, r8 <== NOT EXECUTED
20024: e3a04000 mov r4, #0 <== NOT EXECUTED
20028: e1a00f23 lsr r0, r3, #30 <== NOT EXECUTED
2002c: e0a44009 adc r4, r4, r9 <== NOT EXECUTED
20030: e1800104 orr r0, r0, r4, lsl #2 <== NOT EXECUTED
20034: e3a0301f mov r3, #31 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
20038: e3a01001 mov r1, #1 <== NOT EXECUTED
2003c: ea000001 b 20048 <msdos_format+0xcd4> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
20040: e2533001 subs r3, r3, #1 <== NOT EXECUTED
20044: 0a00004a beq 20174 <msdos_format+0xe00> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
20048: e1a02311 lsl r2, r1, r3 <== NOT EXECUTED
2004c: e1120000 tst r2, r0 <== NOT EXECUTED
20050: 0afffffa beq 20040 <msdos_format+0xccc> <== NOT EXECUTED
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
20054: e3a03004 mov r3, #4 <== NOT EXECUTED
20058: e5cd325e strb r3, [sp, #606] ; 0x25e <== NOT EXECUTED
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
2005c: e58d2238 str r2, [sp, #568] ; 0x238 <== NOT EXECUTED
20060: eafffd36 b 1f540 <msdos_format+0x1cc> <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
20064: e59de23c ldr lr, [sp, #572] ; 0x23c <== NOT EXECUTED
20068: e1a0c82e lsr ip, lr, #16 <== NOT EXECUTED
2006c: e5cdc052 strb ip, [sp, #82] ; 0x52 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
20070: e3a0c002 mov ip, #2 <== NOT EXECUTED
20074: e5cdc058 strb ip, [sp, #88] ; 0x58 <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
20078: e3a0c001 mov ip, #1 <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
2007c: e59d1254 ldr r1, [sp, #596] ; 0x254 <== NOT EXECUTED
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
20080: e5cdc05c strb ip, [sp, #92] ; 0x5c <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
20084: e3a0c029 mov ip, #41 ; 0x29 <== NOT EXECUTED
20088: e5cdc06e strb ip, [sp, #110] ; 0x6e <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
2008c: e59dc254 ldr ip, [sp, #596] ; 0x254 <== NOT EXECUTED
20090: e1a0b421 lsr fp, r1, #8 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
20094: e1a09c2e lsr r9, lr, #24 <== NOT EXECUTED
20098: e1a0a42e lsr sl, lr, #8 <== NOT EXECUTED
2009c: e5cda051 strb sl, [sp, #81] ; 0x51 <== NOT EXECUTED
200a0: e5cd9053 strb r9, [sp, #83] ; 0x53 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
200a4: e5cdb05f strb fp, [sp, #95] ; 0x5f <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
200a8: e584803c str r8, [r4, #60] ; 0x3c <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200ac: e5cde050 strb lr, [sp, #80] ; 0x50 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
200b0: e5cd8054 strb r8, [sp, #84] ; 0x54 <== NOT EXECUTED
200b4: e5cd8055 strb r8, [sp, #85] ; 0x55 <== NOT EXECUTED
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
200b8: e5cd8056 strb r8, [sp, #86] ; 0x56 <== NOT EXECUTED
200bc: e5cd8057 strb r8, [sp, #87] ; 0x57 <== NOT EXECUTED
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
200c0: e5cd8059 strb r8, [sp, #89] ; 0x59 <== NOT EXECUTED
200c4: e5cd805a strb r8, [sp, #90] ; 0x5a <== NOT EXECUTED
200c8: e5cd805b strb r8, [sp, #91] ; 0x5b <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
200cc: e5cd805d strb r8, [sp, #93] ; 0x5d <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
200d0: e5cdc05e strb ip, [sp, #94] ; 0x5e <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
200d4: e5848034 str r8, [r4, #52] ; 0x34 <== NOT EXECUTED
200d8: e5848038 str r8, [r4, #56] ; 0x38 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
200dc: e5cd806c strb r8, [sp, #108] ; 0x6c <== NOT EXECUTED
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
200e0: e5cd806d strb r8, [sp, #109] ; 0x6d <== NOT EXECUTED
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
200e4: e5cd806f strb r8, [sp, #111] ; 0x6f <== NOT EXECUTED
200e8: e5cd8070 strb r8, [sp, #112] ; 0x70 <== NOT EXECUTED
200ec: e5cd8071 strb r8, [sp, #113] ; 0x71 <== NOT EXECUTED
200f0: e5cd8072 strb r8, [sp, #114] ; 0x72 <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
200f4: e5c48047 strb r8, [r4, #71] ; 0x47 <== NOT EXECUTED
200f8: e5c48048 strb r8, [r4, #72] ; 0x48 <== NOT EXECUTED
200fc: e5c48049 strb r8, [r4, #73] ; 0x49 <== NOT EXECUTED
20100: e5c4804a strb r8, [r4, #74] ; 0x4a <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
20104: e2840052 add r0, r4, #82 ; 0x52 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
20108: e5c4804b strb r8, [r4, #75] ; 0x4b <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
2010c: e59f10bc ldr r1, [pc, #188] ; 201d0 <msdos_format+0xe5c> <== NOT EXECUTED
20110: e3a02008 mov r2, #8 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
20114: e5c4804c strb r8, [r4, #76] ; 0x4c <== NOT EXECUTED
20118: e5c48051 strb r8, [r4, #81] ; 0x51 <== NOT EXECUTED
2011c: e5c4804d strb r8, [r4, #77] ; 0x4d <== NOT EXECUTED
20120: e5c4804e strb r8, [r4, #78] ; 0x4e <== NOT EXECUTED
20124: e5c4804f strb r8, [r4, #79] ; 0x4f <== NOT EXECUTED
20128: e5c48050 strb r8, [r4, #80] ; 0x50 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
2012c: eb009df3 bl 47900 <memcpy> <== NOT EXECUTED
20130: eafffd8b b 1f764 <msdos_format+0x3f0> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
20134: e3a03020 mov r3, #32 <== NOT EXECUTED
20138: e58d3234 str r3, [sp, #564] ; 0x234 <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
2013c: e3a03006 mov r3, #6 <== NOT EXECUTED
20140: e58d3254 str r3, [sp, #596] ; 0x254 <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
20144: e3a03001 mov r3, #1 <== NOT EXECUTED
20148: e58d3258 str r3, [sp, #600] ; 0x258 <== NOT EXECUTED
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
2014c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
20150: e59d922c ldr r9, [sp, #556] ; 0x22c <== NOT EXECUTED
20154: e58d3244 str r3, [sp, #580] ; 0x244 <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
20158: e1a00003 mov r0, r3 <== NOT EXECUTED
2015c: eafffe50 b 1faa4 <msdos_format+0x730> <== NOT EXECUTED
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
20160: eb009136 bl 44640 <__errno> <== NOT EXECUTED
20164: e3a03019 mov r3, #25 <== NOT EXECUTED
20168: e5803000 str r3, [r0] <== NOT EXECUTED
2016c: e3e04000 mvn r4, #0 <== NOT EXECUTED
20170: eafffc9b b 1f3e4 <msdos_format+0x70> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
20174: e3a02001 mov r2, #1 <== NOT EXECUTED
20178: eaffffb5 b 20054 <msdos_format+0xce0> <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
2017c: e3e03007 mvn r3, #7 <== NOT EXECUTED
20180: e5cd325d strb r3, [sp, #605] ; 0x25d <== NOT EXECUTED
20184: eafffe90 b 1fbcc <msdos_format+0x858> <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
20188: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
2018c: eafffe28 b 1fa34 <msdos_format+0x6c0> <== NOT EXECUTED
0001f1ec <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f1ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1f1f0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
1f1f4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
1f1f8: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f1fc: e58d1000 str r1, [sp] <== NOT EXECUTED
1f200: e1a05002 mov r5, r2 <== NOT EXECUTED
1f204: e1a0a003 mov sl, r3 <== NOT EXECUTED
1f208: e5dd4030 ldrb r4, [sp, #48] ; 0x30 <== NOT EXECUTED
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
1f20c: ebffa49b bl 8480 <malloc> <== NOT EXECUTED
if (fill_buffer == NULL) {
1f210: e2509000 subs r9, r0, #0 <== NOT EXECUTED
1f214: 0a000039 beq 1f300 <msdos_format_fill_sectors+0x114> <== NOT EXECUTED
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
1f218: e1a01004 mov r1, r4 <== NOT EXECUTED
1f21c: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1f220: eb00a23d bl 47b1c <memset> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1f224: e25a7000 subs r7, sl, #0 <== NOT EXECUTED
1f228: 13a07001 movne r7, #1 <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f22c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f230: e3a01002 mov r1, #2 <== NOT EXECUTED
1f234: e59f2128 ldr r2, [pc, #296] ; 1f364 <msdos_format_fill_sectors+0x178><== NOT EXECUTED
1f238: ebffffc0 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1f23c: e3570000 cmp r7, #0 <== NOT EXECUTED
1f240: 0a000042 beq 1f350 <msdos_format_fill_sectors+0x164> <== NOT EXECUTED
1f244: e08a610a add r6, sl, sl, lsl #2 <== NOT EXECUTED
1f248: e0866106 add r6, r6, r6, lsl #2 <== NOT EXECUTED
1f24c: e1a06106 lsl r6, r6, #2 <== NOT EXECUTED
1f250: e1a0800a mov r8, sl <== NOT EXECUTED
1f254: e3e0b000 mvn fp, #0 <== NOT EXECUTED
1f258: ea000010 b 1f2a0 <msdos_format_fill_sectors+0xb4> <== NOT EXECUTED
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
1f25c: e1a01005 mov r1, r5 <== NOT EXECUTED
1f260: e1a03009 mov r3, r9 <== NOT EXECUTED
1f264: e59d0000 ldr r0, [sp] <== NOT EXECUTED
1f268: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1f26c: ebffffca bl 1f19c <msdos_format_write_sec> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1f270: e2588001 subs r8, r8, #1 <== NOT EXECUTED
1f274: 03a03000 moveq r3, #0 <== NOT EXECUTED
1f278: 13a03001 movne r3, #1 <== NOT EXECUTED
1f27c: e3500000 cmp r0, #0 <== NOT EXECUTED
1f280: 13a03000 movne r3, #0 <== NOT EXECUTED
1f284: 02033001 andeq r3, r3, #1 <== NOT EXECUTED
1f288: e3530000 cmp r3, #0 <== NOT EXECUTED
1f28c: e1a07000 mov r7, r0 <== NOT EXECUTED
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
1f290: e2855001 add r5, r5, #1 <== NOT EXECUTED
sector_cnt--;
1f294: e2466064 sub r6, r6, #100 ; 0x64 <== NOT EXECUTED
1f298: e1a0b004 mov fp, r4 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1f29c: 0a00000c beq 1f2d4 <msdos_format_fill_sectors+0xe8> <== NOT EXECUTED
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
1f2a0: e1a0100a mov r1, sl <== NOT EXECUTED
1f2a4: e1a00006 mov r0, r6 <== NOT EXECUTED
1f2a8: eb00f4b3 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (percent != last_percent) {
1f2ac: e150000b cmp r0, fp <== NOT EXECUTED
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
1f2b0: e1a04000 mov r4, r0 <== NOT EXECUTED
if (percent != last_percent) {
1f2b4: 0affffe8 beq 1f25c <msdos_format_fill_sectors+0x70> <== NOT EXECUTED
if ((percent & 1) == 0)
1f2b8: e3100001 tst r0, #1 <== NOT EXECUTED
1f2bc: 1affffe6 bne 1f25c <msdos_format_fill_sectors+0x70> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
1f2c0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f2c4: e3a01002 mov r1, #2 <== NOT EXECUTED
1f2c8: e59f2098 ldr r2, [pc, #152] ; 1f368 <msdos_format_fill_sectors+0x17c><== NOT EXECUTED
1f2cc: ebffff9b bl 1f140 <msdos_format_printf> <== NOT EXECUTED
1f2d0: eaffffe1 b 1f25c <msdos_format_fill_sectors+0x70> <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
1f2d4: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f2d8: e3a01002 mov r1, #2 <== NOT EXECUTED
1f2dc: e59f2088 ldr r2, [pc, #136] ; 1f36c <msdos_format_fill_sectors+0x180><== NOT EXECUTED
1f2e0: ebffff96 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
if (ret_val)
1f2e4: e3570000 cmp r7, #0 <== NOT EXECUTED
1f2e8: 1a000010 bne 1f330 <msdos_format_fill_sectors+0x144> <== NOT EXECUTED
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
1f2ec: e1a00009 mov r0, r9 <== NOT EXECUTED
1f2f0: ebffa29e bl 7d70 <free> <== NOT EXECUTED
fill_buffer = NULL;
}
return ret_val;
}
1f2f4: e1a00007 mov r0, r7 <== NOT EXECUTED
1f2f8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
1f2fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
1f300: eb0094ce bl 44640 <__errno> <== NOT EXECUTED
1f304: e3a0300c mov r3, #12 <== NOT EXECUTED
1f308: e5803000 str r3, [r0] <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1f30c: e3a01002 mov r1, #2 <== NOT EXECUTED
1f310: e59f204c ldr r2, [pc, #76] ; 1f364 <msdos_format_fill_sectors+0x178><== NOT EXECUTED
1f314: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f318: ebffff88 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
1f31c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f320: e3a01002 mov r1, #2 <== NOT EXECUTED
1f324: e59f2040 ldr r2, [pc, #64] ; 1f36c <msdos_format_fill_sectors+0x180><== NOT EXECUTED
1f328: ebffff84 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
1f32c: e3e07000 mvn r7, #0 <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
1f330: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f334: e1a03005 mov r3, r5 <== NOT EXECUTED
1f338: e3a01001 mov r1, #1 <== NOT EXECUTED
1f33c: e59f202c ldr r2, [pc, #44] ; 1f370 <msdos_format_fill_sectors+0x184><== NOT EXECUTED
1f340: ebffff7e bl 1f140 <msdos_format_printf> <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
1f344: e3590000 cmp r9, #0 <== NOT EXECUTED
1f348: 0affffe9 beq 1f2f4 <msdos_format_fill_sectors+0x108> <== NOT EXECUTED
1f34c: eaffffe6 b 1f2ec <msdos_format_fill_sectors+0x100> <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
1f350: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1f354: e3a01002 mov r1, #2 <== NOT EXECUTED
1f358: e59f200c ldr r2, [pc, #12] ; 1f36c <msdos_format_fill_sectors+0x180><== NOT EXECUTED
1f35c: ebffff77 bl 1f140 <msdos_format_printf> <== NOT EXECUTED
1f360: eaffffe1 b 1f2ec <msdos_format_fill_sectors+0x100> <== NOT EXECUTED
0001f140 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
1f140: e92d000c push {r2, r3} <== NOT EXECUTED
1f144: e92d4010 push {r4, lr} <== NOT EXECUTED
1f148: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list args;
va_start (args, format);
1f14c: e28d2010 add r2, sp, #16 <== NOT EXECUTED
if (rqdata != NULL && rqdata->info_level >= info_level)
1f150: e3500000 cmp r0, #0 <== NOT EXECUTED
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
va_list args;
va_start (args, format);
1f154: e58d2000 str r2, [sp] <== NOT EXECUTED
if (rqdata != NULL && rqdata->info_level >= info_level)
1f158: 0a00000a beq 1f188 <msdos_format_printf+0x48> <== NOT EXECUTED
1f15c: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
1f160: e1530001 cmp r3, r1 <== NOT EXECUTED
1f164: ba000007 blt 1f188 <msdos_format_printf+0x48> <== NOT EXECUTED
{
vfprintf (stdout, format, args);
1f168: e59f4028 ldr r4, [pc, #40] ; 1f198 <msdos_format_printf+0x58><== NOT EXECUTED
1f16c: e5943000 ldr r3, [r4] <== NOT EXECUTED
1f170: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
1f174: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
1f178: eb00d05e bl 532f8 <vfprintf> <== NOT EXECUTED
fflush (stdout);
1f17c: e5943000 ldr r3, [r4] <== NOT EXECUTED
1f180: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
1f184: eb009620 bl 44a0c <fflush> <== NOT EXECUTED
}
va_end (args);
}
1f188: e28dd004 add sp, sp, #4 <== NOT EXECUTED
1f18c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
1f190: e28dd008 add sp, sp, #8 <== NOT EXECUTED
1f194: e12fff1e bx lr <== NOT EXECUTED
0001f19c <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f19c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f1a0: e0876192 umull r6, r7, r2, r1 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f1a4: e1a04002 mov r4, r2 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f1a8: e1a01006 mov r1, r6 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f1ac: e1a05003 mov r5, r3 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f1b0: e1a02007 mov r2, r7 <== NOT EXECUTED
1f1b4: e3a03000 mov r3, #0 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1f1b8: e1a06000 mov r6, r0 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1f1bc: eb002bc1 bl 2a0c8 <lseek> <== NOT EXECUTED
1f1c0: e3510000 cmp r1, #0 <== NOT EXECUTED
1f1c4: ba000006 blt 1f1e4 <msdos_format_write_sec+0x48> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
1f1c8: e1a00006 mov r0, r6 <== NOT EXECUTED
1f1cc: e1a01005 mov r1, r5 <== NOT EXECUTED
1f1d0: e1a02004 mov r2, r4 <== NOT EXECUTED
1f1d4: ebffb241 bl bae0 <write> <== NOT EXECUTED
1f1d8: e3500000 cmp r0, #0 <== NOT EXECUTED
1f1dc: a3a00000 movge r0, #0 <== NOT EXECUTED
1f1e0: a8bd80f0 popge {r4, r5, r6, r7, pc} <== NOT EXECUTED
1f1e4: e3e00000 mvn r0, #0 <== NOT EXECUTED
ret_val = -1;
}
}
return ret_val;
}
1f1e8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00037890 <msdos_free_node_info>:
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
37890: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
37894: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
37898: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3789c: e3a01000 mov r1, #0 <== NOT EXECUTED
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
378a0: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
378a4: e1a02001 mov r2, r1 <== NOT EXECUTED
378a8: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
378ac: ebff5304 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
378b0: e3500000 cmp r0, #0 <== NOT EXECUTED
378b4: 1a000007 bne 378d8 <msdos_free_node_info+0x48> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
378b8: e5941000 ldr r1, [r4] <== NOT EXECUTED
378bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
378c0: ebffb92e bl 25d80 <fat_file_close> <== NOT EXECUTED
378c4: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
378c8: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
378cc: ebff5344 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
378d0: e1a00004 mov r0, r4 <== NOT EXECUTED
378d4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
378d8: eb003358 bl 44640 <__errno> <== NOT EXECUTED
378dc: e3a03005 mov r3, #5 <== NOT EXECUTED
378e0: e5803000 str r3, [r0] <== NOT EXECUTED
378e4: e3e04000 mvn r4, #0 <== NOT EXECUTED
378e8: eafffff8 b 378d0 <msdos_free_node_info+0x40> <== NOT EXECUTED
00038c60 <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
38c60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38c64: e24dd058 sub sp, sp, #88 ; 0x58 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
38c68: e28d5058 add r5, sp, #88 ; 0x58 <== NOT EXECUTED
38c6c: e3a0c000 mov ip, #0 <== NOT EXECUTED
38c70: e525c004 str ip, [r5, #-4]! <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
38c74: e1a07002 mov r7, r2 <== NOT EXECUTED
38c78: e1a08001 mov r8, r1 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
38c7c: e1a01002 mov r1, r2 <== NOT EXECUTED
38c80: e1a02005 mov r2, r5 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
38c84: e1a06000 mov r6, r0 <== NOT EXECUTED
38c88: e1a09003 mov r9, r3 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
38c8c: e590b034 ldr fp, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
38c90: ebffb464 bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
38c94: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38c98: 0a000002 beq 38ca8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x48><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
38c9c: e1a00004 mov r0, r4 <== NOT EXECUTED
38ca0: e28dd058 add sp, sp, #88 ; 0x58 <== NOT EXECUTED
38ca4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
38ca8: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
38cac: e3a03602 mov r3, #2097152 ; 0x200000 <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
38cb0: e3a0a001 mov sl, #1 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
38cb4: e5814034 str r4, [r1, #52] ; 0x34 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
38cb8: e5813014 str r3, [r1, #20] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
38cbc: e5818038 str r8, [r1, #56] ; 0x38 <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
38cc0: e581801c str r8, [r1, #28] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
38cc4: e581a010 str sl, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
38cc8: e1a00006 mov r0, r6 <== NOT EXECUTED
38ccc: ebffb160 bl 25254 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
38cd0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38cd4: 1a00006d bne 38e90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x230><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38cd8: e28d8034 add r8, sp, #52 ; 0x34 <== NOT EXECUTED
38cdc: e288c008 add ip, r8, #8 <== NOT EXECUTED
38ce0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38ce4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38ce8: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38cec: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38cf0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
38cf4: e1a0100a mov r1, sl <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38cf8: e58c4000 str r4, [ip] <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
38cfc: e1a02008 mov r2, r8 <== NOT EXECUTED
38d00: e3a0300b mov r3, #11 <== NOT EXECUTED
38d04: e59f0194 ldr r0, [pc, #404] ; 38ea0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x240><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38d08: e58d4034 str r4, [sp, #52] ; 0x34 <== NOT EXECUTED
38d0c: e58d4038 str r4, [sp, #56] ; 0x38 <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
38d10: ebffff5b bl 38a84 <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
38d14: e1a02004 mov r2, r4 <== NOT EXECUTED
38d18: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
38d1c: e1a00006 mov r0, r6 <== NOT EXECUTED
38d20: e59f3178 ldr r3, [pc, #376] ; 38ea0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x240><== NOT EXECUTED
38d24: e58da000 str sl, [sp] <== NOT EXECUTED
38d28: e58da004 str sl, [sp, #4] <== NOT EXECUTED
38d2c: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
38d30: e58d800c str r8, [sp, #12] <== NOT EXECUTED
38d34: ebfffb59 bl 37aa0 <msdos_find_name_in_fat_file> <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
38d38: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38d3c: 1a000053 bne 38e90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x230><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38d40: e28d3014 add r3, sp, #20 <== NOT EXECUTED
38d44: e283c008 add ip, r3, #8 <== NOT EXECUTED
38d48: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38d4c: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38d50: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38d54: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
38d58: e48c4004 str r4, [ip], #4 <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
38d5c: e1a02003 mov r2, r3 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38d60: e58c4000 str r4, [ip] <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
38d64: e3a01002 mov r1, #2 <== NOT EXECUTED
38d68: e3a0300b mov r3, #11 <== NOT EXECUTED
38d6c: e59f0130 ldr r0, [pc, #304] ; 38ea4 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x244><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
38d70: e58d4014 str r4, [sp, #20] <== NOT EXECUTED
38d74: e58d4018 str r4, [sp, #24] <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
38d78: ebffff41 bl 38a84 <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
38d7c: e3a0c002 mov ip, #2 <== NOT EXECUTED
38d80: e1a02004 mov r2, r4 <== NOT EXECUTED
38d84: e58dc000 str ip, [sp] <== NOT EXECUTED
38d88: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
38d8c: e28dc014 add ip, sp, #20 <== NOT EXECUTED
38d90: e1a00006 mov r0, r6 <== NOT EXECUTED
38d94: e59f3108 ldr r3, [pc, #264] ; 38ea4 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x244><== NOT EXECUTED
38d98: e58da004 str sl, [sp, #4] <== NOT EXECUTED
38d9c: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
38da0: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
38da4: ebfffb3d bl 37aa0 <msdos_find_name_in_fat_file> <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
38da8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38dac: 1a000037 bne 38e90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x230><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
38db0: e1d831b4 ldrh r3, [r8, #20] <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
38db4: e1a00006 mov r0, r6 <== NOT EXECUTED
38db8: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
38dbc: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
38dc0: e1d881ba ldrh r8, [r8, #26] <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
38dc4: ebffb3ed bl 25d80 <fat_file_close> <== NOT EXECUTED
if ( rc != RC_OK )
38dc8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38dcc: 1affffb2 bne 38c9c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3c><== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
38dd0: e1dd22b8 ldrh r2, [sp, #40] ; 0x28 <== NOT EXECUTED
38dd4: e1dd32be ldrh r3, [sp, #46] ; 0x2e <== NOT EXECUTED
38dd8: e1933802 orrs r3, r3, r2, lsl #16 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
38ddc: 03e01000 mvneq r1, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
38de0: 0587100c streq r1, [r7, #12] <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
38de4: 05871008 streq r1, [r7, #8] <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
38de8: 05873004 streq r3, [r7, #4] <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
38dec: 0587a000 streq sl, [r7] <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
38df0: e1a02005 mov r2, r5 <== NOT EXECUTED
38df4: e1a00006 mov r0, r6 <== NOT EXECUTED
38df8: e1a01007 mov r1, r7 <== NOT EXECUTED
38dfc: ebffb409 bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
38e00: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38e04: 1affffa4 bne 38c9c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3c><== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
38e08: e1dd22b8 ldrh r2, [sp, #40] ; 0x28 <== NOT EXECUTED
38e0c: e1dd32be ldrh r3, [sp, #46] ; 0x2e <== NOT EXECUTED
38e10: e1933802 orrs r3, r3, r2, lsl #16 <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
38e14: 059d1054 ldreq r1, [sp, #84] ; 0x54 <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
38e18: 159d1054 ldrne r1, [sp, #84] ; 0x54 <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
38e1c: 059b3038 ldreq r3, [fp, #56] ; 0x38 <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
38e20: 1581301c strne r3, [r1, #28] <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
38e24: 0581301c streq r3, [r1, #28] <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
38e28: e3a02001 mov r2, #1 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
38e2c: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
38e30: e5812010 str r2, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
38e34: e3a02602 mov r2, #2097152 ; 0x200000 <== NOT EXECUTED
38e38: e5812014 str r2, [r1, #20] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
38e3c: e3a02000 mov r2, #0 <== NOT EXECUTED
38e40: e5812034 str r2, [r1, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
38e44: e5813038 str r3, [r1, #56] ; 0x38 <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
38e48: e1a00006 mov r0, r6 <== NOT EXECUTED
38e4c: ebffb100 bl 25254 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
38e50: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38e54: 1a00000d bne 38e90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x230><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
38e58: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
38e5c: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
38e60: e188280c orr r2, r8, ip, lsl #16 <== NOT EXECUTED
38e64: e1a03007 mov r3, r7 <== NOT EXECUTED
38e68: e1a00006 mov r0, r6 <== NOT EXECUTED
38e6c: e58d9000 str r9, [sp] <== NOT EXECUTED
38e70: ebfffab0 bl 37938 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
38e74: e2504000 subs r4, r0, #0 <== NOT EXECUTED
38e78: 1a000004 bne 38e90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x230><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
38e7c: e1a00006 mov r0, r6 <== NOT EXECUTED
38e80: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
38e84: ebffb3bd bl 25d80 <fat_file_close> <== NOT EXECUTED
38e88: e1a04000 mov r4, r0 <== NOT EXECUTED
return rc;
38e8c: eaffff82 b 38c9c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3c><== NOT EXECUTED
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
38e90: e1a00006 mov r0, r6 <== NOT EXECUTED
38e94: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
38e98: ebffb3b8 bl 25d80 <fat_file_close> <== NOT EXECUTED
return rc;
38e9c: eaffff7e b 38c9c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3c><== NOT EXECUTED
00038ea8 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
38ea8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
38eac: e1a05001 mov r5, r1 <== NOT EXECUTED
38eb0: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
38eb4: e1a04000 mov r4, r0 <== NOT EXECUTED
38eb8: e1a08002 mov r8, r2 <== NOT EXECUTED
38ebc: e28d6030 add r6, sp, #48 ; 0x30 <== NOT EXECUTED
38ec0: e89600c0 ldm r6, {r6, r7} <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
38ec4: e59dc02c ldr ip, [sp, #44] ; 0x2c <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
38ec8: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
38ecc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
38ed0: e5941000 ldr r1, [r4] <== NOT EXECUTED
38ed4: e1a02005 mov r2, r5 <== NOT EXECUTED
38ed8: e58d3000 str r3, [sp] <== NOT EXECUTED
38edc: e1a03008 mov r3, r8 <== NOT EXECUTED
38ee0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
38ee4: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
38ee8: e58d700c str r7, [sp, #12] <== NOT EXECUTED
38eec: ebfffaeb bl 37aa0 <msdos_find_name_in_fat_file> <== NOT EXECUTED
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
38ef0: e3a03c7d mov r3, #32000 ; 0x7d00 <== NOT EXECUTED
38ef4: e2833001 add r3, r3, #1 <== NOT EXECUTED
38ef8: e1500003 cmp r0, r3 <== NOT EXECUTED
38efc: 13500000 cmpne r0, #0 <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
38f00: e1a0a000 mov sl, r0 <== NOT EXECUTED
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
38f04: 1a000015 bne 38f60 <msdos_get_name_node+0xb8> <== NOT EXECUTED
return rc;
if (!create_node)
38f08: e3550000 cmp r5, #0 <== NOT EXECUTED
38f0c: 1a000013 bne 38f60 <msdos_get_name_node+0xb8> <== NOT EXECUTED
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
38f10: e1500003 cmp r0, r3 <== NOT EXECUTED
38f14: 0a000011 beq 38f60 <msdos_get_name_node+0xb8> <== NOT EXECUTED
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
38f18: e3500000 cmp r0, #0 <== NOT EXECUTED
38f1c: 1a00000f bne 38f60 <msdos_get_name_node+0xb8> <== NOT EXECUTED
{
if (strncmp(name, "..", 2) == 0)
38f20: e1a00008 mov r0, r8 <== NOT EXECUTED
38f24: e59f1058 ldr r1, [pc, #88] ; 38f84 <msdos_get_name_node+0xdc><== NOT EXECUTED
38f28: e3a02002 mov r2, #2 <== NOT EXECUTED
38f2c: eb00491b bl 4b3a0 <strncmp> <== NOT EXECUTED
38f30: e3500000 cmp r0, #0 <== NOT EXECUTED
38f34: 1a000009 bne 38f60 <msdos_get_name_node+0xb8> <== NOT EXECUTED
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
38f38: e1d711b4 ldrh r1, [r7, #20] <== NOT EXECUTED
38f3c: e1d731ba ldrh r3, [r7, #26] <== NOT EXECUTED
/* are we right under root dir ? */
if (dotdot_cln == 0)
38f40: e1931801 orrs r1, r3, r1, lsl #16 <== NOT EXECUTED
38f44: 1a000008 bne 38f6c <msdos_get_name_node+0xc4> <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
38f48: e3e03000 mvn r3, #0 <== NOT EXECUTED
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
38f4c: e3a02001 mov r2, #1 <== NOT EXECUTED
38f50: e5862000 str r2, [r6] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
38f54: e586300c str r3, [r6, #12] <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
38f58: e586a004 str sl, [r6, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
38f5c: e5863008 str r3, [r6, #8] <== NOT EXECUTED
}
}
}
}
return rc;
}
38f60: e1a0000a mov r0, sl <== NOT EXECUTED
38f64: e28dd010 add sp, sp, #16 <== NOT EXECUTED
38f68: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
msdos_get_dotdot_dir_info_cluster_num_and_offset(parent_loc->mt_entry,
38f6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
38f70: e1a02006 mov r2, r6 <== NOT EXECUTED
38f74: e1a03007 mov r3, r7 <== NOT EXECUTED
}
}
}
}
return rc;
}
38f78: e28dd010 add sp, sp, #16 <== NOT EXECUTED
38f7c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
msdos_get_dotdot_dir_info_cluster_num_and_offset(parent_loc->mt_entry,
38f80: eaffff36 b 38c60 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
000389a8 <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
389a8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
389ac: e3a06000 mov r6, #0 <== NOT EXECUTED
*ret_token_len = 0;
if (pathlen == 0)
389b0: e2518000 subs r8, r1, #0 <== NOT EXECUTED
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
389b4: e1a07000 mov r7, r0 <== NOT EXECUTED
389b8: e1a04002 mov r4, r2 <== NOT EXECUTED
389bc: e1a05003 mov r5, r3 <== NOT EXECUTED
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
389c0: e5826000 str r6, [r2] <== NOT EXECUTED
*ret_token_len = 0;
389c4: e5836000 str r6, [r3] <== NOT EXECUTED
if (pathlen == 0)
389c8: 01a00008 moveq r0, r8 <== NOT EXECUTED
389cc: 1a000009 bne 389f8 <msdos_get_token+0x50> <== NOT EXECUTED
389d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
389d4: e1560008 cmp r6, r8 <== NOT EXECUTED
389d8: aa00000a bge 38a08 <msdos_get_token+0x60> <== NOT EXECUTED
{
if ( !msdos_is_valid_name_char(path[i]) )
389dc: e7d70006 ldrb r0, [r7, r6] <== NOT EXECUTED
389e0: ebffffd5 bl 3893c <msdos_is_valid_name_char> <== NOT EXECUTED
389e4: e3500000 cmp r0, #0 <== NOT EXECUTED
return MSDOS_INVALID_TOKEN;
++i;
389e8: e2866001 add r6, r6, #1 <== NOT EXECUTED
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
389ec: 0a00000f beq 38a30 <msdos_get_token+0x88> <== NOT EXECUTED
return MSDOS_INVALID_TOKEN;
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
389f0: e3560f41 cmp r6, #260 ; 0x104 <== NOT EXECUTED
389f4: 0a00000d beq 38a30 <msdos_get_token+0x88> <== NOT EXECUTED
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
389f8: e7d70006 ldrb r0, [r7, r6] <== NOT EXECUTED
389fc: ebff4365 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
38a00: e3500000 cmp r0, #0 <== NOT EXECUTED
38a04: 0afffff2 beq 389d4 <msdos_get_token+0x2c> <== NOT EXECUTED
*ret_token = path;
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
38a08: e2563000 subs r3, r6, #0 <== NOT EXECUTED
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
return MSDOS_INVALID_TOKEN;
}
*ret_token = path;
38a0c: e5847000 str r7, [r4] <== NOT EXECUTED
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
38a10: 1a000008 bne 38a38 <msdos_get_token+0x90> <== NOT EXECUTED
{
if ( (*path != '\0') && pathlen )
38a14: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
38a18: e3520000 cmp r2, #0 <== NOT EXECUTED
38a1c: 13a03001 movne r3, #1 <== NOT EXECUTED
38a20: 11a00003 movne r0, r3 <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
38a24: 01a00003 moveq r0, r3 <== NOT EXECUTED
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
38a28: e5853000 str r3, [r5] <== NOT EXECUTED
38a2c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
38a30: e3a00004 mov r0, #4 <== NOT EXECUTED
return type;
}
}
return type;
}
38a34: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
38a38: e3560002 cmp r6, #2 <== NOT EXECUTED
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
38a3c: e5856000 str r6, [r5] <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
38a40: 0a000008 beq 38a68 <msdos_get_token+0xc0> <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
38a44: e3560001 cmp r6, #1 <== NOT EXECUTED
38a48: 0a000001 beq 38a54 <msdos_get_token+0xac> <== NOT EXECUTED
38a4c: e3a00003 mov r0, #3 <== NOT EXECUTED
38a50: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
38a54: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
38a58: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
38a5c: 1afffffa bne 38a4c <msdos_get_token+0xa4> <== NOT EXECUTED
38a60: e1a00006 mov r0, r6 <== NOT EXECUTED
38a64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
38a68: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
38a6c: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
38a70: 1afffff5 bne 38a4c <msdos_get_token+0xa4> <== NOT EXECUTED
38a74: e5d73001 ldrb r3, [r7, #1] <== NOT EXECUTED
38a78: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
38a7c: 1afffff2 bne 38a4c <msdos_get_token+0xa4> <== NOT EXECUTED
38a80: eafffff6 b 38a60 <msdos_get_token+0xb8> <== NOT EXECUTED
000201f0 <msdos_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
201f0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
201f4: e3a0c000 mov ip, #0 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
201f8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
201fc: e1a05000 mov r5, r0 <== NOT EXECUTED
20200: e1a09001 mov r9, r1 <== NOT EXECUTED
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
20204: e3a00001 mov r0, #1 <== NOT EXECUTED
20208: e3a0109c mov r1, #156 ; 0x9c <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
2020c: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
20210: e1a0a002 mov sl, r2 <== NOT EXECUTED
20214: e1a06003 mov r6, r3 <== NOT EXECUTED
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
20218: ebff9d50 bl 7760 <calloc> <== NOT EXECUTED
if (!fs_info)
2021c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
20220: 0a000050 beq 20368 <msdos_initialize_support+0x178> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
20224: e5854034 str r4, [r5, #52] ; 0x34 <== NOT EXECUTED
rc = fat_init_volume_info(temp_mt_entry);
20228: e1a00005 mov r0, r5 <== NOT EXECUTED
2022c: eb0019b6 bl 2690c <fat_init_volume_info> <== NOT EXECUTED
if (rc != RC_OK)
20230: e2507000 subs r7, r0, #0 <== NOT EXECUTED
20234: 1a000032 bne 20304 <msdos_initialize_support+0x114> <== NOT EXECUTED
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
20238: e28d1018 add r1, sp, #24 <== NOT EXECUTED
2023c: e3a08001 mov r8, #1 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
20240: e3e03000 mvn r3, #0 <== NOT EXECUTED
20244: e5218014 str r8, [r1, #-20]! <== NOT EXECUTED
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
20248: e584a090 str sl, [r4, #144] ; 0x90 <== NOT EXECUTED
fs_info->directory_handlers = directory_handlers;
2024c: e584608c str r6, [r4, #140] ; 0x8c <== NOT EXECUTED
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
20250: e1a00005 mov r0, r5 <== NOT EXECUTED
20254: e28d2014 add r2, sp, #20 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
20258: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2025c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
20260: e58d300c str r3, [sp, #12] <== NOT EXECUTED
20264: eb0016ef bl 25e28 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
20268: e2507000 subs r7, r0, #0 <== NOT EXECUTED
2026c: 1a000022 bne 202fc <msdos_initialize_support+0x10c> <== NOT EXECUTED
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
20270: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
20274: e3a03602 mov r3, #2097152 ; 0x200000 <== NOT EXECUTED
20278: e5813014 str r3, [r1, #20] <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
2027c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
20280: e3530000 cmp r3, #0 <== NOT EXECUTED
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
20284: e5818010 str r8, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
fat_fd->map.file_cln = 0;
20288: e5817034 str r7, [r1, #52] ; 0x34 <== NOT EXECUTED
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
2028c: e581301c str r3, [r1, #28] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
20290: e5813038 str r3, [r1, #56] ; 0x38 <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
20294: 1a00001f bne 20318 <msdos_initialize_support+0x128> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
20298: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
2029c: e5813018 str r3, [r1, #24] <== NOT EXECUTED
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
202a0: e1d400b6 ldrh r0, [r4, #6] <== NOT EXECUTED
202a4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
202a8: e1500003 cmp r0, r3 <== NOT EXECUTED
202ac: 31a00003 movcc r0, r3 <== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
202b0: e3a01001 mov r1, #1 <== NOT EXECUTED
202b4: ebff9d29 bl 7760 <calloc> <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
202b8: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
202bc: e5840098 str r0, [r4, #152] ; 0x98 <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
202c0: 0a000021 beq 2034c <msdos_initialize_support+0x15c> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
202c4: e284c094 add ip, r4, #148 ; 0x94 <== NOT EXECUTED
202c8: e3a00003 mov r0, #3 <== NOT EXECUTED
202cc: e3a01001 mov r1, #1 <== NOT EXECUTED
202d0: e3a02010 mov r2, #16 <== NOT EXECUTED
202d4: e3a03000 mov r3, #0 <== NOT EXECUTED
202d8: e58dc000 str ip, [sp] <== NOT EXECUTED
202dc: ebffafc3 bl c1f0 <rtems_semaphore_create> <== NOT EXECUTED
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
202e0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
202e4: 1a000024 bne 2037c <msdos_initialize_support+0x18c> <== NOT EXECUTED
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
202e8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
202ec: e5859028 str r9, [r5, #40] ; 0x28 <== NOT EXECUTED
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
202f0: e585301c str r3, [r5, #28] <== NOT EXECUTED
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
202f4: e5856024 str r6, [r5, #36] ; 0x24 <== NOT EXECUTED
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
202f8: ea000003 b 2030c <msdos_initialize_support+0x11c> <== NOT EXECUTED
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
202fc: e1a00005 mov r0, r5 <== NOT EXECUTED
20300: eb0018de bl 26680 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
20304: e1a00004 mov r0, r4 <== NOT EXECUTED
20308: ebff9e98 bl 7d70 <free> <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
2030c: e1a00007 mov r0, r7 <== NOT EXECUTED
20310: e28dd018 add sp, sp, #24 <== NOT EXECUTED
20314: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
20318: e1a00005 mov r0, r5 <== NOT EXECUTED
2031c: eb0013cc bl 25254 <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
20320: e2507000 subs r7, r0, #0 <== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
20324: 01d400b6 ldrheq r0, [r4, #6] <== NOT EXECUTED
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
20328: 0affffe0 beq 202b0 <msdos_initialize_support+0xc0> <== NOT EXECUTED
{
fat_file_close(temp_mt_entry, fat_fd);
2032c: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
20330: e1a00005 mov r0, r5 <== NOT EXECUTED
20334: eb001691 bl 25d80 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
20338: e1a00005 mov r0, r5 <== NOT EXECUTED
2033c: eb0018cf bl 26680 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
20340: e1a00004 mov r0, r4 <== NOT EXECUTED
20344: ebff9e89 bl 7d70 <free> <== NOT EXECUTED
return rc;
20348: eaffffef b 2030c <msdos_initialize_support+0x11c> <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
2034c: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
20350: e1a00005 mov r0, r5 <== NOT EXECUTED
20354: eb001689 bl 25d80 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
20358: e1a00005 mov r0, r5 <== NOT EXECUTED
2035c: eb0018c7 bl 26680 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
20360: e1a00004 mov r0, r4 <== NOT EXECUTED
20364: ebff9e81 bl 7d70 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
20368: eb0090b4 bl 44640 <__errno> <== NOT EXECUTED
2036c: e3a0300c mov r3, #12 <== NOT EXECUTED
20370: e5803000 str r3, [r0] <== NOT EXECUTED
20374: e3e07000 mvn r7, #0 <== NOT EXECUTED
20378: eaffffe3 b 2030c <msdos_initialize_support+0x11c> <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
2037c: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
20380: e1a00005 mov r0, r5 <== NOT EXECUTED
20384: eb00167d bl 25d80 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
20388: e1a00005 mov r0, r5 <== NOT EXECUTED
2038c: eb0018bb bl 26680 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
20390: e5940098 ldr r0, [r4, #152] ; 0x98 <== NOT EXECUTED
20394: ebff9e75 bl 7d70 <free> <== NOT EXECUTED
free(fs_info);
20398: e1a00004 mov r0, r4 <== NOT EXECUTED
2039c: ebff9e73 bl 7d70 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
203a0: eb0090a6 bl 44640 <__errno> <== NOT EXECUTED
203a4: e3a03005 mov r3, #5 <== NOT EXECUTED
203a8: e5803000 str r3, [r0] <== NOT EXECUTED
203ac: e3e07000 mvn r7, #0 <== NOT EXECUTED
203b0: eaffffd5 b 2030c <msdos_initialize_support+0x11c> <== NOT EXECUTED
0003893c <msdos_is_valid_name_char>:
* MSDOS_NAME_LONG - Valid in a long name only.
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
3893c: e92d4010 push {r4, lr} <== NOT EXECUTED
38940: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (strchr(" +,;=[]", ch) != NULL)
38944: e1a01004 mov r1, r4 <== NOT EXECUTED
38948: e59f004c ldr r0, [pc, #76] ; 3899c <msdos_is_valid_name_char+0x60><== NOT EXECUTED
3894c: eb00477a bl 4a73c <strchr> <== NOT EXECUTED
38950: e3500000 cmp r0, #0 <== NOT EXECUTED
38954: 13a00002 movne r0, #2 <== NOT EXECUTED
38958: 18bd8010 popne {r4, pc} <== NOT EXECUTED
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
3895c: e354002e cmp r4, #46 ; 0x2e <== NOT EXECUTED
38960: 0a00000b beq 38994 <msdos_is_valid_name_char+0x58> <== NOT EXECUTED
38964: e59f3034 ldr r3, [pc, #52] ; 389a0 <msdos_is_valid_name_char+0x64><== NOT EXECUTED
38968: e5933000 ldr r3, [r3] <== NOT EXECUTED
3896c: e0833004 add r3, r3, r4 <== NOT EXECUTED
38970: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
38974: e3130007 tst r3, #7 <== NOT EXECUTED
38978: 1a000005 bne 38994 <msdos_is_valid_name_char+0x58> <== NOT EXECUTED
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
3897c: e1a01004 mov r1, r4 <== NOT EXECUTED
38980: e59f001c ldr r0, [pc, #28] ; 389a4 <msdos_is_valid_name_char+0x68><== NOT EXECUTED
38984: eb00476c bl 4a73c <strchr> <== NOT EXECUTED
38988: e2500000 subs r0, r0, #0 <== NOT EXECUTED
3898c: 13a00001 movne r0, #1 <== NOT EXECUTED
38990: e8bd8010 pop {r4, pc} <== NOT EXECUTED
38994: e3a00001 mov r0, #1 <== NOT EXECUTED
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
38998: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00038a84 <msdos_long_to_short>:
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
38a84: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38a88: e1a06002 mov r6, r2 <== NOT EXECUTED
38a8c: e1a05000 mov r5, r0 <== NOT EXECUTED
38a90: e1a04001 mov r4, r1 <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
38a94: e1a02003 mov r2, r3 <== NOT EXECUTED
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
38a98: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
38a9c: e1a00006 mov r0, r6 <== NOT EXECUTED
38aa0: e3a01020 mov r1, #32 <== NOT EXECUTED
38aa4: eb003c1c bl 47b1c <memset> <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
38aa8: e5d58000 ldrb r8, [r5] <== NOT EXECUTED
38aac: e358002e cmp r8, #46 ; 0x2e <== NOT EXECUTED
38ab0: 13a03000 movne r3, #0 <== NOT EXECUTED
38ab4: 03a03001 moveq r3, #1 <== NOT EXECUTED
38ab8: e3540001 cmp r4, #1 <== NOT EXECUTED
38abc: 0358002e cmpeq r8, #46 ; 0x2e <== NOT EXECUTED
{
sfn[0] = '.';
38ac0: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED
38ac4: 05c63000 strbeq r3, [r6] <== NOT EXECUTED
38ac8: 03a07001 moveq r7, #1 <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
38acc: 0a000043 beq 38be0 <msdos_long_to_short+0x15c> <== NOT EXECUTED
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
38ad0: e3530000 cmp r3, #0 <== NOT EXECUTED
38ad4: 1a000053 bne 38c28 <msdos_long_to_short+0x1a4> <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
38ad8: e3540000 cmp r4, #0 <== NOT EXECUTED
38adc: d3a03000 movle r3, #0 <== NOT EXECUTED
38ae0: da000048 ble 38c08 <msdos_long_to_short+0x184> <== NOT EXECUTED
if ((lfn[i] != ' ') && (lfn[i] != '.'))
38ae4: e3580020 cmp r8, #32 <== NOT EXECUTED
38ae8: 1358002e cmpne r8, #46 ; 0x2e <== NOT EXECUTED
38aec: 03a03000 moveq r3, #0 <== NOT EXECUTED
38af0: 13a03001 movne r3, #1 <== NOT EXECUTED
38af4: 0a000040 beq 38bfc <msdos_long_to_short+0x178> <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
38af8: e3580000 cmp r8, #0 <== NOT EXECUTED
38afc: 13540000 cmpne r4, #0 <== NOT EXECUTED
38b00: da000054 ble 38c58 <msdos_long_to_short+0x1d4> <== NOT EXECUTED
38b04: e3a03000 mov r3, #0 <== NOT EXECUTED
38b08: e58d3000 str r3, [sp] <== NOT EXECUTED
38b0c: e1a0b003 mov fp, r3 <== NOT EXECUTED
38b10: e1a0a003 mov sl, r3 <== NOT EXECUTED
38b14: e3e09000 mvn r9, #0 <== NOT EXECUTED
38b18: ea000011 b 38b64 <msdos_long_to_short+0xe0> <== NOT EXECUTED
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
38b1c: e3530000 cmp r3, #0 <== NOT EXECUTED
38b20: 1a000029 bne 38bcc <msdos_long_to_short+0x148> <== NOT EXECUTED
38b24: e069300a rsb r3, r9, sl <== NOT EXECUTED
38b28: e3530003 cmp r3, #3 <== NOT EXECUTED
38b2c: ca000026 bgt 38bcc <msdos_long_to_short+0x148> <== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
38b30: e2483041 sub r3, r8, #65 ; 0x41 <== NOT EXECUTED
38b34: e3530019 cmp r3, #25 <== NOT EXECUTED
38b38: 93a03001 movls r3, #1 <== NOT EXECUTED
38b3c: 958d3000 strls r3, [sp] <== NOT EXECUTED
38b40: 9a000002 bls 38b50 <msdos_long_to_short+0xcc> <== NOT EXECUTED
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
38b44: e2488061 sub r8, r8, #97 ; 0x61 <== NOT EXECUTED
38b48: e3580019 cmp r8, #25 <== NOT EXECUTED
38b4c: 93a0b001 movls fp, #1 <== NOT EXECUTED
lowercase = true;
count++;
38b50: e28aa001 add sl, sl, #1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
38b54: e7d5800a ldrb r8, [r5, sl] <== NOT EXECUTED
38b58: e3580000 cmp r8, #0 <== NOT EXECUTED
38b5c: 1154000a cmpne r4, sl <== NOT EXECUTED
38b60: da000014 ble 38bb8 <msdos_long_to_short+0x134> <== NOT EXECUTED
{
bool is_dot = *name == '.';
msdos_name_type_t type = msdos_is_valid_name_char(*name);
38b64: e1a00008 mov r0, r8 <== NOT EXECUTED
38b68: ebffff73 bl 3893c <msdos_is_valid_name_char> <== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
38b6c: e3500000 cmp r0, #0 <== NOT EXECUTED
38b70: 13500002 cmpne r0, #2 <== NOT EXECUTED
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
msdos_name_type_t type = msdos_is_valid_name_char(*name);
38b74: e1a07000 mov r7, r0 <== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
38b78: 0a000033 beq 38c4c <msdos_long_to_short+0x1c8> <== NOT EXECUTED
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
38b7c: e358002e cmp r8, #46 ; 0x2e <== NOT EXECUTED
38b80: 13a03000 movne r3, #0 <== NOT EXECUTED
38b84: 03a03001 moveq r3, #1 <== NOT EXECUTED
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
38b88: e3790001 cmn r9, #1 <== NOT EXECUTED
38b8c: 1affffe2 bne 38b1c <msdos_long_to_short+0x98> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
38b90: e35a0008 cmp sl, #8 <== NOT EXECUTED
38b94: 0a00001f beq 38c18 <msdos_long_to_short+0x194> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
38b98: e3530000 cmp r3, #0 <== NOT EXECUTED
38b9c: 0affffe3 beq 38b30 <msdos_long_to_short+0xac> <== NOT EXECUTED
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
38ba0: e1a0900a mov r9, sl <== NOT EXECUTED
lowercase = true;
count++;
38ba4: e28aa001 add sl, sl, #1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
38ba8: e7d5800a ldrb r8, [r5, sl] <== NOT EXECUTED
38bac: e3580000 cmp r8, #0 <== NOT EXECUTED
38bb0: 1154000a cmpne r4, sl <== NOT EXECUTED
38bb4: caffffea bgt 38b64 <msdos_long_to_short+0xe0> <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
38bb8: e35b0000 cmp fp, #0 <== NOT EXECUTED
38bbc: 0a000025 beq 38c58 <msdos_long_to_short+0x1d4> <== NOT EXECUTED
38bc0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
38bc4: e3530000 cmp r3, #0 <== NOT EXECUTED
38bc8: 0a000022 beq 38c58 <msdos_long_to_short+0x1d4> <== NOT EXECUTED
msdos_filename_unix2dos (lfn, lfn_len, sfn);
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
38bcc: e3a07002 mov r7, #2 <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
38bd0: e1a00005 mov r0, r5 <== NOT EXECUTED
38bd4: e1a01004 mov r1, r4 <== NOT EXECUTED
38bd8: e1a02006 mov r2, r6 <== NOT EXECUTED
38bdc: eb002813 bl 42c30 <msdos_filename_unix2dos> <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
38be0: e1a00007 mov r0, r7 <== NOT EXECUTED
38be4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
38be8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
38bec: e7d52003 ldrb r2, [r5, r3] <== NOT EXECUTED
38bf0: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
38bf4: 13520020 cmpne r2, #32 <== NOT EXECUTED
38bf8: 1affffbe bne 38af8 <msdos_long_to_short+0x74> <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
38bfc: e2833001 add r3, r3, #1 <== NOT EXECUTED
38c00: e1540003 cmp r4, r3 <== NOT EXECUTED
38c04: cafffff8 bgt 38bec <msdos_long_to_short+0x168> <== NOT EXECUTED
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
38c08: e1530004 cmp r3, r4 <== NOT EXECUTED
38c0c: 03a07000 moveq r7, #0 <== NOT EXECUTED
38c10: 1affffb8 bne 38af8 <msdos_long_to_short+0x74> <== NOT EXECUTED
38c14: eafffff1 b 38be0 <msdos_long_to_short+0x15c> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
38c18: e3530000 cmp r3, #0 <== NOT EXECUTED
38c1c: 0affffea beq 38bcc <msdos_long_to_short+0x148> <== NOT EXECUTED
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
38c20: e1a0900a mov r9, sl <== NOT EXECUTED
38c24: eaffffde b 38ba4 <msdos_long_to_short+0x120> <== NOT EXECUTED
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
38c28: e5d53001 ldrb r3, [r5, #1] <== NOT EXECUTED
38c2c: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
38c30: 03540002 cmpeq r4, #2 <== NOT EXECUTED
38c34: 1affffa7 bne 38ad8 <msdos_long_to_short+0x54> <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
38c38: e3a0302e mov r3, #46 ; 0x2e <== NOT EXECUTED
38c3c: e5c63000 strb r3, [r6] <== NOT EXECUTED
38c40: e5c63001 strb r3, [r6, #1] <== NOT EXECUTED
38c44: e3a07001 mov r7, #1 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
38c48: eaffffe4 b 38be0 <msdos_long_to_short+0x15c> <== NOT EXECUTED
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
if (type == MSDOS_NAME_INVALID)
38c4c: e3500000 cmp r0, #0 <== NOT EXECUTED
38c50: 0affffe2 beq 38be0 <msdos_long_to_short+0x15c> <== NOT EXECUTED
38c54: eaffffdd b 38bd0 <msdos_long_to_short+0x14c> <== NOT EXECUTED
msdos_filename_unix2dos (lfn, lfn_len, sfn);
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
38c58: e3a07001 mov r7, #1 <== NOT EXECUTED
38c5c: eaffffdb b 38bd0 <msdos_long_to_short+0x14c> <== NOT EXECUTED
000203b4 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
203b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
203b8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
203bc: e59d7024 ldr r7, [sp, #36] ; 0x24 <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
203c0: e2013a0f and r3, r1, #61440 ; 0xf000 <== NOT EXECUTED
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
203c4: e5972010 ldr r2, [r7, #16] <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
203c8: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
203cc: e1a04001 mov r4, r1 <== NOT EXECUTED
203d0: e1a08000 mov r8, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
203d4: e5925034 ldr r5, [r2, #52] ; 0x34 <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
203d8: 0a000016 beq 20438 <msdos_mknod+0x84> <== NOT EXECUTED
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
203dc: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
203e0: 03a0a005 moveq sl, #5 <== NOT EXECUTED
203e4: 1a00001a bne 20454 <msdos_mknod+0xa0> <== NOT EXECUTED
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
203e8: e3a01000 mov r1, #0 <== NOT EXECUTED
203ec: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
203f0: e1a02001 mov r2, r1 <== NOT EXECUTED
203f4: ebffb032 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
203f8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
203fc: 1a00000f bne 20440 <msdos_mknod+0x8c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
20400: e1a00008 mov r0, r8 <== NOT EXECUTED
20404: eb00ab9b bl 4b278 <strlen> <== NOT EXECUTED
20408: e1a0100a mov r1, sl <== NOT EXECUTED
2040c: e1a03000 mov r3, r0 <== NOT EXECUTED
20410: e1a02008 mov r2, r8 <== NOT EXECUTED
20414: e1a00007 mov r0, r7 <== NOT EXECUTED
20418: e88d0050 stm sp, {r4, r6} <== NOT EXECUTED
2041c: eb00595e bl 3699c <msdos_creat_node> <== NOT EXECUTED
20420: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
20424: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
20428: ebffb06d bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
2042c: e1a00004 mov r0, r4 <== NOT EXECUTED
20430: e28dd008 add sp, sp, #8 <== NOT EXECUTED
20434: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
20438: e3a0a001 mov sl, #1 <== NOT EXECUTED
2043c: eaffffe9 b 203e8 <msdos_mknod+0x34> <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20440: eb00907e bl 44640 <__errno> <== NOT EXECUTED
20444: e3a03005 mov r3, #5 <== NOT EXECUTED
20448: e5803000 str r3, [r0] <== NOT EXECUTED
2044c: e3e04000 mvn r4, #0 <== NOT EXECUTED
20450: eafffff5 b 2042c <msdos_mknod+0x78> <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
20454: eb009079 bl 44640 <__errno> <== NOT EXECUTED
20458: e3a03016 mov r3, #22 <== NOT EXECUTED
2045c: e5803000 str r3, [r0] <== NOT EXECUTED
20460: e3e04000 mvn r4, #0 <== NOT EXECUTED
20464: eafffff0 b 2042c <msdos_mknod+0x78> <== NOT EXECUTED
00020468 <msdos_node_type>:
* node type
*
*/
rtems_filesystem_node_types_t
msdos_node_type(rtems_filesystem_location_info_t *pathloc)
{
20468: e5903000 ldr r3, [r0] <== NOT EXECUTED
* call
*/
fat_fd = pathloc->node_access;
return fat_fd->fat_file_type;
}
2046c: e5930010 ldr r0, [r3, #16] <== NOT EXECUTED
20470: e12fff1e bx lr <== NOT EXECUTED
00020474 <msdos_rename>:
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
20474: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
20478: e1a04003 mov r4, r3 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
2047c: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
20480: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
20484: e1a00004 mov r0, r4 <== NOT EXECUTED
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
20488: e1a07001 mov r7, r1 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
2048c: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
20490: e1a05002 mov r5, r2 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
20494: eb00ab77 bl 4b278 <strlen> <== NOT EXECUTED
20498: e28d200c add r2, sp, #12 <== NOT EXECUTED
2049c: e1a01000 mov r1, r0 <== NOT EXECUTED
204a0: e28d3008 add r3, sp, #8 <== NOT EXECUTED
204a4: e1a00004 mov r0, r4 <== NOT EXECUTED
const char *new_name)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
204a8: e5978000 ldr r8, [r7] <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
204ac: eb00613d bl 389a8 <msdos_get_token> <== NOT EXECUTED
204b0: e3500003 cmp r0, #3 <== NOT EXECUTED
204b4: e1a0a000 mov sl, r0 <== NOT EXECUTED
204b8: 1a000019 bne 20524 <msdos_rename+0xb0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
204bc: e3a01000 mov r1, #0 <== NOT EXECUTED
204c0: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
204c4: e1a02001 mov r2, r1 <== NOT EXECUTED
204c8: ebffaffd bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
204cc: e3500000 cmp r0, #0 <== NOT EXECUTED
204d0: 1a000018 bne 20538 <msdos_rename+0xc4> <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
204d4: e1a02004 mov r2, r4 <== NOT EXECUTED
204d8: e3a0c902 mov ip, #32768 ; 0x8000 <== NOT EXECUTED
204dc: e1a00005 mov r0, r5 <== NOT EXECUTED
204e0: e1a0100a mov r1, sl <== NOT EXECUTED
204e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
204e8: e58dc000 str ip, [sp] <== NOT EXECUTED
204ec: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
204f0: eb005929 bl 3699c <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
204f4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
204f8: 1a000004 bne 20510 <msdos_rename+0x9c> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
204fc: e5970010 ldr r0, [r7, #16] <== NOT EXECUTED
20500: e2881020 add r1, r8, #32 <== NOT EXECUTED
20504: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
20508: eb006080 bl 38710 <msdos_set_first_char4file_name> <== NOT EXECUTED
2050c: e1a04000 mov r4, r0 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
20510: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
20514: ebffb032 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
20518: e1a00004 mov r0, r4 <== NOT EXECUTED
2051c: e28dd010 add sp, sp, #16 <== NOT EXECUTED
20520: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
20524: eb009045 bl 44640 <__errno> <== NOT EXECUTED
20528: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
2052c: e5803000 str r3, [r0] <== NOT EXECUTED
20530: e3e04000 mvn r4, #0 <== NOT EXECUTED
20534: eafffff7 b 20518 <msdos_rename+0xa4> <== NOT EXECUTED
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20538: eb009040 bl 44640 <__errno> <== NOT EXECUTED
2053c: e3a03005 mov r3, #5 <== NOT EXECUTED
20540: e5803000 str r3, [r0] <== NOT EXECUTED
20544: e3e04000 mvn r4, #0 <== NOT EXECUTED
20548: eafffff2 b 20518 <msdos_rename+0xa4> <== NOT EXECUTED
00038880 <msdos_set_dir_wrt_time_and_date>:
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
38880: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
38884: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
38888: e1a05001 mov r5, r1 <== NOT EXECUTED
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
3888c: e28d8004 add r8, sp, #4 <== NOT EXECUTED
38890: e28d7006 add r7, sp, #6 <== NOT EXECUTED
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
38894: e1a04000 mov r4, r0 <== NOT EXECUTED
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
38898: e1a02007 mov r2, r7 <== NOT EXECUTED
3889c: e1a01008 mov r1, r8 <== NOT EXECUTED
388a0: e5950040 ldr r0, [r5, #64] ; 0x40 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
388a4: e594a034 ldr sl, [r4, #52] ; 0x34 <== NOT EXECUTED
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
388a8: eb002836 bl 42988 <msdos_date_unix2dos> <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
388ac: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
388b0: e3520000 cmp r2, #0 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
388b4: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
388b8: 1a000003 bne 388cc <msdos_set_dir_wrt_time_and_date+0x4c> <== NOT EXECUTED
388bc: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
388c0: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
388c4: 1593201c ldrne r2, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
388c8: 1a000003 bne 388dc <msdos_set_dir_wrt_time_and_date+0x5c> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
388cc: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
388d0: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
388d4: e2422002 sub r2, r2, #2 <== NOT EXECUTED
388d8: e0812312 add r2, r1, r2, lsl r3 <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
388dc: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
388e0: e5da6002 ldrb r6, [sl, #2] <== NOT EXECUTED
388e4: e0826633 add r6, r2, r3, lsr r6 <== NOT EXECUTED
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
388e8: e1da50b0 ldrh r5, [sl] <== NOT EXECUTED
388ec: e2455001 sub r5, r5, #1 <== NOT EXECUTED
388f0: e0055003 and r5, r5, r3 <== NOT EXECUTED
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
388f4: e1a01006 mov r1, r6 <== NOT EXECUTED
388f8: e2852016 add r2, r5, #22 <== NOT EXECUTED
388fc: e3a03002 mov r3, #2 <== NOT EXECUTED
38900: e1a00004 mov r0, r4 <== NOT EXECUTED
38904: e58d7000 str r7, [sp] <== NOT EXECUTED
38908: ebffb70b bl 2653c <_fat_block_write> <== NOT EXECUTED
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
3890c: e1a01006 mov r1, r6 <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
38910: e1a07000 mov r7, r0 <== NOT EXECUTED
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
38914: e2852018 add r2, r5, #24 <== NOT EXECUTED
38918: e1a00004 mov r0, r4 <== NOT EXECUTED
3891c: e3a03002 mov r3, #2 <== NOT EXECUTED
38920: e58d8000 str r8, [sp] <== NOT EXECUTED
38924: ebffb704 bl 2653c <_fat_block_write> <== NOT EXECUTED
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) )
38928: e1a07fa7 lsr r7, r7, #31 <== NOT EXECUTED
3892c: e1970fa0 orrs r0, r7, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
38930: 13e00000 mvnne r0, #0 <== NOT EXECUTED
38934: e28dd008 add sp, sp, #8 <== NOT EXECUTED
38938: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000385d4 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
385d4: e92d4010 push {r4, lr} <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
385d8: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
385dc: e3530000 cmp r3, #0 <== NOT EXECUTED
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
385e0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
385e4: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
385e8: 1a000003 bne 385fc <msdos_set_file_size+0x28> <== NOT EXECUTED
385ec: e5dc200a ldrb r2, [ip, #10] <== NOT EXECUTED
385f0: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
385f4: 159c301c ldrne r3, [ip, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
385f8: 1a000003 bne 3860c <msdos_set_file_size+0x38> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
385fc: e5dce005 ldrb lr, [ip, #5] <== NOT EXECUTED
38600: e59c2030 ldr r2, [ip, #48] ; 0x30 <== NOT EXECUTED
38604: e2433002 sub r3, r3, #2 <== NOT EXECUTED
38608: e0823e13 add r3, r2, r3, lsl lr <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
3860c: e1dc20b0 ldrh r2, [ip] <== NOT EXECUTED
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
38610: e591e024 ldr lr, [r1, #36] ; 0x24 <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
38614: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
38618: e2422001 sub r2, r2, #1 <== NOT EXECUTED
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
3861c: e5dc1002 ldrb r1, [ip, #2] <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
38620: e28dc008 add ip, sp, #8 <== NOT EXECUTED
38624: e52c4004 str r4, [ip, #-4]! <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
38628: e002200e and r2, r2, lr <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
3862c: e083113e add r1, r3, lr, lsr r1 <== NOT EXECUTED
38630: e282201c add r2, r2, #28 <== NOT EXECUTED
38634: e3a03004 mov r3, #4 <== NOT EXECUTED
38638: e58dc000 str ip, [sp] <== NOT EXECUTED
3863c: ebffb7be bl 2653c <_fat_block_write> <== NOT EXECUTED
(char *)(&le_new_length));
if ( ret < 0 )
38640: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
return RC_OK;
}
38644: b3e00000 mvnlt r0, #0 <== NOT EXECUTED
38648: a3a00000 movge r0, #0 <== NOT EXECUTED
3864c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
38650: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00038710 <msdos_set_first_char4file_name>:
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
38710: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
38714: e2814008 add r4, r1, #8 <== NOT EXECUTED
38718: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
3871c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
38720: e5cd2004 strb r2, [sp, #4] <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
38724: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
38728: e58d400c str r4, [sp, #12] <== NOT EXECUTED
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
3872c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
38730: e5916000 ldr r6, [r1] <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
38734: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
38738: e1520006 cmp r2, r6 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
3873c: e1a04000 mov r4, r0 <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
38740: e1a05003 mov r5, r3 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
38744: e591a004 ldr sl, [r1, #4] <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
38748: 0a000041 beq 38854 <msdos_set_first_char4file_name+0x144> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
3874c: e5912008 ldr r2, [r1, #8] <== NOT EXECUTED
38750: e3720001 cmn r2, #1 <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
38754: e1d380b6 ldrh r8, [r3, #6] <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
38758: 0a000044 beq 38870 <msdos_set_first_char4file_name+0x160> <== NOT EXECUTED
start = dir_pos->sname;
3875c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
38760: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
38764: e1d320b0 ldrh r2, [r3] <== NOT EXECUTED
38768: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
3876c: e28d7004 add r7, sp, #4 <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
38770: e28d9008 add r9, sp, #8 <== NOT EXECUTED
38774: ea000006 b 38794 <msdos_set_first_char4file_name+0x84> <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
38778: e2800020 add r0, r0, #32 <== NOT EXECUTED
if (start.ofs >= dir_block_size)
3877c: e1580000 cmp r8, r0 <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
38780: e58d000c str r0, [sp, #12] <== NOT EXECUTED
if (start.ofs >= dir_block_size)
38784: 9a00001f bls 38808 <msdos_set_first_char4file_name+0xf8> <== NOT EXECUTED
38788: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
3878c: e5d5c002 ldrb ip, [r5, #2] <== NOT EXECUTED
38790: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
38794: e3510000 cmp r1, #0 <== NOT EXECUTED
38798: 1a000003 bne 387ac <msdos_set_first_char4file_name+0x9c> <== NOT EXECUTED
3879c: e5d3e00a ldrb lr, [r3, #10] <== NOT EXECUTED
387a0: e31e0003 tst lr, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
387a4: 1593101c ldrne r1, [r3, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
387a8: 1a000003 bne 387bc <msdos_set_first_char4file_name+0xac> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
387ac: e593e030 ldr lr, [r3, #48] ; 0x30 <== NOT EXECUTED
387b0: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
387b4: e2411002 sub r1, r1, #2 <== NOT EXECUTED
387b8: e08e1311 add r1, lr, r1, lsl r3 <== NOT EXECUTED
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
387bc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
387c0: e0811c30 add r1, r1, r0, lsr ip <== NOT EXECUTED
387c4: e0022000 and r2, r2, r0 <== NOT EXECUTED
387c8: e3a03001 mov r3, #1 <== NOT EXECUTED
387cc: e1a00004 mov r0, r4 <== NOT EXECUTED
387d0: e58d7000 str r7, [sp] <== NOT EXECUTED
387d4: ebffb758 bl 2653c <_fat_block_write> <== NOT EXECUTED
&fchar);
if (ret < 0)
387d8: e3500000 cmp r0, #0 <== NOT EXECUTED
387dc: ba00001a blt 3884c <msdos_set_first_char4file_name+0x13c> <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
387e0: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
387e4: e1510006 cmp r1, r6 <== NOT EXECUTED
387e8: 159d000c ldrne r0, [sp, #12] <== NOT EXECUTED
387ec: 1affffe1 bne 38778 <msdos_set_first_char4file_name+0x68> <== NOT EXECUTED
387f0: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
387f4: e150000a cmp r0, sl <== NOT EXECUTED
387f8: 1affffde bne 38778 <msdos_set_first_char4file_name+0x68> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
if ( rc != RC_OK )
return rc;
start.ofs = 0;
387fc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return RC_OK;
}
38800: e28dd010 add sp, sp, #16 <== NOT EXECUTED
38804: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
38808: e5953038 ldr r3, [r5, #56] ; 0x38 <== NOT EXECUTED
3880c: e1530006 cmp r3, r6 <== NOT EXECUTED
38810: 1a000002 bne 38820 <msdos_set_first_char4file_name+0x110> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
38814: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED
38818: e3130003 tst r3, #3 <== NOT EXECUTED
3881c: 1afffff6 bne 387fc <msdos_set_first_char4file_name+0xec> <== NOT EXECUTED
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
38820: e1a00004 mov r0, r4 <== NOT EXECUTED
38824: e1a02009 mov r2, r9 <== NOT EXECUTED
38828: eb001c32 bl 3f8f8 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3882c: e3500000 cmp r0, #0 <== NOT EXECUTED
38830: 1afffff2 bne 38800 <msdos_set_first_char4file_name+0xf0> <== NOT EXECUTED
return rc;
start.ofs = 0;
38834: e58d000c str r0, [sp, #12] <== NOT EXECUTED
38838: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
3883c: e5d5c002 ldrb ip, [r5, #2] <== NOT EXECUTED
38840: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
38844: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
38848: eaffffd1 b 38794 <msdos_set_first_char4file_name+0x84> <== NOT EXECUTED
3884c: e3e00000 mvn r0, #0 <== NOT EXECUTED
38850: eaffffea b 38800 <msdos_set_first_char4file_name+0xf0> <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
38854: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED
38858: e3120003 tst r2, #3 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
3885c: 15938028 ldrne r8, [r3, #40] ; 0x28 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
38860: 0affffb9 beq 3874c <msdos_set_first_char4file_name+0x3c> <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
38864: e5912008 ldr r2, [r1, #8] <== NOT EXECUTED
38868: e3720001 cmn r2, #1 <== NOT EXECUTED
3886c: 1affffba bne 3875c <msdos_set_first_char4file_name+0x4c> <== NOT EXECUTED
start = dir_pos->sname;
38870: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
38874: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
38878: e58d200c str r2, [sp, #12] <== NOT EXECUTED
3887c: eaffffb6 b 3875c <msdos_set_first_char4file_name+0x4c> <== NOT EXECUTED
00038654 <msdos_set_first_cluster_num>:
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
38654: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
38658: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
3865c: e3530000 cmp r3, #0 <== NOT EXECUTED
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
38660: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
38664: e1a04000 mov r4, r0 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
38668: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t new_cln = fat_fd->cln;
3866c: e591701c ldr r7, [r1, #28] <== NOT EXECUTED
38670: 1a000003 bne 38684 <msdos_set_first_cluster_num+0x30> <== NOT EXECUTED
38674: e5d2000a ldrb r0, [r2, #10] <== NOT EXECUTED
38678: e3100003 tst r0, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
3867c: 1592301c ldrne r3, [r2, #28] <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
38680: 1a000003 bne 38694 <msdos_set_first_cluster_num+0x40> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
38684: e5d2c005 ldrb ip, [r2, #5] <== NOT EXECUTED
38688: e5920030 ldr r0, [r2, #48] ; 0x30 <== NOT EXECUTED
3868c: e2433002 sub r3, r3, #2 <== NOT EXECUTED
38690: e0803c13 add r3, r0, r3, lsl ip <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
38694: e5d26002 ldrb r6, [r2, #2] <== NOT EXECUTED
38698: e5911024 ldr r1, [r1, #36] ; 0x24 <== NOT EXECUTED
3869c: e0836631 add r6, r3, r1, lsr r6 <== NOT EXECUTED
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
386a0: e1d250b0 ldrh r5, [r2] <== NOT EXECUTED
386a4: e2455001 sub r5, r5, #1 <== NOT EXECUTED
386a8: e0055001 and r5, r5, r1 <== NOT EXECUTED
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
386ac: e28dc006 add ip, sp, #6 <== NOT EXECUTED
386b0: e1a01006 mov r1, r6 <== NOT EXECUTED
386b4: e285201a add r2, r5, #26 <== NOT EXECUTED
386b8: e58dc000 str ip, [sp] <== NOT EXECUTED
386bc: e3a03002 mov r3, #2 <== NOT EXECUTED
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
386c0: e3a0c000 mov ip, #0 <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
386c4: e1a00004 mov r0, r4 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
386c8: e1cd70b6 strh r7, [sp, #6] <== NOT EXECUTED
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
386cc: e1cdc0b4 strh ip, [sp, #4] <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
386d0: ebffb799 bl 2653c <_fat_block_write> <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
386d4: e1a07827 lsr r7, r7, #16 <== NOT EXECUTED
386d8: e28dc008 add ip, sp, #8 <== NOT EXECUTED
386dc: e16c70b4 strh r7, [ip, #-4]! <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
386e0: e1a08000 mov r8, r0 <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
386e4: e1a01006 mov r1, r6 <== NOT EXECUTED
386e8: e1a00004 mov r0, r4 <== NOT EXECUTED
386ec: e2852014 add r2, r5, #20 <== NOT EXECUTED
386f0: e3a03002 mov r3, #2 <== NOT EXECUTED
386f4: e58dc000 str ip, [sp] <== NOT EXECUTED
386f8: ebffb78f bl 2653c <_fat_block_write> <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
386fc: e1a08fa8 lsr r8, r8, #31 <== NOT EXECUTED
38700: e1980fa0 orrs r0, r8, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
38704: 13e00000 mvnne r0, #0 <== NOT EXECUTED
38708: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3870c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000378ec <msdos_shut_down>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
378ec: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
378f0: e590101c ldr r1, [r0, #28] <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
378f4: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
378f8: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
378fc: ebffb91f bl 25d80 <fat_file_close> <== NOT EXECUTED
37900: e2506000 subs r6, r0, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
37904: e1a00004 mov r0, r4 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
37908: 13e06000 mvnne r6, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
3790c: ebffbb5b bl 26680 <fat_shutdown_drive> <== NOT EXECUTED
37910: e3500000 cmp r0, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
37914: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
37918: 13e06000 mvnne r6, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
3791c: ebff52a5 bl c3b8 <rtems_semaphore_delete> <== NOT EXECUTED
free(fs_info->cl_buf);
37920: e5950098 ldr r0, [r5, #152] ; 0x98 <== NOT EXECUTED
37924: ebff4111 bl 7d70 <free> <== NOT EXECUTED
free(temp_mt_entry->fs_info);
37928: e5940034 ldr r0, [r4, #52] ; 0x34 <== NOT EXECUTED
3792c: ebff410f bl 7d70 <free> <== NOT EXECUTED
return rc;
}
37930: e1a00006 mov r0, r6 <== NOT EXECUTED
37934: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00002a7c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
2a7c: e92d4010 push {r4, lr}
2a80: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
2a84: eb003421 bl fb10 <fileno>
2a88: e3500002 cmp r0, #2
2a8c: 9a000003 bls 2aa0 <newlib_free_buffers+0x24>
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
2a90: e1a00004 mov r0, r4 <== NOT EXECUTED
2a94: eb00336b bl f848 <fclose> <== NOT EXECUTED
}
return 0;
}
2a98: e3a00000 mov r0, #0
2a9c: e8bd8010 pop {r4, pc}
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
2aa0: e1d430bc ldrh r3, [r4, #12]
2aa4: e3130080 tst r3, #128 ; 0x80
2aa8: 0afffffa beq 2a98 <newlib_free_buffers+0x1c>
free( fp->_bf._base );
2aac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
2ab0: ebfffd7c bl 20a8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2ab4: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2ab8: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2abc: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2ac0: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2ac4: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2ac8: e5843000 str r3, [r4] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
2acc: e3a00000 mov r0, #0 <== NOT EXECUTED
2ad0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002558 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
2558: e92d4010 push {r4, lr}
rtems_device_driver status;
if ( !initialized ) {
255c: e59f3044 ldr r3, [pc, #68] ; 25a8 <null_initialize+0x50>
2560: e5d32000 ldrb r2, [r3]
2564: e3520000 cmp r2, #0
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
2568: e1a04000 mov r4, r0
rtems_device_driver status;
if ( !initialized ) {
256c: 0a000001 beq 2578 <null_initialize+0x20>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
2570: e3a00000 mov r0, #0
2574: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2578: e3a0c001 mov ip, #1
status = rtems_io_register_name(
257c: e59f0028 ldr r0, [pc, #40] ; 25ac <null_initialize+0x54>
2580: e1a01004 mov r1, r4
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2584: e5c3c000 strb ip, [r3]
status = rtems_io_register_name(
2588: eb0001b7 bl 2c6c <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
258c: e3500000 cmp r0, #0
2590: 1a000003 bne 25a4 <null_initialize+0x4c>
rtems_fatal_error_occurred(status);
NULL_major = major;
2594: e59f3014 ldr r3, [pc, #20] ; 25b0 <null_initialize+0x58>
}
return RTEMS_SUCCESSFUL;
}
2598: e3a00000 mov r0, #0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
259c: e5834000 str r4, [r3]
}
return RTEMS_SUCCESSFUL;
}
25a0: e8bd8010 pop {r4, pc}
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
25a4: eb001287 bl 6fc8 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002d14 <open>:
int open(
const char *pathname,
int flags,
...
)
{
2d14: e92d000e push {r1, r2, r3}
2d18: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
2d1c: e24dd01c sub sp, sp, #28
2d20: e59d503c ldr r5, [sp, #60] ; 0x3c
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2d24: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
2d28: e2138001 ands r8, r3, #1
2d2c: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2d30: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
2d34: e28d3044 add r3, sp, #68 ; 0x44
int open(
const char *pathname,
int flags,
...
)
{
2d38: e1a06000 mov r6, r0
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
2d3c: 13888002 orrne r8, r8, #2
va_start(ap, flags);
mode = va_arg( ap, int );
2d40: e58d3018 str r3, [sp, #24]
2d44: e59da040 ldr sl, [sp, #64] ; 0x40
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
2d48: eb0020f1 bl b114 <rtems_libio_allocate>
if ( iop == 0 ) {
2d4c: e2504000 subs r4, r0, #0
2d50: 03a06017 moveq r6, #23
2d54: 0a00005d beq 2ed0 <open+0x1bc>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2d58: e1a00006 mov r0, r6
2d5c: eb003671 bl 10728 <strlen>
2d60: e28d7004 add r7, sp, #4
2d64: e1a01000 mov r1, r0
2d68: e1a02008 mov r2, r8
2d6c: e1a00006 mov r0, r6
2d70: e3a08001 mov r8, #1
2d74: e1a03007 mov r3, r7
2d78: e58d8000 str r8, [sp]
2d7c: ebfffca7 bl 2020 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
2d80: e3700001 cmn r0, #1
2d84: 0a000055 beq 2ee0 <open+0x1cc>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
2d88: e2053c0a and r3, r5, #2560 ; 0xa00
2d8c: e3530c0a cmp r3, #2560 ; 0xa00
2d90: 03a06011 moveq r6, #17
2d94: 0a000040 beq 2e9c <open+0x188>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2d98: e59d300c ldr r3, [sp, #12]
2d9c: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access;
2da0: e59d3004 ldr r3, [sp, #4]
iop->flags |= rtems_libio_fcntl_flags( flags );
2da4: e1a00005 mov r0, r5
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
2da8: e5843038 str r3, [r4, #56] ; 0x38
iop->flags |= rtems_libio_fcntl_flags( flags );
2dac: e5948014 ldr r8, [r4, #20]
2db0: eb002105 bl b1cc <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
2db4: e1a0e007 mov lr, r7
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2db8: e1808008 orr r8, r0, r8
iop->pathinfo = loc;
2dbc: e8be000f ldm lr!, {r0, r1, r2, r3}
2dc0: e284c018 add ip, r4, #24
2dc4: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
2dc8: e594303c ldr r3, [r4, #60] ; 0x3c
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2dcc: e59e2000 ldr r2, [lr]
if ( !iop->handlers || !iop->handlers->open_h ) {
2dd0: e3530000 cmp r3, #0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2dd4: e58c2000 str r2, [ip]
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2dd8: e5848014 str r8, [r4, #20]
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
2ddc: 0a00002d beq 2e98 <open+0x184>
2de0: e593c000 ldr ip, [r3]
2de4: e35c0000 cmp ip, #0
2de8: 0a00002a beq 2e98 <open+0x184>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2dec: e1a01006 mov r1, r6
2df0: e1a0300a mov r3, sl
2df4: e1a00004 mov r0, r4
2df8: e1a02005 mov r2, r5
2dfc: e1a0e00f mov lr, pc
2e00: e12fff1c bx ip
if ( rc ) {
2e04: e3500000 cmp r0, #0
2e08: 1a000009 bne 2e34 <open+0x120>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2e0c: e3150b01 tst r5, #1024 ; 0x400
2e10: 1a00000c bne 2e48 <open+0x134>
2e14: e59f5150 ldr r5, [pc, #336] ; 2f6c <open+0x258>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2e18: e5950000 ldr r0, [r5]
2e1c: e0604004 rsb r4, r0, r4
2e20: e1a00344 asr r0, r4, #6
}
2e24: e28dd01c add sp, sp, #28
2e28: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
2e2c: e28dd00c add sp, sp, #12
2e30: e12fff1e bx lr
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
2e34: eb003236 bl f714 <__errno>
2e38: e5906000 ldr r6, [r0]
*/
done:
va_end(ap);
if ( rc ) {
2e3c: e3560000 cmp r6, #0
2e40: 0afffff3 beq 2e14 <open+0x100>
2e44: ea000014 b 2e9c <open+0x188>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
2e48: e59f511c ldr r5, [pc, #284] ; 2f6c <open+0x258>
2e4c: e5950000 ldr r0, [r5]
2e50: e0600004 rsb r0, r0, r4
2e54: e1a00340 asr r0, r0, #6
2e58: e3a01000 mov r1, #0
2e5c: e3a02000 mov r2, #0
2e60: eb001fe7 bl ae04 <ftruncate>
if ( rc ) {
2e64: e2506000 subs r6, r0, #0
2e68: 0affffea beq 2e18 <open+0x104>
if(errno) rc = errno;
2e6c: eb003228 bl f714 <__errno> <== NOT EXECUTED
2e70: e5903000 ldr r3, [r0] <== NOT EXECUTED
2e74: e3530000 cmp r3, #0 <== NOT EXECUTED
2e78: 1a000038 bne 2f60 <open+0x24c> <== NOT EXECUTED
close( iop - rtems_libio_iops );
2e7c: e5950000 ldr r0, [r5] <== NOT EXECUTED
2e80: e0600004 rsb r0, r0, r4 <== NOT EXECUTED
2e84: e1a00340 asr r0, r0, #6 <== NOT EXECUTED
2e88: e3a04000 mov r4, #0 <== NOT EXECUTED
2e8c: eb001fb3 bl ad60 <close> <== NOT EXECUTED
2e90: e1a07004 mov r7, r4 <== NOT EXECUTED
2e94: eaffffe8 b 2e3c <open+0x128> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2e98: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
2e9c: e3540000 cmp r4, #0
rtems_libio_free( iop );
2ea0: 11a00004 movne r0, r4
2ea4: 1b002084 blne b0bc <rtems_libio_free>
if ( loc_to_free )
2ea8: e3570000 cmp r7, #0
2eac: 0a000007 beq 2ed0 <open+0x1bc>
rtems_filesystem_freenode( loc_to_free );
2eb0: e597300c ldr r3, [r7, #12]
2eb4: e3530000 cmp r3, #0
2eb8: 0a000004 beq 2ed0 <open+0x1bc>
2ebc: e593301c ldr r3, [r3, #28]
2ec0: e3530000 cmp r3, #0
2ec4: 11a00007 movne r0, r7
2ec8: 11a0e00f movne lr, pc
2ecc: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
2ed0: eb00320f bl f714 <__errno>
2ed4: e5806000 str r6, [r0]
2ed8: e3e00000 mvn r0, #0
2edc: eaffffd0 b 2e24 <open+0x110>
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
2ee0: eb00320b bl f714 <__errno>
2ee4: e5903000 ldr r3, [r0]
2ee8: e3530002 cmp r3, #2
2eec: 0a000003 beq 2f00 <open+0x1ec>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
2ef0: eb003207 bl f714 <__errno>
2ef4: e3a07000 mov r7, #0
2ef8: e5906000 ldr r6, [r0]
goto done;
2efc: eaffffce b 2e3c <open+0x128>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2f00: e2159c02 ands r9, r5, #512 ; 0x200
2f04: 01a07009 moveq r7, r9
2f08: 01a06003 moveq r6, r3
2f0c: 0affffe2 beq 2e9c <open+0x188>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
2f10: e1a00006 mov r0, r6
2f14: e38a1902 orr r1, sl, #32768 ; 0x8000
2f18: e3a02000 mov r2, #0
2f1c: e3a03000 mov r3, #0
2f20: ebfffd7c bl 2518 <mknod>
if ( rc ) {
2f24: e2509000 subs r9, r0, #0
2f28: 1afffff0 bne 2ef0 <open+0x1dc>
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
2f2c: e1a00006 mov r0, r6
2f30: eb0035fc bl 10728 <strlen>
2f34: e1a03007 mov r3, r7
2f38: e1a01000 mov r1, r0
2f3c: e1a02009 mov r2, r9
2f40: e1a00006 mov r0, r6
2f44: e58d8000 str r8, [sp]
2f48: ebfffc34 bl 2020 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
2f4c: e3500000 cmp r0, #0
2f50: 11a07009 movne r7, r9
2f54: 13a0600d movne r6, #13
2f58: 1affffcf bne 2e9c <open+0x188>
2f5c: eaffff8d b 2d98 <open+0x84>
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
2f60: eb0031eb bl f714 <__errno> <== NOT EXECUTED
2f64: e5906000 ldr r6, [r0] <== NOT EXECUTED
2f68: eaffffc3 b 2e7c <open+0x168> <== NOT EXECUTED
00002cac <open_dev_console>:
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
2cac: e3a01000 mov r1, #0
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
2cb0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
2cb4: e59f004c ldr r0, [pc, #76] ; 2d08 <open_dev_console+0x5c>
2cb8: e1a02001 mov r2, r1
2cbc: eb000014 bl 2d14 <open>
2cc0: e3700001 cmn r0, #1
2cc4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
2cc8: e59f0038 ldr r0, [pc, #56] ; 2d08 <open_dev_console+0x5c>
2ccc: e3a01001 mov r1, #1
2cd0: e3a02000 mov r2, #0
2cd4: eb00000e bl 2d14 <open>
2cd8: e3700001 cmn r0, #1
2cdc: 0a000007 beq 2d00 <open_dev_console+0x54>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
2ce0: e59f0020 ldr r0, [pc, #32] ; 2d08 <open_dev_console+0x5c>
2ce4: e3a01001 mov r1, #1
2ce8: e3a02000 mov r2, #0
2cec: eb000008 bl 2d14 <open>
2cf0: e3700001 cmn r0, #1
2cf4: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
2cf8: e59f000c ldr r0, [pc, #12] ; 2d0c <open_dev_console+0x60> <== NOT EXECUTED
2cfc: eb000c38 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
2d00: e59f0008 ldr r0, [pc, #8] ; 2d10 <open_dev_console+0x64> <== NOT EXECUTED
2d04: eb000c36 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000372c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
372c: e92d4010 push {r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
3730: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3734: e24dd004 sub sp, sp, #4
int i;
if (tty->termios.c_oflag & OPOST) {
3738: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
373c: e1a04001 mov r4, r1
3740: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
3744: 0a000014 beq 379c <oproc+0x70>
switch (c) {
3748: e5dd1000 ldrb r1, [sp]
374c: e2412008 sub r2, r1, #8
3750: e3520005 cmp r2, #5
3754: 979ff102 ldrls pc, [pc, r2, lsl #2]
3758: ea000005 b 3774 <oproc+0x48>
375c: 0000380c .word 0x0000380c
3760: 000037e8 .word 0x000037e8
3764: 00003820 .word 0x00003820
3768: 00003774 .word 0x00003774
376c: 00003774 .word 0x00003774
3770: 000037b4 .word 0x000037b4
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
3774: e3130002 tst r3, #2
3778: 1a000034 bne 3850 <oproc+0x124>
377c: e59f310c ldr r3, [pc, #268] ; 3890 <oproc+0x164>
3780: e5933000 ldr r3, [r3]
c = toupper(c);
if (!iscntrl(c))
3784: e0831001 add r1, r3, r1
3788: e5d13001 ldrb r3, [r1, #1]
378c: e3130020 tst r3, #32
tty->column++;
3790: 05943028 ldreq r3, [r4, #40] ; 0x28
3794: 02833001 addeq r3, r3, #1
3798: 05843028 streq r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
379c: e1a02004 mov r2, r4
37a0: e1a0000d mov r0, sp
37a4: e3a01001 mov r1, #1
37a8: ebffff97 bl 360c <rtems_termios_puts>
}
37ac: e28dd004 add sp, sp, #4
37b0: e8bd8010 pop {r4, pc}
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
37b4: e3130010 tst r3, #16 <== NOT EXECUTED
37b8: 0a000002 beq 37c8 <oproc+0x9c> <== NOT EXECUTED
37bc: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
37c0: e3520000 cmp r2, #0 <== NOT EXECUTED
37c4: 0afffff8 beq 37ac <oproc+0x80> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
37c8: e2132008 ands r2, r3, #8 <== NOT EXECUTED
37cc: 0a00000c beq 3804 <oproc+0xd8> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
37d0: e3130020 tst r3, #32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
37d4: e3a0300a mov r3, #10 <== NOT EXECUTED
37d8: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
37dc: 13a03000 movne r3, #0 <== NOT EXECUTED
37e0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
37e4: eaffffec b 379c <oproc+0x70> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
37e8: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
37ec: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
37f0: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
37f4: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
37f8: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
37fc: 10812002 addne r2, r1, r2
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3800: 0a00001c beq 3878 <oproc+0x14c>
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
3804: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
3808: eaffffe3 b 379c <oproc+0x70> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
380c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3810: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3814: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
3818: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED
381c: eaffffde b 379c <oproc+0x70> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
3820: e3130020 tst r3, #32
tty->column = 0;
3824: 13a02000 movne r2, #0
3828: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
382c: e3130004 tst r3, #4
3830: 0affffd9 beq 379c <oproc+0x70>
rtems_termios_puts ("\r", 1, tty);
3834: e59f0058 ldr r0, [pc, #88] ; 3894 <oproc+0x168>
3838: e3a01001 mov r1, #1
383c: e1a02004 mov r2, r4
3840: ebffff71 bl 360c <rtems_termios_puts>
tty->column = 0;
3844: e3a03000 mov r3, #0
3848: e5843028 str r3, [r4, #40] ; 0x28
384c: eaffffd2 b 379c <oproc+0x70>
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
3850: e59f3038 ldr r3, [pc, #56] ; 3890 <oproc+0x164> <== NOT EXECUTED
3854: e5933000 ldr r3, [r3] <== NOT EXECUTED
3858: e0832001 add r2, r3, r1 <== NOT EXECUTED
385c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
3860: e2022003 and r2, r2, #3 <== NOT EXECUTED
3864: e3520002 cmp r2, #2 <== NOT EXECUTED
3868: 02411020 subeq r1, r1, #32 <== NOT EXECUTED
386c: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED
3870: e5cd1000 strb r1, [sp] <== NOT EXECUTED
3874: eaffffc2 b 3784 <oproc+0x58> <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
3878: e0812002 add r2, r1, r2
387c: e5842028 str r2, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3880: e59f0010 ldr r0, [pc, #16] ; 3898 <oproc+0x16c>
3884: e1a02004 mov r2, r4
3888: ebffff5f bl 360c <rtems_termios_puts>
return;
388c: eaffffc6 b 37ac <oproc+0x80>
0000dd50 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
dd50: e92d4070 push {r4, r5, r6, lr}
dd54: e24dd028 sub sp, sp, #40 ; 0x28
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
dd58: e28d4004 add r4, sp, #4
dd5c: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
dd60: e1a05000 mov r5, r0
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
dd64: e3a01003 mov r1, #3
dd68: e59f0154 ldr r0, [pc, #340] ; dec4 <pipe_create+0x174>
dd6c: e3a02007 mov r2, #7
dd70: e1a03004 mov r3, r4
dd74: e58dc000 str ip, [sp]
dd78: ebffd0a8 bl 2020 <rtems_filesystem_evaluate_path>
dd7c: e3500000 cmp r0, #0
dd80: 1a00003a bne de70 <pipe_create+0x120>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
dd84: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
dd88: e3530000 cmp r3, #0 <== NOT EXECUTED
dd8c: 0a000004 beq dda4 <pipe_create+0x54> <== NOT EXECUTED
dd90: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
dd94: e3530000 cmp r3, #0 <== NOT EXECUTED
dd98: 11a00004 movne r0, r4 <== NOT EXECUTED
dd9c: 11a0e00f movne lr, pc <== NOT EXECUTED
dda0: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
dda4: e59f311c ldr r3, [pc, #284] ; dec8 <pipe_create+0x178>
dda8: e28d4018 add r4, sp, #24
ddac: e8930007 ldm r3, {r0, r1, r2}
ddb0: e1a0c004 mov ip, r4
ddb4: e8ac0003 stmia ip!, {r0, r1}
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ddb8: e59f310c ldr r3, [pc, #268] ; decc <pipe_create+0x17c>
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ddbc: e1a0100c mov r1, ip
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ddc0: e1d3c0b0 ldrh ip, [r3]
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ddc4: e1c120b0 strh r2, [r1]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ddc8: e1a0200c mov r2, ip
ddcc: e28cc001 add ip, ip, #1
ddd0: e59f10f8 ldr r1, [pc, #248] ; ded0 <pipe_create+0x180>
ddd4: e1c3c0b0 strh ip, [r3]
ddd8: e284000a add r0, r4, #10
dddc: eb000900 bl 101e4 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
dde0: e1a00004 mov r0, r4
dde4: e3a01d06 mov r1, #384 ; 0x180
dde8: eb0001e0 bl e570 <mkfifo>
ddec: e2506000 subs r6, r0, #0
ddf0: 1a00001c bne de68 <pipe_create+0x118>
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
ddf4: e1a00004 mov r0, r4
ddf8: e3a01901 mov r1, #16384 ; 0x4000
ddfc: ebffd3c4 bl 2d14 <open>
if (filsdes[0] < 0) {
de00: e3500000 cmp r0, #0
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
de04: e5850000 str r0, [r5]
if (filsdes[0] < 0) {
de08: ba000023 blt de9c <pipe_create+0x14c>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
de0c: e59f30c0 ldr r3, [pc, #192] ; ded4 <pipe_create+0x184> <== NOT EXECUTED
de10: e5933000 ldr r3, [r3] <== NOT EXECUTED
de14: e1500003 cmp r0, r3 <== NOT EXECUTED
de18: 359f30b8 ldrcc r3, [pc, #184] ; ded8 <pipe_create+0x188> <== NOT EXECUTED
de1c: 35936000 ldrcc r6, [r3] <== NOT EXECUTED
de20: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
de24: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
de28: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
de2c: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
de30: e1a00004 mov r0, r4 <== NOT EXECUTED
de34: e3a01001 mov r1, #1 <== NOT EXECUTED
de38: ebffd3b5 bl 2d14 <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
de3c: e3500000 cmp r0, #0 <== NOT EXECUTED
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
de40: e5850004 str r0, [r5, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
de44: a3a06000 movge r6, #0 <== NOT EXECUTED
de48: ba000018 blt deb0 <pipe_create+0x160> <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
de4c: e1a00004 mov r0, r4 <== NOT EXECUTED
de50: eb0001ca bl e580 <unlink> <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
de54: eb00062e bl f714 <__errno>
de58: e5806000 str r6, [r0]
}
de5c: e3e00000 mvn r0, #0
de60: e28dd028 add sp, sp, #40 ; 0x28
de64: e8bd8070 pop {r4, r5, r6, pc}
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
de68: eb000629 bl f714 <__errno> <== NOT EXECUTED
de6c: eafffffa b de5c <pipe_create+0x10c> <== NOT EXECUTED
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
de70: eb000627 bl f714 <__errno>
de74: e5903000 ldr r3, [r0]
de78: e3530002 cmp r3, #2
de7c: 1afffff6 bne de5c <pipe_create+0x10c>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
de80: e3a01fff mov r1, #1020 ; 0x3fc
de84: e2811003 add r1, r1, #3
de88: e59f0034 ldr r0, [pc, #52] ; dec4 <pipe_create+0x174>
de8c: ebffd19d bl 2508 <mkdir>
de90: e3500000 cmp r0, #0
de94: 0affffc2 beq dda4 <pipe_create+0x54>
de98: eaffffef b de5c <pipe_create+0x10c> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
de9c: eb00061c bl f714 <__errno>
dea0: e5906000 ldr r6, [r0]
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
dea4: e1a00004 mov r0, r4
dea8: eb0001b4 bl e580 <unlink>
deac: eaffffe8 b de54 <pipe_create+0x104>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
deb0: eb000617 bl f714 <__errno> <== NOT EXECUTED
deb4: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
deb8: e5950000 ldr r0, [r5] <== NOT EXECUTED
debc: ebfff3a7 bl ad60 <close> <== NOT EXECUTED
dec0: eaffffe1 b de4c <pipe_create+0xfc> <== NOT EXECUTED
000091e0 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
91e0: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED
91e4: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED
91e8: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED
91ec: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
91f0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
91f4: e1a05000 mov r5, r0 <== NOT EXECUTED
91f8: e1a04002 mov r4, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
91fc: 13e00015 mvnne r0, #21 <== NOT EXECUTED
9200: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
9204: e3520000 cmp r2, #0 <== NOT EXECUTED
9208: 03e0000d mvneq r0, #13 <== NOT EXECUTED
920c: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
9210: e3a01000 mov r1, #0 <== NOT EXECUTED
9214: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9218: e1a02001 mov r2, r1 <== NOT EXECUTED
921c: ebfff162 bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
9220: e2506000 subs r6, r0, #0 <== NOT EXECUTED
9224: 13e00003 mvnne r0, #3 <== NOT EXECUTED
9228: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
922c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
9230: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
9234: e5843000 str r3, [r4] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
9238: ebfff1a3 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
923c: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
9240: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009168 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
9168: e3e0001c mvn r0, #28 <== NOT EXECUTED
916c: e12fff1e bx lr <== NOT EXECUTED
00009244 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
9244: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
9248: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
924c: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
9250: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
9254: e1a04000 mov r4, r0 <== NOT EXECUTED
9258: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
925c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
9260: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
9264: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
9268: ebfff14f bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
926c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
9270: 13e07003 mvnne r7, #3 <== NOT EXECUTED
9274: 1a000027 bne 9318 <pipe_read+0xd4> <== NOT EXECUTED
return -EINTR;
while (read < count) {
9278: e3550000 cmp r5, #0 <== NOT EXECUTED
927c: 01a07005 moveq r7, r5 <== NOT EXECUTED
9280: 01a06007 moveq r6, r7 <== NOT EXECUTED
9284: 0a00001f beq 9308 <pipe_read+0xc4> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
9288: e1a0700a mov r7, sl <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
928c: e28db004 add fp, sp, #4 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
9290: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
9294: e3520000 cmp r2, #0 <== NOT EXECUTED
9298: 1a000021 bne 9324 <pipe_read+0xe0> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
929c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
92a0: e3530000 cmp r3, #0 <== NOT EXECUTED
92a4: 0a00003d beq 93a0 <pipe_read+0x15c> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
92a8: e5986014 ldr r6, [r8, #20] <== NOT EXECUTED
92ac: e2166001 ands r6, r6, #1 <== NOT EXECUTED
92b0: 1a00003c bne 93a8 <pipe_read+0x164> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
92b4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
92b8: e2833001 add r3, r3, #1 <== NOT EXECUTED
92bc: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
92c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
92c4: ebfff180 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
92c8: e1a01006 mov r1, r6 <== NOT EXECUTED
92cc: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
92d0: eb000ad1 bl be1c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
92d4: e1a01006 mov r1, r6 <== NOT EXECUTED
92d8: e1a02001 mov r2, r1 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
92dc: e2506000 subs r6, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
92e0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
92e4: 13e06003 mvnne r6, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
92e8: ebfff12f bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
92ec: e3500000 cmp r0, #0 <== NOT EXECUTED
92f0: 1a00002e bne 93b0 <pipe_read+0x16c> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
92f4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
92f8: e3560000 cmp r6, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
92fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
9300: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
9304: 0affffe1 beq 9290 <pipe_read+0x4c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
9308: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
930c: ebfff16e bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
9310: e3570000 cmp r7, #0 <== NOT EXECUTED
9314: d1a07006 movle r7, r6 <== NOT EXECUTED
return read;
return ret;
}
9318: e1a00007 mov r0, r7 <== NOT EXECUTED
931c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
9320: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
9324: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
9328: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
932c: e06a6005 rsb r6, sl, r5 <== NOT EXECUTED
9330: e1520006 cmp r2, r6 <== NOT EXECUTED
9334: 31a06002 movcc r6, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
9338: e0613003 rsb r3, r1, r3 <== NOT EXECUTED
if (chunk > chunk1) {
933c: e1560003 cmp r6, r3 <== NOT EXECUTED
9340: ca00001c bgt 93b8 <pipe_read+0x174> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
9344: e5943000 ldr r3, [r4] <== NOT EXECUTED
9348: e089000a add r0, r9, sl <== NOT EXECUTED
934c: e0831001 add r1, r3, r1 <== NOT EXECUTED
9350: e1a02006 mov r2, r6 <== NOT EXECUTED
9354: eb001afc bl ff4c <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
9358: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
935c: e0860000 add r0, r6, r0 <== NOT EXECUTED
9360: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
9364: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
9368: eb003eb7 bl 18e4c <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
936c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
9370: e0663003 rsb r3, r6, r3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
9374: e3530000 cmp r3, #0 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
9378: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
937c: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
9380: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
9384: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
9388: e3530000 cmp r3, #0 <== NOT EXECUTED
938c: 1a000016 bne 93ec <pipe_read+0x1a8> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
9390: e0877006 add r7, r7, r6 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
9394: e1570005 cmp r7, r5 <== NOT EXECUTED
9398: e1a0a007 mov sl, r7 <== NOT EXECUTED
939c: 3affffbb bcc 9290 <pipe_read+0x4c> <== NOT EXECUTED
93a0: e3a06000 mov r6, #0 <== NOT EXECUTED
93a4: eaffffd7 b 9308 <pipe_read+0xc4> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
93a8: e3e0600a mvn r6, #10 <== NOT EXECUTED
93ac: eaffffd5 b 9308 <pipe_read+0xc4> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
93b0: e3e06003 mvn r6, #3 <== NOT EXECUTED
93b4: eaffffd5 b 9310 <pipe_read+0xcc> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
93b8: e5942000 ldr r2, [r4] <== NOT EXECUTED
93bc: e089000a add r0, r9, sl <== NOT EXECUTED
93c0: e0821001 add r1, r2, r1 <== NOT EXECUTED
93c4: e1a02003 mov r2, r3 <== NOT EXECUTED
93c8: e58d3000 str r3, [sp] <== NOT EXECUTED
93cc: eb001ade bl ff4c <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
93d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
93d4: e08a0003 add r0, sl, r3 <== NOT EXECUTED
93d8: e0890000 add r0, r9, r0 <== NOT EXECUTED
93dc: e0632006 rsb r2, r3, r6 <== NOT EXECUTED
93e0: e5941000 ldr r1, [r4] <== NOT EXECUTED
93e4: eb001ad8 bl ff4c <memcpy> <== NOT EXECUTED
93e8: eaffffda b 9358 <pipe_read+0x114> <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
93ec: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
93f0: e1a0100b mov r1, fp <== NOT EXECUTED
93f4: eb000a6f bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
93f8: eaffffe4 b 9390 <pipe_read+0x14c> <== NOT EXECUTED
00009614 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
9614: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
9618: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
961c: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
9620: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
9624: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
9628: e1a07000 mov r7, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
962c: e1a02001 mov r2, r1 <== NOT EXECUTED
9630: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9634: ebfff05c bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
9638: e3500000 cmp r0, #0 <== NOT EXECUTED
963c: 1a000038 bne 9724 <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
9640: e5956014 ldr r6, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
9644: e3160002 tst r6, #2 <== NOT EXECUTED
pipe->Readers --;
9648: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
964c: e2066006 and r6, r6, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
9650: 12433001 subne r3, r3, #1 <== NOT EXECUTED
9654: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
9658: e3160004 tst r6, #4 <== NOT EXECUTED
pipe->Writers --;
965c: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
9660: e59f50c0 ldr r5, [pc, #192] ; 9728 <pipe_release+0x114> <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
9664: 12433001 subne r3, r3, #1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
9668: e3a01000 mov r1, #0 <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
966c: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
9670: e5950000 ldr r0, [r5] <== NOT EXECUTED
9674: e1a02001 mov r2, r1 <== NOT EXECUTED
9678: ebfff04b bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
967c: e3500000 cmp r0, #0 <== NOT EXECUTED
9680: 1a000027 bne 9724 <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
9684: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9688: ebfff08f bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
968c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
9690: e3530000 cmp r3, #0 <== NOT EXECUTED
9694: 0a00000d beq 96d0 <pipe_release+0xbc> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
9698: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
969c: e2723001 rsbs r3, r2, #1 <== NOT EXECUTED
96a0: 33a03000 movcc r3, #0 <== NOT EXECUTED
96a4: e3560002 cmp r6, #2 <== NOT EXECUTED
96a8: 03a03000 moveq r3, #0 <== NOT EXECUTED
96ac: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
96b0: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED
96b4: 11a0100d movne r1, sp <== NOT EXECUTED
96b8: 1b0009be blne bdb8 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
96bc: e5950000 ldr r0, [r5] <== NOT EXECUTED
96c0: ebfff081 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
96c4: e3a00000 mov r0, #0 <== NOT EXECUTED
96c8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
96cc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
96d0: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED
96d4: e3580000 cmp r8, #0 <== NOT EXECUTED
96d8: 0a000005 beq 96f4 <pipe_release+0xe0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
96dc: e3560004 cmp r6, #4 <== NOT EXECUTED
96e0: 0afffff5 beq 96bc <pipe_release+0xa8> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
96e4: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
96e8: e1a0100d mov r1, sp <== NOT EXECUTED
96ec: eb0009b1 bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
96f0: eafffff1 b 96bc <pipe_release+0xa8> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
96f4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
96f8: eb000994 bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
96fc: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
9700: eb000992 bl bd50 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
9704: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9708: ebffeffe bl 5708 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
970c: e5940000 ldr r0, [r4] <== NOT EXECUTED
9710: ebffe264 bl 20a8 <free> <== NOT EXECUTED
free(pipe);
9714: e1a00004 mov r0, r4 <== NOT EXECUTED
9718: ebffe262 bl 20a8 <free> <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
971c: e5878000 str r8, [r7] <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
9720: eaffffe5 b 96bc <pipe_release+0xa8> <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
9724: ebfff1ae bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
000093fc <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
93fc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
9400: e2524000 subs r4, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
9404: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
9408: e1a05000 mov r5, r0 <== NOT EXECUTED
940c: e1a06001 mov r6, r1 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
9410: 01a07004 moveq r7, r4 <== NOT EXECUTED
9414: 1a000002 bne 9424 <pipe_write+0x28> <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
9418: e1a00007 mov r0, r7 <== NOT EXECUTED
941c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
9420: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
9424: e3a01000 mov r1, #0 <== NOT EXECUTED
9428: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
942c: e1a02001 mov r2, r1 <== NOT EXECUTED
9430: e58d3000 str r3, [sp] <== NOT EXECUTED
9434: ebfff0dc bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
9438: e2509000 subs r9, r0, #0 <== NOT EXECUTED
943c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9440: 13e07003 mvnne r7, #3 <== NOT EXECUTED
9444: 1afffff3 bne 9418 <pipe_write+0x1c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
9448: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED
944c: e3570000 cmp r7, #0 <== NOT EXECUTED
9450: 0a00004f beq 9594 <pipe_write+0x198> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
9454: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
9458: e1540008 cmp r4, r8 <== NOT EXECUTED
945c: 91a0a004 movls sl, r4 <== NOT EXECUTED
9460: 83a0a001 movhi sl, #1 <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
9464: e1a07009 mov r7, r9 <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
9468: e28db004 add fp, sp, #4 <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
946c: e595100c ldr r1, [r5, #12] <== NOT EXECUTED
9470: e0612008 rsb r2, r1, r8 <== NOT EXECUTED
9474: e152000a cmp r2, sl <== NOT EXECUTED
9478: 2a000021 bcs 9504 <pipe_write+0x108> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
947c: e5938014 ldr r8, [r3, #20] <== NOT EXECUTED
9480: e2188001 ands r8, r8, #1 <== NOT EXECUTED
9484: 1a000050 bne 95cc <pipe_write+0x1d0> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
9488: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
948c: e2822001 add r2, r2, #1 <== NOT EXECUTED
9490: e585201c str r2, [r5, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
9494: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
9498: e58d3000 str r3, [sp] <== NOT EXECUTED
949c: ebfff10a bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
94a0: e1a01008 mov r1, r8 <== NOT EXECUTED
94a4: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED
94a8: eb000a5b bl be1c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
94ac: e1a01008 mov r1, r8 <== NOT EXECUTED
94b0: e1a02001 mov r2, r1 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
94b4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
94b8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
94bc: 13e08003 mvnne r8, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
94c0: ebfff0b9 bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
94c4: e3500000 cmp r0, #0 <== NOT EXECUTED
94c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
94cc: 1a00003c bne 95c4 <pipe_write+0x1c8> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
94d0: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
94d4: e3580000 cmp r8, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
94d8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
94dc: e585201c str r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
94e0: 1a00002c bne 9598 <pipe_write+0x19c> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
94e4: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED
94e8: e3520000 cmp r2, #0 <== NOT EXECUTED
94ec: 0a000028 beq 9594 <pipe_write+0x198> <== NOT EXECUTED
94f0: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
94f4: e595100c ldr r1, [r5, #12] <== NOT EXECUTED
94f8: e0612008 rsb r2, r1, r8 <== NOT EXECUTED
94fc: e152000a cmp r2, sl <== NOT EXECUTED
9500: 3affffdd bcc 947c <pipe_write+0x80> <== NOT EXECUTED
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
9504: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
9508: e069a004 rsb sl, r9, r4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
950c: e0810000 add r0, r1, r0 <== NOT EXECUTED
9510: e1a01008 mov r1, r8 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
9514: e152000a cmp r2, sl <== NOT EXECUTED
9518: 31a0a002 movcc sl, r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
951c: e58d3000 str r3, [sp] <== NOT EXECUTED
9520: eb003e49 bl 18e4c <__umodsi3> <== NOT EXECUTED
9524: e0608008 rsb r8, r0, r8 <== NOT EXECUTED
if (chunk > chunk1) {
9528: e15a0008 cmp sl, r8 <== NOT EXECUTED
952c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9530: da000027 ble 95d4 <pipe_write+0x1d8> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
9534: e5952000 ldr r2, [r5] <== NOT EXECUTED
9538: e0861009 add r1, r6, r9 <== NOT EXECUTED
953c: e0820000 add r0, r2, r0 <== NOT EXECUTED
9540: e1a02008 mov r2, r8 <== NOT EXECUTED
9544: eb001a80 bl ff4c <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
9548: e0881009 add r1, r8, r9 <== NOT EXECUTED
954c: e0861001 add r1, r6, r1 <== NOT EXECUTED
9550: e068200a rsb r2, r8, sl <== NOT EXECUTED
9554: e5950000 ldr r0, [r5] <== NOT EXECUTED
9558: eb001a7b bl ff4c <memcpy> <== NOT EXECUTED
955c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
9560: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
9564: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
9568: e082200a add r2, r2, sl <== NOT EXECUTED
if (pipe->waitingReaders > 0)
956c: e3510000 cmp r1, #0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
9570: e585200c str r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
9574: 1a00001e bne 95f4 <pipe_write+0x1f8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
9578: e087700a add r7, r7, sl <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
957c: e1540007 cmp r4, r7 <== NOT EXECUTED
9580: e1a09007 mov r9, r7 <== NOT EXECUTED
9584: 9a000020 bls 960c <pipe_write+0x210> <== NOT EXECUTED
9588: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
958c: e3a0a001 mov sl, #1 <== NOT EXECUTED
9590: eaffffb5 b 946c <pipe_write+0x70> <== NOT EXECUTED
9594: e3e0801f mvn r8, #31 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
9598: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
959c: ebfff0ca bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
95a0: e3780020 cmn r8, #32 <== NOT EXECUTED
95a4: 0a000002 beq 95b4 <pipe_write+0x1b8> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
95a8: e3570000 cmp r7, #0 <== NOT EXECUTED
95ac: d1a07008 movle r7, r8 <== NOT EXECUTED
95b0: eaffff98 b 9418 <pipe_write+0x1c> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
95b4: eb000660 bl af3c <getpid> <== NOT EXECUTED
95b8: e3a0100d mov r1, #13 <== NOT EXECUTED
95bc: eb0007e9 bl b568 <kill> <== NOT EXECUTED
95c0: eafffff8 b 95a8 <pipe_write+0x1ac> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
95c4: e3e08003 mvn r8, #3 <== NOT EXECUTED
95c8: eafffff6 b 95a8 <pipe_write+0x1ac> <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
95cc: e3e0800a mvn r8, #10 <== NOT EXECUTED
95d0: eafffff0 b 9598 <pipe_write+0x19c> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
95d4: e5952000 ldr r2, [r5] <== NOT EXECUTED
95d8: e0861009 add r1, r6, r9 <== NOT EXECUTED
95dc: e0820000 add r0, r2, r0 <== NOT EXECUTED
95e0: e1a0200a mov r2, sl <== NOT EXECUTED
95e4: e58d3000 str r3, [sp] <== NOT EXECUTED
95e8: eb001a57 bl ff4c <memcpy> <== NOT EXECUTED
95ec: e59d3000 ldr r3, [sp] <== NOT EXECUTED
95f0: eaffffda b 9560 <pipe_write+0x164> <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
95f4: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
95f8: e1a0100b mov r1, fp <== NOT EXECUTED
95fc: e58d3000 str r3, [sp] <== NOT EXECUTED
9600: eb0009ec bl bdb8 <rtems_barrier_release> <== NOT EXECUTED
9604: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9608: eaffffda b 9578 <pipe_write+0x17c> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
960c: e3a08000 mov r8, #0 <== NOT EXECUTED
9610: eaffffe0 b 9598 <pipe_write+0x19c> <== NOT EXECUTED
0000f008 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
f008: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
f00c: e2516000 subs r6, r1, #0
int pthread_kill(
pthread_t thread,
int sig
)
{
f010: e24dd008 sub sp, sp, #8
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
f014: 0a000028 beq f0bc <pthread_kill+0xb4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
f018: e2467001 sub r7, r6, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
f01c: e357001f cmp r7, #31
f020: 8a000025 bhi f0bc <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
f024: e28d1004 add r1, sp, #4
f028: ebffe22e bl 78e8 <_Thread_Get>
switch ( location ) {
f02c: e59d2004 ldr r2, [sp, #4]
f030: e3520000 cmp r2, #0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
f034: e1a04000 mov r4, r0
switch ( location ) {
f038: 1a000024 bne f0d0 <pthread_kill+0xc8>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
f03c: e59f30a0 ldr r3, [pc, #160] ; f0e4 <pthread_kill+0xdc>
f040: e0861086 add r1, r6, r6, lsl #1
f044: e0833101 add r3, r3, r1, lsl #2
f048: e5933008 ldr r3, [r3, #8]
f04c: e3530001 cmp r3, #1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
f050: e5903108 ldr r3, [r0, #264] ; 0x108
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
f054: 0a000013 beq f0a8 <pthread_kill+0xa0>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
f058: e59310d0 ldr r1, [r3, #208] ; 0xd0
f05c: e3a05001 mov r5, #1
f060: e1817715 orr r7, r1, r5, lsl r7
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
f064: e1a01006 mov r1, r6
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
f068: e58370d0 str r7, [r3, #208] ; 0xd0
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
f06c: ebffff55 bl edc8 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
f070: e59f3070 ldr r3, [pc, #112] ; f0e8 <pthread_kill+0xe0>
f074: e5933000 ldr r3, [r3]
f078: e3530000 cmp r3, #0
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
f07c: e5c45074 strb r5, [r4, #116] ; 0x74
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
f080: 0a000004 beq f098 <pthread_kill+0x90>
f084: e59f3060 ldr r3, [pc, #96] ; f0ec <pthread_kill+0xe4>
f088: e5933000 ldr r3, [r3]
f08c: e1540003 cmp r4, r3
_ISR_Signals_to_thread_executing = true;
f090: 059f3058 ldreq r3, [pc, #88] ; f0f0 <pthread_kill+0xe8>
f094: 05c35000 strbeq r5, [r3]
}
_Thread_Enable_dispatch();
f098: ebffe209 bl 78c4 <_Thread_Enable_dispatch>
f09c: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
f0a0: e28dd008 add sp, sp, #8
f0a4: e8bd80f0 pop {r4, r5, r6, r7, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
f0a8: e58d2000 str r2, [sp] <== NOT EXECUTED
f0ac: ebffe204 bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
f0b0: e59d2000 ldr r2, [sp] <== NOT EXECUTED
f0b4: e1a00002 mov r0, r2 <== NOT EXECUTED
return 0;
f0b8: eafffff8 b f0a0 <pthread_kill+0x98> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
f0bc: eb000194 bl f714 <__errno>
f0c0: e3a03016 mov r3, #22
f0c4: e5803000 str r3, [r0]
f0c8: e3e00000 mvn r0, #0
f0cc: eafffff3 b f0a0 <pthread_kill+0x98>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
f0d0: eb00018f bl f714 <__errno> <== NOT EXECUTED
f0d4: e3a03003 mov r3, #3 <== NOT EXECUTED
f0d8: e5803000 str r3, [r0] <== NOT EXECUTED
f0dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
f0e0: eaffffee b f0a0 <pthread_kill+0x98> <== NOT EXECUTED
00006afc <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6afc: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6b00: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6b04: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6b08: 0a00001d beq 6b84 <pthread_rwlock_timedrdlock+0x88>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
6b0c: e1a00001 mov r0, r1
6b10: e28d1004 add r1, sp, #4
6b14: eb001d2c bl dfcc <_POSIX_Absolute_timeout_to_ticks>
6b18: e5951000 ldr r1, [r5]
6b1c: e1a04000 mov r4, r0
6b20: e28d2008 add r2, sp, #8
6b24: e59f0090 ldr r0, [pc, #144] ; 6bbc <pthread_rwlock_timedrdlock+0xc0>
6b28: eb000a9d bl 95a4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
6b2c: e59dc008 ldr ip, [sp, #8]
6b30: e35c0000 cmp ip, #0
6b34: 1a000012 bne 6b84 <pthread_rwlock_timedrdlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
6b38: e5951000 ldr r1, [r5]
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
6b3c: e3540003 cmp r4, #3
6b40: 13a05000 movne r5, #0
6b44: 03a05001 moveq r5, #1
6b48: e2800010 add r0, r0, #16
6b4c: e59d3004 ldr r3, [sp, #4]
6b50: e1a02005 mov r2, r5
6b54: e58dc000 str ip, [sp]
6b58: eb00073e bl 8858 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
6b5c: eb000ccb bl 9e90 <_Thread_Enable_dispatch>
if ( !do_wait ) {
6b60: e3550000 cmp r5, #0
6b64: 1a00000f bne 6ba8 <pthread_rwlock_timedrdlock+0xac>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
6b68: e59f3050 ldr r3, [pc, #80] ; 6bc0 <pthread_rwlock_timedrdlock+0xc4>
6b6c: e5933000 ldr r3, [r3]
6b70: e5930034 ldr r0, [r3, #52] ; 0x34
6b74: e3500002 cmp r0, #2
6b78: 0a000004 beq 6b90 <pthread_rwlock_timedrdlock+0x94>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6b7c: eb000042 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6b80: ea000000 b 6b88 <pthread_rwlock_timedrdlock+0x8c>
6b84: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6b88: e28dd00c add sp, sp, #12
6b8c: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
6b90: e3540000 cmp r4, #0
6b94: 0afffffa beq 6b84 <pthread_rwlock_timedrdlock+0x88>
6b98: e3540002 cmp r4, #2
6b9c: 93a00074 movls r0, #116 ; 0x74
6ba0: 9afffff8 bls 6b88 <pthread_rwlock_timedrdlock+0x8c>
6ba4: eafffff4 b 6b7c <pthread_rwlock_timedrdlock+0x80> <== NOT EXECUTED
6ba8: e59f3010 ldr r3, [pc, #16] ; 6bc0 <pthread_rwlock_timedrdlock+0xc4>
6bac: e5933000 ldr r3, [r3]
6bb0: e5930034 ldr r0, [r3, #52] ; 0x34
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6bb4: eb000034 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6bb8: eafffff2 b 6b88 <pthread_rwlock_timedrdlock+0x8c>
00006bc4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6bc4: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6bc8: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6bcc: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6bd0: 0a00001d beq 6c4c <pthread_rwlock_timedwrlock+0x88>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
6bd4: e1a00001 mov r0, r1
6bd8: e28d1004 add r1, sp, #4
6bdc: eb001cfa bl dfcc <_POSIX_Absolute_timeout_to_ticks>
6be0: e5951000 ldr r1, [r5]
6be4: e1a04000 mov r4, r0
6be8: e28d2008 add r2, sp, #8
6bec: e59f0090 ldr r0, [pc, #144] ; 6c84 <pthread_rwlock_timedwrlock+0xc0>
6bf0: eb000a6b bl 95a4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
6bf4: e59dc008 ldr ip, [sp, #8]
6bf8: e35c0000 cmp ip, #0
6bfc: 1a000012 bne 6c4c <pthread_rwlock_timedwrlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
6c00: e5951000 ldr r1, [r5]
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
6c04: e3540003 cmp r4, #3
6c08: 13a05000 movne r5, #0
6c0c: 03a05001 moveq r5, #1
6c10: e2800010 add r0, r0, #16
6c14: e59d3004 ldr r3, [sp, #4]
6c18: e1a02005 mov r2, r5
6c1c: e58dc000 str ip, [sp]
6c20: eb000743 bl 8934 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
6c24: eb000c99 bl 9e90 <_Thread_Enable_dispatch>
if ( !do_wait &&
6c28: e3550000 cmp r5, #0
6c2c: 1a00000f bne 6c70 <pthread_rwlock_timedwrlock+0xac>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
6c30: e59f3050 ldr r3, [pc, #80] ; 6c88 <pthread_rwlock_timedwrlock+0xc4>
6c34: e5933000 ldr r3, [r3]
6c38: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
6c3c: e3500002 cmp r0, #2
6c40: 0a000004 beq 6c58 <pthread_rwlock_timedwrlock+0x94>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6c44: eb000010 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6c48: ea000000 b 6c50 <pthread_rwlock_timedwrlock+0x8c>
6c4c: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6c50: e28dd00c add sp, sp, #12
6c54: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
6c58: e3540000 cmp r4, #0
6c5c: 0afffffa beq 6c4c <pthread_rwlock_timedwrlock+0x88>
6c60: e3540002 cmp r4, #2
6c64: 93a00074 movls r0, #116 ; 0x74
6c68: 9afffff8 bls 6c50 <pthread_rwlock_timedwrlock+0x8c>
6c6c: eafffff4 b 6c44 <pthread_rwlock_timedwrlock+0x80> <== NOT EXECUTED
6c70: e59f3010 ldr r3, [pc, #16] ; 6c88 <pthread_rwlock_timedwrlock+0xc4>
6c74: e5933000 ldr r3, [r3]
6c78: e5930034 ldr r0, [r3, #52] ; 0x34
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6c7c: eb000002 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6c80: eafffff2 b 6c50 <pthread_rwlock_timedwrlock+0x8c>
0000a5e0 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
a5e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a5e4: e1a04000 mov r4, r0
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
a5e8: e3a00010 mov r0, #16
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
a5ec: e1a05001 mov r5, r1
a5f0: e1a08002 mov r8, r2
a5f4: e203a0ff and sl, r3, #255 ; 0xff
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
a5f8: ebffe399 bl 3464 <malloc>
if (rd == NULL) {
a5fc: e3500000 cmp r0, #0
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
a600: e1a07000 mov r7, r0
a604: e1a06000 mov r6, r0
if (rd == NULL) {
a608: 0a000008 beq a630 <ramdisk_allocate+0x50>
return NULL;
}
if (area_begin == NULL) {
a60c: e3540000 cmp r4, #0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
a610: 13a03000 movne r3, #0
a614: 15c0300d strbne r3, [r0, #13]
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
a618: 0a000006 beq a638 <ramdisk_allocate+0x58>
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
a61c: e3a03001 mov r3, #1
a620: e5c6300c strb r3, [r6, #12]
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
a624: e8860120 stm r6, {r5, r8}
rd->block_num = block_count;
rd->area = area_begin;
a628: e5864008 str r4, [r6, #8]
rd->trace = trace;
a62c: e5c6a00e strb sl, [r6, #14]
rd->initialized = true;
return rd;
}
a630: e1a00007 mov r0, r7
a634: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
a638: e1a00008 mov r0, r8
a63c: e1a01005 mov r1, r5
a640: ebffe218 bl 2ea8 <calloc>
if (area_begin == NULL) {
a644: e2504000 subs r4, r0, #0
free(rd);
return NULL;
}
rd->malloced = true;
a648: 13a03001 movne r3, #1
a64c: 15c7300d strbne r3, [r7, #13]
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
a650: 1afffff1 bne a61c <ramdisk_allocate+0x3c>
free(rd);
a654: e1a00007 mov r0, r7 <== NOT EXECUTED
a658: ebffe2a8 bl 3100 <free> <== NOT EXECUTED
a65c: e1a07004 mov r7, r4 <== NOT EXECUTED
return NULL;
a660: eafffff2 b a630 <ramdisk_allocate+0x50> <== NOT EXECUTED
00020fcc <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
20fcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
20fd0: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
20fd4: e1a09000 mov r9, r0 <== NOT EXECUTED
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
20fd8: ebff9580 bl 65e0 <rtems_disk_io_initialize> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
20fdc: e3500000 cmp r0, #0 <== NOT EXECUTED
20fe0: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
20fe4: 0a000002 beq 20ff4 <ramdisk_initialize+0x28> <== NOT EXECUTED
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
20fe8: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
20fec: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
20ff0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* This is allocating memory for a RAM disk which will persist for
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
20ff4: e59f7114 ldr r7, [pc, #276] ; 21110 <ramdisk_initialize+0x144><== NOT EXECUTED
20ff8: e3a01010 mov r1, #16 <== NOT EXECUTED
20ffc: e5970000 ldr r0, [r7] <== NOT EXECUTED
21000: ebff99d6 bl 7760 <calloc> <== NOT EXECUTED
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
21004: e5973000 ldr r3, [r7] <== NOT EXECUTED
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
21008: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
2100c: e3530000 cmp r3, #0 <== NOT EXECUTED
* This is allocating memory for a RAM disk which will persist for
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
21010: e1a04000 mov r4, r0 <== NOT EXECUTED
r->trace = false;
21014: e5c0100e strb r1, [r0, #14] <== NOT EXECUTED
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
21018: 0afffff2 beq 20fe8 <ramdisk_initialize+0x1c> <== NOT EXECUTED
2101c: e59f60f0 ldr r6, [pc, #240] ; 21114 <ramdisk_initialize+0x148><== NOT EXECUTED
21020: e1a05001 mov r5, r1 <== NOT EXECUTED
21024: e28d8014 add r8, sp, #20 <== NOT EXECUTED
{
if (r->malloced)
{
free(r->area);
}
r->initialized = false;
21028: e1a0a001 mov sl, r1 <== NOT EXECUTED
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
2102c: e59f30e4 ldr r3, [pc, #228] ; 21118 <ramdisk_initialize+0x14c><== NOT EXECUTED
21030: e8930007 ldm r3, {r0, r1, r2} <== NOT EXECUTED
21034: e1a0c008 mov ip, r8 <== NOT EXECUTED
21038: e8ac0003 stmia ip!, {r0, r1} <== NOT EXECUTED
2103c: e5cc2000 strb r2, [ip] <== NOT EXECUTED
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
21040: e5dd001c ldrb r0, [sp, #28] <== NOT EXECUTED
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
21044: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
21048: e896000c ldm r6, {r2, r3} <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
2104c: e58d9020 str r9, [sp, #32] <== NOT EXECUTED
temp.__overlay.minor = _minor;
21050: e58d5024 str r5, [sp, #36] ; 0x24 <== NOT EXECUTED
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
21054: e0800005 add r0, r0, r5 <== NOT EXECUTED
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
21058: e3510000 cmp r1, #0 <== NOT EXECUTED
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
2105c: e5cd001c strb r0, [sp, #28] <== NOT EXECUTED
r->block_size = c->block_size;
21060: e884000c stm r4, {r2, r3} <== NOT EXECUTED
return temp.device;
21064: e28dc020 add ip, sp, #32 <== NOT EXECUTED
21068: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
r->block_num = c->block_num;
if (c->location == NULL)
2106c: 0a000019 beq 210d8 <ramdisk_initialize+0x10c> <== NOT EXECUTED
}
else
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
21070: e5841008 str r1, [r4, #8] <== NOT EXECUTED
}
}
else
{
r->malloced = false;
r->initialized = true;
21074: e3a01001 mov r1, #1 <== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
21078: e5c4a00d strb sl, [r4, #13] <== NOT EXECUTED
r->initialized = true;
2107c: e5c4100c strb r1, [r4, #12] <== NOT EXECUTED
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
21080: e1a0100c mov r1, ip <== NOT EXECUTED
21084: e59fc090 ldr ip, [pc, #144] ; 2111c <ramdisk_initialize+0x150><== NOT EXECUTED
21088: e1a0000b mov r0, fp <== NOT EXECUTED
2108c: e58dc000 str ip, [sp] <== NOT EXECUTED
21090: e98d0110 stmib sp, {r4, r8} <== NOT EXECUTED
21094: ebff9723 bl 6d28 <rtems_disk_create_phys> <== NOT EXECUTED
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
21098: e3500000 cmp r0, #0 <== NOT EXECUTED
2109c: 0a000003 beq 210b0 <ramdisk_initialize+0xe4> <== NOT EXECUTED
{
if (r->malloced)
210a0: e5d4300d ldrb r3, [r4, #13] <== NOT EXECUTED
210a4: e3530000 cmp r3, #0 <== NOT EXECUTED
210a8: 1a000007 bne 210cc <ramdisk_initialize+0x100> <== NOT EXECUTED
{
free(r->area);
}
r->initialized = false;
210ac: e5c4a00c strb sl, [r4, #12] <== NOT EXECUTED
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
210b0: e5973000 ldr r3, [r7] <== NOT EXECUTED
210b4: e2855001 add r5, r5, #1 <== NOT EXECUTED
210b8: e1530005 cmp r3, r5 <== NOT EXECUTED
210bc: 9affffc9 bls 20fe8 <ramdisk_initialize+0x1c> <== NOT EXECUTED
210c0: e286600c add r6, r6, #12 <== NOT EXECUTED
210c4: e2844010 add r4, r4, #16 <== NOT EXECUTED
210c8: eaffffd7 b 2102c <ramdisk_initialize+0x60> <== NOT EXECUTED
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
{
if (r->malloced)
{
free(r->area);
210cc: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
210d0: ebff9b26 bl 7d70 <free> <== NOT EXECUTED
210d4: eafffff4 b 210ac <ramdisk_initialize+0xe0> <== NOT EXECUTED
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
210d8: e3a01001 mov r1, #1 <== NOT EXECUTED
r->area = malloc(r->block_size * r->block_num);
210dc: e0000392 mul r0, r2, r3 <== NOT EXECUTED
210e0: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
210e4: e5c4100d strb r1, [r4, #13] <== NOT EXECUTED
r->area = malloc(r->block_size * r->block_num);
210e8: ebff9ce4 bl 8480 <malloc> <== NOT EXECUTED
if (r->area == NULL) /* No enough memory for this disk */
210ec: e3500000 cmp r0, #0 <== NOT EXECUTED
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
210f0: e5840008 str r0, [r4, #8] <== NOT EXECUTED
if (r->area == NULL) /* No enough memory for this disk */
210f4: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
{
r->initialized = false;
210f8: 05c4000c strbeq r0, [r4, #12] <== NOT EXECUTED
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
if (r->area == NULL) /* No enough memory for this disk */
210fc: 0affffeb beq 210b0 <ramdisk_initialize+0xe4> <== NOT EXECUTED
r->initialized = false;
continue;
}
else
{
r->initialized = true;
21100: e3a03001 mov r3, #1 <== NOT EXECUTED
21104: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED
21108: e896000c ldm r6, {r2, r3} <== NOT EXECUTED
2110c: eaffffdb b 21080 <ramdisk_initialize+0xb4> <== NOT EXECUTED
0000a4b8 <ramdisk_ioctl>:
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
switch (req)
a4b8: e3a03961 mov r3, #1589248 ; 0x184000
a4bc: e2833c02 add r3, r3, #512 ; 0x200
a4c0: e2833107 add r3, r3, #-1073741823 ; 0xc0000001
a4c4: e1510003 cmp r1, r3
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
a4c8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a4cc: e1a05002 mov r5, r2
switch (req)
a4d0: 0a000001 beq a4dc <ramdisk_ioctl+0x24>
break;
}
errno = EINVAL;
return -1;
}
a4d4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
a4d8: ea0009d5 b cc34 <rtems_blkdev_ioctl>
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
a4dc: e5926000 ldr r6, [r2]
a4e0: e3560000 cmp r6, #0
switch (req)
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
a4e4: e590702c ldr r7, [r0, #44] ; 0x2c
switch (r->req)
a4e8: 1a000017 bne a54c <ramdisk_ioctl+0x94>
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a4ec: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
a4f0: e3530000 cmp r3, #0 <== NOT EXECUTED
#endif
static int
ramdisk_read(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *from = rd->area;
a4f4: e5978008 ldr r8, [r7, #8] <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a4f8: 0a00000b beq a52c <ramdisk_ioctl+0x74> <== NOT EXECUTED
a4fc: e2824018 add r4, r2, #24 <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
a500: e5941000 ldr r1, [r4] <== NOT EXECUTED
a504: e5973000 ldr r3, [r7] <== NOT EXECUTED
a508: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
a50c: e0218193 mla r1, r3, r1, r8 <== NOT EXECUTED
a510: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a514: eb00264a bl 13e44 <memcpy> <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a518: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
a51c: e2866001 add r6, r6, #1 <== NOT EXECUTED
a520: e1560003 cmp r6, r3 <== NOT EXECUTED
a524: e2844010 add r4, r4, #16 <== NOT EXECUTED
a528: 3afffff4 bcc a500 <ramdisk_ioctl+0x48> <== NOT EXECUTED
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
a52c: e3a04000 mov r4, #0
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
a530: e5950008 ldr r0, [r5, #8]
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
a534: e585400c str r4, [r5, #12]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
a538: e1a01004 mov r1, r4
a53c: e1a0e00f mov lr, pc
a540: e595f004 ldr pc, [r5, #4]
a544: e1a00004 mov r0, r4
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
a548: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
a54c: e3560001 cmp r6, #1
a550: 0a000004 beq a568 <ramdisk_ioctl+0xb0>
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
a554: eb00242c bl 1360c <__errno> <== NOT EXECUTED
a558: e3a03016 mov r3, #22 <== NOT EXECUTED
a55c: e5803000 str r3, [r0] <== NOT EXECUTED
a560: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
a564: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a568: e5923010 ldr r3, [r2, #16]
a56c: e3530000 cmp r3, #0
}
static int
ramdisk_write(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *to = rd->area;
a570: e5978008 ldr r8, [r7, #8]
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a574: 0affffec beq a52c <ramdisk_ioctl+0x74>
a578: e2824018 add r4, r2, #24
a57c: e3a06000 mov r6, #0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
a580: e5940000 ldr r0, [r4]
a584: e5973000 ldr r3, [r7]
a588: e5941008 ldr r1, [r4, #8]
a58c: e0208093 mla r0, r3, r0, r8
a590: e5942004 ldr r2, [r4, #4]
a594: eb00262a bl 13e44 <memcpy>
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
a598: e5953010 ldr r3, [r5, #16]
a59c: e2866001 add r6, r6, #1
a5a0: e1560003 cmp r6, r3
a5a4: e2844010 add r4, r4, #16
a5a8: 3afffff4 bcc a580 <ramdisk_ioctl+0xc8>
a5ac: eaffffde b a52c <ramdisk_ioctl+0x74>
0000a664 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
a664: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a668: e24dd010 sub sp, sp, #16
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
a66c: e3a0e000 mov lr, #0
a670: e28dc010 add ip, sp, #16
a674: e52ce004 str lr, [ip, #-4]!
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
a678: e1a07002 mov r7, r2
a67c: e1a05000 mov r5, r0
a680: e1a04001 mov r4, r1
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
a684: e1a0000e mov r0, lr
a688: e1a0200c mov r2, ip
a68c: e59f1094 ldr r1, [pc, #148] ; a728 <ramdisk_register+0xc4>
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
a690: e1a06003 mov r6, r3
a694: e59d9030 ldr r9, [sp, #48] ; 0x30
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
a698: ebfff2d5 bl 71f4 <rtems_io_register_driver>
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
a69c: e20780ff and r8, r7, #255 ; 0xff
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
a6a0: e2507000 subs r7, r0, #0
a6a4: 0a000002 beq a6b4 <ramdisk_register+0x50>
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
if (rd == NULL) {
rtems_io_unregister_driver(major);
a6a8: e3a0000d mov r0, #13 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
a6ac: e28dd010 add sp, sp, #16
a6b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
a6b4: e1a03008 mov r3, r8
a6b8: e1a01005 mov r1, r5
a6bc: e1a02004 mov r2, r4
a6c0: ebffffc6 bl a5e0 <ramdisk_allocate>
if (rd == NULL) {
a6c4: e2508000 subs r8, r0, #0
a6c8: 0a000013 beq a71c <ramdisk_register+0xb8>
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
a6cc: e59da00c ldr sl, [sp, #12]
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
a6d0: e59fc054 ldr ip, [pc, #84] ; a72c <ramdisk_register+0xc8>
a6d4: e1a01007 mov r1, r7
a6d8: e1a02005 mov r2, r5
a6dc: e1a03004 mov r3, r4
a6e0: e1a0000a mov r0, sl
a6e4: e58dc000 str ip, [sp]
a6e8: e58d6008 str r6, [sp, #8]
a6ec: e58d8004 str r8, [sp, #4]
a6f0: ebffdfb9 bl 25dc <rtems_disk_create_phys>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
a6f4: e3500000 cmp r0, #0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
a6f8: 0589a000 streq sl, [r9]
a6fc: 05890004 streq r0, [r9, #4]
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
a700: 0affffe9 beq a6ac <ramdisk_register+0x48>
ramdisk_free(rd);
a704: e1a00008 mov r0, r8 <== NOT EXECUTED
a708: ebffffa8 bl a5b0 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
a70c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
a710: ebfff30f bl 7354 <rtems_io_unregister_driver> <== NOT EXECUTED
a714: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
a718: eaffffe3 b a6ac <ramdisk_register+0x48> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
if (rd == NULL) {
rtems_io_unregister_driver(major);
a71c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
a720: ebfff30b bl 7354 <rtems_io_unregister_driver> <== NOT EXECUTED
a724: eaffffdf b a6a8 <ramdisk_register+0x44> <== NOT EXECUTED
0001b1e8 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1b1e8: e59f30bc ldr r3, [pc, #188] ; 1b2ac <read+0xc4>
1b1ec: e5933000 ldr r3, [r3]
1b1f0: e1500003 cmp r0, r3
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
1b1f4: e92d4810 push {r4, fp, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1b1f8: 2a00001c bcs 1b270 <read+0x88>
iop = rtems_libio_iop( fd );
1b1fc: e59f40ac ldr r4, [pc, #172] ; 1b2b0 <read+0xc8>
1b200: e5944000 ldr r4, [r4]
1b204: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1b208: e5940014 ldr r0, [r4, #20]
1b20c: e3100c01 tst r0, #256 ; 0x100
1b210: 0a000016 beq 1b270 <read+0x88>
rtems_libio_check_buffer( buffer );
1b214: e3510000 cmp r1, #0
1b218: 0a00001e beq 1b298 <read+0xb0>
rtems_libio_check_count( count );
1b21c: e3520000 cmp r2, #0
1b220: 01a00002 moveq r0, r2
1b224: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
1b228: e3100002 tst r0, #2
1b22c: 0a00000f beq 1b270 <read+0x88>
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
1b230: e594303c ldr r3, [r4, #60] ; 0x3c
1b234: e5933008 ldr r3, [r3, #8]
1b238: e3530000 cmp r3, #0
1b23c: 0a000010 beq 1b284 <read+0x9c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
1b240: e1a00004 mov r0, r4
1b244: e1a0e00f mov lr, pc
1b248: e12fff13 bx r3
if ( rc > 0 )
1b24c: e3500000 cmp r0, #0
1b250: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
1b254: e284c00c add ip, r4, #12
1b258: e89c1800 ldm ip, {fp, ip}
1b25c: e09b2000 adds r2, fp, r0
1b260: e0ac3fc0 adc r3, ip, r0, asr #31
1b264: e584200c str r2, [r4, #12]
1b268: e5843010 str r3, [r4, #16]
return rc;
}
1b26c: e8bd8810 pop {r4, fp, pc}
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
1b270: ebffd127 bl f714 <__errno>
1b274: e3a03009 mov r3, #9
1b278: e5803000 str r3, [r0]
1b27c: e3e00000 mvn r0, #0
1b280: e8bd8810 pop {r4, fp, pc}
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1b284: ebffd122 bl f714 <__errno> <== NOT EXECUTED
1b288: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1b28c: e5803000 str r3, [r0] <== NOT EXECUTED
1b290: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b294: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
1b298: ebffd11d bl f714 <__errno> <== NOT EXECUTED
1b29c: e3a03016 mov r3, #22 <== NOT EXECUTED
1b2a0: e5803000 str r3, [r0] <== NOT EXECUTED
1b2a4: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b2a8: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
0002a8f0 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
2a8f0: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
2a8f4: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
2a8f8: e24dd018 sub sp, sp, #24
2a8fc: e1a05002 mov r5, r2
2a900: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
2a904: 0a000032 beq 2a9d4 <readlink+0xe4>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
2a908: eb00825a bl 4b278 <strlen>
2a90c: e28d4004 add r4, sp, #4
2a910: e3a0c000 mov ip, #0
2a914: e1a01000 mov r1, r0
2a918: e1a0200c mov r2, ip
2a91c: e1a00007 mov r0, r7
2a920: e1a03004 mov r3, r4
2a924: e58dc000 str ip, [sp]
2a928: ebff74ee bl 7ce8 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
2a92c: e3500000 cmp r0, #0
2a930: 1a000025 bne 2a9cc <readlink+0xdc>
return -1;
if ( !loc.ops->node_type_h ){
2a934: e59d2010 ldr r2, [sp, #16]
2a938: e5923010 ldr r3, [r2, #16]
2a93c: e3530000 cmp r3, #0
2a940: 0a000019 beq 2a9ac <readlink+0xbc>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
2a944: e1a00004 mov r0, r4
2a948: e1a0e00f mov lr, pc
2a94c: e12fff13 bx r3
2a950: e3500004 cmp r0, #4
2a954: 1a000023 bne 2a9e8 <readlink+0xf8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
2a958: e59d2010 ldr r2, [sp, #16]
2a95c: e592303c ldr r3, [r2, #60] ; 0x3c
2a960: e3530000 cmp r3, #0
2a964: 0a00002c beq 2aa1c <readlink+0x12c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2a968: e1a02005 mov r2, r5
2a96c: e1a01006 mov r1, r6
2a970: e1a00004 mov r0, r4
2a974: e1a0e00f mov lr, pc
2a978: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
2a97c: e59d3010 ldr r3, [sp, #16]
2a980: e3530000 cmp r3, #0
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2a984: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
2a988: 0a000004 beq 2a9a0 <readlink+0xb0>
2a98c: e593301c ldr r3, [r3, #28]
2a990: e3530000 cmp r3, #0
2a994: 11a00004 movne r0, r4
2a998: 11a0e00f movne lr, pc
2a99c: 112fff13 bxne r3
return result;
}
2a9a0: e1a00005 mov r0, r5
2a9a4: e28dd018 add sp, sp, #24
2a9a8: e8bd80f0 pop {r4, r5, r6, r7, pc}
0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
2a9ac: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2a9b0: e3530000 cmp r3, #0 <== NOT EXECUTED
2a9b4: 11a00004 movne r0, r4 <== NOT EXECUTED
2a9b8: 11a0e00f movne lr, pc <== NOT EXECUTED
2a9bc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2a9c0: eb00671e bl 44640 <__errno> <== NOT EXECUTED
2a9c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2a9c8: e5803000 str r3, [r0] <== NOT EXECUTED
2a9cc: e3e05000 mvn r5, #0 <== NOT EXECUTED
2a9d0: eafffff2 b 2a9a0 <readlink+0xb0> <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
2a9d4: eb006719 bl 44640 <__errno> <== NOT EXECUTED
2a9d8: e3a0300e mov r3, #14 <== NOT EXECUTED
2a9dc: e5803000 str r3, [r0] <== NOT EXECUTED
2a9e0: e3e05000 mvn r5, #0 <== NOT EXECUTED
2a9e4: eaffffed b 2a9a0 <readlink+0xb0> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
2a9e8: e59d3010 ldr r3, [sp, #16]
2a9ec: e3530000 cmp r3, #0
2a9f0: 0a000004 beq 2aa08 <readlink+0x118>
2a9f4: e593301c ldr r3, [r3, #28]
2a9f8: e3530000 cmp r3, #0
2a9fc: 11a00004 movne r0, r4
2aa00: 11a0e00f movne lr, pc
2aa04: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
2aa08: eb00670c bl 44640 <__errno>
2aa0c: e3a03016 mov r3, #22
2aa10: e5803000 str r3, [r0]
2aa14: e3e05000 mvn r5, #0
2aa18: eaffffe0 b 2a9a0 <readlink+0xb0>
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
2aa1c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2aa20: e3530000 cmp r3, #0 <== NOT EXECUTED
2aa24: 11a00004 movne r0, r4 <== NOT EXECUTED
2aa28: 11a0e00f movne lr, pc <== NOT EXECUTED
2aa2c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2aa30: eb006702 bl 44640 <__errno> <== NOT EXECUTED
2aa34: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2aa38: e5803000 str r3, [r0] <== NOT EXECUTED
2aa3c: e3e05000 mvn r5, #0 <== NOT EXECUTED
2aa40: eaffffd6 b 2a9a0 <readlink+0xb0> <== NOT EXECUTED
00003cfc <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3cfc: e59f3160 ldr r3, [pc, #352] ; 3e64 <readv+0x168>
3d00: e5933000 ldr r3, [r3]
3d04: e1500003 cmp r0, r3
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
3d08: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
3d0c: e1a04002 mov r4, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3d10: 2a000049 bcs 3e3c <readv+0x140>
iop = rtems_libio_iop( fd );
3d14: e59f314c ldr r3, [pc, #332] ; 3e68 <readv+0x16c>
3d18: e5936000 ldr r6, [r3]
3d1c: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3d20: e5963014 ldr r3, [r6, #20]
3d24: e3130c01 tst r3, #256 ; 0x100
3d28: 0a000043 beq 3e3c <readv+0x140>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
3d2c: e3130002 tst r3, #2
3d30: 0a000041 beq 3e3c <readv+0x140>
/*
* Argument validation on IO vector
*/
if ( !iov )
3d34: e3510000 cmp r1, #0
3d38: 0a000039 beq 3e24 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
3d3c: e3520000 cmp r2, #0
3d40: da000037 ble 3e24 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
3d44: e3520b01 cmp r2, #1024 ; 0x400
3d48: ca000035 bgt 3e24 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
3d4c: e596303c ldr r3, [r6, #60] ; 0x3c
3d50: e5933008 ldr r3, [r3, #8]
3d54: e3530000 cmp r3, #0
3d58: 0a00003c beq 3e50 <readv+0x154>
rtems_set_errno_and_return_minus_one( ENOTSUP );
3d5c: e1a05001 mov r5, r1
3d60: e3a01000 mov r1, #0
3d64: e1a02005 mov r2, r5
3d68: e3a07001 mov r7, #1
3d6c: e1a00001 mov r0, r1
3d70: ea000000 b 3d78 <readv+0x7c>
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3d74: e1a00008 mov r0, r8
ssize_t old;
if ( !iov[v].iov_base )
3d78: e592c000 ldr ip, [r2]
3d7c: e35c0000 cmp ip, #0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3d80: e2811001 add r1, r1, #1
ssize_t old;
if ( !iov[v].iov_base )
3d84: 0a000026 beq 3e24 <readv+0x128>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
3d88: e592c004 ldr ip, [r2, #4]
3d8c: e080800c add r8, r0, ip
if ( total < old )
3d90: e1580000 cmp r8, r0
3d94: ba000022 blt 3e24 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
3d98: e35c0000 cmp ip, #0
3d9c: 13a07000 movne r7, #0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3da0: e1540001 cmp r4, r1
3da4: e2822008 add r2, r2, #8
3da8: cafffff1 bgt 3d74 <readv+0x78>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
3dac: e3570000 cmp r7, #0
3db0: 13a08000 movne r8, #0
3db4: 1a00001e bne 3e34 <readv+0x138>
3db8: e1a08007 mov r8, r7
3dbc: ea00000f b 3e00 <readv+0x104>
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
3dc0: 0a000006 beq 3de0 <readv+0xe4>
iop->offset += bytes;
3dc4: e286c00c add ip, r6, #12
3dc8: e89c1800 ldm ip, {fp, ip}
3dcc: e09b2000 adds r2, fp, r0
3dd0: e0ac3fc0 adc r3, ip, r0, asr #31
3dd4: e586200c str r2, [r6, #12]
3dd8: e5863010 str r3, [r6, #16]
total += bytes;
3ddc: e0888000 add r8, r8, r0
}
if (bytes != iov[ v ].iov_len)
3de0: e5953004 ldr r3, [r5, #4]
3de4: e1500003 cmp r0, r3
3de8: 1a000011 bne 3e34 <readv+0x138>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3dec: e1540007 cmp r4, r7
3df0: e2855008 add r5, r5, #8
3df4: da00000e ble 3e34 <readv+0x138>
3df8: e596303c ldr r3, [r6, #60] ; 0x3c
3dfc: e5933008 ldr r3, [r3, #8]
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
3e00: e8950006 ldm r5, {r1, r2}
3e04: e1a00006 mov r0, r6
3e08: e1a0e00f mov lr, pc
3e0c: e12fff13 bx r3
if ( bytes < 0 )
3e10: e3500000 cmp r0, #0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3e14: e2877001 add r7, r7, #1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
3e18: aaffffe8 bge 3dc0 <readv+0xc4>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3e1c: e3e08000 mvn r8, #0 <== NOT EXECUTED
3e20: ea000003 b 3e34 <readv+0x138> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
3e24: eb0032ab bl 108d8 <__errno>
3e28: e3a03016 mov r3, #22
3e2c: e5803000 str r3, [r0]
3e30: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
3e34: e1a00008 mov r0, r8
3e38: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
3e3c: eb0032a5 bl 108d8 <__errno> <== NOT EXECUTED
3e40: e3a03009 mov r3, #9 <== NOT EXECUTED
3e44: e5803000 str r3, [r0] <== NOT EXECUTED
3e48: e3e08000 mvn r8, #0 <== NOT EXECUTED
3e4c: eafffff8 b 3e34 <readv+0x138> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3e50: eb0032a0 bl 108d8 <__errno> <== NOT EXECUTED
3e54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3e58: e5803000 str r3, [r0] <== NOT EXECUTED
3e5c: e3e08000 mvn r8, #0 <== NOT EXECUTED
3e60: eafffff3 b 3e34 <readv+0x138> <== NOT EXECUTED
0001b30c <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1b30c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1b310: e59f3118 ldr r3, [pc, #280] ; 1b430 <realloc+0x124>
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1b314: e59f5118 ldr r5, [pc, #280] ; 1b434 <realloc+0x128>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1b318: e5932000 ldr r2, [r3]
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1b31c: e5953010 ldr r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1b320: e3520003 cmp r2, #3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1b324: e2833001 add r3, r3, #1
1b328: e24dd004 sub sp, sp, #4
1b32c: e5853010 str r3, [r5, #16]
1b330: e1a04000 mov r4, r0
1b334: e1a06001 mov r6, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1b338: 0a000020 beq 1b3c0 <realloc+0xb4>
}
/*
* Continue with realloc().
*/
if ( !ptr )
1b33c: e3540000 cmp r4, #0
1b340: 0a00001a beq 1b3b0 <realloc+0xa4>
return malloc( size );
if ( !size ) {
1b344: e3560000 cmp r6, #0
1b348: 0a00000f beq 1b38c <realloc+0x80>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1b34c: e59f70e4 ldr r7, [pc, #228] ; 1b438 <realloc+0x12c>
1b350: e1a01004 mov r1, r4
1b354: e5970000 ldr r0, [r7]
1b358: e1a0200d mov r2, sp
1b35c: eb00006b bl 1b510 <_Protected_heap_Get_block_size>
1b360: e2508000 subs r8, r0, #0
1b364: 0a00000c beq 1b39c <realloc+0x90>
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
1b368: e5970000 ldr r0, [r7]
1b36c: e1a01004 mov r1, r4
1b370: e1a02006 mov r2, r6
1b374: eb000076 bl 1b554 <_Protected_heap_Resize_block>
1b378: e3500000 cmp r0, #0
1b37c: 0a00001b beq 1b3f0 <realloc+0xe4>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
1b380: e1a00004 mov r0, r4
1b384: e28dd004 add sp, sp, #4
1b388: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
1b38c: e1a00004 mov r0, r4 <== NOT EXECUTED
1b390: ebff9b44 bl 20a8 <free> <== NOT EXECUTED
1b394: e1a04006 mov r4, r6 <== NOT EXECUTED
return (void *) 0;
1b398: eafffff8 b 1b380 <realloc+0x74> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
1b39c: ebffd0dc bl f714 <__errno>
1b3a0: e3a03016 mov r3, #22
1b3a4: e5803000 str r3, [r0]
1b3a8: e1a04008 mov r4, r8
return (void *) 0;
1b3ac: eafffff3 b 1b380 <realloc+0x74>
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
1b3b0: e1a00006 mov r0, r6
1b3b4: ebff9c14 bl 240c <malloc>
1b3b8: e1a04000 mov r4, r0
1b3bc: eaffffef b 1b380 <realloc+0x74>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
1b3c0: e59f3074 ldr r3, [pc, #116] ; 1b43c <realloc+0x130>
1b3c4: e5933000 ldr r3, [r3]
1b3c8: e3530000 cmp r3, #0
1b3cc: 0a000001 beq 1b3d8 <realloc+0xcc>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
1b3d0: e3a04000 mov r4, #0
1b3d4: eaffffe9 b 1b380 <realloc+0x74>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
1b3d8: e59f3060 ldr r3, [pc, #96] ; 1b440 <realloc+0x134>
1b3dc: e5933000 ldr r3, [r3]
1b3e0: e3530000 cmp r3, #0
1b3e4: 0affffd4 beq 1b33c <realloc+0x30>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
1b3e8: e3a04000 mov r4, #0 <== NOT EXECUTED
1b3ec: eaffffe3 b 1b380 <realloc+0x74> <== NOT EXECUTED
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
1b3f0: e1a00006 mov r0, r6
1b3f4: ebff9c04 bl 240c <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1b3f8: e5953004 ldr r3, [r5, #4]
if ( !new_area ) {
1b3fc: e2507000 subs r7, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1b400: e2433001 sub r3, r3, #1
1b404: e5853004 str r3, [r5, #4]
if ( !new_area ) {
1b408: 0afffff0 beq 1b3d0 <realloc+0xc4>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1b40c: e59d2000 ldr r2, [sp]
1b410: e1a01004 mov r1, r4
1b414: e1560002 cmp r6, r2
1b418: 31a02006 movcc r2, r6
1b41c: ebffd2ca bl ff4c <memcpy>
free( ptr );
1b420: e1a00004 mov r0, r4
1b424: ebff9b1f bl 20a8 <free>
1b428: e1a04007 mov r4, r7
return new_area;
1b42c: eaffffd3 b 1b380 <realloc+0x74>
0002aa44 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
2aa44: e92d40f0 push {r4, r5, r6, r7, lr}
2aa48: e24dd030 sub sp, sp, #48 ; 0x30
2aa4c: e1a07000 mov r7, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
2aa50: ebff7457 bl 7bb4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
2aa54: e2505000 subs r5, r0, #0
2aa58: 1a00005c bne 2abd0 <rmdir+0x18c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
2aa5c: e28d4018 add r4, sp, #24
2aa60: e1a00007 mov r0, r7
2aa64: e28d102c add r1, sp, #44 ; 0x2c
2aa68: e1a02004 mov r2, r4
2aa6c: ebff7b2e bl 972c <rtems_filesystem_get_start_loc>
2aa70: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2aa74: e1a0e004 mov lr, r4
2aa78: e8be000f ldm lr!, {r0, r1, r2, r3}
2aa7c: e28dc004 add ip, sp, #4
2aa80: e8ac000f stmia ip!, {r0, r1, r2, r3}
2aa84: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
2aa88: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2aa8c: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2aa90: e1a00005 mov r0, r5
2aa94: eb0081f7 bl 4b278 <strlen>
2aa98: e1a01000 mov r1, r0
2aa9c: e1a00005 mov r0, r5
2aaa0: ebff742e bl 7b60 <rtems_filesystem_prefix_separators>
2aaa4: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2aaa8: e1a00007 mov r0, r7
2aaac: eb0081f1 bl 4b278 <strlen>
2aab0: e28d5004 add r5, sp, #4
2aab4: e3a0c000 mov ip, #0
2aab8: e1a01000 mov r1, r0
2aabc: e1a0200c mov r2, ip
2aac0: e1a00007 mov r0, r7
2aac4: e1a03005 mov r3, r5
2aac8: e58dc000 str ip, [sp]
2aacc: ebff7449 bl 7bf8 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
2aad0: e3500000 cmp r0, #0
2aad4: 1a00004a bne 2ac04 <rmdir+0x1c0>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
2aad8: e59d2010 ldr r2, [sp, #16]
2aadc: e5923010 ldr r3, [r2, #16]
2aae0: e3530000 cmp r3, #0
2aae4: 0a00006b beq 2ac98 <rmdir+0x254>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
2aae8: e1a00005 mov r0, r5
2aaec: e1a0e00f mov lr, pc
2aaf0: e12fff13 bx r3
2aaf4: e3500001 cmp r0, #1
2aaf8: 1a00001d bne 2ab74 <rmdir+0x130>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
2aafc: e59d300c ldr r3, [sp, #12]
2ab00: e5933034 ldr r3, [r3, #52] ; 0x34
2ab04: e3530000 cmp r3, #0
2ab08: 0a00004a beq 2ac38 <rmdir+0x1f4>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
2ab0c: e1a00004 mov r0, r4
2ab10: e1a01005 mov r1, r5
2ab14: e1a0e00f mov lr, pc
2ab18: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
2ab1c: e59d3010 ldr r3, [sp, #16]
2ab20: e3530000 cmp r3, #0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
2ab24: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
2ab28: 0a000004 beq 2ab40 <rmdir+0xfc>
2ab2c: e593301c ldr r3, [r3, #28]
2ab30: e3530000 cmp r3, #0
2ab34: 11a00005 movne r0, r5
2ab38: 11a0e00f movne lr, pc
2ab3c: 112fff13 bxne r3
if ( free_parentloc )
2ab40: e3560000 cmp r6, #0
2ab44: 0a000007 beq 2ab68 <rmdir+0x124>
rtems_filesystem_freenode( &parentloc );
2ab48: e59d3024 ldr r3, [sp, #36] ; 0x24
2ab4c: e3530000 cmp r3, #0
2ab50: 0a000004 beq 2ab68 <rmdir+0x124>
2ab54: e593301c ldr r3, [r3, #28]
2ab58: e3530000 cmp r3, #0
2ab5c: 11a00004 movne r0, r4
2ab60: 11a0e00f movne lr, pc
2ab64: 112fff13 bxne r3
return result;
}
2ab68: e1a00007 mov r0, r7
2ab6c: e28dd030 add sp, sp, #48 ; 0x30
2ab70: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
2ab74: e59d3010 ldr r3, [sp, #16]
2ab78: e3530000 cmp r3, #0
2ab7c: 0a000004 beq 2ab94 <rmdir+0x150>
2ab80: e593301c ldr r3, [r3, #28]
2ab84: e3530000 cmp r3, #0
2ab88: 11a00005 movne r0, r5
2ab8c: 11a0e00f movne lr, pc
2ab90: 112fff13 bxne r3
if ( free_parentloc )
2ab94: e3560000 cmp r6, #0
2ab98: 0a000007 beq 2abbc <rmdir+0x178>
rtems_filesystem_freenode( &parentloc );
2ab9c: e59d3024 ldr r3, [sp, #36] ; 0x24
2aba0: e3530000 cmp r3, #0
2aba4: 0a000004 beq 2abbc <rmdir+0x178>
2aba8: e593301c ldr r3, [r3, #28]
2abac: e3530000 cmp r3, #0
2abb0: 11a00004 movne r0, r4
2abb4: 11a0e00f movne lr, pc
2abb8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
2abbc: eb00669f bl 44640 <__errno>
2abc0: e3a03014 mov r3, #20
2abc4: e5803000 str r3, [r0]
2abc8: e3e07000 mvn r7, #0
2abcc: eaffffe5 b 2ab68 <rmdir+0x124>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
2abd0: e28d4018 add r4, sp, #24
2abd4: e3a0c000 mov ip, #0
2abd8: e1a00007 mov r0, r7
2abdc: e1a01005 mov r1, r5
2abe0: e3a02002 mov r2, #2
2abe4: e1a03004 mov r3, r4
2abe8: e58dc000 str ip, [sp]
2abec: ebff743d bl 7ce8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
2abf0: e3500000 cmp r0, #0
2abf4: 03a06001 moveq r6, #1
2abf8: 0affff9d beq 2aa74 <rmdir+0x30>
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
2abfc: e3e07000 mvn r7, #0
2ac00: eaffffd8 b 2ab68 <rmdir+0x124>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
2ac04: e3560000 cmp r6, #0
2ac08: 0afffffb beq 2abfc <rmdir+0x1b8>
rtems_filesystem_freenode( &parentloc );
2ac0c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
2ac10: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac14: 0afffff8 beq 2abfc <rmdir+0x1b8> <== NOT EXECUTED
2ac18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2ac1c: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac20: 0afffff5 beq 2abfc <rmdir+0x1b8> <== NOT EXECUTED
2ac24: e1a00004 mov r0, r4 <== NOT EXECUTED
2ac28: e1a0e00f mov lr, pc <== NOT EXECUTED
2ac2c: e12fff13 bx r3 <== NOT EXECUTED
2ac30: e3e07000 mvn r7, #0 <== NOT EXECUTED
2ac34: eaffffcb b 2ab68 <rmdir+0x124> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
2ac38: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2ac3c: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac40: 0a000005 beq 2ac5c <rmdir+0x218> <== NOT EXECUTED
2ac44: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2ac48: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac4c: 0a000002 beq 2ac5c <rmdir+0x218> <== NOT EXECUTED
2ac50: e1a00005 mov r0, r5 <== NOT EXECUTED
2ac54: e1a0e00f mov lr, pc <== NOT EXECUTED
2ac58: e12fff13 bx r3 <== NOT EXECUTED
if ( free_parentloc )
2ac5c: e3560000 cmp r6, #0 <== NOT EXECUTED
2ac60: 0a000007 beq 2ac84 <rmdir+0x240> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
2ac64: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
2ac68: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac6c: 0a000004 beq 2ac84 <rmdir+0x240> <== NOT EXECUTED
2ac70: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2ac74: e3530000 cmp r3, #0 <== NOT EXECUTED
2ac78: 11a00004 movne r0, r4 <== NOT EXECUTED
2ac7c: 11a0e00f movne lr, pc <== NOT EXECUTED
2ac80: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2ac84: eb00666d bl 44640 <__errno> <== NOT EXECUTED
2ac88: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2ac8c: e5803000 str r3, [r0] <== NOT EXECUTED
2ac90: e3e07000 mvn r7, #0 <== NOT EXECUTED
2ac94: eaffffb3 b 2ab68 <rmdir+0x124> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
2ac98: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2ac9c: e3530000 cmp r3, #0 <== NOT EXECUTED
2aca0: 1affffea bne 2ac50 <rmdir+0x20c> <== NOT EXECUTED
2aca4: eaffffec b 2ac5c <rmdir+0x218> <== NOT EXECUTED
00013f4c <rtems_assoc_name_bad>:
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
13f4c: e59f0000 ldr r0, [pc, #0] ; 13f54 <rtems_assoc_name_bad+0x8><== NOT EXECUTED
13f50: e12fff1e bx lr <== NOT EXECUTED
00010558 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
10558: e92d4010 push {r4, lr}
1055c: e1a04001 mov r4, r1
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
10560: eb000006 bl 10580 <rtems_assoc_ptr_by_local>
if (nap)
10564: e3500000 cmp r0, #0
10568: 0a000001 beq 10574 <rtems_assoc_name_by_local+0x1c>
return nap->name;
return rtems_assoc_name_bad(local_value);
}
1056c: e5900000 ldr r0, [r0]
10570: e8bd8010 pop {r4, pc}
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
10574: e1a00004 mov r0, r4 <== NOT EXECUTED
}
10578: e8bd4010 pop {r4, lr} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
1057c: ea000e72 b 13f4c <rtems_assoc_name_bad> <== NOT EXECUTED
0000f67c <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
f67c: e92d4030 push {r4, r5, lr}
f680: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
f684: e5900000 ldr r0, [r0]
f688: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
f68c: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
f690: 01a04000 moveq r4, r0
f694: 0a000013 beq f6e8 <rtems_assoc_ptr_by_local+0x6c>
f698: e59f105c ldr r1, [pc, #92] ; f6fc <rtems_assoc_ptr_by_local+0x80>
f69c: eb000345 bl 103b8 <strcmp>
f6a0: e3500000 cmp r0, #0
f6a4: 13a02000 movne r2, #0
f6a8: 1a00000b bne f6dc <rtems_assoc_ptr_by_local+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
f6ac: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
f6b0: e3530000 cmp r3, #0 <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
f6b4: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
f6b8: 0a00000a beq f6e8 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
f6bc: e1a02004 mov r2, r4 <== NOT EXECUTED
f6c0: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->local_value == local_value)
f6c4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
f6c8: e1530005 cmp r3, r5 <== NOT EXECUTED
f6cc: 0a000005 beq f6e8 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
f6d0: e5b4300c ldr r3, [r4, #12]!
f6d4: e3530000 cmp r3, #0
f6d8: 0a000004 beq f6f0 <rtems_assoc_ptr_by_local+0x74>
if (ap->local_value == local_value)
f6dc: e5943004 ldr r3, [r4, #4]
f6e0: e1530005 cmp r3, r5
f6e4: 1afffff9 bne f6d0 <rtems_assoc_ptr_by_local+0x54>
return ap;
return default_ap;
}
f6e8: e1a00004 mov r0, r4
f6ec: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
f6f0: e1a04002 mov r4, r2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
f6f4: e1a00004 mov r0, r4
f6f8: e8bd8030 pop {r4, r5, pc}
0000e4ec <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
e4ec: e92d4030 push {r4, r5, lr}
e4f0: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
e4f4: e5900000 ldr r0, [r0]
e4f8: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
e4fc: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
e500: 01a04000 moveq r4, r0
e504: 0a000013 beq e558 <rtems_assoc_ptr_by_remote+0x6c>
e508: e59f105c ldr r1, [pc, #92] ; e56c <rtems_assoc_ptr_by_remote+0x80>
e50c: eb0007a9 bl 103b8 <strcmp>
e510: e3500000 cmp r0, #0
e514: 13a02000 movne r2, #0
e518: 1a00000b bne e54c <rtems_assoc_ptr_by_remote+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
e51c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
e520: e3530000 cmp r3, #0 <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
e524: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
e528: 0a00000a beq e558 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
e52c: e1a02004 mov r2, r4 <== NOT EXECUTED
e530: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->remote_value == remote_value)
e534: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
e538: e1530005 cmp r3, r5 <== NOT EXECUTED
e53c: 0a000005 beq e558 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
e540: e5b4300c ldr r3, [r4, #12]!
e544: e3530000 cmp r3, #0
e548: 0a000004 beq e560 <rtems_assoc_ptr_by_remote+0x74>
if (ap->remote_value == remote_value)
e54c: e5943008 ldr r3, [r4, #8]
e550: e1530005 cmp r3, r5
e554: 1afffff9 bne e540 <rtems_assoc_ptr_by_remote+0x54>
return ap;
return default_ap;
}
e558: e1a00004 mov r0, r4
e55c: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
e560: e1a04002 mov r4, r2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
e564: e1a00004 mov r0, r4
e568: e8bd8030 pop {r4, r5, pc}
0000f5e0 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
f5e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
f5e4: eb000024 bl f67c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
f5e8: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
f5ec: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
f5f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000ab0c <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
ab0c: e92d4030 push {r4, r5, lr}
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
ab10: e59f50b8 ldr r5, [pc, #184] ; abd0 <rtems_bdbuf_add_to_modified_list_after_access+0xc4>
ab14: e5d53030 ldrb r3, [r5, #48] ; 0x30
ab18: e3530000 cmp r3, #0
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
ab1c: e1a04000 mov r4, r0
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
ab20: 0a000004 beq ab38 <rtems_bdbuf_add_to_modified_list_after_access+0x2c>
ab24: e2853038 add r3, r5, #56 ; 0x38 <== NOT EXECUTED
ab28: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
ab2c: e5901014 ldr r1, [r0, #20] <== NOT EXECUTED
ab30: e1510002 cmp r1, r2 <== NOT EXECUTED
ab34: 0a00001a beq aba4 <rtems_bdbuf_add_to_modified_list_after_access+0x98><== NOT EXECUTED
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
ab38: e5943024 ldr r3, [r4, #36] ; 0x24
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
ab3c: e3530003 cmp r3, #3
ab40: 0a000010 beq ab88 <rtems_bdbuf_add_to_modified_list_after_access+0x7c>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
ab44: e5943024 ldr r3, [r4, #36] ; 0x24
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
ab48: e3530005 cmp r3, #5
ab4c: 0a00000d beq ab88 <rtems_bdbuf_add_to_modified_list_after_access+0x7c>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ab50: e59f5078 ldr r5, [pc, #120] ; abd0 <rtems_bdbuf_add_to_modified_list_after_access+0xc4>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ab54: e3a03007 mov r3, #7
ab58: e5843024 str r3, [r4, #36] ; 0x24
ab5c: e2850050 add r0, r5, #80 ; 0x50
ab60: e1a01004 mov r1, r4
ab64: ebfff2a2 bl 75f4 <_Chain_Append>
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
ab68: e5943028 ldr r3, [r4, #40] ; 0x28
ab6c: e3530000 cmp r3, #0
ab70: 1a000008 bne ab98 <rtems_bdbuf_add_to_modified_list_after_access+0x8c>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
ab74: e5953078 ldr r3, [r5, #120] ; 0x78
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
ab78: e3530000 cmp r3, #0
ab7c: 08bd8030 popeq {r4, r5, pc}
rtems_bdbuf_wake_swapper ();
}
ab80: e8bd4030 pop {r4, r5, lr}
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
ab84: eaffffd5 b aae0 <rtems_bdbuf_wake_swapper>
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
ab88: e59f3044 ldr r3, [pc, #68] ; abd4 <rtems_bdbuf_add_to_modified_list_after_access+0xc8>
ab8c: e5933010 ldr r3, [r3, #16]
ab90: e5843030 str r3, [r4, #48] ; 0x30
ab94: eaffffed b ab50 <rtems_bdbuf_add_to_modified_list_after_access+0x44>
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
ab98: e2850068 add r0, r5, #104 ; 0x68
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
ab9c: e8bd4030 pop {r4, r5, lr}
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
aba0: eaffff00 b a7a8 <rtems_bdbuf_wake>
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
aba4: e5901018 ldr r1, [r0, #24] <== NOT EXECUTED
aba8: e1510003 cmp r1, r3 <== NOT EXECUTED
abac: 1affffe1 bne ab38 <rtems_bdbuf_add_to_modified_list_after_access+0x2c><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
abb0: ebffff71 bl a97c <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
abb4: e3a01442 mov r1, #1107296256 ; 0x42000000 <== NOT EXECUTED
abb8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
abbc: e281100b add r1, r1, #11 <== NOT EXECUTED
abc0: ebfffee9 bl a76c <rtems_bdbuf_lock> <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
abc4: ebffff76 bl a9a4 <rtems_bdbuf_unlock_sync> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
abc8: ebfffef0 bl a790 <rtems_bdbuf_lock_cache> <== NOT EXECUTED
abcc: eaffffd9 b ab38 <rtems_bdbuf_add_to_modified_list_after_access+0x2c><== NOT EXECUTED
0000ad44 <rtems_bdbuf_anonymous_wait>:
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
ad44: e5903000 ldr r3, [r0]
ad48: e2833001 add r3, r3, #1
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
ad4c: e92d4030 push {r4, r5, lr}
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
ad50: e5803000 str r3, [r0]
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
ad54: e1a04000 mov r4, r0
* blocking or just hits that window, and before this task has blocked on the
* semaphore. If the preempting task flushes the queue this task will not see
* the flush and may block for ever or until another transaction flushes this
* semaphore.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
ad58: ebffffd9 bl acc4 <rtems_bdbuf_disable_preemption>
ad5c: e1a05000 mov r5, r0
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
ad60: ebffff05 bl a97c <rtems_bdbuf_unlock_cache>
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
ad64: e3a01000 mov r1, #0
ad68: e5940004 ldr r0, [r4, #4]
ad6c: e1a02001 mov r2, r1
ad70: ebffef68 bl 6b18 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
ad74: e3500006 cmp r0, #6
ad78: 0a000008 beq ada0 <rtems_bdbuf_anonymous_wait+0x5c>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
ad7c: e350000d cmp r0, #13
ad80: 1a000009 bne adac <rtems_bdbuf_anonymous_wait+0x68>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
rtems_bdbuf_lock_cache ();
ad84: ebfffe81 bl a790 <rtems_bdbuf_lock_cache>
rtems_bdbuf_restore_preemption (prev_mode);
ad88: e1a00005 mov r0, r5
ad8c: ebffffdd bl ad08 <rtems_bdbuf_restore_preemption>
--waiters->count;
ad90: e5943000 ldr r3, [r4]
ad94: e2433001 sub r3, r3, #1
ad98: e5843000 str r3, [r4]
}
ad9c: e8bd8030 pop {r4, r5, pc}
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
ada0: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ada4: e2800012 add r0, r0, #18 <== NOT EXECUTED
ada8: ebfff0d3 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
adac: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
adb0: e2800010 add r0, r0, #16 <== NOT EXECUTED
adb4: ebfff0d0 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000acc4 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
acc4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
acc8: e24dd004 sub sp, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
accc: e28d2004 add r2, sp, #4
acd0: e3a03000 mov r3, #0
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
acd4: e3a00c01 mov r0, #256 ; 0x100
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
acd8: e5223004 str r3, [r2, #-4]!
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
acdc: e1a01000 mov r1, r0
ace0: e1a0200d mov r2, sp
ace4: eb00147b bl fed8 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
ace8: e3500000 cmp r0, #0
acec: 1a000002 bne acfc <rtems_bdbuf_disable_preemption+0x38>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
return prev_mode;
}
acf0: e59d0000 ldr r0, [sp]
acf4: e28dd004 add sp, sp, #4
acf8: e8bd8000 pop {pc}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
acfc: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ad00: e280000f add r0, r0, #15 <== NOT EXECUTED
ad04: ebfff0fc bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000c84c <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c84c: e92d40f0 push {r4, r5, r6, r7, lr}
c850: e24dd014 sub sp, sp, #20
rtems_disk_device *dd = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c854: e28de00c add lr, sp, #12
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
c858: e3a0c000 mov ip, #0
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c85c: e58de000 str lr, [sp]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c860: e1a07003 mov r7, r3
rtems_disk_device *dd = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c864: e28de008 add lr, sp, #8
c868: e28d3010 add r3, sp, #16
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
c86c: e58dc008 str ip, [sp, #8]
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c870: e58de004 str lr, [sp, #4]
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
c874: e58dc010 str ip, [sp, #16]
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
c878: e58dc00c str ip, [sp, #12]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c87c: e1a05000 mov r5, r0
c880: e1a06001 mov r6, r1
rtems_disk_device *dd = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c884: ebfff850 bl a9cc <rtems_bdbuf_obtain_disk>
if (sc != RTEMS_SUCCESSFUL)
c888: e2504000 subs r4, r0, #0
c88c: 0a000002 beq c89c <rtems_bdbuf_get+0x50>
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
return RTEMS_SUCCESSFUL;
}
c890: e1a00004 mov r0, r4
c894: e28dd014 add sp, sp, #20
c898: e8bd80f0 pop {r4, r5, r6, r7, pc}
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_bdbuf_lock_cache ();
c89c: ebfff7bb bl a790 <rtems_bdbuf_lock_cache>
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
c8a0: e1a00005 mov r0, r5
c8a4: e59d3008 ldr r3, [sp, #8]
c8a8: e1a01006 mov r1, r6
c8ac: e59d200c ldr r2, [sp, #12]
c8b0: ebffff53 bl c604 <rtems_bdbuf_get_buffer_for_access>
switch (bd->state)
c8b4: e5903024 ldr r3, [r0, #36] ; 0x24
c8b8: e3530002 cmp r3, #2
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
c8bc: e1a05000 mov r5, r0
switch (bd->state)
c8c0: 0a00000f beq c904 <rtems_bdbuf_get+0xb8>
c8c4: e3530007 cmp r3, #7
c8c8: 0a000006 beq c8e8 <rtems_bdbuf_get+0x9c>
c8cc: e3530001 cmp r3, #1
c8d0: 0a00000e beq c910 <rtems_bdbuf_get+0xc4>
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
c8d4: e5900024 ldr r0, [r0, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
c8d8: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
c8dc: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c8e0: e380001e orr r0, r0, #30 <== NOT EXECUTED
c8e4: ebffea04 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c8e8: e3a03004 mov r3, #4
c8ec: e5803024 str r3, [r0, #36] ; 0x24
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
c8f0: ebfff821 bl a97c <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
c8f4: e59d0010 ldr r0, [sp, #16]
c8f8: ebfff871 bl aac4 <rtems_bdbuf_release_disk>
*bd_ptr = bd;
c8fc: e5875000 str r5, [r7]
return RTEMS_SUCCESSFUL;
c900: eaffffe2 b c890 <rtems_bdbuf_get+0x44>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c904: e3a03003 mov r3, #3
c908: e5803024 str r3, [r0, #36] ; 0x24
switch (bd->state)
{
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
c90c: eafffff7 b c8f0 <rtems_bdbuf_get+0xa4>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c910: e3a03005 mov r3, #5
c914: e5803024 str r3, [r0, #36] ; 0x24
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_EMPTY);
break;
c918: eafffff4 b c8f0 <rtems_bdbuf_get+0xa4>
0000c604 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
c604: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
c608: e59f7220 ldr r7, [pc, #544] ; c830 <rtems_bdbuf_get_buffer_for_access+0x22c>
c60c: e1a04000 mov r4, r0
c610: e1a05001 mov r5, r1
c614: e1a06002 mov r6, r2
c618: e1a08003 mov r8, r3
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
c61c: e597a040 ldr sl, [r7, #64] ; 0x40
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
c620: e35a0000 cmp sl, #0
c624: 0a000008 beq c64c <rtems_bdbuf_get_buffer_for_access+0x48>
c628: e59a3014 ldr r3, [sl, #20]
c62c: e1540003 cmp r4, r3
c630: e59a2018 ldr r2, [sl, #24]
c634: 0a000017 beq c698 <rtems_bdbuf_get_buffer_for_access+0x94>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c638: e1550002 cmp r5, r2
c63c: 9a000010 bls c684 <rtems_bdbuf_get_buffer_for_access+0x80>
{
p = p->avl.right;
c640: e59aa00c ldr sl, [sl, #12]
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
c644: e35a0000 cmp sl, #0
c648: 1afffff6 bne c628 <rtems_bdbuf_get_buffer_for_access+0x24>
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
c64c: e1a00004 mov r0, r4
c650: e1a01005 mov r1, r5
c654: e1a02006 mov r2, r6
c658: e1a03008 mov r3, r8
c65c: ebfffeee bl c21c <rtems_bdbuf_get_buffer_from_lru_list>
if (bd == NULL)
c660: e250a000 subs sl, r0, #0
c664: 1a000017 bne c6c8 <rtems_bdbuf_get_buffer_for_access+0xc4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
c668: e5972050 ldr r2, [r7, #80] ; 0x50
c66c: e59f31c0 ldr r3, [pc, #448] ; c834 <rtems_bdbuf_get_buffer_for_access+0x230>
c670: e1520003 cmp r2, r3
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
rtems_bdbuf_wake_swapper ();
c674: 1bfff919 blne aae0 <rtems_bdbuf_wake_swapper>
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
c678: e59f01b8 ldr r0, [pc, #440] ; c838 <rtems_bdbuf_get_buffer_for_access+0x234>
c67c: ebfff9b0 bl ad44 <rtems_bdbuf_anonymous_wait>
c680: eaffffe5 b c61c <rtems_bdbuf_get_buffer_for_access+0x18>
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c684: 1a000001 bne c690 <rtems_bdbuf_get_buffer_for_access+0x8c>
c688: e1540003 cmp r4, r3
c68c: 8affffeb bhi c640 <rtems_bdbuf_get_buffer_for_access+0x3c>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
c690: e59aa008 ldr sl, [sl, #8]
c694: eaffffea b c644 <rtems_bdbuf_get_buffer_for_access+0x40>
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
c698: e1550002 cmp r5, r2
c69c: 1affffe5 bne c638 <rtems_bdbuf_get_buffer_for_access+0x34>
c6a0: e59a301c ldr r3, [sl, #28]
c6a4: e1560003 cmp r6, r3
c6a8: 0a000002 beq c6b8 <rtems_bdbuf_get_buffer_for_access+0xb4>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c6ac: 8affffe3 bhi c640 <rtems_bdbuf_get_buffer_for_access+0x3c>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
c6b0: e59aa008 ldr sl, [sl, #8]
c6b4: eaffffe2 b c644 <rtems_bdbuf_get_buffer_for_access+0x40>
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
c6b8: e59a302c ldr r3, [sl, #44] ; 0x2c
c6bc: e5933008 ldr r3, [r3, #8]
c6c0: e1530008 cmp r3, r8
c6c4: 1a000027 bne c768 <rtems_bdbuf_get_buffer_for_access+0x164>
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
c6c8: e59a3024 ldr r3, [sl, #36] ; 0x24
c6cc: e2433001 sub r3, r3, #1
c6d0: e3530009 cmp r3, #9
c6d4: 979ff103 ldrls pc, [pc, r3, lsl #2]
c6d8: ea00001d b c754 <rtems_bdbuf_get_buffer_for_access+0x150> <== NOT EXECUTED
c6dc: 0000c71c .word 0x0000c71c <== NOT EXECUTED
c6e0: 0000c714 .word 0x0000c714 <== NOT EXECUTED
c6e4: 0000c734 .word 0x0000c734 <== NOT EXECUTED
c6e8: 0000c734 .word 0x0000c734 <== NOT EXECUTED
c6ec: 0000c734 .word 0x0000c734 <== NOT EXECUTED
c6f0: 0000c734 .word 0x0000c734 <== NOT EXECUTED
c6f4: 0000c704 .word 0x0000c704 <== NOT EXECUTED
c6f8: 0000c744 .word 0x0000c744 <== NOT EXECUTED
c6fc: 0000c744 .word 0x0000c744 <== NOT EXECUTED
c700: 0000c744 .word 0x0000c744 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
c704: e59a302c ldr r3, [sl, #44] ; 0x2c
c708: e593200c ldr r2, [r3, #12]
c70c: e2422001 sub r2, r2, #1
c710: e583200c str r2, [r3, #12]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
c714: e1a0000a mov r0, sl
c718: ebffebc0 bl 7620 <_Chain_Extract>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
c71c: e59a302c ldr r3, [sl, #44] ; 0x2c
c720: e593200c ldr r2, [r3, #12]
c724: e2822001 add r2, r2, #1
c728: e583200c str r2, [r3, #12]
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
c72c: e1a0000a mov r0, sl
c730: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
return;
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
c734: e1a0000a mov r0, sl
c738: e59f10fc ldr r1, [pc, #252] ; c83c <rtems_bdbuf_get_buffer_for_access+0x238>
c73c: ebfff99d bl adb8 <rtems_bdbuf_wait>
c740: eaffffe0 b c6c8 <rtems_bdbuf_get_buffer_for_access+0xc4>
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
c744: e1a0000a mov r0, sl
c748: e59f10f0 ldr r1, [pc, #240] ; c840 <rtems_bdbuf_get_buffer_for_access+0x23c>
c74c: ebfff999 bl adb8 <rtems_bdbuf_wait>
c750: eaffffdc b c6c8 <rtems_bdbuf_get_buffer_for_access+0xc4>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
c754: e59a0024 ldr r0, [sl, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
c758: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
c75c: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c760: e3800005 orr r0, r0, #5 <== NOT EXECUTED
c764: ebffea64 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c768: e3a09008 mov r9, #8
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
c76c: e59a3024 ldr r3, [sl, #36] ; 0x24
c770: e353000a cmp r3, #10
c774: 979ff103 ldrls pc, [pc, r3, lsl #2]
c778: ea000027 b c81c <rtems_bdbuf_get_buffer_for_access+0x218> <== NOT EXECUTED
c77c: 0000c7f4 .word 0x0000c7f4 <== NOT EXECUTED
c780: 0000c7e8 .word 0x0000c7e8 <== NOT EXECUTED
c784: 0000c7e8 .word 0x0000c7e8 <== NOT EXECUTED
c788: 0000c7d8 .word 0x0000c7d8 <== NOT EXECUTED
c78c: 0000c7d8 .word 0x0000c7d8 <== NOT EXECUTED
c790: 0000c7d8 .word 0x0000c7d8 <== NOT EXECUTED
c794: 0000c7d8 .word 0x0000c7d8 <== NOT EXECUTED
c798: 0000c7b8 .word 0x0000c7b8 <== NOT EXECUTED
c79c: 0000c7a8 .word 0x0000c7a8 <== NOT EXECUTED
c7a0: 0000c7a8 .word 0x0000c7a8 <== NOT EXECUTED
c7a4: 0000c7a8 .word 0x0000c7a8 <== NOT EXECUTED
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
c7a8: e1a0000a mov r0, sl <== NOT EXECUTED
c7ac: e59f108c ldr r1, [pc, #140] ; c840 <rtems_bdbuf_get_buffer_for_access+0x23c><== NOT EXECUTED
c7b0: ebfff980 bl adb8 <rtems_bdbuf_wait> <== NOT EXECUTED
c7b4: eaffffec b c76c <rtems_bdbuf_get_buffer_for_access+0x168> <== NOT EXECUTED
c7b8: e1a0000a mov r0, sl <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c7bc: e58a9024 str r9, [sl, #36] ; 0x24 <== NOT EXECUTED
c7c0: ebffeb96 bl 7620 <_Chain_Extract> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
c7c4: e59f0078 ldr r0, [pc, #120] ; c844 <rtems_bdbuf_get_buffer_for_access+0x240><== NOT EXECUTED
c7c8: e1a0100a mov r1, sl <== NOT EXECUTED
c7cc: ebffeb88 bl 75f4 <_Chain_Append> <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
c7d0: ebfff8c2 bl aae0 <rtems_bdbuf_wake_swapper> <== NOT EXECUTED
c7d4: eaffffe4 b c76c <rtems_bdbuf_get_buffer_for_access+0x168> <== NOT EXECUTED
}
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
c7d8: e1a0000a mov r0, sl
c7dc: e59f1058 ldr r1, [pc, #88] ; c83c <rtems_bdbuf_get_buffer_for_access+0x238>
c7e0: ebfff974 bl adb8 <rtems_bdbuf_wait>
c7e4: eaffffe0 b c76c <rtems_bdbuf_get_buffer_for_access+0x168>
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
c7e8: e59a3028 ldr r3, [sl, #40] ; 0x28
c7ec: e3530000 cmp r3, #0
c7f0: 1affffa0 bne c678 <rtems_bdbuf_get_buffer_for_access+0x74>
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
c7f4: e1a0000a mov r0, sl <== NOT EXECUTED
c7f8: ebfffb64 bl b590 <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c7fc: e3a03000 mov r3, #0 <== NOT EXECUTED
c800: e58a3024 str r3, [sl, #36] ; 0x24 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
c804: e1a0100a mov r1, sl <== NOT EXECUTED
c808: e59f0038 ldr r0, [pc, #56] ; c848 <rtems_bdbuf_get_buffer_for_access+0x244><== NOT EXECUTED
c80c: eb000edf bl 10390 <_Chain_Insert> <== NOT EXECUTED
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
c810: e59f0020 ldr r0, [pc, #32] ; c838 <rtems_bdbuf_get_buffer_for_access+0x234><== NOT EXECUTED
c814: ebfff7e3 bl a7a8 <rtems_bdbuf_wake> <== NOT EXECUTED
c818: eaffff7f b c61c <rtems_bdbuf_get_buffer_for_access+0x18> <== NOT EXECUTED
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
c81c: e59a0024 ldr r0, [sl, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
c820: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
c824: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c828: e3800006 orr r0, r0, #6 <== NOT EXECUTED
c82c: ebffea32 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000c21c <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
c21c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
c220: e59fc3cc ldr ip, [pc, #972] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
c224: e59c4044 ldr r4, [ip, #68] ; 0x44
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
c228: e59fc3c8 ldr ip, [pc, #968] ; c5f8 <rtems_bdbuf_get_buffer_from_lru_list+0x3dc>
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
c22c: e24dd088 sub sp, sp, #136 ; 0x88
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
c230: e154000c cmp r4, ip
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
c234: e58d0004 str r0, [sp, #4]
c238: e1a05001 mov r5, r1
c23c: e58d2000 str r2, [sp]
c240: e1a0b003 mov fp, r3
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
c244: 0a00003a beq c334 <rtems_bdbuf_get_buffer_from_lru_list+0x118>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c248: e3a09000 mov r9, #0
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
c24c: e5943028 ldr r3, [r4, #40] ; 0x28
c250: e3530000 cmp r3, #0
c254: 1a000032 bne c324 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
{
if (bd->group->bds_per_group == bds_per_group)
c258: e594802c ldr r8, [r4, #44] ; 0x2c
c25c: e5981008 ldr r1, [r8, #8]
c260: e151000b cmp r1, fp
c264: 0a000036 beq c344 <rtems_bdbuf_get_buffer_from_lru_list+0x128>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
c268: e598a00c ldr sl, [r8, #12]
c26c: e35a0000 cmp sl, #0
c270: 1a00002b bne c324 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
c274: e5987010 ldr r7, [r8, #16]
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
c278: e59f3374 ldr r3, [pc, #884] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
for (b = 0, bd = group->bdbuf;
c27c: e3510000 cmp r1, #0
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
c280: e5930020 ldr r0, [r3, #32]
for (b = 0, bd = group->bdbuf;
c284: e1a06007 mov r6, r7
c288: 0a00000c beq c2c0 <rtems_bdbuf_get_buffer_from_lru_list+0xa4>
c28c: eb0041fe bl 1ca8c <__aeabi_uidiv>
c290: e1a06100 lsl r6, r0, #2
c294: e0666300 rsb r6, r6, r0, lsl #6
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
c298: e1a00007 mov r0, r7
c29c: ebfffcbb bl b590 <rtems_bdbuf_remove_from_tree_and_lru_list>
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
c2a0: e5983008 ldr r3, [r8, #8]
b < group->bds_per_group;
b++, bd += bufs_per_bd)
c2a4: e28aa001 add sl, sl, #1
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
c2a8: e15a0003 cmp sl, r3
b < group->bds_per_group;
b++, bd += bufs_per_bd)
c2ac: e0877006 add r7, r7, r6
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
c2b0: 3afffff8 bcc c298 <rtems_bdbuf_get_buffer_from_lru_list+0x7c>
c2b4: e59fc338 ldr ip, [pc, #824] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
c2b8: e5986010 ldr r6, [r8, #16]
c2bc: e59c0020 ldr r0, [ip, #32]
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
c2c0: e35b0001 cmp fp, #1
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
c2c4: e588b008 str fp, [r8, #8]
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
c2c8: e1a02006 mov r2, r6
c2cc: 9a000012 bls c31c <rtems_bdbuf_get_buffer_from_lru_list+0x100>
c2d0: e1a0100b mov r1, fp
c2d4: eb0041ec bl 1ca8c <__aeabi_uidiv>
c2d8: e1a0a100 lsl sl, r0, #2
c2dc: e06aa300 rsb sl, sl, r0, lsl #6
c2e0: e086600a add r6, r6, sl
c2e4: e3a07001 mov r7, #1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c2e8: e5869024 str r9, [r6, #36] ; 0x24
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
c2ec: e1a01006 mov r1, r6
c2f0: e59f0304 ldr r0, [pc, #772] ; c5fc <rtems_bdbuf_get_buffer_from_lru_list+0x3e0>
c2f4: eb001025 bl 10390 <_Chain_Insert>
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
c2f8: e5983008 ldr r3, [r8, #8]
b < group->bds_per_group;
b++, bd += bufs_per_bd)
c2fc: e2877001 add r7, r7, #1
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
c300: e1570003 cmp r7, r3
b < group->bds_per_group;
b++, bd += bufs_per_bd)
c304: e086600a add r6, r6, sl
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
c308: 3afffff6 bcc c2e8 <rtems_bdbuf_get_buffer_from_lru_list+0xcc>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
c30c: e3570001 cmp r7, #1
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
c310: 859f02e8 ldrhi r0, [pc, #744] ; c600 <rtems_bdbuf_get_buffer_from_lru_list+0x3e4>
c314: 8bfff923 blhi a7a8 <rtems_bdbuf_wake>
c318: e5982010 ldr r2, [r8, #16]
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
c31c: e3520000 cmp r2, #0
c320: 1a00000c bne c358 <rtems_bdbuf_get_buffer_from_lru_list+0x13c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
c324: e5944000 ldr r4, [r4]
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
c328: e59f12c8 ldr r1, [pc, #712] ; c5f8 <rtems_bdbuf_get_buffer_from_lru_list+0x3dc>
c32c: e1540001 cmp r4, r1
c330: 1affffc5 bne c24c <rtems_bdbuf_get_buffer_from_lru_list+0x30>
c334: e3a02000 mov r2, #0
node = rtems_chain_next (node);
}
return NULL;
}
c338: e1a00002 mov r0, r2
c33c: e28dd088 add sp, sp, #136 ; 0x88
c340: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
*/
if (bd->waiters == 0)
{
if (bd->group->bds_per_group == bds_per_group)
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
c344: e1a00004 mov r0, r4
c348: ebfffc90 bl b590 <rtems_bdbuf_remove_from_tree_and_lru_list>
c34c: e1a02004 mov r2, r4
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
c350: e3520000 cmp r2, #0
c354: 0afffff2 beq c324 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
c358: e3a01000 mov r1, #0
c35c: e5821008 str r1, [r2, #8]
bd->avl.right = NULL;
c360: e582100c str r1, [r2, #12]
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
c364: e59f0288 ldr r0, [pc, #648] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
c368: e5903040 ldr r3, [r0, #64] ; 0x40
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
c36c: e5821028 str r1, [r2, #40] ; 0x28
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
c370: e1530001 cmp r3, r1
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
c374: e59dc000 ldr ip, [sp]
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
c378: e59d1004 ldr r1, [sp, #4]
c37c: e5825018 str r5, [r2, #24]
c380: e5821014 str r1, [r2, #20]
bd->block = block;
c384: e582c01c str ip, [r2, #28]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
c388: 0a000093 beq c5dc <rtems_bdbuf_get_buffer_from_lru_list+0x3c0>
c38c: e28d7008 add r7, sp, #8
c390: e1a0c007 mov ip, r7
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
c394: e3e08000 mvn r8, #0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
c398: e3a06001 mov r6, #1
c39c: e59da000 ldr sl, [sp]
c3a0: e1a04001 mov r4, r1
c3a4: ea00000a b c3d4 <rtems_bdbuf_get_buffer_from_lru_list+0x1b8>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c3a8: 1a000001 bne c3b4 <rtems_bdbuf_get_buffer_from_lru_list+0x198>
c3ac: e1540009 cmp r4, r9
c3b0: 8a00000d bhi c3ec <rtems_bdbuf_get_buffer_from_lru_list+0x1d0>
c3b4: e1540009 cmp r4, r9
c3b8: 0a000059 beq c524 <rtems_bdbuf_get_buffer_from_lru_list+0x308>
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
c3bc: e5930008 ldr r0, [r3, #8]
if (q == NULL)
c3c0: e3500000 cmp r0, #0
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
c3c4: e5c38010 strb r8, [r3, #16]
q = p->avl.left;
if (q == NULL)
c3c8: 0a000081 beq c5d4 <rtems_bdbuf_get_buffer_from_lru_list+0x3b8>
{
q = node;
p->avl.left = q;
c3cc: e1a0c001 mov ip, r1
c3d0: e1a03000 mov r3, r0
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c3d4: e5930018 ldr r0, [r3, #24]
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
c3d8: e1a0100c mov r1, ip
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c3dc: e1550000 cmp r5, r0
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
c3e0: e4813004 str r3, [r1], #4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c3e4: e5939014 ldr r9, [r3, #20]
c3e8: 9affffee bls c3a8 <rtems_bdbuf_get_buffer_from_lru_list+0x18c>
{
p->avl.cache = 1;
q = p->avl.right;
c3ec: e593000c ldr r0, [r3, #12]
if (q == NULL)
c3f0: e3500000 cmp r0, #0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
c3f4: e5c36010 strb r6, [r3, #16]
q = p->avl.right;
if (q == NULL)
c3f8: 1afffff3 bne c3cc <rtems_bdbuf_get_buffer_from_lru_list+0x1b0>
{
q = node;
p->avl.right = q = node;
c3fc: e583200c str r2, [r3, #12]
}
p = q;
}
q->avl.left = q->avl.right = NULL;
c400: e3a05000 mov r5, #0
c404: e582500c str r5, [r2, #12]
c408: e5825008 str r5, [r2, #8]
q->avl.bal = 0;
c40c: e5c25011 strb r5, [r2, #17]
c410: e1d301d0 ldrsb r0, [r3, #16]
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
c414: e3a06001 mov r6, #1
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
c418: e3e08000 mvn r8, #0
c41c: ea000015 b c478 <rtems_bdbuf_get_buffer_from_lru_list+0x25c>
break;
}
}
else
{
switch (p->avl.bal)
c420: e1d311d1 ldrsb r1, [r3, #17]
c424: e3510000 cmp r1, #0
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
c428: 05c36011 strbeq r6, [r3, #17]
c42c: 01a01003 moveq r1, r3
c430: 03a04001 moveq r4, #1
break;
}
}
else
{
switch (p->avl.bal)
c434: 0a000005 beq c450 <rtems_bdbuf_get_buffer_from_lru_list+0x234>
c438: e3510001 cmp r1, #1
c43c: 0a000045 beq c558 <rtems_bdbuf_get_buffer_from_lru_list+0x33c>
c440: e3710001 cmn r1, #1
c444: 0a00003f beq c548 <rtems_bdbuf_get_buffer_from_lru_list+0x32c>
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
c448: e1a01003 mov r1, r3 <== NOT EXECUTED
c44c: e3a04001 mov r4, #1 <== NOT EXECUTED
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
c450: e157000c cmp r7, ip
c454: 2a00002d bcs c510 <rtems_bdbuf_get_buffer_from_lru_list+0x2f4>
{
p = *--buf_prev;
c458: e51c3004 ldr r3, [ip, #-4]
if (p->avl.cache == -1)
c45c: e1d301d0 ldrsb r0, [r3, #16]
c460: e3700001 cmn r0, #1
{
p->avl.left = q;
c464: 05831008 streq r1, [r3, #8]
}
else
{
p->avl.right = q;
c468: 1583100c strne r1, [r3, #12]
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
c46c: e3540000 cmp r4, #0
p->avl.right = q;
}
}
else
{
*root = p;
c470: e24cc004 sub ip, ip, #4
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
c474: 0a000027 beq c518 <rtems_bdbuf_get_buffer_from_lru_list+0x2fc>
{
if (p->avl.cache == -1)
c478: e3700001 cmn r0, #1
c47c: 1affffe7 bne c420 <rtems_bdbuf_get_buffer_from_lru_list+0x204>
{
switch (p->avl.bal)
c480: e1d311d1 ldrsb r1, [r3, #17]
c484: e3510000 cmp r1, #0
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
c488: 05c30011 strbeq r0, [r3, #17]
c48c: 01a01003 moveq r1, r3
c490: 03a04001 moveq r4, #1
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
c494: 0affffed beq c450 <rtems_bdbuf_get_buffer_from_lru_list+0x234>
c498: e3510001 cmp r1, #1
c49c: 0a000029 beq c548 <rtems_bdbuf_get_buffer_from_lru_list+0x32c>
c4a0: e3710001 cmn r1, #1
c4a4: 1affffe7 bne c448 <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
c4a8: e5931008 ldr r1, [r3, #8]
if (p1->avl.bal == -1) /* simple LL-turn */
c4ac: e1d101d1 ldrsb r0, [r1, #17]
c4b0: e3700001 cmn r0, #1
c4b4: 0a000041 beq c5c0 <rtems_bdbuf_get_buffer_from_lru_list+0x3a4>
p->avl.bal = 0;
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
c4b8: e591000c ldr r0, [r1, #12]
p1->avl.right = p2->avl.left;
c4bc: e5904008 ldr r4, [r0, #8]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
c4c0: e1d0a1d1 ldrsb sl, [r0, #17]
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
c4c4: e581400c str r4, [r1, #12]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
c4c8: e37a0001 cmn sl, #1
c4cc: 05c36011 strbeq r6, [r3, #17]
c4d0: 15c35011 strbne r5, [r3, #17]
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
c4d4: e590400c ldr r4, [r0, #12]
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
c4d8: e5801008 str r1, [r0, #8]
p->avl.left = p2->avl.right;
p2->avl.right = p;
c4dc: e580300c str r3, [r0, #12]
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
c4e0: e5834008 str r4, [r3, #8]
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
c4e4: e1d031d1 ldrsb r3, [r0, #17]
c4e8: e3530001 cmp r3, #1
c4ec: 05c18011 strbeq r8, [r1, #17]
c4f0: 01a01000 moveq r1, r0
c4f4: 0a000001 beq c500 <rtems_bdbuf_get_buffer_from_lru_list+0x2e4>
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
c4f8: e5c15011 strb r5, [r1, #17]
c4fc: e1a01000 mov r1, r0
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
c500: e157000c cmp r7, ip
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
c504: e5c15011 strb r5, [r1, #17]
c508: e3a04000 mov r4, #0
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
c50c: 3affffd1 bcc c458 <rtems_bdbuf_get_buffer_from_lru_list+0x23c>
p->avl.right = q;
}
}
else
{
*root = p;
c510: e59f00dc ldr r0, [pc, #220] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
c514: e5801040 str r1, [r0, #64] ; 0x40
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c518: e3a03001 mov r3, #1
c51c: e5823024 str r3, [r2, #36] ; 0x24
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dev, block);
return empty_bd;
c520: eaffff84 b c338 <rtems_bdbuf_get_buffer_from_lru_list+0x11c>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
c524: e1550000 cmp r5, r0
c528: 1affffa3 bne c3bc <rtems_bdbuf_get_buffer_from_lru_list+0x1a0>
c52c: e593001c ldr r0, [r3, #28]
c530: e15a0000 cmp sl, r0
c534: 8affffac bhi c3ec <rtems_bdbuf_get_buffer_from_lru_list+0x1d0>
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dev != dev) || (p->block != block))
c538: 1affff9f bne c3bc <rtems_bdbuf_get_buffer_from_lru_list+0x1a0>
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
c53c: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c540: e280001b add r0, r0, #27 <== NOT EXECUTED
c544: ebffeaec bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
c548: e5c35011 strb r5, [r3, #17]
c54c: e1a01003 mov r1, r3
c550: e3a04000 mov r4, #0
c554: eaffffbd b c450 <rtems_bdbuf_get_buffer_from_lru_list+0x234>
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
c558: e593100c ldr r1, [r3, #12]
if (p1->avl.bal == 1) /* simple RR-turn */
c55c: e1d101d1 ldrsb r0, [r1, #17]
c560: e3500001 cmp r0, #1
c564: 0a000010 beq c5ac <rtems_bdbuf_get_buffer_from_lru_list+0x390>
p->avl.bal = 0;
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
c568: e5910008 ldr r0, [r1, #8] <== NOT EXECUTED
p1->avl.left = p2->avl.right;
c56c: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
c570: e1d0a1d1 ldrsb sl, [r0, #17] <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
c574: e5814008 str r4, [r1, #8] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
c578: e35a0001 cmp sl, #1 <== NOT EXECUTED
c57c: 05c38011 strbeq r8, [r3, #17] <== NOT EXECUTED
c580: 15c35011 strbne r5, [r3, #17] <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
c584: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
c588: e580100c str r1, [r0, #12] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
c58c: e5803008 str r3, [r0, #8] <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
c590: e583400c str r4, [r3, #12] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
c594: e1d031d1 ldrsb r3, [r0, #17] <== NOT EXECUTED
c598: e3730001 cmn r3, #1 <== NOT EXECUTED
c59c: 05c16011 strbeq r6, [r1, #17] <== NOT EXECUTED
c5a0: 01a01000 moveq r1, r0 <== NOT EXECUTED
c5a4: 1affffd3 bne c4f8 <rtems_bdbuf_get_buffer_from_lru_list+0x2dc><== NOT EXECUTED
c5a8: eaffffd4 b c500 <rtems_bdbuf_get_buffer_from_lru_list+0x2e4><== NOT EXECUTED
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
c5ac: e5910008 ldr r0, [r1, #8]
p1->avl.left = p;
p->avl.bal = 0;
c5b0: e5c35011 strb r5, [r3, #17]
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
c5b4: e583000c str r0, [r3, #12]
p1->avl.left = p;
c5b8: e5813008 str r3, [r1, #8]
c5bc: eaffffcf b c500 <rtems_bdbuf_get_buffer_from_lru_list+0x2e4>
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
c5c0: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
p1->avl.right = p;
p->avl.bal = 0;
c5c4: e5c35011 strb r5, [r3, #17] <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
c5c8: e5830008 str r0, [r3, #8] <== NOT EXECUTED
p1->avl.right = p;
c5cc: e581300c str r3, [r1, #12] <== NOT EXECUTED
c5d0: eaffffca b c500 <rtems_bdbuf_get_buffer_from_lru_list+0x2e4><== NOT EXECUTED
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
c5d4: e5832008 str r2, [r3, #8]
c5d8: eaffff88 b c400 <rtems_bdbuf_get_buffer_from_lru_list+0x1e4>
bool modified = false;
if (p == NULL)
{
*root = node;
c5dc: e59f1010 ldr r1, [pc, #16] ; c5f4 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
c5e0: e5812040 str r2, [r1, #64] ; 0x40
node->avl.left = NULL;
node->avl.right = NULL;
node->avl.bal = 0;
c5e4: e5c23011 strb r3, [r2, #17]
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
c5e8: e5823008 str r3, [r2, #8]
node->avl.right = NULL;
c5ec: e582300c str r3, [r2, #12]
c5f0: eaffffc8 b c518 <rtems_bdbuf_get_buffer_from_lru_list+0x2fc>
0000ae04 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
ae04: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
ae08: e59f339c ldr r3, [pc, #924] ; b1ac <rtems_bdbuf_init+0x3a8>
ae0c: e5933000 ldr r3, [r3]
ae10: e3530000 cmp r3, #0
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
ae14: e24dd008 sub sp, sp, #8
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
ae18: 13a00012 movne r0, #18
ae1c: 1a000008 bne ae44 <rtems_bdbuf_init+0x40>
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
ae20: e59f5388 ldr r5, [pc, #904] ; b1b0 <rtems_bdbuf_init+0x3ac>
ae24: e2856020 add r6, r5, #32
ae28: e8960140 ldm r6, {r6, r8}
ae2c: e1a00008 mov r0, r8
ae30: e1a01006 mov r1, r6
ae34: eb004758 bl 1cb9c <__umodsi3>
ae38: e3500000 cmp r0, #0
ae3c: 13a0000a movne r0, #10
ae40: 0a000001 beq ae4c <rtems_bdbuf_init+0x48>
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
ae44: e28dd008 add sp, sp, #8
ae48: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
ae4c: ebffff9c bl acc4 <rtems_bdbuf_disable_preemption>
if (bdbuf_cache.initialised)
ae50: e59f435c ldr r4, [pc, #860] ; b1b4 <rtems_bdbuf_init+0x3b0>
ae54: e5d47088 ldrb r7, [r4, #136] ; 0x88
ae58: e3570000 cmp r7, #0
/*
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
ae5c: e1a0a000 mov sl, r0
if (bdbuf_cache.initialised)
ae60: 0a000002 beq ae70 <rtems_bdbuf_init+0x6c>
{
rtems_bdbuf_restore_preemption (prev_mode);
ae64: ebffffa7 bl ad08 <rtems_bdbuf_restore_preemption> <== NOT EXECUTED
ae68: e3a0000c mov r0, #12 <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
ae6c: eafffff4 b ae44 <rtems_bdbuf_init+0x40> <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
ae70: e1a01007 mov r1, r7
ae74: e3a0208c mov r2, #140 ; 0x8c
ae78: e1a00004 mov r0, r4
ae7c: eb00242c bl 13f34 <memset>
bdbuf_cache.initialised = true;
rtems_bdbuf_restore_preemption (prev_mode);
ae80: e1a0000a mov r0, sl
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
ae84: e3a0a001 mov sl, #1
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
ae88: e3e0b000 mvn fp, #0
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
ae8c: e5c4a088 strb sl, [r4, #136] ; 0x88
rtems_bdbuf_restore_preemption (prev_mode);
ae90: ebffff9c bl ad08 <rtems_bdbuf_restore_preemption>
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
ae94: e3e0c000 mvn ip, #0
ae98: e584b038 str fp, [r4, #56] ; 0x38
ae9c: e584c03c str ip, [r4, #60] ; 0x3c
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aea0: e59fc310 ldr ip, [pc, #784] ; b1b8 <rtems_bdbuf_init+0x3b4>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
aea4: e59fb310 ldr fp, [pc, #784] ; b1bc <rtems_bdbuf_init+0x3b8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aea8: e584c008 str ip, [r4, #8]
aeac: e59fc30c ldr ip, [pc, #780] ; b1c0 <rtems_bdbuf_init+0x3bc>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
aeb0: e584b04c str fp, [r4, #76] ; 0x4c
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aeb4: e584c050 str ip, [r4, #80] ; 0x50
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
aeb8: e59fb304 ldr fp, [pc, #772] ; b1c4 <rtems_bdbuf_init+0x3c0>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aebc: e59fc304 ldr ip, [pc, #772] ; b1c8 <rtems_bdbuf_init+0x3c4>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
aec0: e584b058 str fp, [r4, #88] ; 0x58
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aec4: e584c05c str ip, [r4, #92] ; 0x5c
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
aec8: e59fb2fc ldr fp, [pc, #764] ; b1cc <rtems_bdbuf_init+0x3c8>
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
aecc: e59fc2fc ldr ip, [pc, #764] ; b1d0 <rtems_bdbuf_init+0x3cc>
aed0: e1a03007 mov r3, r7
aed4: e284e008 add lr, r4, #8
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aed8: e2849048 add r9, r4, #72 ; 0x48
aedc: e59f02f0 ldr r0, [pc, #752] ; b1d4 <rtems_bdbuf_init+0x3d0>
aee0: e1a0100a mov r1, sl
aee4: e3a02054 mov r2, #84 ; 0x54
the_chain->permanent_null = NULL;
aee8: e584700c str r7, [r4, #12]
aeec: e5847048 str r7, [r4, #72] ; 0x48
aef0: e5847054 str r7, [r4, #84] ; 0x54
aef4: e5847060 str r7, [r4, #96] ; 0x60
the_chain->last = _Chain_Head(the_chain);
aef8: e584e010 str lr, [r4, #16]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
aefc: e5849044 str r9, [r4, #68] ; 0x44
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
af00: e584b064 str fp, [r4, #100] ; 0x64
af04: e58dc000 str ip, [sp]
af08: ebffee67 bl 68ac <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
af0c: e2507000 subs r7, r0, #0
af10: 0a00001e beq af90 <rtems_bdbuf_init+0x18c>
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
af14: e5940000 ldr r0, [r4] <== NOT EXECUTED
af18: e3500000 cmp r0, #0 <== NOT EXECUTED
af1c: 1a000014 bne af74 <rtems_bdbuf_init+0x170> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
af20: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
af24: ebffe075 bl 3100 <free> <== NOT EXECUTED
free (bdbuf_cache.groups);
af28: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
af2c: ebffe073 bl 3100 <free> <== NOT EXECUTED
free (bdbuf_cache.bds);
af30: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
af34: ebffe071 bl 3100 <free> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
af38: e594007c ldr r0, [r4, #124] ; 0x7c <== NOT EXECUTED
af3c: ebffeecc bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
af40: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
af44: ebffeeca bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
af48: e5940074 ldr r0, [r4, #116] ; 0x74 <== NOT EXECUTED
af4c: ebffeec8 bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
af50: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
af54: ebffeec6 bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
af58: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
af5c: e3530000 cmp r3, #0 <== NOT EXECUTED
af60: 1a000005 bne af7c <rtems_bdbuf_init+0x178> <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
af64: e3a03000 mov r3, #0 <== NOT EXECUTED
af68: e5c43088 strb r3, [r4, #136] ; 0x88 <== NOT EXECUTED
af6c: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
af70: eaffffb3 b ae44 <rtems_bdbuf_init+0x40> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
af74: ebffefa7 bl 6e18 <rtems_task_delete> <== NOT EXECUTED
af78: eaffffe8 b af20 <rtems_bdbuf_init+0x11c> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
af7c: ebfffe7e bl a97c <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
af80: e59f322c ldr r3, [pc, #556] ; b1b4 <rtems_bdbuf_init+0x3b0><== NOT EXECUTED
af84: e5930028 ldr r0, [r3, #40] ; 0x28 <== NOT EXECUTED
af88: ebffeeb9 bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
af8c: eafffff4 b af64 <rtems_bdbuf_init+0x160> <== NOT EXECUTED
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
af90: ebfffdfe bl a790 <rtems_bdbuf_lock_cache>
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
af94: e1a0100a mov r1, sl
af98: e284c02c add ip, r4, #44 ; 0x2c
af9c: e1a03007 mov r3, r7
afa0: e59f0230 ldr r0, [pc, #560] ; b1d8 <rtems_bdbuf_init+0x3d4>
afa4: e3a02054 mov r2, #84 ; 0x54
afa8: e58dc000 str ip, [sp]
afac: ebffee3e bl 68ac <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
afb0: e2501000 subs r1, r0, #0
afb4: 1affffd6 bne af14 <rtems_bdbuf_init+0x110>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
afb8: e284c06c add ip, r4, #108 ; 0x6c
afbc: e1a03001 mov r3, r1
afc0: e59f0214 ldr r0, [pc, #532] ; b1dc <rtems_bdbuf_init+0x3d8>
afc4: e3a02024 mov r2, #36 ; 0x24
afc8: e58dc000 str ip, [sp]
afcc: ebffee36 bl 68ac <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
afd0: e2501000 subs r1, r0, #0
afd4: 1affffce bne af14 <rtems_bdbuf_init+0x110>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
afd8: e284c074 add ip, r4, #116 ; 0x74
afdc: e1a03001 mov r3, r1
afe0: e59f01f8 ldr r0, [pc, #504] ; b1e0 <rtems_bdbuf_init+0x3dc>
afe4: e3a02024 mov r2, #36 ; 0x24
afe8: e58dc000 str ip, [sp]
afec: ebffee2e bl 68ac <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
aff0: e2501000 subs r1, r0, #0
aff4: 1affffc6 bne af14 <rtems_bdbuf_init+0x110>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
aff8: e284c07c add ip, r4, #124 ; 0x7c
affc: e59f01e0 ldr r0, [pc, #480] ; b1e4 <rtems_bdbuf_init+0x3e0>
b000: e3a02024 mov r2, #36 ; 0x24
b004: e1a03001 mov r3, r1
b008: e58dc000 str ip, [sp]
b00c: ebffee26 bl 68ac <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
b010: e3500000 cmp r0, #0
b014: 1affffbe bne af14 <rtems_bdbuf_init+0x110>
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
b018: e595001c ldr r0, [r5, #28]
b01c: e1a01006 mov r1, r6
b020: eb004699 bl 1ca8c <__aeabi_uidiv>
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
b024: e1a01006 mov r1, r6
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
b028: e1a07000 mov r7, r0
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
b02c: e1a00008 mov r0, r8
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
b030: e584701c str r7, [r4, #28]
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
b034: eb004694 bl 1ca8c <__aeabi_uidiv>
b038: e1a03000 mov r3, r0
bdbuf_cache.group_count =
b03c: e1a01000 mov r1, r0
b040: e1a00007 mov r0, r7
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
b044: e5843020 str r3, [r4, #32]
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
b048: eb00468f bl 1ca8c <__aeabi_uidiv>
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
b04c: e1a01007 mov r1, r7
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
b050: e5840080 str r0, [r4, #128] ; 0x80
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
b054: e3a0003c mov r0, #60 ; 0x3c
b058: ebffdf92 bl 2ea8 <calloc>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
b05c: e3500000 cmp r0, #0
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
b060: e5840014 str r0, [r4, #20]
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
b064: 0affffaa beq af14 <rtems_bdbuf_init+0x110>
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
b068: e3a00014 mov r0, #20
b06c: e5941080 ldr r1, [r4, #128] ; 0x80
b070: ebffdf8c bl 2ea8 <calloc>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
b074: e3500000 cmp r0, #0
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
b078: e5840084 str r0, [r4, #132] ; 0x84
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
b07c: 0affffa4 beq af14 <rtems_bdbuf_init+0x110>
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
b080: e594201c ldr r2, [r4, #28]
b084: e59f7128 ldr r7, [pc, #296] ; b1b4 <rtems_bdbuf_init+0x3b0>
b088: e0020296 mul r2, r6, r2
b08c: e2870018 add r0, r7, #24
b090: e3a01020 mov r1, #32
b094: eb0010b9 bl f380 <rtems_memalign>
b098: e3500000 cmp r0, #0
b09c: 1affff9c bne af14 <rtems_bdbuf_init+0x110>
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
b0a0: e5979084 ldr r9, [r7, #132] ; 0x84
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b0a4: e5978014 ldr r8, [r7, #20]
b0a8: e5977018 ldr r7, [r7, #24]
b0ac: e1a0a000 mov sl, r0
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
b0b0: e594301c ldr r3, [r4, #28]
b0b4: e15a0003 cmp sl, r3
b0b8: e59f30f4 ldr r3, [pc, #244] ; b1b4 <rtems_bdbuf_init+0x3b0>
b0bc: e1a01008 mov r1, r8
b0c0: e2830044 add r0, r3, #68 ; 0x44
b0c4: 2a000012 bcs b114 <rtems_bdbuf_init+0x310>
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
b0c8: e3e02000 mvn r2, #0
b0cc: e3e03000 mvn r3, #0
b0d0: e5882014 str r2, [r8, #20]
b0d4: e5883018 str r3, [r8, #24]
bd->group = group;
b0d8: e588902c str r9, [r8, #44] ; 0x2c
bd->buffer = buffer;
b0dc: e5887020 str r7, [r8, #32]
b0e0: ebfff143 bl 75f4 <_Chain_Append>
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
b0e4: e59f30c8 ldr r3, [pc, #200] ; b1b4 <rtems_bdbuf_init+0x3b0>
b0e8: e593b020 ldr fp, [r3, #32]
b0ec: e1a0000a mov r0, sl
b0f0: e1a0100b mov r1, fp
b0f4: eb0046a8 bl 1cb9c <__umodsi3>
b0f8: e24bb001 sub fp, fp, #1
b0fc: e150000b cmp r0, fp
(bdbuf_cache.max_bds_per_group - 1))
group++;
b100: 02899014 addeq r9, r9, #20
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
b104: e28aa001 add sl, sl, #1
b108: e288803c add r8, r8, #60 ; 0x3c
b10c: e0877006 add r7, r7, r6
b110: eaffffe6 b b0b0 <rtems_bdbuf_init+0x2ac>
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
b114: e5930020 ldr r0, [r3, #32]
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
b118: e3a0203c mov r2, #60 ; 0x3c
b11c: e00e0092 mul lr, r2, r0
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b120: e5931014 ldr r1, [r3, #20]
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
b124: e5932084 ldr r2, [r3, #132] ; 0x84
bd = bdbuf_cache.bds;
b128: e593c080 ldr ip, [r3, #128] ; 0x80
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
b12c: e3a03000 mov r3, #0
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
b130: e153000c cmp r3, ip
b134: 2a000005 bcs b150 <rtems_bdbuf_init+0x34c>
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
b138: e5821010 str r1, [r2, #16]
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
b13c: e5820008 str r0, [r2, #8]
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
b140: e2833001 add r3, r3, #1
group++,
b144: e2822014 add r2, r2, #20
bd += bdbuf_cache.max_bds_per_group)
b148: e081100e add r1, r1, lr
b14c: eafffff7 b b130 <rtems_bdbuf_init+0x32c>
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
b150: e5951008 ldr r1, [r5, #8]
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
b154: e3a0c001 mov ip, #1
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
b158: e3510000 cmp r1, #0
b15c: 03a0100f moveq r1, #15
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
b160: e5c4c004 strb ip, [r4, #4]
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
b164: e59f007c ldr r0, [pc, #124] ; b1e8 <rtems_bdbuf_init+0x3e4>
b168: e3a0c000 mov ip, #0
b16c: e3a02a02 mov r2, #8192 ; 0x2000
b170: e3a03b01 mov r3, #1024 ; 0x400
b174: e58dc000 str ip, [sp]
b178: e58d4004 str r4, [sp, #4]
b17c: ebffeed7 bl 6ce0 <rtems_task_create>
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
b180: e3500000 cmp r0, #0
b184: 1affff62 bne af14 <rtems_bdbuf_init+0x110>
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
b188: e5940000 ldr r0, [r4]
b18c: e59f1058 ldr r1, [pc, #88] ; b1ec <rtems_bdbuf_init+0x3e8>
b190: e1a02004 mov r2, r4
b194: ebffef63 bl 6f28 <rtems_task_start>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
b198: e2505000 subs r5, r0, #0
b19c: 1affff5c bne af14 <rtems_bdbuf_init+0x110>
goto error;
rtems_bdbuf_unlock_cache ();
b1a0: ebfffdf5 bl a97c <rtems_bdbuf_unlock_cache>
b1a4: e1a00005 mov r0, r5
return RTEMS_SUCCESSFUL;
b1a8: eaffff25 b ae44 <rtems_bdbuf_init+0x40>
0000a76c <rtems_bdbuf_lock>:
* @param lock The mutex to lock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
a76c: e92d4010 push {r4, lr}
a770: e1a04001 mov r4, r1
rtems_status_code sc = rtems_semaphore_obtain (lock,
a774: e3a01000 mov r1, #0
a778: e1a02001 mov r2, r1
a77c: ebfff0e5 bl 6b18 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a780: e3500000 cmp r0, #0
a784: 08bd8010 popeq {r4, pc}
rtems_fatal_error_occurred (fatal_error_code);
a788: e1a00004 mov r0, r4 <== NOT EXECUTED
a78c: ebfff25a bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a9cc <rtems_bdbuf_obtain_disk>:
rtems_bdbuf_obtain_disk (dev_t dev,
rtems_blkdev_bnum block,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
a9cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
a9d0: e59f50e4 ldr r5, [pc, #228] ; aabc <rtems_bdbuf_obtain_disk+0xf0>
a9d4: e5d5c088 ldrb ip, [r5, #136] ; 0x88
a9d8: e35c0000 cmp ip, #0
rtems_bdbuf_obtain_disk (dev_t dev,
rtems_blkdev_bnum block,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
a9dc: e1a08002 mov r8, r2
a9e0: e1a0a003 mov sl, r3
a9e4: e28d601c add r6, sp, #28
a9e8: e89600c0 ldm r6, {r6, r7}
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
a9ec: 03a00016 moveq r0, #22
a9f0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
a9f4: ebffdda5 bl 2090 <rtems_disk_obtain>
if (dd == NULL)
a9f8: e2504000 subs r4, r0, #0
a9fc: 03a00004 moveq r0, #4
aa00: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return RTEMS_INVALID_ID;
*dd_ptr = dd;
if (media_block_ptr != NULL)
aa04: e3560000 cmp r6, #0
*/
dd = rtems_disk_obtain (dev);
if (dd == NULL)
return RTEMS_INVALID_ID;
*dd_ptr = dd;
aa08: e58a4000 str r4, [sl]
if (media_block_ptr != NULL)
aa0c: 0a00000c beq aa44 <rtems_bdbuf_obtain_disk+0x78>
static rtems_blkdev_bnum
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
aa10: e5940020 ldr r0, [r4, #32]
aa14: e0832098 umull r2, r3, r8, r0
aa18: e1a00002 mov r0, r2
aa1c: e1a01003 mov r1, r3
aa20: e5942024 ldr r2, [r4, #36] ; 0x24
aa24: e3a03000 mov r3, #0
aa28: eb004d74 bl 1e000 <__udivdi3>
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
aa2c: e594301c ldr r3, [r4, #28]
aa30: e1530000 cmp r3, r0
aa34: 9a00001c bls aaac <rtems_bdbuf_obtain_disk+0xe0>
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
aa38: e5943018 ldr r3, [r4, #24]
aa3c: e0800003 add r0, r0, r3
aa40: e5860000 str r0, [r6]
}
if (bds_per_group_ptr != NULL)
aa44: e3570000 cmp r7, #0
aa48: 01a00007 moveq r0, r7
aa4c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
aa50: e59f3068 ldr r3, [pc, #104] ; aac0 <rtems_bdbuf_obtain_disk+0xf4>
*media_block_ptr = mb + dd->start;
}
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
aa54: e5940020 ldr r0, [r4, #32]
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
aa58: e5932024 ldr r2, [r3, #36] ; 0x24
aa5c: e1500002 cmp r0, r2
aa60: 8a000011 bhi aaac <rtems_bdbuf_obtain_disk+0xe0>
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
aa64: e5931020 ldr r1, [r3, #32]
aa68: e2400001 sub r0, r0, #1
aa6c: eb004806 bl 1ca8c <__aeabi_uidiv>
aa70: e2800001 add r0, r0, #1
for (bds_per_size = 1;
aa74: e3500001 cmp r0, #1
aa78: 93a01001 movls r1, #1
aa7c: 9a000003 bls aa90 <rtems_bdbuf_obtain_disk+0xc4>
aa80: e3a01001 mov r1, #1
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
aa84: e1a01081 lsl r1, r1, #1
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
aa88: e1500001 cmp r0, r1
aa8c: 8afffffc bhi aa84 <rtems_bdbuf_obtain_disk+0xb8>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
aa90: e5950020 ldr r0, [r5, #32]
aa94: eb0047fc bl 1ca8c <__aeabi_uidiv>
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
aa98: e3500000 cmp r0, #0
aa9c: 0a000002 beq aaac <rtems_bdbuf_obtain_disk+0xe0>
{
rtems_disk_release (dd);
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
aaa0: e5870000 str r0, [r7]
aaa4: e3a00000 mov r0, #0
}
return RTEMS_SUCCESSFUL;
}
aaa8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
{
rtems_disk_release (dd);
aaac: e1a00004 mov r0, r4 <== NOT EXECUTED
aab0: ebffde0a bl 22e0 <rtems_disk_release> <== NOT EXECUTED
aab4: e3a0000a mov r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
aab8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000b7bc <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
b7bc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
b7c0: e24dd08c sub sp, sp, #140 ; 0x8c
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b7c4: e28d7080 add r7, sp, #128 ; 0x80
the_chain->permanent_null = NULL;
b7c8: e3a05000 mov r5, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b7cc: e2873004 add r3, r7, #4
b7d0: e58d3080 str r3, [sp, #128] ; 0x80
b7d4: e1a06000 mov r6, r0
the_chain->permanent_null = NULL;
b7d8: e58d5084 str r5, [sp, #132] ; 0x84
the_chain->last = _Chain_Head(the_chain);
b7dc: e58d7088 str r7, [sp, #136] ; 0x88
b7e0: e1a08001 mov r8, r1
b7e4: e1a09002 mov r9, r2
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
b7e8: ebfffbe8 bl a790 <rtems_bdbuf_lock_cache>
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
b7ec: e59f3180 ldr r3, [pc, #384] ; b974 <rtems_bdbuf_purge+0x1b8>
b7f0: e5934040 ldr r4, [r3, #64] ; 0x40
*prev = NULL;
while (cur != NULL)
b7f4: e1540005 cmp r4, r5
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
b7f8: e58d5000 str r5, [sp]
while (cur != NULL)
b7fc: 0a000038 beq b8e4 <rtems_bdbuf_purge+0x128>
b800: e1a0500d mov r5, sp
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b804: e3a0a006 mov sl, #6
b808: e3a0b00a mov fp, #10
*prev = NULL;
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
b80c: e2841014 add r1, r4, #20
b810: e8910003 ldm r1, {r0, r1}
b814: e1a02008 mov r2, r8
b818: e1a03009 mov r3, r9
b81c: e1a0e00f mov lr, pc
b820: e12fff16 bx r6
b824: e3500000 cmp r0, #0
b828: 0a00000f beq b86c <rtems_bdbuf_purge+0xb0>
{
switch (cur->state)
b82c: e5943024 ldr r3, [r4, #36] ; 0x24
b830: e353000a cmp r3, #10
b834: 979ff103 ldrls pc, [pc, r3, lsl #2]
b838: ea00003b b b92c <rtems_bdbuf_purge+0x170> <== NOT EXECUTED
b83c: 0000b86c .word 0x0000b86c <== NOT EXECUTED
b840: 0000b86c .word 0x0000b86c <== NOT EXECUTED
b844: 0000b8a8 .word 0x0000b8a8 <== NOT EXECUTED
b848: 0000b924 .word 0x0000b924 <== NOT EXECUTED
b84c: 0000b924 .word 0x0000b924 <== NOT EXECUTED
b850: 0000b924 .word 0x0000b924 <== NOT EXECUTED
b854: 0000b86c .word 0x0000b86c <== NOT EXECUTED
b858: 0000b898 .word 0x0000b898 <== NOT EXECUTED
b85c: 0000b890 .word 0x0000b890 <== NOT EXECUTED
b860: 0000b868 .word 0x0000b868 <== NOT EXECUTED
b864: 0000b86c .word 0x0000b86c <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b868: e584b024 str fp, [r4, #36] ; 0x24
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
b86c: e5943008 ldr r3, [r4, #8]
b870: e3530000 cmp r3, #0
b874: 0a000013 beq b8c8 <rtems_bdbuf_purge+0x10c>
{
/* Left */
++prev;
*prev = cur;
b878: e5a54004 str r4, [r5, #4]! <== NOT EXECUTED
cur = cur->avl.left;
b87c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
b880: e3530000 cmp r3, #0 <== NOT EXECUTED
b884: 0a000016 beq b8e4 <rtems_bdbuf_purge+0x128> <== NOT EXECUTED
b888: e1a04003 mov r4, r3 <== NOT EXECUTED
b88c: eaffffde b b80c <rtems_bdbuf_purge+0x50> <== NOT EXECUTED
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
b890: e59f00e0 ldr r0, [pc, #224] ; b978 <rtems_bdbuf_purge+0x1bc>
b894: ebfffbc3 bl a7a8 <rtems_bdbuf_wake>
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
b898: e594302c ldr r3, [r4, #44] ; 0x2c
b89c: e593200c ldr r2, [r3, #12]
b8a0: e2422001 sub r2, r2, #1
b8a4: e583200c str r2, [r3, #12]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
b8a8: e1a00004 mov r0, r4
b8ac: ebffef5b bl 7620 <_Chain_Extract>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
b8b0: e1a00007 mov r0, r7
b8b4: e1a01004 mov r1, r4
b8b8: ebffef4d bl 75f4 <_Chain_Append>
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
b8bc: e5943008 ldr r3, [r4, #8]
b8c0: e3530000 cmp r3, #0
b8c4: 1affffeb bne b878 <rtems_bdbuf_purge+0xbc>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
b8c8: e594300c ldr r3, [r4, #12]
b8cc: e3530000 cmp r3, #0
b8d0: 0a000018 beq b938 <rtems_bdbuf_purge+0x17c>
{
/* Right */
++prev;
*prev = cur;
b8d4: e5a54004 str r4, [r5, #4]! <== NOT EXECUTED
cur = cur->avl.right;
b8d8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
b8dc: e3530000 cmp r3, #0 <== NOT EXECUTED
b8e0: 1affffe8 bne b888 <rtems_bdbuf_purge+0xcc> <== NOT EXECUTED
b8e4: e3a04000 mov r4, #0
b8e8: ea000003 b b8fc <rtems_bdbuf_purge+0x140>
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
b8ec: e5933028 ldr r3, [r3, #40] ; 0x28
b8f0: e3530000 cmp r3, #0
b8f4: 03a04001 moveq r4, #1
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
b8f8: ebffff34 bl b5d0 <rtems_bdbuf_discard_buffer>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
b8fc: e1a00007 mov r0, r7
b900: ebffef4f bl 7644 <_Chain_Get>
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
b904: e2503000 subs r3, r0, #0
b908: 1afffff7 bne b8ec <rtems_bdbuf_purge+0x130>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
b90c: e3540000 cmp r4, #0
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
b910: 159f0064 ldrne r0, [pc, #100] ; b97c <rtems_bdbuf_purge+0x1c0>
b914: 1bfffba3 blne a7a8 <rtems_bdbuf_wake>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, compare, dev);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
b918: ebfffc17 bl a97c <rtems_bdbuf_unlock_cache>
}
b91c: e28dd08c add sp, sp, #140 ; 0x8c
b920: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b924: e584a024 str sl, [r4, #36] ; 0x24
b928: eaffffcf b b86c <rtems_bdbuf_purge+0xb0>
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
b92c: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b930: e2800001 add r0, r0, #1 <== NOT EXECUTED
b934: ebffedf0 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
b938: e5951000 ldr r1, [r5]
b93c: e3510000 cmp r1, #0
b940: 0affffe7 beq b8e4 <rtems_bdbuf_purge+0x128>
b944: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
b948: e1540003 cmp r4, r3 <== NOT EXECUTED
b94c: 0a000004 beq b964 <rtems_bdbuf_purge+0x1a8> <== NOT EXECUTED
b950: eaffffca b b880 <rtems_bdbuf_purge+0xc4> <== NOT EXECUTED
b954: e592300c ldr r3, [r2, #12] <== NOT EXECUTED
b958: e1530001 cmp r3, r1 <== NOT EXECUTED
b95c: 1affffc7 bne b880 <rtems_bdbuf_purge+0xc4> <== NOT EXECUTED
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
cur = cur->avl.right;
b960: e1a01002 mov r1, r2 <== NOT EXECUTED
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
b964: e5352004 ldr r2, [r5, #-4]! <== NOT EXECUTED
b968: e3520000 cmp r2, #0 <== NOT EXECUTED
b96c: 1afffff8 bne b954 <rtems_bdbuf_purge+0x198> <== NOT EXECUTED
b970: eaffffdb b b8e4 <rtems_bdbuf_purge+0x128> <== NOT EXECUTED
0000a738 <rtems_bdbuf_purge_compare_dev>:
rtems_bdbuf_unlock_cache ();
}
static bool
rtems_bdbuf_purge_compare_dev (dev_t a, dev_t b)
{
a738: e1500002 cmp r0, r2
a73c: e3a00000 mov r0, #0
a740: 0a000001 beq a74c <rtems_bdbuf_purge_compare_dev+0x14>
return a == b;
}
a744: e2000001 and r0, r0, #1 <== NOT EXECUTED
a748: e12fff1e bx lr <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
}
static bool
rtems_bdbuf_purge_compare_dev (dev_t a, dev_t b)
{
a74c: e1510003 cmp r1, r3
a750: 03a00001 moveq r0, #1
return a == b;
}
a754: e2000001 and r0, r0, #1
a758: e12fff1e bx lr
0000a75c <rtems_bdbuf_purge_compare_major>:
static bool
rtems_bdbuf_purge_compare_major (dev_t a, dev_t b)
{
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
}
a75c: e1500002 cmp r0, r2 <== NOT EXECUTED
a760: 13a00000 movne r0, #0 <== NOT EXECUTED
a764: 03a00001 moveq r0, #1 <== NOT EXECUTED
a768: e12fff1e bx lr <== NOT EXECUTED
0000b980 <rtems_bdbuf_purge_major>:
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
}
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
b980: e1a01000 mov r1, r0 <== NOT EXECUTED
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
b984: e59f0004 ldr r0, [pc, #4] ; b990 <rtems_bdbuf_purge_major+0x10><== NOT EXECUTED
b988: e3a02000 mov r2, #0 <== NOT EXECUTED
b98c: eaffff8a b b7bc <rtems_bdbuf_purge> <== NOT EXECUTED
0000c91c <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c91c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
c920: e28db020 add fp, sp, #32
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c924: e24be028 sub lr, fp, #40 ; 0x28
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c928: e24dd02c sub sp, sp, #44 ; 0x2c
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
c92c: e3a0c000 mov ip, #0
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
c930: e50b3034 str r3, [fp, #-52] ; 0x34
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c934: e58de000 str lr, [sp]
c938: e24b3024 sub r3, fp, #36 ; 0x24
c93c: e24be02c sub lr, fp, #44 ; 0x2c
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
c940: e50bc02c str ip, [fp, #-44] ; 0x2c
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c944: e58de004 str lr, [sp, #4]
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
c948: e50bc024 str ip, [fp, #-36] ; 0x24
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
c94c: e50bc028 str ip, [fp, #-40] ; 0x28
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
c950: ebfff81d bl a9cc <rtems_bdbuf_obtain_disk>
if (sc != RTEMS_SUCCESSFUL)
c954: e2508000 subs r8, r0, #0
c958: 11a04008 movne r4, r8
c95c: 0a000002 beq c96c <rtems_bdbuf_read+0x50>
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
return sc;
}
c960: e1a00004 mov r0, r4
c964: e24bd020 sub sp, fp, #32
c968: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
c96c: e59f32b4 ldr r3, [pc, #692] ; cc28 <rtems_bdbuf_read+0x30c>
c970: e5933000 ldr r3, [r3]
c974: e2833001 add r3, r3, #1
c978: e50b3030 str r3, [fp, #-48] ; 0x30
c97c: e1a03203 lsl r3, r3, #4
c980: e283301c add r3, r3, #28
c984: e04dd003 sub sp, sp, r3
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
c988: ebfff780 bl a790 <rtems_bdbuf_lock_cache>
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
c98c: e51b9024 ldr r9, [fp, #-36] ; 0x24
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
c990: e599c020 ldr ip, [r9, #32]
c994: e5991024 ldr r1, [r9, #36] ; 0x24
c998: e1a0000c mov r0, ip
c99c: e50bc044 str ip, [fp, #-68] ; 0x44
c9a0: eb004039 bl 1ca8c <__aeabi_uidiv>
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
c9a4: e5992018 ldr r2, [r9, #24]
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
c9a8: e59f327c ldr r3, [pc, #636] ; cc2c <rtems_bdbuf_read+0x310>
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
c9ac: e51b102c ldr r1, [fp, #-44] ; 0x2c
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
c9b0: e28d7008 add r7, sp, #8
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
dev_t dev = dd->dev;
c9b4: e5995004 ldr r5, [r9, #4]
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
c9b8: e51b6028 ldr r6, [fp, #-40] ; 0x28
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
dev_t dev = dd->dev;
c9bc: e5994000 ldr r4, [r9]
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
c9c0: e5873004 str r3, [r7, #4]
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
c9c4: e5878000 str r8, [r7]
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
c9c8: e50b103c str r1, [fp, #-60] ; 0x3c
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
c9cc: e50b2038 str r2, [fp, #-56] ; 0x38
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
c9d0: e1a0a000 mov sl, r0
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
c9d4: e5877008 str r7, [r7, #8]
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
c9d8: e599901c ldr r9, [r9, #28]
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
c9dc: eb000d96 bl 1003c <rtems_task_self>
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
c9e0: e1a02006 mov r2, r6
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
c9e4: e5870014 str r0, [r7, #20]
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
c9e8: e51b303c ldr r3, [fp, #-60] ; 0x3c
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
c9ec: e3a0e00c mov lr, #12
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
c9f0: e1a00004 mov r0, r4
c9f4: e1a01005 mov r1, r5
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
c9f8: e5878010 str r8, [r7, #16]
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
c9fc: e587e00c str lr, [r7, #12]
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
ca00: ebfffeff bl c604 <rtems_bdbuf_get_buffer_for_access>
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
ca04: e5903024 ldr r3, [r0, #36] ; 0x24
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
ca08: e5902020 ldr r2, [r0, #32]
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
ca0c: e51bc044 ldr ip, [fp, #-68] ; 0x44
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
ca10: e3530002 cmp r3, #2
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
ca14: e1a08000 mov r8, r0
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
ca18: e5872020 str r2, [r7, #32]
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
ca1c: e5870024 str r0, [r7, #36] ; 0x24
req->bufs [0].block = media_block;
ca20: e5876018 str r6, [r7, #24]
req->bufs [0].length = block_size;
ca24: e587c01c str ip, [r7, #28]
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
ca28: 0a00005e beq cba8 <rtems_bdbuf_read+0x28c>
ca2c: e3530007 cmp r3, #7
ca30: 0a00005c beq cba8 <rtems_bdbuf_read+0x28c>
ca34: e3530001 cmp r3, #1
ca38: 0a000004 beq ca50 <rtems_bdbuf_read+0x134>
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
ca3c: e5900024 ldr r0, [r0, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
ca40: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
ca44: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ca48: e380001d orr r0, r0, #29 <== NOT EXECUTED
ca4c: ebffe9aa bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
ca50: e51be038 ldr lr, [fp, #-56] ; 0x38
ca54: e089900e add r9, r9, lr
ca58: e51b2030 ldr r2, [fp, #-48] ; 0x30
ca5c: e0669009 rsb r9, r6, r9
ca60: e1a01009 mov r1, r9
ca64: e1510002 cmp r1, r2
ca68: 21a01002 movcs r1, r2
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
ca6c: e3510001 cmp r1, #1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ca70: e3a02009 mov r2, #9
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
ca74: e50b1040 str r1, [fp, #-64] ; 0x40
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ca78: e5802024 str r2, [r0, #36] ; 0x24
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
ca7c: 950b3030 strls r3, [fp, #-48] ; 0x30
ca80: 9a00002c bls cb38 <rtems_bdbuf_read+0x21c>
ca84: e59f91a4 ldr r9, [pc, #420] ; cc30 <rtems_bdbuf_read+0x314>
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
ca88: e50b3030 str r3, [fp, #-48] ; 0x30
ca8c: e50b7038 str r7, [fp, #-56] ; 0x38
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
ca90: e5993040 ldr r3, [r9, #64] ; 0x40
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
ca94: e3530000 cmp r3, #0
break;
}
while (transfer_index < transfer_count)
{
media_block += media_block_count;
ca98: e086600a add r6, r6, sl
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
ca9c: 0a000008 beq cac4 <rtems_bdbuf_read+0x1a8>
caa0: e5932014 ldr r2, [r3, #20]
caa4: e1540002 cmp r4, r2
caa8: e5931018 ldr r1, [r3, #24]
caac: 0a000035 beq cb88 <rtems_bdbuf_read+0x26c>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
cab0: e1550001 cmp r5, r1 <== NOT EXECUTED
cab4: 9a00002e bls cb74 <rtems_bdbuf_read+0x258> <== NOT EXECUTED
{
p = p->avl.right;
cab8: e593300c ldr r3, [r3, #12]
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
cabc: e3530000 cmp r3, #0
cac0: 1afffff6 bne caa0 <rtems_bdbuf_read+0x184>
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
cac4: e1a00004 mov r0, r4
cac8: e1a01005 mov r1, r5
cacc: e1a02006 mov r2, r6
cad0: e51b303c ldr r3, [fp, #-60] ; 0x3c
cad4: e50bc044 str ip, [fp, #-68] ; 0x44
cad8: ebfffdcf bl c21c <rtems_bdbuf_get_buffer_from_lru_list>
if (bd != NULL)
cadc: e3500000 cmp r0, #0
cae0: e51bc044 ldr ip, [fp, #-68] ; 0x44
cae4: 0a000013 beq cb38 <rtems_bdbuf_read+0x21c>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
cae8: e590302c ldr r3, [r0, #44] ; 0x2c <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
caec: e51be030 ldr lr, [fp, #-48] ; 0x30 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
caf0: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
caf4: e51b2040 ldr r2, [fp, #-64] ; 0x40 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
caf8: e28ee001 add lr, lr, #1 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
cafc: e2811001 add r1, r1, #1 <== NOT EXECUTED
cb00: e583100c str r1, [r3, #12] <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
cb04: e50be030 str lr, [fp, #-48] ; 0x30 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
cb08: e15e0002 cmp lr, r2 <== NOT EXECUTED
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
req->bufs [transfer_index].block = media_block;
req->bufs [transfer_index].length = block_size;
req->bufs [transfer_index].buffer = bd->buffer;
cb0c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
cb10: e51be038 ldr lr, [fp, #-56] ; 0x38 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
cb14: e3a01009 mov r1, #9 <== NOT EXECUTED
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
req->bufs [transfer_index].block = media_block;
req->bufs [transfer_index].length = block_size;
req->bufs [transfer_index].buffer = bd->buffer;
cb18: e58e3030 str r3, [lr, #48] ; 0x30 <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
cb1c: e58e0034 str r0, [lr, #52] ; 0x34 <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
cb20: e58e6028 str r6, [lr, #40] ; 0x28 <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
cb24: e58ec02c str ip, [lr, #44] ; 0x2c <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
cb28: e28ee010 add lr, lr, #16 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
cb2c: e5801024 str r1, [r0, #36] ; 0x24 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
cb30: e50be038 str lr, [fp, #-56] ; 0x38 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
cb34: 3affffd5 bcc ca90 <rtems_bdbuf_read+0x174> <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
cb38: e51b2030 ldr r2, [fp, #-48] ; 0x30
cb3c: e5872010 str r2, [r7, #16]
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
cb40: e51b3030 ldr r3, [fp, #-48] ; 0x30
cb44: e3530000 cmp r3, #0
cb48: 1a000019 bne cbb4 <rtems_bdbuf_read+0x298>
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
cb4c: e5983024 ldr r3, [r8, #36] ; 0x24
cb50: e3530002 cmp r3, #2
cb54: 0a000029 beq cc00 <rtems_bdbuf_read+0x2e4>
cb58: e3530007 cmp r3, #7
cb5c: 0a000021 beq cbe8 <rtems_bdbuf_read+0x2cc>
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
cb60: e5980024 ldr r0, [r8, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
cb64: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
cb68: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
cb6c: e3800002 orr r0, r0, #2 <== NOT EXECUTED
cb70: ebffe961 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
cb74: 1a000001 bne cb80 <rtems_bdbuf_read+0x264> <== NOT EXECUTED
cb78: e1540002 cmp r4, r2 <== NOT EXECUTED
cb7c: 8affffcd bhi cab8 <rtems_bdbuf_read+0x19c> <== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
cb80: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
cb84: eaffffcc b cabc <rtems_bdbuf_read+0x1a0> <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
cb88: e1550001 cmp r5, r1
cb8c: 1affffc7 bne cab0 <rtems_bdbuf_read+0x194>
cb90: e593201c ldr r2, [r3, #28]
cb94: e1560002 cmp r6, r2
cb98: 0affffe6 beq cb38 <rtems_bdbuf_read+0x21c>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
cb9c: 8affffc5 bhi cab8 <rtems_bdbuf_read+0x19c>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
cba0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
cba4: eaffffc4 b cabc <rtems_bdbuf_read+0x1a0> <== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
cba8: e5973010 ldr r3, [r7, #16]
cbac: e50b3030 str r3, [fp, #-48] ; 0x30
cbb0: eaffffe2 b cb40 <rtems_bdbuf_read+0x224>
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
cbb4: e1a01007 mov r1, r7
cbb8: e51b0024 ldr r0, [fp, #-36] ; 0x24
cbbc: e3a02001 mov r2, #1
cbc0: ebfffb78 bl b9a8 <rtems_bdbuf_execute_transfer_request>
if (sc == RTEMS_SUCCESSFUL)
cbc4: e2504000 subs r4, r0, #0
cbc8: 0a00000f beq cc0c <rtems_bdbuf_read+0x2f0>
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
cbcc: e51b1034 ldr r1, [fp, #-52] ; 0x34
cbd0: e3a03000 mov r3, #0
cbd4: e5813000 str r3, [r1]
rtems_bdbuf_unlock_cache ();
cbd8: ebfff767 bl a97c <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
cbdc: e51b0024 ldr r0, [fp, #-36] ; 0x24
cbe0: ebfff7b7 bl aac4 <rtems_bdbuf_release_disk>
return sc;
cbe4: eaffff5d b c960 <rtems_bdbuf_read+0x44>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
cbe8: e3a03004 mov r3, #4
cbec: e5883024 str r3, [r8, #36] ; 0x24
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
cbf0: e51be034 ldr lr, [fp, #-52] ; 0x34
cbf4: e3a04000 mov r4, #0
cbf8: e58e8000 str r8, [lr]
cbfc: eafffff5 b cbd8 <rtems_bdbuf_read+0x2bc>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
cc00: e3a03003 mov r3, #3
cc04: e5883024 str r3, [r8, #36] ; 0x24
cc08: eafffff8 b cbf0 <rtems_bdbuf_read+0x2d4>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
cc0c: e1a00008 mov r0, r8
cc10: ebffea82 bl 7620 <_Chain_Extract>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
cc14: e598302c ldr r3, [r8, #44] ; 0x2c
cc18: e593200c ldr r2, [r3, #12]
cc1c: e2822001 add r2, r2, #1
cc20: e583200c str r2, [r3, #12]
cc24: eaffffc8 b cb4c <rtems_bdbuf_read+0x230>
0000b6d8 <rtems_bdbuf_release>:
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
b6d8: e59f30cc ldr r3, [pc, #204] ; b7ac <rtems_bdbuf_release+0xd4>
b6dc: e5d33088 ldrb r3, [r3, #136] ; 0x88
b6e0: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
b6e4: e92d4010 push {r4, lr}
b6e8: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b6ec: 03a00016 moveq r0, #22
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
b6f0: 08bd8010 popeq {r4, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
b6f4: e3540000 cmp r4, #0
b6f8: 03a00009 moveq r0, #9
b6fc: 08bd8010 popeq {r4, pc}
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
b700: ebfffc22 bl a790 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b704: e5943024 ldr r3, [r4, #36] ; 0x24
b708: e2433003 sub r3, r3, #3
b70c: e3530003 cmp r3, #3
b710: 979ff103 ldrls pc, [pc, r3, lsl #2]
b714: ea00001c b b78c <rtems_bdbuf_release+0xb4> <== NOT EXECUTED
b718: 0000b750 .word 0x0000b750 <== NOT EXECUTED
b71c: 0000b73c .word 0x0000b73c <== NOT EXECUTED
b720: 0000b728 .word 0x0000b728 <== NOT EXECUTED
b724: 0000b728 .word 0x0000b728 <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
rtems_bdbuf_add_to_lru_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
b728: e1a00004 mov r0, r4
b72c: ebffffb5 bl b608 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
b730: ebfffc91 bl a97c <rtems_bdbuf_unlock_cache>
b734: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b738: e8bd8010 pop {r4, pc}
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
b73c: e1a00004 mov r0, r4
b740: ebfffcf1 bl ab0c <rtems_bdbuf_add_to_modified_list_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
b744: ebfffc8c bl a97c <rtems_bdbuf_unlock_cache>
b748: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b74c: e8bd8010 pop {r4, pc}
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
b750: e594302c ldr r3, [r4, #44] ; 0x2c
b754: e593200c ldr r2, [r3, #12]
b758: e2422001 sub r2, r2, #1
b75c: e583200c str r2, [r3, #12]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b760: e3a03002 mov r3, #2
b764: e5843024 str r3, [r4, #36] ; 0x24
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
b768: e59f0040 ldr r0, [pc, #64] ; b7b0 <rtems_bdbuf_release+0xd8>
b76c: e1a01004 mov r1, r4
b770: ebffef9f bl 75f4 <_Chain_Append>
rtems_bdbuf_add_to_lru_list_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
b774: e5943028 ldr r3, [r4, #40] ; 0x28
b778: e3530000 cmp r3, #0
b77c: 0a000007 beq b7a0 <rtems_bdbuf_release+0xc8>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
b780: e59f002c ldr r0, [pc, #44] ; b7b4 <rtems_bdbuf_release+0xdc>
b784: ebfffc07 bl a7a8 <rtems_bdbuf_wake>
b788: eaffffe8 b b730 <rtems_bdbuf_release+0x58>
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
b78c: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
b790: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b794: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b798: e380001c orr r0, r0, #28 <== NOT EXECUTED
b79c: ebffee56 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
b7a0: e59f0010 ldr r0, [pc, #16] ; b7b8 <rtems_bdbuf_release+0xe0>
b7a4: ebfffbff bl a7a8 <rtems_bdbuf_wake>
b7a8: eaffffe0 b b730 <rtems_bdbuf_release+0x58>
0000aac4 <rtems_bdbuf_release_disk>:
return RTEMS_SUCCESSFUL;
}
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
aac4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
aac8: ebffde04 bl 22e0 <rtems_disk_release>
if (sc != RTEMS_SUCCESSFUL)
aacc: e3500000 cmp r0, #0
aad0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
aad4: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
aad8: e280001f add r0, r0, #31 <== NOT EXECUTED
aadc: ebfff186 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000b650 <rtems_bdbuf_release_modified>:
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
b650: e59f307c ldr r3, [pc, #124] ; b6d4 <rtems_bdbuf_release_modified+0x84>
b654: e5d33088 ldrb r3, [r3, #136] ; 0x88
b658: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
b65c: e92d4010 push {r4, lr}
b660: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b664: 03a00016 moveq r0, #22
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
b668: 08bd8010 popeq {r4, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
b66c: e3540000 cmp r4, #0
b670: 03a00009 moveq r0, #9
b674: 08bd8010 popeq {r4, pc}
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
b678: ebfffc44 bl a790 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b67c: e5943024 ldr r3, [r4, #36] ; 0x24
b680: e3530003 cmp r3, #3
b684: 3a000003 bcc b698 <rtems_bdbuf_release_modified+0x48>
b688: e3530005 cmp r3, #5
b68c: 9a00000b bls b6c0 <rtems_bdbuf_release_modified+0x70>
b690: e3530006 cmp r3, #6
b694: 0a000004 beq b6ac <rtems_bdbuf_release_modified+0x5c>
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
b698: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
b69c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b6a0: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b6a4: e3800004 orr r0, r0, #4 <== NOT EXECUTED
b6a8: ebffee93 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
b6ac: e1a00004 mov r0, r4
b6b0: ebffffd4 bl b608 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
b6b4: ebfffcb0 bl a97c <rtems_bdbuf_unlock_cache>
b6b8: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b6bc: e8bd8010 pop {r4, pc}
switch (bd->state)
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
b6c0: e1a00004 mov r0, r4
b6c4: ebfffd10 bl ab0c <rtems_bdbuf_add_to_modified_list_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
b6c8: ebfffcab bl a97c <rtems_bdbuf_unlock_cache>
b6cc: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b6d0: e8bd8010 pop {r4, pc}
0000b244 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
b244: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
b248: e59fb33c ldr fp, [pc, #828] ; b58c <rtems_bdbuf_remove_from_tree+0x348>
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
b24c: e24dd080 sub sp, sp, #128 ; 0x80
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
b250: e59b4040 ldr r4, [fp, #64] ; 0x40
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
b254: e1a08000 mov r8, r0
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
b258: e3a01000 mov r1, #0
b25c: e1a0000d mov r0, sp
b260: e3a02080 mov r2, #128 ; 0x80
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
b264: e5986014 ldr r6, [r8, #20]
b268: e2885018 add r5, r8, #24
b26c: e8950420 ldm r5, {r5, sl}
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
b270: eb00232f bl 13f34 <memset>
while (p != NULL)
b274: e3540000 cmp r4, #0
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
b278: e1a0700d mov r7, sp
while (p != NULL)
b27c: 0a000017 beq b2e0 <rtems_bdbuf_remove_from_tree+0x9c>
b280: e1a0100d mov r1, sp
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
b284: e3a0c001 mov ip, #1
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
b288: e3e09000 mvn r9, #0
b28c: ea000009 b b2b8 <rtems_bdbuf_remove_from_tree+0x74>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b290: 1a000001 bne b29c <rtems_bdbuf_remove_from_tree+0x58>
b294: e1560000 cmp r6, r0
b298: 8a00000c bhi b2d0 <rtems_bdbuf_remove_from_tree+0x8c>
b29c: e1560000 cmp r6, r0
b2a0: 0a000013 beq b2f4 <rtems_bdbuf_remove_from_tree+0xb0>
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
b2a4: e5c49010 strb r9, [r4, #16]
p = p->avl.left;
b2a8: e5944008 ldr r4, [r4, #8]
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
b2ac: e3540000 cmp r4, #0
b2b0: 0a00000a beq b2e0 <rtems_bdbuf_remove_from_tree+0x9c>
b2b4: e1a01003 mov r1, r3
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b2b8: e5942018 ldr r2, [r4, #24]
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
b2bc: e1a03001 mov r3, r1
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b2c0: e1550002 cmp r5, r2
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
b2c4: e4834004 str r4, [r3], #4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b2c8: e5940014 ldr r0, [r4, #20]
b2cc: 9affffef bls b290 <rtems_bdbuf_remove_from_tree+0x4c>
{
p->avl.cache = 1;
b2d0: e5c4c010 strb ip, [r4, #16]
p = p->avl.right;
b2d4: e594400c ldr r4, [r4, #12]
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
b2d8: e3540000 cmp r4, #0
b2dc: 1afffff4 bne b2b4 <rtems_bdbuf_remove_from_tree+0x70>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
b2e0: e5980024 ldr r0, [r8, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
b2e4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b2e8: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b2ec: e3800009 orr r0, r0, #9 <== NOT EXECUTED
b2f0: ebffef81 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b2f4: e1550002 cmp r5, r2
b2f8: 1affffe9 bne b2a4 <rtems_bdbuf_remove_from_tree+0x60>
b2fc: e594201c ldr r2, [r4, #28]
b300: e15a0002 cmp sl, r2
b304: 8afffff1 bhi b2d0 <rtems_bdbuf_remove_from_tree+0x8c>
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
b308: 1affffe5 bne b2a4 <rtems_bdbuf_remove_from_tree+0x60>
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
b30c: e594200c ldr r2, [r4, #12]
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
b310: e1510007 cmp r1, r7
b314: 93a06000 movls r6, #0
{
p = *(buf_prev - 1);
b318: 85116004 ldrhi r6, [r1, #-4]
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
b31c: e3520000 cmp r2, #0
b320: 0a00008b beq b554 <rtems_bdbuf_remove_from_tree+0x310>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
b324: e5920008 ldr r0, [r2, #8]
b328: e3500000 cmp r0, #0
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
b32c: 13e05000 mvnne r5, #0
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
b330: 0a00008d beq b56c <rtems_bdbuf_remove_from_tree+0x328>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
b334: e4832004 str r2, [r3], #4 <== NOT EXECUTED
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
b338: e1a00002 mov r0, r2 <== NOT EXECUTED
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
b33c: e5922008 ldr r2, [r2, #8] <== NOT EXECUTED
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
b340: e592c008 ldr ip, [r2, #8] <== NOT EXECUTED
b344: e35c0000 cmp ip, #0 <== NOT EXECUTED
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
b348: e5c05010 strb r5, [r0, #16] <== NOT EXECUTED
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
b34c: 1afffff8 bne b334 <rtems_bdbuf_remove_from_tree+0xf0> <== NOT EXECUTED
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
b350: e5948008 ldr r8, [r4, #8] <== NOT EXECUTED
r->avl.left = s->avl.right;
b354: e592500c ldr r5, [r2, #12] <== NOT EXECUTED
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
b358: e5d4c011 ldrb ip, [r4, #17] <== NOT EXECUTED
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
b35c: e594400c ldr r4, [r4, #12] <== NOT EXECUTED
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
b360: e5828008 str r8, [r2, #8] <== NOT EXECUTED
r->avl.left = s->avl.right;
b364: e5805008 str r5, [r0, #8] <== NOT EXECUTED
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
b368: e3a00001 mov r0, #1 <== NOT EXECUTED
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
b36c: e582400c str r4, [r2, #12] <== NOT EXECUTED
s->avl.bal = q->avl.bal;
b370: e5c2c011 strb ip, [r2, #17] <== NOT EXECUTED
s->avl.cache = 1;
b374: e5c20010 strb r0, [r2, #16] <== NOT EXECUTED
*t = q = s;
b378: e5812000 str r2, [r1] <== NOT EXECUTED
}
}
if (p != NULL)
b37c: e3560000 cmp r6, #0
p->avl.right = q;
}
}
else
{
*root = q;
b380: 058b2040 streq r2, [fp, #64] ; 0x40
*t = q = s;
}
}
if (p != NULL)
b384: 0a000003 beq b398 <rtems_bdbuf_remove_from_tree+0x154>
{
if (p->avl.cache == -1)
b388: e1d611d0 ldrsb r1, [r6, #16]
b38c: e3710001 cmn r1, #1
{
p->avl.left = q;
b390: 05862008 streq r2, [r6, #8]
}
else
{
p->avl.right = q;
b394: 1586200c strne r2, [r6, #12]
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
b398: e1530007 cmp r3, r7
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
b39c: 83a06001 movhi r6, #1
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
b3a0: 83a04000 movhi r4, #0
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
b3a4: 83e05000 mvnhi r5, #0
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
b3a8: 8a000016 bhi b408 <rtems_bdbuf_remove_from_tree+0x1c4>
b3ac: ea000028 b b454 <rtems_bdbuf_remove_from_tree+0x210>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
b3b0: e1d201d1 ldrsb r0, [r2, #17]
b3b4: e3500000 cmp r0, #0
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
b3b8: 05c25011 strbeq r5, [r2, #17]
b3bc: 01a01002 moveq r1, r2
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
b3c0: 0a000007 beq b3e4 <rtems_bdbuf_remove_from_tree+0x1a0>
b3c4: e3500001 cmp r0, #1
{
case +1:
p->avl.bal = 0;
b3c8: 05c24011 strbeq r4, [r2, #17]
b3cc: 01a01002 moveq r1, r2
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
b3d0: 0a000003 beq b3e4 <rtems_bdbuf_remove_from_tree+0x1a0>
b3d4: e3700001 cmn r0, #1 <== NOT EXECUTED
b3d8: 0a00001f beq b45c <rtems_bdbuf_remove_from_tree+0x218> <== NOT EXECUTED
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
b3dc: e1a01002 mov r1, r2 <== NOT EXECUTED
b3e0: e3a00001 mov r0, #1 <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
b3e4: e1530007 cmp r3, r7
b3e8: 9a000018 bls b450 <rtems_bdbuf_remove_from_tree+0x20c>
{
q = *(buf_prev - 1);
b3ec: e5132004 ldr r2, [r3, #-4]
if (q->avl.cache == -1)
b3f0: e1d2c1d0 ldrsb ip, [r2, #16]
b3f4: e37c0001 cmn ip, #1
{
q->avl.left = p;
b3f8: 05821008 streq r1, [r2, #8]
}
else
{
q->avl.right = p;
b3fc: 1582100c strne r1, [r2, #12]
*root = q;
}
modified = true;
while (modified)
b400: e3500000 cmp r0, #0
b404: 0a000012 beq b454 <rtems_bdbuf_remove_from_tree+0x210>
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
b408: e5332004 ldr r2, [r3, #-4]!
else
{
break;
}
if (p->avl.cache == -1)
b40c: e1d2c1d0 ldrsb ip, [r2, #16]
b410: e37c0001 cmn ip, #1
b414: 1affffe5 bne b3b0 <rtems_bdbuf_remove_from_tree+0x16c>
{
/* rebalance left branch */
switch (p->avl.bal)
b418: e1d201d1 ldrsb r0, [r2, #17]
b41c: e3500000 cmp r0, #0
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
b420: 05c26011 strbeq r6, [r2, #17]
b424: 01a01002 moveq r1, r2
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
b428: 0affffed beq b3e4 <rtems_bdbuf_remove_from_tree+0x1a0>
b42c: e3500001 cmp r0, #1
b430: 0a000020 beq b4b8 <rtems_bdbuf_remove_from_tree+0x274>
b434: e3700001 cmn r0, #1
{
case -1:
p->avl.bal = 0;
b438: 05c24011 strbeq r4, [r2, #17]
b43c: 01a01002 moveq r1, r2
b440: 03a00001 moveq r0, #1
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
b444: 1affffe4 bne b3dc <rtems_bdbuf_remove_from_tree+0x198>
default:
break;
}
}
if (buf_prev > buf_stack)
b448: e1530007 cmp r3, r7
b44c: 8affffe6 bhi b3ec <rtems_bdbuf_remove_from_tree+0x1a8>
q->avl.right = p;
}
}
else
{
*root = p;
b450: e58b1040 str r1, [fp, #64] ; 0x40
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
b454: e28dd080 add sp, sp, #128 ; 0x80
b458: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
p->avl.bal = -1;
modified = false;
break;
case -1:
p1 = p->avl.left;
b45c: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
if (p1->avl.bal <= 0) /* simple LL-turn */
b460: e1d101d1 ldrsb r0, [r1, #17] <== NOT EXECUTED
b464: e3500000 cmp r0, #0 <== NOT EXECUTED
b468: da000020 ble b4f0 <rtems_bdbuf_remove_from_tree+0x2ac> <== NOT EXECUTED
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
b46c: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
p1->avl.right = p2->avl.left;
b470: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
b474: e1d081d1 ldrsb r8, [r0, #17] <== NOT EXECUTED
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
b478: e581c00c str ip, [r1, #12] <== NOT EXECUTED
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
b47c: e3780001 cmn r8, #1 <== NOT EXECUTED
b480: 05c26011 strbeq r6, [r2, #17] <== NOT EXECUTED
b484: 15c24011 strbne r4, [r2, #17] <== NOT EXECUTED
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
b488: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
b48c: e5801008 str r1, [r0, #8] <== NOT EXECUTED
p->avl.left = p2->avl.right;
p2->avl.right = p;
b490: e580200c str r2, [r0, #12] <== NOT EXECUTED
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
b494: e582c008 str ip, [r2, #8] <== NOT EXECUTED
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
b498: e1d021d1 ldrsb r2, [r0, #17] <== NOT EXECUTED
b49c: e3520001 cmp r2, #1 <== NOT EXECUTED
b4a0: 05c15011 strbeq r5, [r1, #17] <== NOT EXECUTED
b4a4: 15c14011 strbne r4, [r1, #17] <== NOT EXECUTED
p = p2;
p2->avl.bal = 0;
b4a8: e5c04011 strb r4, [r0, #17] <== NOT EXECUTED
b4ac: e1a01000 mov r1, r0 <== NOT EXECUTED
b4b0: e3a00001 mov r0, #1 <== NOT EXECUTED
b4b4: eaffffca b b3e4 <rtems_bdbuf_remove_from_tree+0x1a0> <== NOT EXECUTED
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
b4b8: e592800c ldr r8, [r2, #12]
if (p1->avl.bal >= 0) /* simple RR-turn */
b4bc: e1d8a1d1 ldrsb sl, [r8, #17]
b4c0: e35a0000 cmp sl, #0
b4c4: ba000012 blt b514 <rtems_bdbuf_remove_from_tree+0x2d0>
{
p->avl.right = p1->avl.left;
b4c8: e5981008 ldr r1, [r8, #8]
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
b4cc: 15c24011 strbne r4, [r2, #17]
case +1:
p1 = p->avl.right;
if (p1->avl.bal >= 0) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
b4d0: e582100c str r1, [r2, #12]
p1->avl.left = p;
b4d4: e5882008 str r2, [r8, #8]
if (p1->avl.bal == 0)
{
p1->avl.bal = -1;
b4d8: 05c8c011 strbeq ip, [r8, #17]
b4dc: 01a01008 moveq r1, r8
b4e0: 01a0000a moveq r0, sl
modified = false;
}
else
{
p->avl.bal = 0;
p1->avl.bal = 0;
b4e4: 11a01008 movne r1, r8
b4e8: 15c84011 strbne r4, [r8, #17]
b4ec: eaffffbc b b3e4 <rtems_bdbuf_remove_from_tree+0x1a0>
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
b4f0: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
p1->avl.right = p;
if (p1->avl.bal == 0)
{
p1->avl.bal = 1;
b4f4: 05c16011 strbeq r6, [r1, #17] <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
b4f8: e582c008 str ip, [r2, #8] <== NOT EXECUTED
p1->avl.right = p;
b4fc: e581200c str r2, [r1, #12] <== NOT EXECUTED
if (p1->avl.bal == 0)
b500: 0affffb7 beq b3e4 <rtems_bdbuf_remove_from_tree+0x1a0> <== NOT EXECUTED
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
b504: e5c24011 strb r4, [r2, #17] <== NOT EXECUTED
p1->avl.bal = 0;
b508: e5c14011 strb r4, [r1, #17] <== NOT EXECUTED
b50c: e3a00001 mov r0, #1 <== NOT EXECUTED
b510: eaffffb3 b b3e4 <rtems_bdbuf_remove_from_tree+0x1a0> <== NOT EXECUTED
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
b514: e5981008 ldr r1, [r8, #8] <== NOT EXECUTED
p1->avl.left = p2->avl.right;
b518: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
b51c: e1d1a1d1 ldrsb sl, [r1, #17] <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
b520: e5880008 str r0, [r8, #8] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
b524: e35a0001 cmp sl, #1 <== NOT EXECUTED
b528: 05c2c011 strbeq ip, [r2, #17] <== NOT EXECUTED
b52c: 15c24011 strbne r4, [r2, #17] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
b530: e5910008 ldr r0, [r1, #8] <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
b534: e581800c str r8, [r1, #12] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
b538: e5812008 str r2, [r1, #8] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
b53c: e582000c str r0, [r2, #12] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
b540: e1d121d1 ldrsb r2, [r1, #17] <== NOT EXECUTED
b544: e3720001 cmn r2, #1 <== NOT EXECUTED
b548: 05c86011 strbeq r6, [r8, #17] <== NOT EXECUTED
b54c: 15c84011 strbne r4, [r8, #17] <== NOT EXECUTED
b550: eaffffec b b508 <rtems_bdbuf_remove_from_tree+0x2c4> <== NOT EXECUTED
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
{
r = q->avl.left;
b554: e5942008 ldr r2, [r4, #8]
if (r != NULL)
b558: e3520000 cmp r2, #0
{
r->avl.bal = 0;
b55c: 13a03000 movne r3, #0
b560: 15c23011 strbne r3, [r2, #17]
b564: e1a03001 mov r3, r1
b568: eaffff83 b b37c <rtems_bdbuf_remove_from_tree+0x138>
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
b56c: e5d40011 ldrb r0, [r4, #17]
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
b570: e594c008 ldr ip, [r4, #8]
r->avl.bal = q->avl.bal;
b574: e5c20011 strb r0, [r2, #17]
r->avl.cache = 1;
b578: e3a00001 mov r0, #1
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
b57c: e582c008 str ip, [r2, #8]
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
b580: e5c20010 strb r0, [r2, #16]
*buf_prev++ = q = r;
b584: e5812000 str r2, [r1]
b588: eaffff7b b b37c <rtems_bdbuf_remove_from_tree+0x138>
0000b590 <rtems_bdbuf_remove_from_tree_and_lru_list>:
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
b590: e5903024 ldr r3, [r0, #36] ; 0x24
b594: e3530000 cmp r3, #0
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
b598: e92d4010 push {r4, lr}
b59c: e1a04000 mov r4, r0
switch (bd->state)
b5a0: 0a000007 beq b5c4 <rtems_bdbuf_remove_from_tree_and_lru_list+0x34>
b5a4: e3530002 cmp r3, #2
b5a8: 0a000004 beq b5c0 <rtems_bdbuf_remove_from_tree_and_lru_list+0x30>
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
b5ac: e5900024 ldr r0, [r0, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
b5b0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b5b4: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b5b8: e3800008 orr r0, r0, #8 <== NOT EXECUTED
b5bc: ebffeece bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
b5c0: ebffff1f bl b244 <rtems_bdbuf_remove_from_tree>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
b5c4: e1a00004 mov r0, r4
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
}
rtems_chain_extract (&bd->link);
}
b5c8: e8bd4010 pop {r4, lr}
b5cc: eafff013 b 7620 <_Chain_Extract>
0000ad08 <rtems_bdbuf_restore_preemption>:
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
ad08: e52de004 push {lr} ; (str lr, [sp, #-4]!)
ad0c: e24dd004 sub sp, sp, #4
ad10: e28d2004 add r2, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
ad14: e3a01801 mov r1, #65536 ; 0x10000
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
ad18: e5220004 str r0, [r2, #-4]!
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
ad1c: e2411001 sub r1, r1, #1
ad20: e1a0200d mov r2, sp
ad24: eb00146b bl fed8 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
ad28: e3500000 cmp r0, #0
ad2c: 1a000001 bne ad38 <rtems_bdbuf_restore_preemption+0x30>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
}
ad30: e28dd004 add sp, sp, #4
ad34: e8bd8000 pop {pc}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
ad38: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ad3c: e2800011 add r0, r0, #17 <== NOT EXECUTED
ad40: ebfff0ed bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000bca8 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
bca8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
bcac: e59f4354 ldr r4, [pc, #852] ; c008 <rtems_bdbuf_swapout_task+0x360>
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
bcb0: e24dd038 sub sp, sp, #56 ; 0x38
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
bcb4: e594900c ldr r9, [r4, #12]
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
bcb8: ebfffd4c bl b1f0 <rtems_bdbuf_swapout_writereq_alloc>
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
bcbc: e59f2348 ldr r2, [pc, #840] ; c00c <rtems_bdbuf_swapout_task+0x364>
bcc0: e0893109 add r3, r9, r9, lsl #2
bcc4: e0833103 add r3, r3, r3, lsl #2
bcc8: e592100c ldr r1, [r2, #12]
bccc: e0833103 add r3, r3, r3, lsl #2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
bcd0: e28d2014 add r2, sp, #20
the_chain->permanent_null = NULL;
bcd4: e3a06000 mov r6, #0
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
bcd8: e58d002c str r0, [sp, #44] ; 0x2c
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
bcdc: e3e07000 mvn r7, #0
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
bce0: e1a00183 lsl r0, r3, #3
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
bce4: e3e08000 mvn r8, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
bce8: e2823004 add r3, r2, #4
bcec: e58d3014 str r3, [sp, #20]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
bcf0: e58d201c str r2, [sp, #28]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
bcf4: e58d6018 str r6, [sp, #24]
bcf8: e58d7020 str r7, [sp, #32]
bcfc: e58d8024 str r8, [sp, #36] ; 0x24
transfer.syncing = false;
bd00: e5cd6028 strb r6, [sp, #40] ; 0x28
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
bd04: eb004360 bl 1ca8c <__aeabi_uidiv>
bd08: e58d000c str r0, [sp, #12]
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
bd0c: ebfffa9f bl a790 <rtems_bdbuf_lock_cache>
for (w = 0; w < bdbuf_config.swapout_workers; w++)
bd10: e5943014 ldr r3, [r4, #20]
bd14: e1530006 cmp r3, r6
bd18: e58d3008 str r3, [sp, #8]
bd1c: 059f52ec ldreq r5, [pc, #748] ; c010 <rtems_bdbuf_swapout_task+0x368>
bd20: 0a000032 beq bdf0 <rtems_bdbuf_swapout_task+0x148>
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
bd24: e1a02007 mov r2, r7 <== NOT EXECUTED
bd28: e1a03008 mov r3, r8 <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
(bdbuf_config.swapout_priority ?
bd2c: e5948008 ldr r8, [r4, #8] <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
bd30: e58d9010 str r9, [sp, #16] <== NOT EXECUTED
bd34: e1a0a003 mov sl, r3 <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
bd38: e3a0b001 mov fp, #1 <== NOT EXECUTED
bd3c: e1a07006 mov r7, r6 <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
bd40: e1a09002 mov r9, r2 <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
bd44: e3a00030 mov r0, #48 ; 0x30 <== NOT EXECUTED
bd48: ebffddc5 bl 3464 <malloc> <== NOT EXECUTED
if (!worker)
bd4c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
bd50: 0a0000a9 beq bffc <rtems_bdbuf_swapout_task+0x354> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
bd54: e59f52b4 ldr r5, [pc, #692] ; c010 <rtems_bdbuf_swapout_task+0x368><== NOT EXECUTED
bd58: e1a01004 mov r1, r4 <== NOT EXECUTED
bd5c: e2850008 add r0, r5, #8 <== NOT EXECUTED
bd60: ebffee23 bl 75f4 <_Chain_Append> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
bd64: e5c4b00c strb fp, [r4, #12] <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
bd68: ebfffd20 bl b1f0 <rtems_bdbuf_swapout_writereq_alloc> <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
bd6c: e2863061 add r3, r6, #97 ; 0x61 <== NOT EXECUTED
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
bd70: e5840028 str r0, [r4, #40] ; 0x28 <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
bd74: e3830442 orr r0, r3, #1107296256 ; 0x42000000 <== NOT EXECUTED
bd78: e3580000 cmp r8, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
bd7c: e2842014 add r2, r4, #20 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
bd80: e2843010 add r3, r4, #16 <== NOT EXECUTED
bd84: e3800711 orr r0, r0, #4456448 ; 0x440000 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
bd88: e5842010 str r2, [r4, #16] <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
bd8c: e5843018 str r3, [r4, #24] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
bd90: e5847014 str r7, [r4, #20] <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
bd94: e584901c str r9, [r4, #28] <== NOT EXECUTED
bd98: e584a020 str sl, [r4, #32] <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
bd9c: 11a01008 movne r1, r8 <== NOT EXECUTED
bda0: 03a0100f moveq r1, #15 <== NOT EXECUTED
bda4: e284c008 add ip, r4, #8 <== NOT EXECUTED
bda8: e3800c6f orr r0, r0, #28416 ; 0x6f00 <== NOT EXECUTED
bdac: e3a02a02 mov r2, #8192 ; 0x2000 <== NOT EXECUTED
bdb0: e3a03b01 mov r3, #1024 ; 0x400 <== NOT EXECUTED
bdb4: e88d1080 stm sp, {r7, ip} <== NOT EXECUTED
bdb8: ebffebc8 bl 6ce0 <rtems_task_create> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
bdbc: e3500000 cmp r0, #0 <== NOT EXECUTED
bdc0: 1a00008a bne bff0 <rtems_bdbuf_swapout_task+0x348> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
bdc4: e1a02004 mov r2, r4 <== NOT EXECUTED
bdc8: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
bdcc: e59f1240 ldr r1, [pc, #576] ; c014 <rtems_bdbuf_swapout_task+0x36c><== NOT EXECUTED
bdd0: ebffec54 bl 6f28 <rtems_task_start> <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
bdd4: e3500000 cmp r0, #0 <== NOT EXECUTED
bdd8: 1a000081 bne bfe4 <rtems_bdbuf_swapout_task+0x33c> <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
bddc: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
bde0: e2866001 add r6, r6, #1 <== NOT EXECUTED
bde4: e1560002 cmp r6, r2 <== NOT EXECUTED
bde8: 3affffd5 bcc bd44 <rtems_bdbuf_swapout_task+0x9c> <== NOT EXECUTED
bdec: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
bdf0: ebfffae1 bl a97c <rtems_bdbuf_unlock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
bdf4: e3a0b000 mov fp, #0
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
bdf8: e5d53004 ldrb r3, [r5, #4]
bdfc: e21330ff ands r3, r3, #255 ; 0xff
be00: e59f4208 ldr r4, [pc, #520] ; c010 <rtems_bdbuf_swapout_task+0x368>
be04: 0a00005f beq bf88 <rtems_bdbuf_swapout_task+0x2e0>
be08: e3a0a001 mov sl, #1
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
be0c: ebfffa5f bl a790 <rtems_bdbuf_lock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
be10: e5d53030 ldrb r3, [r5, #48] ; 0x30
be14: e3530000 cmp r3, #0
be18: 13a08000 movne r8, #0
be1c: 128d4014 addne r4, sp, #20
be20: 0a00004f beq bf64 <rtems_bdbuf_swapout_task+0x2bc>
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
be24: e5d53030 ldrb r3, [r5, #48] ; 0x30
be28: e5c43014 strb r3, [r4, #20]
/*
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
be2c: e5d53030 ldrb r3, [r5, #48] ; 0x30
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
be30: e2847004 add r7, r4, #4
be34: e3530000 cmp r3, #0
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
be38: e3e01000 mvn r1, #0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
be3c: e3a03000 mov r3, #0
be40: e3e02000 mvn r2, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
be44: e5847000 str r7, [r4]
the_chain->permanent_null = NULL;
be48: e9840018 stmib r4, {r3, r4}
be4c: e584100c str r1, [r4, #12]
be50: e5842010 str r2, [r4, #16]
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
transfer->dev = bdbuf_cache.sync_device;
be54: 159f11b4 ldrne r1, [pc, #436] ; c010 <rtems_bdbuf_swapout_task+0x368>
be58: 12813038 addne r3, r1, #56 ; 0x38
be5c: 1893000c ldmne r3, {r2, r3}
be60: 1584200c strne r2, [r4, #12]
be64: 15843010 strne r3, [r4, #16]
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
be68: e284600c add r6, r4, #12
be6c: e1a02004 mov r2, r4
be70: e1a00006 mov r0, r6
be74: e59f119c ldr r1, [pc, #412] ; c018 <rtems_bdbuf_swapout_task+0x370>
be78: e3a03001 mov r3, #1
be7c: e58db000 str fp, [sp]
be80: e58d9004 str r9, [sp, #4]
be84: ebfffa52 bl a7d4 <rtems_bdbuf_swapout_modified_processing>
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
&bdbuf_cache.modified,
&transfer->bds,
bdbuf_cache.sync_active,
be88: e5d53030 ldrb r3, [r5, #48] ; 0x30
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
be8c: e1a02004 mov r2, r4
be90: e1a00006 mov r0, r6
be94: e59f1180 ldr r1, [pc, #384] ; c01c <rtems_bdbuf_swapout_task+0x374>
be98: e58da000 str sl, [sp]
be9c: e58d9004 str r9, [sp, #4]
bea0: ebfffa4b bl a7d4 <rtems_bdbuf_swapout_modified_processing>
/*
* We have all the buffers that have been modified for this device so the
* cache can be unlocked because the state of each buffer has been set to
* TRANSFER.
*/
rtems_bdbuf_unlock_cache ();
bea4: ebfffab4 bl a97c <rtems_bdbuf_unlock_cache>
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
bea8: e5943000 ldr r3, [r4]
beac: e1570003 cmp r7, r3
beb0: 01a0400b moveq r4, fp
beb4: 0a000007 beq bed8 <rtems_bdbuf_swapout_task+0x230>
{
if (worker)
beb8: e3580000 cmp r8, #0
bebc: 0a00002e beq bf7c <rtems_bdbuf_swapout_task+0x2d4>
{
rtems_status_code sc = rtems_event_send (worker->id,
bec0: e5980008 ldr r0, [r8, #8] <== NOT EXECUTED
bec4: e3a01004 mov r1, #4 <== NOT EXECUTED
bec8: ebffe9ec bl 6680 <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
becc: e3500000 cmp r0, #0 <== NOT EXECUTED
bed0: 1a000040 bne bfd8 <rtems_bdbuf_swapout_task+0x330> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
bed4: e3a04001 mov r4, #1
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
bed8: e5d5a030 ldrb sl, [r5, #48] ; 0x30
bedc: e21aa0ff ands sl, sl, #255 ; 0xff
bee0: 0a000017 beq bf44 <rtems_bdbuf_swapout_task+0x29c>
bee4: e3540000 cmp r4, #0
bee8: e3a0a000 mov sl, #0
beec: 1affffc6 bne be0c <rtems_bdbuf_swapout_task+0x164>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
bef0: ebfffa26 bl a790 <rtems_bdbuf_lock_cache>
sync_requester = bdbuf_cache.sync_requester;
bef4: e59f2114 ldr r2, [pc, #276] ; c010 <rtems_bdbuf_swapout_task+0x368>
bef8: e5926034 ldr r6, [r2, #52] ; 0x34
bdbuf_cache.sync_active = false;
befc: e5c24030 strb r4, [r2, #48] ; 0x30
bdbuf_cache.sync_requester = 0;
bf00: e5824034 str r4, [r2, #52] ; 0x34
rtems_bdbuf_unlock_cache ();
bf04: ebfffa9c bl a97c <rtems_bdbuf_unlock_cache>
if (sync_requester)
bf08: e156000a cmp r6, sl
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
bf0c: 11a00006 movne r0, r6
bf10: 13a01002 movne r1, #2
bf14: 1bffe9d9 blne 6680 <rtems_event_send>
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
bf18: e3a00004 mov r0, #4
bf1c: e3a01000 mov r1, #0
bf20: e59d200c ldr r2, [sp, #12]
bf24: e28d3034 add r3, sp, #52 ; 0x34
bf28: ebffe976 bl 6508 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
bf2c: e3500006 cmp r0, #6
bf30: 13500000 cmpne r0, #0
bf34: 0affffaf beq bdf8 <rtems_bdbuf_swapout_task+0x150>
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
bf38: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bf3c: e2800018 add r0, r0, #24 <== NOT EXECUTED
bf40: ebffec6d bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
bf44: e3540000 cmp r4, #0
bf48: 0afffff2 beq bf18 <rtems_bdbuf_swapout_task+0x270>
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
bf4c: ebfffa0f bl a790 <rtems_bdbuf_lock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
bf50: e5d53030 ldrb r3, [r5, #48] ; 0x30
bf54: e3530000 cmp r3, #0
bf58: 13a08000 movne r8, #0
bf5c: 128d4014 addne r4, sp, #20
bf60: 1affffaf bne be24 <rtems_bdbuf_swapout_task+0x17c>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
bf64: e59f00b4 ldr r0, [pc, #180] ; c020 <rtems_bdbuf_swapout_task+0x378>
bf68: ebffedb5 bl 7644 <_Chain_Get>
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
bf6c: e2508000 subs r8, r0, #0
bf70: 028d4014 addeq r4, sp, #20
transfer = &worker->transfer;
bf74: 12884010 addne r4, r8, #16
bf78: eaffffa9 b be24 <rtems_bdbuf_swapout_task+0x17c>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
bf7c: e1a00004 mov r0, r4
bf80: ebfffedd bl bafc <rtems_bdbuf_swapout_write>
bf84: eaffffd2 b bed4 <rtems_bdbuf_swapout_task+0x22c>
bf88: e1a06003 mov r6, r3 <== NOT EXECUTED
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
bf8c: ebfff9ff bl a790 <rtems_bdbuf_lock_cache> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
bf90: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
bf94: e284400c add r4, r4, #12 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
bf98: e1550004 cmp r5, r4 <== NOT EXECUTED
bf9c: 0a000006 beq bfbc <rtems_bdbuf_swapout_task+0x314> <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
bfa0: e5c5600c strb r6, [r5, #12] <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
bfa4: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
bfa8: e3a01004 mov r1, #4 <== NOT EXECUTED
bfac: ebffe9b3 bl 6680 <rtems_event_send> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
bfb0: e5955000 ldr r5, [r5] <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
bfb4: e1550004 cmp r5, r4 <== NOT EXECUTED
bfb8: 1afffff8 bne bfa0 <rtems_bdbuf_swapout_task+0x2f8> <== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
bfbc: ebfffa6e bl a97c <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
bfc0: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
bfc4: ebffdc4d bl 3100 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
bfc8: e3a00000 mov r0, #0 <== NOT EXECUTED
bfcc: ebffeb91 bl 6e18 <rtems_task_delete> <== NOT EXECUTED
}
bfd0: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
bfd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
bfd8: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bfdc: e2800014 add r0, r0, #20 <== NOT EXECUTED
bfe0: ebffec45 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
bfe4: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bfe8: e2800017 add r0, r0, #23 <== NOT EXECUTED
bfec: ebffec42 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
bff0: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bff4: e2800016 add r0, r0, #22 <== NOT EXECUTED
bff8: ebffec3f bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
bffc: e2800442 add r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c000: e2800015 add r0, r0, #21 <== NOT EXECUTED
c004: ebffec3c bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000c024 <rtems_bdbuf_swapout_worker_task>:
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
c024: e5d0300c ldrb r3, [r0, #12] <== NOT EXECUTED
c028: e3530000 cmp r3, #0 <== NOT EXECUTED
* @param arg A pointer to the worker thread's private data.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
c02c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
c030: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
c034: 0a000015 beq c090 <rtems_bdbuf_swapout_worker_task+0x6c> <== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
c038: e2805010 add r5, r0, #16 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
c03c: e280a014 add sl, r0, #20 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
c040: e3a08000 mov r8, #0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
c044: e3e06000 mvn r6, #0 <== NOT EXECUTED
c048: e3e07000 mvn r7, #0 <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
c04c: e3a00004 mov r0, #4 <== NOT EXECUTED
c050: ebfffae4 bl abe8 <rtems_bdbuf_wait_for_event> <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
c054: e1a00005 mov r0, r5 <== NOT EXECUTED
c058: ebfffea7 bl bafc <rtems_bdbuf_swapout_write> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
c05c: ebfff9cb bl a790 <rtems_bdbuf_lock_cache> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
c060: e59f0044 ldr r0, [pc, #68] ; c0ac <rtems_bdbuf_swapout_worker_task+0x88><== NOT EXECUTED
c064: e1a01004 mov r1, r4 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
c068: e584a010 str sl, [r4, #16] <== NOT EXECUTED
the_chain->permanent_null = NULL;
c06c: e5848014 str r8, [r4, #20] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
c070: e5845018 str r5, [r4, #24] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
c074: e584601c str r6, [r4, #28] <== NOT EXECUTED
c078: e5847020 str r7, [r4, #32] <== NOT EXECUTED
c07c: ebffed5c bl 75f4 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
c080: ebfffa3d bl a97c <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
c084: e5d4300c ldrb r3, [r4, #12] <== NOT EXECUTED
c088: e3530000 cmp r3, #0 <== NOT EXECUTED
c08c: 1affffee bne c04c <rtems_bdbuf_swapout_worker_task+0x28> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
c090: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
c094: ebffdc19 bl 3100 <free> <== NOT EXECUTED
free (worker);
c098: e1a00004 mov r0, r4 <== NOT EXECUTED
c09c: ebffdc17 bl 3100 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
c0a0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
c0a4: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
c0a8: eaffeb5a b 6e18 <rtems_task_delete> <== NOT EXECUTED
0000bafc <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
bafc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
bb00: e5903000 ldr r3, [r0]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
bb04: e2807004 add r7, r0, #4
bb08: e1530007 cmp r3, r7
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
bb0c: e24dd004 sub sp, sp, #4
bb10: e1a04000 mov r4, r0
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
bb14: 0a00005b beq bc88 <rtems_bdbuf_swapout_write+0x18c>
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
bb18: e280100c add r1, r0, #12
bb1c: e8910003 ldm r1, {r0, r1}
bb20: ebffd95a bl 2090 <rtems_disk_obtain>
if (dd == NULL)
bb24: e2505000 subs r5, r0, #0
bb28: 059f3170 ldreq r3, [pc, #368] ; bca0 <rtems_bdbuf_swapout_write+0x1a4>
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
bb2c: e59f8170 ldr r8, [pc, #368] ; bca4 <rtems_bdbuf_swapout_write+0x1a8>
bb30: 159f3168 ldrne r3, [pc, #360] ; bca0 <rtems_bdbuf_swapout_write+0x1a4>
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
bb34: 01a05003 moveq r5, r3
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
bb38: e5950020 ldr r0, [r5, #32]
bb3c: e5981020 ldr r1, [r8, #32]
bb40: 158d3000 strne r3, [sp]
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
bb44: 058d3000 streq r3, [sp]
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
bb48: eb0043cf bl 1ca8c <__aeabi_uidiv>
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
bb4c: e5943018 ldr r3, [r4, #24]
transfer->write_req->bufnum = 0;
bb50: e3a02000 mov r2, #0
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
bb54: e3a0a00c mov sl, #12
transfer->write_req->bufnum = 0;
bb58: e5832010 str r2, [r3, #16]
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
bb5c: e583a00c str sl, [r3, #12]
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
bb60: e5988004 ldr r8, [r8, #4]
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
bb64: e1a0b000 mov fp, r0
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
bb68: e1a06002 mov r6, r2
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
last_block = bd->block;
bb6c: e1a09002 mov r9, r2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
bb70: e1a00004 mov r0, r4
bb74: ebffeeb2 bl 7644 <_Chain_Get>
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
bb78: e2502000 subs r2, r0, #0
bb7c: 0a000020 beq bc04 <rtems_bdbuf_swapout_write+0x108>
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
bb80: e5953008 ldr r3, [r5, #8]
bb84: e593300c ldr r3, [r3, #12]
bb88: e3130001 tst r3, #1
bb8c: 0a00002a beq bc3c <rtems_bdbuf_swapout_write+0x140>
transfer->write_req->bufnum &&
bb90: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
bb94: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
bb98: e3530000 cmp r3, #0 <== NOT EXECUTED
bb9c: 0a000028 beq bc44 <rtems_bdbuf_swapout_write+0x148> <== NOT EXECUTED
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
bba0: e592c01c ldr ip, [r2, #28] <== NOT EXECUTED
bba4: e086000b add r0, r6, fp <== NOT EXECUTED
bba8: e15c0000 cmp ip, r0 <== NOT EXECUTED
bbac: 0a000024 beq bc44 <rtems_bdbuf_swapout_write+0x148> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
bbb0: e1a01002 mov r1, r2 <== NOT EXECUTED
bbb4: e1a00004 mov r0, r4 <== NOT EXECUTED
bbb8: eb0011f4 bl 10390 <_Chain_Insert> <== NOT EXECUTED
bbbc: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
bbc0: e3a02001 mov r2, #1 <== NOT EXECUTED
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
bbc4: e5943000 ldr r3, [r4]
bbc8: e1570003 cmp r7, r3
bbcc: 0a000002 beq bbdc <rtems_bdbuf_swapout_write+0xe0>
bbd0: e5913010 ldr r3, [r1, #16]
bbd4: e1530008 cmp r3, r8
bbd8: 3a000027 bcc bc7c <rtems_bdbuf_swapout_write+0x180>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
bbdc: e3a02000 mov r2, #0
bbe0: e1a00005 mov r0, r5
bbe4: ebffff6f bl b9a8 <rtems_bdbuf_execute_transfer_request>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
bbe8: e5943018 ldr r3, [r4, #24]
bbec: e1a00004 mov r0, r4
transfer->write_req->bufnum = 0;
bbf0: e5839010 str r9, [r3, #16]
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
bbf4: e583a00c str sl, [r3, #12]
bbf8: ebffee91 bl 7644 <_Chain_Get>
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
bbfc: e2502000 subs r2, r0, #0
bc00: 1affffde bne bb80 <rtems_bdbuf_swapout_write+0x84>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
bc04: e59d3000 ldr r3, [sp]
bc08: e1550003 cmp r5, r3
bc0c: 0a00001d beq bc88 <rtems_bdbuf_swapout_write+0x18c>
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
bc10: e5d43014 ldrb r3, [r4, #20]
bc14: e3530000 cmp r3, #0
bc18: 0a000003 beq bc2c <rtems_bdbuf_swapout_write+0x130>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
bc1c: e5950008 ldr r0, [r5, #8]
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
bc20: e590300c ldr r3, [r0, #12]
bc24: e3130002 tst r3, #2
bc28: 1a000018 bne bc90 <rtems_bdbuf_swapout_write+0x194>
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
bc2c: e1a00005 mov r0, r5
}
}
}
bc30: e28dd004 add sp, sp, #4
bc34: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr}
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
bc38: eaffd9a8 b 22e0 <rtems_disk_release>
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
bc3c: e5941018 ldr r1, [r4, #24]
bc40: e5913010 ldr r3, [r1, #16]
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
bc44: e2830001 add r0, r3, #1
bc48: e5810010 str r0, [r1, #16]
buf->user = bd;
buf->block = bd->block;
bc4c: e592c01c ldr ip, [r2, #28]
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
bc50: e0810203 add r0, r1, r3, lsl #4
buf->block = bd->block;
bc54: e580c018 str ip, [r0, #24]
buf->length = dd->block_size;
bc58: e595c020 ldr ip, [r5, #32]
bc5c: e580c01c str ip, [r0, #28]
buf->buffer = bd->buffer;
bc60: e592c020 ldr ip, [r2, #32]
bc64: e2833002 add r3, r3, #2
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
bc68: e5802024 str r2, [r0, #36] ; 0x24
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
last_block = bd->block;
bc6c: e592601c ldr r6, [r2, #28]
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
bc70: e781c203 str ip, [r1, r3, lsl #4]
last_block = bd->block;
bc74: e3a02000 mov r2, #0
bc78: eaffffd1 b bbc4 <rtems_bdbuf_swapout_write+0xc8>
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
bc7c: e3520000 cmp r2, #0
bc80: 0affffba beq bb70 <rtems_bdbuf_swapout_write+0x74>
bc84: eaffffd4 b bbdc <rtems_bdbuf_swapout_write+0xe0> <== NOT EXECUTED
}
rtems_disk_release (dd);
}
}
}
bc88: e28dd004 add sp, sp, #4 <== NOT EXECUTED
bc8c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
bc90: e3a01002 mov r1, #2 <== NOT EXECUTED
bc94: e1a0e00f mov lr, pc <== NOT EXECUTED
bc98: e595f028 ldr pc, [r5, #40] ; 0x28 <== NOT EXECUTED
bc9c: eaffffe2 b bc2c <rtems_bdbuf_swapout_write+0x130> <== NOT EXECUTED
0000b1f0 <rtems_bdbuf_swapout_writereq_alloc>:
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
b1f0: e59f3044 ldr r3, [pc, #68] ; b23c <rtems_bdbuf_swapout_writereq_alloc+0x4c>
b1f4: e5930004 ldr r0, [r3, #4]
b1f8: e1a00200 lsl r0, r0, #4
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
b1fc: e92d4010 push {r4, lr}
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
b200: e2800018 add r0, r0, #24
b204: ebffe096 bl 3464 <malloc>
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
b208: e2504000 subs r4, r0, #0
b20c: 0a000007 beq b230 <rtems_bdbuf_swapout_writereq_alloc+0x40>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
b210: e3a03001 mov r3, #1
b214: e5843000 str r3, [r4]
write_req->req_done = rtems_bdbuf_transfer_done;
b218: e59f3020 ldr r3, [pc, #32] ; b240 <rtems_bdbuf_swapout_writereq_alloc+0x50>
write_req->done_arg = write_req;
b21c: e9840018 stmib r4, {r3, r4}
write_req->io_task = rtems_task_self ();
b220: eb001385 bl 1003c <rtems_task_self>
b224: e5840014 str r0, [r4, #20]
return write_req;
}
b228: e1a00004 mov r0, r4
b22c: e8bd8010 pop {r4, pc}
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
b230: e2800442 add r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b234: e2800015 add r0, r0, #21 <== NOT EXECUTED
b238: ebffefaf bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000c0b0 <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
c0b0: e92d4030 push {r4, r5, lr}
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
c0b4: e59f5150 ldr r5, [pc, #336] ; c20c <rtems_bdbuf_sync+0x15c>
c0b8: e5d53088 ldrb r3, [r5, #136] ; 0x88
c0bc: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
c0c0: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
c0c4: 03a00016 moveq r0, #22
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
c0c8: 08bd8030 popeq {r4, r5, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
c0cc: e3540000 cmp r4, #0
c0d0: 03a00009 moveq r0, #9
c0d4: 08bd8030 popeq {r4, r5, pc}
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
c0d8: ebfff9ac bl a790 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
c0dc: e5943024 ldr r3, [r4, #36] ; 0x24
c0e0: e3530003 cmp r3, #3
c0e4: 3a000003 bcc c0f8 <rtems_bdbuf_sync+0x48>
c0e8: e3530005 cmp r3, #5
c0ec: 9a00000b bls c120 <rtems_bdbuf_sync+0x70>
c0f0: e3530006 cmp r3, #6
c0f4: 0a000004 beq c10c <rtems_bdbuf_sync+0x5c>
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
c0f8: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
c0fc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
c100: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c104: e3800003 orr r0, r0, #3 <== NOT EXECUTED
c108: ebffebfb bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
c10c: e1a00004 mov r0, r4
c110: ebfffd3c bl b608 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
c114: ebfffa18 bl a97c <rtems_bdbuf_unlock_cache>
c118: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
c11c: e8bd8030 pop {r4, r5, pc}
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c120: e3a03008 mov r3, #8
c124: e5843024 str r3, [r4, #36] ; 0x24
c128: e285005c add r0, r5, #92 ; 0x5c
c12c: e1a01004 mov r1, r4
c130: ebffed2f bl 75f4 <_Chain_Append>
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
c134: e5943028 ldr r3, [r4, #40] ; 0x28
c138: e3530000 cmp r3, #0
c13c: 1a000027 bne c1e0 <rtems_bdbuf_sync+0x130>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
c140: ebfffa66 bl aae0 <rtems_bdbuf_wake_swapper>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
c144: e5943024 ldr r3, [r4, #36] ; 0x24
c148: e2433001 sub r3, r3, #1
c14c: e3530009 cmp r3, #9
c150: 979ff103 ldrls pc, [pc, r3, lsl #2]
c154: ea00001c b c1cc <rtems_bdbuf_sync+0x11c> <== NOT EXECUTED
c158: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c15c: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c160: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c164: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c168: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c16c: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c170: 0000c190 .word 0x0000c190 <== NOT EXECUTED
c174: 0000c180 .word 0x0000c180 <== NOT EXECUTED
c178: 0000c180 .word 0x0000c180 <== NOT EXECUTED
c17c: 0000c180 .word 0x0000c180 <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
c180: e1a00004 mov r0, r4
c184: e59f1084 ldr r1, [pc, #132] ; c210 <rtems_bdbuf_sync+0x160>
c188: ebfffb0a bl adb8 <rtems_bdbuf_wait>
c18c: eaffffec b c144 <rtems_bdbuf_sync+0x94>
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
c190: e5943028 ldr r3, [r4, #40] ; 0x28
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
c194: e3530000 cmp r3, #0
c198: 1affffdd bne c114 <rtems_bdbuf_sync+0x64>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
c19c: e5943024 ldr r3, [r4, #36] ; 0x24
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
c1a0: e3530002 cmp r3, #2
c1a4: 0a000002 beq c1b4 <rtems_bdbuf_sync+0x104>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
c1a8: e5943024 ldr r3, [r4, #36] ; 0x24
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
c1ac: e3530001 cmp r3, #1
c1b0: 1affffd7 bne c114 <rtems_bdbuf_sync+0x64>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
c1b4: e5943024 ldr r3, [r4, #36] ; 0x24
c1b8: e3530001 cmp r3, #1
c1bc: 0a00000a beq c1ec <rtems_bdbuf_sync+0x13c>
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
c1c0: e59f004c ldr r0, [pc, #76] ; c214 <rtems_bdbuf_sync+0x164>
c1c4: ebfff977 bl a7a8 <rtems_bdbuf_wake>
c1c8: eaffffd1 b c114 <rtems_bdbuf_sync+0x64>
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
c1cc: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
c1d0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
c1d4: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
c1d8: e3800007 orr r0, r0, #7 <== NOT EXECUTED
c1dc: ebffebc6 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
c1e0: e2850068 add r0, r5, #104 ; 0x68
c1e4: ebfff96f bl a7a8 <rtems_bdbuf_wake>
c1e8: eaffffd4 b c140 <rtems_bdbuf_sync+0x90>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
c1ec: e1a00004 mov r0, r4
c1f0: ebfffc13 bl b244 <rtems_bdbuf_remove_from_tree>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
c1f4: e3a03000 mov r3, #0
c1f8: e5843024 str r3, [r4, #36] ; 0x24
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
c1fc: e1a01004 mov r1, r4
c200: e59f0010 ldr r0, [pc, #16] ; c218 <rtems_bdbuf_sync+0x168>
c204: eb001061 bl 10390 <_Chain_Insert>
c208: eaffffec b c1c0 <rtems_bdbuf_sync+0x110>
0000a97c <rtems_bdbuf_unlock_cache>:
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
a97c: e59f301c ldr r3, [pc, #28] ; a9a0 <rtems_bdbuf_unlock_cache+0x24>
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
a980: e52de004 push {lr} ; (str lr, [sp, #-4]!)
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
a984: e5930028 ldr r0, [r3, #40] ; 0x28
a988: ebfff0aa bl 6c38 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
a98c: e3500000 cmp r0, #0
a990: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (fatal_error_code);
a994: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
a998: e280000e add r0, r0, #14 <== NOT EXECUTED
a99c: ebfff1d6 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a9a4 <rtems_bdbuf_unlock_sync>:
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
a9a4: e59f301c ldr r3, [pc, #28] ; a9c8 <rtems_bdbuf_unlock_sync+0x24>
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
a9a8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
a9ac: e593002c ldr r0, [r3, #44] ; 0x2c
a9b0: ebfff0a0 bl 6c38 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
a9b4: e3500000 cmp r0, #0
a9b8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (fatal_error_code);
a9bc: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
a9c0: e280000c add r0, r0, #12 <== NOT EXECUTED
a9c4: ebfff1cc bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000abe8 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
abe8: e92d4010 push {r4, lr}
abec: e24dd004 sub sp, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
abf0: e3a01000 mov r1, #0
abf4: e28d3004 add r3, sp, #4
abf8: e5231004 str r1, [r3, #-4]!
sc = rtems_event_receive (event,
abfc: e1a02001 mov r2, r1
ac00: e1a0300d mov r3, sp
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
ac04: e1a04000 mov r4, r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
ac08: ebffee3e bl 6508 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
ac0c: e3500000 cmp r0, #0
ac10: 1a000004 bne ac28 <rtems_bdbuf_wait_for_event+0x40>
ac14: e59d3000 ldr r3, [sp]
ac18: e1530004 cmp r3, r4
ac1c: 1a000001 bne ac28 <rtems_bdbuf_wait_for_event+0x40>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
}
ac20: e28dd004 add sp, sp, #4
ac24: e8bd8010 pop {r4, pc}
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
ac28: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ac2c: e280001a add r0, r0, #26 <== NOT EXECUTED
ac30: ebfff131 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a7a8 <rtems_bdbuf_wake>:
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
a7a8: e5903000 ldr r3, [r0]
a7ac: e3530000 cmp r3, #0
* Wake a blocked resource. The resource has a counter that lets us know if
* there are any waiters.
*/
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
a7b0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
a7b4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
{
sc = rtems_semaphore_flush (waiters->sema);
a7b8: e5900004 ldr r0, [r0, #4]
a7bc: eb001599 bl fe28 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
a7c0: e3500000 cmp r0, #0
a7c4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
a7c8: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
a7cc: e2800013 add r0, r0, #19 <== NOT EXECUTED
a7d0: ebfff249 bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
0000aae0 <rtems_bdbuf_wake_swapper>:
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
aae0: e59f3020 ldr r3, [pc, #32] ; ab08 <rtems_bdbuf_wake_swapper+0x28>
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
aae4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
aae8: e5930000 ldr r0, [r3]
aaec: e3a01004 mov r1, #4
aaf0: ebffeee2 bl 6680 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
aaf4: e3500000 cmp r0, #0
aaf8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
aafc: e3a00442 mov r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ab00: e2800014 add r0, r0, #20 <== NOT EXECUTED
ab04: ebfff17c bl 70fc <rtems_fatal_error_occurred> <== NOT EXECUTED
00023f18 <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
23f18: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
23f1c: e2514000 subs r4, r1, #0 <== NOT EXECUTED
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
23f20: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
23f24: e1a05002 mov r5, r2 <== NOT EXECUTED
23f28: e1a07003 mov r7, r3 <== NOT EXECUTED
23f2c: e59d604c ldr r6, [sp, #76] ; 0x4c <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
23f30: 0a000002 beq 23f40 <rtems_bdpart_create+0x28> <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
23f34: e5943000 ldr r3, [r4] <== NOT EXECUTED
23f38: e3530000 cmp r3, #0 <== NOT EXECUTED
23f3c: 0a000073 beq 24110 <rtems_bdpart_create+0x1f8> <== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
23f40: e3a0b000 mov fp, #0 <== NOT EXECUTED
23f44: e58db024 str fp, [sp, #36] ; 0x24 <== NOT EXECUTED
23f48: e3a08001 mov r8, #1 <== NOT EXECUTED
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
23f4c: e3560000 cmp r6, #0 <== NOT EXECUTED
23f50: 01a09006 moveq r9, r6 <== NOT EXECUTED
23f54: 0a00006a beq 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
23f58: e3540000 cmp r4, #0 <== NOT EXECUTED
23f5c: 13550000 cmpne r5, #0 <== NOT EXECUTED
23f60: 0a000071 beq 2412c <rtems_bdpart_create+0x214> <== NOT EXECUTED
23f64: e3570000 cmp r7, #0 <== NOT EXECUTED
23f68: 0a00006f beq 2412c <rtems_bdpart_create+0x214> <== NOT EXECUTED
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
rtems_blkdev_bnum overhead = 0;
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
23f6c: e3a09000 mov r9, #0 <== NOT EXECUTED
if (format == NULL || pt == NULL || dist == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
23f70: e28d101c add r1, sp, #28 <== NOT EXECUTED
23f74: e28d2024 add r2, sp, #36 ; 0x24 <== NOT EXECUTED
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
rtems_blkdev_bnum overhead = 0;
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
23f78: e3a0a000 mov sl, #0 <== NOT EXECUTED
23f7c: e58d901c str r9, [sp, #28] <== NOT EXECUTED
23f80: e58da020 str sl, [sp, #32] <== NOT EXECUTED
if (format == NULL || pt == NULL || dist == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
23f84: eb00019c bl 245fc <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
23f88: e2509000 subs r9, r0, #0 <== NOT EXECUTED
23f8c: 1a00005c bne 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
23f90: e5973000 ldr r3, [r7] <== NOT EXECUTED
if (dist_sum < prev_sum) {
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
23f94: e3530000 cmp r3, #0 <== NOT EXECUTED
23f98: 11a0a003 movne sl, r3 <== NOT EXECUTED
23f9c: 11a02009 movne r2, r9 <== NOT EXECUTED
23fa0: 1a000005 bne 23fbc <rtems_bdpart_create+0xa4> <== NOT EXECUTED
23fa4: ea000062 b 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
23fa8: e7971102 ldr r1, [r7, r2, lsl #2] <== NOT EXECUTED
if (dist_sum < prev_sum) {
23fac: e09aa001 adds sl, sl, r1 <== NOT EXECUTED
23fb0: 2a00005f bcs 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
23fb4: e3510000 cmp r1, #0 <== NOT EXECUTED
23fb8: 0a00005d beq 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
23fbc: e2822001 add r2, r2, #1 <== NOT EXECUTED
23fc0: e1560002 cmp r6, r2 <== NOT EXECUTED
23fc4: 8afffff7 bhi 23fa8 <rtems_bdpart_create+0x90> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
23fc8: e5942000 ldr r2, [r4] <== NOT EXECUTED
23fcc: e3520000 cmp r2, #0 <== NOT EXECUTED
23fd0: 13a09018 movne r9, #24 <== NOT EXECUTED
23fd4: 1a00004a bne 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
23fd8: e35b0000 cmp fp, #0 <== NOT EXECUTED
23fdc: 1a000056 bne 2413c <rtems_bdpart_create+0x224> <== NOT EXECUTED
23fe0: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
23fe4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
23fe8: e3560004 cmp r6, #4 <== NOT EXECUTED
overhead += (count - 3) * record_space;
23fec: 82461003 subhi r1, r6, #3 <== NOT EXECUTED
23ff0: 80228891 mlahi r2, r1, r8, r8 <== NOT EXECUTED
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
23ff4: 91a02008 movls r2, r8 <== NOT EXECUTED
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
23ff8: e35b0000 cmp fp, #0 <== NOT EXECUTED
overhead += (count - 1) * record_space;
23ffc: 12461001 subne r1, r6, #1 <== NOT EXECUTED
24000: 10222891 mlane r2, r1, r8, r2 <== NOT EXECUTED
}
/* Check disk space */
if ((overhead + count) > disk_end) {
24004: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
24008: e0821006 add r1, r2, r6 <== NOT EXECUTED
2400c: e1510000 cmp r1, r0 <== NOT EXECUTED
24010: 83a0901b movhi r9, #27 <== NOT EXECUTED
24014: 8a00003a bhi 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
24018: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
2401c: e0621000 rsb r1, r2, r0 <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
24020: e0000193 mul r0, r3, r1 <== NOT EXECUTED
if (s < free_space || s < dist [i]) {
24024: e1510000 cmp r1, r0 <== NOT EXECUTED
24028: 8a000041 bhi 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
2402c: e1500003 cmp r0, r3 <== NOT EXECUTED
24030: 3a00003f bcc 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
24034: e3560004 cmp r6, #4 <== NOT EXECUTED
24038: 93a02000 movls r2, #0 <== NOT EXECUTED
2403c: 83a02001 movhi r2, #1 <== NOT EXECUTED
24040: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
24044: e1a02005 mov r2, r5 <== NOT EXECUTED
24048: e58d9014 str r9, [sp, #20] <== NOT EXECUTED
2404c: e58d700c str r7, [sp, #12] <== NOT EXECUTED
24050: e1a0b008 mov fp, r8 <== NOT EXECUTED
24054: e3a04000 mov r4, #0 <== NOT EXECUTED
24058: e58da008 str sl, [sp, #8] <== NOT EXECUTED
2405c: e1a09001 mov r9, r1 <== NOT EXECUTED
24060: e58d5018 str r5, [sp, #24] <== NOT EXECUTED
24064: e1a07002 mov r7, r2 <== NOT EXECUTED
24068: ea000008 b 24090 <rtems_bdpart_create+0x178> <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
2406c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
24070: e7903104 ldr r3, [r0, r4, lsl #2] <== NOT EXECUTED
24074: e0000993 mul r0, r3, r9 <== NOT EXECUTED
if (s < free_space || s < dist [i]) {
24078: e1590000 cmp r9, r0 <== NOT EXECUTED
2407c: 8a00002c bhi 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
24080: e1530000 cmp r3, r0 <== NOT EXECUTED
24084: e2877030 add r7, r7, #48 ; 0x30 <== NOT EXECUTED
24088: 8a000029 bhi 24134 <rtems_bdpart_create+0x21c> <== NOT EXECUTED
2408c: e1a05007 mov r5, r7 <== NOT EXECUTED
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
24090: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
24094: eb00e138 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
/* Ensure that the partition is not empty */
if (s == 0) {
24098: e3500000 cmp r0, #0 <== NOT EXECUTED
2409c: 11a03000 movne r3, r0 <== NOT EXECUTED
240a0: 03a03001 moveq r3, #1 <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
240a4: e585b000 str fp, [r5] <== NOT EXECUTED
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
240a8: e08ba008 add sl, fp, r8 <== NOT EXECUTED
/* Partition begin and end */
p->begin = pos;
pos += s;
240ac: e1a00003 mov r0, r3 <== NOT EXECUTED
240b0: e1a01008 mov r1, r8 <== NOT EXECUTED
240b4: e083b00a add fp, r3, sl <== NOT EXECUTED
240b8: eb00e1c3 bl 5c7cc <__umodsi3> <== NOT EXECUTED
p->end = pos;
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
240bc: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
240c0: e3540002 cmp r4, #2 <== NOT EXECUTED
240c4: 93a03000 movls r3, #0 <== NOT EXECUTED
240c8: 82033001 andhi r3, r3, #1 <== NOT EXECUTED
240cc: e3530000 cmp r3, #0 <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
240d0: e2844001 add r4, r4, #1 <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
pos += s;
240d4: e060b00b rsb fp, r0, fp <== NOT EXECUTED
p->end = pos;
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
p->begin += record_space;
240d8: 1585a000 strne sl, [r5] <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
240dc: e1560004 cmp r6, r4 <== NOT EXECUTED
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
pos += s;
p->end = pos;
240e0: e585b004 str fp, [r5, #4] <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
240e4: 8affffe0 bhi 2406c <rtems_bdpart_create+0x154> <== NOT EXECUTED
240e8: e59d5018 ldr r5, [sp, #24] <== NOT EXECUTED
p->begin += record_space;
}
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
240ec: e2466001 sub r6, r6, #1 <== NOT EXECUTED
240f0: e0866086 add r6, r6, r6, lsl #1 <== NOT EXECUTED
240f4: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
240f8: e0855206 add r5, r5, r6, lsl #4 <== NOT EXECUTED
240fc: e59d9014 ldr r9, [sp, #20] <== NOT EXECUTED
24100: e5852004 str r2, [r5, #4] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
24104: e1a00009 mov r0, r9 <== NOT EXECUTED
24108: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
2410c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
24110: e5d42008 ldrb r2, [r4, #8] <== NOT EXECUTED
24114: e3520000 cmp r2, #0 <== NOT EXECUTED
24118: 0affff88 beq 23f40 <rtems_bdpart_create+0x28> <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
2411c: e58d3024 str r3, [sp, #36] ; 0x24 <== NOT EXECUTED
24120: e3a0b001 mov fp, #1 <== NOT EXECUTED
24124: e3a0803f mov r8, #63 ; 0x3f <== NOT EXECUTED
24128: eaffff87 b 23f4c <rtems_bdpart_create+0x34> <== NOT EXECUTED
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
2412c: e3a09009 mov r9, #9 <== NOT EXECUTED
24130: eafffff3 b 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
24134: e3a0900a mov r9, #10 <== NOT EXECUTED
24138: eafffff1 b 24104 <rtems_bdpart_create+0x1ec> <== NOT EXECUTED
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
2413c: e59d4024 ldr r4, [sp, #36] ; 0x24 <== NOT EXECUTED
24140: e1a01008 mov r1, r8 <== NOT EXECUTED
24144: e1a00004 mov r0, r4 <== NOT EXECUTED
24148: e58d3000 str r3, [sp] <== NOT EXECUTED
2414c: eb00e19e bl 5c7cc <__umodsi3> <== NOT EXECUTED
24150: e0604004 rsb r4, r0, r4 <== NOT EXECUTED
24154: e58d4010 str r4, [sp, #16] <== NOT EXECUTED
24158: e59d3000 ldr r3, [sp] <== NOT EXECUTED
2415c: eaffffa1 b 23fe8 <rtems_bdpart_create+0xd0> <== NOT EXECUTED
00024160 <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
24160: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
24164: e1a06001 mov r6, r1 <== NOT EXECUTED
24168: e24dd038 sub sp, sp, #56 ; 0x38 <== NOT EXECUTED
2416c: e1a04000 mov r4, r0 <== NOT EXECUTED
size_t i = 0;
printf(
24170: e59f00fc ldr r0, [pc, #252] ; 24274 <rtems_bdpart_dump+0x114><== NOT EXECUTED
24174: eb009334 bl 48e4c <puts> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
24178: e3560000 cmp r6, #0 <== NOT EXECUTED
2417c: 0a00002c beq 24234 <rtems_bdpart_dump+0xd4> <== NOT EXECUTED
24180: e3a05000 mov r5, #0 <== NOT EXECUTED
24184: e28d7037 add r7, sp, #55 ; 0x37 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
24188: e1a08005 mov r8, r5 <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
2418c: e1a0a00d mov sl, sp <== NOT EXECUTED
24190: ea000015 b 241ec <rtems_bdpart_dump+0x8c> <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
24194: e5dd3037 ldrb r3, [sp, #55] ; 0x37 <== NOT EXECUTED
24198: e353000b cmp r3, #11 <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
2419c: 059f30d4 ldreq r3, [pc, #212] ; 24278 <rtems_bdpart_dump+0x118><== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
241a0: 0a00000a beq 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
241a4: 8a000026 bhi 24244 <rtems_bdpart_dump+0xe4> <== NOT EXECUTED
241a8: e3530001 cmp r3, #1 <== NOT EXECUTED
241ac: 059f30c8 ldreq r3, [pc, #200] ; 2427c <rtems_bdpart_dump+0x11c><== NOT EXECUTED
241b0: 0a000006 beq 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
241b4: e3530004 cmp r3, #4 <== NOT EXECUTED
241b8: 0a00002b beq 2426c <rtems_bdpart_dump+0x10c> <== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
241bc: e1a0000d mov r0, sp <== NOT EXECUTED
241c0: e3a01034 mov r1, #52 ; 0x34 <== NOT EXECUTED
241c4: e59f20b4 ldr r2, [pc, #180] ; 24280 <rtems_bdpart_dump+0x120><== NOT EXECUTED
241c8: eb009818 bl 4a230 <snprintf> <== NOT EXECUTED
241cc: e1a0300d mov r3, sp <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
241d0: e8940006 ldm r4, {r1, r2} <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
241d4: e2855001 add r5, r5, #1 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
241d8: e59f00a4 ldr r0, [pc, #164] ; 24284 <rtems_bdpart_dump+0x124><== NOT EXECUTED
241dc: eb009275 bl 48bb8 <printf> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
241e0: e1560005 cmp r6, r5 <== NOT EXECUTED
241e4: e2844030 add r4, r4, #48 ; 0x30 <== NOT EXECUTED
241e8: 9a000011 bls 24234 <rtems_bdpart_dump+0xd4> <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
241ec: e2849008 add r9, r4, #8 <== NOT EXECUTED
241f0: e1a00009 mov r0, r9 <== NOT EXECUTED
241f4: e1a01007 mov r1, r7 <== NOT EXECUTED
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
241f8: e5cd8037 strb r8, [sp, #55] ; 0x37 <== NOT EXECUTED
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
241fc: eb00011c bl 24674 <rtems_bdpart_to_mbr_partition_type> <== NOT EXECUTED
24200: e3500000 cmp r0, #0 <== NOT EXECUTED
24204: 1affffe2 bne 24194 <rtems_bdpart_dump+0x34> <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
24208: e1a00009 mov r0, r9 <== NOT EXECUTED
2420c: e1a0100d mov r1, sp <== NOT EXECUTED
24210: eb006ca6 bl 3f4b0 <uuid_unparse_lower> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
24214: e2855001 add r5, r5, #1 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
24218: e8940006 ldm r4, {r1, r2} <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
2421c: e1a0300d mov r3, sp <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
24220: e59f005c ldr r0, [pc, #92] ; 24284 <rtems_bdpart_dump+0x124><== NOT EXECUTED
24224: eb009263 bl 48bb8 <printf> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
24228: e1560005 cmp r6, r5 <== NOT EXECUTED
2422c: e2844030 add r4, r4, #48 ; 0x30 <== NOT EXECUTED
24230: 8affffed bhi 241ec <rtems_bdpart_dump+0x8c> <== NOT EXECUTED
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
24234: e59f004c ldr r0, [pc, #76] ; 24288 <rtems_bdpart_dump+0x128><== NOT EXECUTED
24238: eb009303 bl 48e4c <puts> <== NOT EXECUTED
}
2423c: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
24240: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
24244: e353000e cmp r3, #14 <== NOT EXECUTED
24248: 059f303c ldreq r3, [pc, #60] ; 2428c <rtems_bdpart_dump+0x12c><== NOT EXECUTED
2424c: 0affffdf beq 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
24250: e35300da cmp r3, #218 ; 0xda <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
24254: 059f3034 ldreq r3, [pc, #52] ; 24290 <rtems_bdpart_dump+0x130><== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
24258: 0affffdc beq 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
2425c: e353000c cmp r3, #12 <== NOT EXECUTED
24260: 1affffd5 bne 241bc <rtems_bdpart_dump+0x5c> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
24264: e59f3028 ldr r3, [pc, #40] ; 24294 <rtems_bdpart_dump+0x134><== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
24268: eaffffd8 b 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
2426c: e59f3024 ldr r3, [pc, #36] ; 24298 <rtems_bdpart_dump+0x138><== NOT EXECUTED
24270: eaffffd6 b 241d0 <rtems_bdpart_dump+0x70> <== NOT EXECUTED
000245fc <rtems_bdpart_get_disk_data>:
rtems_status_code rtems_bdpart_get_disk_data(
const char *disk_name,
dev_t *disk,
rtems_blkdev_bnum *disk_end
)
{
245fc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
24600: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
24604: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_blkdev_bnum block_size = 0;
rtems_disk_device *dd = NULL;
struct stat st;
/* Get disk handle */
rv = stat( disk_name, &st);
24608: e1a0100d mov r1, sp <== NOT EXECUTED
rtems_status_code rtems_bdpart_get_disk_data(
const char *disk_name,
dev_t *disk,
rtems_blkdev_bnum *disk_end
)
{
2460c: e1a05002 mov r5, r2 <== NOT EXECUTED
rtems_blkdev_bnum block_size = 0;
rtems_disk_device *dd = NULL;
struct stat st;
/* Get disk handle */
rv = stat( disk_name, &st);
24610: ebff9408 bl 9638 <stat> <== NOT EXECUTED
if (rv != 0) {
24614: e3500000 cmp r0, #0 <== NOT EXECUTED
24618: 0a000002 beq 24628 <rtems_bdpart_get_disk_data+0x2c> <== NOT EXECUTED
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
return RTEMS_IO_ERROR;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
2461c: e3a00003 mov r0, #3 <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
24620: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
24624: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/* Get disk handle */
rv = stat( disk_name, &st);
if (rv != 0) {
return RTEMS_INVALID_NAME;
}
*disk = st.st_rdev;
24628: e28d1018 add r1, sp, #24 <== NOT EXECUTED
2462c: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
24630: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
/* Get disk begin, end and block size */
dd = rtems_disk_obtain( *disk);
24634: ebff8868 bl 67dc <rtems_disk_obtain> <== NOT EXECUTED
if (dd == NULL) {
24638: e2503000 subs r3, r0, #0 <== NOT EXECUTED
2463c: 0afffff6 beq 2461c <rtems_bdpart_get_disk_data+0x20> <== NOT EXECUTED
return RTEMS_INVALID_NAME;
}
disk_begin = dd->start;
*disk_end = dd->size;
24640: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
/* Get disk begin, end and block size */
dd = rtems_disk_obtain( *disk);
if (dd == NULL) {
return RTEMS_INVALID_NAME;
}
disk_begin = dd->start;
24644: e5936018 ldr r6, [r3, #24] <== NOT EXECUTED
*disk_end = dd->size;
24648: e5852000 str r2, [r5] <== NOT EXECUTED
block_size = dd->block_size;
2464c: e5934020 ldr r4, [r3, #32] <== NOT EXECUTED
sc = rtems_disk_release( dd);
24650: ebff88f5 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24654: e3500000 cmp r0, #0 <== NOT EXECUTED
24658: 1afffff0 bne 24620 <rtems_bdpart_get_disk_data+0x24> <== NOT EXECUTED
return sc;
}
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
2465c: e3540c02 cmp r4, #512 ; 0x200 <== NOT EXECUTED
24660: 3a000001 bcc 2466c <rtems_bdpart_get_disk_data+0x70> <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
24664: e3560000 cmp r6, #0 <== NOT EXECUTED
24668: 0affffec beq 24620 <rtems_bdpart_get_disk_data+0x24> <== NOT EXECUTED
2466c: e3a0001b mov r0, #27 <== NOT EXECUTED
24670: eaffffea b 24620 <rtems_bdpart_get_disk_data+0x24> <== NOT EXECUTED
000243c8 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
243c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
243cc: e3a0102f mov r1, #47 ; 0x2f <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
243d0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
243d4: e1a09003 mov r9, r3 <== NOT EXECUTED
243d8: e1a08002 mov r8, r2 <== NOT EXECUTED
243dc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
243e0: eb009ef0 bl 4bfa8 <strrchr> <== NOT EXECUTED
243e4: e1a05000 mov r5, r0 <== NOT EXECUTED
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
243e8: e1a00004 mov r0, r4 <== NOT EXECUTED
243ec: eb009ba1 bl 4b278 <strlen> <== NOT EXECUTED
243f0: e1a06000 mov r6, r0 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
243f4: e1a00009 mov r0, r9 <== NOT EXECUTED
243f8: eb009b9e bl 4b278 <strlen> <== NOT EXECUTED
243fc: e1a0a000 mov sl, r0 <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
24400: e2860004 add r0, r6, #4 <== NOT EXECUTED
24404: ebff901d bl 8480 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
24408: e2507000 subs r7, r0, #0 <== NOT EXECUTED
2440c: 03a0401a moveq r4, #26 <== NOT EXECUTED
24410: 0a000047 beq 24534 <rtems_bdpart_mount+0x16c> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
24414: e1a01004 mov r1, r4 <== NOT EXECUTED
24418: e1a02006 mov r2, r6 <== NOT EXECUTED
2441c: eb009c35 bl 4b4f8 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
24420: e3550000 cmp r5, #0 <== NOT EXECUTED
24424: 058d4004 streq r4, [sp, #4] <== NOT EXECUTED
24428: 01a0b006 moveq fp, r6 <== NOT EXECUTED
2442c: 0a000004 beq 24444 <rtems_bdpart_mount+0x7c> <== NOT EXECUTED
disk_file_name += 1;
24430: e2855001 add r5, r5, #1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
24434: e1a00005 mov r0, r5 <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
/* Get disk file name */
if (disk_file_name != NULL) {
disk_file_name += 1;
24438: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
2443c: eb009b8d bl 4b278 <strlen> <== NOT EXECUTED
24440: e1a0b000 mov fp, r0 <== NOT EXECUTED
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
24444: e08b400a add r4, fp, sl <== NOT EXECUTED
24448: e2840005 add r0, r4, #5 <== NOT EXECUTED
2444c: ebff900b bl 8480 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
24450: e2505000 subs r5, r0, #0 <== NOT EXECUTED
24454: 03a0401a moveq r4, #26 <== NOT EXECUTED
24458: 0a000031 beq 24524 <rtems_bdpart_mount+0x15c> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
2445c: e1a0200a mov r2, sl <== NOT EXECUTED
24460: e1a01009 mov r1, r9 <== NOT EXECUTED
24464: eb009c23 bl 4b4f8 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
24468: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED
2446c: e7c5300a strb r3, [r5, sl] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
24470: e28a0001 add r0, sl, #1 <== NOT EXECUTED
24474: e0850000 add r0, r5, r0 <== NOT EXECUTED
24478: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
2447c: e1a0200b mov r2, fp <== NOT EXECUTED
24480: eb009c1c bl 4b4f8 <strncpy> <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
24484: e284a001 add sl, r4, #1 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
24488: e3580000 cmp r8, #0 <== NOT EXECUTED
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
2448c: e0876006 add r6, r7, r6 <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
24490: e085a00a add sl, r5, sl <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
24494: 0a000021 beq 24520 <rtems_bdpart_mount+0x158> <== NOT EXECUTED
24498: e3a04000 mov r4, #0 <== NOT EXECUTED
2449c: ea000001 b 244a8 <rtems_bdpart_mount+0xe0> <== NOT EXECUTED
244a0: e1580004 cmp r8, r4 <== NOT EXECUTED
244a4: 9a00001d bls 24520 <rtems_bdpart_mount+0x158> <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
244a8: e2844001 add r4, r4, #1 <== NOT EXECUTED
244ac: e3a01004 mov r1, #4 <== NOT EXECUTED
244b0: e59f20b8 ldr r2, [pc, #184] ; 24570 <rtems_bdpart_mount+0x1a8><== NOT EXECUTED
244b4: e1a03004 mov r3, r4 <== NOT EXECUTED
244b8: e1a00006 mov r0, r6 <== NOT EXECUTED
244bc: eb00975b bl 4a230 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
244c0: e3500003 cmp r0, #3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
244c4: e3a02004 mov r2, #4 <== NOT EXECUTED
244c8: e1a01006 mov r1, r6 <== NOT EXECUTED
244cc: e1a0000a mov r0, sl <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
244d0: ca00001a bgt 24540 <rtems_bdpart_mount+0x178> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
244d4: eb009c07 bl 4b4f8 <strncpy> <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
244d8: e3a01f7f mov r1, #508 ; 0x1fc <== NOT EXECUTED
244dc: e2811003 add r1, r1, #3 <== NOT EXECUTED
244e0: e1a00005 mov r0, r5 <== NOT EXECUTED
244e4: ebff93e9 bl 9490 <rtems_mkdir> <== NOT EXECUTED
if (rv != 0) {
244e8: e250c000 subs ip, r0, #0 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
244ec: e1a01005 mov r1, r5 <== NOT EXECUTED
244f0: e59f207c ldr r2, [pc, #124] ; 24574 <rtems_bdpart_mount+0x1ac><== NOT EXECUTED
244f4: e1a0300c mov r3, ip <== NOT EXECUTED
244f8: e1a00007 mov r0, r7 <== NOT EXECUTED
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv != 0) {
244fc: 1a000015 bne 24558 <rtems_bdpart_mount+0x190> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
24500: e58dc000 str ip, [sp] <== NOT EXECUTED
24504: ebff90ce bl 8844 <mount> <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
24508: e3500000 cmp r0, #0 <== NOT EXECUTED
2450c: 0affffe3 beq 244a0 <rtems_bdpart_mount+0xd8> <== NOT EXECUTED
rmdir( mount_point);
24510: e1a00005 mov r0, r5 <== NOT EXECUTED
24514: eb00194a bl 2aa44 <rmdir> <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
24518: e1580004 cmp r8, r4 <== NOT EXECUTED
2451c: 8affffe1 bhi 244a8 <rtems_bdpart_mount+0xe0> <== NOT EXECUTED
24520: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
24524: e1a00007 mov r0, r7 <== NOT EXECUTED
24528: ebff8e10 bl 7d70 <free> <== NOT EXECUTED
free( mount_point);
2452c: e1a00005 mov r0, r5 <== NOT EXECUTED
24530: ebff8e0e bl 7d70 <free> <== NOT EXECUTED
return esc;
}
24534: e1a00004 mov r0, r4 <== NOT EXECUTED
24538: e28dd008 add sp, sp, #8 <== NOT EXECUTED
2453c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
24540: e1a00007 mov r0, r7 <== NOT EXECUTED
24544: ebff8e09 bl 7d70 <free> <== NOT EXECUTED
free( mount_point);
24548: e1a00005 mov r0, r5 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
2454c: e3a04003 mov r4, #3 <== NOT EXECUTED
}
cleanup:
free( logical_disk_name);
free( mount_point);
24550: ebff8e06 bl 7d70 <free> <== NOT EXECUTED
24554: eafffff6 b 24534 <rtems_bdpart_mount+0x16c> <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
24558: e1a00007 mov r0, r7 <== NOT EXECUTED
2455c: ebff8e03 bl 7d70 <free> <== NOT EXECUTED
free( mount_point);
24560: e1a00005 mov r0, r5 <== NOT EXECUTED
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv != 0) {
24564: e3a0401b mov r4, #27 <== NOT EXECUTED
}
cleanup:
free( logical_disk_name);
free( mount_point);
24568: ebff8e00 bl 7d70 <free> <== NOT EXECUTED
2456c: eafffff0 b 24534 <rtems_bdpart_mount+0x16c> <== NOT EXECUTED
00024a4c <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
24a4c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
24a50: e1a04003 mov r4, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
24a54: e5933000 ldr r3, [r3] <== NOT EXECUTED
24a58: e3530000 cmp r3, #0 <== NOT EXECUTED
static rtems_status_code rtems_bdpart_new_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
24a5c: e1a06002 mov r6, r2 <== NOT EXECUTED
24a60: e1a07000 mov r7, r0 <== NOT EXECUTED
24a64: e1a08001 mov r8, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
24a68: 0a000003 beq 24a7c <rtems_bdpart_new_record+0x30> <== NOT EXECUTED
sc = rtems_bdbuf_sync( *block);
24a6c: e1a00003 mov r0, r3 <== NOT EXECUTED
24a70: ebff8105 bl 4e8c <rtems_bdbuf_sync> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24a74: e2505000 subs r5, r0, #0 <== NOT EXECUTED
24a78: 1a000016 bne 24ad8 <rtems_bdpart_new_record+0x8c> <== NOT EXECUTED
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( disk, index, block);
24a7c: e1a00007 mov r0, r7 <== NOT EXECUTED
24a80: e1a01008 mov r1, r8 <== NOT EXECUTED
24a84: e1a02006 mov r2, r6 <== NOT EXECUTED
24a88: e1a03004 mov r3, r4 <== NOT EXECUTED
24a8c: ebff8319 bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24a90: e2505000 subs r5, r0, #0 <== NOT EXECUTED
24a94: 1a00000f bne 24ad8 <rtems_bdpart_new_record+0x8c> <== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
24a98: e5943000 ldr r3, [r4] <== NOT EXECUTED
24a9c: e3530000 cmp r3, #0 <== NOT EXECUTED
24aa0: 03a05009 moveq r5, #9 <== NOT EXECUTED
24aa4: 0a00000b beq 24ad8 <rtems_bdpart_new_record+0x8c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
24aa8: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
24aac: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
24ab0: e1a01005 mov r1, r5 <== NOT EXECUTED
24ab4: eb008c18 bl 47b1c <memset> <== NOT EXECUTED
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
24ab8: e5943000 ldr r3, [r4] <== NOT EXECUTED
24abc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
24ac0: e3a02055 mov r2, #85 ; 0x55 <== NOT EXECUTED
24ac4: e5c321fe strb r2, [r3, #510] ; 0x1fe <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
24ac8: e5943000 ldr r3, [r4] <== NOT EXECUTED
24acc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
24ad0: e3e02055 mvn r2, #85 ; 0x55 <== NOT EXECUTED
24ad4: e5c321ff strb r2, [r3, #511] ; 0x1ff <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
24ad8: e1a00005 mov r0, r5 <== NOT EXECUTED
24adc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000247b8 <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
247b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
247bc: e2535000 subs r5, r3, #0 <== NOT EXECUTED
247c0: 15957000 ldrne r7, [r5] <== NOT EXECUTED
247c4: 10877087 addne r7, r7, r7, lsl #1 <== NOT EXECUTED
247c8: 01a07005 moveq r7, r5 <== NOT EXECUTED
247cc: 11a07207 lslne r7, r7, #4 <== NOT EXECUTED
dev_t disk = 0;
size_t i = 0;
const uint8_t *data = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
247d0: e3510000 cmp r1, #0 <== NOT EXECUTED
247d4: 13520000 cmpne r2, #0 <== NOT EXECUTED
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
247d8: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
247dc: e1a06001 mov r6, r1 <== NOT EXECUTED
247e0: e1a04002 mov r4, r2 <== NOT EXECUTED
dev_t disk = 0;
size_t i = 0;
const uint8_t *data = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
247e4: 13a03000 movne r3, #0 <== NOT EXECUTED
247e8: 03a03001 moveq r3, #1 <== NOT EXECUTED
247ec: 0a00001e beq 2486c <rtems_bdpart_read+0xb4> <== NOT EXECUTED
247f0: e3550000 cmp r5, #0 <== NOT EXECUTED
247f4: 0a00001c beq 2486c <rtems_bdpart_read+0xb4> <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
247f8: e242c030 sub ip, r2, #48 ; 0x30 <== NOT EXECUTED
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
247fc: e58d300c str r3, [sp, #12] <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
24800: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
/* Set count to a save value */
*count = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
24804: e28d1004 add r1, sp, #4 <== NOT EXECUTED
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
24808: e5853000 str r3, [r5] <== NOT EXECUTED
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
2480c: e28d200c add r2, sp, #12 <== NOT EXECUTED
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
24810: e3a08000 mov r8, #0 <== NOT EXECUTED
24814: e3a09000 mov r9, #0 <== NOT EXECUTED
24818: e98d0300 stmib sp, {r8, r9} <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
2481c: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
24820: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
/* Set count to a save value */
*count = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
24824: ebffff74 bl 245fc <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24828: e3500000 cmp r0, #0 <== NOT EXECUTED
2482c: 0a000001 beq 24838 <rtems_bdpart_read+0x80> <== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
24830: e28dd01c add sp, sp, #28 <== NOT EXECUTED
24834: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( disk, 0, &block);
24838: e28d8018 add r8, sp, #24 <== NOT EXECUTED
2483c: e1a02000 mov r2, r0 <== NOT EXECUTED
24840: e1a03008 mov r3, r8 <== NOT EXECUTED
24844: e99d0003 ldmib sp, {r0, r1} <== NOT EXECUTED
24848: ebffff4a bl 24578 <rtems_bdpart_read_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2484c: e3500000 cmp r0, #0 <== NOT EXECUTED
24850: 0a000007 beq 24874 <rtems_bdpart_read+0xbc> <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
24854: e1a04000 mov r4, r0 <== NOT EXECUTED
24858: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (block != NULL) {
2485c: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_bdbuf_release( block);
24860: 1bff7f13 blne 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
24864: e1a00004 mov r0, r4 <== NOT EXECUTED
24868: eafffff0 b 24830 <rtems_bdpart_read+0x78> <== NOT EXECUTED
2486c: e3a00009 mov r0, #9 <== NOT EXECUTED
24870: eaffffee b 24830 <rtems_bdpart_read+0x78> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
24874: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
24878: e593c020 ldr ip, [r3, #32] <== NOT EXECUTED
2487c: e28caf6f add sl, ip, #444 ; 0x1bc <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
24880: e0849007 add r9, r4, r7 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
24884: e28aa002 add sl, sl, #2 <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
24888: e28d7014 add r7, sp, #20 <== NOT EXECUTED
2488c: e28db010 add fp, sp, #16 <== NOT EXECUTED
24890: e1a0000a mov r0, sl <== NOT EXECUTED
24894: e1a01007 mov r1, r7 <== NOT EXECUTED
24898: e1a02009 mov r2, r9 <== NOT EXECUTED
2489c: e1a0300b mov r3, fp <== NOT EXECUTED
248a0: e58dc000 str ip, [sp] <== NOT EXECUTED
248a4: ebffff82 bl 246b4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
248a8: e3500000 cmp r0, #0 <== NOT EXECUTED
248ac: e59dc000 ldr ip, [sp] <== NOT EXECUTED
248b0: 1affffe7 bne 24854 <rtems_bdpart_read+0x9c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
248b4: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
248b8: e5d33008 ldrb r3, [r3, #8] <== NOT EXECUTED
248bc: e35300ee cmp r3, #238 ; 0xee <== NOT EXECUTED
248c0: 0a00005b beq 24a34 <rtems_bdpart_read+0x27c> <== NOT EXECUTED
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
248c4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
248c8: e5860000 str r0, [r6] <== NOT EXECUTED
format->mbr.disk_id = rtems_uint32_from_little_endian(
248cc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
248d0: e5d321ba ldrb r2, [r3, #442] ; 0x1ba <== NOT EXECUTED
248d4: e5d301bb ldrb r0, [r3, #443] ; 0x1bb <== NOT EXECUTED
248d8: e5d311b9 ldrb r1, [r3, #441] ; 0x1b9 <== NOT EXECUTED
248dc: e0820400 add r0, r2, r0, lsl #8 <== NOT EXECUTED
248e0: e5d321b8 ldrb r2, [r3, #440] ; 0x1b8 <== NOT EXECUTED
248e4: e0813400 add r3, r1, r0, lsl #8 <== NOT EXECUTED
248e8: e0823403 add r3, r2, r3, lsl #8 <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
248ec: e3a02001 mov r2, #1 <== NOT EXECUTED
248f0: e5c62008 strb r2, [r6, #8] <== NOT EXECUTED
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
248f4: e5863004 str r3, [r6, #4] <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
248f8: e28c6f7b add r6, ip, #492 ; 0x1ec <== NOT EXECUTED
248fc: e2866002 add r6, r6, #2 <== NOT EXECUTED
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
24900: e28aa010 add sl, sl, #16 <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
24904: e1a0000a mov r0, sl <== NOT EXECUTED
24908: e1a01007 mov r1, r7 <== NOT EXECUTED
2490c: e1a02009 mov r2, r9 <== NOT EXECUTED
24910: e1a0300b mov r3, fp <== NOT EXECUTED
24914: ebffff66 bl 246b4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24918: e3500000 cmp r0, #0 <== NOT EXECUTED
2491c: 1affffcc bne 24854 <rtems_bdpart_read+0x9c> <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
24920: e15a0006 cmp sl, r6 <== NOT EXECUTED
24924: 1afffff5 bne 24900 <rtems_bdpart_read+0x148> <== NOT EXECUTED
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
24928: e59d6010 ldr r6, [sp, #16] <== NOT EXECUTED
while (ebr != 0) {
2492c: e3560000 cmp r6, #0 <== NOT EXECUTED
24930: 059d2014 ldreq r2, [sp, #20] <== NOT EXECUTED
24934: 059d3018 ldreq r3, [sp, #24] <== NOT EXECUTED
24938: 0a000029 beq 249e4 <rtems_bdpart_read+0x22c> <== NOT EXECUTED
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
2493c: e1a02006 mov r2, r6 <== NOT EXECUTED
24940: e99d0003 ldmib sp, {r0, r1} <== NOT EXECUTED
24944: e1a03008 mov r3, r8 <== NOT EXECUTED
24948: ebffff0a bl 24578 <rtems_bdpart_read_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2494c: e3500000 cmp r0, #0 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
24950: e1a01007 mov r1, r7 <== NOT EXECUTED
24954: e1a02009 mov r2, r9 <== NOT EXECUTED
24958: e1a03000 mov r3, r0 <== NOT EXECUTED
while (ebr != 0) {
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
2495c: 1affffbc bne 24854 <rtems_bdpart_read+0x9c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
24960: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
24964: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
24968: e2800f6f add r0, r0, #444 ; 0x1bc <== NOT EXECUTED
2496c: e2800002 add r0, r0, #2 <== NOT EXECUTED
24970: ebffff4f bl 246b4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
24974: e3500000 cmp r0, #0 <== NOT EXECUTED
24978: 1affffb5 bne 24854 <rtems_bdpart_read+0x9c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
2497c: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
24980: e5923000 ldr r3, [r2] <== NOT EXECUTED
24984: e0861003 add r1, r6, r3 <== NOT EXECUTED
if (tmp > p->begin) {
24988: e1530001 cmp r3, r1 <== NOT EXECUTED
2498c: 2a00002b bcs 24a40 <rtems_bdpart_read+0x288> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
24990: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
24994: e0866003 add r6, r6, r3 <== NOT EXECUTED
if (tmp > p->end) {
24998: e1530006 cmp r3, r6 <== NOT EXECUTED
}
/* Adjust partition begin */
tmp = p->begin + ebr;
if (tmp > p->begin) {
p->begin = tmp;
2499c: e5821000 str r1, [r2] <== NOT EXECUTED
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
249a0: 2a000026 bcs 24a40 <rtems_bdpart_read+0x288> <== NOT EXECUTED
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
249a4: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
249a8: e5901020 ldr r1, [r0, #32] <== NOT EXECUTED
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
p->end = tmp;
249ac: e5826004 str r6, [r2, #4] <== NOT EXECUTED
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
249b0: e2813f75 add r3, r1, #468 ; 0x1d4 <== NOT EXECUTED
249b4: e2833002 add r3, r3, #2 <== NOT EXECUTED
249b8: e5d36003 ldrb r6, [r3, #3] <== NOT EXECUTED
249bc: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
249c0: e5d3a001 ldrb sl, [r3, #1] <== NOT EXECUTED
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
249c4: e5d131d2 ldrb r3, [r1, #466] ; 0x1d2 <== NOT EXECUTED
249c8: e08cc406 add ip, ip, r6, lsl #8 <== NOT EXECUTED
249cc: e5d111d6 ldrb r1, [r1, #470] ; 0x1d6 <== NOT EXECUTED
249d0: e08aa40c add sl, sl, ip, lsl #8 <== NOT EXECUTED
249d4: e3530005 cmp r3, #5 <== NOT EXECUTED
249d8: e081a40a add sl, r1, sl, lsl #8 <== NOT EXECUTED
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
249dc: e1a03000 mov r3, r0 <== NOT EXECUTED
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
249e0: 0a00000b beq 24a14 <rtems_bdpart_read+0x25c> <== NOT EXECUTED
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
249e4: e0642002 rsb r2, r4, r2 <== NOT EXECUTED
249e8: e1a02242 asr r2, r2, #4 <== NOT EXECUTED
249ec: e0821102 add r1, r2, r2, lsl #2 <== NOT EXECUTED
249f0: e0811201 add r1, r1, r1, lsl #4 <== NOT EXECUTED
249f4: e0811401 add r1, r1, r1, lsl #8 <== NOT EXECUTED
249f8: e0811801 add r1, r1, r1, lsl #16 <== NOT EXECUTED
249fc: e0822081 add r2, r2, r1, lsl #1 <== NOT EXECUTED
24a00: e2822001 add r2, r2, #1 <== NOT EXECUTED
24a04: e5852000 str r2, [r5] <== NOT EXECUTED
24a08: e1a00003 mov r0, r3 <== NOT EXECUTED
24a0c: e3a04000 mov r4, #0 <== NOT EXECUTED
24a10: eaffff91 b 2485c <rtems_bdpart_read+0xa4> <== NOT EXECUTED
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
24a14: e35a0000 cmp sl, #0 <== NOT EXECUTED
24a18: 0afffff1 beq 249e4 <rtems_bdpart_read+0x22c> <== NOT EXECUTED
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
24a1c: e59d6010 ldr r6, [sp, #16] <== NOT EXECUTED
24a20: e08a6006 add r6, sl, r6 <== NOT EXECUTED
if (tmp > ebr) {
24a24: e156000a cmp r6, sl <== NOT EXECUTED
24a28: 8affffc3 bhi 2493c <rtems_bdpart_read+0x184> <== NOT EXECUTED
24a2c: e3a0401b mov r4, #27 <== NOT EXECUTED
24a30: eaffff89 b 2485c <rtems_bdpart_read+0xa4> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
24a34: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
24a38: e3a04018 mov r4, #24 <== NOT EXECUTED
24a3c: eaffff86 b 2485c <rtems_bdpart_read+0xa4> <== NOT EXECUTED
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
24a40: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
24a44: e3a0401b mov r4, #27 <== NOT EXECUTED
24a48: eaffff83 b 2485c <rtems_bdpart_read+0xa4> <== NOT EXECUTED
000246b4 <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
246b4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
246b8: e280c008 add ip, r0, #8 <== NOT EXECUTED
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
246bc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
246c0: e280000c add r0, r0, #12 <== NOT EXECUTED
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
value = (value << 8) + data [i];
246c4: e5dc7003 ldrb r7, [ip, #3] <== NOT EXECUTED
246c8: e5d08002 ldrb r8, [r0, #2] <== NOT EXECUTED
246cc: e5dc6002 ldrb r6, [ip, #2] <== NOT EXECUTED
246d0: e5d05003 ldrb r5, [r0, #3] <== NOT EXECUTED
246d4: e5dca001 ldrb sl, [ip, #1] <== NOT EXECUTED
246d8: e5d09001 ldrb r9, [r0, #1] <== NOT EXECUTED
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
246dc: e5d40004 ldrb r0, [r4, #4] <== NOT EXECUTED
246e0: e0866407 add r6, r6, r7, lsl #8 <== NOT EXECUTED
246e4: e0885405 add r5, r8, r5, lsl #8 <== NOT EXECUTED
246e8: e5d47008 ldrb r7, [r4, #8] <== NOT EXECUTED
246ec: e5d4c00c ldrb ip, [r4, #12] <== NOT EXECUTED
246f0: e08a6406 add r6, sl, r6, lsl #8 <== NOT EXECUTED
246f4: e0895405 add r5, r9, r5, lsl #8 <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
246f8: e3500000 cmp r0, #0 <== NOT EXECUTED
246fc: e0876406 add r6, r7, r6, lsl #8 <== NOT EXECUTED
24700: e08c5405 add r5, ip, r5, lsl #8 <== NOT EXECUTED
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
24704: e1a08001 mov r8, r1 <== NOT EXECUTED
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
24708: 0a000028 beq 247b0 <rtems_bdpart_read_mbr_partition+0xfc> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
2470c: e5911000 ldr r1, [r1] <== NOT EXECUTED
24710: e1510002 cmp r1, r2 <== NOT EXECUTED
24714: 03a00005 moveq r0, #5 <== NOT EXECUTED
24718: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
2471c: e0865005 add r5, r6, r5 <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
24720: e1550006 cmp r5, r6 <== NOT EXECUTED
24724: 93a0001b movls r0, #27 <== NOT EXECUTED
24728: 98bd87f0 popls {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
2472c: e3500005 cmp r0, #5 <== NOT EXECUTED
24730: 0a00001a beq 247a0 <rtems_bdpart_read_mbr_partition+0xec> <== NOT EXECUTED
} else {
/* Increment partition index */
++(*p);
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
24734: e3a07000 mov r7, #0 <== NOT EXECUTED
if (ep_begin != NULL) {
*ep_begin = begin;
}
} else {
/* Increment partition index */
++(*p);
24738: e2813030 add r3, r1, #48 ; 0x30 <== NOT EXECUTED
2473c: e5883000 str r3, [r8] <== NOT EXECUTED
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
24740: e581705c str r7, [r1, #92] ; 0x5c <== NOT EXECUTED
24744: e5817030 str r7, [r1, #48] ; 0x30 <== NOT EXECUTED
24748: e5817034 str r7, [r1, #52] ; 0x34 <== NOT EXECUTED
2474c: e5817038 str r7, [r1, #56] ; 0x38 <== NOT EXECUTED
24750: e581703c str r7, [r1, #60] ; 0x3c <== NOT EXECUTED
24754: e5817040 str r7, [r1, #64] ; 0x40 <== NOT EXECUTED
24758: e5817044 str r7, [r1, #68] ; 0x44 <== NOT EXECUTED
2475c: e5817048 str r7, [r1, #72] ; 0x48 <== NOT EXECUTED
24760: e581704c str r7, [r1, #76] ; 0x4c <== NOT EXECUTED
24764: e5817050 str r7, [r1, #80] ; 0x50 <== NOT EXECUTED
24768: e5817054 str r7, [r1, #84] ; 0x54 <== NOT EXECUTED
2476c: e5817058 str r7, [r1, #88] ; 0x58 <== NOT EXECUTED
/* Set values */
(*p)->begin = begin;
24770: e5981000 ldr r1, [r8] <== NOT EXECUTED
24774: e5816000 str r6, [r1] <== NOT EXECUTED
(*p)->end = end;
24778: e5815004 str r5, [r1, #4] <== NOT EXECUTED
rtems_bdpart_to_partition_type( type, (*p)->type);
2477c: e2811008 add r1, r1, #8 <== NOT EXECUTED
24780: ebffffc5 bl 2469c <rtems_bdpart_to_partition_type> <== NOT EXECUTED
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
24784: e5983000 ldr r3, [r8] <== NOT EXECUTED
24788: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
2478c: e3a02000 mov r2, #0 <== NOT EXECUTED
24790: e1a00007 mov r0, r7 <== NOT EXECUTED
24794: e5831028 str r1, [r3, #40] ; 0x28 <== NOT EXECUTED
24798: e583202c str r2, [r3, #44] ; 0x2c <== NOT EXECUTED
2479c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
if (ep_begin != NULL) {
247a0: e3530000 cmp r3, #0 <== NOT EXECUTED
*ep_begin = begin;
247a4: 15836000 strne r6, [r3] <== NOT EXECUTED
247a8: 13a00000 movne r0, #0 <== NOT EXECUTED
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
if (ep_begin != NULL) {
247ac: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/* Set values */
(*p)->begin = begin;
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
247b0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
247b4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00024578 <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
24578: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
2457c: e1a04003 mov r4, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
24580: e5933000 ldr r3, [r3] <== NOT EXECUTED
24584: e3530000 cmp r3, #0 <== NOT EXECUTED
static rtems_status_code rtems_bdpart_read_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
24588: e1a05002 mov r5, r2 <== NOT EXECUTED
2458c: e1a06000 mov r6, r0 <== NOT EXECUTED
24590: e1a07001 mov r7, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
24594: 0a000003 beq 245a8 <rtems_bdpart_read_record+0x30> <== NOT EXECUTED
sc = rtems_bdbuf_release( *block);
24598: e1a00003 mov r0, r3 <== NOT EXECUTED
2459c: ebff7fc4 bl 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
245a0: e3500000 cmp r0, #0 <== NOT EXECUTED
245a4: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( disk, index, block);
245a8: e1a00006 mov r0, r6 <== NOT EXECUTED
245ac: e1a01007 mov r1, r7 <== NOT EXECUTED
245b0: e1a02005 mov r2, r5 <== NOT EXECUTED
245b4: e1a03004 mov r3, r4 <== NOT EXECUTED
245b8: ebff844e bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
245bc: e3500000 cmp r0, #0 <== NOT EXECUTED
245c0: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
245c4: e5943000 ldr r3, [r4] <== NOT EXECUTED
245c8: e3530000 cmp r3, #0 <== NOT EXECUTED
245cc: 03a00009 moveq r0, #9 <== NOT EXECUTED
245d0: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
245d4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
static bool rtems_bdpart_is_valid_record( const uint8_t *data)
{
return data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0]
245d8: e5d321fe ldrb r2, [r3, #510] ; 0x1fe <== NOT EXECUTED
245dc: e3520055 cmp r2, #85 ; 0x55 <== NOT EXECUTED
245e0: 0a000001 beq 245ec <rtems_bdpart_read_record+0x74> <== NOT EXECUTED
245e4: e3a0001b mov r0, #27 <== NOT EXECUTED
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
245e8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
static bool rtems_bdpart_is_valid_record( const uint8_t *data)
{
return data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0]
245ec: e5d331ff ldrb r3, [r3, #511] ; 0x1ff <== NOT EXECUTED
245f0: e35300aa cmp r3, #170 ; 0xaa <== NOT EXECUTED
245f4: 1afffffa bne 245e4 <rtems_bdpart_read_record+0x6c> <== NOT EXECUTED
245f8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00005a90 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5a90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
5a94: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5a98: e24dd024 sub sp, sp, #36 ; 0x24 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
5a9c: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
dev_t disk = 0;
5aa0: e3a04000 mov r4, #0 <== NOT EXECUTED
5aa4: e3a03000 mov r3, #0 <== NOT EXECUTED
5aa8: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
5aac: e58d401c str r4, [sp, #28] <== NOT EXECUTED
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5ab0: e1a05000 mov r5, r0 <== NOT EXECUTED
5ab4: e1a0b001 mov fp, r1 <== NOT EXECUTED
5ab8: e1a07002 mov r7, r2 <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
5abc: eb0115ed bl 4b278 <strlen> <== NOT EXECUTED
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5ac0: e28d1018 add r1, sp, #24 <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
5ac4: e1a0a000 mov sl, r0 <== NOT EXECUTED
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5ac8: e28d2020 add r2, sp, #32 <== NOT EXECUTED
5acc: e1a00005 mov r0, r5 <== NOT EXECUTED
5ad0: eb007ac9 bl 245fc <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
5ad4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
5ad8: 0a000002 beq 5ae8 <rtems_bdpart_register+0x58> <== NOT EXECUTED
cleanup:
free( logical_disk_name);
return esc;
}
5adc: e1a00004 mov r0, r4 <== NOT EXECUTED
5ae0: e28dd024 add sp, sp, #36 ; 0x24 <== NOT EXECUTED
5ae4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
5ae8: e28a0004 add r0, sl, #4 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
5aec: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
5af0: e59d601c ldr r6, [sp, #28] <== NOT EXECUTED
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
5af4: eb000a61 bl 8480 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
5af8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
5afc: 03a0401a moveq r4, #26 <== NOT EXECUTED
5b00: 0afffff5 beq 5adc <rtems_bdpart_register+0x4c> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
5b04: e1a0200a mov r2, sl <== NOT EXECUTED
5b08: e1a01005 mov r1, r5 <== NOT EXECUTED
5b0c: eb011679 bl 4b4f8 <strncpy> <== NOT EXECUTED
logical_disk_marker = logical_disk_name + disk_name_size;
5b10: e088a00a add sl, r8, sl <== NOT EXECUTED
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5b14: e3570000 cmp r7, #0 <== NOT EXECUTED
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
5b18: e58da00c str sl, [sp, #12] <== NOT EXECUTED
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5b1c: 0a000022 beq 5bac <rtems_bdpart_register+0x11c> <== NOT EXECUTED
5b20: e1a0500b mov r5, fp <== NOT EXECUTED
5b24: ea00000d b 5b60 <rtems_bdpart_register+0xd0> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
5b28: e5953000 ldr r3, [r5] <== NOT EXECUTED
5b2c: e58d3000 str r3, [sp] <== NOT EXECUTED
5b30: e595c004 ldr ip, [r5, #4] <== NOT EXECUTED
5b34: e063c00c rsb ip, r3, ip <== NOT EXECUTED
5b38: e28d3018 add r3, sp, #24 <== NOT EXECUTED
5b3c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
5b40: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
5b44: e58d8008 str r8, [sp, #8] <== NOT EXECUTED
5b48: eb000438 bl 6c30 <rtems_disk_create_log> <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
5b4c: e3500000 cmp r0, #0 <== NOT EXECUTED
5b50: 1a000017 bne 5bb4 <rtems_bdpart_register+0x124> <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5b54: e1570004 cmp r7, r4 <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
5b58: e2855030 add r5, r5, #48 ; 0x30 <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5b5c: 9a000012 bls 5bac <rtems_bdpart_register+0x11c> <== NOT EXECUTED
/* Create a new device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5b60: e2844001 add r4, r4, #1 <== NOT EXECUTED
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
int rv = 0;
/* New minor number */
++minor;
5b64: e2866001 add r6, r6, #1 <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
5b68: e58d9010 str r9, [sp, #16] <== NOT EXECUTED
temp.__overlay.minor = _minor;
5b6c: e58d6014 str r6, [sp, #20] <== NOT EXECUTED
/* Create a new device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5b70: e3a01004 mov r1, #4 <== NOT EXECUTED
5b74: e59f2040 ldr r2, [pc, #64] ; 5bbc <rtems_bdpart_register+0x12c><== NOT EXECUTED
5b78: e1a03004 mov r3, r4 <== NOT EXECUTED
5b7c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
return temp.device;
5b80: e28db010 add fp, sp, #16 <== NOT EXECUTED
5b84: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED
5b88: eb0111a8 bl 4a230 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5b8c: e3500003 cmp r0, #3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
5b90: e1a0100b mov r1, fp <== NOT EXECUTED
5b94: e1a0000a mov r0, sl <== NOT EXECUTED
/* Create a new device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5b98: daffffe2 ble 5b28 <rtems_bdpart_register+0x98> <== NOT EXECUTED
5b9c: e3a04003 mov r4, #3 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
5ba0: e1a00008 mov r0, r8 <== NOT EXECUTED
5ba4: eb000871 bl 7d70 <free> <== NOT EXECUTED
return esc;
5ba8: eaffffcb b 5adc <rtems_bdpart_register+0x4c> <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5bac: e3a04000 mov r4, #0 <== NOT EXECUTED
5bb0: eafffffa b 5ba0 <rtems_bdpart_register+0x110> <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
5bb4: e1a04000 mov r4, r0 <== NOT EXECUTED
5bb8: eafffff8 b 5ba0 <rtems_bdpart_register+0x110> <== NOT EXECUTED
00005bc0 <rtems_bdpart_register_from_disk>:
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
5bc0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5bc4: e24ddfc6 sub sp, sp, #792 ; 0x318 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
5bc8: e3a0c010 mov ip, #16 <== NOT EXECUTED
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
5bcc: e28d1c03 add r1, sp, #768 ; 0x300 <== NOT EXECUTED
5bd0: e1a0200d mov r2, sp <== NOT EXECUTED
5bd4: e28d3fc5 add r3, sp, #788 ; 0x314 <== NOT EXECUTED
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
5bd8: e58dc314 str ip, [sp, #788] ; 0x314 <== NOT EXECUTED
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
5bdc: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
5be0: eb007af4 bl 247b8 <rtems_bdpart_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
5be4: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
5be8: e1a0400d mov r4, sp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
5bec: 01a00005 moveq r0, r5 <== NOT EXECUTED
5bf0: 01a0100d moveq r1, sp <== NOT EXECUTED
5bf4: 059d2314 ldreq r2, [sp, #788] ; 0x314 <== NOT EXECUTED
5bf8: 0bffffa4 bleq 5a90 <rtems_bdpart_register> <== NOT EXECUTED
}
5bfc: e28ddfc6 add sp, sp, #792 ; 0x318 <== NOT EXECUTED
5c00: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00024674 <rtems_bdpart_to_mbr_partition_type>:
bool rtems_bdpart_to_mbr_partition_type(
const uuid_t type,
uint8_t *mbr_type
)
{
24674: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
*mbr_type = rtems_bdpart_mbr_partition_type( type);
24678: e4d03001 ldrb r3, [r0], #1 <== NOT EXECUTED
return memcmp(
2467c: e3a0200f mov r2, #15 <== NOT EXECUTED
bool rtems_bdpart_to_mbr_partition_type(
const uuid_t type,
uint8_t *mbr_type
)
{
*mbr_type = rtems_bdpart_mbr_partition_type( type);
24680: e5c13000 strb r3, [r1] <== NOT EXECUTED
return memcmp(
24684: e59f100c ldr r1, [pc, #12] ; 24698 <rtems_bdpart_to_mbr_partition_type+0x24><== NOT EXECUTED
24688: eb008c72 bl 47858 <memcmp> <== NOT EXECUTED
type + 1,
RTEMS_BDPART_MBR_MASTER_TYPE + 1,
sizeof( uuid_t) - 1
) == 0;
}
2468c: e2700001 rsbs r0, r0, #1 <== NOT EXECUTED
24690: 33a00000 movcc r0, #0 <== NOT EXECUTED
24694: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0002469c <rtems_bdpart_to_partition_type>:
static const uuid_t RTEMS_BDPART_MBR_MASTER_TYPE =
RTEMS_BDPART_MBR_PARTITION_TYPE( RTEMS_BDPART_MBR_EMPTY);
void rtems_bdpart_to_partition_type( uint8_t mbr_type, uuid_t type)
{
type [0] = mbr_type;
2469c: e4c10001 strb r0, [r1], #1 <== NOT EXECUTED
memcpy( type + 1, RTEMS_BDPART_MBR_MASTER_TYPE + 1, sizeof( uuid_t) - 1);
246a0: e1a00001 mov r0, r1 <== NOT EXECUTED
246a4: e59f1004 ldr r1, [pc, #4] ; 246b0 <rtems_bdpart_to_partition_type+0x14><== NOT EXECUTED
246a8: e3a0200f mov r2, #15 <== NOT EXECUTED
246ac: ea008c93 b 47900 <memcpy> <== NOT EXECUTED
0002429c <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
2429c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
242a0: e3a0102f mov r1, #47 ; 0x2f <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
242a4: e1a09003 mov r9, r3 <== NOT EXECUTED
242a8: e1a06002 mov r6, r2 <== NOT EXECUTED
242ac: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
242b0: eb009f3c bl 4bfa8 <strrchr> <== NOT EXECUTED
242b4: e1a05000 mov r5, r0 <== NOT EXECUTED
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
242b8: e1a00004 mov r0, r4 <== NOT EXECUTED
242bc: eb009bed bl 4b278 <strlen> <== NOT EXECUTED
242c0: e1a0a000 mov sl, r0 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
242c4: e1a00009 mov r0, r9 <== NOT EXECUTED
242c8: eb009bea bl 4b278 <strlen> <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
242cc: e3550000 cmp r5, #0 <== NOT EXECUTED
const char *disk_file_name = strrchr( disk_name, '/');
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
size_t mount_base_size = strlen( mount_base);
242d0: e1a07000 mov r7, r0 <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
242d4: 0a000003 beq 242e8 <rtems_bdpart_unmount+0x4c> <== NOT EXECUTED
disk_file_name += 1;
242d8: e2854001 add r4, r5, #1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
242dc: e1a00004 mov r0, r4 <== NOT EXECUTED
242e0: eb009be4 bl 4b278 <strlen> <== NOT EXECUTED
242e4: e1a0a000 mov sl, r0 <== NOT EXECUTED
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
242e8: e08a8007 add r8, sl, r7 <== NOT EXECUTED
242ec: e2880005 add r0, r8, #5 <== NOT EXECUTED
242f0: ebff9062 bl 8480 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
242f4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
242f8: 03a0401a moveq r4, #26 <== NOT EXECUTED
242fc: 0a000022 beq 2438c <rtems_bdpart_unmount+0xf0> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
24300: e1a02007 mov r2, r7 <== NOT EXECUTED
24304: e1a01009 mov r1, r9 <== NOT EXECUTED
24308: eb009c7a bl 4b4f8 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
2430c: e2870001 add r0, r7, #1 <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
24310: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED
24314: e7c53007 strb r3, [r5, r7] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
24318: e0850000 add r0, r5, r0 <== NOT EXECUTED
2431c: e1a01004 mov r1, r4 <== NOT EXECUTED
24320: e1a0200a mov r2, sl <== NOT EXECUTED
24324: eb009c73 bl 4b4f8 <strncpy> <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
24328: e2887001 add r7, r8, #1 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
2432c: e3560000 cmp r6, #0 <== NOT EXECUTED
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
24330: e0857007 add r7, r5, r7 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
24334: 0a000018 beq 2439c <rtems_bdpart_unmount+0x100> <== NOT EXECUTED
24338: e3a04000 mov r4, #0 <== NOT EXECUTED
2433c: ea000001 b 24348 <rtems_bdpart_unmount+0xac> <== NOT EXECUTED
24340: e1560004 cmp r6, r4 <== NOT EXECUTED
24344: 9a000014 bls 2439c <rtems_bdpart_unmount+0x100> <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
24348: e2844001 add r4, r4, #1 <== NOT EXECUTED
2434c: e3a01004 mov r1, #4 <== NOT EXECUTED
24350: e59f206c ldr r2, [pc, #108] ; 243c4 <rtems_bdpart_unmount+0x128><== NOT EXECUTED
24354: e1a03004 mov r3, r4 <== NOT EXECUTED
24358: e1a00007 mov r0, r7 <== NOT EXECUTED
2435c: eb0097b3 bl 4a230 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
24360: e3500003 cmp r0, #3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
24364: e1a00005 mov r0, r5 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
24368: ca000010 bgt 243b0 <rtems_bdpart_unmount+0x114> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
2436c: eb001aef bl 2af30 <unmount> <== NOT EXECUTED
if (rv == 0) {
24370: e3500000 cmp r0, #0 <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
24374: e1a00005 mov r0, r5 <== NOT EXECUTED
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
if (rv == 0) {
24378: 1afffff0 bne 24340 <rtems_bdpart_unmount+0xa4> <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
2437c: eb0019b0 bl 2aa44 <rmdir> <== NOT EXECUTED
if (rv != 0) {
24380: e3500000 cmp r0, #0 <== NOT EXECUTED
24384: 0affffed beq 24340 <rtems_bdpart_unmount+0xa4> <== NOT EXECUTED
24388: e3a0401b mov r4, #27 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
2438c: e1a00005 mov r0, r5 <== NOT EXECUTED
24390: ebff8e76 bl 7d70 <free> <== NOT EXECUTED
return esc;
}
24394: e1a00004 mov r0, r4 <== NOT EXECUTED
24398: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
2439c: e1a00005 mov r0, r5 <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
243a0: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
243a4: ebff8e71 bl 7d70 <free> <== NOT EXECUTED
return esc;
}
243a8: e1a00004 mov r0, r4 <== NOT EXECUTED
243ac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
243b0: e1a00005 mov r0, r5 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
243b4: e3a04003 mov r4, #3 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
243b8: ebff8e6c bl 7d70 <free> <== NOT EXECUTED
return esc;
}
243bc: e1a00004 mov r0, r4 <== NOT EXECUTED
243c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00005a10 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
5a10: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
5a14: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
5a18: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
5a1c: e1a04002 mov r4, r2 <== NOT EXECUTED
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5a20: e28d1008 add r1, sp, #8 <== NOT EXECUTED
5a24: e28d2010 add r2, sp, #16 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
5a28: e3a05000 mov r5, #0 <== NOT EXECUTED
5a2c: e3a06000 mov r6, #0 <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
5a30: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
dev_t disk = 0;
5a34: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
5a38: e58d600c str r6, [sp, #12] <== NOT EXECUTED
dev_t logical_disk = 0;
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5a3c: eb007aee bl 245fc <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
5a40: e3500000 cmp r0, #0 <== NOT EXECUTED
5a44: 1a00000f bne 5a88 <rtems_bdpart_unregister+0x78> <== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5a48: e3540000 cmp r4, #0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
5a4c: e59d7008 ldr r7, [sp, #8] <== NOT EXECUTED
5a50: e59d500c ldr r5, [sp, #12] <== NOT EXECUTED
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5a54: 0a00000b beq 5a88 <rtems_bdpart_unregister+0x78> <== NOT EXECUTED
5a58: e1a06000 mov r6, r0 <== NOT EXECUTED
5a5c: ea000001 b 5a68 <rtems_bdpart_unregister+0x58> <== NOT EXECUTED
5a60: e1540006 cmp r4, r6 <== NOT EXECUTED
5a64: 9a000007 bls 5a88 <rtems_bdpart_unregister+0x78> <== NOT EXECUTED
/* New minor number */
++minor;
5a68: e2855001 add r5, r5, #1 <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
5a6c: e58d7000 str r7, [sp] <== NOT EXECUTED
temp.__overlay.minor = _minor;
5a70: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
5a74: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
5a78: eb000373 bl 684c <rtems_disk_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
5a7c: e3500000 cmp r0, #0 <== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
5a80: e2866001 add r6, r6, #1 <== NOT EXECUTED
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
if (sc != RTEMS_SUCCESSFUL) {
5a84: 0afffff5 beq 5a60 <rtems_bdpart_unregister+0x50> <== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
5a88: e28dd014 add sp, sp, #20 <== NOT EXECUTED
5a8c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00024ae0 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
24ae0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
24ae4: e2515000 subs r5, r1, #0 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
24ae8: e24dd034 sub sp, sp, #52 ; 0x34 <== NOT EXECUTED
24aec: e1a06002 mov r6, r2 <== NOT EXECUTED
24af0: e1a04003 mov r4, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
24af4: 0a000002 beq 24b04 <rtems_bdpart_write+0x24> <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
24af8: e5953000 ldr r3, [r5] <== NOT EXECUTED
24afc: e3530000 cmp r3, #0 <== NOT EXECUTED
24b00: 0a00000b beq 24b34 <rtems_bdpart_write+0x54> <== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
24b04: e3a0a000 mov sl, #0 <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
24b08: e3540000 cmp r4, #0 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
24b0c: e58da02c str sl, [sp, #44] ; 0x2c <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
24b10: e58da028 str sl, [sp, #40] ; 0x28 <== NOT EXECUTED
24b14: e3a07001 mov r7, #1 <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
24b18: 0a00000e beq 24b58 <rtems_bdpart_write+0x78> <== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
24b1c: e3550000 cmp r5, #0 <== NOT EXECUTED
24b20: 13560000 cmpne r6, #0 <== NOT EXECUTED
24b24: 03a00009 moveq r0, #9 <== NOT EXECUTED
24b28: 1a00000c bne 24b60 <rtems_bdpart_write+0x80> <== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
}
24b2c: e28dd034 add sp, sp, #52 ; 0x34 <== NOT EXECUTED
24b30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
24b34: e5d52008 ldrb r2, [r5, #8] <== NOT EXECUTED
24b38: e3520000 cmp r2, #0 <== NOT EXECUTED
24b3c: 0afffff0 beq 24b04 <rtems_bdpart_write+0x24> <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
24b40: e3540000 cmp r4, #0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
24b44: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
24b48: e58d302c str r3, [sp, #44] ; 0x2c <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
24b4c: e3a0a001 mov sl, #1 <== NOT EXECUTED
24b50: e3a0703f mov r7, #63 ; 0x3f <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
24b54: 1afffff0 bne 24b1c <rtems_bdpart_write+0x3c> <== NOT EXECUTED
}
cleanup:
if (block != NULL) {
rtems_bdbuf_sync( block);
24b58: e1a00004 mov r0, r4 <== NOT EXECUTED
24b5c: eafffff2 b 24b2c <rtems_bdpart_write+0x4c> <== NOT EXECUTED
if (format == NULL || pt == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
24b60: e28d1020 add r1, sp, #32 <== NOT EXECUTED
24b64: e28d2028 add r2, sp, #40 ; 0x28 <== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
dev_t disk = 0;
24b68: e3a08000 mov r8, #0 <== NOT EXECUTED
24b6c: e3a09000 mov r9, #0 <== NOT EXECUTED
24b70: e58d8020 str r8, [sp, #32] <== NOT EXECUTED
24b74: e58d9024 str r9, [sp, #36] ; 0x24 <== NOT EXECUTED
if (format == NULL || pt == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
24b78: ebfffe9f bl 245fc <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24b7c: e3500000 cmp r0, #0 <== NOT EXECUTED
24b80: 1affffe9 bne 24b2c <rtems_bdpart_write+0x4c> <== NOT EXECUTED
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
24b84: e35a0000 cmp sl, #0 <== NOT EXECUTED
24b88: 059d0028 ldreq r0, [sp, #40] ; 0x28 <== NOT EXECUTED
24b8c: 0a000005 beq 24ba8 <rtems_bdpart_write+0xc8> <== NOT EXECUTED
disk_end -= (disk_end % record_space);
24b90: e59d8028 ldr r8, [sp, #40] ; 0x28 <== NOT EXECUTED
24b94: e1a01007 mov r1, r7 <== NOT EXECUTED
24b98: e1a00008 mov r0, r8 <== NOT EXECUTED
24b9c: eb00df0a bl 5c7cc <__umodsi3> <== NOT EXECUTED
24ba0: e0600008 rsb r0, r0, r8 <== NOT EXECUTED
24ba4: e58d0028 str r0, [sp, #40] ; 0x28 <== NOT EXECUTED
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
24ba8: e596b000 ldr fp, [r6] <== NOT EXECUTED
24bac: e15b0000 cmp fp, r0 <== NOT EXECUTED
24bb0: 2a000053 bcs 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
24bb4: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
24bb8: e1530000 cmp r3, r0 <== NOT EXECUTED
24bbc: 8a000050 bhi 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
24bc0: e153000b cmp r3, fp <== NOT EXECUTED
24bc4: 81a08006 movhi r8, r6 <== NOT EXECUTED
24bc8: 81a03006 movhi r3, r6 <== NOT EXECUTED
24bcc: 83a01000 movhi r1, #0 <== NOT EXECUTED
24bd0: 8a00000c bhi 24c08 <rtems_bdpart_write+0x128> <== NOT EXECUTED
24bd4: ea00004a b 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
24bd8: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
24bdc: e1520000 cmp r2, r0 <== NOT EXECUTED
24be0: 2a000047 bcs 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
24be4: e593c034 ldr ip, [r3, #52] ; 0x34 <== NOT EXECUTED
24be8: e15c0000 cmp ip, r0 <== NOT EXECUTED
24bec: 8a000044 bhi 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
24bf0: e152000c cmp r2, ip <== NOT EXECUTED
24bf4: 2a000042 bcs 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
24bf8: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
24bfc: e152000c cmp r2, ip <== NOT EXECUTED
24c00: 3a00003f bcc 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
24c04: e2833030 add r3, r3, #48 ; 0x30 <== NOT EXECUTED
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
24c08: e2811001 add r1, r1, #1 <== NOT EXECUTED
24c0c: e1540001 cmp r4, r1 <== NOT EXECUTED
24c10: 8afffff0 bhi 24bd8 <rtems_bdpart_write+0xf8> <== NOT EXECUTED
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
24c14: e5953000 ldr r3, [r5] <== NOT EXECUTED
24c18: e3530000 cmp r3, #0 <== NOT EXECUTED
24c1c: 13a04018 movne r4, #24 <== NOT EXECUTED
24c20: 1a000038 bne 24d08 <rtems_bdpart_write+0x228> <== NOT EXECUTED
* Set primary partition count. If we have more than four partitions we need
* an extended partition which will contain the partitions of number four and
* above as logical partitions. If we have four or less partitions we can
* use the primary partition table.
*/
ppc = count <= 4 ? count : 3;
24c24: e3540004 cmp r4, #4 <== NOT EXECUTED
24c28: 91a09004 movls r9, r4 <== NOT EXECUTED
24c2c: 83a09003 movhi r9, #3 <== NOT EXECUTED
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
24c30: e35a0000 cmp sl, #0 <== NOT EXECUTED
24c34: 0a000001 beq 24c40 <rtems_bdpart_write+0x160> <== NOT EXECUTED
24c38: e35b003f cmp fp, #63 ; 0x3f <== NOT EXECUTED
24c3c: 1a000030 bne 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
24c40: e1590004 cmp r9, r4 <== NOT EXECUTED
24c44: 2a000018 bcs 24cac <rtems_bdpart_write+0x1cc> <== NOT EXECUTED
if ((pt [i].begin - pt [i - 1].end) < record_space) {
24c48: e2493001 sub r3, r9, #1 <== NOT EXECUTED
24c4c: e0832083 add r2, r3, r3, lsl #1 <== NOT EXECUTED
24c50: e0893089 add r3, r9, r9, lsl #1 <== NOT EXECUTED
24c54: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED
24c58: e0862202 add r2, r6, r2, lsl #4 <== NOT EXECUTED
24c5c: e7961003 ldr r1, [r6, r3] <== NOT EXECUTED
24c60: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
24c64: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
24c68: e1570002 cmp r7, r2 <== NOT EXECUTED
24c6c: e0862003 add r2, r6, r3 <== NOT EXECUTED
24c70: 8a000023 bhi 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
24c74: e2891001 add r1, r9, #1 <== NOT EXECUTED
24c78: e0811081 add r1, r1, r1, lsl #1 <== NOT EXECUTED
24c7c: e0861201 add r1, r6, r1, lsl #4 <== NOT EXECUTED
24c80: e1a03009 mov r3, r9 <== NOT EXECUTED
24c84: ea000005 b 24ca0 <rtems_bdpart_write+0x1c0> <== NOT EXECUTED
24c88: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
24c8c: e491c030 ldr ip, [r1], #48 ; 0x30 <== NOT EXECUTED
24c90: e060000c rsb r0, r0, ip <== NOT EXECUTED
24c94: e1570000 cmp r7, r0 <== NOT EXECUTED
24c98: e2822030 add r2, r2, #48 ; 0x30 <== NOT EXECUTED
24c9c: 8a000018 bhi 24d04 <rtems_bdpart_write+0x224> <== NOT EXECUTED
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
24ca0: e2833001 add r3, r3, #1 <== NOT EXECUTED
24ca4: e1540003 cmp r4, r3 <== NOT EXECUTED
24ca8: 8afffff6 bhi 24c88 <rtems_bdpart_write+0x1a8> <== NOT EXECUTED
24cac: e3a0b000 mov fp, #0 <== NOT EXECUTED
24cb0: e1a0a006 mov sl, r6 <== NOT EXECUTED
24cb4: ea000008 b 24cdc <rtems_bdpart_write+0x1fc> <== NOT EXECUTED
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
24cb8: e59a202c ldr r2, [sl, #44] ; 0x2c <== NOT EXECUTED
24cbc: e3520000 cmp r2, #0 <== NOT EXECUTED
24cc0: 1a00000d bne 24cfc <rtems_bdpart_write+0x21c> <== NOT EXECUTED
24cc4: e59a3028 ldr r3, [sl, #40] ; 0x28 <== NOT EXECUTED
24cc8: e35300ff cmp r3, #255 ; 0xff <== NOT EXECUTED
24ccc: 8a00000a bhi 24cfc <rtems_bdpart_write+0x21c> <== NOT EXECUTED
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
24cd0: e154000b cmp r4, fp <== NOT EXECUTED
24cd4: e28aa030 add sl, sl, #48 ; 0x30 <== NOT EXECUTED
24cd8: 9a000010 bls 24d20 <rtems_bdpart_write+0x240> <== NOT EXECUTED
uint8_t type = 0;
24cdc: e3a02000 mov r2, #0 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
24ce0: e28a0008 add r0, sl, #8 <== NOT EXECUTED
24ce4: e28d1033 add r1, sp, #51 ; 0x33 <== NOT EXECUTED
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
24ce8: e5cd2033 strb r2, [sp, #51] ; 0x33 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
24cec: ebfffe60 bl 24674 <rtems_bdpart_to_mbr_partition_type> <== NOT EXECUTED
24cf0: e3500000 cmp r0, #0 <== NOT EXECUTED
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
24cf4: e28bb001 add fp, fp, #1 <== NOT EXECUTED
uint8_t type = 0;
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
24cf8: 1affffee bne 24cb8 <rtems_bdpart_write+0x1d8> <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24cfc: e3a04004 mov r4, #4 <== NOT EXECUTED
24d00: ea000000 b 24d08 <rtems_bdpart_write+0x228> <== NOT EXECUTED
24d04: e3a0400a mov r4, #10 <== NOT EXECUTED
}
}
cleanup:
if (block != NULL) {
24d08: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
24d0c: e3500000 cmp r0, #0 <== NOT EXECUTED
24d10: 0affff90 beq 24b58 <rtems_bdpart_write+0x78> <== NOT EXECUTED
rtems_bdbuf_sync( block);
24d14: ebff805c bl 4e8c <rtems_bdbuf_sync> <== NOT EXECUTED
24d18: e1a00004 mov r0, r4 <== NOT EXECUTED
24d1c: eaffff82 b 24b2c <rtems_bdpart_write+0x4c> <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( disk, 0, &block);
24d20: e28d1020 add r1, sp, #32 <== NOT EXECUTED
24d24: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
24d28: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED
24d2c: ebffff46 bl 24a4c <rtems_bdpart_new_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24d30: e3500000 cmp r0, #0 <== NOT EXECUTED
24d34: 1a0000b8 bne 2501c <rtems_bdpart_write+0x53c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
24d38: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
24d3c: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
24d40: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24d44: e1a05c22 lsr r5, r2, #24 <== NOT EXECUTED
value >>= 8;
24d48: e1a0c422 lsr ip, r2, #8 <== NOT EXECUTED
24d4c: e1a01822 lsr r1, r2, #16 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24d50: e5c351bb strb r5, [r3, #443] ; 0x1bb <== NOT EXECUTED
24d54: e5c3c1b9 strb ip, [r3, #441] ; 0x1b9 <== NOT EXECUTED
24d58: e5c311ba strb r1, [r3, #442] ; 0x1ba <== NOT EXECUTED
24d5c: e5c321b8 strb r2, [r3, #440] ; 0x1b8 <== NOT EXECUTED
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
24d60: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
24d64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
24d68: e2835f6f add r5, r3, #444 ; 0x1bc <== NOT EXECUTED
24d6c: e2855002 add r5, r5, #2 <== NOT EXECUTED
24d70: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
24d74: e58d9004 str r9, [sp, #4] <== NOT EXECUTED
24d78: e58d700c str r7, [sp, #12] <== NOT EXECUTED
24d7c: e58d6010 str r6, [sp, #16] <== NOT EXECUTED
24d80: e58d4014 str r4, [sp, #20] <== NOT EXECUTED
for (i = 0; i < ppc; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
24d84: e5982000 ldr r2, [r8] <== NOT EXECUTED
24d88: e5981004 ldr r1, [r8, #4] <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
24d8c: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
static inline uint8_t rtems_bdpart_mbr_partition_type(
const uuid_t type
)
{
return type [0];
24d90: e5d8c008 ldrb ip, [r8, #8] <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
24d94: e598b028 ldr fp, [r8, #40] ; 0x28 <== NOT EXECUTED
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
24d98: e0621001 rsb r1, r2, r1 <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
24d9c: e2800001 add r0, r0, #1 <== NOT EXECUTED
24da0: e1a04c21 lsr r4, r1, #24 <== NOT EXECUTED
24da4: e15a0000 cmp sl, r0 <== NOT EXECUTED
value >>= 8;
24da8: e1a09422 lsr r9, r2, #8 <== NOT EXECUTED
24dac: e1a0a822 lsr sl, r2, #16 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24db0: e1a07c22 lsr r7, r2, #24 <== NOT EXECUTED
value >>= 8;
24db4: e1a06421 lsr r6, r1, #8 <== NOT EXECUTED
24db8: e1a05821 lsr r5, r1, #16 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24dbc: e5c391c7 strb r9, [r3, #455] ; 0x1c7 <== NOT EXECUTED
24dc0: e5c3a1c8 strb sl, [r3, #456] ; 0x1c8 <== NOT EXECUTED
24dc4: e5c371c9 strb r7, [r3, #457] ; 0x1c9 <== NOT EXECUTED
24dc8: e5c361cb strb r6, [r3, #459] ; 0x1cb <== NOT EXECUTED
24dcc: e5c351cc strb r5, [r3, #460] ; 0x1cc <== NOT EXECUTED
24dd0: e5c341cd strb r4, [r3, #461] ; 0x1cd <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
24dd4: e5c3c1c2 strb ip, [r3, #450] ; 0x1c2 <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
24dd8: e5c3b1be strb fp, [r3, #446] ; 0x1be <== NOT EXECUTED
24ddc: e5c321c6 strb r2, [r3, #454] ; 0x1c6 <== NOT EXECUTED
24de0: e5c311ca strb r1, [r3, #458] ; 0x1ca <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
24de4: e2888030 add r8, r8, #48 ; 0x30 <== NOT EXECUTED
24de8: e2833010 add r3, r3, #16 <== NOT EXECUTED
24dec: 8affffe4 bhi 24d84 <rtems_bdpart_write+0x2a4> <== NOT EXECUTED
24df0: e59d9004 ldr r9, [sp, #4] <== NOT EXECUTED
24df4: e59d4014 ldr r4, [sp, #20] <== NOT EXECUTED
24df8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
24dfc: e1590004 cmp r9, r4 <== NOT EXECUTED
24e00: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
24e04: e59d6010 ldr r6, [sp, #16] <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
24e08: e0803209 add r3, r0, r9, lsl #4 <== NOT EXECUTED
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
24e0c: 0a000084 beq 25024 <rtems_bdpart_write+0x544> <== NOT EXECUTED
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
24e10: e3a00030 mov r0, #48 ; 0x30 <== NOT EXECUTED
24e14: e0050990 mul r5, r0, r9 <== NOT EXECUTED
24e18: e7962005 ldr r2, [r6, r5] <== NOT EXECUTED
24e1c: e0672002 rsb r2, r7, r2 <== NOT EXECUTED
24e20: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
24e24: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
24e28: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED
24e2c: e0612002 rsb r2, r1, r2 <== NOT EXECUTED
value >>= 8;
24e30: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24e34: e1a08c22 lsr r8, r2, #24 <== NOT EXECUTED
24e38: e58d801c str r8, [sp, #28] <== NOT EXECUTED
value >>= 8;
24e3c: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
24e40: e1a0a42a lsr sl, sl, #8 <== NOT EXECUTED
24e44: e58da018 str sl, [sp, #24] <== NOT EXECUTED
24e48: e1a08828 lsr r8, r8, #16 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24e4c: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
value >>= 8;
24e50: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
24e54: e1a08422 lsr r8, r2, #8 <== NOT EXECUTED
24e58: e58d8010 str r8, [sp, #16] <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24e5c: e1a0ac2a lsr sl, sl, #24 <== NOT EXECUTED
24e60: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
24e64: e58da000 str sl, [sp] <== NOT EXECUTED
value >>= 8;
24e68: e1a0a822 lsr sl, r2, #16 <== NOT EXECUTED
24e6c: e58da00c str sl, [sp, #12] <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24e70: e5c38008 strb r8, [r3, #8] <== NOT EXECUTED
24e74: e59d8000 ldr r8, [sp] <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
24e78: e283c008 add ip, r3, #8 <== NOT EXECUTED
24e7c: e5cc8003 strb r8, [ip, #3] <== NOT EXECUTED
24e80: e59d8018 ldr r8, [sp, #24] <== NOT EXECUTED
24e84: e5cc8001 strb r8, [ip, #1] <== NOT EXECUTED
24e88: e59d8014 ldr r8, [sp, #20] <== NOT EXECUTED
24e8c: e5cc8002 strb r8, [ip, #2] <== NOT EXECUTED
24e90: e5c3200c strb r2, [r3, #12] <== NOT EXECUTED
24e94: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
24e98: e283100c add r1, r3, #12 <== NOT EXECUTED
24e9c: e5c12003 strb r2, [r1, #3] <== NOT EXECUTED
24ea0: e59d8010 ldr r8, [sp, #16] <== NOT EXECUTED
24ea4: e5c18001 strb r8, [r1, #1] <== NOT EXECUTED
24ea8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
24eac: e3a0b005 mov fp, #5 <== NOT EXECUTED
24eb0: e5c12002 strb r2, [r1, #2] <== NOT EXECUTED
24eb4: e5c3b004 strb fp, [r3, #4] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
24eb8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
24ebc: e3a0a000 mov sl, #0 <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
24ec0: e1a0800b mov r8, fp <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
24ec4: e7c1a209 strb sl, [r1, r9, lsl #4] <== NOT EXECUTED
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
24ec8: e0865005 add r5, r6, r5 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24ecc: 2a000054 bcs 25024 <rtems_bdpart_write+0x544> <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
24ed0: e2893001 add r3, r9, #1 <== NOT EXECUTED
24ed4: e58d9008 str r9, [sp, #8] <== NOT EXECUTED
24ed8: e0286390 mla r8, r0, r3, r6 <== NOT EXECUTED
24edc: e1a0b004 mov fp, r4 <== NOT EXECUTED
24ee0: e1a06009 mov r6, r9 <== NOT EXECUTED
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( disk, ebr, &block);
24ee4: e5952000 ldr r2, [r5] <== NOT EXECUTED
24ee8: e28d1020 add r1, sp, #32 <== NOT EXECUTED
24eec: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
24ef0: e0672002 rsb r2, r7, r2 <== NOT EXECUTED
24ef4: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED
24ef8: ebfffed3 bl 24a4c <rtems_bdpart_new_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
24efc: e3500000 cmp r0, #0 <== NOT EXECUTED
24f00: 1a000045 bne 2501c <rtems_bdpart_write+0x53c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
24f04: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
24f08: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
record_space,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
24f0c: e5954028 ldr r4, [r5, #40] ; 0x28 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
24f10: e281cf6f add ip, r1, #444 ; 0x1bc <== NOT EXECUTED
24f14: e5959004 ldr r9, [r5, #4] <== NOT EXECUTED
24f18: e595a000 ldr sl, [r5] <== NOT EXECUTED
24f1c: e5d55008 ldrb r5, [r5, #8] <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
record_space,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
24f20: e1a03001 mov r3, r1 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
24f24: e28cc002 add ip, ip, #2 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
24f28: e2810004 add r0, r1, #4 <== NOT EXECUTED
24f2c: e1a02007 mov r2, r7 <== NOT EXECUTED
24f30: e5c321c6 strb r2, [r3, #454] ; 0x1c6 <== NOT EXECUTED
24f34: e2833001 add r3, r3, #1 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
24f38: e1530000 cmp r3, r0 <== NOT EXECUTED
data [i] = (uint8_t) value;
24f3c: e3a02000 mov r2, #0 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
24f40: 1afffffa bne 24f30 <rtems_bdpart_write+0x450> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
24f44: e06aa009 rsb sl, sl, r9 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24f48: e2866001 add r6, r6, #1 <== NOT EXECUTED
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
24f4c: e28cc00c add ip, ip, #12 <== NOT EXECUTED
data [i] = (uint8_t) value;
24f50: e1a00c2a lsr r0, sl, #24 <== NOT EXECUTED
value >>= 8;
24f54: e1a0242a lsr r2, sl, #8 <== NOT EXECUTED
24f58: e1a0382a lsr r3, sl, #16 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24f5c: e15b0006 cmp fp, r6 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24f60: e5c1a1ca strb sl, [r1, #458] ; 0x1ca <== NOT EXECUTED
24f64: e5cc0003 strb r0, [ip, #3] <== NOT EXECUTED
24f68: e5cc2001 strb r2, [ip, #1] <== NOT EXECUTED
24f6c: e5cc3002 strb r3, [ip, #2] <== NOT EXECUTED
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
24f70: e5c141be strb r4, [r1, #446] ; 0x1be <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
24f74: e5c151c2 strb r5, [r1, #450] ; 0x1c2 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24f78: 9a000029 bls 25024 <rtems_bdpart_write+0x544> <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
24f7c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
24f80: e1520006 cmp r2, r6 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
24f84: e1a05008 mov r5, r8 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
24f88: 2a000021 bcs 25014 <rtems_bdpart_write+0x534> <== NOT EXECUTED
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
24f8c: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
for (i = ppc; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
24f90: e5981000 ldr r1, [r8] <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
24f94: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
24f98: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED
24f9c: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
for (i = ppc; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
24fa0: e0671001 rsb r1, r7, r1 <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
24fa4: e0612002 rsb r2, r1, r2 <== NOT EXECUTED
24fa8: e283cf73 add ip, r3, #460 ; 0x1cc <== NOT EXECUTED
24fac: e06a1001 rsb r1, sl, r1 <== NOT EXECUTED
24fb0: e1a0ec22 lsr lr, r2, #24 <== NOT EXECUTED
24fb4: e28cc002 add ip, ip, #2 <== NOT EXECUTED
24fb8: e58de010 str lr, [sp, #16] <== NOT EXECUTED
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
24fbc: e28c000c add r0, ip, #12 <== NOT EXECUTED
24fc0: e1a0ac21 lsr sl, r1, #24 <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
24fc4: e28cc008 add ip, ip, #8 <== NOT EXECUTED
value >>= 8;
24fc8: e1a0e422 lsr lr, r2, #8 <== NOT EXECUTED
24fcc: e1a04421 lsr r4, r1, #8 <== NOT EXECUTED
24fd0: e1a09821 lsr r9, r1, #16 <== NOT EXECUTED
24fd4: e58de00c str lr, [sp, #12] <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24fd8: e5c311d6 strb r1, [r3, #470] ; 0x1d6 <== NOT EXECUTED
24fdc: e5cca003 strb sl, [ip, #3] <== NOT EXECUTED
24fe0: e5cc4001 strb r4, [ip, #1] <== NOT EXECUTED
24fe4: e5cc9002 strb r9, [ip, #2] <== NOT EXECUTED
24fe8: e5c321da strb r2, [r3, #474] ; 0x1da <== NOT EXECUTED
24fec: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
24ff0: e5c01003 strb r1, [r0, #3] <== NOT EXECUTED
value >>= 8;
24ff4: e1a0e822 lsr lr, r2, #16 <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
24ff8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
24ffc: e3a0a000 mov sl, #0 <== NOT EXECUTED
25000: e5c0e002 strb lr, [r0, #2] <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
25004: e3a0e005 mov lr, #5 <== NOT EXECUTED
25008: e5c02001 strb r2, [r0, #1] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
2500c: e5c3a1ce strb sl, [r3, #462] ; 0x1ce <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
25010: e5c3e1d2 strb lr, [r3, #466] ; 0x1d2 <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
25014: e2888030 add r8, r8, #48 ; 0x30 <== NOT EXECUTED
25018: eaffffb1 b 24ee4 <rtems_bdpart_write+0x404> <== NOT EXECUTED
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( disk, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
2501c: e1a04000 mov r4, r0 <== NOT EXECUTED
25020: eaffff38 b 24d08 <rtems_bdpart_write+0x228> <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
25024: e3a04000 mov r4, #0 <== NOT EXECUTED
25028: eaffff36 b 24d08 <rtems_bdpart_write+0x228> <== NOT EXECUTED
0000cce0 <rtems_blkdev_generic_ioctl>:
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
cce0: e3a03911 mov r3, #278528 ; 0x44000
cce4: e5921004 ldr r1, [r2, #4]
cce8: e2833c02 add r3, r3, #512 ; 0x200
ccec: e283310d add r3, r3, #1073741827 ; 0x40000003
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ccf0: e92d4010 push {r4, lr}
ccf4: e1a04002 mov r4, r2
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
ccf8: e5922000 ldr r2, [r2]
int rc;
switch (args->command)
ccfc: e1510003 cmp r1, r3
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
cd00: e5923034 ldr r3, [r2, #52] ; 0x34
int rc;
switch (args->command)
cd04: 0a00003d beq ce00 <rtems_blkdev_generic_ioctl+0x120>
cd08: 9a000017 bls cd6c <rtems_blkdev_generic_ioctl+0x8c>
cd0c: e3a02102 mov r2, #-2147483648 ; 0x80000000
cd10: e2822911 add r2, r2, #278528 ; 0x44000
cd14: e2822f81 add r2, r2, #516 ; 0x204
cd18: e1510002 cmp r1, r2
cd1c: 0a000022 beq cdac <rtems_blkdev_generic_ioctl+0xcc>
cd20: e3a02961 mov r2, #1589248 ; 0x184000 <== NOT EXECUTED
cd24: e2822c02 add r2, r2, #512 ; 0x200 <== NOT EXECUTED
cd28: e2822107 add r2, r2, #-1073741823 ; 0xc0000001 <== NOT EXECUTED
cd2c: e1510002 cmp r1, r2 <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
cd30: 03e03000 mvneq r3, #0 <== NOT EXECUTED
cd34: 0584300c streq r3, [r4, #12] <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
cd38: 0a000009 beq cd64 <rtems_blkdev_generic_ioctl+0x84> <== NOT EXECUTED
cd3c: e3a02911 mov r2, #278528 ; 0x44000 <== NOT EXECUTED
cd40: e2822f81 add r2, r2, #516 ; 0x204 <== NOT EXECUTED
cd44: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED
cd48: e1510002 cmp r1, r2 <== NOT EXECUTED
cd4c: 0a00001d beq cdc8 <rtems_blkdev_generic_ioctl+0xe8> <== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
cd50: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
cd54: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
cd58: e1a0e00f mov lr, pc <== NOT EXECUTED
cd5c: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
cd60: e584000c str r0, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
cd64: e3a00000 mov r0, #0 <== NOT EXECUTED
cd68: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
cd6c: e3a02c42 mov r2, #16896 ; 0x4200 <== NOT EXECUTED
cd70: e2822262 add r2, r2, #536870918 ; 0x20000006 <== NOT EXECUTED
cd74: e1510002 cmp r1, r2 <== NOT EXECUTED
cd78: 0a000019 beq cde4 <rtems_blkdev_generic_ioctl+0x104> <== NOT EXECUTED
cd7c: e3a02911 mov r2, #278528 ; 0x44000 <== NOT EXECUTED
cd80: e2822c02 add r2, r2, #512 ; 0x200 <== NOT EXECUTED
cd84: e2822109 add r2, r2, #1073741826 ; 0x40000002 <== NOT EXECUTED
cd88: e1510002 cmp r1, r2 <== NOT EXECUTED
cd8c: 1affffef bne cd50 <rtems_blkdev_generic_ioctl+0x70> <== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
cd90: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED
cd94: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
cd98: e5832000 str r2, [r3] <== NOT EXECUTED
args->ioctl_return = 0;
cd9c: e3a03000 mov r3, #0 <== NOT EXECUTED
cda0: e584300c str r3, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
cda4: e3a00000 mov r0, #0 <== NOT EXECUTED
cda8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
cdac: e5942008 ldr r2, [r4, #8]
cdb0: e5922000 ldr r2, [r2]
cdb4: e5832020 str r2, [r3, #32]
args->ioctl_return = 0;
cdb8: e3a03000 mov r3, #0
cdbc: e584300c str r3, [r4, #12]
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
cdc0: e3a00000 mov r0, #0
cdc4: e8bd8010 pop {r4, pc}
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
cdc8: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
cdcc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
cdd0: e5832000 str r2, [r3] <== NOT EXECUTED
args->ioctl_return = 0;
cdd4: e3a03000 mov r3, #0 <== NOT EXECUTED
cdd8: e584300c str r3, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
cddc: e3a00000 mov r0, #0 <== NOT EXECUTED
cde0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
cde4: e8930003 ldm r3, {r0, r1} <== NOT EXECUTED
cde8: ebfff791 bl ac34 <rtems_bdbuf_syncdev> <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
cdec: e2503000 subs r3, r0, #0 <== NOT EXECUTED
cdf0: 13e03000 mvnne r3, #0 <== NOT EXECUTED
cdf4: e584300c str r3, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
cdf8: e3a00000 mov r0, #0 <== NOT EXECUTED
cdfc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
ce00: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
ce04: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
ce08: e5832000 str r2, [r3] <== NOT EXECUTED
args->ioctl_return = 0;
ce0c: e3a03000 mov r3, #0 <== NOT EXECUTED
ce10: e584300c str r3, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
ce14: e3a00000 mov r0, #0 <== NOT EXECUTED
ce18: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000cf6c <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
cf6c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
cf70: e5923000 ldr r3, [r2] <== NOT EXECUTED
cf74: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
cf78: e5924010 ldr r4, [r2, #16] <== NOT EXECUTED
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
cf7c: e1a07002 mov r7, r2 <== NOT EXECUTED
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
cf80: e8930006 ldm r3, {r1, r2} <== NOT EXECUTED
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
cf84: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
cf88: e3540000 cmp r4, #0 <== NOT EXECUTED
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
cf8c: e3a05000 mov r5, #0 <== NOT EXECUTED
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
cf90: e5939020 ldr r9, [r3, #32] <== NOT EXECUTED
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
cf94: e88d0006 stm sp, {r1, r2} <== NOT EXECUTED
args->bytes_moved = 0;
cf98: e5875018 str r5, [r7, #24] <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
cf9c: e597600c ldr r6, [r7, #12] <== NOT EXECUTED
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
cfa0: e9970c00 ldmib r7, {sl, fp} <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
cfa4: 01a03004 moveq r3, r4 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
cfa8: 0a000028 beq d050 <rtems_blkdev_generic_read+0xe4> <== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
cfac: e1a03005 mov r3, r5 <== NOT EXECUTED
cfb0: e1a0100b mov r1, fp <== NOT EXECUTED
cfb4: e1a02009 mov r2, r9 <== NOT EXECUTED
cfb8: e1a0000a mov r0, sl <== NOT EXECUTED
cfbc: eb0041a3 bl 1d650 <__divdi3> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
cfc0: e1a0100b mov r1, fp <== NOT EXECUTED
cfc4: e1a03005 mov r3, r5 <== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
cfc8: e1a08000 mov r8, r0 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
cfcc: e1a02009 mov r2, r9 <== NOT EXECUTED
cfd0: e1a0000a mov r0, sl <== NOT EXECUTED
cfd4: eb0042c7 bl 1daf8 <__moddi3> <== NOT EXECUTED
cfd8: e28db008 add fp, sp, #8 <== NOT EXECUTED
cfdc: e1a05000 mov r5, r0 <== NOT EXECUTED
cfe0: ea000012 b d030 <rtems_blkdev_generic_read+0xc4> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
cfe4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
cfe8: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
cfec: e15a0004 cmp sl, r4 <== NOT EXECUTED
cff0: 21a0a004 movcs sl, r4 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
cff4: e1a0200a mov r2, sl <== NOT EXECUTED
cff8: e0811005 add r1, r1, r5 <== NOT EXECUTED
cffc: eb001b90 bl 13e44 <memcpy> <== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
d000: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
d004: ebfff9b3 bl b6d8 <rtems_bdbuf_release> <== NOT EXECUTED
args->bytes_moved += copy;
d008: e5972018 ldr r2, [r7, #24] <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
d00c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
d010: e082200a add r2, r2, sl <== NOT EXECUTED
d014: e5872018 str r2, [r7, #24] <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
d018: 1a00000c bne d050 <rtems_blkdev_generic_read+0xe4> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
d01c: e054400a subs r4, r4, sl <== NOT EXECUTED
d020: 0a00000a beq d050 <rtems_blkdev_generic_read+0xe4> <== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
d024: e086600a add r6, r6, sl <== NOT EXECUTED
blkofs = 0;
block++;
d028: e2888001 add r8, r8, #1 <== NOT EXECUTED
d02c: e1a05003 mov r5, r3 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
d030: e1a0300b mov r3, fp <== NOT EXECUTED
d034: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
d038: e1a02008 mov r2, r8 <== NOT EXECUTED
d03c: ebfffe36 bl c91c <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
d040: e2503000 subs r3, r0, #0 <== NOT EXECUTED
break;
copy = block_size - blkofs;
d044: e065a009 rsb sl, r5, r9 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
d048: e1a00006 mov r0, r6 <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
d04c: 0affffe4 beq cfe4 <rtems_blkdev_generic_read+0x78> <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
d050: e1a00003 mov r0, r3 <== NOT EXECUTED
d054: e28dd00c add sp, sp, #12 <== NOT EXECUTED
d058: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000ce54 <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ce54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
ce58: e5923000 ldr r3, [r2] <== NOT EXECUTED
ce5c: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
ce60: e5924010 ldr r4, [r2, #16] <== NOT EXECUTED
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ce64: e1a07002 mov r7, r2 <== NOT EXECUTED
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
ce68: e8930006 ldm r3, {r1, r2} <== NOT EXECUTED
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ce6c: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
ce70: e3540000 cmp r4, #0 <== NOT EXECUTED
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
ce74: e3a05000 mov r5, #0 <== NOT EXECUTED
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
ce78: e5939020 ldr r9, [r3, #32] <== NOT EXECUTED
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
ce7c: e88d0006 stm sp, {r1, r2} <== NOT EXECUTED
args->bytes_moved = 0;
ce80: e5875018 str r5, [r7, #24] <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
ce84: e597600c ldr r6, [r7, #12] <== NOT EXECUTED
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ce88: e9970c00 ldmib r7, {sl, fp} <== NOT EXECUTED
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
ce8c: 01a00004 moveq r0, r4 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
ce90: 0a000033 beq cf64 <rtems_blkdev_generic_write+0x110> <== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ce94: e1a03005 mov r3, r5 <== NOT EXECUTED
ce98: e1a0100b mov r1, fp <== NOT EXECUTED
ce9c: e1a02009 mov r2, r9 <== NOT EXECUTED
cea0: e1a0000a mov r0, sl <== NOT EXECUTED
cea4: eb0041e9 bl 1d650 <__divdi3> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
cea8: e1a0100b mov r1, fp <== NOT EXECUTED
ceac: e1a03005 mov r3, r5 <== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ceb0: e1a08000 mov r8, r0 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ceb4: e1a02009 mov r2, r9 <== NOT EXECUTED
ceb8: e1a0000a mov r0, sl <== NOT EXECUTED
cebc: eb00430d bl 1daf8 <__moddi3> <== NOT EXECUTED
cec0: e28db008 add fp, sp, #8 <== NOT EXECUTED
cec4: e1a05000 mov r5, r0 <== NOT EXECUTED
cec8: ea00001a b cf38 <rtems_blkdev_generic_write+0xe4> <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
rc = rtems_bdbuf_get(dev, block, &diskbuf);
cecc: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
ced0: e1a02008 mov r2, r8 <== NOT EXECUTED
ced4: e1a0300b mov r3, fp <== NOT EXECUTED
ced8: ebfffe5b bl c84c <rtems_bdbuf_get> <== NOT EXECUTED
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
cedc: e3500000 cmp r0, #0 <== NOT EXECUTED
break;
copy = block_size - blkofs;
cee0: e065a009 rsb sl, r5, r9 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
cee4: e1a01006 mov r1, r6 <== NOT EXECUTED
if ((blkofs == 0) && (count >= block_size))
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
cee8: 1a00001d bne cf64 <rtems_blkdev_generic_write+0x110> <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
ceec: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
cef0: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
cef4: e15a0004 cmp sl, r4 <== NOT EXECUTED
cef8: 21a0a004 movcs sl, r4 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
cefc: e1a0200a mov r2, sl <== NOT EXECUTED
cf00: e0800005 add r0, r0, r5 <== NOT EXECUTED
cf04: eb001bce bl 13e44 <memcpy> <== NOT EXECUTED
args->bytes_moved += copy;
cf08: e5973018 ldr r3, [r7, #24] <== NOT EXECUTED
cf0c: e083300a add r3, r3, sl <== NOT EXECUTED
cf10: e5873018 str r3, [r7, #24] <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
cf14: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
cf18: ebfff9cc bl b650 <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
cf1c: e3500000 cmp r0, #0 <== NOT EXECUTED
cf20: 1a00000f bne cf64 <rtems_blkdev_generic_write+0x110> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
cf24: e054400a subs r4, r4, sl <== NOT EXECUTED
cf28: 0a00000d beq cf64 <rtems_blkdev_generic_write+0x110> <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
cf2c: e086600a add r6, r6, sl <== NOT EXECUTED
blkofs = 0;
block++;
cf30: e2888001 add r8, r8, #1 <== NOT EXECUTED
cf34: e1a05000 mov r5, r0 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
cf38: e1540009 cmp r4, r9 <== NOT EXECUTED
cf3c: 23550000 cmpcs r5, #0 <== NOT EXECUTED
cf40: 0affffe1 beq cecc <rtems_blkdev_generic_write+0x78> <== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
cf44: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
cf48: e1a0300b mov r3, fp <== NOT EXECUTED
cf4c: e1a02008 mov r2, r8 <== NOT EXECUTED
cf50: ebfffe71 bl c91c <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
cf54: e3500000 cmp r0, #0 <== NOT EXECUTED
break;
copy = block_size - blkofs;
cf58: e065a009 rsb sl, r5, r9 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
cf5c: e1a01006 mov r1, r6 <== NOT EXECUTED
if ((blkofs == 0) && (count >= block_size))
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
cf60: 0affffe1 beq ceec <rtems_blkdev_generic_write+0x98> <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
cf64: e28dd00c add sp, sp, #12 <== NOT EXECUTED
cf68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000cc34 <rtems_blkdev_ioctl>:
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
cc34: e3a03911 mov r3, #278528 ; 0x44000
cc38: e2833c02 add r3, r3, #512 ; 0x200
cc3c: e283310d add r3, r3, #1073741827 ; 0x40000003
cc40: e1510003 cmp r1, r3
return RTEMS_SUCCESSFUL;
}
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
cc44: e52de004 push {lr} ; (str lr, [sp, #-4]!)
size_t *arg_size = argp;
int rc = 0;
switch (req)
cc48: 0a00001c beq ccc0 <rtems_blkdev_ioctl+0x8c>
cc4c: 9a00000d bls cc88 <rtems_blkdev_ioctl+0x54>
cc50: e3a03911 mov r3, #278528 ; 0x44000 <== NOT EXECUTED
cc54: e2833f81 add r3, r3, #516 ; 0x204 <== NOT EXECUTED
cc58: e2833105 add r3, r3, #1073741825 ; 0x40000001 <== NOT EXECUTED
cc5c: e1510003 cmp r1, r3 <== NOT EXECUTED
cc60: 0a000012 beq ccb0 <rtems_blkdev_ioctl+0x7c> <== NOT EXECUTED
cc64: e3a03102 mov r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
cc68: e2833911 add r3, r3, #278528 ; 0x44000 <== NOT EXECUTED
cc6c: e2833f81 add r3, r3, #516 ; 0x204 <== NOT EXECUTED
cc70: e1510003 cmp r1, r3 <== NOT EXECUTED
cc74: 1a000008 bne cc9c <rtems_blkdev_ioctl+0x68> <== NOT EXECUTED
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
cc78: e5923000 ldr r3, [r2] <== NOT EXECUTED
cc7c: e5803020 str r3, [r0, #32] <== NOT EXECUTED
cc80: e3a00000 mov r0, #0 <== NOT EXECUTED
break;
cc84: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
cc88: e3a03911 mov r3, #278528 ; 0x44000
cc8c: e2833c02 add r3, r3, #512 ; 0x200
cc90: e2833109 add r3, r3, #1073741826 ; 0x40000002
cc94: e1510003 cmp r1, r3
cc98: 0a00000c beq ccd0 <rtems_blkdev_ioctl+0x9c>
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
cc9c: eb001a5a bl 1360c <__errno>
cca0: e3a03016 mov r3, #22
cca4: e5803000 str r3, [r0]
cca8: e3e00000 mvn r0, #0
rc = -1;
break;
}
return rc;
}
ccac: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
ccb0: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
ccb4: e3a00000 mov r0, #0 <== NOT EXECUTED
ccb8: e5823000 str r3, [r2] <== NOT EXECUTED
break;
ccbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
ccc0: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
ccc4: e3a00000 mov r0, #0 <== NOT EXECUTED
ccc8: e5823000 str r3, [r2] <== NOT EXECUTED
break;
cccc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int rc = 0;
switch (req)
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
ccd0: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
ccd4: e3a00000 mov r0, #0 <== NOT EXECUTED
ccd8: e5823000 str r3, [r2] <== NOT EXECUTED
break;
ccdc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000f5b4 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
f5b4: e92d4010 push {r4, lr} <== NOT EXECUTED
f5b8: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
f5bc: e59f0018 ldr r0, [pc, #24] ; f5dc <rtems_deviceio_errno+0x28><== NOT EXECUTED
f5c0: eb000006 bl f5e0 <rtems_assoc_remote_by_local> <== NOT EXECUTED
f5c4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
f5c8: 0a000001 beq f5d4 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{
errno = rc;
f5cc: eb000050 bl f714 <__errno> <== NOT EXECUTED
f5d0: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
}
return -1;
}
f5d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
f5d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002100 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
2100: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
2104: e24dd010 sub sp, sp, #16
2108: e1a04000 mov r4, r0
210c: e1a05001 mov r5, r1
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
2110: ebffff89 bl 1f3c <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
2114: e3500000 cmp r0, #0
2118: e58d000c str r0, [sp, #12]
211c: 0a000002 beq 212c <rtems_disk_delete+0x2c>
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2120: e59d000c ldr r0, [sp, #12]
2124: e28dd010 add sp, sp, #16
2128: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
212c: e1a00004 mov r0, r4
2130: e1a01005 mov r1, r5
2134: e3a02001 mov r2, #1
2138: ebfffefd bl 1d34 <get_disk_entry>
if (dd == NULL) {
213c: e2503000 subs r3, r0, #0
2140: 0a000061 beq 22cc <rtems_disk_delete+0x1cc>
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
2144: e3a0a001 mov sl, #1
2148: e5c3a030 strb sl, [r3, #48] ; 0x30
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
214c: e5936008 ldr r6, [r3, #8]
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
2150: e5d62030 ldrb r2, [r6, #48] ; 0x30
2154: e3520000 cmp r2, #0
2158: 0a00002c beq 2210 <rtems_disk_delete+0x110>
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
215c: e59f9178 ldr r9, [pc, #376] ; 22dc <rtems_disk_delete+0x1dc>
2160: e5993000 ldr r3, [r9]
2164: e3530000 cmp r3, #0
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
2168: e5962004 ldr r2, [r6, #4]
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
216c: 059d300c ldreq r3, [sp, #12]
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
2170: e5967000 ldr r7, [r6]
2174: e58d2008 str r2, [sp, #8]
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2178: 058d3004 streq r3, [sp, #4]
217c: 0a000043 beq 2290 <rtems_disk_delete+0x190>
2180: e59d800c ldr r8, [sp, #12]
2184: e58d8004 str r8, [sp, #4]
rtems_disk_device_table *dtab = disktab + major;
2188: e5995004 ldr r5, [r9, #4]
218c: e0855188 add r5, r5, r8, lsl #3
for (minor = 0; minor < dtab->size; ++minor) {
2190: e595e004 ldr lr, [r5, #4]
2194: e35e0000 cmp lr, #0
2198: 0a000038 beq 2280 <rtems_disk_delete+0x180>
219c: e3a04000 mov r4, #0
21a0: e58d8000 str r8, [sp]
21a4: ea000008 b 21cc <rtems_disk_delete+0xcc>
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
21a8: e11c0001 tst ip, r1
21ac: 0a000003 beq 21c0 <rtems_disk_delete+0xc0>
if (dd->uses == 0) {
21b0: e5902014 ldr r2, [r0, #20]
21b4: e3520000 cmp r2, #0
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
21b8: 15c0a030 strbne sl, [r0, #48] ; 0x30
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
21bc: 0a000025 beq 2258 <rtems_disk_delete+0x158>
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
21c0: e2844001 add r4, r4, #1
21c4: e154000e cmp r4, lr
21c8: 2a00002b bcs 227c <rtems_disk_delete+0x17c>
rtems_disk_device *dd = dtab->minor [minor];
21cc: e5953000 ldr r3, [r5]
21d0: e7930104 ldr r0, [r3, r4, lsl #2]
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
21d4: e3500000 cmp r0, #0
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
21d8: e1a0b104 lsl fp, r4, #2
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
21dc: 0afffff7 beq 21c0 <rtems_disk_delete+0xc0>
21e0: e5902008 ldr r2, [r0, #8]
21e4: e5921000 ldr r1, [r2]
21e8: e056c000 subs ip, r6, r0
21ec: 13a0c001 movne ip, #1
21f0: e1510007 cmp r1, r7
21f4: e3a01000 mov r1, #0
21f8: 1affffea bne 21a8 <rtems_disk_delete+0xa8>
21fc: e5922004 ldr r2, [r2, #4]
2200: e59d8008 ldr r8, [sp, #8]
2204: e1520008 cmp r2, r8
2208: 03a01001 moveq r1, #1
220c: eaffffe5 b 21a8 <rtems_disk_delete+0xa8>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
2210: e5932014 ldr r2, [r3, #20]
2214: e3520000 cmp r2, #0
2218: 0a000001 beq 2224 <rtems_disk_delete+0x124>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
221c: ebffff52 bl 1f6c <disk_unlock>
return RTEMS_SUCCESSFUL;
2220: eaffffbe b 2120 <rtems_disk_delete+0x20>
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2224: e59f20b0 ldr r2, [pc, #176] ; 22dc <rtems_disk_delete+0x1dc>
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2228: e593c000 ldr ip, [r3]
disktab [major].minor [minor] = NULL;
222c: e5922004 ldr r2, [r2, #4]
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2230: e5961014 ldr r1, [r6, #20]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2234: e792218c ldr r2, [r2, ip, lsl #3]
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2238: e5933004 ldr r3, [r3, #4]
disktab [major].minor [minor] = NULL;
223c: e59d800c ldr r8, [sp, #12]
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2240: e2411001 sub r1, r1, #1
2244: e5861014 str r1, [r6, #20]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2248: e7828103 str r8, [r2, r3, lsl #2]
free_disk_device(disk_to_remove);
224c: ebfffed6 bl 1dac <free_disk_device>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2250: ebffff45 bl 1f6c <disk_unlock>
2254: eaffffb1 b 2120 <rtems_disk_delete+0x20>
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
2258: e783200b str r2, [r3, fp]
free_disk_device(dd);
225c: ebfffed2 bl 1dac <free_disk_device>
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
2260: e59d1004 ldr r1, [sp, #4]
2264: e595e004 ldr lr, [r5, #4]
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2268: e2844001 add r4, r4, #1
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
226c: e2811001 add r1, r1, #1
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2270: e154000e cmp r4, lr
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
2274: e58d1004 str r1, [sp, #4]
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2278: 3affffd3 bcc 21cc <rtems_disk_delete+0xcc>
227c: e59d8000 ldr r8, [sp]
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2280: e5993000 ldr r3, [r9]
2284: e2888001 add r8, r8, #1
2288: e1580003 cmp r8, r3
228c: 3affffbd bcc 2188 <rtems_disk_delete+0x88>
}
}
}
}
physical_disk->uses -= deleted_count;
2290: e5963014 ldr r3, [r6, #20]
2294: e59d2004 ldr r2, [sp, #4]
2298: e0623003 rsb r3, r2, r3
if (physical_disk->uses == 0) {
229c: e3530000 cmp r3, #0
}
}
}
}
physical_disk->uses -= deleted_count;
22a0: e5863014 str r3, [r6, #20]
if (physical_disk->uses == 0) {
22a4: 1affffdc bne 221c <rtems_disk_delete+0x11c>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
22a8: e5961000 ldr r1, [r6]
disktab [major].minor [minor] = NULL;
22ac: e5992004 ldr r2, [r9, #4]
22b0: e7922181 ldr r2, [r2, r1, lsl #3]
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
22b4: e5961004 ldr r1, [r6, #4]
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
22b8: e1a00006 mov r0, r6
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
22bc: e7823101 str r3, [r2, r1, lsl #2]
free_disk_device(physical_disk);
22c0: ebfffeb9 bl 1dac <free_disk_device>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
22c4: ebffff28 bl 1f6c <disk_unlock>
22c8: eaffff94 b 2120 <rtems_disk_delete+0x20>
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
disk_unlock();
22cc: ebffff26 bl 1f6c <disk_unlock> <== NOT EXECUTED
22d0: e3a01004 mov r1, #4 <== NOT EXECUTED
22d4: e58d100c str r1, [sp, #12] <== NOT EXECUTED
return RTEMS_INVALID_ID;
22d8: eaffff90 b 2120 <rtems_disk_delete+0x20> <== NOT EXECUTED
00001dfc <rtems_disk_io_done>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
{
1dfc: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
1e00: e59f7088 ldr r7, [pc, #136] ; 1e90 <rtems_disk_io_done+0x94>
1e04: e5973000 ldr r3, [r7]
1e08: e3530000 cmp r3, #0
1e0c: 0a000016 beq 1e6c <rtems_disk_io_done+0x70>
1e10: e3a06000 mov r6, #0
rtems_disk_device_table *dtab = disktab + major;
1e14: e5972004 ldr r2, [r7, #4]
1e18: e0825186 add r5, r2, r6, lsl #3
for (minor = 0; minor < dtab->size; ++minor) {
1e1c: e5953004 ldr r3, [r5, #4]
1e20: e3530000 cmp r3, #0
1e24: 07922186 ldreq r2, [r2, r6, lsl #3]
1e28: 0a000009 beq 1e54 <rtems_disk_io_done+0x58>
1e2c: e7922186 ldr r2, [r2, r6, lsl #3]
1e30: e3a04000 mov r4, #0
rtems_disk_device *dd = dtab->minor [minor];
1e34: e7920104 ldr r0, [r2, r4, lsl #2]
if (dd != NULL) {
1e38: e3500000 cmp r0, #0
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
1e3c: e2844001 add r4, r4, #1
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL) {
1e40: 0a000001 beq 1e4c <rtems_disk_io_done+0x50>
free_disk_device(dd);
1e44: ebffffd8 bl 1dac <free_disk_device> <== NOT EXECUTED
1e48: e895000c ldm r5, {r2, r3} <== NOT EXECUTED
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
1e4c: e1530004 cmp r3, r4
1e50: 8afffff7 bhi 1e34 <rtems_disk_io_done+0x38>
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
1e54: e1a00002 mov r0, r2
1e58: eb0004a8 bl 3100 <free>
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
1e5c: e5973000 ldr r3, [r7]
1e60: e2866001 add r6, r6, #1
1e64: e1530006 cmp r3, r6
1e68: 8affffe9 bhi 1e14 <rtems_disk_io_done+0x18>
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
1e6c: e5970004 ldr r0, [r7, #4]
1e70: eb0004a2 bl 3100 <free>
rtems_semaphore_delete(diskdevs_mutex);
1e74: e5970008 ldr r0, [r7, #8]
1e78: eb0012fd bl 6a74 <rtems_semaphore_delete>
diskdevs_mutex = RTEMS_ID_NONE;
1e7c: e3a00000 mov r0, #0
disktab = NULL;
disktab_size = 0;
1e80: e5870000 str r0, [r7]
}
free(disktab);
rtems_semaphore_delete(diskdevs_mutex);
diskdevs_mutex = RTEMS_ID_NONE;
1e84: e5870008 str r0, [r7, #8]
disktab = NULL;
1e88: e5870004 str r0, [r7, #4]
disktab_size = 0;
return RTEMS_SUCCESSFUL;
}
1e8c: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001e94 <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
1e94: e92d4030 push {r4, r5, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
1e98: e59f4094 ldr r4, [pc, #148] ; 1f34 <rtems_disk_io_initialize+0xa0>
1e9c: e5945000 ldr r5, [r4]
1ea0: e3550000 cmp r5, #0
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
1ea4: e24dd004 sub sp, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
1ea8: 13a00000 movne r0, #0
1eac: 0a000001 beq 1eb8 <rtems_disk_io_initialize+0x24>
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
1eb0: e28dd004 add sp, sp, #4
1eb4: e8bd8030 pop {r4, r5, pc}
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
1eb8: e3a00008 mov r0, #8
1ebc: e1a01000 mov r1, r0
1ec0: eb0003f8 bl 2ea8 <calloc>
if (disktab == NULL) {
1ec4: e3500000 cmp r0, #0
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
1ec8: e5840004 str r0, [r4, #4]
if (disktab == NULL) {
1ecc: 0a00000b beq 1f00 <rtems_disk_io_initialize+0x6c>
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
sc = rtems_semaphore_create(
1ed0: e284c008 add ip, r4, #8
1ed4: e1a03005 mov r3, r5
1ed8: e59f0058 ldr r0, [pc, #88] ; 1f38 <rtems_disk_io_initialize+0xa4>
1edc: e3a01001 mov r1, #1
1ee0: e3a02010 mov r2, #16
1ee4: e58dc000 str ip, [sp]
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
1ee8: e5c4500c strb r5, [r4, #12]
sc = rtems_semaphore_create(
1eec: eb00126e bl 68ac <rtems_semaphore_create>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
1ef0: e3500000 cmp r0, #0
1ef4: 0a000003 beq 1f08 <rtems_disk_io_initialize+0x74>
free(disktab);
1ef8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
1efc: eb00047f bl 3100 <free> <== NOT EXECUTED
1f00: e3a0001a mov r0, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1f04: eaffffe9 b 1eb0 <rtems_disk_io_initialize+0x1c> <== NOT EXECUTED
}
sc = rtems_bdbuf_init();
1f08: eb0023bd bl ae04 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
1f0c: e3500000 cmp r0, #0
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
1f10: 03a03008 moveq r3, #8
1f14: 05843000 streq r3, [r4]
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
1f18: 0affffe4 beq 1eb0 <rtems_disk_io_initialize+0x1c>
rtems_semaphore_delete(diskdevs_mutex);
1f1c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1f20: eb0012d3 bl 6a74 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
1f24: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
1f28: eb000474 bl 3100 <free> <== NOT EXECUTED
1f2c: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
1f30: eaffffde b 1eb0 <rtems_disk_io_initialize+0x1c> <== NOT EXECUTED
00001fa0 <rtems_disk_next>:
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
1fa0: e3700001 cmn r0, #1
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
1fa4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
1fa8: 0a00002f beq 206c <rtems_disk_next+0xcc>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
1fac: e2914001 adds r4, r1, #1
1fb0: 31a05000 movcc r5, r0
1fb4: 2a00001c bcs 202c <rtems_disk_next+0x8c>
} else {
++minor;
}
}
sc = disk_lock();
1fb8: ebffffdf bl 1f3c <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
1fbc: e2506000 subs r6, r0, #0
1fc0: 1a00001b bne 2034 <rtems_disk_next+0x94>
return NULL;
}
if (major >= disktab_size) {
1fc4: e59f30c0 ldr r3, [pc, #192] ; 208c <rtems_disk_next+0xec>
1fc8: e5930000 ldr r0, [r3]
1fcc: e1550000 cmp r5, r0
1fd0: 2a00002a bcs 2080 <rtems_disk_next+0xe0>
disk_unlock();
return NULL;
}
dtab = disktab + major;
1fd4: e5931004 ldr r1, [r3, #4]
1fd8: e7913185 ldr r3, [r1, r5, lsl #3]
1fdc: e0816185 add r6, r1, r5, lsl #3
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1fe0: e3530000 cmp r3, #0
1fe4: 0a000009 beq 2010 <rtems_disk_next+0x70>
1fe8: e5962004 ldr r2, [r6, #4]
1fec: e1540002 cmp r4, r2
1ff0: 2a000006 bcs 2010 <rtems_disk_next+0x70>
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
1ff4: e7932104 ldr r2, [r3, r4, lsl #2]
1ff8: e3520000 cmp r2, #0
1ffc: e1a07104 lsl r7, r4, #2
2000: 1a000010 bne 2048 <rtems_disk_next+0xa8>
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2004: e3530000 cmp r3, #0
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
++minor;
2008: e2844001 add r4, r4, #1
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
200c: 1afffff5 bne 1fe8 <rtems_disk_next+0x48>
minor = 0;
++major;
2010: e2855001 add r5, r5, #1
if (major >= disktab_size) {
2014: e1500005 cmp r0, r5
2018: 9a000007 bls 203c <rtems_disk_next+0x9c>
disk_unlock();
return NULL;
}
dtab = disktab + major;
201c: e0816185 add r6, r1, r5, lsl #3
2020: e7913185 ldr r3, [r1, r5, lsl #3]
2024: e3a04000 mov r4, #0
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2028: eaffffec b 1fe0 <rtems_disk_next+0x40>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
202c: e2905001 adds r5, r0, #1 <== NOT EXECUTED
2030: 3a00000b bcc 2064 <rtems_disk_next+0xc4> <== NOT EXECUTED
++minor;
} else {
++dtab->minor [minor]->uses;
disk_unlock();
return dtab->minor [minor];
2034: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
}
2038: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
if (major >= disktab_size) {
disk_unlock();
203c: ebffffca bl 1f6c <disk_unlock>
2040: e3a00000 mov r0, #0
return NULL;
2044: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
++minor;
} else {
++dtab->minor [minor]->uses;
2048: e5923014 ldr r3, [r2, #20]
204c: e2833001 add r3, r3, #1
2050: e5823014 str r3, [r2, #20]
disk_unlock();
2054: ebffffc4 bl 1f6c <disk_unlock>
return dtab->minor [minor];
2058: e5963000 ldr r3, [r6]
205c: e7930007 ldr r0, [r3, r7]
2060: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
2064: e3a04000 mov r4, #0 <== NOT EXECUTED
2068: eaffffd2 b 1fb8 <rtems_disk_next+0x18> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
206c: e3710001 cmn r1, #1
2070: 03a04000 moveq r4, #0
2074: 01a05004 moveq r5, r4
2078: 1affffcb bne 1fac <rtems_disk_next+0xc>
207c: eaffffcd b 1fb8 <rtems_disk_next+0x18>
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
disk_unlock();
2080: ebffffb9 bl 1f6c <disk_unlock> <== NOT EXECUTED
2084: e1a00006 mov r0, r6 <== NOT EXECUTED
return NULL;
2088: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00002090 <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
2090: e92d4070 push {r4, r5, r6, lr}
2094: e1a05000 mov r5, r0
2098: e24dd004 sub sp, sp, #4
209c: e1a06001 mov r6, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
20a0: e10f4000 mrs r4, CPSR
20a4: e3843080 orr r3, r4, #128 ; 0x80
20a8: e129f003 msr CPSR_fc, r3
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
20ac: e59f3048 ldr r3, [pc, #72] ; 20fc <rtems_disk_obtain+0x6c>
20b0: e5d3200c ldrb r2, [r3, #12]
20b4: e21220ff ands r2, r2, #255 ; 0xff
20b8: 1a000003 bne 20cc <rtems_disk_obtain+0x3c>
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
20bc: ebffff1c bl 1d34 <get_disk_entry>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
20c0: e129f004 msr CPSR_fc, r4
disk_unlock();
}
}
return dd;
}
20c4: e28dd004 add sp, sp, #4
20c8: e8bd8070 pop {r4, r5, r6, pc}
20cc: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
sc = disk_lock();
20d0: ebffff99 bl 1f3c <disk_lock> <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
20d4: e2502000 subs r2, r0, #0 <== NOT EXECUTED
20d8: 13a00000 movne r0, #0 <== NOT EXECUTED
20dc: 1afffff8 bne 20c4 <rtems_disk_obtain+0x34> <== NOT EXECUTED
dd = get_disk_entry(dev, false);
20e0: e1a01006 mov r1, r6 <== NOT EXECUTED
20e4: e1a00005 mov r0, r5 <== NOT EXECUTED
20e8: ebffff11 bl 1d34 <get_disk_entry> <== NOT EXECUTED
disk_unlock();
20ec: e58d0000 str r0, [sp] <== NOT EXECUTED
20f0: ebffff9d bl 1f6c <disk_unlock> <== NOT EXECUTED
20f4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
20f8: eafffff1 b 20c4 <rtems_disk_obtain+0x34> <== NOT EXECUTED
000201d4 <rtems_dosfs_initialize>:
int rtems_dosfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data)
{
int rc;
rc = msdos_initialize_support(mt_entry,
201d4: e59f1008 ldr r1, [pc, #8] ; 201e4 <rtems_dosfs_initialize+0x10><== NOT EXECUTED
201d8: e59f2008 ldr r2, [pc, #8] ; 201e8 <rtems_dosfs_initialize+0x14><== NOT EXECUTED
201dc: e59f3008 ldr r3, [pc, #8] ; 201ec <rtems_dosfs_initialize+0x18><== NOT EXECUTED
201e0: ea000002 b 201f0 <msdos_initialize_support> <== NOT EXECUTED
00006d40 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
6d40: e92d000e push {r1, r2, r3} <== NOT EXECUTED
6d44: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
6d48: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
6d4c: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6d50: e1a02003 mov r2, r3 <== NOT EXECUTED
6d54: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
6d58: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6d5c: ebffff81 bl 6b68 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
6d60: e28dd004 add sp, sp, #4 <== NOT EXECUTED
6d64: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
6d68: e28dd00c add sp, sp, #12 <== NOT EXECUTED
6d6c: e12fff1e bx lr <== NOT EXECUTED
00002020 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2020: e92d40f0 push {r4, r5, r6, r7, lr}
int i = 0;
2024: e3a0c000 mov ip, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2028: e24dd008 sub sp, sp, #8
/*
* Verify Input parameters.
*/
if ( !pathname )
202c: e2505000 subs r5, r0, #0
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
int i = 0;
2030: e58dc004 str ip, [sp, #4]
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2034: e1a06001 mov r6, r1
2038: e1a04002 mov r4, r2
203c: e1a07003 mov r7, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
2040: 0a000013 beq 2094 <rtems_filesystem_evaluate_path+0x74>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
2044: e3530000 cmp r3, #0
2048: 0a00000c beq 2080 <rtems_filesystem_evaluate_path+0x60>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
204c: e1a02003 mov r2, r3
2050: e28d1004 add r1, sp, #4
2054: eb0003d5 bl 2fb0 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
2058: e59d0004 ldr r0, [sp, #4]
205c: e59dc01c ldr ip, [sp, #28]
2060: e0601006 rsb r1, r0, r6
2064: e1a02004 mov r2, r4
2068: e0850000 add r0, r5, r0
206c: e1a03007 mov r3, r7
2070: e58dc000 str ip, [sp]
2074: ebffffad bl 1f30 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
2078: e28dd008 add sp, sp, #8
207c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
2080: eb0035a3 bl f714 <__errno> <== NOT EXECUTED
2084: e3a03005 mov r3, #5 <== NOT EXECUTED
2088: e5803000 str r3, [r0] <== NOT EXECUTED
208c: e3e00000 mvn r0, #0 <== NOT EXECUTED
2090: eafffff8 b 2078 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
2094: eb00359e bl f714 <__errno> <== NOT EXECUTED
2098: e3a0300e mov r3, #14 <== NOT EXECUTED
209c: e5803000 str r3, [r0] <== NOT EXECUTED
20a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
20a4: eafffff3 b 2078 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
00001f30 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
1f30: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1f34: e92d4030 push {r4, r5, lr}
1f38: e1a05002 mov r5, r2
1f3c: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
1f40: 0a00002c beq 1ff8 <rtems_filesystem_evaluate_relative_path+0xc8>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
1f44: e3530000 cmp r3, #0
1f48: 0a00002f beq 200c <rtems_filesystem_evaluate_relative_path+0xdc>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
1f4c: e593c00c ldr ip, [r3, #12]
1f50: e59cc000 ldr ip, [ip]
1f54: e35c0000 cmp ip, #0
1f58: 0a000021 beq 1fe4 <rtems_filesystem_evaluate_relative_path+0xb4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1f5c: e1a0e00f mov lr, pc
1f60: e12fff1c bx ip
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
1f64: e59d200c ldr r2, [sp, #12]
1f68: e2703001 rsbs r3, r0, #1
1f6c: 33a03000 movcc r3, #0
1f70: e3520000 cmp r2, #0
1f74: 03a03000 moveq r3, #0
1f78: e3530000 cmp r3, #0
1f7c: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1f80: e594200c ldr r2, [r4, #12]
1f84: e5923010 ldr r3, [r2, #16]
1f88: e3530000 cmp r3, #0
1f8c: 0a00000f beq 1fd0 <rtems_filesystem_evaluate_relative_path+0xa0>
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1f90: e1a00004 mov r0, r4
1f94: e1a0e00f mov lr, pc
1f98: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1f9c: e2400003 sub r0, r0, #3
1fa0: e3500001 cmp r0, #1
1fa4: 83a00000 movhi r0, #0
1fa8: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
1fac: e594200c ldr r2, [r4, #12]
1fb0: e5923034 ldr r3, [r2, #52] ; 0x34
1fb4: e3530000 cmp r3, #0
1fb8: 0a000004 beq 1fd0 <rtems_filesystem_evaluate_relative_path+0xa0>
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
1fbc: e1a00004 mov r0, r4
1fc0: e1a01005 mov r1, r5
1fc4: e1a0e00f mov lr, pc
1fc8: e12fff13 bx r3
}
}
return result;
}
1fcc: e8bd8030 pop {r4, r5, pc}
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
1fd0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1fd4: e3530000 cmp r3, #0 <== NOT EXECUTED
1fd8: 11a00004 movne r0, r4 <== NOT EXECUTED
1fdc: 11a0e00f movne lr, pc <== NOT EXECUTED
1fe0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1fe4: eb0035ca bl f714 <__errno> <== NOT EXECUTED
1fe8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1fec: e5803000 str r3, [r0] <== NOT EXECUTED
1ff0: e3e00000 mvn r0, #0 <== NOT EXECUTED
1ff4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
1ff8: eb0035c5 bl f714 <__errno> <== NOT EXECUTED
1ffc: e3a0300e mov r3, #14 <== NOT EXECUTED
2000: e5803000 str r3, [r0] <== NOT EXECUTED
2004: e3e00000 mvn r0, #0 <== NOT EXECUTED
2008: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
200c: eb0035c0 bl f714 <__errno> <== NOT EXECUTED
2010: e3a03005 mov r3, #5 <== NOT EXECUTED
2014: e5803000 str r3, [r0] <== NOT EXECUTED
2018: e3e00000 mvn r0, #0 <== NOT EXECUTED
201c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00001d28 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
1d28: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1d2c: e59f2108 ldr r2, [pc, #264] ; 1e3c <rtems_filesystem_initialize+0x114>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1d30: e59f6108 ldr r6, [pc, #264] ; 1e40 <rtems_filesystem_initialize+0x118>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1d34: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1d38: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1d3c: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1d40: e3a02012 mov r2, #18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
1d44: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1d48: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1d4c: 0a00002e beq 1e0c <rtems_filesystem_initialize+0xe4>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
1d50: e59f30ec ldr r3, [pc, #236] ; 1e44 <rtems_filesystem_initialize+0x11c>
1d54: e5932000 ldr r2, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
1d58: e3a05000 mov r5, #0
1d5c: e5923004 ldr r3, [r2, #4]
1d60: e2820008 add r0, r2, #8
1d64: e8900003 ldm r0, {r0, r1}
1d68: e5922000 ldr r2, [r2]
1d6c: e58d5000 str r5, [sp]
1d70: eb000254 bl 26c8 <mount>
if ( status == -1 )
1d74: e3700001 cmn r0, #1
1d78: 0a00002b beq 1e2c <rtems_filesystem_initialize+0x104>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
1d7c: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1d80: e28d4004 add r4, sp, #4
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
1d84: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1d88: e3a01001 mov r1, #1
1d8c: e1a03004 mov r3, r4
1d90: e1a02005 mov r2, r5
1d94: e59f00ac ldr r0, [pc, #172] ; 1e48 <rtems_filesystem_initialize+0x120>
rtems_filesystem_root = loc;
1d98: e1a07004 mov r7, r4
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1d9c: e58d5000 str r5, [sp]
1da0: eb00009e bl 2020 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
1da4: e596c000 ldr ip, [r6]
1da8: e8b7000f ldm r7!, {r0, r1, r2, r3}
1dac: e28cc018 add ip, ip, #24
1db0: e8ac000f stmia ip!, {r0, r1, r2, r3}
1db4: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1db8: e1a02005 mov r2, r5
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
1dbc: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1dc0: e3a01001 mov r1, #1
1dc4: e1a03004 mov r3, r4
1dc8: e59f0078 ldr r0, [pc, #120] ; 1e48 <rtems_filesystem_initialize+0x120>
1dcc: e58d5000 str r5, [sp]
1dd0: eb000092 bl 2020 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
1dd4: e596c000 ldr ip, [r6]
1dd8: e8b4000f ldm r4!, {r0, r1, r2, r3}
1ddc: e28cc004 add ip, ip, #4
1de0: e8ac000f stmia ip!, {r0, r1, r2, r3}
1de4: e5973000 ldr r3, [r7]
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
1de8: e3a01f7f mov r1, #508 ; 0x1fc
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
1dec: e58c3000 str r3, [ip]
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
1df0: e2811003 add r1, r1, #3
1df4: e59f0050 ldr r0, [pc, #80] ; 1e4c <rtems_filesystem_initialize+0x124>
1df8: eb0001c2 bl 2508 <mkdir>
if ( status != 0 )
1dfc: e3500000 cmp r0, #0
1e00: 1a000005 bne 1e1c <rtems_filesystem_initialize+0xf4>
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
1e04: e28dd018 add sp, sp, #24
1e08: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
1e0c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
1e10: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
1e14: e2800001 add r0, r0, #1 <== NOT EXECUTED
1e18: eb000ff1 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
1e1c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
1e20: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
1e24: e2800003 add r0, r0, #3 <== NOT EXECUTED
1e28: eb000fed bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
1e2c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
1e30: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
1e34: e2800002 add r0, r0, #2 <== NOT EXECUTED
1e38: eb000fe9 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000b2dc <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
b2dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
b2e0: e59f60ac ldr r6, [pc, #172] ; b394 <rtems_filesystem_iterate+0xb8>
b2e4: e5963000 ldr r3, [r6]
b2e8: e3530000 cmp r3, #0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
b2ec: e1a04000 mov r4, r0
b2f0: e1a05001 mov r5, r1
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
b2f4: 1a000003 bne b308 <rtems_filesystem_iterate+0x2c>
b2f8: ea00000c b b330 <rtems_filesystem_iterate+0x54> <== NOT EXECUTED
b2fc: e3500000 cmp r0, #0
b300: e2866008 add r6, r6, #8
b304: 1a000020 bne b38c <rtems_filesystem_iterate+0xb0>
stop = (*routine)( table_entry, routine_arg );
b308: e1a00006 mov r0, r6
b30c: e1a01005 mov r1, r5
b310: e1a0e00f mov lr, pc
b314: e12fff14 bx r4
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
b318: e5963008 ldr r3, [r6, #8]
b31c: e3530000 cmp r3, #0
stop = (*routine)( table_entry, routine_arg );
b320: e1a0a000 mov sl, r0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
b324: 1afffff4 bne b2fc <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
b328: e3500000 cmp r0, #0
b32c: 1a000016 bne b38c <rtems_filesystem_iterate+0xb0>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
b330: e59f7060 ldr r7, [pc, #96] ; b398 <rtems_filesystem_iterate+0xbc>
b334: e3a01000 mov r1, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
b338: e59f605c ldr r6, [pc, #92] ; b39c <rtems_filesystem_iterate+0xc0>
b33c: e5970000 ldr r0, [r7]
b340: e1a02001 mov r2, r1
b344: ebffe918 bl 57ac <rtems_semaphore_obtain>
b348: e4968004 ldr r8, [r6], #4
rtems_libio_lock();
for (
b34c: e1580006 cmp r8, r6
b350: 03a0a000 moveq sl, #0
b354: 1a000002 bne b364 <rtems_filesystem_iterate+0x88>
b358: ea000009 b b384 <rtems_filesystem_iterate+0xa8>
b35c: e3500000 cmp r0, #0
b360: 1a000007 bne b384 <rtems_filesystem_iterate+0xa8>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
b364: e2880008 add r0, r8, #8
b368: e1a01005 mov r1, r5
b36c: e1a0e00f mov lr, pc
b370: e12fff14 bx r4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
b374: e5988000 ldr r8, [r8]
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
b378: e1580006 cmp r8, r6
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
b37c: e1a0a000 mov sl, r0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
b380: 1afffff5 bne b35c <rtems_filesystem_iterate+0x80>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
b384: e5970000 ldr r0, [r7]
b388: ebffe94f bl 58cc <rtems_semaphore_release>
}
rtems_libio_unlock();
}
return stop;
}
b38c: e1a0000a mov r0, sl
b390: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00002650 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
2650: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2654: e59f7064 ldr r7, [pc, #100] ; 26c0 <rtems_filesystem_mount_iterate+0x70>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
2658: e59f4064 ldr r4, [pc, #100] ; 26c4 <rtems_filesystem_mount_iterate+0x74>
265c: e1a06001 mov r6, r1
2660: e3a01000 mov r1, #0
2664: e1a05000 mov r5, r0
2668: e1a02001 mov r2, r1
266c: e5970000 ldr r0, [r7]
2670: eb000c4d bl 57ac <rtems_semaphore_obtain>
2674: e4948004 ldr r8, [r4], #4
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2678: e1580004 cmp r8, r4
267c: 03a0a000 moveq sl, #0
2680: 1a000002 bne 2690 <rtems_filesystem_mount_iterate+0x40>
2684: ea000009 b 26b0 <rtems_filesystem_mount_iterate+0x60> <== NOT EXECUTED
2688: e3500000 cmp r0, #0
268c: 1a000007 bne 26b0 <rtems_filesystem_mount_iterate+0x60>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
2690: e1a00008 mov r0, r8
2694: e1a01006 mov r1, r6
2698: e1a0e00f mov lr, pc
269c: e12fff15 bx r5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
26a0: e5988000 ldr r8, [r8]
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
26a4: e1580004 cmp r8, r4
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
26a8: e1a0a000 mov sl, r0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
26ac: 1afffff5 bne 2688 <rtems_filesystem_mount_iterate+0x38>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
26b0: e5970000 ldr r0, [r7]
26b4: eb000c84 bl 58cc <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
26b8: e1a0000a mov r0, sl
26bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00001e98 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
1e98: e92d4070 push {r4, r5, r6, lr}
1e9c: e1a04000 mov r4, r0
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
1ea0: e5d00000 ldrb r0, [r0]
1ea4: e3510000 cmp r1, #0
1ea8: 13500000 cmpne r0, #0
1eac: 03a05000 moveq r5, #0
1eb0: 13a05001 movne r5, #1
1eb4: e1a06001 mov r6, r1
1eb8: 13a05000 movne r5, #0
1ebc: 1a000005 bne 1ed8 <rtems_filesystem_prefix_separators+0x40>
1ec0: ea000007 b 1ee4 <rtems_filesystem_prefix_separators+0x4c> <== NOT EXECUTED
{
pathname++;
pathnamelen--;
stripped++;
1ec4: e2855001 add r5, r5, #1
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
1ec8: e7d40005 ldrb r0, [r4, r5]
1ecc: e1560005 cmp r6, r5
1ed0: 13500000 cmpne r0, #0
1ed4: 0a000002 beq 1ee4 <rtems_filesystem_prefix_separators+0x4c>
1ed8: eb00044f bl 301c <rtems_filesystem_is_separator>
1edc: e3500000 cmp r0, #0
1ee0: 1afffff7 bne 1ec4 <rtems_filesystem_prefix_separators+0x2c>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
1ee4: e1a00005 mov r0, r5
1ee8: e8bd8070 pop {r4, r5, r6, pc}
0000b3d4 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
b3d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
b3d8: e1a08001 mov r8, r1
b3dc: e1a05000 mov r5, r0
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
b3e0: eb0014d0 bl 10728 <strlen>
filesystem_node *fsn = malloc( fsn_size );
b3e4: e2800011 add r0, r0, #17
b3e8: ebffdc07 bl 240c <malloc>
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
b3ec: e2504000 subs r4, r0, #0
b3f0: 0a00001e beq b470 <rtems_filesystem_register+0x9c>
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
b3f4: e2847010 add r7, r4, #16
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
b3f8: e1a01005 mov r1, r5
b3fc: e1a00007 mov r0, r7
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
b400: e59f607c ldr r6, [pc, #124] ; b484 <rtems_filesystem_register+0xb0>
b404: eb001477 bl 105e8 <strcpy>
b408: e3a01000 mov r1, #0
b40c: e1a02001 mov r2, r1
fsn->entry.type = type_storage;
b410: e5847008 str r7, [r4, #8]
fsn->entry.mount_h = mount_h;
b414: e584800c str r8, [r4, #12]
b418: e5960000 ldr r0, [r6]
b41c: ebffe8e2 bl 57ac <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
b420: e1a00005 mov r0, r5
b424: ebffffdd bl b3a0 <rtems_filesystem_get_mount_handler>
b428: e2505000 subs r5, r0, #0
b42c: 1a000006 bne b44c <rtems_filesystem_register+0x78>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
b430: e1a01004 mov r1, r4
b434: e59f004c ldr r0, [pc, #76] ; b488 <rtems_filesystem_register+0xb4>
b438: ebffeb32 bl 6108 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
b43c: e5960000 ldr r0, [r6]
b440: ebffe921 bl 58cc <rtems_semaphore_release>
b444: e1a00005 mov r0, r5
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
b448: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
b44c: e5960000 ldr r0, [r6] <== NOT EXECUTED
b450: ebffe91d bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
b454: e1a00004 mov r0, r4 <== NOT EXECUTED
b458: ebffdb12 bl 20a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
b45c: eb0010ac bl f714 <__errno> <== NOT EXECUTED
b460: e3a03016 mov r3, #22 <== NOT EXECUTED
b464: e5803000 str r3, [r0] <== NOT EXECUTED
b468: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
b46c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
b470: eb0010a7 bl f714 <__errno> <== NOT EXECUTED
b474: e3a0300c mov r3, #12 <== NOT EXECUTED
b478: e5803000 str r3, [r0] <== NOT EXECUTED
b47c: e3e00000 mvn r0, #0 <== NOT EXECUTED
b480: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000b230 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
b230: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
b234: e2505000 subs r5, r0, #0 <== NOT EXECUTED
b238: 0a000020 beq b2c0 <rtems_filesystem_unregister+0x90> <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
b23c: e59f6090 ldr r6, [pc, #144] ; b2d4 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
b240: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
b244: e59f408c ldr r4, [pc, #140] ; b2d8 <rtems_filesystem_unregister+0xa8><== NOT EXECUTED
b248: e5960000 ldr r0, [r6] <== NOT EXECUTED
b24c: e1a02001 mov r2, r1 <== NOT EXECUTED
b250: ebffe955 bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
b254: e4947004 ldr r7, [r4], #4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
b258: e1570004 cmp r7, r4 <== NOT EXECUTED
b25c: 1a000003 bne b270 <rtems_filesystem_unregister+0x40> <== NOT EXECUTED
b260: ea00000f b b2a4 <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
b264: e5977000 ldr r7, [r7] <== NOT EXECUTED
b268: e1570004 cmp r7, r4 <== NOT EXECUTED
b26c: 0a00000c beq b2a4 <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
b270: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED
b274: e1a01005 mov r1, r5 <== NOT EXECUTED
b278: eb00144e bl 103b8 <strcmp> <== NOT EXECUTED
b27c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
b280: 1afffff7 bne b264 <rtems_filesystem_unregister+0x34> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
b284: e1a00007 mov r0, r7 <== NOT EXECUTED
b288: ebffeba9 bl 6134 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( node );
free( fsn );
b28c: e1a00007 mov r0, r7 <== NOT EXECUTED
b290: ebffdb84 bl 20a8 <free> <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
b294: e5960000 ldr r0, [r6] <== NOT EXECUTED
b298: ebffe98b bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
b29c: e1a00008 mov r0, r8 <== NOT EXECUTED
rtems_libio_unlock();
return 0;
b2a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
b2a4: e5960000 ldr r0, [r6] <== NOT EXECUTED
b2a8: ebffe987 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
b2ac: eb001118 bl f714 <__errno> <== NOT EXECUTED
b2b0: e3a03002 mov r3, #2 <== NOT EXECUTED
b2b4: e5803000 str r3, [r0] <== NOT EXECUTED
b2b8: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
b2bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
b2c0: eb001113 bl f714 <__errno> <== NOT EXECUTED
b2c4: e3a03016 mov r3, #22 <== NOT EXECUTED
b2c8: e5803000 str r3, [r0] <== NOT EXECUTED
b2cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
b2d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00006de8 <rtems_fsmount>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
6de8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6dec: e2517000 subs r7, r1, #0 <== NOT EXECUTED
6df0: 01a06007 moveq r6, r7 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
6df4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
6df8: e1a0a002 mov sl, r2 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6dfc: 01a05006 moveq r5, r6 <== NOT EXECUTED
6e00: 0a00000e beq 6e40 <rtems_fsmount+0x58> <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
6e04: e59f8138 ldr r8, [pc, #312] ; 6f44 <rtems_fsmount+0x15c> <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6e08: e2804014 add r4, r0, #20 <== NOT EXECUTED
6e0c: e3a06000 mov r6, #0 <== NOT EXECUTED
tmp_rc = 0;
/*
* create mount point
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
6e10: e3a01f7f mov r1, #508 ; 0x1fc <== NOT EXECUTED
6e14: e2811003 add r1, r1, #3 <== NOT EXECUTED
6e18: e5140010 ldr r0, [r4, #-16] <== NOT EXECUTED
6e1c: eb00099b bl 9490 <rtems_mkdir> <== NOT EXECUTED
if (tmp_rc != 0) {
6e20: e2505000 subs r5, r0, #0 <== NOT EXECUTED
6e24: 0a00000a beq 6e54 <rtems_fsmount+0x6c> <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
6e28: e15430b4 ldrh r3, [r4, #-4] <== NOT EXECUTED
6e2c: e3130002 tst r3, #2 <== NOT EXECUTED
6e30: 1a000019 bne 6e9c <rtems_fsmount+0xb4> <== NOT EXECUTED
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
6e34: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
6e38: e3130002 tst r3, #2 <== NOT EXECUTED
6e3c: 0a000010 beq 6e84 <rtems_fsmount+0x9c> <== NOT EXECUTED
if (!terminate) {
fstab_ptr++;
fstab_idx++;
}
}
if (fail_idx != NULL) {
6e40: e35a0000 cmp sl, #0 <== NOT EXECUTED
*fail_idx = fstab_idx;
6e44: 158a6000 strne r6, [sl] <== NOT EXECUTED
}
return rc;
}
6e48: e1a00005 mov r0, r5 <== NOT EXECUTED
6e4c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
6e50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
/*
* mount device to given mount point
*/
if (tmp_rc == 0) {
tmp_rc = mount(fstab_ptr->source,
6e54: e2440014 sub r0, r4, #20 <== NOT EXECUTED
6e58: e890000f ldm r0, {r0, r1, r2, r3} <== NOT EXECUTED
6e5c: e58d5000 str r5, [sp] <== NOT EXECUTED
6e60: eb000677 bl 8844 <mount> <== NOT EXECUTED
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
6e64: e2505000 subs r5, r0, #0 <== NOT EXECUTED
6e68: 0a000017 beq 6ecc <rtems_fsmount+0xe4> <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
6e6c: e15430b4 ldrh r3, [r4, #-4] <== NOT EXECUTED
6e70: e3130004 tst r3, #4 <== NOT EXECUTED
6e74: 1a00001c bne 6eec <rtems_fsmount+0x104> <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
6e78: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
6e7c: e3130004 tst r3, #4 <== NOT EXECUTED
6e80: 1affffee bne 6e40 <rtems_fsmount+0x58> <== NOT EXECUTED
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
fstab_idx++;
6e84: e2866001 add r6, r6, #1 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6e88: e1570006 cmp r7, r6 <== NOT EXECUTED
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
fstab_idx++;
6e8c: e2844014 add r4, r4, #20 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6e90: 8affffde bhi 6e10 <rtems_fsmount+0x28> <== NOT EXECUTED
6e94: e3a05000 mov r5, #0 <== NOT EXECUTED
6e98: eaffffe8 b 6e40 <rtems_fsmount+0x58> <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
6e9c: e5983000 ldr r3, [r8] <== NOT EXECUTED
6ea0: e5149010 ldr r9, [r4, #-16] <== NOT EXECUTED
6ea4: e593b008 ldr fp, [r3, #8] <== NOT EXECUTED
6ea8: eb00f5e4 bl 44640 <__errno> <== NOT EXECUTED
6eac: e5900000 ldr r0, [r0] <== NOT EXECUTED
6eb0: eb010f64 bl 4ac48 <strerror> <== NOT EXECUTED
6eb4: e1a02009 mov r2, r9 <== NOT EXECUTED
6eb8: e1a03000 mov r3, r0 <== NOT EXECUTED
6ebc: e59f1084 ldr r1, [pc, #132] ; 6f48 <rtems_fsmount+0x160> <== NOT EXECUTED
6ec0: e1a0000b mov r0, fp <== NOT EXECUTED
6ec4: eb00f854 bl 4501c <fprintf> <== NOT EXECUTED
6ec8: eaffffd9 b 6e34 <rtems_fsmount+0x4c> <== NOT EXECUTED
terminate = true;
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
6ecc: e15430b4 ldrh r3, [r4, #-4] <== NOT EXECUTED
6ed0: e3130001 tst r3, #1 <== NOT EXECUTED
6ed4: 1a000013 bne 6f28 <rtems_fsmount+0x140> <== NOT EXECUTED
fprintf(stdout,"fsmount: mounting of \"%s\" to"
" \"%s\" succeeded\n",
fstab_ptr->source,
fstab_ptr->target);
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
6ed8: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
6edc: e3130001 tst r3, #1 <== NOT EXECUTED
6ee0: 0affffe7 beq 6e84 <rtems_fsmount+0x9c> <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6ee4: e3a05000 mov r5, #0 <== NOT EXECUTED
6ee8: eaffffd4 b 6e40 <rtems_fsmount+0x58> <== NOT EXECUTED
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
6eec: e5983000 ldr r3, [r8] <== NOT EXECUTED
6ef0: e5142014 ldr r2, [r4, #-20] <== NOT EXECUTED
6ef4: e593b008 ldr fp, [r3, #8] <== NOT EXECUTED
6ef8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
6efc: e5149010 ldr r9, [r4, #-16] <== NOT EXECUTED
6f00: eb00f5ce bl 44640 <__errno> <== NOT EXECUTED
6f04: e5900000 ldr r0, [r0] <== NOT EXECUTED
6f08: eb010f4e bl 4ac48 <strerror> <== NOT EXECUTED
6f0c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
6f10: e58d0000 str r0, [sp] <== NOT EXECUTED
6f14: e1a03009 mov r3, r9 <== NOT EXECUTED
6f18: e1a0000b mov r0, fp <== NOT EXECUTED
6f1c: e59f1028 ldr r1, [pc, #40] ; 6f4c <rtems_fsmount+0x164> <== NOT EXECUTED
6f20: eb00f83d bl 4501c <fprintf> <== NOT EXECUTED
6f24: eaffffd3 b 6e78 <rtems_fsmount+0x90> <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
6f28: e5983000 ldr r3, [r8] <== NOT EXECUTED
6f2c: e59f101c ldr r1, [pc, #28] ; 6f50 <rtems_fsmount+0x168> <== NOT EXECUTED
6f30: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
6f34: e2442014 sub r2, r4, #20 <== NOT EXECUTED
6f38: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
6f3c: eb00f836 bl 4501c <fprintf> <== NOT EXECUTED
6f40: eaffffe4 b 6ed8 <rtems_fsmount+0xf0> <== NOT EXECUTED
00001bdc <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
1bdc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
1be0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
1be4: e1a06001 mov r6, r1 <== NOT EXECUTED
1be8: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
1bec: eb003acd bl 10728 <strlen> <== NOT EXECUTED
1bf0: e28d4004 add r4, sp, #4 <== NOT EXECUTED
1bf4: e1a01000 mov r1, r0 <== NOT EXECUTED
1bf8: e3a02000 mov r2, #0 <== NOT EXECUTED
1bfc: e1a03004 mov r3, r4 <== NOT EXECUTED
1c00: e3a0c001 mov ip, #1 <== NOT EXECUTED
1c04: e1a00005 mov r0, r5 <== NOT EXECUTED
1c08: e58dc000 str ip, [sp] <== NOT EXECUTED
1c0c: eb000103 bl 2020 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
1c10: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
1c14: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
1c18: e3530000 cmp r3, #0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
1c1c: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1c20: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1c24: 0a000013 beq 1c78 <rtems_io_lookup_name+0x9c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
1c28: e1a00004 mov r0, r4 <== NOT EXECUTED
1c2c: e1a0e00f mov lr, pc <== NOT EXECUTED
1c30: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
1c34: e3570000 cmp r7, #0 <== NOT EXECUTED
1c38: 03500002 cmpeq r0, #2 <== NOT EXECUTED
1c3c: 03a07000 moveq r7, #0 <== NOT EXECUTED
1c40: 13a07001 movne r7, #1 <== NOT EXECUTED
1c44: 0a000015 beq 1ca0 <rtems_io_lookup_name+0xc4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1c48: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
1c4c: e3530000 cmp r3, #0 <== NOT EXECUTED
1c50: 0a000025 beq 1cec <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1c54: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
1c58: e3530000 cmp r3, #0 <== NOT EXECUTED
1c5c: 0a000022 beq 1cec <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1c60: e1a00004 mov r0, r4 <== NOT EXECUTED
1c64: e1a0e00f mov lr, pc <== NOT EXECUTED
1c68: e12fff13 bx r3 <== NOT EXECUTED
1c6c: e3a0000d mov r0, #13 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
1c70: e28dd018 add sp, sp, #24 <== NOT EXECUTED
1c74: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
1c78: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1c7c: e3530000 cmp r3, #0 <== NOT EXECUTED
1c80: 11a00004 movne r0, r4 <== NOT EXECUTED
1c84: 11a0e00f movne lr, pc <== NOT EXECUTED
1c88: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1c8c: eb0036a0 bl f714 <__errno> <== NOT EXECUTED
1c90: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1c94: e5803000 str r3, [r0] <== NOT EXECUTED
1c98: e3e00000 mvn r0, #0 <== NOT EXECUTED
1c9c: eafffff3 b 1c70 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
1ca0: e5865000 str r5, [r6] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
1ca4: e1a00005 mov r0, r5 <== NOT EXECUTED
1ca8: eb003a9e bl 10728 <strlen> <== NOT EXECUTED
1cac: e5860004 str r0, [r6, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1cb0: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED
1cb4: e5863008 str r3, [r6, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
1cb8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
1cbc: e5982054 ldr r2, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1cc0: e3530000 cmp r3, #0 <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
1cc4: e586200c str r2, [r6, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1cc8: 0a000009 beq 1cf4 <rtems_io_lookup_name+0x118> <== NOT EXECUTED
1ccc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
1cd0: e3530000 cmp r3, #0 <== NOT EXECUTED
1cd4: 0a000006 beq 1cf4 <rtems_io_lookup_name+0x118> <== NOT EXECUTED
1cd8: e1a00004 mov r0, r4 <== NOT EXECUTED
1cdc: e1a0e00f mov lr, pc <== NOT EXECUTED
1ce0: e12fff13 bx r3 <== NOT EXECUTED
1ce4: e1a00007 mov r0, r7 <== NOT EXECUTED
1ce8: eaffffe0 b 1c70 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
1cec: e3a0000d mov r0, #13 <== NOT EXECUTED
1cf0: eaffffde b 1c70 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
1cf4: e3a00000 mov r0, #0 <== NOT EXECUTED
1cf8: eaffffdc b 1c70 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
000071f4 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
71f4: e59f3148 ldr r3, [pc, #328] ; 7344 <rtems_io_register_driver+0x150>
71f8: e593c000 ldr ip, [r3]
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
71fc: e59f3144 ldr r3, [pc, #324] ; 7348 <rtems_io_register_driver+0x154>
if ( rtems_interrupt_is_in_progress() )
7200: e35c0000 cmp ip, #0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
7204: e92d4010 push {r4, lr}
7208: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
720c: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
7210: 13a00012 movne r0, #18
7214: 18bd8010 popne {r4, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
7218: e3520000 cmp r2, #0
721c: 0a00003d beq 7318 <rtems_io_register_driver+0x124>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
7220: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
7224: e5820000 str r0, [r2]
if ( driver_table == NULL )
7228: 0a00003a beq 7318 <rtems_io_register_driver+0x124>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
722c: e591c000 ldr ip, [r1]
7230: e35c0000 cmp ip, #0
7234: 0a000034 beq 730c <rtems_io_register_driver+0x118>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
7238: e1500004 cmp r0, r4
723c: 93a0000a movls r0, #10
7240: 98bd8010 popls {r4, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
7244: e59f0100 ldr r0, [pc, #256] ; 734c <rtems_io_register_driver+0x158>
7248: e590c000 ldr ip, [r0]
724c: e28cc001 add ip, ip, #1
7250: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
7254: e3540000 cmp r4, #0
7258: 1a000020 bne 72e0 <rtems_io_register_driver+0xec>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
725c: e593e000 ldr lr, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
7260: e35e0000 cmp lr, #0
7264: 0a00002d beq 7320 <rtems_io_register_driver+0x12c>
7268: e59f30e0 ldr r3, [pc, #224] ; 7350 <rtems_io_register_driver+0x15c>
726c: e593c000 ldr ip, [r3]
7270: e1a0300c mov r3, ip
7274: ea000003 b 7288 <rtems_io_register_driver+0x94>
7278: e2844001 add r4, r4, #1
727c: e15e0004 cmp lr, r4
7280: e2833018 add r3, r3, #24
7284: 9a000005 bls 72a0 <rtems_io_register_driver+0xac>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
7288: e5930000 ldr r0, [r3]
728c: e3500000 cmp r0, #0
7290: 1afffff8 bne 7278 <rtems_io_register_driver+0x84>
7294: e5930004 ldr r0, [r3, #4]
7298: e3500000 cmp r0, #0
729c: 1afffff5 bne 7278 <rtems_io_register_driver+0x84>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
72a0: e15e0004 cmp lr, r4
72a4: 10843084 addne r3, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
72a8: e5824000 str r4, [r2]
if ( m != n )
72ac: 108cc183 addne ip, ip, r3, lsl #3
72b0: 0a00001b beq 7324 <rtems_io_register_driver+0x130>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
72b4: e1a0e001 mov lr, r1
72b8: e8be000f ldm lr!, {r0, r1, r2, r3}
72bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
72c0: e89e0003 ldm lr, {r0, r1}
72c4: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
72c8: eb00069c bl 8d40 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
72cc: e3a01000 mov r1, #0
72d0: e1a00004 mov r0, r4
72d4: e1a02001 mov r2, r1
}
72d8: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
72dc: ea002418 b 10344 <rtems_io_initialize>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
72e0: e59f3068 ldr r3, [pc, #104] ; 7350 <rtems_io_register_driver+0x15c>
72e4: e084c084 add ip, r4, r4, lsl #1
72e8: e5933000 ldr r3, [r3]
72ec: e1a0c18c lsl ip, ip, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
72f0: e793000c ldr r0, [r3, ip]
72f4: e3500000 cmp r0, #0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
72f8: e083c00c add ip, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
72fc: 0a00000b beq 7330 <rtems_io_register_driver+0x13c>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
7300: eb00068e bl 8d40 <_Thread_Enable_dispatch>
7304: e3a0000c mov r0, #12
return RTEMS_RESOURCE_IN_USE;
7308: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
730c: e591c004 ldr ip, [r1, #4]
7310: e35c0000 cmp ip, #0
7314: 1affffc7 bne 7238 <rtems_io_register_driver+0x44>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
7318: e3a00009 mov r0, #9
}
731c: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
7320: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
7324: eb000685 bl 8d40 <_Thread_Enable_dispatch>
7328: e3a00005 mov r0, #5
return sc;
732c: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
7330: e59c3004 ldr r3, [ip, #4]
7334: e3530000 cmp r3, #0
7338: 1afffff0 bne 7300 <rtems_io_register_driver+0x10c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
733c: e5824000 str r4, [r2]
7340: eaffffdb b 72b4 <rtems_io_register_driver+0xc0>
000021c4 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
21c4: e92d4010 push {r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
21c8: e59f40b4 ldr r4, [pc, #180] ; 2284 <rtems_libio_init+0xc0>
21cc: e5940000 ldr r0, [r4]
21d0: e3500000 cmp r0, #0
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
21d4: e24dd004 sub sp, sp, #4
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
21d8: 0a000016 beq 2238 <rtems_libio_init+0x74>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
21dc: e3a01040 mov r1, #64 ; 0x40
21e0: ebffff1a bl 1e50 <calloc>
21e4: e59f309c ldr r3, [pc, #156] ; 2288 <rtems_libio_init+0xc4>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
21e8: e3500000 cmp r0, #0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
21ec: e5830000 str r0, [r3]
21f0: e1a02000 mov r2, r0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
21f4: 0a000020 beq 227c <rtems_libio_init+0xb8>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
21f8: e5941000 ldr r1, [r4]
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
21fc: e59f3088 ldr r3, [pc, #136] ; 228c <rtems_libio_init+0xc8>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2200: e3510001 cmp r1, #1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2204: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2208: 9a000008 bls 2230 <rtems_libio_init+0x6c>
220c: e2803040 add r3, r0, #64 ; 0x40
2210: e3a02001 mov r2, #1
iop->data1 = iop + 1;
2214: e2822001 add r2, r2, #1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2218: e1520001 cmp r2, r1
iop->data1 = iop + 1;
221c: e503300c str r3, [r3, #-12]
2220: e2833040 add r3, r3, #64 ; 0x40
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2224: 1afffffa bne 2214 <rtems_libio_init+0x50>
2228: e2422001 sub r2, r2, #1
222c: e0802302 add r2, r0, r2, lsl #6
iop->data1 = iop + 1;
iop->data1 = NULL;
2230: e3a03000 mov r3, #0
2234: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
2238: e59fc050 ldr ip, [pc, #80] ; 2290 <rtems_libio_init+0xcc>
223c: e59f0050 ldr r0, [pc, #80] ; 2294 <rtems_libio_init+0xd0>
2240: e3a01001 mov r1, #1
2244: e3a02054 mov r2, #84 ; 0x54
2248: e3a03000 mov r3, #0
224c: e58dc000 str ip, [sp]
2250: eb000cba bl 5540 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
2254: e3500000 cmp r0, #0
2258: 1a000006 bne 2278 <rtems_libio_init+0xb4>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
225c: e59f3034 ldr r3, [pc, #52] ; 2298 <rtems_libio_init+0xd4>
2260: e5933000 ldr r3, [r3]
2264: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
2268: 11a0e00f movne lr, pc
226c: 112fff13 bxne r3
}
2270: e28dd004 add sp, sp, #4
2274: e8bd8010 pop {r4, pc}
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
2278: eb000ed9 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
227c: e280001a add r0, r0, #26 <== NOT EXECUTED
2280: eb000ed7 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0002a7e0 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2a7e0: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
2a7e4: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2a7e8: e24dd01c sub sp, sp, #28
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
2a7ec: e1a01000 mov r1, r0
2a7f0: e28d2018 add r2, sp, #24
2a7f4: eb0006c4 bl 2c30c <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
2a7f8: e2505000 subs r5, r0, #0
2a7fc: 1a000025 bne 2a898 <rtems_libio_set_private_env+0xb8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
2a800: e59f70d8 ldr r7, [pc, #216] ; 2a8e0 <rtems_libio_set_private_env+0x100>
2a804: e59f30d8 ldr r3, [pc, #216] ; 2a8e4 <rtems_libio_set_private_env+0x104>
2a808: e5976000 ldr r6, [r7]
2a80c: e1560003 cmp r6, r3
2a810: 0a000023 beq 2a8a4 <rtems_libio_set_private_env+0xc4>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
2a814: e59f10c8 ldr r1, [pc, #200] ; 2a8e4 <rtems_libio_set_private_env+0x104>
2a818: e3a02048 mov r2, #72 ; 0x48
2a81c: e1a00006 mov r0, r6
2a820: eb007436 bl 47900 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2a824: e59d3018 ldr r3, [sp, #24]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2a828: e3a05000 mov r5, #0
2a82c: e28d4004 add r4, sp, #4
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2a830: e5863000 str r3, [r6]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2a834: e3a01001 mov r1, #1
2a838: e1a03004 mov r3, r4
2a83c: e1a02005 mov r2, r5
2a840: e59f00a0 ldr r0, [pc, #160] ; 2a8e8 <rtems_libio_set_private_env+0x108>
rtems_filesystem_root = loc;
2a844: e1a06004 mov r6, r4
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2a848: e58d5000 str r5, [sp]
2a84c: ebff7525 bl 7ce8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
2a850: e597c000 ldr ip, [r7]
2a854: e8b6000f ldm r6!, {r0, r1, r2, r3}
2a858: e28cc018 add ip, ip, #24
2a85c: e8ac000f stmia ip!, {r0, r1, r2, r3}
2a860: e5963000 ldr r3, [r6]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2a864: e3a01001 mov r1, #1
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2a868: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2a86c: e1a02005 mov r2, r5
2a870: e1a03004 mov r3, r4
2a874: e59f006c ldr r0, [pc, #108] ; 2a8e8 <rtems_libio_set_private_env+0x108>
2a878: e58d5000 str r5, [sp]
2a87c: ebff7519 bl 7ce8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
2a880: e597c000 ldr ip, [r7]
2a884: e8b4000f ldm r4!, {r0, r1, r2, r3}
2a888: e28cc004 add ip, ip, #4
2a88c: e8ac000f stmia ip!, {r0, r1, r2, r3}
2a890: e5963000 ldr r3, [r6]
2a894: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL;
}
2a898: e1a00005 mov r0, r5
2a89c: e28dd01c add sp, sp, #28
2a8a0: e8bd80f0 pop {r4, r5, r6, r7, pc}
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
2a8a4: e3a00048 mov r0, #72 ; 0x48
2a8a8: ebff76f4 bl 8480 <malloc>
if (!tmp)
2a8ac: e2506000 subs r6, r0, #0
2a8b0: 03a0501a moveq r5, #26
2a8b4: 0afffff7 beq 2a898 <rtems_libio_set_private_env+0xb8>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
2a8b8: e1a00005 mov r0, r5
2a8bc: e1a01007 mov r1, r7
2a8c0: e59f2024 ldr r2, [pc, #36] ; 2a8ec <rtems_libio_set_private_env+0x10c>
2a8c4: eb000738 bl 2c5ac <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
2a8c8: e2505000 subs r5, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
2a8cc: 05876000 streq r6, [r7]
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
2a8d0: 0affffcf beq 2a814 <rtems_libio_set_private_env+0x34>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
2a8d4: e1a00006 mov r0, r6 <== NOT EXECUTED
2a8d8: ebff7524 bl 7d70 <free> <== NOT EXECUTED
return sc;
2a8dc: eaffffed b 2a898 <rtems_libio_set_private_env+0xb8> <== NOT EXECUTED
0002a730 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
2a730: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2a734: e1a05000 mov r5, r0 <== NOT EXECUTED
2a738: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
2a73c: e3a00000 mov r0, #0 <== NOT EXECUTED
2a740: e1a01000 mov r1, r0 <== NOT EXECUTED
2a744: e1a0200d mov r2, sp <== NOT EXECUTED
2a748: eb0006ef bl 2c30c <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2a74c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
2a750: 1a00000d bne 2a78c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
2a754: e59f4078 ldr r4, [pc, #120] ; 2a7d4 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2a758: e5946000 ldr r6, [r4] <== NOT EXECUTED
2a75c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
2a760: e5962000 ldr r2, [r6] <== NOT EXECUTED
2a764: e1520003 cmp r2, r3 <== NOT EXECUTED
2a768: 0a00000a beq 2a798 <rtems_libio_share_private_env+0x68> <== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
2a76c: e1a00005 mov r0, r5 <== NOT EXECUTED
2a770: e59f105c ldr r1, [pc, #92] ; 2a7d4 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2a774: e28d2004 add r2, sp, #4 <== NOT EXECUTED
2a778: eb0007de bl 2c6f8 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
2a77c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
2a780: 0a00000b beq 2a7b4 <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
2a784: e59f204c ldr r2, [pc, #76] ; 2a7d8 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
2a788: e5842000 str r2, [r4] <== NOT EXECUTED
return sc;
}
2a78c: e1a00003 mov r0, r3 <== NOT EXECUTED
2a790: e28dd008 add sp, sp, #8 <== NOT EXECUTED
2a794: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
2a798: e1a01004 mov r1, r4 <== NOT EXECUTED
2a79c: eb0007af bl 2c660 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2a7a0: e2503000 subs r3, r0, #0 <== NOT EXECUTED
2a7a4: 1afffff8 bne 2a78c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
free_user_env(tmp);
2a7a8: e1a00006 mov r0, r6 <== NOT EXECUTED
2a7ac: ebffffc6 bl 2a6cc <free_user_env> <== NOT EXECUTED
2a7b0: eaffffed b 2a76c <rtems_libio_share_private_env+0x3c> <== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
2a7b4: e59f1018 ldr r1, [pc, #24] ; 2a7d4 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2a7b8: e59f201c ldr r2, [pc, #28] ; 2a7dc <rtems_libio_share_private_env+0xac><== NOT EXECUTED
2a7bc: eb00077a bl 2c5ac <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2a7c0: e2503000 subs r3, r0, #0 <== NOT EXECUTED
2a7c4: 1affffee bne 2a784 <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2a7c8: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
2a7cc: e5842000 str r2, [r4] <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
2a7d0: eaffffed b 2a78c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
0000857c <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
857c: e92d4800 push {fp, lr} <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
8580: e59f3040 ldr r3, [pc, #64] ; 85c8 <rtems_malloc_statistics_at_free+0x4c><== NOT EXECUTED
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
8584: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
8588: e1a01000 mov r1, r0 <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
858c: e1a0200d mov r2, sp <== NOT EXECUTED
8590: e5930000 ldr r0, [r3] <== NOT EXECUTED
8594: eb001789 bl e3c0 <_Protected_heap_Get_block_size> <== NOT EXECUTED
8598: e3500000 cmp r0, #0 <== NOT EXECUTED
859c: 0a000007 beq 85c0 <rtems_malloc_statistics_at_free+0x44> <== NOT EXECUTED
MSBUMP(lifetime_freed, size);
85a0: e59f3024 ldr r3, [pc, #36] ; 85cc <rtems_malloc_statistics_at_free+0x50><== NOT EXECUTED
85a4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
85a8: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED
85ac: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
85b0: e09b1000 adds r1, fp, r0 <== NOT EXECUTED
85b4: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED
85b8: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED
85bc: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED
}
}
85c0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
85c4: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00009490 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
9490: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
9494: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
9498: e1a0a001 mov sl, r1 <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
949c: eb0105d5 bl 4abf8 <strdup> <== NOT EXECUTED
if (dup_path != NULL) {
94a0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
94a4: 0a00005e beq 9624 <rtems_mkdir+0x194> <== NOT EXECUTED
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
94a8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED
94ac: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED
++p;
94b0: e3a07000 mov r7, #0 <== NOT EXECUTED
94b4: 05d63001 ldrbeq r3, [r6, #1] <== NOT EXECUTED
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
94b8: 11a05006 movne r5, r6 <== NOT EXECUTED
++p;
94bc: 02865001 addeq r5, r6, #1 <== NOT EXECUTED
94c0: e3a02001 mov r2, #1 <== NOT EXECUTED
retval = 0;
break;
}
}
if (!last)
*p = '/';
94c4: e3a0802f mov r8, #47 ; 0x2f <== NOT EXECUTED
94c8: e1a09007 mov r9, r7 <== NOT EXECUTED
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
94cc: e1a0b00d mov fp, sp <== NOT EXECUTED
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
94d0: e3530000 cmp r3, #0 <== NOT EXECUTED
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
94d4: 05c53000 strbeq r3, [r5] <== NOT EXECUTED
94d8: 03a04001 moveq r4, #1 <== NOT EXECUTED
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
94dc: 0a000006 beq 94fc <rtems_mkdir+0x6c> <== NOT EXECUTED
last = 1;
else if (p[0] != '/')
94e0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED
retval = 0;
break;
}
}
if (!last)
*p = '/';
94e4: 15f53001 ldrbne r3, [r5, #1]! <== NOT EXECUTED
94e8: 1afffff8 bne 94d0 <rtems_mkdir+0x40> <== NOT EXECUTED
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
94ec: e5d54001 ldrb r4, [r5, #1] <== NOT EXECUTED
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
94f0: e5c59000 strb r9, [r5] <== NOT EXECUTED
if (!last && p[1] == '\0')
94f4: e2744001 rsbs r4, r4, #1 <== NOT EXECUTED
94f8: 33a04000 movcc r4, #0 <== NOT EXECUTED
last = 1;
if (first) {
94fc: e3520000 cmp r2, #0 <== NOT EXECUTED
9500: 1a000031 bne 95cc <rtems_mkdir+0x13c> <== NOT EXECUTED
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
9504: e3540000 cmp r4, #0 <== NOT EXECUTED
9508: 03a01f7f moveq r1, #508 ; 0x1fc <== NOT EXECUTED
950c: 02811003 addeq r1, r1, #3 <== NOT EXECUTED
9510: 1a000011 bne 955c <rtems_mkdir+0xcc> <== NOT EXECUTED
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
9514: e1a00006 mov r0, r6 <== NOT EXECUTED
9518: ebfffc59 bl 8684 <mkdir> <== NOT EXECUTED
951c: e3500000 cmp r0, #0 <== NOT EXECUTED
9520: ba000014 blt 9578 <rtems_mkdir+0xe8> <== NOT EXECUTED
} else {
retval = 0;
break;
}
}
if (!last)
9524: e3540000 cmp r4, #0 <== NOT EXECUTED
9528: 0a000007 beq 954c <rtems_mkdir+0xbc> <== NOT EXECUTED
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
952c: e3a04001 mov r4, #1 <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
9530: e1a00006 mov r0, r6 <== NOT EXECUTED
9534: ebfffa0d bl 7d70 <free> <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
9538: e3540000 cmp r4, #0 <== NOT EXECUTED
953c: 13a00000 movne r0, #0 <== NOT EXECUTED
9540: 0a000037 beq 9624 <rtems_mkdir+0x194> <== NOT EXECUTED
}
9544: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
9548: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
retval = 0;
break;
}
}
if (!last)
*p = '/';
954c: e5c58000 strb r8, [r5] <== NOT EXECUTED
9550: e3a02000 mov r2, #0 <== NOT EXECUTED
9554: e5f53001 ldrb r3, [r5, #1]! <== NOT EXECUTED
9558: eaffffdc b 94d0 <rtems_mkdir+0x40> <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
955c: e1a00007 mov r0, r7 <== NOT EXECUTED
9560: eb0007f3 bl b534 <umask> <== NOT EXECUTED
9564: e1a0100a mov r1, sl <== NOT EXECUTED
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
9568: e1a00006 mov r0, r6 <== NOT EXECUTED
956c: ebfffc44 bl 8684 <mkdir> <== NOT EXECUTED
9570: e3500000 cmp r0, #0 <== NOT EXECUTED
9574: aaffffea bge 9524 <rtems_mkdir+0x94> <== NOT EXECUTED
if (errno == EEXIST || errno == EISDIR) {
9578: eb00ec30 bl 44640 <__errno> <== NOT EXECUTED
957c: e5903000 ldr r3, [r0] <== NOT EXECUTED
9580: e3530011 cmp r3, #17 <== NOT EXECUTED
9584: 0a000003 beq 9598 <rtems_mkdir+0x108> <== NOT EXECUTED
9588: eb00ec2c bl 44640 <__errno> <== NOT EXECUTED
958c: e5903000 ldr r3, [r0] <== NOT EXECUTED
9590: e3530015 cmp r3, #21 <== NOT EXECUTED
9594: 1a000024 bne 962c <rtems_mkdir+0x19c> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
9598: e1a00006 mov r0, r6 <== NOT EXECUTED
959c: e1a0100d mov r1, sp <== NOT EXECUTED
95a0: eb000024 bl 9638 <stat> <== NOT EXECUTED
95a4: e3500000 cmp r0, #0 <== NOT EXECUTED
95a8: ba00001f blt 962c <rtems_mkdir+0x19c> <== NOT EXECUTED
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
95ac: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
95b0: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
95b4: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
95b8: 1a000009 bne 95e4 <rtems_mkdir+0x154> <== NOT EXECUTED
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
95bc: e3540000 cmp r4, #0 <== NOT EXECUTED
95c0: 0affffe1 beq 954c <rtems_mkdir+0xbc> <== NOT EXECUTED
95c4: e3a04002 mov r4, #2 <== NOT EXECUTED
95c8: eaffffd8 b 9530 <rtems_mkdir+0xa0> <== NOT EXECUTED
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
95cc: e3a00000 mov r0, #0 <== NOT EXECUTED
95d0: eb0007d7 bl b534 <umask> <== NOT EXECUTED
95d4: e1a07000 mov r7, r0 <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
95d8: e3c000c0 bic r0, r0, #192 ; 0xc0 <== NOT EXECUTED
95dc: eb0007d4 bl b534 <umask> <== NOT EXECUTED
95e0: eaffffc7 b 9504 <rtems_mkdir+0x74> <== NOT EXECUTED
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
95e4: e3540000 cmp r4, #0 <== NOT EXECUTED
95e8: 0a000006 beq 9608 <rtems_mkdir+0x178> <== NOT EXECUTED
errno = EEXIST;
95ec: eb00ec13 bl 44640 <__errno> <== NOT EXECUTED
95f0: e3a03011 mov r3, #17 <== NOT EXECUTED
95f4: e5803000 str r3, [r0] <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
95f8: e1a00006 mov r0, r6 <== NOT EXECUTED
95fc: ebfff9db bl 7d70 <free> <== NOT EXECUTED
9600: e3e00000 mvn r0, #0 <== NOT EXECUTED
9604: eaffffce b 9544 <rtems_mkdir+0xb4> <== NOT EXECUTED
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
9608: eb00ec0c bl 44640 <__errno> <== NOT EXECUTED
960c: e3a03014 mov r3, #20 <== NOT EXECUTED
9610: e5803000 str r3, [r0] <== NOT EXECUTED
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
9614: e1a00007 mov r0, r7 <== NOT EXECUTED
9618: eb0007c5 bl b534 <umask> <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
961c: e1a00006 mov r0, r6 <== NOT EXECUTED
9620: ebfff9d2 bl 7d70 <free> <== NOT EXECUTED
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
9624: e3e00000 mvn r0, #0 <== NOT EXECUTED
9628: eaffffc5 b 9544 <rtems_mkdir+0xb4> <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
962c: e3540000 cmp r4, #0 <== NOT EXECUTED
9630: 0afffff7 beq 9614 <rtems_mkdir+0x184> <== NOT EXECUTED
9634: eafffff8 b 961c <rtems_mkdir+0x18c> <== NOT EXECUTED
00020c6c <rtems_nvdisk_crc16_gen_factors>:
* @relval RTEMS_SUCCESSFUL The table was generated.
* @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
*/
rtems_status_code
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
20c6c: e92d4010 push {r4, lr} <== NOT EXECUTED
20c70: e1a04800 lsl r4, r0, #16 <== NOT EXECUTED
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
20c74: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED
20c78: ebff9e00 bl 8480 <malloc> <== NOT EXECUTED
20c7c: e59f3058 ldr r3, [pc, #88] ; 20cdc <rtems_nvdisk_crc16_gen_factors+0x70><== NOT EXECUTED
if (!rtems_nvdisk_crc16_factor)
20c80: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_status_code
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
20c84: e5830008 str r0, [r3, #8] <== NOT EXECUTED
* @relval RTEMS_SUCCESSFUL The table was generated.
* @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
*/
rtems_status_code
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
20c88: e1a04824 lsr r4, r4, #16 <== NOT EXECUTED
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
20c8c: 0280001a addeq r0, r0, #26 <== NOT EXECUTED
20c90: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
20c94: e3a01000 mov r1, #0 <== NOT EXECUTED
20c98: e1a03801 lsl r3, r1, #16 <== NOT EXECUTED
20c9c: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
20ca0: e3a02007 mov r2, #7 <== NOT EXECUTED
20ca4: ea000000 b 20cac <rtems_nvdisk_crc16_gen_factors+0x40> <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
20ca8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
20cac: e3130001 tst r3, #1 <== NOT EXECUTED
20cb0: 102430a3 eorne r3, r4, r3, lsr #1 <== NOT EXECUTED
20cb4: 01a030a3 lsreq r3, r3, #1 <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
20cb8: e3520000 cmp r2, #0 <== NOT EXECUTED
20cbc: 1afffff9 bne 20ca8 <rtems_nvdisk_crc16_gen_factors+0x3c> <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
20cc0: e1a0c081 lsl ip, r1, #1 <== NOT EXECUTED
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
20cc4: e2811001 add r1, r1, #1 <== NOT EXECUTED
20cc8: e3510c01 cmp r1, #256 ; 0x100 <== NOT EXECUTED
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
20ccc: e18030bc strh r3, [r0, ip] <== NOT EXECUTED
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
20cd0: 1afffff0 bne 20c98 <rtems_nvdisk_crc16_gen_factors+0x2c> <== NOT EXECUTED
20cd4: e1a00002 mov r0, r2 <== NOT EXECUTED
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
}
return RTEMS_SUCCESSFUL;
}
20cd8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0002054c <rtems_nvdisk_error>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_nvdisk_error (const char *format, ...)
{
2054c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
20550: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
20554: e59f4068 ldr r4, [pc, #104] ; 205c4 <rtems_nvdisk_error+0x78><== NOT EXECUTED
20558: e5943000 ldr r3, [r4] <== NOT EXECUTED
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_nvdisk_error (const char *format, ...)
{
2055c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
20560: e28dc014 add ip, sp, #20 <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
20564: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
20568: e3a01001 mov r1, #1 <== NOT EXECUTED
2056c: e3a0200d mov r2, #13 <== NOT EXECUTED
20570: e59f0050 ldr r0, [pc, #80] ; 205c8 <rtems_nvdisk_error+0x7c><== NOT EXECUTED
static int
rtems_nvdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
20574: e58dc000 str ip, [sp] <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
20578: eb00976d bl 46334 <fwrite> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
2057c: e5943000 ldr r3, [r4] <== NOT EXECUTED
20580: e59d2000 ldr r2, [sp] <== NOT EXECUTED
20584: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
20588: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
2058c: eb00cb59 bl 532f8 <vfprintf> <== NOT EXECUTED
fprintf (stderr, "\n");
20590: e5943000 ldr r3, [r4] <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
ret = vfprintf (stderr, format, args);
20594: e1a05000 mov r5, r0 <== NOT EXECUTED
fprintf (stderr, "\n");
20598: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
2059c: e3a0000a mov r0, #10 <== NOT EXECUTED
205a0: eb0092b9 bl 4508c <fputc> <== NOT EXECUTED
fflush (stderr);
205a4: e5943000 ldr r3, [r4] <== NOT EXECUTED
205a8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
205ac: eb009116 bl 44a0c <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
205b0: e1a00005 mov r0, r5 <== NOT EXECUTED
205b4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
205b8: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
205bc: e28dd010 add sp, sp, #16 <== NOT EXECUTED
205c0: e12fff1e bx lr <== NOT EXECUTED
000205cc <rtems_nvdisk_get_device>:
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
uint32_t device;
if (block >= nvd->block_count)
205cc: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
205d0: e1520001 cmp r2, r1 <== NOT EXECUTED
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
205d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
205d8: e1a03001 mov r3, r1 <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
205dc: 9a000017 bls 20640 <rtems_nvdisk_get_device+0x74> <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
205e0: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED
205e4: e3540000 cmp r4, #0 <== NOT EXECUTED
205e8: 0a00000f beq 2062c <rtems_nvdisk_get_device+0x60> <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
205ec: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED
205f0: e3a01000 mov r1, #0 <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
if ((block >= dc->block_base) &&
205f4: e592c00c ldr ip, [r2, #12] <== NOT EXECUTED
205f8: e153000c cmp r3, ip <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
205fc: e2811001 add r1, r1, #1 <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
20600: e1a00002 mov r0, r2 <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
if ((block >= dc->block_base) &&
20604: 3a000005 bcc 20620 <rtems_nvdisk_get_device+0x54> <== NOT EXECUTED
20608: e5926004 ldr r6, [r2, #4] <== NOT EXECUTED
2060c: e5925008 ldr r5, [r2, #8] <== NOT EXECUTED
20610: e08cc006 add ip, ip, r6 <== NOT EXECUTED
20614: e065c00c rsb ip, r5, ip <== NOT EXECUTED
20618: e153000c cmp r3, ip <== NOT EXECUTED
2061c: 38bd8070 popcc {r4, r5, r6, pc} <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
20620: e1510004 cmp r1, r4 <== NOT EXECUTED
20624: e2822014 add r2, r2, #20 <== NOT EXECUTED
20628: 3afffff1 bcc 205f4 <rtems_nvdisk_get_device+0x28> <== NOT EXECUTED
if ((block >= dc->block_base) &&
(block < (dc->block_base + dc->pages - dc->pages_desc)))
return dc;
}
rtems_nvdisk_error ("map-block:%d: no device/page map found", block);
2062c: e1a01003 mov r1, r3 <== NOT EXECUTED
20630: e59f0018 ldr r0, [pc, #24] ; 20650 <rtems_nvdisk_get_device+0x84><== NOT EXECUTED
20634: ebffffc4 bl 2054c <rtems_nvdisk_error> <== NOT EXECUTED
20638: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
}
2063c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
{
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
20640: e59f000c ldr r0, [pc, #12] ; 20654 <rtems_nvdisk_get_device+0x88><== NOT EXECUTED
20644: ebffffc0 bl 2054c <rtems_nvdisk_error> <== NOT EXECUTED
20648: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
2064c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00020ce0 <rtems_nvdisk_initialize>:
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
20ce0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
20ce4: e24dd03c sub sp, sp, #60 ; 0x3c <== NOT EXECUTED
20ce8: e58d001c str r0, [sp, #28] <== NOT EXECUTED
const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
rtems_nvdisk* nvd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
20cec: ebff963b bl 65e0 <rtems_disk_io_initialize> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20cf0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
20cf4: 0a000002 beq 20d04 <rtems_nvdisk_initialize+0x24> <== NOT EXECUTED
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
20cf8: e1a00006 mov r0, r6 <== NOT EXECUTED
20cfc: e28dd03c add sp, sp, #60 ; 0x3c <== NOT EXECUTED
20d00: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_disk_io_initialize ();
if (sc != RTEMS_SUCCESSFUL)
return sc;
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
20d04: e3a00b21 mov r0, #33792 ; 0x8400 <== NOT EXECUTED
20d08: e2800008 add r0, r0, #8 <== NOT EXECUTED
20d0c: ebffffd6 bl 20c6c <rtems_nvdisk_crc16_gen_factors> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20d10: e2506000 subs r6, r0, #0 <== NOT EXECUTED
20d14: 1afffff7 bne 20cf8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
return sc;
rtems_nvdisks = calloc (rtems_nvdisk_configuration_size,
20d18: e59f223c ldr r2, [pc, #572] ; 20f5c <rtems_nvdisk_initialize+0x27c><== NOT EXECUTED
20d1c: e3a01028 mov r1, #40 ; 0x28 <== NOT EXECUTED
20d20: e5920000 ldr r0, [r2] <== NOT EXECUTED
20d24: ebff9a8d bl 7760 <calloc> <== NOT EXECUTED
20d28: e59fc230 ldr ip, [pc, #560] ; 20f60 <rtems_nvdisk_initialize+0x280><== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
20d2c: e3500000 cmp r0, #0 <== NOT EXECUTED
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_nvdisks = calloc (rtems_nvdisk_configuration_size,
20d30: e1a03000 mov r3, r0 <== NOT EXECUTED
20d34: e58c0004 str r0, [ip, #4] <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
20d38: 0a000079 beq 20f24 <rtems_nvdisk_initialize+0x244> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
20d3c: e59f1218 ldr r1, [pc, #536] ; 20f5c <rtems_nvdisk_initialize+0x27c><== NOT EXECUTED
20d40: e5912000 ldr r2, [r1] <== NOT EXECUTED
20d44: e3520000 cmp r2, #0 <== NOT EXECUTED
20d48: 0a000077 beq 20f2c <rtems_nvdisk_initialize+0x24c> <== NOT EXECUTED
20d4c: e28d2028 add r2, sp, #40 ; 0x28 <== NOT EXECUTED
20d50: e58d6018 str r6, [sp, #24] <== NOT EXECUTED
20d54: e59f5208 ldr r5, [pc, #520] ; 20f64 <rtems_nvdisk_initialize+0x284><== NOT EXECUTED
20d58: e58d6014 str r6, [sp, #20] <== NOT EXECUTED
20d5c: e58d200c str r2, [sp, #12] <== NOT EXECUTED
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
20d60: e59fc200 ldr ip, [pc, #512] ; 20f68 <rtems_nvdisk_initialize+0x288><== NOT EXECUTED
20d64: e89c0007 ldm ip, {r0, r1, r2} <== NOT EXECUTED
20d68: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
20d6c: e8ac0003 stmia ip!, {r0, r1} <== NOT EXECUTED
20d70: e1cc20b0 strh r2, [ip] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
20d74: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
20d78: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED
temp.__overlay.minor = _minor;
20d7c: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
20d80: e58d1034 str r1, [sp, #52] ; 0x34 <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
20d84: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
temp.__overlay.minor = _minor;
20d88: e58dc038 str ip, [sp, #56] ; 0x38 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
20d8c: e082200c add r2, r2, ip <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
20d90: e0834001 add r4, r3, r1 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
20d94: e5cd2031 strb r2, [sp, #49] ; 0x31 <== NOT EXECUTED
return temp.device;
20d98: e28d2034 add r2, sp, #52 ; 0x34 <== NOT EXECUTED
20d9c: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
nvd->major = major;
20da0: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
20da4: e58d1020 str r1, [sp, #32] <== NOT EXECUTED
20da8: e58d2024 str r2, [sp, #36] ; 0x24 <== NOT EXECUTED
nvd->minor = minor;
20dac: e28d1014 add r1, sp, #20 <== NOT EXECUTED
20db0: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
20db4: e5841004 str r1, [r4, #4] <== NOT EXECUTED
nvd = &rtems_nvdisks[minor];
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
20db8: e783c002 str ip, [r3, r2] <== NOT EXECUTED
nvd->minor = minor;
nvd->flags = c->flags;
20dbc: e5953000 ldr r3, [r5] <== NOT EXECUTED
20dc0: e5843008 str r3, [r4, #8] <== NOT EXECUTED
nvd->block_size = c->block_size;
20dc4: e515300c ldr r3, [r5, #-12] <== NOT EXECUTED
20dc8: e584300c str r3, [r4, #12] <== NOT EXECUTED
nvd->info_level = c->info_level;
20dcc: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
20dd0: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
20dd4: e3a01014 mov r1, #20 <== NOT EXECUTED
20dd8: e5150008 ldr r0, [r5, #-8] <== NOT EXECUTED
20ddc: ebff9a5f bl 7760 <calloc> <== NOT EXECUTED
if (!nvd->devices)
20de0: e3500000 cmp r0, #0 <== NOT EXECUTED
nvd->minor = minor;
nvd->flags = c->flags;
nvd->block_size = c->block_size;
nvd->info_level = c->info_level;
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
20de4: e1a08000 mov r8, r0 <== NOT EXECUTED
20de8: e5840014 str r0, [r4, #20] <== NOT EXECUTED
if (!nvd->devices)
20dec: 0a00004c beq 20f24 <rtems_nvdisk_initialize+0x244> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
20df0: e5156008 ldr r6, [r5, #-8] <== NOT EXECUTED
20df4: e3560000 cmp r6, #0 <== NOT EXECUTED
20df8: 0a000022 beq 20e88 <rtems_nvdisk_initialize+0x1a8> <== NOT EXECUTED
20dfc: e3a0a000 mov sl, #0 <== NOT EXECUTED
20e00: e1a0600a mov r6, sl <== NOT EXECUTED
20e04: e1a0700a mov r7, sl <== NOT EXECUTED
20e08: ea000000 b 20e10 <rtems_nvdisk_initialize+0x130> <== NOT EXECUTED
20e0c: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
20e10: e5159004 ldr r9, [r5, #-4] <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
20e14: e788700a str r7, [r8, sl] <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
20e18: e0899207 add r9, r9, r7, lsl #4 <== NOT EXECUTED
20e1c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
20e20: e5990008 ldr r0, [r9, #8] <== NOT EXECUTED
20e24: eb00edd4 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
20e28: e088800a add r8, r8, sl <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
20e2c: e5880004 str r0, [r8, #4] <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
20e30: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
20e34: e1a0b000 mov fp, r0 <== NOT EXECUTED
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
return ((bytes - 1) / nvd->block_size) + 1;
20e38: e1a01003 mov r1, r3 <== NOT EXECUTED
20e3c: e5990008 ldr r0, [r9, #8] <== NOT EXECUTED
20e40: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
20e44: eb00edcc bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
20e48: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
20e4c: e1a00080 lsl r0, r0, #1 <== NOT EXECUTED
20e50: e1a01003 mov r1, r3 <== NOT EXECUTED
20e54: e2400001 sub r0, r0, #1 <== NOT EXECUTED
20e58: eb00edc7 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
20e5c: e2800001 add r0, r0, #1 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
20e60: e588600c str r6, [r8, #12] <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
20e64: e5880008 str r0, [r8, #8] <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
20e68: e5153008 ldr r3, [r5, #-8] <== NOT EXECUTED
20e6c: e2877001 add r7, r7, #1 <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
20e70: e060b00b rsb fp, r0, fp <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
20e74: e1530007 cmp r3, r7 <== NOT EXECUTED
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
20e78: e5889010 str r9, [r8, #16] <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
20e7c: e086600b add r6, r6, fp <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
20e80: e28aa014 add sl, sl, #20 <== NOT EXECUTED
20e84: 8affffe0 bhi 20e0c <rtems_nvdisk_initialize+0x12c> <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
20e88: e5846010 str r6, [r4, #16] <== NOT EXECUTED
nvd->device_count = c->device_count;
20e8c: e5153008 ldr r3, [r5, #-8] <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
20e90: e59fc0d4 ldr ip, [pc, #212] ; 20f6c <rtems_nvdisk_initialize+0x28c><== NOT EXECUTED
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
nvd->device_count = c->device_count;
20e94: e5843018 str r3, [r4, #24] <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
20e98: e58dc000 str ip, [sp] <== NOT EXECUTED
20e9c: e3a0c000 mov ip, #0 <== NOT EXECUTED
20ea0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
20ea4: e515200c ldr r2, [r5, #-12] <== NOT EXECUTED
20ea8: e28dc028 add ip, sp, #40 ; 0x28 <== NOT EXECUTED
20eac: e28d1020 add r1, sp, #32 <== NOT EXECUTED
20eb0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
20eb4: e1a03006 mov r3, r6 <== NOT EXECUTED
20eb8: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
20ebc: ebff9799 bl 6d28 <rtems_disk_create_phys> <== NOT EXECUTED
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
20ec0: e3500000 cmp r0, #0 <== NOT EXECUTED
20ec4: 1a000020 bne 20f4c <rtems_nvdisk_initialize+0x26c> <== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
20ec8: e2844020 add r4, r4, #32 <== NOT EXECUTED
20ecc: e59f009c ldr r0, [pc, #156] ; 20f70 <rtems_nvdisk_initialize+0x290><== NOT EXECUTED
20ed0: e3a01001 mov r1, #1 <== NOT EXECUTED
20ed4: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED
20ed8: e3a03000 mov r3, #0 <== NOT EXECUTED
20edc: e58d4000 str r4, [sp] <== NOT EXECUTED
20ee0: ebffacc2 bl c1f0 <rtems_semaphore_create> <== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
20ee4: e3500000 cmp r0, #0 <== NOT EXECUTED
20ee8: 1a000013 bne 20f3c <rtems_nvdisk_initialize+0x25c> <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
20eec: e59f1068 ldr r1, [pc, #104] ; 20f5c <rtems_nvdisk_initialize+0x27c><== NOT EXECUTED
20ef0: e28d3014 add r3, sp, #20 <== NOT EXECUTED
20ef4: e8931008 ldm r3, {r3, ip} <== NOT EXECUTED
20ef8: e5912000 ldr r2, [r1] <== NOT EXECUTED
20efc: e2833001 add r3, r3, #1 <== NOT EXECUTED
20f00: e28cc028 add ip, ip, #40 ; 0x28 <== NOT EXECUTED
20f04: e1520003 cmp r2, r3 <== NOT EXECUTED
20f08: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
20f0c: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
20f10: e2855014 add r5, r5, #20 <== NOT EXECUTED
20f14: 9a000004 bls 20f2c <rtems_nvdisk_initialize+0x24c> <== NOT EXECUTED
20f18: e59f1040 ldr r1, [pc, #64] ; 20f60 <rtems_nvdisk_initialize+0x280><== NOT EXECUTED
20f1c: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
20f20: eaffff8e b 20d60 <rtems_nvdisk_initialize+0x80> <== NOT EXECUTED
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
20f24: e3a0601a mov r6, #26 <== NOT EXECUTED
20f28: eaffff72 b 20cf8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
rtems_nvdisk_error ("disk lock create failed");
return sc;
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
20f2c: e59f302c ldr r3, [pc, #44] ; 20f60 <rtems_nvdisk_initialize+0x280><== NOT EXECUTED
20f30: e3a06000 mov r6, #0 <== NOT EXECUTED
20f34: e5832000 str r2, [r3] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
20f38: eaffff6e b 20cf8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
20f3c: e1a06000 mov r6, r0 <== NOT EXECUTED
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk lock create failed");
20f40: e59f002c ldr r0, [pc, #44] ; 20f74 <rtems_nvdisk_initialize+0x294><== NOT EXECUTED
20f44: ebfffd80 bl 2054c <rtems_nvdisk_error> <== NOT EXECUTED
return sc;
20f48: eaffff6a b 20cf8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
20f4c: e1a06000 mov r6, r0 <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk create phy failed");
20f50: e59f0020 ldr r0, [pc, #32] ; 20f78 <rtems_nvdisk_initialize+0x298><== NOT EXECUTED
20f54: ebfffd7c bl 2054c <rtems_nvdisk_error> <== NOT EXECUTED
return sc;
20f58: eaffff66 b 20cf8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
00020658 <rtems_nvdisk_ioctl>:
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
20658: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
if (minor >= rtems_nvdisk_count)
2065c: e59fc600 ldr ip, [pc, #1536] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
20660: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
20664: e1a05000 mov r5, r0 <== NOT EXECUTED
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
if (minor >= rtems_nvdisk_count)
20668: e59c0000 ldr r0, [ip] <== NOT EXECUTED
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
2066c: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
if (minor >= rtems_nvdisk_count)
20670: e1500003 cmp r0, r3 <== NOT EXECUTED
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
20674: e1a04001 mov r4, r1 <== NOT EXECUTED
20678: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
if (minor >= rtems_nvdisk_count)
2067c: 9a0000fd bls 20a78 <rtems_nvdisk_ioctl+0x420> <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
20680: e59fe5dc ldr lr, [pc, #1500] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20684: e0833103 add r3, r3, r3, lsl #2 <== NOT EXECUTED
20688: e59e2004 ldr r2, [lr, #4] <== NOT EXECUTED
2068c: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED
20690: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
20694: e0823003 add r3, r2, r3 <== NOT EXECUTED
20698: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
2069c: e3530000 cmp r3, #0 <== NOT EXECUTED
206a0: 0a0000f4 beq 20a78 <rtems_nvdisk_ioctl+0x420> <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
206a4: eb008fe5 bl 44640 <__errno> <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
206a8: e59f15b4 ldr r1, [pc, #1460] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
206ac: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
206b0: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
206b4: e3a03000 mov r3, #0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
206b8: e082200c add r2, r2, ip <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
206bc: e5803000 str r3, [r0] <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
206c0: e1a01003 mov r1, r3 <== NOT EXECUTED
206c4: e5920020 ldr r0, [r2, #32] <== NOT EXECUTED
206c8: e1a02003 mov r2, r3 <== NOT EXECUTED
206cc: ebffaf7c bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
206d0: e250a000 subs sl, r0, #0 <== NOT EXECUTED
206d4: 0a000009 beq 20700 <rtems_nvdisk_ioctl+0xa8> <== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
206d8: eb008fd8 bl 44640 <__errno> <== NOT EXECUTED
206dc: e3a03005 mov r3, #5 <== NOT EXECUTED
206e0: e5803000 str r3, [r0] <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
206e4: eb008fd5 bl 44640 <__errno> <== NOT EXECUTED
206e8: e5903000 ldr r3, [r0] <== NOT EXECUTED
206ec: e3530000 cmp r3, #0 <== NOT EXECUTED
206f0: 01a00003 moveq r0, r3 <== NOT EXECUTED
206f4: 13e00000 mvnne r0, #0 <== NOT EXECUTED
}
206f8: e28dd020 add sp, sp, #32 <== NOT EXECUTED
206fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
20700: eb008fce bl 44640 <__errno> <== NOT EXECUTED
switch (req)
20704: e3a03202 mov r3, #536870912 ; 0x20000000 <== NOT EXECUTED
20708: e2833c42 add r3, r3, #16896 ; 0x4200 <== NOT EXECUTED
2070c: e2833082 add r3, r3, #130 ; 0x82 <== NOT EXECUTED
20710: e1540003 cmp r4, r3 <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
20714: e580a000 str sl, [r0] <== NOT EXECUTED
switch (req)
20718: 0a000043 beq 2082c <rtems_nvdisk_ioctl+0x1d4> <== NOT EXECUTED
2071c: e3a03961 mov r3, #1589248 ; 0x184000 <== NOT EXECUTED
20720: e2833c02 add r3, r3, #512 ; 0x200 <== NOT EXECUTED
20724: e2833107 add r3, r3, #-1073741823 ; 0xc0000001 <== NOT EXECUTED
20728: e1540003 cmp r4, r3 <== NOT EXECUTED
2072c: 0a000045 beq 20848 <rtems_nvdisk_ioctl+0x1f0> <== NOT EXECUTED
20730: e3a03202 mov r3, #536870912 ; 0x20000000 <== NOT EXECUTED
20734: e2833c42 add r3, r3, #16896 ; 0x4200 <== NOT EXECUTED
20738: e2833080 add r3, r3, #128 ; 0x80 <== NOT EXECUTED
2073c: e1540003 cmp r4, r3 <== NOT EXECUTED
20740: 0a00000c beq 20778 <rtems_nvdisk_ioctl+0x120> <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
break;
default:
rtems_blkdev_ioctl (dd, req, argp);
20744: e1a01004 mov r1, r4 <== NOT EXECUTED
20748: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
2074c: e1a00005 mov r0, r5 <== NOT EXECUTED
20750: ebff952b bl 5c04 <rtems_blkdev_ioctl> <== NOT EXECUTED
20754: e59f1508 ldr r1, [pc, #1288] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20758: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
2075c: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
20760: e0833002 add r3, r3, r2 <== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
20764: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
20768: ebffaf9d bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2076c: e3500000 cmp r0, #0 <== NOT EXECUTED
20770: 0affffdb beq 206e4 <rtems_nvdisk_ioctl+0x8c> <== NOT EXECUTED
20774: eaffffd7 b 206d8 <rtems_nvdisk_ioctl+0x80> <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
20778: eb008fb0 bl 44640 <__errno> <== NOT EXECUTED
2077c: e59f34e0 ldr r3, [pc, #1248] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20780: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
20784: e5936004 ldr r6, [r3, #4] <== NOT EXECUTED
20788: e086600c add r6, r6, ip <== NOT EXECUTED
2078c: e1a0b000 mov fp, r0 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
20790: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED
20794: e3500000 cmp r0, #0 <== NOT EXECUTED
20798: 0a0000aa beq 20a48 <rtems_nvdisk_ioctl+0x3f0> <== NOT EXECUTED
2079c: e1a0900a mov r9, sl <== NOT EXECUTED
207a0: e28d701e add r7, sp, #30 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
207a4: e3a08002 mov r8, #2 <== NOT EXECUTED
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
207a8: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
207ac: e083400a add r4, r3, sl <== NOT EXECUTED
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
207b0: e9940006 ldmib r4, {r1, r2} <== NOT EXECUTED
207b4: e1510002 cmp r1, r2 <== NOT EXECUTED
207b8: 0a00009e beq 20a38 <rtems_nvdisk_ioctl+0x3e0> <== NOT EXECUTED
207bc: e3a05000 mov r5, #0 <== NOT EXECUTED
207c0: ea000004 b 207d8 <rtems_nvdisk_ioctl+0x180> <== NOT EXECUTED
207c4: e9940009 ldmib r4, {r0, r3} <== NOT EXECUTED
207c8: e0403003 sub r3, r0, r3 <== NOT EXECUTED
207cc: e1550003 cmp r5, r3 <== NOT EXECUTED
207d0: 2a000097 bcs 20a34 <rtems_nvdisk_ioctl+0x3dc> <== NOT EXECUTED
207d4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
207d8: e5940000 ldr r0, [r4] <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
207dc: e0802100 add r2, r0, r0, lsl #2 <== NOT EXECUTED
207e0: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
207e4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
207e8: e3e0e000 mvn lr, #0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
207ec: e8930006 ldm r3, {r1, r2} <== NOT EXECUTED
207f0: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
207f4: e1cde1be strh lr, [sp, #30] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
207f8: e1a03085 lsl r3, r5, #1 <== NOT EXECUTED
207fc: e88d0180 stm sp, {r7, r8} <== NOT EXECUTED
20800: e1a0e00f mov lr, pc <== NOT EXECUTED
20804: e59cf004 ldr pc, [ip, #4] <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
if (ret)
20808: e3500000 cmp r0, #0 <== NOT EXECUTED
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
2080c: e2855001 add r5, r5, #1 <== NOT EXECUTED
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
if (ret)
20810: 0affffeb beq 207c4 <rtems_nvdisk_ioctl+0x16c> <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
20814: e59f1448 ldr r1, [pc, #1096] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20818: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
2081c: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
20820: e58b0000 str r0, [fp] <== NOT EXECUTED
20824: e0833002 add r3, r3, r2 <== NOT EXECUTED
break;
20828: eaffffcd b 20764 <rtems_nvdisk_ioctl+0x10c> <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
2082c: e59fc430 ldr ip, [pc, #1072] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20830: e59de008 ldr lr, [sp, #8] <== NOT EXECUTED
20834: e59c3004 ldr r3, [ip, #4] <== NOT EXECUTED
20838: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
2083c: e083300e add r3, r3, lr <== NOT EXECUTED
20840: e5830024 str r0, [r3, #36] ; 0x24 <== NOT EXECUTED
break;
20844: eaffffc6 b 20764 <rtems_nvdisk_ioctl+0x10c> <== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
20848: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
2084c: e59e4000 ldr r4, [lr] <== NOT EXECUTED
20850: e3540000 cmp r4, #0 <== NOT EXECUTED
20854: 1a00007d bne 20a50 <rtems_nvdisk_ioctl+0x3f8> <== NOT EXECUTED
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
20858: eb008f78 bl 44640 <__errno> <== NOT EXECUTED
2085c: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
20860: e59f03fc ldr r0, [pc, #1020] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20864: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
20868: e5906004 ldr r6, [r0, #4] <== NOT EXECUTED
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
return ret;
if (crc == 0xffff)
2086c: e3a03801 mov r3, #65536 ; 0x10000 <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
20870: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
20874: e3a0c001 mov ip, #1 <== NOT EXECUTED
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
return ret;
if (crc == 0xffff)
20878: e2433001 sub r3, r3, #1 <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
2087c: e5924010 ldr r4, [r2, #16] <== NOT EXECUTED
20880: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
20884: e0866001 add r6, r6, r1 <== NOT EXECUTED
20888: e2828028 add r8, r2, #40 ; 0x28 <== NOT EXECUTED
2088c: e1a0b003 mov fp, r3 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "read: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20890: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
20894: e2403001 sub r3, r0, #1 <== NOT EXECUTED
20898: e1530004 cmp r3, r4 <== NOT EXECUTED
2089c: 2a0000eb bcs 20c50 <rtems_nvdisk_ioctl+0x5f8> <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
208a0: e518000c ldr r0, [r8, #-12] <== NOT EXECUTED
208a4: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
208a8: eb00ef33 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
208ac: e3500000 cmp r0, #0 <== NOT EXECUTED
208b0: e58d000c str r0, [sp, #12] <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
208b4: e5185008 ldr r5, [r8, #-8] <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
208b8: 0a000075 beq 20a94 <rtems_nvdisk_ioctl+0x43c> <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
208bc: e3a09000 mov r9, #0 <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
208c0: e5187010 ldr r7, [r8, #-16] <== NOT EXECUTED
208c4: e0897007 add r7, r9, r7 <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
208c8: e1a00006 mov r0, r6 <== NOT EXECUTED
208cc: e1a01007 mov r1, r7 <== NOT EXECUTED
208d0: ebffff3d bl 205cc <rtems_nvdisk_get_device> <== NOT EXECUTED
if (!dc)
208d4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
208d8: 0a00003b beq 209cc <rtems_nvdisk_ioctl+0x374> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " read-block:%d=>%02d-%03d, cs:%04x",
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
208dc: e5940000 ldr r0, [r4] <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
208e0: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
208e4: e0802100 add r2, r0, r0, lsl #2 <== NOT EXECUTED
208e8: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
208ec: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
208f0: e594a00c ldr sl, [r4, #12] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
208f4: e8930006 ldm r3, {r1, r2} <== NOT EXECUTED
208f8: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
208fc: e28de01e add lr, sp, #30 <== NOT EXECUTED
20900: e3a03002 mov r3, #2 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
20904: e06aa007 rsb sl, sl, r7 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
20908: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
2090c: e58de000 str lr, [sp] <== NOT EXECUTED
20910: e1a0308a lsl r3, sl, #1 <== NOT EXECUTED
20914: e1a0e00f mov lr, pc <== NOT EXECUTED
20918: e59cf000 ldr pc, [ip] <== NOT EXECUTED
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
2091c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
20920: 1a000037 bne 20a04 <rtems_nvdisk_ioctl+0x3ac> <== NOT EXECUTED
return ret;
if (crc == 0xffff)
20924: e1dd31be ldrh r3, [sp, #30] <== NOT EXECUTED
20928: e153000b cmp r3, fp <== NOT EXECUTED
2092c: 0a000036 beq 20a0c <rtems_nvdisk_ioctl+0x3b4> <== NOT EXECUTED
#endif
memset (buffer, 0, nvd->block_size);
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
20930: e5940000 ldr r0, [r4] <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
20934: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
20938: e0802100 add r2, r0, r0, lsl #2 <== NOT EXECUTED
2093c: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
20940: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
20944: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
rtems_nvdisk_read_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
void* buffer)
{
return rtems_nvdisk_device_read (nvd, device,
20948: e596e00c ldr lr, [r6, #12] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2094c: e08a3003 add r3, sl, r3 <== NOT EXECUTED
20950: e89c0006 ldm ip, {r1, r2} <== NOT EXECUTED
20954: e003039e mul r3, lr, r3 <== NOT EXECUTED
20958: e59cc00c ldr ip, [ip, #12] <== NOT EXECUTED
2095c: e88d4020 stm sp, {r5, lr} <== NOT EXECUTED
20960: e1a0e00f mov lr, pc <== NOT EXECUTED
20964: e59cf000 ldr pc, [ip] <== NOT EXECUTED
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
20968: e2501000 subs r1, r0, #0 <== NOT EXECUTED
2096c: 1a000024 bne 20a04 <rtems_nvdisk_ioctl+0x3ac> <== NOT EXECUTED
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
20970: e596c00c ldr ip, [r6, #12] <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20974: e35c0000 cmp ip, #0 <== NOT EXECUTED
20978: 03a02801 moveq r2, #65536 ; 0x10000 <== NOT EXECUTED
2097c: 02422001 subeq r2, r2, #1 <== NOT EXECUTED
20980: 0a00000b beq 209b4 <rtems_nvdisk_ioctl+0x35c> <== NOT EXECUTED
20984: e59fe2d8 ldr lr, [pc, #728] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20988: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED
2098c: e59e3008 ldr r3, [lr, #8] <== NOT EXECUTED
20990: e2422001 sub r2, r2, #1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20994: e7d50001 ldrb r0, [r5, r1] <== NOT EXECUTED
20998: e0222000 eor r2, r2, r0 <== NOT EXECUTED
2099c: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
209a0: e2811001 add r1, r1, #1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
209a4: e1a02082 lsl r2, r2, #1 <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
209a8: e15c0001 cmp ip, r1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
209ac: e19320b2 ldrh r2, [r3, r2] <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
209b0: 8afffff7 bhi 20994 <rtems_nvdisk_ioctl+0x33c> <== NOT EXECUTED
if (ret)
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
if (cs != crc)
209b4: e1dd31be ldrh r3, [sp, #30] <== NOT EXECUTED
209b8: e1520003 cmp r2, r3 <== NOT EXECUTED
209bc: 0a000016 beq 20a1c <rtems_nvdisk_ioctl+0x3c4> <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
209c0: e1a01007 mov r1, r7 <== NOT EXECUTED
209c4: e59f029c ldr r0, [pc, #668] ; 20c68 <rtems_nvdisk_ioctl+0x610><== NOT EXECUTED
209c8: ebfffedf bl 2054c <rtems_nvdisk_error> <== NOT EXECUTED
209cc: e3a0b005 mov fp, #5 <== NOT EXECUTED
209d0: e3a0101b mov r1, #27 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
209d4: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
209d8: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
209dc: e582100c str r1, [r2, #12] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
209e0: e1a0e00f mov lr, pc <== NOT EXECUTED
209e4: e592f004 ldr pc, [r2, #4] <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
209e8: e59fc274 ldr ip, [pc, #628] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
209ec: e59de018 ldr lr, [sp, #24] <== NOT EXECUTED
209f0: e59c3004 ldr r3, [ip, #4] <== NOT EXECUTED
209f4: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
209f8: e58eb000 str fp, [lr] <== NOT EXECUTED
209fc: e0833000 add r3, r3, r0 <== NOT EXECUTED
break;
20a00: eaffff57 b 20764 <rtems_nvdisk_ioctl+0x10c> <== NOT EXECUTED
20a04: e1a0b001 mov fp, r1 <== NOT EXECUTED
20a08: eafffff0 b 209d0 <rtems_nvdisk_ioctl+0x378> <== NOT EXECUTED
if (crc == 0xffff)
{
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_warning (nvd, "read-block: crc not set: %d", block);
#endif
memset (buffer, 0, nvd->block_size);
20a0c: e1a00005 mov r0, r5 <== NOT EXECUTED
20a10: e596200c ldr r2, [r6, #12] <== NOT EXECUTED
20a14: eb009c40 bl 47b1c <memset> <== NOT EXECUTED
20a18: e596c00c ldr ip, [r6, #12] <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
20a1c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
20a20: e2899001 add r9, r9, #1 <== NOT EXECUTED
20a24: e1530009 cmp r3, r9 <== NOT EXECUTED
20a28: 9a000017 bls 20a8c <rtems_nvdisk_ioctl+0x434> <== NOT EXECUTED
20a2c: e085500c add r5, r5, ip <== NOT EXECUTED
20a30: eaffffa2 b 208c0 <rtems_nvdisk_ioctl+0x268> <== NOT EXECUTED
20a34: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
20a38: e2899001 add r9, r9, #1 <== NOT EXECUTED
20a3c: e1590000 cmp r9, r0 <== NOT EXECUTED
20a40: e28aa014 add sl, sl, #20 <== NOT EXECUTED
20a44: 3affff57 bcc 207a8 <rtems_nvdisk_ioctl+0x150> <== NOT EXECUTED
20a48: e3a00000 mov r0, #0 <== NOT EXECUTED
20a4c: eaffff70 b 20814 <rtems_nvdisk_ioctl+0x1bc> <== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
20a50: e3540001 cmp r4, #1 <== NOT EXECUTED
20a54: 0a000013 beq 20aa8 <rtems_nvdisk_ioctl+0x450> <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
break;
default:
errno = EINVAL;
20a58: eb008ef8 bl 44640 <__errno> <== NOT EXECUTED
20a5c: e59f1200 ldr r1, [pc, #512] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20a60: e3a02016 mov r2, #22 <== NOT EXECUTED
20a64: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
20a68: e5802000 str r2, [r0] <== NOT EXECUTED
20a6c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
20a70: e0833002 add r3, r3, r2 <== NOT EXECUTED
20a74: eaffff3a b 20764 <rtems_nvdisk_ioctl+0x10c> <== NOT EXECUTED
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
{
errno = ENODEV;
20a78: eb008ef0 bl 44640 <__errno> <== NOT EXECUTED
20a7c: e3a03013 mov r3, #19 <== NOT EXECUTED
20a80: e5803000 str r3, [r0] <== NOT EXECUTED
20a84: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
20a88: eaffff1a b 206f8 <rtems_nvdisk_ioctl+0xa0> <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
20a8c: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
20a90: e59c4010 ldr r4, [ip, #16] <== NOT EXECUTED
20a94: e59de014 ldr lr, [sp, #20] <== NOT EXECUTED
20a98: e28ee001 add lr, lr, #1 <== NOT EXECUTED
20a9c: e2888010 add r8, r8, #16 <== NOT EXECUTED
20aa0: e58de014 str lr, [sp, #20] <== NOT EXECUTED
20aa4: eaffff79 b 20890 <rtems_nvdisk_ioctl+0x238> <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
20aa8: eb008ee4 bl 44640 <__errno> <== NOT EXECUTED
20aac: e59f11b0 ldr r1, [pc, #432] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20ab0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
20ab4: e5917004 ldr r7, [r1, #4] <== NOT EXECUTED
20ab8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
20abc: e58d400c str r4, [sp, #12] <== NOT EXECUTED
20ac0: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
20ac4: e5934010 ldr r4, [r3, #16] <== NOT EXECUTED
20ac8: e0877002 add r7, r7, r2 <== NOT EXECUTED
20acc: e283a028 add sl, r3, #40 ; 0x28 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20ad0: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
20ad4: e2413001 sub r3, r1, #1 <== NOT EXECUTED
20ad8: e1540003 cmp r4, r3 <== NOT EXECUTED
20adc: 9a00005e bls 20c5c <rtems_nvdisk_ioctl+0x604> <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
20ae0: e51a000c ldr r0, [sl, #-12] <== NOT EXECUTED
20ae4: e597100c ldr r1, [r7, #12] <== NOT EXECUTED
20ae8: eb00eea3 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
20aec: e250b000 subs fp, r0, #0 <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
20af0: e51a5008 ldr r5, [sl, #-8] <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
20af4: 0a000050 beq 20c3c <rtems_nvdisk_ioctl+0x5e4> <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
20af8: e3a08000 mov r8, #0 <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
20afc: e51a9010 ldr r9, [sl, #-16] <== NOT EXECUTED
20b00: e0889009 add r9, r8, r9 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc;
uint32_t page;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
20b04: e1a00007 mov r0, r7 <== NOT EXECUTED
20b08: e1a01009 mov r1, r9 <== NOT EXECUTED
20b0c: ebfffeae bl 205cc <rtems_nvdisk_get_device> <== NOT EXECUTED
if (!dc)
20b10: e2506000 subs r6, r0, #0 <== NOT EXECUTED
20b14: 0a000022 beq 20ba4 <rtems_nvdisk_ioctl+0x54c> <== NOT EXECUTED
return EIO;
page = rtems_nvdisk_get_page (dc, block);
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
20b18: e597e00c ldr lr, [r7, #12] <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
20b1c: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20b20: e35e0000 cmp lr, #0 <== NOT EXECUTED
20b24: 03a04801 moveq r4, #65536 ; 0x10000 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
20b28: e0639009 rsb r9, r3, r9 <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20b2c: 02444001 subeq r4, r4, #1 <== NOT EXECUTED
20b30: 0a00000c beq 20b68 <rtems_nvdisk_ioctl+0x510> <== NOT EXECUTED
20b34: e59fc128 ldr ip, [pc, #296] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20b38: e3a04801 mov r4, #65536 ; 0x10000 <== NOT EXECUTED
20b3c: e59c1008 ldr r1, [ip, #8] <== NOT EXECUTED
20b40: e2444001 sub r4, r4, #1 <== NOT EXECUTED
20b44: e3a03000 mov r3, #0 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20b48: e7d52003 ldrb r2, [r5, r3] <== NOT EXECUTED
20b4c: e0242002 eor r2, r4, r2 <== NOT EXECUTED
20b50: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20b54: e2833001 add r3, r3, #1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20b58: e1a02082 lsl r2, r2, #1 <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20b5c: e15e0003 cmp lr, r3 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20b60: e19140b2 ldrh r4, [r1, r2] <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
20b64: 8afffff7 bhi 20b48 <rtems_nvdisk_ioctl+0x4f0> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
20b68: e5960000 ldr r0, [r6] <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
20b6c: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
20b70: e0802100 add r2, r0, r0, lsl #2 <== NOT EXECUTED
20b74: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
20b78: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20b7c: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
20b80: e0893003 add r3, r9, r3 <== NOT EXECUTED
20b84: e89c0006 ldm ip, {r1, r2} <== NOT EXECUTED
20b88: e003039e mul r3, lr, r3 <== NOT EXECUTED
20b8c: e59cc00c ldr ip, [ip, #12] <== NOT EXECUTED
20b90: e88d4020 stm sp, {r5, lr} <== NOT EXECUTED
20b94: e1a0e00f mov lr, pc <== NOT EXECUTED
20b98: e59cf004 ldr pc, [ip, #4] <== NOT EXECUTED
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
20b9c: e3500000 cmp r0, #0 <== NOT EXECUTED
20ba0: 0a00000d beq 20bdc <rtems_nvdisk_ioctl+0x584> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20ba4: e3a0101b mov r1, #27 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20ba8: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
20bac: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20bb0: e582100c str r1, [r2, #12] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
20bb4: e1a0e00f mov lr, pc <== NOT EXECUTED
20bb8: e592f004 ldr pc, [r2, #4] <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
20bbc: e59fc0a0 ldr ip, [pc, #160] ; 20c64 <rtems_nvdisk_ioctl+0x60c><== NOT EXECUTED
20bc0: e59de014 ldr lr, [sp, #20] <== NOT EXECUTED
20bc4: e59c3004 ldr r3, [ip, #4] <== NOT EXECUTED
20bc8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
20bcc: e3a02000 mov r2, #0 <== NOT EXECUTED
20bd0: e58e2000 str r2, [lr] <== NOT EXECUTED
20bd4: e0833000 add r3, r3, r0 <== NOT EXECUTED
break;
20bd8: eafffee1 b 20764 <rtems_nvdisk_ioctl+0x10c> <== NOT EXECUTED
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
return ret;
return rtems_nvdisk_write_checksum (nvd, dc->device, page, cs);
20bdc: e5960000 ldr r0, [r6] <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
20be0: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
20be4: e0802100 add r2, r0, r0, lsl #2 <== NOT EXECUTED
20be8: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED
20bec: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20bf0: e28de01e add lr, sp, #30 <== NOT EXECUTED
20bf4: e89c0006 ldm ip, {r1, r2} <== NOT EXECUTED
20bf8: e59cc00c ldr ip, [ip, #12] <== NOT EXECUTED
20bfc: e58de000 str lr, [sp] <== NOT EXECUTED
20c00: e3a0e002 mov lr, #2 <== NOT EXECUTED
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
return ret;
return rtems_nvdisk_write_checksum (nvd, dc->device, page, cs);
20c04: e1cd41be strh r4, [sp, #30] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20c08: e1a03089 lsl r3, r9, #1 <== NOT EXECUTED
20c0c: e58de004 str lr, [sp, #4] <== NOT EXECUTED
20c10: e1a0e00f mov lr, pc <== NOT EXECUTED
20c14: e59cf004 ldr pc, [ip, #4] <== NOT EXECUTED
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
if (ret)
20c18: e3500000 cmp r0, #0 <== NOT EXECUTED
20c1c: 1affffe0 bne 20ba4 <rtems_nvdisk_ioctl+0x54c> <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
20c20: e2888001 add r8, r8, #1 <== NOT EXECUTED
20c24: e15b0008 cmp fp, r8 <== NOT EXECUTED
20c28: e597300c ldr r3, [r7, #12] <== NOT EXECUTED
20c2c: 80855003 addhi r5, r5, r3 <== NOT EXECUTED
20c30: 8affffb1 bhi 20afc <rtems_nvdisk_ioctl+0x4a4> <== NOT EXECUTED
20c34: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
20c38: e5904010 ldr r4, [r0, #16] <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
20c3c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
20c40: e2800001 add r0, r0, #1 <== NOT EXECUTED
20c44: e28aa010 add sl, sl, #16 <== NOT EXECUTED
20c48: e58d000c str r0, [sp, #12] <== NOT EXECUTED
20c4c: eaffff9f b 20ad0 <rtems_nvdisk_ioctl+0x478> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "read: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20c50: e3a0b000 mov fp, #0 <== NOT EXECUTED
20c54: e1a0100b mov r1, fp <== NOT EXECUTED
20c58: eaffff5d b 209d4 <rtems_nvdisk_ioctl+0x37c> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20c5c: e3a01000 mov r1, #0 <== NOT EXECUTED
20c60: eaffffd0 b 20ba8 <rtems_nvdisk_ioctl+0x550> <== NOT EXECUTED
00020fb4 <rtems_nvdisk_sram_read>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
void* buffer,
size_t size)
{
20fb4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
memcpy (buffer, (base + offset), size);
20fb8: e0821003 add r1, r2, r3 <== NOT EXECUTED
20fbc: e99d0005 ldmib sp, {r0, r2} <== NOT EXECUTED
20fc0: eb009a4e bl 47900 <memcpy> <== NOT EXECUTED
return 0;
}
20fc4: e3a00000 mov r0, #0 <== NOT EXECUTED
20fc8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00020f7c <rtems_nvdisk_sram_verify>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
20f7c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return memcmp ((base + offset), buffer, size) == 0 ? 0 : EIO;
20f80: e0820003 add r0, r2, r3 <== NOT EXECUTED
20f84: e99d0006 ldmib sp, {r1, r2} <== NOT EXECUTED
20f88: eb009a32 bl 47858 <memcmp> <== NOT EXECUTED
}
20f8c: e3500000 cmp r0, #0 <== NOT EXECUTED
20f90: 13a00005 movne r0, #5 <== NOT EXECUTED
20f94: 03a00000 moveq r0, #0 <== NOT EXECUTED
20f98: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00020f9c <rtems_nvdisk_sram_write>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
20f9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
memcpy ((base + offset), buffer, size);
20fa0: e0820003 add r0, r2, r3 <== NOT EXECUTED
20fa4: e99d0006 ldmib sp, {r1, r2} <== NOT EXECUTED
20fa8: eb009a54 bl 47900 <memcpy> <== NOT EXECUTED
return 0;
}
20fac: e3a00000 mov r0, #0 <== NOT EXECUTED
20fb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00006d0c <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
6d0c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
6d10: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
6d14: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
6d18: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6d1c: e1a02003 mov r2, r3 <== NOT EXECUTED
6d20: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
6d24: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
6d28: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6d2c: ebffff8d bl 6b68 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
6d30: e28dd004 add sp, sp, #4 <== NOT EXECUTED
6d34: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
6d38: e28dd010 add sp, sp, #16 <== NOT EXECUTED
6d3c: e12fff1e bx lr <== NOT EXECUTED
00009170 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
9170: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if (!rtems_pipe_configured)
9174: e59f3054 ldr r3, [pc, #84] ; 91d0 <rtems_pipe_initialize+0x60>
9178: e5d33000 ldrb r3, [r3]
917c: e3530000 cmp r3, #0
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
9180: e24dd004 sub sp, sp, #4
if (!rtems_pipe_configured)
9184: 0a000003 beq 9198 <rtems_pipe_initialize+0x28>
return;
if (rtems_pipe_semaphore)
9188: e59fc044 ldr ip, [pc, #68] ; 91d4 <rtems_pipe_initialize+0x64><== NOT EXECUTED
918c: e59c3000 ldr r3, [ip] <== NOT EXECUTED
9190: e3530000 cmp r3, #0 <== NOT EXECUTED
9194: 0a000001 beq 91a0 <rtems_pipe_initialize+0x30> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
9198: e28dd004 add sp, sp, #4
919c: e8bd8000 pop {pc}
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
91a0: e59f0030 ldr r0, [pc, #48] ; 91d8 <rtems_pipe_initialize+0x68><== NOT EXECUTED
91a4: e3a01001 mov r1, #1 <== NOT EXECUTED
91a8: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED
91ac: e58dc000 str ip, [sp] <== NOT EXECUTED
91b0: ebfff0e2 bl 5540 <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
91b4: e3500000 cmp r0, #0 <== NOT EXECUTED
91b8: 1a000003 bne 91cc <rtems_pipe_initialize+0x5c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
91bc: ebffefd6 bl 511c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
91c0: e59f3014 ldr r3, [pc, #20] ; 91dc <rtems_pipe_initialize+0x6c><== NOT EXECUTED
91c4: e1c300b0 strh r0, [r3] <== NOT EXECUTED
91c8: eafffff2 b 9198 <rtems_pipe_initialize+0x28> <== NOT EXECUTED
sc = rtems_semaphore_create(
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
91cc: ebfff304 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00043760 <rtems_rfs_bitmap_close>:
return rtems_rfs_bitmap_create_search (control);
}
int
rtems_rfs_bitmap_close (rtems_rfs_bitmap_control* control)
{
43760: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
free (control->search_bits);
43764: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
43768: ebff1180 bl 7d70 <free> <== NOT EXECUTED
return 0;
}
4376c: e3a00000 mov r0, #0 <== NOT EXECUTED
43770: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000437c4 <rtems_rfs_bitmap_create_search>:
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
437c4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
437c8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
437cc: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
437d0: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
437d4: ebffffe6 bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
437d8: e3500000 cmp r0, #0 <== NOT EXECUTED
437dc: da000001 ble 437e8 <rtems_rfs_bitmap_create_search+0x24> <== NOT EXECUTED
bit++;
map++;
}
return 0;
}
437e0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
437e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
437e8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
437ec: e594b014 ldr fp, [r4, #20] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
437f0: e3a06000 mov r6, #0 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
437f4: e3e09000 mvn r9, #0 <== NOT EXECUTED
while (size)
437f8: e3500000 cmp r0, #0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
437fc: e5846010 str r6, [r4, #16] <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43800: e58b9000 str r9, [fp] <== NOT EXECUTED
while (size)
43804: 0a00001d beq 43880 <rtems_rfs_bitmap_create_search+0xbc> <== NOT EXECUTED
43808: e59da000 ldr sl, [sp] <== NOT EXECUTED
4380c: e1a07006 mov r7, r6 <== NOT EXECUTED
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
43810: e3a0c001 mov ip, #1 <== NOT EXECUTED
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
43814: e350001f cmp r0, #31 <== NOT EXECUTED
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
43818: 979a3006 ldrls r3, [sl, r6] <== NOT EXECUTED
4381c: 92602020 rsbls r2, r0, #32 <== NOT EXECUTED
43820: 90032239 andls r2, r3, r9, lsr r2 <== NOT EXECUTED
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
43824: 879a2006 ldrhi r2, [sl, r6] <== NOT EXECUTED
43828: 83a08020 movhi r8, #32 <== NOT EXECUTED
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
4382c: 91a01000 movls r1, r0 <== NOT EXECUTED
43830: 91a08000 movls r8, r0 <== NOT EXECUTED
}
else
{
bits = *map;
43834: 81a01008 movhi r1, r8 <== NOT EXECUTED
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
43838: e3520000 cmp r2, #0 <== NOT EXECUTED
4383c: 0a000007 beq 43860 <rtems_rfs_bitmap_create_search+0x9c> <== NOT EXECUTED
43840: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
43844: e012531c ands r5, r2, ip, lsl r3 <== NOT EXECUTED
control->free++;
43848: 15945010 ldrne r5, [r4, #16] <== NOT EXECUTED
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
4384c: e2833001 add r3, r3, #1 <== NOT EXECUTED
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
43850: 12855001 addne r5, r5, #1 <== NOT EXECUTED
43854: 15845010 strne r5, [r4, #16] <== NOT EXECUTED
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
43858: e1510003 cmp r1, r3 <== NOT EXECUTED
4385c: cafffff8 bgt 43844 <rtems_rfs_bitmap_create_search+0x80> <== NOT EXECUTED
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
43860: e3570020 cmp r7, #32 <== NOT EXECUTED
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
43864: e0680000 rsb r0, r8, r0 <== NOT EXECUTED
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43868: 05ab9004 streq r9, [fp, #4]! <== NOT EXECUTED
4386c: 03a07000 moveq r7, #0 <== NOT EXECUTED
}
else
bit++;
43870: 12877001 addne r7, r7, #1 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
43874: e3500000 cmp r0, #0 <== NOT EXECUTED
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
43878: e2866004 add r6, r6, #4 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
4387c: 1affffe4 bne 43814 <rtems_rfs_bitmap_create_search+0x50> <== NOT EXECUTED
43880: e3a00000 mov r0, #0 <== NOT EXECUTED
43884: eaffffd5 b 437e0 <rtems_rfs_bitmap_create_search+0x1c> <== NOT EXECUTED
00043774 <rtems_rfs_bitmap_load_map>:
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
43774: e5903000 ldr r3, [r0] <== NOT EXECUTED
43778: e3530000 cmp r3, #0 <== NOT EXECUTED
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
4377c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
43780: e1a04000 mov r4, r0 <== NOT EXECUTED
43784: e1a05001 mov r5, r1 <== NOT EXECUTED
int rc;
if (!control->buffer)
43788: 03a00006 moveq r0, #6 <== NOT EXECUTED
4378c: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
return ENXIO;
*map = NULL;
43790: e3a02000 mov r2, #0 <== NOT EXECUTED
43794: e5812000 str r2, [r1] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (control->fs,
43798: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
4379c: e1a01003 mov r1, r3 <== NOT EXECUTED
437a0: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
437a4: e3a03001 mov r3, #1 <== NOT EXECUTED
437a8: ebffdb5d bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
control->buffer,
control->block,
true);
if (rc)
437ac: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
437b0: 05943000 ldreq r3, [r4] <== NOT EXECUTED
437b4: 05933008 ldreq r3, [r3, #8] <== NOT EXECUTED
437b8: 05933020 ldreq r3, [r3, #32] <== NOT EXECUTED
437bc: 05853000 streq r3, [r5] <== NOT EXECUTED
return 0;
}
437c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00043e5c <rtems_rfs_bitmap_map_alloc>:
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
43e5c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
43e60: e1a07002 mov r7, r2 <== NOT EXECUTED
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
43e64: e3a02000 mov r2, #0 <== NOT EXECUTED
43e68: e1a05001 mov r5, r1 <== NOT EXECUTED
43e6c: e5c72000 strb r2, [r7] <== NOT EXECUTED
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
43e70: e1a06000 mov r6, r0 <== NOT EXECUTED
43e74: e1a08003 mov r8, r3 <== NOT EXECUTED
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
43e78: e1a04001 mov r4, r1 <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
43e7c: ea000011 b 43ec8 <rtems_rfs_bitmap_map_alloc+0x6c> <== NOT EXECUTED
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
43e80: e5884000 str r4, [r8] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
43e84: e1a00006 mov r0, r6 <== NOT EXECUTED
43e88: e1a01008 mov r1, r8 <== NOT EXECUTED
43e8c: e1a02007 mov r2, r7 <== NOT EXECUTED
43e90: e3a03001 mov r3, #1 <== NOT EXECUTED
43e94: ebffff3f bl 43b98 <T.57> <== NOT EXECUTED
window, 1);
if ((rc > 0) || *allocated)
43e98: e3500000 cmp r0, #0 <== NOT EXECUTED
43e9c: ca000020 bgt 43f24 <rtems_rfs_bitmap_map_alloc+0xc8> <== NOT EXECUTED
43ea0: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
43ea4: e3530000 cmp r3, #0 <== NOT EXECUTED
43ea8: 1a00001d bne 43f24 <rtems_rfs_bitmap_map_alloc+0xc8> <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
43eac: e3550000 cmp r5, #0 <== NOT EXECUTED
43eb0: aa000010 bge 43ef8 <rtems_rfs_bitmap_map_alloc+0x9c> <== NOT EXECUTED
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
43eb4: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
43eb8: e1530004 cmp r3, r4 <== NOT EXECUTED
upper_seed += window;
43ebc: 82844b02 addhi r4, r4, #2048 ; 0x800 <== NOT EXECUTED
if (lower_seed >= 0)
43ec0: e3550000 cmp r5, #0 <== NOT EXECUTED
lower_seed -= window;
43ec4: a2455b02 subge r5, r5, #2048 ; 0x800 <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
43ec8: e3540000 cmp r4, #0 <== NOT EXECUTED
43ecc: ba000002 blt 43edc <rtems_rfs_bitmap_map_alloc+0x80> <== NOT EXECUTED
43ed0: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
43ed4: e1540003 cmp r4, r3 <== NOT EXECUTED
43ed8: 3affffe8 bcc 43e80 <rtems_rfs_bitmap_map_alloc+0x24> <== NOT EXECUTED
43edc: e3550000 cmp r5, #0 <== NOT EXECUTED
43ee0: ba00000f blt 43f24 <rtems_rfs_bitmap_map_alloc+0xc8> <== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
43ee4: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
43ee8: e1550003 cmp r5, r3 <== NOT EXECUTED
43eec: 2a00000c bcs 43f24 <rtems_rfs_bitmap_map_alloc+0xc8> <== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
43ef0: e1540003 cmp r4, r3 <== NOT EXECUTED
43ef4: 3affffe1 bcc 43e80 <rtems_rfs_bitmap_map_alloc+0x24> <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
43ef8: e5885000 str r5, [r8] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
43efc: e1a00006 mov r0, r6 <== NOT EXECUTED
43f00: e1a01008 mov r1, r8 <== NOT EXECUTED
43f04: e1a02007 mov r2, r7 <== NOT EXECUTED
43f08: e3e03000 mvn r3, #0 <== NOT EXECUTED
43f0c: ebffff21 bl 43b98 <T.57> <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
43f10: e3500000 cmp r0, #0 <== NOT EXECUTED
43f14: ca000002 bgt 43f24 <rtems_rfs_bitmap_map_alloc+0xc8> <== NOT EXECUTED
43f18: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
43f1c: e3530000 cmp r3, #0 <== NOT EXECUTED
43f20: 0affffe3 beq 43eb4 <rtems_rfs_bitmap_map_alloc+0x58> <== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
43f24: e3a00000 mov r0, #0 <== NOT EXECUTED
43f28: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00043a80 <rtems_rfs_bitmap_map_clear>:
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
43a80: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
43a84: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
43a88: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43a8c: e1a0100d mov r1, sp <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
43a90: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43a94: ebffff36 bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
43a98: e3500000 cmp r0, #0 <== NOT EXECUTED
43a9c: da000001 ble 43aa8 <rtems_rfs_bitmap_map_clear+0x28> <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
}
43aa0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
43aa4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
43aa8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
43aac: e1550003 cmp r5, r3 <== NOT EXECUTED
43ab0: 23a00016 movcs r0, #22 <== NOT EXECUTED
43ab4: 2afffff9 bcs 43aa0 <rtems_rfs_bitmap_map_clear+0x20> <== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
43ab8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
43abc: e1a022c5 asr r2, r5, #5 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
43ac0: e7910102 ldr r0, [r1, r2, lsl #2] <== NOT EXECUTED
43ac4: e3a03001 mov r3, #1 <== NOT EXECUTED
43ac8: e205c01f and ip, r5, #31 <== NOT EXECUTED
43acc: e1800c13 orr r0, r0, r3, lsl ip <== NOT EXECUTED
43ad0: e7810102 str r0, [r1, r2, lsl #2] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
43ad4: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
43ad8: e1a05545 asr r5, r5, #10 <== NOT EXECUTED
43adc: e7910105 ldr r0, [r1, r5, lsl #2] <== NOT EXECUTED
43ae0: e202201f and r2, r2, #31 <== NOT EXECUTED
43ae4: e1802213 orr r2, r0, r3, lsl r2 <== NOT EXECUTED
43ae8: e7812105 str r2, [r1, r5, lsl #2] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
43aec: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
43af0: e5941000 ldr r1, [r4] <== NOT EXECUTED
control->free++;
43af4: e0822003 add r2, r2, r3 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
43af8: e5c13000 strb r3, [r1] <== NOT EXECUTED
control->free++;
43afc: e5842010 str r2, [r4, #16] <== NOT EXECUTED
43b00: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
43b04: eaffffe5 b 43aa0 <rtems_rfs_bitmap_map_clear+0x20> <== NOT EXECUTED
000438d0 <rtems_rfs_bitmap_map_clear_all>:
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
438d0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
438d4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
438d8: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
438dc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
438e0: ebffffa3 bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
438e4: e3500000 cmp r0, #0 <== NOT EXECUTED
438e8: da000001 ble 438f4 <rtems_rfs_bitmap_map_clear_all+0x24> <== NOT EXECUTED
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
438ec: e28dd004 add sp, sp, #4 <== NOT EXECUTED
438f0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
438f4: e594500c ldr r5, [r4, #12] <== NOT EXECUTED
438f8: e2455001 sub r5, r5, #1 <== NOT EXECUTED
438fc: e1a052a5 lsr r5, r5, #5 <== NOT EXECUTED
43900: e2851001 add r1, r5, #1 <== NOT EXECUTED
control->free = elements;
43904: e3a02000 mov r2, #0 <== NOT EXECUTED
43908: e5841010 str r1, [r4, #16] <== NOT EXECUTED
4390c: e59dc000 ldr ip, [sp] <== NOT EXECUTED
43910: e1a03002 mov r3, r2 <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43914: e3e00000 mvn r0, #0 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
43918: e2833001 add r3, r3, #1 <== NOT EXECUTED
4391c: e1510003 cmp r1, r3 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43920: e78c0102 str r0, [ip, r2, lsl #2] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
43924: e1a02003 mov r2, r3 <== NOT EXECUTED
43928: 8afffffa bhi 43918 <rtems_rfs_bitmap_map_clear_all+0x48> <== NOT EXECUTED
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
4392c: e211101f ands r1, r1, #31 <== NOT EXECUTED
43930: 12611020 rsbne r1, r1, #32 <== NOT EXECUTED
43934: 01a06000 moveq r6, r0 <== NOT EXECUTED
43938: 11a06130 lsrne r6, r0, r1 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
4393c: e1b012a5 lsrs r1, r5, #5 <== NOT EXECUTED
43940: 05940014 ldreq r0, [r4, #20] <== NOT EXECUTED
43944: 0a000008 beq 4396c <rtems_rfs_bitmap_map_clear_all+0x9c> <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
43948: e3a02000 mov r2, #0 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
4394c: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
43950: e1a03002 mov r3, r2 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43954: e3e0c000 mvn ip, #0 <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
43958: e2833001 add r3, r3, #1 <== NOT EXECUTED
4395c: e1530001 cmp r3, r1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
43960: e780c102 str ip, [r0, r2, lsl #2] <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
43964: e1a02003 mov r2, r3 <== NOT EXECUTED
43968: 1afffffa bne 43958 <rtems_rfs_bitmap_map_clear_all+0x88> <== NOT EXECUTED
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
4396c: e5943000 ldr r3, [r4] <== NOT EXECUTED
43970: e3a02001 mov r2, #1 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
43974: e7806101 str r6, [r0, r1, lsl #2] <== NOT EXECUTED
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
43978: e5c32000 strb r2, [r3] <== NOT EXECUTED
4397c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
43980: eaffffd9 b 438ec <rtems_rfs_bitmap_map_clear_all+0x1c> <== NOT EXECUTED
00043b08 <rtems_rfs_bitmap_map_set>:
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
43b08: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
43b0c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
43b10: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43b14: e1a0100d mov r1, sp <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
43b18: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43b1c: ebffff14 bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
43b20: e3500000 cmp r0, #0 <== NOT EXECUTED
43b24: da000001 ble 43b30 <rtems_rfs_bitmap_map_set+0x28> <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
43b28: e28dd004 add sp, sp, #4 <== NOT EXECUTED
43b2c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
43b30: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
43b34: e1550003 cmp r5, r3 <== NOT EXECUTED
43b38: 23a00016 movcs r0, #22 <== NOT EXECUTED
43b3c: 2afffff9 bcs 43b28 <rtems_rfs_bitmap_map_set+0x20> <== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
43b40: e59d1000 ldr r1, [sp] <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
43b44: e1a032c5 asr r3, r5, #5 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
43b48: e7910103 ldr r0, [r1, r3, lsl #2] <== NOT EXECUTED
43b4c: e205c01f and ip, r5, #31 <== NOT EXECUTED
43b50: e3a02001 mov r2, #1 <== NOT EXECUTED
43b54: e1c00c12 bic r0, r0, r2, lsl ip <== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
43b58: e3500000 cmp r0, #0 <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
43b5c: e7810103 str r0, [r1, r3, lsl #2] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
43b60: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
43b64: 13a00000 movne r0, #0 <== NOT EXECUTED
43b68: 1affffee bne 43b28 <rtems_rfs_bitmap_map_set+0x20> <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
43b6c: e1a05545 asr r5, r5, #10 <== NOT EXECUTED
43b70: e791c105 ldr ip, [r1, r5, lsl #2] <== NOT EXECUTED
43b74: e203301f and r3, r3, #31 <== NOT EXECUTED
43b78: e1cc3312 bic r3, ip, r2, lsl r3 <== NOT EXECUTED
43b7c: e7813105 str r3, [r1, r5, lsl #2] <== NOT EXECUTED
control->free--;
43b80: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
43b84: e5941000 ldr r1, [r4] <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
43b88: e2433001 sub r3, r3, #1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
43b8c: e5c12000 strb r2, [r1] <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
43b90: e5843010 str r3, [r4, #16] <== NOT EXECUTED
43b94: eaffffe3 b 43b28 <rtems_rfs_bitmap_map_set+0x20> <== NOT EXECUTED
00043984 <rtems_rfs_bitmap_map_set_all>:
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
43984: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
43988: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
4398c: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
43990: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43994: ebffff76 bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
43998: e3500000 cmp r0, #0 <== NOT EXECUTED
4399c: da000001 ble 439a8 <rtems_rfs_bitmap_map_set_all+0x24> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
439a0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
439a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
439a8: e594500c ldr r5, [r4, #12] <== NOT EXECUTED
control->free = 0;
439ac: e3a03000 mov r3, #0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
439b0: e2455001 sub r5, r5, #1 <== NOT EXECUTED
439b4: e1a052a5 lsr r5, r5, #5 <== NOT EXECUTED
control->free = 0;
439b8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
439bc: e59dc000 ldr ip, [sp] <== NOT EXECUTED
439c0: e1a02003 mov r2, r3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
439c4: e2850001 add r0, r5, #1 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
439c8: e1a01003 mov r1, r3 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
439cc: e2833001 add r3, r3, #1 <== NOT EXECUTED
439d0: e1500003 cmp r0, r3 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
439d4: e78c1102 str r1, [ip, r2, lsl #2] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
439d8: e1a02003 mov r2, r3 <== NOT EXECUTED
439dc: 8afffffa bhi 439cc <rtems_rfs_bitmap_map_set_all+0x48> <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
439e0: e1a02001 mov r2, r1 <== NOT EXECUTED
439e4: e594c014 ldr ip, [r4, #20] <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
439e8: e1a012a5 lsr r1, r5, #5 <== NOT EXECUTED
439ec: e2811001 add r1, r1, #1 <== NOT EXECUTED
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
439f0: e1a03002 mov r3, r2 <== NOT EXECUTED
439f4: e1a00002 mov r0, r2 <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
439f8: e2833001 add r3, r3, #1 <== NOT EXECUTED
439fc: e1530001 cmp r3, r1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
43a00: e78c0102 str r0, [ip, r2, lsl #2] <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
43a04: e1a02003 mov r2, r3 <== NOT EXECUTED
43a08: 3afffffa bcc 439f8 <rtems_rfs_bitmap_map_set_all+0x74> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
43a0c: e5943000 ldr r3, [r4] <== NOT EXECUTED
43a10: e3a02001 mov r2, #1 <== NOT EXECUTED
43a14: e5c32000 strb r2, [r3] <== NOT EXECUTED
return 0;
43a18: eaffffe0 b 439a0 <rtems_rfs_bitmap_map_set_all+0x1c> <== NOT EXECUTED
00043a1c <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
43a1c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
43a20: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
43a24: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43a28: e1a0100d mov r1, sp <== NOT EXECUTED
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
43a2c: e1a06002 mov r6, r2 <== NOT EXECUTED
43a30: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
43a34: ebffff4e bl 43774 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
43a38: e3500000 cmp r0, #0 <== NOT EXECUTED
43a3c: da000001 ble 43a48 <rtems_rfs_bitmap_map_test+0x2c> <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
43a40: e28dd004 add sp, sp, #4 <== NOT EXECUTED
43a44: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
43a48: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
43a4c: e1540003 cmp r4, r3 <== NOT EXECUTED
43a50: 23a00016 movcs r0, #22 <== NOT EXECUTED
43a54: 2afffff9 bcs 43a40 <rtems_rfs_bitmap_map_test+0x24> <== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
43a58: e59d3000 ldr r3, [sp] <== NOT EXECUTED
43a5c: e1a022c4 asr r2, r4, #5 <== NOT EXECUTED
43a60: e7933102 ldr r3, [r3, r2, lsl #2] <== NOT EXECUTED
43a64: e3a02001 mov r2, #1 <== NOT EXECUTED
43a68: e0133412 ands r3, r3, r2, lsl r4 <== NOT EXECUTED
43a6c: 13a03000 movne r3, #0 <== NOT EXECUTED
43a70: 03a03001 moveq r3, #1 <== NOT EXECUTED
43a74: e5c63000 strb r3, [r6] <== NOT EXECUTED
43a78: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
43a7c: eaffffef b 43a40 <rtems_rfs_bitmap_map_test+0x24> <== NOT EXECUTED
00043730 <rtems_rfs_bitmap_mask>:
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
43730: e3e03000 mvn r3, #0 <== NOT EXECUTED
43734: e2600020 rsb r0, r0, #32 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
return mask;
}
43738: e1a00033 lsr r0, r3, r0 <== NOT EXECUTED
4373c: e12fff1e bx lr <== NOT EXECUTED
00043740 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
43740: e1510000 cmp r1, r0 <== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
43744: 80601001 rsbhi r1, r0, r1 <== NOT EXECUTED
43748: 82611020 rsbhi r1, r1, #32 <== NOT EXECUTED
4374c: 83e03000 mvnhi r3, #0 <== NOT EXECUTED
43750: 81a01133 lsrhi r1, r3, r1 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
43754: 93a00000 movls r0, #0 <== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
43758: 81a00011 lslhi r0, r1, r0 <== NOT EXECUTED
return mask;
}
4375c: e12fff1e bx lr <== NOT EXECUTED
00043888 <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
43888: e92d4010 push {r4, lr} <== NOT EXECUTED
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
4388c: e243c001 sub ip, r3, #1 <== NOT EXECUTED
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
43890: e1a04000 mov r4, r0 <== NOT EXECUTED
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
43894: e1a0c52c lsr ip, ip, #10 <== NOT EXECUTED
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
43898: e5842000 str r2, [r4] <== NOT EXECUTED
control->fs = fs;
control->block = block;
4389c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
438a0: e28c0001 add r0, ip, #1 <== NOT EXECUTED
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
control->fs = fs;
438a4: e984000e stmib r4, {r1, r2, r3} <== NOT EXECUTED
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
438a8: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
438ac: ebff12f3 bl 8480 <malloc> <== NOT EXECUTED
if (!control->search_bits)
438b0: e3500000 cmp r0, #0 <== NOT EXECUTED
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
438b4: e5840014 str r0, [r4, #20] <== NOT EXECUTED
if (!control->search_bits)
438b8: 0a000002 beq 438c8 <rtems_rfs_bitmap_open+0x40> <== NOT EXECUTED
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
438bc: e1a00004 mov r0, r4 <== NOT EXECUTED
}
438c0: e8bd4010 pop {r4, lr} <== NOT EXECUTED
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
if (!control->search_bits)
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
438c4: eaffffbe b 437c4 <rtems_rfs_bitmap_create_search> <== NOT EXECUTED
}
438c8: e3a0000c mov r0, #12 <== NOT EXECUTED
438cc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000393d4 <rtems_rfs_block_find_indirect>:
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
393d4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
393d8: e1a04003 mov r4, r3 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
393dc: e3a03001 mov r3, #1 <== NOT EXECUTED
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
393e0: e1a06000 mov r6, r0 <== NOT EXECUTED
393e4: e1a07001 mov r7, r1 <== NOT EXECUTED
393e8: e59d5014 ldr r5, [sp, #20] <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
393ec: eb00044c bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
393f0: e3500000 cmp r0, #0 <== NOT EXECUTED
393f4: c8bd80f0 popgt {r4, r5, r6, r7, pc} <== NOT EXECUTED
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
393f8: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
393fc: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
39400: e0821104 add r1, r2, r4, lsl #2 <== NOT EXECUTED
39404: e7d20104 ldrb r0, [r2, r4, lsl #2] <== NOT EXECUTED
39408: e5d13003 ldrb r3, [r1, #3] <== NOT EXECUTED
3940c: e1a04001 mov r4, r1 <== NOT EXECUTED
39410: e5d11001 ldrb r1, [r1, #1] <== NOT EXECUTED
39414: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED
39418: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
3941c: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
39420: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
if ((*result + 1) == 0)
39424: e3730001 cmn r3, #1 <== NOT EXECUTED
39428: 03a03000 moveq r3, #0 <== NOT EXECUTED
3942c: e5853000 str r3, [r5] <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
39430: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED
39434: e1530002 cmp r3, r2 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
39438: 23a00000 movcs r0, #0 <== NOT EXECUTED
*result = rtems_rfs_block_get_number (buffer, offset);
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
3943c: 33a00000 movcc r0, #0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
39440: 25850000 strcs r0, [r5] <== NOT EXECUTED
rc = EIO;
}
return 0;
}
39444: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00039330 <rtems_rfs_block_get_block_size>:
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
39330: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
39334: e1a04002 mov r4, r2 <== NOT EXECUTED
if (pos == 0)
39338: e1912002 orrs r2, r1, r2 <== NOT EXECUTED
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
3933c: e1a05001 mov r5, r1 <== NOT EXECUTED
39340: e1a06003 mov r6, r3 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
size->offset = 0;
39344: 05832004 streq r2, [r3, #4] <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
39348: 05832000 streq r2, [r3] <== NOT EXECUTED
if (pos == 0)
3934c: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
39350: e5907008 ldr r7, [r0, #8] <== NOT EXECUTED
39354: e3a03000 mov r3, #0 <== NOT EXECUTED
39358: e1a02007 mov r2, r7 <== NOT EXECUTED
3935c: e1a00001 mov r0, r1 <== NOT EXECUTED
39360: e1a01004 mov r1, r4 <== NOT EXECUTED
39364: eb009090 bl 5d5ac <__udivdi3> <== NOT EXECUTED
39368: e2800001 add r0, r0, #1 <== NOT EXECUTED
3936c: e5860000 str r0, [r6] <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
39370: e1a01004 mov r1, r4 <== NOT EXECUTED
39374: e1a00005 mov r0, r5 <== NOT EXECUTED
39378: e1a02007 mov r2, r7 <== NOT EXECUTED
3937c: e3a03000 mov r3, #0 <== NOT EXECUTED
39380: eb00919a bl 5d9f0 <__umoddi3> <== NOT EXECUTED
39384: e5860004 str r0, [r6, #4] <== NOT EXECUTED
39388: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000392d0 <rtems_rfs_block_get_bpos>:
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
392d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
392d4: e5906008 ldr r6, [r0, #8] <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
392d8: e1a08002 mov r8, r2 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
392dc: e3a05000 mov r5, #0 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
392e0: e1a04003 mov r4, r3 <== NOT EXECUTED
392e4: e1a07001 mov r7, r1 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
392e8: e1a02006 mov r2, r6 <== NOT EXECUTED
392ec: e1a03005 mov r3, r5 <== NOT EXECUTED
392f0: e1a00001 mov r0, r1 <== NOT EXECUTED
392f4: e1a01008 mov r1, r8 <== NOT EXECUTED
392f8: eb0090ab bl 5d5ac <__udivdi3> <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
392fc: e1a02006 mov r2, r6 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
39300: e5840000 str r0, [r4] <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
39304: e1a01008 mov r1, r8 <== NOT EXECUTED
39308: e1a00007 mov r0, r7 <== NOT EXECUTED
3930c: e1a03005 mov r3, r5 <== NOT EXECUTED
39310: eb0091b6 bl 5d9f0 <__umoddi3> <== NOT EXECUTED
39314: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
39318: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003931c <rtems_rfs_block_get_pos>:
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
3931c: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
39320: e8910009 ldm r1, {r0, r3} <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
39324: e3a01000 mov r1, #0 <== NOT EXECUTED
39328: e0203092 mla r0, r2, r0, r3 <== NOT EXECUTED
3932c: e12fff1e bx lr <== NOT EXECUTED
0003938c <rtems_rfs_block_get_size>:
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
3938c: e5912000 ldr r2, [r1] <== NOT EXECUTED
39390: e3520000 cmp r2, #0 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
39394: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
39398: 03a03000 moveq r3, #0 <== NOT EXECUTED
3939c: 03a04000 moveq r4, #0 <== NOT EXECUTED
393a0: 0a000007 beq 393c4 <rtems_rfs_block_get_size+0x38> <== NOT EXECUTED
return 0;
if (size->offset == 0)
393a4: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
393a8: e3530000 cmp r3, #0 <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
393ac: 05903008 ldreq r3, [r0, #8] <== NOT EXECUTED
{
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
return 0;
if (size->offset == 0)
393b0: 15901008 ldrne r1, [r0, #8] <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
393b4: 01a01003 moveq r1, r3 <== NOT EXECUTED
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
393b8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
393bc: e3a04000 mov r4, #0 <== NOT EXECUTED
393c0: e0a43192 umlal r3, r4, r2, r1 <== NOT EXECUTED
}
393c4: e1a01004 mov r1, r4 <== NOT EXECUTED
393c8: e1a00003 mov r0, r3 <== NOT EXECUTED
393cc: e8bd0010 pop {r4} <== NOT EXECUTED
393d0: e12fff1e bx lr <== NOT EXECUTED
00039f04 <rtems_rfs_block_map_close>:
rtems_rfs_block_map* map)
{
int rc = 0;
int brc;
if (map->dirty && map->inode)
39f04: e5d13000 ldrb r3, [r1] <== NOT EXECUTED
39f08: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
39f0c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
39f10: e1a04001 mov r4, r1 <== NOT EXECUTED
39f14: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = 0;
int brc;
if (map->dirty && map->inode)
39f18: 0a000015 beq 39f74 <rtems_rfs_block_map_close+0x70> <== NOT EXECUTED
39f1c: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
39f20: e3510000 cmp r1, #0 <== NOT EXECUTED
39f24: 0a000012 beq 39f74 <rtems_rfs_block_map_close+0x70> <== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
39f28: eb000f69 bl 3dcd4 <rtems_rfs_inode_load> <== NOT EXECUTED
if (brc > 0)
39f2c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
39f30: da000011 ble 39f7c <rtems_rfs_block_map_close+0x78> <== NOT EXECUTED
map->dirty = false;
}
}
map->inode = NULL;
39f34: e3a06000 mov r6, #0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
39f38: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
39f3c: e5846004 str r6, [r4, #4] <== NOT EXECUTED
39f40: e1a00005 mov r0, r5 <== NOT EXECUTED
39f44: eb00012c bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
39f48: e5c46038 strb r6, [r4, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
39f4c: e584603c str r6, [r4, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
39f50: e5846040 str r6, [r4, #64] ; 0x40 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
39f54: e1a00005 mov r0, r5 <== NOT EXECUTED
39f58: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
39f5c: eb000126 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
39f60: e584604c str r6, [r4, #76] ; 0x4c <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
39f64: e5c46044 strb r6, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
39f68: e5846048 str r6, [r4, #72] ; 0x48 <== NOT EXECUTED
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
39f6c: e1a00007 mov r0, r7 <== NOT EXECUTED
39f70: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
brc = rtems_rfs_inode_unload (fs, map->inode, true);
if (brc > 0)
rc = brc;
map->dirty = false;
39f74: e3a07000 mov r7, #0 <== NOT EXECUTED
39f78: eaffffed b 39f34 <rtems_rfs_block_map_close+0x30> <== NOT EXECUTED
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
39f7c: e1a00004 mov r0, r4 <== NOT EXECUTED
39f80: e3a03000 mov r3, #0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
39f84: e3a06001 mov r6, #1 <== NOT EXECUTED
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
39f88: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
39f8c: e5901024 ldr r1, [r0, #36] ; 0x24 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
39f90: e592c00c ldr ip, [r2, #12] <== NOT EXECUTED
39f94: e1a0ec21 lsr lr, r1, #24 <== NOT EXECUTED
39f98: e08cc003 add ip, ip, r3 <== NOT EXECUTED
39f9c: e5cce01c strb lr, [ip, #28] <== NOT EXECUTED
39fa0: e592c00c ldr ip, [r2, #12] <== NOT EXECUTED
39fa4: e1a0e821 lsr lr, r1, #16 <== NOT EXECUTED
39fa8: e08cc003 add ip, ip, r3 <== NOT EXECUTED
39fac: e5cce01d strb lr, [ip, #29] <== NOT EXECUTED
39fb0: e592c00c ldr ip, [r2, #12] <== NOT EXECUTED
39fb4: e1a0e421 lsr lr, r1, #8 <== NOT EXECUTED
39fb8: e08cc003 add ip, ip, r3 <== NOT EXECUTED
39fbc: e5cce01e strb lr, [ip, #30] <== NOT EXECUTED
39fc0: e592c00c ldr ip, [r2, #12] <== NOT EXECUTED
39fc4: e08cc003 add ip, ip, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
39fc8: e2833004 add r3, r3, #4 <== NOT EXECUTED
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
39fcc: e3530014 cmp r3, #20 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
39fd0: e5cc101f strb r1, [ip, #31] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
39fd4: e2800004 add r0, r0, #4 <== NOT EXECUTED
39fd8: e5c26010 strb r6, [r2, #16] <== NOT EXECUTED
39fdc: e3a02001 mov r2, #1 <== NOT EXECUTED
39fe0: 1affffe8 bne 39f88 <rtems_rfs_block_map_close+0x84> <== NOT EXECUTED
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
39fe4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
39fe8: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
39fec: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
39ff0: e1a0cc21 lsr ip, r1, #24 <== NOT EXECUTED
39ff4: e5c0c00c strb ip, [r0, #12] <== NOT EXECUTED
39ff8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
39ffc: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED
3a000: e5c0c00d strb ip, [r0, #13] <== NOT EXECUTED
3a004: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
3a008: e1a0c421 lsr ip, r1, #8 <== NOT EXECUTED
3a00c: e5c0c00e strb ip, [r0, #14] <== NOT EXECUTED
3a010: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
3a014: e5c0100f strb r1, [r0, #15] <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
3a018: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
3a01c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
3a020: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED
3a024: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3a028: e1a0ec21 lsr lr, r1, #24 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3a02c: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
3a030: e5cce00a strb lr, [ip, #10] <== NOT EXECUTED
3a034: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
3a038: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
3a03c: e5c3100b strb r1, [r3, #11] <== NOT EXECUTED
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
3a040: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
3a044: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
3a048: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
3a04c: e1a0ec23 lsr lr, r3, #24 <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3a050: e5c02010 strb r2, [r0, #16] <== NOT EXECUTED
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
3a054: e5cce030 strb lr, [ip, #48] ; 0x30 <== NOT EXECUTED
3a058: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
3a05c: e1a0c823 lsr ip, r3, #16 <== NOT EXECUTED
3a060: e5c0c031 strb ip, [r0, #49] ; 0x31 <== NOT EXECUTED
3a064: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
3a068: e1a0c423 lsr ip, r3, #8 <== NOT EXECUTED
3a06c: e5c0c032 strb ip, [r0, #50] ; 0x32 <== NOT EXECUTED
3a070: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
3a074: e5c03033 strb r3, [r0, #51] ; 0x33 <== NOT EXECUTED
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
3a078: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
3a07c: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
3a080: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
3a084: e1a0ec20 lsr lr, r0, #24 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3a088: e5c12010 strb r2, [r1, #16] <== NOT EXECUTED
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
3a08c: e5cce034 strb lr, [ip, #52] ; 0x34 <== NOT EXECUTED
3a090: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
3a094: e1a0c820 lsr ip, r0, #16 <== NOT EXECUTED
3a098: e5c1c035 strb ip, [r1, #53] ; 0x35 <== NOT EXECUTED
3a09c: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
3a0a0: e1a0c420 lsr ip, r0, #8 <== NOT EXECUTED
3a0a4: e5c1c036 strb ip, [r1, #54] ; 0x36 <== NOT EXECUTED
3a0a8: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
3a0ac: e5c10037 strb r0, [r1, #55] ; 0x37 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3a0b0: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
brc = rtems_rfs_inode_unload (fs, map->inode, true);
3a0b4: e1a00005 mov r0, r5 <== NOT EXECUTED
3a0b8: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
3a0bc: eb000ecd bl 3dbf8 <rtems_rfs_inode_unload> <== NOT EXECUTED
if (brc > 0)
rc = brc;
map->dirty = false;
3a0c0: e3a03000 mov r3, #0 <== NOT EXECUTED
3a0c4: e5c43000 strb r3, [r4] <== NOT EXECUTED
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
3a0c8: e1c07fc0 bic r7, r0, r0, asr #31 <== NOT EXECUTED
3a0cc: eaffff98 b 39f34 <rtems_rfs_block_map_close+0x30> <== NOT EXECUTED
00039448 <rtems_rfs_block_map_find>:
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
39448: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3944c: e1a06003 mov r6, r3 <== NOT EXECUTED
int rc = 0;
*block = 0;
39450: e3a03000 mov r3, #0 <== NOT EXECUTED
39454: e5863000 str r3, [r6] <== NOT EXECUTED
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
39458: e592b000 ldr fp, [r2] <== NOT EXECUTED
3945c: e15b0003 cmp fp, r3 <== NOT EXECUTED
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
39460: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
39464: e1a05002 mov r5, r2 <== NOT EXECUTED
39468: e1a07000 mov r7, r0 <== NOT EXECUTED
3946c: e1a04001 mov r4, r1 <== NOT EXECUTED
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
39470: 0591a008 ldreq sl, [r1, #8] <== NOT EXECUTED
39474: 0a000002 beq 39484 <rtems_rfs_block_map_find+0x3c> <== NOT EXECUTED
39478: e591a008 ldr sl, [r1, #8] <== NOT EXECUTED
3947c: e35a0000 cmp sl, #0 <== NOT EXECUTED
39480: 0a000022 beq 39510 <rtems_rfs_block_map_find+0xc8> <== NOT EXECUTED
39484: e15b000a cmp fp, sl <== NOT EXECUTED
39488: 2a000020 bcs 39510 <rtems_rfs_block_map_find+0xc8> <== NOT EXECUTED
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
3948c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
39490: e15b0003 cmp fp, r3 <== NOT EXECUTED
39494: 0a000020 beq 3951c <rtems_rfs_block_map_find+0xd4> <== NOT EXECUTED
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
39498: e35a0005 cmp sl, #5 <== NOT EXECUTED
3949c: 8a00000b bhi 394d0 <rtems_rfs_block_map_find+0x88> <== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
394a0: e28bb009 add fp, fp, #9 <== NOT EXECUTED
394a4: e794310b ldr r3, [r4, fp, lsl #2] <== NOT EXECUTED
394a8: e5863000 str r3, [r6] <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
394ac: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
394b0: e895000c ldm r5, {r2, r3} <== NOT EXECUTED
394b4: e5841018 str r1, [r4, #24] <== NOT EXECUTED
394b8: e5842010 str r2, [r4, #16] <== NOT EXECUTED
394bc: e5843014 str r3, [r4, #20] <== NOT EXECUTED
map->bpos.block = *block;
394c0: e5963000 ldr r3, [r6] <== NOT EXECUTED
394c4: e3a00000 mov r0, #0 <== NOT EXECUTED
394c8: e5843018 str r3, [r4, #24] <== NOT EXECUTED
394cc: ea000010 b 39514 <rtems_rfs_block_map_find+0xcc> <== NOT EXECUTED
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
394d0: e5979030 ldr r9, [r7, #48] ; 0x30 <== NOT EXECUTED
394d4: e1a0000b mov r0, fp <== NOT EXECUTED
394d8: e1a01009 mov r1, r9 <== NOT EXECUTED
394dc: eb008cba bl 5c7cc <__umodsi3> <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
394e0: e1a01009 mov r1, r9 <== NOT EXECUTED
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
394e4: e1a08000 mov r8, r0 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
394e8: e1a0000b mov r0, fp <== NOT EXECUTED
394ec: eb008c22 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
394f0: e5973034 ldr r3, [r7, #52] ; 0x34 <== NOT EXECUTED
394f4: e15a0003 cmp sl, r3 <== NOT EXECUTED
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
singly = bpos->bno / fs->blocks_per_block;
394f8: e1a0b000 mov fp, r0 <== NOT EXECUTED
394fc: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
39500: 9a000009 bls 3952c <rtems_rfs_block_map_find+0xe4> <== NOT EXECUTED
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
39504: e5973038 ldr r3, [r7, #56] ; 0x38 <== NOT EXECUTED
39508: e15a0003 cmp sl, r3 <== NOT EXECUTED
3950c: 3a000010 bcc 39554 <rtems_rfs_block_map_find+0x10c> <== NOT EXECUTED
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
39510: e3a00006 mov r0, #6 <== NOT EXECUTED
}
return rc;
}
39514: e28dd008 add sp, sp, #8 <== NOT EXECUTED
39518: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
3951c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
39520: e3530000 cmp r3, #0 <== NOT EXECUTED
39524: 0affffdb beq 39498 <rtems_rfs_block_map_find+0x50> <== NOT EXECUTED
39528: eaffffde b 394a8 <rtems_rfs_block_map_find+0x60> <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
3952c: e280b009 add fp, r0, #9 <== NOT EXECUTED
39530: e794210b ldr r2, [r4, fp, lsl #2] <== NOT EXECUTED
39534: e1a00007 mov r0, r7 <== NOT EXECUTED
39538: e1a03008 mov r3, r8 <== NOT EXECUTED
3953c: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
39540: e58d6000 str r6, [sp] <== NOT EXECUTED
39544: ebffffa2 bl 393d4 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
}
}
}
}
if (rc == 0)
39548: e3500000 cmp r0, #0 <== NOT EXECUTED
3954c: 1afffff0 bne 39514 <rtems_rfs_block_map_find+0xcc> <== NOT EXECUTED
39550: eaffffd5 b 394ac <rtems_rfs_block_map_find+0x64> <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
39554: e1a01009 mov r1, r9 <== NOT EXECUTED
39558: eb008c9b bl 5c7cc <__umodsi3> <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
3955c: e1a01009 mov r1, r9 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
39560: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
39564: e1a0000b mov r0, fp <== NOT EXECUTED
39568: eb008c03 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
3956c: e28dc008 add ip, sp, #8 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
39570: e2800009 add r0, r0, #9 <== NOT EXECUTED
39574: e7942100 ldr r2, [r4, r0, lsl #2] <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
39578: e52ca004 str sl, [ip, #-4]! <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
3957c: e1a0300a mov r3, sl <== NOT EXECUTED
39580: e1a00007 mov r0, r7 <== NOT EXECUTED
39584: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
39588: e58dc000 str ip, [sp] <== NOT EXECUTED
3958c: ebffff90 bl 393d4 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
39590: e3500000 cmp r0, #0 <== NOT EXECUTED
39594: 1affffde bne 39514 <rtems_rfs_block_map_find+0xcc> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
39598: e1a00007 mov r0, r7 <== NOT EXECUTED
3959c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
395a0: e1a03008 mov r3, r8 <== NOT EXECUTED
395a4: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
395a8: e58d6000 str r6, [sp] <== NOT EXECUTED
395ac: ebffff88 bl 393d4 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
395b0: eaffffe4 b 39548 <rtems_rfs_block_map_find+0x100> <== NOT EXECUTED
000399e8 <rtems_rfs_block_map_free_all>:
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
399e8: e5912008 ldr r2, [r1, #8] <== NOT EXECUTED
399ec: eaffff45 b 39708 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
00039b20 <rtems_rfs_block_map_grow>:
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
39b20: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
39b24: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
39b28: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
39b2c: e1a04001 mov r4, r1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
39b30: e5902038 ldr r2, [r0, #56] ; 0x38 <== NOT EXECUTED
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
39b34: e1a06000 mov r6, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
39b38: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
39b3c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
39b40: e0801001 add r1, r0, r1 <== NOT EXECUTED
39b44: e1510002 cmp r1, r2 <== NOT EXECUTED
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
39b48: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
39b4c: 23a0a01b movcs sl, #27 <== NOT EXECUTED
39b50: 2a0000bb bcs 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39b54: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
39b58: e3520000 cmp r2, #0 <== NOT EXECUTED
39b5c: 0a0000d4 beq 39eb4 <rtems_rfs_block_map_grow+0x394> <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39b60: e2843038 add r3, r4, #56 ; 0x38 <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
39b64: e2840044 add r0, r4, #68 ; 0x44 <== NOT EXECUTED
39b68: e3a05000 mov r5, #0 <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39b6c: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39b70: e58d300c str r3, [sp, #12] <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
39b74: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
39b78: e3a08001 mov r8, #1 <== NOT EXECUTED
39b7c: ea000011 b 39bc8 <rtems_rfs_block_map_grow+0xa8> <== NOT EXECUTED
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
map->blocks[map->size.count] = block;
39b80: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
39b84: e28a3009 add r3, sl, #9 <== NOT EXECUTED
39b88: e7841103 str r1, [r4, r3, lsl #2] <== NOT EXECUTED
39b8c: e1a03001 mov r3, r1 <== NOT EXECUTED
}
map->size.count++;
map->size.offset = 0;
if (b == 0)
39b90: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
map->size.offset = 0;
39b94: e3a02000 mov r2, #0 <== NOT EXECUTED
39b98: e584200c str r2, [r4, #12] <== NOT EXECUTED
if (b == 0)
*new_block = block;
39b9c: 059d0008 ldreq r0, [sp, #8] <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39ba0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
39ba4: e28aa001 add sl, sl, #1 <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39ba8: e2855001 add r5, r5, #1 <== NOT EXECUTED
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
39bac: e584a008 str sl, [r4, #8] <== NOT EXECUTED
map->size.offset = 0;
if (b == 0)
*new_block = block;
39bb0: 01a01003 moveq r1, r3 <== NOT EXECUTED
39bb4: 05803000 streq r3, [r0] <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39bb8: e1520005 cmp r2, r5 <== NOT EXECUTED
map->size.count++;
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
39bbc: e5843020 str r3, [r4, #32] <== NOT EXECUTED
map->dirty = true;
39bc0: e5c48000 strb r8, [r4] <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39bc4: 9a0000ba bls 39eb4 <rtems_rfs_block_map_grow+0x394> <== NOT EXECUTED
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
39bc8: e1a00006 mov r0, r6 <== NOT EXECUTED
39bcc: e3a02000 mov r2, #0 <== NOT EXECUTED
39bd0: e28d3018 add r3, sp, #24 <== NOT EXECUTED
39bd4: eb000e8e bl 3d614 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
false, &block);
if (rc > 0)
39bd8: e3500000 cmp r0, #0 <== NOT EXECUTED
39bdc: ca0000b6 bgt 39ebc <rtems_rfs_block_map_grow+0x39c> <== NOT EXECUTED
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
39be0: e594a008 ldr sl, [r4, #8] <== NOT EXECUTED
39be4: e35a0004 cmp sl, #4 <== NOT EXECUTED
39be8: 9affffe4 bls 39b80 <rtems_rfs_block_map_grow+0x60> <== NOT EXECUTED
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
39bec: e5969030 ldr r9, [r6, #48] ; 0x30 <== NOT EXECUTED
39bf0: e1a0000a mov r0, sl <== NOT EXECUTED
39bf4: e1a01009 mov r1, r9 <== NOT EXECUTED
39bf8: eb008af3 bl 5c7cc <__umodsi3> <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
39bfc: e1a01009 mov r1, r9 <== NOT EXECUTED
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
39c00: e1a07000 mov r7, r0 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
39c04: e1a0000a mov r0, sl <== NOT EXECUTED
39c08: eb008a5b bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
39c0c: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED
39c10: e15a0003 cmp sl, r3 <== NOT EXECUTED
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
singly = map->size.count / fs->blocks_per_block;
39c14: e1a0b000 mov fp, r0 <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
39c18: 2a00002b bcs 39ccc <rtems_rfs_block_map_grow+0x1ac> <== NOT EXECUTED
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
39c1c: e3570000 cmp r7, #0 <== NOT EXECUTED
39c20: 0a000002 beq 39c30 <rtems_rfs_block_map_grow+0x110> <== NOT EXECUTED
39c24: e3570005 cmp r7, #5 <== NOT EXECUTED
39c28: 03500000 cmpeq r0, #0 <== NOT EXECUTED
39c2c: 1a000087 bne 39e50 <rtems_rfs_block_map_grow+0x330> <== NOT EXECUTED
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
39c30: e28b3009 add r3, fp, #9 <== NOT EXECUTED
39c34: e35a0005 cmp sl, #5 <== NOT EXECUTED
39c38: 13a0c000 movne ip, #0 <== NOT EXECUTED
39c3c: 03a0c001 moveq ip, #1 <== NOT EXECUTED
39c40: e0843103 add r3, r4, r3, lsl #2 <== NOT EXECUTED
39c44: e1a00006 mov r0, r6 <== NOT EXECUTED
39c48: e1a01004 mov r1, r4 <== NOT EXECUTED
39c4c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
39c50: e58dc000 str ip, [sp] <== NOT EXECUTED
39c54: ebffff65 bl 399f0 <rtems_rfs_block_map_indirect_alloc> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
}
if (rc > 0)
39c58: e3500000 cmp r0, #0 <== NOT EXECUTED
39c5c: ca000073 bgt 39e30 <rtems_rfs_block_map_grow+0x310> <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
39c60: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
39c64: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED
39c68: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39c6c: e7c32107 strb r2, [r3, r7, lsl #2] <== NOT EXECUTED
39c70: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
39c74: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
39c78: e1dd11ba ldrh r1, [sp, #26] <== NOT EXECUTED
39c7c: e1a03107 lsl r3, r7, #2 <== NOT EXECUTED
39c80: e0822003 add r2, r2, r3 <== NOT EXECUTED
39c84: e5c21001 strb r1, [r2, #1] <== NOT EXECUTED
39c88: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
39c8c: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
39c90: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
39c94: e1a07087 lsl r7, r7, #1 <== NOT EXECUTED
39c98: e1a01421 lsr r1, r1, #8 <== NOT EXECUTED
39c9c: e2877001 add r7, r7, #1 <== NOT EXECUTED
39ca0: e7c21087 strb r1, [r2, r7, lsl #1] <== NOT EXECUTED
39ca4: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
39ca8: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
39cac: e0823003 add r3, r2, r3 <== NOT EXECUTED
39cb0: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
39cb4: e5c32003 strb r2, [r3, #3] <== NOT EXECUTED
39cb8: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
39cbc: e5c48038 strb r8, [r4, #56] ; 0x38 <== NOT EXECUTED
39cc0: e594a008 ldr sl, [r4, #8] <== NOT EXECUTED
39cc4: e1a01003 mov r1, r3 <== NOT EXECUTED
39cc8: eaffffb0 b 39b90 <rtems_rfs_block_map_grow+0x70> <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
39ccc: e1a01009 mov r1, r9 <== NOT EXECUTED
39cd0: eb008a29 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
singly %= fs->blocks_per_block;
39cd4: e1a01009 mov r1, r9 <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
39cd8: e1a0a000 mov sl, r0 <== NOT EXECUTED
singly %= fs->blocks_per_block;
39cdc: e1a0000b mov r0, fp <== NOT EXECUTED
39ce0: eb008ab9 bl 5c7cc <__umodsi3> <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
39ce4: e3570000 cmp r7, #0 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
39ce8: e1a09000 mov r9, r0 <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
39cec: 1a000034 bne 39dc4 <rtems_rfs_block_map_grow+0x2a4> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
39cf0: e1a00006 mov r0, r6 <== NOT EXECUTED
39cf4: e1a01004 mov r1, r4 <== NOT EXECUTED
39cf8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
39cfc: e28d3014 add r3, sp, #20 <== NOT EXECUTED
39d00: e58d7000 str r7, [sp] <== NOT EXECUTED
39d04: ebffff39 bl 399f0 <rtems_rfs_block_map_indirect_alloc> <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
39d08: e3500000 cmp r0, #0 <== NOT EXECUTED
39d0c: ca00006c bgt 39ec4 <rtems_rfs_block_map_grow+0x3a4> <== NOT EXECUTED
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
39d10: e3590000 cmp r9, #0 <== NOT EXECUTED
39d14: 0a000004 beq 39d2c <rtems_rfs_block_map_grow+0x20c> <== NOT EXECUTED
39d18: e3590005 cmp r9, #5 <== NOT EXECUTED
39d1c: 035a0000 cmpeq sl, #0 <== NOT EXECUTED
39d20: 13a0b000 movne fp, #0 <== NOT EXECUTED
39d24: 03a0b001 moveq fp, #1 <== NOT EXECUTED
39d28: 1a00004f bne 39e6c <rtems_rfs_block_map_grow+0x34c> <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
39d2c: e5962034 ldr r2, [r6, #52] ; 0x34 <== NOT EXECUTED
39d30: e594c008 ldr ip, [r4, #8] <== NOT EXECUTED
39d34: e28a3009 add r3, sl, #9 <== NOT EXECUTED
39d38: e15c0002 cmp ip, r2 <== NOT EXECUTED
39d3c: 13a0c000 movne ip, #0 <== NOT EXECUTED
39d40: 03a0c001 moveq ip, #1 <== NOT EXECUTED
39d44: e0843103 add r3, r4, r3, lsl #2 <== NOT EXECUTED
39d48: e1a00006 mov r0, r6 <== NOT EXECUTED
39d4c: e1a01004 mov r1, r4 <== NOT EXECUTED
39d50: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
39d54: e58dc000 str ip, [sp] <== NOT EXECUTED
39d58: ebffff24 bl 399f0 <rtems_rfs_block_map_indirect_alloc> <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
39d5c: e3500000 cmp r0, #0 <== NOT EXECUTED
39d60: ca00005d bgt 39edc <rtems_rfs_block_map_grow+0x3bc> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
39d64: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
39d68: e5dd2017 ldrb r2, [sp, #23] <== NOT EXECUTED
39d6c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39d70: e7c32109 strb r2, [r3, r9, lsl #2] <== NOT EXECUTED
39d74: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
39d78: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
39d7c: e1dd11b6 ldrh r1, [sp, #22] <== NOT EXECUTED
39d80: e1a03109 lsl r3, r9, #2 <== NOT EXECUTED
39d84: e0822003 add r2, r2, r3 <== NOT EXECUTED
39d88: e5c21001 strb r1, [r2, #1] <== NOT EXECUTED
39d8c: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
39d90: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
39d94: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
39d98: e1a09089 lsl r9, r9, #1 <== NOT EXECUTED
39d9c: e2899001 add r9, r9, #1 <== NOT EXECUTED
39da0: e1a01421 lsr r1, r1, #8 <== NOT EXECUTED
39da4: e7c21089 strb r1, [r2, r9, lsl #1] <== NOT EXECUTED
39da8: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
39dac: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
39db0: e0823003 add r3, r2, r3 <== NOT EXECUTED
39db4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
39db8: e5c32003 strb r2, [r3, #3] <== NOT EXECUTED
39dbc: e5c48044 strb r8, [r4, #68] ; 0x44 <== NOT EXECUTED
39dc0: eaffffa6 b 39c60 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
39dc4: e28aa009 add sl, sl, #9 <== NOT EXECUTED
39dc8: e794210a ldr r2, [r4, sl, lsl #2] <== NOT EXECUTED
39dcc: e1a00006 mov r0, r6 <== NOT EXECUTED
39dd0: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
39dd4: e3a03001 mov r3, #1 <== NOT EXECUTED
39dd8: eb0001d1 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
39ddc: e3500000 cmp r0, #0 <== NOT EXECUTED
39de0: ca000012 bgt 39e30 <rtems_rfs_block_map_grow+0x310> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
39de4: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
39de8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39dec: e0832109 add r2, r3, r9, lsl #2 <== NOT EXECUTED
39df0: e7d30109 ldrb r0, [r3, r9, lsl #2] <== NOT EXECUTED
39df4: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
39df8: e1a09002 mov r9, r2 <== NOT EXECUTED
39dfc: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
39e00: e5d93002 ldrb r3, [r9, #2] <== NOT EXECUTED
39e04: e181cc00 orr ip, r1, r0, lsl #24 <== NOT EXECUTED
39e08: e18cc802 orr ip, ip, r2, lsl #16 <== NOT EXECUTED
39e0c: e18cc403 orr ip, ip, r3, lsl #8 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39e10: e1a0200c mov r2, ip <== NOT EXECUTED
39e14: e1a00006 mov r0, r6 <== NOT EXECUTED
39e18: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
39e1c: e3a03001 mov r3, #1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
39e20: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39e24: eb0001be bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
singly_block, true);
if (rc > 0)
39e28: e3500000 cmp r0, #0 <== NOT EXECUTED
39e2c: daffff8b ble 39c60 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
39e30: e1a0a000 mov sl, r0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
39e34: e3a01000 mov r1, #0 <== NOT EXECUTED
39e38: e1a00006 mov r0, r6 <== NOT EXECUTED
39e3c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
39e40: eb000dcb bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
39e44: e1a0000a mov r0, sl <== NOT EXECUTED
39e48: e28dd01c add sp, sp, #28 <== NOT EXECUTED
39e4c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39e50: e280b009 add fp, r0, #9 <== NOT EXECUTED
39e54: e794210b ldr r2, [r4, fp, lsl #2] <== NOT EXECUTED
39e58: e1a00006 mov r0, r6 <== NOT EXECUTED
39e5c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
39e60: e3a03001 mov r3, #1 <== NOT EXECUTED
39e64: eb0001ae bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
39e68: eaffff7a b 39c58 <rtems_rfs_block_map_grow+0x138> <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
39e6c: e28aa009 add sl, sl, #9 <== NOT EXECUTED
39e70: e794210a ldr r2, [r4, sl, lsl #2] <== NOT EXECUTED
39e74: e1a00006 mov r0, r6 <== NOT EXECUTED
39e78: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
39e7c: e3a03001 mov r3, #1 <== NOT EXECUTED
39e80: eb0001a7 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
39e84: e3500000 cmp r0, #0 <== NOT EXECUTED
39e88: daffffb5 ble 39d64 <rtems_rfs_block_map_grow+0x244> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
39e8c: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
39e90: e1a0100b mov r1, fp <== NOT EXECUTED
39e94: e1a0a000 mov sl, r0 <== NOT EXECUTED
39e98: e1a00006 mov r0, r6 <== NOT EXECUTED
39e9c: eb000db4 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
39ea0: e1a00006 mov r0, r6 <== NOT EXECUTED
39ea4: e1a0100b mov r1, fp <== NOT EXECUTED
39ea8: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
39eac: eb000db0 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
39eb0: eaffffe3 b 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
39eb4: e3a0a000 mov sl, #0 <== NOT EXECUTED
39eb8: eaffffe1 b 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
39ebc: e1a0a000 mov sl, r0 <== NOT EXECUTED
39ec0: eaffffdf b 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
39ec4: e1a0a000 mov sl, r0 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, block);
39ec8: e1a01007 mov r1, r7 <== NOT EXECUTED
39ecc: e1a00006 mov r0, r6 <== NOT EXECUTED
39ed0: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
39ed4: eb000da6 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
39ed8: eaffffd9 b 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
39edc: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
39ee0: e1a0a000 mov sl, r0 <== NOT EXECUTED
39ee4: e3a01000 mov r1, #0 <== NOT EXECUTED
39ee8: e1a00006 mov r0, r6 <== NOT EXECUTED
39eec: eb000da0 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
39ef0: e1a00006 mov r0, r6 <== NOT EXECUTED
39ef4: e3a01000 mov r1, #0 <== NOT EXECUTED
39ef8: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
39efc: eb000d9c bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
39f00: eaffffcf b 39e44 <rtems_rfs_block_map_grow+0x324> <== NOT EXECUTED
000399f0 <rtems_rfs_block_map_indirect_alloc>:
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
399f0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
399f4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
399f8: e1a04001 mov r4, r1 <== NOT EXECUTED
399fc: e1a05002 mov r5, r2 <== NOT EXECUTED
39a00: e1a08003 mov r8, r3 <== NOT EXECUTED
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
39a04: e591101c ldr r1, [r1, #28] <== NOT EXECUTED
39a08: e3a02000 mov r2, #0 <== NOT EXECUTED
39a0c: e1a0300d mov r3, sp <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
39a10: e1a06000 mov r6, r0 <== NOT EXECUTED
39a14: e5dd7020 ldrb r7, [sp, #32] <== NOT EXECUTED
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
39a18: eb000efd bl 3d614 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
if (rc > 0)
39a1c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
39a20: da000002 ble 39a30 <rtems_rfs_block_map_indirect_alloc+0x40><== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
map->last_map_block = new_block;
return 0;
}
39a24: e1a0000a mov r0, sl <== NOT EXECUTED
39a28: e28dd004 add sp, sp, #4 <== NOT EXECUTED
39a2c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
if (rc > 0)
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
39a30: e1a00006 mov r0, r6 <== NOT EXECUTED
39a34: e1a01005 mov r1, r5 <== NOT EXECUTED
39a38: e59d2000 ldr r2, [sp] <== NOT EXECUTED
39a3c: e3a03000 mov r3, #0 <== NOT EXECUTED
39a40: eb0002b7 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
39a44: e250a000 subs sl, r0, #0 <== NOT EXECUTED
39a48: da000004 ble 39a60 <rtems_rfs_block_map_indirect_alloc+0x70><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
39a4c: e1a00006 mov r0, r6 <== NOT EXECUTED
39a50: e3a01000 mov r1, #0 <== NOT EXECUTED
39a54: e59d2000 ldr r2, [sp] <== NOT EXECUTED
39a58: eb000ec5 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
39a5c: eafffff0 b 39a24 <rtems_rfs_block_map_indirect_alloc+0x34> <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
39a60: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
39a64: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED
39a68: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
39a6c: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
39a70: eb003829 bl 47b1c <memset> <== NOT EXECUTED
if (upping)
39a74: e3570000 cmp r7, #0 <== NOT EXECUTED
39a78: 0a000021 beq 39b04 <rtems_rfs_block_map_indirect_alloc+0x114><== NOT EXECUTED
39a7c: e1a02004 mov r2, r4 <== NOT EXECUTED
39a80: e3a03000 mov r3, #0 <== NOT EXECUTED
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
39a84: e3a0c001 mov ip, #1 <== NOT EXECUTED
39a88: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
39a8c: e5d20027 ldrb r0, [r2, #39] ; 0x27 <== NOT EXECUTED
39a90: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
39a94: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED
39a98: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
39a9c: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
39aa0: e1d202b6 ldrh r0, [r2, #38] ; 0x26 <== NOT EXECUTED
39aa4: e0811003 add r1, r1, r3 <== NOT EXECUTED
39aa8: e5c10001 strb r0, [r1, #1] <== NOT EXECUTED
39aac: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
39ab0: e5920024 ldr r0, [r2, #36] ; 0x24 <== NOT EXECUTED
39ab4: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
39ab8: e1a00420 lsr r0, r0, #8 <== NOT EXECUTED
39abc: e0811003 add r1, r1, r3 <== NOT EXECUTED
39ac0: e5c10002 strb r0, [r1, #2] <== NOT EXECUTED
39ac4: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
39ac8: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
39acc: e5920024 ldr r0, [r2, #36] ; 0x24 <== NOT EXECUTED
39ad0: e0811003 add r1, r1, r3 <== NOT EXECUTED
39ad4: e2833004 add r3, r3, #4 <== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
39ad8: e3530014 cmp r3, #20 <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
39adc: e5c10003 strb r0, [r1, #3] <== NOT EXECUTED
39ae0: e2822004 add r2, r2, #4 <== NOT EXECUTED
39ae4: e5c5c000 strb ip, [r5] <== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
39ae8: 1affffe6 bne 39a88 <rtems_rfs_block_map_indirect_alloc+0x98><== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
39aec: e3a03000 mov r3, #0 <== NOT EXECUTED
39af0: e5843034 str r3, [r4, #52] ; 0x34 <== NOT EXECUTED
39af4: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
39af8: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
39afc: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
39b00: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
39b04: e59d3000 ldr r3, [sp] <== NOT EXECUTED
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
39b08: e3a02001 mov r2, #1 <== NOT EXECUTED
*block = new_block;
39b0c: e5883000 str r3, [r8] <== NOT EXECUTED
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
39b10: e5c52000 strb r2, [r5] <== NOT EXECUTED
*block = new_block;
map->last_map_block = new_block;
39b14: e584301c str r3, [r4, #28] <== NOT EXECUTED
39b18: e3a0a000 mov sl, #0 <== NOT EXECUTED
return 0;
39b1c: eaffffc0 b 39a24 <rtems_rfs_block_map_indirect_alloc+0x34> <== NOT EXECUTED
00039658 <rtems_rfs_block_map_indirect_shrink>:
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
39658: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3965c: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
39660: e35c0000 cmp ip, #0 <== NOT EXECUTED
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
39664: e1a04001 mov r4, r1 <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
39668: 0a00001d beq 396e4 <rtems_rfs_block_map_indirect_shrink+0x8c><== NOT EXECUTED
3966c: e35c0005 cmp ip, #5 <== NOT EXECUTED
39670: 03530000 cmpeq r3, #0 <== NOT EXECUTED
39674: 13a0c000 movne ip, #0 <== NOT EXECUTED
39678: 03a0c001 moveq ip, #1 <== NOT EXECUTED
3967c: 11a0000c movne r0, ip <== NOT EXECUTED
39680: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
39684: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED
39688: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3968c: e5915024 ldr r5, [r1, #36] ; 0x24 <== NOT EXECUTED
39690: e1a02001 mov r2, r1 <== NOT EXECUTED
* @param indirect The index index in the inode's block table.
* @param index The index in the indirect table of the block.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
39694: e2836014 add r6, r3, #20 <== NOT EXECUTED
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
39698: e5d31001 ldrb r1, [r3, #1] <== NOT EXECUTED
3969c: e5d3c000 ldrb ip, [r3] <== NOT EXECUTED
396a0: e5d3e003 ldrb lr, [r3, #3] <== NOT EXECUTED
396a4: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
396a8: e1811c0c orr r1, r1, ip, lsl #24 <== NOT EXECUTED
396ac: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
396b0: e181100e orr r1, r1, lr <== NOT EXECUTED
396b4: e2833004 add r3, r3, #4 <== NOT EXECUTED
396b8: e181140c orr r1, r1, ip, lsl #8 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
396bc: e1530006 cmp r3, r6 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
396c0: e5821024 str r1, [r2, #36] ; 0x24 <== NOT EXECUTED
396c4: e2822004 add r2, r2, #4 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
396c8: 1afffff2 bne 39698 <rtems_rfs_block_map_indirect_shrink+0x40><== NOT EXECUTED
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
396cc: e3a01000 mov r1, #0 <== NOT EXECUTED
396d0: e1a02005 mov r2, r5 <== NOT EXECUTED
396d4: eb000fa6 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
396d8: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
396dc: d584501c strle r5, [r4, #28] <== NOT EXECUTED
}
return rc;
}
396e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
396e4: e2833009 add r3, r3, #9 <== NOT EXECUTED
396e8: e7915103 ldr r5, [r1, r3, lsl #2] <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
396ec: e781c103 str ip, [r1, r3, lsl #2] <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
396f0: e1a02005 mov r2, r5 <== NOT EXECUTED
396f4: e3a01000 mov r1, #0 <== NOT EXECUTED
396f8: eb000f9d bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
396fc: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
39700: d584501c strle r5, [r4, #28] <== NOT EXECUTED
}
return rc;
}
39704: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000395b4 <rtems_rfs_block_map_next_block>:
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
395b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
395b8: e591e010 ldr lr, [r1, #16] <== NOT EXECUTED
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
395bc: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
bpos.boff = 0;
395c0: e3a0c000 mov ip, #0 <== NOT EXECUTED
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
395c4: e1a03002 mov r3, r2 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
395c8: e28ee001 add lr, lr, #1 <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
395cc: e1a0200d mov r2, sp <== NOT EXECUTED
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
395d0: e58de000 str lr, [sp] <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
395d4: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
bpos.boff = 0;
395d8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
395dc: ebffff99 bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
395e0: e28dd00c add sp, sp, #12 <== NOT EXECUTED
395e4: e8bd8000 pop {pc} <== NOT EXECUTED
0003a0d0 <rtems_rfs_block_map_open>:
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
3a0d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
3a0d4: e3a05000 mov r5, #0 <== NOT EXECUTED
3a0d8: e5c25000 strb r5, [r2] <== NOT EXECUTED
map->inode = NULL;
3a0dc: e5825004 str r5, [r2, #4] <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
3a0e0: e5825008 str r5, [r2, #8] <== NOT EXECUTED
size->offset = 0;
3a0e4: e582500c str r5, [r2, #12] <== NOT EXECUTED
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
3a0e8: e5825010 str r5, [r2, #16] <== NOT EXECUTED
bpos->boff = 0;
3a0ec: e5825014 str r5, [r2, #20] <== NOT EXECUTED
bpos->block = 0;
3a0f0: e5825018 str r5, [r2, #24] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3a0f4: e5c25038 strb r5, [r2, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
3a0f8: e582503c str r5, [r2, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
3a0fc: e5825040 str r5, [r2, #64] ; 0x40 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3a100: e5c25044 strb r5, [r2, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
3a104: e5825048 str r5, [r2, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
3a108: e582504c str r5, [r2, #76] ; 0x4c <== NOT EXECUTED
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
3a10c: e1a04002 mov r4, r2 <== NOT EXECUTED
3a110: e1a07000 mov r7, r0 <== NOT EXECUTED
3a114: e1a06001 mov r6, r1 <== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
3a118: eb000eed bl 3dcd4 <rtems_rfs_inode_load> <== NOT EXECUTED
if (rc > 0)
3a11c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3a120: ca000035 bgt 3a1fc <rtems_rfs_block_map_open+0x12c> <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
3a124: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
3a128: e5846004 str r6, [r4, #4] <== NOT EXECUTED
3a12c: e281301c add r3, r1, #28 <== NOT EXECUTED
3a130: e1a02004 mov r2, r4 <== NOT EXECUTED
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
3a134: e2818030 add r8, r1, #48 ; 0x30 <== NOT EXECUTED
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
3a138: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
3a13c: e5d3c000 ldrb ip, [r3] <== NOT EXECUTED
3a140: e5d35003 ldrb r5, [r3, #3] <== NOT EXECUTED
3a144: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
3a148: e1800c0c orr r0, r0, ip, lsl #24 <== NOT EXECUTED
3a14c: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
3a150: e1800005 orr r0, r0, r5 <== NOT EXECUTED
3a154: e2833004 add r3, r3, #4 <== NOT EXECUTED
3a158: e180040c orr r0, r0, ip, lsl #8 <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
3a15c: e1530008 cmp r3, r8 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
3a160: e5820024 str r0, [r2, #36] ; 0x24 <== NOT EXECUTED
3a164: e2822004 add r2, r2, #4 <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
3a168: 1afffff2 bne 3a138 <rtems_rfs_block_map_open+0x68> <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
3a16c: e281300c add r3, r1, #12 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
3a170: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
3a174: e5d1000c ldrb r0, [r1, #12] <== NOT EXECUTED
3a178: e5d3c001 ldrb ip, [r3, #1] <== NOT EXECUTED
3a17c: e1820c00 orr r0, r2, r0, lsl #24 <== NOT EXECUTED
3a180: e5d32002 ldrb r2, [r3, #2] <== NOT EXECUTED
3a184: e180380c orr r3, r0, ip, lsl #16 <== NOT EXECUTED
3a188: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3a18c: e5843008 str r3, [r4, #8] <== NOT EXECUTED
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
3a190: e5d1200a ldrb r2, [r1, #10] <== NOT EXECUTED
3a194: e5d1300b ldrb r3, [r1, #11] <== NOT EXECUTED
3a198: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3a19c: e584300c str r3, [r4, #12] <== NOT EXECUTED
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
3a1a0: e2813030 add r3, r1, #48 ; 0x30 <== NOT EXECUTED
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
3a1a4: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
3a1a8: e5d10030 ldrb r0, [r1, #48] ; 0x30 <== NOT EXECUTED
3a1ac: e5d3c001 ldrb ip, [r3, #1] <== NOT EXECUTED
3a1b0: e1820c00 orr r0, r2, r0, lsl #24 <== NOT EXECUTED
3a1b4: e5d32002 ldrb r2, [r3, #2] <== NOT EXECUTED
3a1b8: e180380c orr r3, r0, ip, lsl #16 <== NOT EXECUTED
3a1bc: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3a1c0: e584301c str r3, [r4, #28] <== NOT EXECUTED
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
3a1c4: e2813034 add r3, r1, #52 ; 0x34 <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
3a1c8: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
3a1cc: e5d11034 ldrb r1, [r1, #52] ; 0x34 <== NOT EXECUTED
3a1d0: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
3a1d4: e1821c01 orr r1, r2, r1, lsl #24 <== NOT EXECUTED
3a1d8: e5d32002 ldrb r2, [r3, #2] <== NOT EXECUTED
3a1dc: e1813800 orr r3, r1, r0, lsl #16 <== NOT EXECUTED
3a1e0: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, inode, false);
3a1e4: e1a00007 mov r0, r7 <== NOT EXECUTED
3a1e8: e1a01006 mov r1, r6 <== NOT EXECUTED
3a1ec: e3a02000 mov r2, #0 <== NOT EXECUTED
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
3a1f0: e5843020 str r3, [r4, #32] <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
3a1f4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
3a1f8: ea000e7e b 3dbf8 <rtems_rfs_inode_unload> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3a1fc: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
3a200: e1a00007 mov r0, r7 <== NOT EXECUTED
3a204: eb00007c bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3a208: e5c45038 strb r5, [r4, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
3a20c: e584503c str r5, [r4, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
3a210: e5845040 str r5, [r4, #64] ; 0x40 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3a214: e1a00007 mov r0, r7 <== NOT EXECUTED
3a218: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
3a21c: eb000076 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3a220: e584504c str r5, [r4, #76] ; 0x4c <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3a224: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
3a228: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
return rc;
}
3a22c: e1a00008 mov r0, r8 <== NOT EXECUTED
3a230: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000395e8 <rtems_rfs_block_map_seek>:
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
395e8: e92d43f0 push {r4, r5, r6, r7, r8, r9, lr} <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
395ec: e591c014 ldr ip, [r1, #20] <== NOT EXECUTED
static inline void
rtems_rfs_block_add_pos (rtems_rfs_file_system* fs,
rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
rtems_rfs_block_get_bpos (fs,
395f0: e5905008 ldr r5, [r0, #8] <== NOT EXECUTED
395f4: e591e010 ldr lr, [r1, #16] <== NOT EXECUTED
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
395f8: e1a04001 mov r4, r1 <== NOT EXECUTED
395fc: e021ce95 mla r1, r5, lr, ip <== NOT EXECUTED
39600: e0928001 adds r8, r2, r1 <== NOT EXECUTED
39604: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
39608: e2a39000 adc r9, r3, #0 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
3960c: e5947018 ldr r7, [r4, #24] <== NOT EXECUTED
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
39610: e1a06000 mov r6, r0 <== NOT EXECUTED
39614: e1a01008 mov r1, r8 <== NOT EXECUTED
39618: e1a02009 mov r2, r9 <== NOT EXECUTED
3961c: e1a0300d mov r3, sp <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
39620: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
39624: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
39628: e58de000 str lr, [sp] <== NOT EXECUTED
3962c: ebffff27 bl 392d0 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
39630: e3a0c000 mov ip, #0 <== NOT EXECUTED
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
39634: e1a00006 mov r0, r6 <== NOT EXECUTED
39638: e1a01004 mov r1, r4 <== NOT EXECUTED
3963c: e1a0200d mov r2, sp <== NOT EXECUTED
39640: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
static inline void
rtems_rfs_block_add_pos (rtems_rfs_file_system* fs,
rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
rtems_rfs_block_get_bpos (fs,
39644: e1a0500d mov r5, sp <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
39648: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
3964c: ebffff7d bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
39650: e28dd00c add sp, sp, #12 <== NOT EXECUTED
39654: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED
00039708 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
39708: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
3970c: e5918008 ldr r8, [r1, #8] <== NOT EXECUTED
39710: e3580000 cmp r8, #0 <== NOT EXECUTED
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
39714: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
39718: e1a04001 mov r4, r1 <== NOT EXECUTED
3971c: e1a05000 mov r5, r0 <== NOT EXECUTED
39720: e1a0a002 mov sl, r2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
39724: e1a09008 mov r9, r8 <== NOT EXECUTED
39728: 0a00007b beq 3991c <rtems_rfs_block_map_shrink+0x214> <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
3972c: e1580002 cmp r8, r2 <== NOT EXECUTED
39730: 3a00007c bcc 39928 <rtems_rfs_block_map_shrink+0x220> <== NOT EXECUTED
blocks = map->size.count;
while (blocks)
39734: e3520000 cmp r2, #0 <== NOT EXECUTED
39738: 0a00006f beq 398fc <rtems_rfs_block_map_shrink+0x1f4> <== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
3973c: e2843038 add r3, r4, #56 ; 0x38 <== NOT EXECUTED
39740: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
39744: e2843044 add r3, r4, #68 ; 0x44 <== NOT EXECUTED
39748: e58d300c str r3, [sp, #12] <== NOT EXECUTED
3974c: ea000014 b 397a4 <rtems_rfs_block_map_shrink+0x9c> <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
39750: e2899008 add r9, r9, #8 <== NOT EXECUTED
map->blocks[block] = 0;
39754: e3a03000 mov r3, #0 <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
39758: e7946109 ldr r6, [r4, r9, lsl #2] <== NOT EXECUTED
map->blocks[block] = 0;
3975c: e7843109 str r3, [r4, r9, lsl #2] <== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
39760: e1a00005 mov r0, r5 <== NOT EXECUTED
39764: e3a01000 mov r1, #0 <== NOT EXECUTED
39768: e1a02006 mov r2, r6 <== NOT EXECUTED
3976c: eb000f80 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
39770: e3500000 cmp r0, #0 <== NOT EXECUTED
39774: ca000069 bgt 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
return rc;
map->size.count--;
39778: e5948008 ldr r8, [r4, #8] <== NOT EXECUTED
map->size.offset = 0;
3977c: e3a03000 mov r3, #0 <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
39780: e2489001 sub r9, r8, #1 <== NOT EXECUTED
map->size.offset = 0;
39784: e584300c str r3, [r4, #12] <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
39788: e25aa001 subs sl, sl, #1 <== NOT EXECUTED
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
3978c: e3a03001 mov r3, #1 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
39790: e5846020 str r6, [r4, #32] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
39794: e5849008 str r9, [r4, #8] <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
39798: e5c43000 strb r3, [r4] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
3979c: e1a08009 mov r8, r9 <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
397a0: 0a000051 beq 398ec <rtems_rfs_block_map_shrink+0x1e4> <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
397a4: e249b001 sub fp, r9, #1 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
397a8: e35b0004 cmp fp, #4 <== NOT EXECUTED
397ac: 9affffe7 bls 39750 <rtems_rfs_block_map_shrink+0x48> <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
397b0: e5956030 ldr r6, [r5, #48] ; 0x30 <== NOT EXECUTED
397b4: e1a0000b mov r0, fp <== NOT EXECUTED
397b8: e1a01006 mov r1, r6 <== NOT EXECUTED
397bc: eb008c02 bl 5c7cc <__umodsi3> <== NOT EXECUTED
singly = block / fs->blocks_per_block;
397c0: e1a01006 mov r1, r6 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
397c4: e1a07000 mov r7, r0 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
397c8: e1a0000b mov r0, fp <== NOT EXECUTED
397cc: eb008b6a bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
397d0: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
397d4: e15b0003 cmp fp, r3 <== NOT EXECUTED
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
singly = block / fs->blocks_per_block;
397d8: e1a0c000 mov ip, r0 <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
397dc: 3a000053 bcc 39930 <rtems_rfs_block_map_shrink+0x228> <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
397e0: e5953038 ldr r3, [r5, #56] ; 0x38 <== NOT EXECUTED
397e4: e15b0003 cmp fp, r3 <== NOT EXECUTED
397e8: 2a00003f bcs 398ec <rtems_rfs_block_map_shrink+0x1e4> <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
397ec: e1a01006 mov r1, r6 <== NOT EXECUTED
397f0: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
397f4: eb008b60 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
397f8: e2803009 add r3, r0, #9 <== NOT EXECUTED
397fc: e7942103 ldr r2, [r4, r3, lsl #2] <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
39800: e1a0b000 mov fp, r0 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
39804: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
39808: e1a00005 mov r0, r5 <== NOT EXECUTED
3980c: e3a03001 mov r3, #1 <== NOT EXECUTED
39810: eb000343 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
39814: e3500000 cmp r0, #0 <== NOT EXECUTED
39818: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
3981c: ca00003f bgt 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
39820: e1a01006 mov r1, r6 <== NOT EXECUTED
39824: e1a0000c mov r0, ip <== NOT EXECUTED
39828: eb008be7 bl 5c7cc <__umodsi3> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
3982c: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
39830: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39834: e0832100 add r2, r3, r0, lsl #2 <== NOT EXECUTED
39838: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
3983c: e7d39100 ldrb r9, [r3, r0, lsl #2] <== NOT EXECUTED
39840: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
39844: e0833100 add r3, r3, r0, lsl #2 <== NOT EXECUTED
39848: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
3984c: e1819c09 orr r9, r1, r9, lsl #24 <== NOT EXECUTED
39850: e1899802 orr r9, r9, r2, lsl #16 <== NOT EXECUTED
39854: e1899403 orr r9, r9, r3, lsl #8 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
39858: e1a08000 mov r8, r0 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
3985c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
39860: e1a00005 mov r0, r5 <== NOT EXECUTED
39864: e1a02009 mov r2, r9 <== NOT EXECUTED
39868: e3a03001 mov r3, #1 <== NOT EXECUTED
3986c: eb00032c bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
singly, true);
if (rc > 0)
39870: e3500000 cmp r0, #0 <== NOT EXECUTED
39874: ca000029 bgt 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
39878: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
3987c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39880: e0832107 add r2, r3, r7, lsl #2 <== NOT EXECUTED
39884: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
39888: e7d36107 ldrb r6, [r3, r7, lsl #2] <== NOT EXECUTED
3988c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
39890: e0833107 add r3, r3, r7, lsl #2 <== NOT EXECUTED
39894: e1816c06 orr r6, r1, r6, lsl #24 <== NOT EXECUTED
39898: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
3989c: e1866802 orr r6, r6, r2, lsl #16 <== NOT EXECUTED
direct);
if (direct == 0)
398a0: e3570000 cmp r7, #0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly, true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
398a4: e1866403 orr r6, r6, r3, lsl #8 <== NOT EXECUTED
direct);
if (direct == 0)
398a8: 1affffac bne 39760 <rtems_rfs_block_map_shrink+0x58> <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
398ac: e1a01007 mov r1, r7 <== NOT EXECUTED
398b0: e1a00005 mov r0, r5 <== NOT EXECUTED
398b4: e1a02009 mov r2, r9 <== NOT EXECUTED
398b8: eb000f2d bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
398bc: e3500000 cmp r0, #0 <== NOT EXECUTED
398c0: ca000016 bgt 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
return rc;
map->last_map_block = singly;
398c4: e584901c str r9, [r4, #28] <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
398c8: e1a0300b mov r3, fp <== NOT EXECUTED
398cc: e1a00005 mov r0, r5 <== NOT EXECUTED
398d0: e1a01004 mov r1, r4 <== NOT EXECUTED
398d4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
398d8: e58d8000 str r8, [sp] <== NOT EXECUTED
398dc: ebffff5d bl 39658 <rtems_rfs_block_map_indirect_shrink> <== NOT EXECUTED
doubly, doubly_singly);
if (rc)
398e0: e3500000 cmp r0, #0 <== NOT EXECUTED
398e4: 0affff9d beq 39760 <rtems_rfs_block_map_shrink+0x58> <== NOT EXECUTED
398e8: ea00000c b 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
398ec: e3590000 cmp r9, #0 <== NOT EXECUTED
{
map->last_map_block = 0;
map->last_data_block = 0;
398f0: 05849020 streq r9, [r4, #32] <== NOT EXECUTED
blocks--;
}
if (map->size.count == 0)
{
map->last_map_block = 0;
398f4: 0584901c streq r9, [r4, #28] <== NOT EXECUTED
map->last_data_block = 0;
398f8: 01a09008 moveq r9, r8 <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
398fc: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
39900: e3530000 cmp r3, #0 <== NOT EXECUTED
39904: 1a000026 bne 399a4 <rtems_rfs_block_map_shrink+0x29c> <== NOT EXECUTED
39908: e1590003 cmp r9, r3 <== NOT EXECUTED
3990c: 9a000026 bls 399ac <rtems_rfs_block_map_shrink+0x2a4> <== NOT EXECUTED
39910: e2492001 sub r2, r9, #1 <== NOT EXECUTED
39914: e1530002 cmp r3, r2 <== NOT EXECUTED
39918: 0a00002d beq 399d4 <rtems_rfs_block_map_shrink+0x2cc> <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
3991c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
39920: e28dd010 add sp, sp, #16 <== NOT EXECUTED
39924: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
return 0;
if (blocks > map->size.count)
39928: e1a0a008 mov sl, r8 <== NOT EXECUTED
3992c: eaffff82 b 3973c <rtems_rfs_block_map_shrink+0x34> <== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
39930: e2803009 add r3, r0, #9 <== NOT EXECUTED
39934: e7942103 ldr r2, [r4, r3, lsl #2] <== NOT EXECUTED
39938: e1a00005 mov r0, r5 <== NOT EXECUTED
3993c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
39940: e3a03001 mov r3, #1 <== NOT EXECUTED
39944: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
39948: eb0002f5 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
3994c: e3500000 cmp r0, #0 <== NOT EXECUTED
39950: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
39954: cafffff1 bgt 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
39958: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
3995c: e593e020 ldr lr, [r3, #32] <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
39960: e1a00005 mov r0, r5 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
39964: e08e6107 add r6, lr, r7, lsl #2 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
39968: e1a0300c mov r3, ip <== NOT EXECUTED
3996c: e1a01004 mov r1, r4 <== NOT EXECUTED
39970: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
39974: e5d6b002 ldrb fp, [r6, #2] <== NOT EXECUTED
39978: e5d69003 ldrb r9, [r6, #3] <== NOT EXECUTED
3997c: e7de8107 ldrb r8, [lr, r7, lsl #2] <== NOT EXECUTED
39980: e5d66001 ldrb r6, [r6, #1] <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
39984: e58d7000 str r7, [sp] <== NOT EXECUTED
39988: ebffff32 bl 39658 <rtems_rfs_block_map_indirect_shrink> <== NOT EXECUTED
singly, direct);
if (rc)
3998c: e3500000 cmp r0, #0 <== NOT EXECUTED
39990: 1affffe2 bne 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
39994: e1898c08 orr r8, r9, r8, lsl #24 <== NOT EXECUTED
39998: e1886806 orr r6, r8, r6, lsl #16 <== NOT EXECUTED
3999c: e186640b orr r6, r6, fp, lsl #8 <== NOT EXECUTED
399a0: eaffff6e b 39760 <rtems_rfs_block_map_shrink+0x58> <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
399a4: e3590000 cmp r9, #0 <== NOT EXECUTED
399a8: 1affffd6 bne 39908 <rtems_rfs_block_map_shrink+0x200> <== NOT EXECUTED
399ac: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
399b0: e3530000 cmp r3, #0 <== NOT EXECUTED
399b4: e5849010 str r9, [r4, #16] <== NOT EXECUTED
399b8: e3a00000 mov r0, #0 <== NOT EXECUTED
399bc: 12499001 subne r9, r9, #1 <== NOT EXECUTED
399c0: e5843014 str r3, [r4, #20] <== NOT EXECUTED
399c4: e5840018 str r0, [r4, #24] <== NOT EXECUTED
399c8: 15849010 strne r9, [r4, #16] <== NOT EXECUTED
399cc: 1affffd3 bne 39920 <rtems_rfs_block_map_shrink+0x218> <== NOT EXECUTED
399d0: eaffffd1 b 3991c <rtems_rfs_block_map_shrink+0x214> <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
399d4: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
399d8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
399dc: e1520003 cmp r2, r3 <== NOT EXECUTED
399e0: 8afffff2 bhi 399b0 <rtems_rfs_block_map_shrink+0x2a8> <== NOT EXECUTED
399e4: eaffffcc b 3991c <rtems_rfs_block_map_shrink+0x214> <== NOT EXECUTED
00043f2c <rtems_rfs_buffer_bdbuf_release>:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
43f2c: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
43f30: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
43f34: 0a000003 beq 43f48 <rtems_rfs_buffer_bdbuf_release+0x1c> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified (buffer);
43f38: ebff013b bl 442c <rtems_bdbuf_release_modified> <== NOT EXECUTED
else
sc = rtems_bdbuf_release (buffer);
if (sc != RTEMS_SUCCESSFUL)
43f3c: e3500000 cmp r0, #0 <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
43f40: 13a00005 movne r0, #5 <== NOT EXECUTED
43f44: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
43f48: ebff0159 bl 44b4 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
43f4c: e3500000 cmp r0, #0 <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
43f50: 13a00005 movne r0, #5 <== NOT EXECUTED
43f54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00043f58 <rtems_rfs_buffer_bdbuf_request>:
rtems_rfs_buffer** buffer)
{
rtems_status_code sc;
int rc = 0;
if (read)
43f58: e31200ff tst r2, #255 ; 0xff <== NOT EXECUTED
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
43f5c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
43f60: e1a02001 mov r2, r1 <== NOT EXECUTED
rtems_status_code sc;
int rc = 0;
if (read)
43f64: 0a000005 beq 43f80 <rtems_rfs_buffer_bdbuf_request+0x28> <== NOT EXECUTED
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
43f68: e590000c ldr r0, [r0, #12] <== NOT EXECUTED
43f6c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
43f70: ebff05e0 bl 56f8 <rtems_bdbuf_read> <== NOT EXECUTED
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
if (sc != RTEMS_SUCCESSFUL)
43f74: e3500000 cmp r0, #0 <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
43f78: 13a00005 movne r0, #5 <== NOT EXECUTED
43f7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int rc = 0;
if (read)
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
43f80: e590000c ldr r0, [r0, #12] <== NOT EXECUTED
43f84: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
43f88: ebff05a6 bl 5628 <rtems_bdbuf_get> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
43f8c: e3500000 cmp r0, #0 <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
43f90: 13a00005 movne r0, #5 <== NOT EXECUTED
43f94: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0003a378 <rtems_rfs_buffer_close>:
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
3a378: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
3a37c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
3a380: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
3a384: e1a04000 mov r4, r0 <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
3a388: ebffffe3 bl 3a31c <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
3a38c: e1a05000 mov r5, r0 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
3a390: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
3a394: ebff31a4 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
3a398: e1a00005 mov r0, r5 <== NOT EXECUTED
3a39c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003a754 <rtems_rfs_buffer_handle_close>:
* @return int The error number (errno). No error if 0.
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
3a754: e92d4010 push {r4, lr} <== NOT EXECUTED
3a758: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_buffer_handle_release (fs, handle);
3a75c: ebffff26 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3a760: e3a00000 mov r0, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3a764: e5840008 str r0, [r4, #8] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3a768: e5c40000 strb r0, [r4] <== NOT EXECUTED
handle->bnum = 0;
3a76c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
handle->buffer = NULL;
return 0;
}
3a770: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003a3fc <rtems_rfs_buffer_handle_release>:
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
3a3fc: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
3a400: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
3a404: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3a408: e1a04001 mov r4, r1 <== NOT EXECUTED
3a40c: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
3a410: 01a06003 moveq r6, r3 <== NOT EXECUTED
3a414: 0a000008 beq 3a43c <rtems_rfs_buffer_handle_release+0x40> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
3a418: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
3a41c: e3560000 cmp r6, #0 <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
3a420: c2466001 subgt r6, r6, #1 <== NOT EXECUTED
3a424: c5836034 strgt r6, [r3, #52] ; 0x34 <== NOT EXECUTED
if (rtems_rfs_buffer_refs (handle) == 0)
3a428: e3560000 cmp r6, #0 <== NOT EXECUTED
3a42c: 13a06000 movne r6, #0 <== NOT EXECUTED
3a430: 0a000003 beq 3a444 <rtems_rfs_buffer_handle_release+0x48> <== NOT EXECUTED
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
3a434: e3a03000 mov r3, #0 <== NOT EXECUTED
3a438: e5843008 str r3, [r4, #8] <== NOT EXECUTED
}
return rc;
}
3a43c: e1a00006 mov r0, r6 <== NOT EXECUTED
3a440: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
3a444: e1a00003 mov r0, r3 <== NOT EXECUTED
3a448: ebff4b2b bl d0fc <_Chain_Extract> <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
3a44c: e595304c ldr r3, [r5, #76] ; 0x4c <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
3a450: e5952000 ldr r2, [r5] <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
3a454: e2433001 sub r3, r3, #1 <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
3a458: e3120002 tst r2, #2 <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
3a45c: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
3a460: 1a00001c bne 3a4d8 <rtems_rfs_buffer_handle_release+0xdc> <== NOT EXECUTED
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
3a464: e595205c ldr r2, [r5, #92] ; 0x5c <== NOT EXECUTED
3a468: e595306c ldr r3, [r5, #108] ; 0x6c <== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
3a46c: e595103c ldr r1, [r5, #60] ; 0x3c <== NOT EXECUTED
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
3a470: e0830002 add r0, r3, r2 <== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
3a474: e1500001 cmp r0, r1 <== NOT EXECUTED
3a478: 3a00000c bcc 3a4b0 <rtems_rfs_buffer_handle_release+0xb4> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
3a47c: e1520003 cmp r2, r3 <== NOT EXECUTED
3a480: 8a000021 bhi 3a50c <rtems_rfs_buffer_handle_release+0x110> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
3a484: e2850060 add r0, r5, #96 ; 0x60 <== NOT EXECUTED
3a488: ebff4b24 bl d120 <_Chain_Get> <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
3a48c: e595306c ldr r3, [r5, #108] ; 0x6c <== NOT EXECUTED
3a490: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3a494: e585306c str r3, [r5, #108] ; 0x6c <== NOT EXECUTED
3a498: e3a06001 mov r6, #1 <== NOT EXECUTED
modified = true;
}
buffer->user = (void*) 0;
3a49c: e3a03000 mov r3, #0 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
3a4a0: e1a01006 mov r1, r6 <== NOT EXECUTED
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
3a4a4: e5803038 str r3, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
3a4a8: eb00269f bl 43f2c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
3a4ac: e1a06000 mov r6, r0 <== NOT EXECUTED
}
if (rtems_rfs_buffer_dirty (handle))
3a4b0: e5d43000 ldrb r3, [r4] <== NOT EXECUTED
3a4b4: e3530000 cmp r3, #0 <== NOT EXECUTED
3a4b8: 0a00000c beq 3a4f0 <rtems_rfs_buffer_handle_release+0xf4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
3a4bc: e2850060 add r0, r5, #96 ; 0x60 <== NOT EXECUTED
3a4c0: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
3a4c4: ebff4b01 bl d0d0 <_Chain_Append> <== NOT EXECUTED
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
3a4c8: e595306c ldr r3, [r5, #108] ; 0x6c <== NOT EXECUTED
3a4cc: e2833001 add r3, r3, #1 <== NOT EXECUTED
3a4d0: e585306c str r3, [r5, #108] ; 0x6c <== NOT EXECUTED
3a4d4: eaffffd6 b 3a434 <rtems_rfs_buffer_handle_release+0x38> <== NOT EXECUTED
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
3a4d8: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (handle->buffer,
3a4dc: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
3a4e0: e5806038 str r6, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (handle->buffer,
3a4e4: eb002690 bl 43f2c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
3a4e8: e1a06000 mov r6, r0 <== NOT EXECUTED
3a4ec: eaffffd0 b 3a434 <rtems_rfs_buffer_handle_release+0x38> <== NOT EXECUTED
3a4f0: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED
3a4f4: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
3a4f8: ebff4af4 bl d0d0 <_Chain_Append> <== NOT EXECUTED
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
3a4fc: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED
3a500: e2833001 add r3, r3, #1 <== NOT EXECUTED
3a504: e585305c str r3, [r5, #92] ; 0x5c <== NOT EXECUTED
3a508: eaffffc9 b 3a434 <rtems_rfs_buffer_handle_release+0x38> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
3a50c: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED
3a510: ebff4b02 bl d120 <_Chain_Get> <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
3a514: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED
3a518: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3a51c: e585305c str r3, [r5, #92] ; 0x5c <== NOT EXECUTED
3a520: eaffffdd b 3a49c <rtems_rfs_buffer_handle_release+0xa0> <== NOT EXECUTED
0003a524 <rtems_rfs_buffer_handle_request>:
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
3a524: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
3a528: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
3a52c: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
3a530: e3510000 cmp r1, #0 <== NOT EXECUTED
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
3a534: e1a06000 mov r6, r0 <== NOT EXECUTED
3a538: e1a04002 mov r4, r2 <== NOT EXECUTED
3a53c: e20370ff and r7, r3, #255 ; 0xff <== NOT EXECUTED
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
3a540: 0a00000d beq 3a57c <rtems_rfs_buffer_handle_request+0x58> <== NOT EXECUTED
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
3a544: e3520000 cmp r2, #0 <== NOT EXECUTED
3a548: 0a000003 beq 3a55c <rtems_rfs_buffer_handle_request+0x38> <== NOT EXECUTED
3a54c: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
3a550: e1530002 cmp r3, r2 <== NOT EXECUTED
3a554: 03a00000 moveq r0, #0 <== NOT EXECUTED
3a558: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
3a55c: e1a00006 mov r0, r6 <== NOT EXECUTED
3a560: e1a01005 mov r1, r5 <== NOT EXECUTED
3a564: ebffffa4 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (rc > 0)
3a568: e3500000 cmp r0, #0 <== NOT EXECUTED
3a56c: c8bd85f0 popgt {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return rc;
handle->dirty = false;
3a570: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
3a574: e5853004 str r3, [r5, #4] <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
3a578: e5c53000 strb r3, [r5] <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
3a57c: e596104c ldr r1, [r6, #76] ; 0x4c <== NOT EXECUTED
3a580: e3510000 cmp r1, #0 <== NOT EXECUTED
3a584: 0595a008 ldreq sl, [r5, #8] <== NOT EXECUTED
3a588: 0a000005 beq 3a5a4 <rtems_rfs_buffer_handle_request+0x80> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
3a58c: e5968048 ldr r8, [r6, #72] ; 0x48 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
3a590: e2862040 add r2, r6, #64 ; 0x40 <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
3a594: e1580002 cmp r8, r2 <== NOT EXECUTED
3a598: 1a000018 bne 3a600 <rtems_rfs_buffer_handle_request+0xdc> <== NOT EXECUTED
3a59c: e3a0a000 mov sl, #0 <== NOT EXECUTED
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
3a5a0: e585a008 str sl, [r5, #8] <== NOT EXECUTED
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
3a5a4: e5963000 ldr r3, [r6] <== NOT EXECUTED
3a5a8: e3130002 tst r3, #2 <== NOT EXECUTED
3a5ac: 1a00003c bne 3a6a4 <rtems_rfs_buffer_handle_request+0x180> <== NOT EXECUTED
3a5b0: e35a0000 cmp sl, #0 <== NOT EXECUTED
3a5b4: 0a00001e beq 3a634 <rtems_rfs_buffer_handle_request+0x110> <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
3a5b8: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
3a5bc: e1a0a001 mov sl, r1 <== NOT EXECUTED
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
3a5c0: e59a3034 ldr r3, [sl, #52] ; 0x34 <== NOT EXECUTED
3a5c4: e2833001 add r3, r3, #1 <== NOT EXECUTED
3a5c8: e58a3034 str r3, [sl, #52] ; 0x34 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
3a5cc: e2860040 add r0, r6, #64 ; 0x40 <== NOT EXECUTED
3a5d0: ebff4abe bl d0d0 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
3a5d4: e596204c ldr r2, [r6, #76] ; 0x4c <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
3a5d8: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
3a5dc: e2822001 add r2, r2, #1 <== NOT EXECUTED
3a5e0: e586204c str r2, [r6, #76] ; 0x4c <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
3a5e4: e5834038 str r4, [r3, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = block;
3a5e8: e5854004 str r4, [r5, #4] <== NOT EXECUTED
3a5ec: e3a00000 mov r0, #0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
3a5f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
3a5f4: e5988004 ldr r8, [r8, #4] <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
3a5f8: e1580002 cmp r8, r2 <== NOT EXECUTED
3a5fc: 0affffe6 beq 3a59c <rtems_rfs_buffer_handle_request+0x78> <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
3a600: e5983038 ldr r3, [r8, #56] ; 0x38 <== NOT EXECUTED
3a604: e1530004 cmp r3, r4 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
3a608: e1a0a008 mov sl, r8 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
3a60c: 1afffff8 bne 3a5f4 <rtems_rfs_buffer_handle_request+0xd0> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
3a610: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3a614: e586104c str r1, [r6, #76] ; 0x4c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
3a618: e1a00008 mov r0, r8 <== NOT EXECUTED
3a61c: ebff4ab6 bl d0fc <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
3a620: e3a03000 mov r3, #0 <== NOT EXECUTED
3a624: e5883000 str r3, [r8] <== NOT EXECUTED
3a628: e5883004 str r3, [r8, #4] <== NOT EXECUTED
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
3a62c: e585a008 str sl, [r5, #8] <== NOT EXECUTED
3a630: eaffffdb b 3a5a4 <rtems_rfs_buffer_handle_request+0x80> <== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
3a634: e596105c ldr r1, [r6, #92] ; 0x5c <== NOT EXECUTED
3a638: e3510000 cmp r1, #0 <== NOT EXECUTED
3a63c: 1a000028 bne 3a6e4 <rtems_rfs_buffer_handle_request+0x1c0> <== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
3a640: e596106c ldr r1, [r6, #108] ; 0x6c <== NOT EXECUTED
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
3a644: e3510000 cmp r1, #0 <== NOT EXECUTED
3a648: 0a000018 beq 3a6b0 <rtems_rfs_buffer_handle_request+0x18c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
3a64c: e5968068 ldr r8, [r6, #104] ; 0x68 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
3a650: e2862060 add r2, r6, #96 ; 0x60 <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
3a654: e1580002 cmp r8, r2 <== NOT EXECUTED
3a658: 1a000003 bne 3a66c <rtems_rfs_buffer_handle_request+0x148> <== NOT EXECUTED
3a65c: ea000039 b 3a748 <rtems_rfs_buffer_handle_request+0x224> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
3a660: e5988004 ldr r8, [r8, #4] <== NOT EXECUTED
3a664: e1520008 cmp r2, r8 <== NOT EXECUTED
3a668: 0a000036 beq 3a748 <rtems_rfs_buffer_handle_request+0x224> <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
3a66c: e5983038 ldr r3, [r8, #56] ; 0x38 <== NOT EXECUTED
3a670: e1530004 cmp r3, r4 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
3a674: e1a0a008 mov sl, r8 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
3a678: 1afffff8 bne 3a660 <rtems_rfs_buffer_handle_request+0x13c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
3a67c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3a680: e586106c str r1, [r6, #108] ; 0x6c <== NOT EXECUTED
3a684: e1a00008 mov r0, r8 <== NOT EXECUTED
3a688: ebff4a9b bl d0fc <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
3a68c: e3a03000 mov r3, #0 <== NOT EXECUTED
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
rtems_rfs_buffer_mark_dirty (handle);
3a690: e3a02001 mov r2, #1 <== NOT EXECUTED
3a694: e5883000 str r3, [r8] <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
3a698: e5858008 str r8, [r5, #8] <== NOT EXECUTED
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
rtems_rfs_buffer_mark_dirty (handle);
3a69c: e5c52000 strb r2, [r5] <== NOT EXECUTED
3a6a0: e5883004 str r3, [r8, #4] <== NOT EXECUTED
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
3a6a4: e35a0000 cmp sl, #0 <== NOT EXECUTED
3a6a8: 15951008 ldrne r1, [r5, #8] <== NOT EXECUTED
3a6ac: 1affffc3 bne 3a5c0 <rtems_rfs_buffer_handle_request+0x9c> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
3a6b0: e1a01004 mov r1, r4 <== NOT EXECUTED
3a6b4: e2853008 add r3, r5, #8 <== NOT EXECUTED
3a6b8: e1a02007 mov r2, r7 <== NOT EXECUTED
3a6bc: e1a00006 mov r0, r6 <== NOT EXECUTED
3a6c0: eb002624 bl 43f58 <rtems_rfs_buffer_bdbuf_request> <== NOT EXECUTED
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
3a6c4: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
3a6c8: e3a03000 mov r3, #0 <== NOT EXECUTED
if (rc > 0)
3a6cc: e3500000 cmp r0, #0 <== NOT EXECUTED
3a6d0: e5813000 str r3, [r1] <== NOT EXECUTED
3a6d4: e5813004 str r3, [r1, #4] <== NOT EXECUTED
3a6d8: c8bd85f0 popgt {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
3a6dc: e1a0a001 mov sl, r1 <== NOT EXECUTED
3a6e0: eaffffb6 b 3a5c0 <rtems_rfs_buffer_handle_request+0x9c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
3a6e4: e5968058 ldr r8, [r6, #88] ; 0x58 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
3a6e8: e2862050 add r2, r6, #80 ; 0x50 <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
3a6ec: e1580002 cmp r8, r2 <== NOT EXECUTED
3a6f0: 1a000003 bne 3a704 <rtems_rfs_buffer_handle_request+0x1e0> <== NOT EXECUTED
3a6f4: ea000010 b 3a73c <rtems_rfs_buffer_handle_request+0x218> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
3a6f8: e5988004 ldr r8, [r8, #4] <== NOT EXECUTED
3a6fc: e1580002 cmp r8, r2 <== NOT EXECUTED
3a700: 0a00000d beq 3a73c <rtems_rfs_buffer_handle_request+0x218> <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
3a704: e5983038 ldr r3, [r8, #56] ; 0x38 <== NOT EXECUTED
3a708: e1530004 cmp r3, r4 <== NOT EXECUTED
3a70c: 1afffff9 bne 3a6f8 <rtems_rfs_buffer_handle_request+0x1d4> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
3a710: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3a714: e586105c str r1, [r6, #92] ; 0x5c <== NOT EXECUTED
3a718: e1a00008 mov r0, r8 <== NOT EXECUTED
3a71c: ebff4a76 bl d0fc <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
3a720: e3a03000 mov r3, #0 <== NOT EXECUTED
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
3a724: e3580000 cmp r8, #0 <== NOT EXECUTED
3a728: e5883000 str r3, [r8] <== NOT EXECUTED
3a72c: e5883004 str r3, [r8, #4] <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
3a730: e5858008 str r8, [r5, #8] <== NOT EXECUTED
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
3a734: 1affff9f bne 3a5b8 <rtems_rfs_buffer_handle_request+0x94> <== NOT EXECUTED
3a738: eaffffc0 b 3a640 <rtems_rfs_buffer_handle_request+0x11c> <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
3a73c: e3a03000 mov r3, #0 <== NOT EXECUTED
3a740: e5853008 str r3, [r5, #8] <== NOT EXECUTED
3a744: eaffffbd b 3a640 <rtems_rfs_buffer_handle_request+0x11c> <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
3a748: e3a03000 mov r3, #0 <== NOT EXECUTED
3a74c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
3a750: eaffffd6 b 3a6b0 <rtems_rfs_buffer_handle_request+0x18c> <== NOT EXECUTED
0003a3a0 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
3a3a0: e92d4010 push {r4, lr} <== NOT EXECUTED
3a3a4: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
3a3a8: e1a04001 mov r4, r1 <== NOT EXECUTED
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
3a3ac: e1a0100d mov r1, sp <== NOT EXECUTED
3a3b0: ebff3ca0 bl 9638 <stat> <== NOT EXECUTED
3a3b4: e3500000 cmp r0, #0 <== NOT EXECUTED
3a3b8: b3a00002 movlt r0, #2 <== NOT EXECUTED
3a3bc: ba000004 blt 3a3d4 <rtems_rfs_buffer_open+0x34> <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
3a3c0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
3a3c4: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
3a3c8: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
3a3cc: 0a000002 beq 3a3dc <rtems_rfs_buffer_open+0x3c> <== NOT EXECUTED
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
3a3d0: e3a00005 mov r0, #5 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
3a3d4: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
3a3d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
3a3dc: e28d1018 add r1, sp, #24 <== NOT EXECUTED
3a3e0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3a3e4: ebff30fc bl 67dc <rtems_disk_obtain> <== NOT EXECUTED
if (!fs->disk)
3a3e8: e3500000 cmp r0, #0 <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
3a3ec: e584000c str r0, [r4, #12] <== NOT EXECUTED
if (!fs->disk)
3a3f0: 13a00000 movne r0, #0 <== NOT EXECUTED
3a3f4: 1afffff6 bne 3a3d4 <rtems_rfs_buffer_open+0x34> <== NOT EXECUTED
3a3f8: eafffff4 b 3a3d0 <rtems_rfs_buffer_open+0x30> <== NOT EXECUTED
0003a31c <rtems_rfs_buffer_setblksize>:
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
3a31c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3a320: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3a324: e1a05000 mov r5, r0 <== NOT EXECUTED
3a328: e28d4004 add r4, sp, #4 <== NOT EXECUTED
3a32c: e5241004 str r1, [r4, #-4]! <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
3a330: ebffffdb bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
3a334: e1a00005 mov r0, r5 <== NOT EXECUTED
3a338: ebffffeb bl 3a2ec <rtems_rfs_buffer_sync> <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
3a33c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
3a340: e3a01102 mov r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED
3a344: e2811911 add r1, r1, #278528 ; 0x44000 <== NOT EXECUTED
3a348: e2811f81 add r1, r1, #516 ; 0x204 <== NOT EXECUTED
3a34c: e1a0200d mov r2, sp <== NOT EXECUTED
3a350: e1a00003 mov r0, r3 <== NOT EXECUTED
3a354: e1a0e00f mov lr, pc <== NOT EXECUTED
3a358: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
if (rc < 0)
3a35c: e3500000 cmp r0, #0 <== NOT EXECUTED
3a360: ba000001 blt 3a36c <rtems_rfs_buffer_setblksize+0x50> <== NOT EXECUTED
rc = errno;
#endif
return rc;
}
3a364: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3a368: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
3a36c: eb0028b3 bl 44640 <__errno> <== NOT EXECUTED
3a370: e5900000 ldr r0, [r0] <== NOT EXECUTED
3a374: eafffffa b 3a364 <rtems_rfs_buffer_setblksize+0x48> <== NOT EXECUTED
0003a2ec <rtems_rfs_buffer_sync>:
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
3a2ec: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
3a2f0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3a2f4: e1a04000 mov r4, r0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
3a2f8: e8930003 ldm r3, {r0, r1} <== NOT EXECUTED
3a2fc: ebff25c3 bl 3a10 <rtems_bdbuf_syncdev> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3a300: e3500000 cmp r0, #0 <== NOT EXECUTED
3a304: 13a05005 movne r5, #5 <== NOT EXECUTED
3a308: 03a05000 moveq r5, #0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
3a30c: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
3a310: ebff31c5 bl 6a2c <rtems_disk_release> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
3a314: e1a00005 mov r0, r5 <== NOT EXECUTED
3a318: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003a2a4 <rtems_rfs_buffers_release>:
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
3a2a4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
3a2a8: e280105c add r1, r0, #92 ; 0x5c <== NOT EXECUTED
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
3a2ac: e1a04000 mov r4, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
3a2b0: e3a02000 mov r2, #0 <== NOT EXECUTED
3a2b4: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED
3a2b8: ebffffdd bl 3a234 <rtems_rfs_release_chain> <== NOT EXECUTED
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
3a2bc: e284106c add r1, r4, #108 ; 0x6c <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
3a2c0: e1c05fc0 bic r5, r0, r0, asr #31 <== NOT EXECUTED
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
3a2c4: e3a02001 mov r2, #1 <== NOT EXECUTED
3a2c8: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
3a2cc: ebffffd8 bl 3a234 <rtems_rfs_release_chain> <== NOT EXECUTED
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
3a2d0: e2753001 rsbs r3, r5, #1 <== NOT EXECUTED
3a2d4: 33a03000 movcc r3, #0 <== NOT EXECUTED
3a2d8: e3500000 cmp r0, #0 <== NOT EXECUTED
3a2dc: d3a03000 movle r3, #0 <== NOT EXECUTED
rrc = rc;
return rrc;
}
3a2e0: e3530000 cmp r3, #0 <== NOT EXECUTED
3a2e4: 01a00005 moveq r0, r5 <== NOT EXECUTED
3a2e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003ad58 <rtems_rfs_dir_add_entry>:
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
3ad58: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3ad5c: e24dd098 sub sp, sp, #152 ; 0x98 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
3ad60: e28d602c add r6, sp, #44 ; 0x2c <== NOT EXECUTED
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
3ad64: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
3ad68: e1a02006 mov r2, r6 <== NOT EXECUTED
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
3ad6c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
3ad70: e1a04000 mov r4, r0 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
3ad74: ebfffcd5 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3ad78: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3ad7c: da000002 ble 3ad8c <rtems_rfs_dir_add_entry+0x34> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
3ad80: e1a00009 mov r0, r9 <== NOT EXECUTED
3ad84: e28dd098 add sp, sp, #152 ; 0x98 <== NOT EXECUTED
3ad88: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
3ad8c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3ad90: e3a00801 mov r0, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3ad94: e3a03000 mov r3, #0 <== NOT EXECUTED
3ad98: e2400001 sub r0, r0, #1 <== NOT EXECUTED
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
3ad9c: e281100a add r1, r1, #10 <== NOT EXECUTED
3ada0: e58d3090 str r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3ada4: e5cd307c strb r3, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
3ada8: e58d3080 str r3, [sp, #128] ; 0x80 <== NOT EXECUTED
handle->buffer = NULL;
3adac: e58d3084 str r3, [sp, #132] ; 0x84 <== NOT EXECUTED
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
3adb0: e58d3088 str r3, [sp, #136] ; 0x88 <== NOT EXECUTED
bpos->boff = 0;
3adb4: e58d308c str r3, [sp, #140] ; 0x8c <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3adb8: e58d0000 str r0, [sp] <== NOT EXECUTED
3adbc: e28da088 add sl, sp, #136 ; 0x88 <== NOT EXECUTED
3adc0: e28d7094 add r7, sp, #148 ; 0x94 <== NOT EXECUTED
3adc4: e28d807c add r8, sp, #124 ; 0x7c <== NOT EXECUTED
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
3adc8: e58d101c str r1, [sp, #28] <== NOT EXECUTED
3adcc: ea000002 b 3addc <rtems_rfs_dir_add_entry+0x84> <== NOT EXECUTED
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3add0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
3add4: e253200a subs r2, r3, #10 <== NOT EXECUTED
3add8: 1a000026 bne 3ae78 <rtems_rfs_dir_add_entry+0x120> <== NOT EXECUTED
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
3addc: e1a00004 mov r0, r4 <== NOT EXECUTED
3ade0: e1a01006 mov r1, r6 <== NOT EXECUTED
3ade4: e1a0200a mov r2, sl <== NOT EXECUTED
3ade8: e1a03007 mov r3, r7 <== NOT EXECUTED
3adec: ebfff995 bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
if (rc > 0)
3adf0: e3500000 cmp r0, #0 <== NOT EXECUTED
3adf4: d3a05001 movle r5, #1 <== NOT EXECUTED
3adf8: da000009 ble 3ae24 <rtems_rfs_dir_add_entry+0xcc> <== NOT EXECUTED
{
if (rc != ENXIO)
3adfc: e3500006 cmp r0, #6 <== NOT EXECUTED
3ae00: 1a000062 bne 3af90 <rtems_rfs_dir_add_entry+0x238> <== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
3ae04: e1a00004 mov r0, r4 <== NOT EXECUTED
3ae08: e1a01006 mov r1, r6 <== NOT EXECUTED
3ae0c: e3a02001 mov r2, #1 <== NOT EXECUTED
3ae10: e1a03007 mov r3, r7 <== NOT EXECUTED
3ae14: ebfffb41 bl 39b20 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
3ae18: e3500000 cmp r0, #0 <== NOT EXECUTED
3ae1c: ca00005b bgt 3af90 <rtems_rfs_dir_add_entry+0x238> <== NOT EXECUTED
3ae20: e3a05000 mov r5, #0 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
3ae24: e59dc088 ldr ip, [sp, #136] ; 0x88 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
3ae28: e1a00004 mov r0, r4 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
3ae2c: e28cc001 add ip, ip, #1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
3ae30: e1a01008 mov r1, r8 <== NOT EXECUTED
3ae34: e59d2094 ldr r2, [sp, #148] ; 0x94 <== NOT EXECUTED
3ae38: e1a03005 mov r3, r5 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
3ae3c: e58dc088 str ip, [sp, #136] ; 0x88 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
3ae40: ebfffdb7 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3ae44: e3500000 cmp r0, #0 <== NOT EXECUTED
3ae48: ca000050 bgt 3af90 <rtems_rfs_dir_add_entry+0x238> <== NOT EXECUTED
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
3ae4c: e59d3084 ldr r3, [sp, #132] ; 0x84 <== NOT EXECUTED
if (!read)
3ae50: e3550000 cmp r5, #0 <== NOT EXECUTED
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
3ae54: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
if (!read)
3ae58: 1affffdc bne 3add0 <rtems_rfs_dir_add_entry+0x78> <== NOT EXECUTED
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
3ae5c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
3ae60: e1a00005 mov r0, r5 <== NOT EXECUTED
3ae64: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3ae68: eb00332b bl 47b1c <memset> <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3ae6c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
3ae70: e253200a subs r2, r3, #10 <== NOT EXECUTED
3ae74: 0affffd8 beq 3addc <rtems_rfs_dir_add_entry+0x84> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3ae78: e5d50008 ldrb r0, [r5, #8] <== NOT EXECUTED
3ae7c: e5d51009 ldrb r1, [r5, #9] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3ae80: e59d9000 ldr r9, [sp] <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3ae84: e285c008 add ip, r5, #8 <== NOT EXECUTED
3ae88: e285e009 add lr, r5, #9 <== NOT EXECUTED
3ae8c: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
3ae90: e58de014 str lr, [sp, #20] <== NOT EXECUTED
3ae94: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3ae98: e1510009 cmp r1, r9 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3ae9c: e285c002 add ip, r5, #2 <== NOT EXECUTED
3aea0: e1a09005 mov r9, r5 <== NOT EXECUTED
3aea4: e5d50001 ldrb r0, [r5, #1] <== NOT EXECUTED
3aea8: e4d9b001 ldrb fp, [r9], #1 <== NOT EXECUTED
3aeac: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
3aeb0: e285e003 add lr, r5, #3 <== NOT EXECUTED
3aeb4: e5d5c002 ldrb ip, [r5, #2] <== NOT EXECUTED
3aeb8: e58de00c str lr, [sp, #12] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3aebc: 03a00000 moveq r0, #0 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3aec0: e5d5e003 ldrb lr, [r5, #3] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3aec4: 0a000046 beq 3afe4 <rtems_rfs_dir_add_entry+0x28c> <== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3aec8: e351000a cmp r1, #10 <== NOT EXECUTED
3aecc: da00003b ble 3afc0 <rtems_rfs_dir_add_entry+0x268> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3aed0: e18eec0b orr lr, lr, fp, lsl #24 <== NOT EXECUTED
3aed4: e18ee40c orr lr, lr, ip, lsl #8 <== NOT EXECUTED
3aed8: e594b018 ldr fp, [r4, #24] <== NOT EXECUTED
3aedc: e18e0800 orr r0, lr, r0, lsl #16 <== NOT EXECUTED
3aee0: e3a0e000 mov lr, #0 <== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3aee4: e3500000 cmp r0, #0 <== NOT EXECUTED
3aee8: 1151000b cmpne r1, fp <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
3aeec: e08ee001 add lr, lr, r1 <== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3aef0: 2a000032 bcs 3afc0 <rtems_rfs_dir_add_entry+0x268> <== NOT EXECUTED
3aef4: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED
3aef8: e15c0000 cmp ip, r0 <== NOT EXECUTED
3aefc: 3a00002f bcc 3afc0 <rtems_rfs_dir_add_entry+0x268> <== NOT EXECUTED
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3af00: e15e0002 cmp lr, r2 <== NOT EXECUTED
3af04: e1a0000e mov r0, lr <== NOT EXECUTED
3af08: 2affffb3 bcs 3addc <rtems_rfs_dir_add_entry+0x84> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
3af0c: e0855001 add r5, r5, r1 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3af10: e5d5c008 ldrb ip, [r5, #8] <== NOT EXECUTED
3af14: e5d51009 ldrb r1, [r5, #9] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3af18: e59d9000 ldr r9, [sp] <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3af1c: e181140c orr r1, r1, ip, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3af20: e1510009 cmp r1, r9 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3af24: e1a09005 mov r9, r5 <== NOT EXECUTED
3af28: e4d9c001 ldrb ip, [r9], #1 <== NOT EXECUTED
3af2c: e58dc028 str ip, [sp, #40] ; 0x28 <== NOT EXECUTED
3af30: e5d5c001 ldrb ip, [r5, #1] <== NOT EXECUTED
3af34: e58dc024 str ip, [sp, #36] ; 0x24 <== NOT EXECUTED
3af38: e5d5c002 ldrb ip, [r5, #2] <== NOT EXECUTED
3af3c: e58dc020 str ip, [sp, #32] <== NOT EXECUTED
3af40: e5d5c003 ldrb ip, [r5, #3] <== NOT EXECUTED
3af44: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3af48: e285c008 add ip, r5, #8 <== NOT EXECUTED
3af4c: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
3af50: e285c009 add ip, r5, #9 <== NOT EXECUTED
3af54: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
3af58: e285c002 add ip, r5, #2 <== NOT EXECUTED
3af5c: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
3af60: e285c003 add ip, r5, #3 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3af64: 0a00001d beq 3afe0 <rtems_rfs_dir_add_entry+0x288> <== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3af68: e351000a cmp r1, #10 <== NOT EXECUTED
3af6c: da000013 ble 3afc0 <rtems_rfs_dir_add_entry+0x268> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3af70: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED
3af74: e59dc028 ldr ip, [sp, #40] ; 0x28 <== NOT EXECUTED
3af78: e1890c0c orr r0, r9, ip, lsl #24 <== NOT EXECUTED
3af7c: e59d9024 ldr r9, [sp, #36] ; 0x24 <== NOT EXECUTED
3af80: e59dc020 ldr ip, [sp, #32] <== NOT EXECUTED
3af84: e1800809 orr r0, r0, r9, lsl #16 <== NOT EXECUTED
3af88: e180040c orr r0, r0, ip, lsl #8 <== NOT EXECUTED
3af8c: eaffffd4 b 3aee4 <rtems_rfs_dir_add_entry+0x18c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3af90: e1a01008 mov r1, r8 <== NOT EXECUTED
3af94: e1a09000 mov r9, r0 <== NOT EXECUTED
3af98: e1a00004 mov r0, r4 <== NOT EXECUTED
3af9c: ebfffd16 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3afa0: e3a03000 mov r3, #0 <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
3afa4: e1a00004 mov r0, r4 <== NOT EXECUTED
3afa8: e1a01006 mov r1, r6 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3afac: e58d3084 str r3, [sp, #132] ; 0x84 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3afb0: e5cd307c strb r3, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
3afb4: e58d3080 str r3, [sp, #128] ; 0x80 <== NOT EXECUTED
3afb8: ebfffbd1 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3afbc: eaffff6f b 3ad80 <rtems_rfs_dir_add_entry+0x28> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
3afc0: e1a01008 mov r1, r8 <== NOT EXECUTED
3afc4: e1a00004 mov r0, r4 <== NOT EXECUTED
3afc8: ebfffde1 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3afcc: e1a00004 mov r0, r4 <== NOT EXECUTED
3afd0: e1a01006 mov r1, r6 <== NOT EXECUTED
3afd4: ebfffbca bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
3afd8: e3a09005 mov r9, #5 <== NOT EXECUTED
return EIO;
3afdc: eaffff67 b 3ad80 <rtems_rfs_dir_add_entry+0x28> <== NOT EXECUTED
3afe0: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
3afe4: e59de01c ldr lr, [sp, #28] <== NOT EXECUTED
3afe8: e0603003 rsb r3, r0, r3 <== NOT EXECUTED
3afec: e15e0003 cmp lr, r3 <== NOT EXECUTED
3aff0: 2affff79 bcs 3addc <rtems_rfs_dir_add_entry+0x84> <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
3aff4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
3aff8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
3affc: eb0023e5 bl 43f98 <rtems_rfs_dir_hash> <== NOT EXECUTED
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
3b000: e59d70bc ldr r7, [sp, #188] ; 0xbc <== NOT EXECUTED
3b004: e1a0c005 mov ip, r5 <== NOT EXECUTED
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
3b008: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
3b00c: e1a01820 lsr r1, r0, #16 <== NOT EXECUTED
3b010: e1a0e420 lsr lr, r0, #8 <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
3b014: e1a03c27 lsr r3, r7, #24 <== NOT EXECUTED
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
3b018: e5c52004 strb r2, [r5, #4] <== NOT EXECUTED
3b01c: e5c51005 strb r1, [r5, #5] <== NOT EXECUTED
3b020: e5c50007 strb r0, [r5, #7] <== NOT EXECUTED
3b024: e5c5e006 strb lr, [r5, #6] <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
3b028: e1a01827 lsr r1, r7, #16 <== NOT EXECUTED
3b02c: e4cc300a strb r3, [ip], #10 <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
3b030: e59de01c ldr lr, [sp, #28] <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
3b034: e1a02427 lsr r2, r7, #8 <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
3b038: e59d7004 ldr r7, [sp, #4] <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
3b03c: e5c91000 strb r1, [r9] <== NOT EXECUTED
3b040: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
3b044: e5c92000 strb r2, [r9] <== NOT EXECUTED
3b048: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
3b04c: e1a0042e lsr r0, lr, #8 <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
3b050: e59de0bc ldr lr, [sp, #188] ; 0xbc <== NOT EXECUTED
3b054: e5c1e000 strb lr, [r1] <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
3b058: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
3b05c: e5c20000 strb r0, [r2] <== NOT EXECUTED
3b060: e287300a add r3, r7, #10 <== NOT EXECUTED
3b064: e59d7014 ldr r7, [sp, #20] <== NOT EXECUTED
3b068: e5c73000 strb r3, [r7] <== NOT EXECUTED
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
3b06c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3b070: e1a0000c mov r0, ip <== NOT EXECUTED
3b074: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
3b078: eb003220 bl 47900 <memcpy> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&buffer);
3b07c: e3a03001 mov r3, #1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
3b080: e1a01008 mov r1, r8 <== NOT EXECUTED
3b084: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
3b088: e5cd307c strb r3, [sp, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
3b08c: ebfffdb0 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3b090: e1a00004 mov r0, r4 <== NOT EXECUTED
3b094: e1a01006 mov r1, r6 <== NOT EXECUTED
3b098: ebfffb99 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
3b09c: e3a09000 mov r9, #0 <== NOT EXECUTED
return 0;
3b0a0: eaffff36 b 3ad80 <rtems_rfs_dir_add_entry+0x28> <== NOT EXECUTED
0003aa54 <rtems_rfs_dir_del_entry>:
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
3aa54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3aa58: e24dd07c sub sp, sp, #124 ; 0x7c <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
3aa5c: e28d601c add r6, sp, #28 <== NOT EXECUTED
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
3aa60: e1a05002 mov r5, r2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
3aa64: e1a02006 mov r2, r6 <== NOT EXECUTED
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
3aa68: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
3aa6c: e1a04000 mov r4, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
3aa70: ebfffd96 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3aa74: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3aa78: da000002 ble 3aa88 <rtems_rfs_dir_del_entry+0x34> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
3aa7c: e1a0000b mov r0, fp <== NOT EXECUTED
3aa80: e28dd07c add sp, sp, #124 ; 0x7c <== NOT EXECUTED
3aa84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
3aa88: e3a07000 mov r7, #0 <== NOT EXECUTED
3aa8c: e28dc078 add ip, sp, #120 ; 0x78 <== NOT EXECUTED
3aa90: e1a00004 mov r0, r4 <== NOT EXECUTED
3aa94: e1a01006 mov r1, r6 <== NOT EXECUTED
3aa98: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
3aa9c: e1a03007 mov r3, r7 <== NOT EXECUTED
3aaa0: e58dc000 str ip, [sp] <== NOT EXECUTED
3aaa4: ebfffacf bl 395e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3aaa8: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3aaac: da000005 ble 3aac8 <rtems_rfs_dir_del_entry+0x74> <== NOT EXECUTED
{
if (rc == ENXIO)
3aab0: e35b0006 cmp fp, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
3aab4: e1a00004 mov r0, r4 <== NOT EXECUTED
3aab8: e1a01006 mov r1, r6 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
3aabc: 03a0b002 moveq fp, #2 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
3aac0: ebfffd0f bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3aac4: eaffffec b 3aa7c <rtems_rfs_dir_del_entry+0x28> <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
3aac8: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
3aacc: e2722001 rsbs r2, r2, #1 <== NOT EXECUTED
3aad0: 33a02000 movcc r2, #0 <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3aad4: e3a09801 mov r9, #65536 ; 0x10000 <== NOT EXECUTED
handle->buffer = NULL;
3aad8: e58d7074 str r7, [sp, #116] ; 0x74 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3aadc: e5cd706c strb r7, [sp, #108] ; 0x6c <== NOT EXECUTED
handle->bnum = 0;
3aae0: e58d7070 str r7, [sp, #112] ; 0x70 <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
3aae4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
3aae8: e58d500c str r5, [sp, #12] <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3aaec: e2499001 sub r9, r9, #1 <== NOT EXECUTED
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
3aaf0: e1a00004 mov r0, r4 <== NOT EXECUTED
3aaf4: e28d106c add r1, sp, #108 ; 0x6c <== NOT EXECUTED
3aaf8: e59d2078 ldr r2, [sp, #120] ; 0x78 <== NOT EXECUTED
3aafc: e3a03001 mov r3, #1 <== NOT EXECUTED
3ab00: ebfffe87 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3ab04: e3500000 cmp r0, #0 <== NOT EXECUTED
3ab08: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
3ab0c: ca00004b bgt 3ac40 <rtems_rfs_dir_del_entry+0x1ec> <== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
3ab10: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3ab14: e3530000 cmp r3, #0 <== NOT EXECUTED
3ab18: 0a00003e beq 3ac18 <rtems_rfs_dir_del_entry+0x1c4> <== NOT EXECUTED
3ab1c: e594c008 ldr ip, [r4, #8] <== NOT EXECUTED
3ab20: e3a03000 mov r3, #0 <== NOT EXECUTED
3ab24: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
3ab28: e1a00003 mov r0, r3 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3ab2c: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
3ab30: e59d2074 ldr r2, [sp, #116] ; 0x74 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3ab34: e24ce00a sub lr, ip, #10 <== NOT EXECUTED
3ab38: e153000e cmp r3, lr <== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
3ab3c: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3ab40: 2a00003b bcs 3ac34 <rtems_rfs_dir_del_entry+0x1e0> <== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
3ab44: e0827003 add r7, r2, r3 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3ab48: e5d71009 ldrb r1, [r7, #9] <== NOT EXECUTED
3ab4c: e5d78008 ldrb r8, [r7, #8] <== NOT EXECUTED
3ab50: e1818408 orr r8, r1, r8, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3ab54: e1580009 cmp r8, r9 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3ab58: e7d21003 ldrb r1, [r2, r3] <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3ab5c: e287b008 add fp, r7, #8 <== NOT EXECUTED
3ab60: e287a009 add sl, r7, #9 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
3ab64: e5d73001 ldrb r3, [r7, #1] <== NOT EXECUTED
3ab68: e5d7c002 ldrb ip, [r7, #2] <== NOT EXECUTED
3ab6c: e5d72003 ldrb r2, [r7, #3] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3ab70: 0a00002f beq 3ac34 <rtems_rfs_dir_del_entry+0x1e0> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3ab74: e358000a cmp r8, #10 <== NOT EXECUTED
3ab78: da000024 ble 3ac10 <rtems_rfs_dir_del_entry+0x1bc> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3ab7c: e1822c01 orr r2, r2, r1, lsl #24 <== NOT EXECUTED
3ab80: e1823803 orr r3, r2, r3, lsl #16 <== NOT EXECUTED
3ab84: e183340c orr r3, r3, ip, lsl #8 <== NOT EXECUTED
3ab88: e5945018 ldr r5, [r4, #24] <== NOT EXECUTED
3ab8c: ea00001c b 3ac04 <rtems_rfs_dir_del_entry+0x1b0> <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3ab90: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
3ab94: e1520003 cmp r2, r3 <== NOT EXECUTED
3ab98: 3a00001c bcc 3ac10 <rtems_rfs_dir_del_entry+0x1bc> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
3ab9c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
3aba0: e1530002 cmp r3, r2 <== NOT EXECUTED
3aba4: 0a000039 beq 3ac90 <rtems_rfs_dir_del_entry+0x23c> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
3aba8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
3abac: e3520000 cmp r2, #0 <== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
3abb0: e0877008 add r7, r7, r8 <== NOT EXECUTED
eoffset += elength;
3abb4: e0800008 add r0, r0, r8 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
3abb8: 0a000014 beq 3ac10 <rtems_rfs_dir_del_entry+0x1bc> <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3abbc: e150000e cmp r0, lr <== NOT EXECUTED
3abc0: 2a00001b bcs 3ac34 <rtems_rfs_dir_del_entry+0x1e0> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3abc4: e5d73009 ldrb r3, [r7, #9] <== NOT EXECUTED
3abc8: e5d78008 ldrb r8, [r7, #8] <== NOT EXECUTED
3abcc: e1838408 orr r8, r3, r8, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3abd0: e1580009 cmp r8, r9 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3abd4: e5d7c000 ldrb ip, [r7] <== NOT EXECUTED
3abd8: e5d72001 ldrb r2, [r7, #1] <== NOT EXECUTED
3abdc: e5d73002 ldrb r3, [r7, #2] <== NOT EXECUTED
3abe0: e5d71003 ldrb r1, [r7, #3] <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3abe4: e287b008 add fp, r7, #8 <== NOT EXECUTED
3abe8: e287a009 add sl, r7, #9 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3abec: 0a000010 beq 3ac34 <rtems_rfs_dir_del_entry+0x1e0> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3abf0: e358000a cmp r8, #10 <== NOT EXECUTED
3abf4: da000005 ble 3ac10 <rtems_rfs_dir_del_entry+0x1bc> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3abf8: e1811c0c orr r1, r1, ip, lsl #24 <== NOT EXECUTED
3abfc: e1811802 orr r1, r1, r2, lsl #16 <== NOT EXECUTED
3ac00: e1813403 orr r3, r1, r3, lsl #8 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3ac04: e3530000 cmp r3, #0 <== NOT EXECUTED
3ac08: 11580005 cmpne r8, r5 <== NOT EXECUTED
3ac0c: 3affffdf bcc 3ab90 <rtems_rfs_dir_del_entry+0x13c> <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
3ac10: e3a0b005 mov fp, #5 <== NOT EXECUTED
3ac14: ea00000a b 3ac44 <rtems_rfs_dir_del_entry+0x1f0> <== NOT EXECUTED
* skip to the offset in the block.
*/
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
3ac18: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
3ac1c: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
3ac20: e1a01002 mov r1, r2 <== NOT EXECUTED
3ac24: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
3ac28: eb0086e7 bl 5c7cc <__umodsi3> <== NOT EXECUTED
3ac2c: e1a03000 mov r3, r0 <== NOT EXECUTED
3ac30: eaffffbd b 3ab2c <rtems_rfs_dir_del_entry+0xd8> <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
3ac34: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
3ac38: e3530000 cmp r3, #0 <== NOT EXECUTED
3ac3c: 0a000007 beq 3ac60 <rtems_rfs_dir_del_entry+0x20c> <== NOT EXECUTED
3ac40: e59db018 ldr fp, [sp, #24] <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
3ac44: e28d106c add r1, sp, #108 ; 0x6c <== NOT EXECUTED
3ac48: e1a00004 mov r0, r4 <== NOT EXECUTED
3ac4c: ebfffec0 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3ac50: e1a00004 mov r0, r4 <== NOT EXECUTED
3ac54: e1a01006 mov r1, r6 <== NOT EXECUTED
3ac58: ebfffca9 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3ac5c: eaffff86 b 3aa7c <rtems_rfs_dir_del_entry+0x28> <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3ac60: e1a00004 mov r0, r4 <== NOT EXECUTED
3ac64: e1a01006 mov r1, r6 <== NOT EXECUTED
3ac68: e28d2078 add r2, sp, #120 ; 0x78 <== NOT EXECUTED
3ac6c: ebfffa50 bl 395b4 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
3ac70: e3500006 cmp r0, #6 <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3ac74: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
if (rc == ENXIO)
3ac78: 0a000034 beq 3ad50 <rtems_rfs_dir_del_entry+0x2fc> <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
3ac7c: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED
3ac80: e35c0000 cmp ip, #0 <== NOT EXECUTED
3ac84: 0affff99 beq 3aaf0 <rtems_rfs_dir_del_entry+0x9c> <== NOT EXECUTED
3ac88: e1a0b00c mov fp, ip <== NOT EXECUTED
3ac8c: eaffffec b 3ac44 <rtems_rfs_dir_del_entry+0x1f0> <== NOT EXECUTED
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
3ac90: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
3ac94: e0805008 add r5, r0, r8 <== NOT EXECUTED
3ac98: e065500c rsb r5, r5, ip <== NOT EXECUTED
3ac9c: e1a0900a mov r9, sl <== NOT EXECUTED
memmove (entry, entry + elength, remaining);
3aca0: e0871008 add r1, r7, r8 <== NOT EXECUTED
3aca4: e1a0a000 mov sl, r0 <== NOT EXECUTED
3aca8: e1a02005 mov r2, r5 <== NOT EXECUTED
3acac: e1a00007 mov r0, r7 <== NOT EXECUTED
3acb0: e58db004 str fp, [sp, #4] <== NOT EXECUTED
3acb4: eb00334d bl 479f0 <memmove> <== NOT EXECUTED
memset (entry + remaining, 0xff, elength);
3acb8: e1a02008 mov r2, r8 <== NOT EXECUTED
3acbc: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3acc0: e0870005 add r0, r7, r5 <== NOT EXECUTED
3acc4: eb003394 bl 47b1c <memset> <== NOT EXECUTED
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
3acc8: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
3accc: e5d92000 ldrb r2, [r9] <== NOT EXECUTED
3acd0: e5d31000 ldrb r1, [r3] <== NOT EXECUTED
3acd4: e3a03801 mov r3, #65536 ; 0x10000 <== NOT EXECUTED
3acd8: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3acdc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3ace0: e1520003 cmp r2, r3 <== NOT EXECUTED
3ace4: 035a0000 cmpeq sl, #0 <== NOT EXECUTED
3ace8: 1a00000a bne 3ad18 <rtems_rfs_dir_del_entry+0x2c4> <== NOT EXECUTED
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
3acec: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
3acf0: e3530000 cmp r3, #0 <== NOT EXECUTED
3acf4: 159d2024 ldrne r2, [sp, #36] ; 0x24 <== NOT EXECUTED
3acf8: 1a000010 bne 3ad40 <rtems_rfs_dir_del_entry+0x2ec> <== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
3acfc: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
3ad00: e3520000 cmp r2, #0 <== NOT EXECUTED
3ad04: 1a00000d bne 3ad40 <rtems_rfs_dir_del_entry+0x2ec> <== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
3ad08: e1a00004 mov r0, r4 <== NOT EXECUTED
3ad0c: e1a01006 mov r1, r6 <== NOT EXECUTED
3ad10: e3a02001 mov r2, #1 <== NOT EXECUTED
3ad14: ebfffa7b bl 39708 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
3ad18: e3a03001 mov r3, #1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
3ad1c: e28d106c add r1, sp, #108 ; 0x6c <== NOT EXECUTED
3ad20: e1a00004 mov r0, r4 <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
3ad24: e5cd306c strb r3, [sp, #108] ; 0x6c <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
3ad28: ebfffe89 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3ad2c: e1a00004 mov r0, r4 <== NOT EXECUTED
3ad30: e1a01006 mov r1, r6 <== NOT EXECUTED
3ad34: ebfffc72 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
3ad38: e3a0b000 mov fp, #0 <== NOT EXECUTED
return 0;
3ad3c: eaffff4e b 3aa7c <rtems_rfs_dir_del_entry+0x28> <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
3ad40: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3ad44: e1530002 cmp r3, r2 <== NOT EXECUTED
3ad48: 1afffff2 bne 3ad18 <rtems_rfs_dir_del_entry+0x2c4> <== NOT EXECUTED
3ad4c: eaffffed b 3ad08 <rtems_rfs_dir_del_entry+0x2b4> <== NOT EXECUTED
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
3ad50: e3a0b002 mov fp, #2 <== NOT EXECUTED
3ad54: eaffffba b 3ac44 <rtems_rfs_dir_del_entry+0x1f0> <== NOT EXECUTED
0003b308 <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
3b308: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3b30c: e24dd064 sub sp, sp, #100 ; 0x64 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
3b310: e28d6004 add r6, sp, #4 <== NOT EXECUTED
3b314: e1a02006 mov r2, r6 <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
3b318: e1a04000 mov r4, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
3b31c: ebfffb6b bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3b320: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3b324: da000002 ble 3b334 <rtems_rfs_dir_empty+0x2c> <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
3b328: e1a00008 mov r0, r8 <== NOT EXECUTED
3b32c: e28dd064 add sp, sp, #100 ; 0x64 <== NOT EXECUTED
3b330: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
3b334: e28dc060 add ip, sp, #96 ; 0x60 <== NOT EXECUTED
3b338: e1a00004 mov r0, r4 <== NOT EXECUTED
3b33c: e1a01006 mov r1, r6 <== NOT EXECUTED
3b340: e3a02000 mov r2, #0 <== NOT EXECUTED
3b344: e3a03000 mov r3, #0 <== NOT EXECUTED
3b348: e58dc000 str ip, [sp] <== NOT EXECUTED
3b34c: ebfff8a5 bl 395e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3b350: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3b354: ca00005e bgt 3b4d4 <rtems_rfs_dir_empty+0x1cc> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3b358: e3a03000 mov r3, #0 <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b35c: e3a05801 mov r5, #65536 ; 0x10000 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3b360: e58d305c str r3, [sp, #92] ; 0x5c <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3b364: e5cd3054 strb r3, [sp, #84] ; 0x54 <== NOT EXECUTED
handle->bnum = 0;
3b368: e58d3058 str r3, [sp, #88] ; 0x58 <== NOT EXECUTED
3b36c: e2455001 sub r5, r5, #1 <== NOT EXECUTED
3b370: e28d7054 add r7, sp, #84 ; 0x54 <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
3b374: e1a00004 mov r0, r4 <== NOT EXECUTED
3b378: e1a01007 mov r1, r7 <== NOT EXECUTED
3b37c: e59d2060 ldr r2, [sp, #96] ; 0x60 <== NOT EXECUTED
3b380: e3a03001 mov r3, #1 <== NOT EXECUTED
3b384: ebfffc66 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3b388: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3b38c: ca00003c bgt 3b484 <rtems_rfs_dir_empty+0x17c> <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b390: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
3b394: e59d305c ldr r3, [sp, #92] ; 0x5c <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b398: e259900a subs r9, r9, #10 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
3b39c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b3a0: 0a000042 beq 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3b3a4: e5d31008 ldrb r1, [r3, #8] <== NOT EXECUTED
3b3a8: e5d32009 ldrb r2, [r3, #9] <== NOT EXECUTED
3b3ac: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b3b0: e1520005 cmp r2, r5 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3b3b4: e5d3e000 ldrb lr, [r3] <== NOT EXECUTED
3b3b8: e5d3c001 ldrb ip, [r3, #1] <== NOT EXECUTED
3b3bc: e5d30002 ldrb r0, [r3, #2] <== NOT EXECUTED
3b3c0: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b3c4: 0a000039 beq 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3b3c8: e352000a cmp r2, #10 <== NOT EXECUTED
3b3cc: da000037 ble 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3b3d0: e1811c0e orr r1, r1, lr, lsl #24 <== NOT EXECUTED
3b3d4: e181180c orr r1, r1, ip, lsl #16 <== NOT EXECUTED
3b3d8: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
3b3dc: e594a018 ldr sl, [r4, #24] <== NOT EXECUTED
3b3e0: e3a0c000 mov ip, #0 <== NOT EXECUTED
3b3e4: ea000019 b 3b450 <rtems_rfs_dir_empty+0x148> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
3b3e8: e352000c cmp r2, #12 <== NOT EXECUTED
3b3ec: 1a000022 bne 3b47c <rtems_rfs_dir_empty+0x174> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
3b3f0: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
3b3f4: e351002e cmp r1, #46 ; 0x2e <== NOT EXECUTED
3b3f8: 1a00001f bne 3b47c <rtems_rfs_dir_empty+0x174> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE + 1] != '.')))
3b3fc: e5d3100b ldrb r1, [r3, #11] <== NOT EXECUTED
3b400: e351002e cmp r1, #46 ; 0x2e <== NOT EXECUTED
3b404: 1a00001c bne 3b47c <rtems_rfs_dir_empty+0x174> <== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
3b408: e08cc002 add ip, ip, r2 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b40c: e15c0009 cmp ip, r9 <== NOT EXECUTED
3b410: 2a000026 bcs 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
3b414: e0833002 add r3, r3, r2 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3b418: e5d31008 ldrb r1, [r3, #8] <== NOT EXECUTED
3b41c: e5d32009 ldrb r2, [r3, #9] <== NOT EXECUTED
3b420: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b424: e1520005 cmp r2, r5 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3b428: e5d3b000 ldrb fp, [r3] <== NOT EXECUTED
3b42c: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
3b430: e5d30002 ldrb r0, [r3, #2] <== NOT EXECUTED
3b434: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b438: 0a00001c beq 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3b43c: e352000a cmp r2, #10 <== NOT EXECUTED
3b440: da00001a ble 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3b444: e1811c0b orr r1, r1, fp, lsl #24 <== NOT EXECUTED
3b448: e181180e orr r1, r1, lr, lsl #16 <== NOT EXECUTED
3b44c: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3b450: e3510000 cmp r1, #0 <== NOT EXECUTED
3b454: 1152000a cmpne r2, sl <== NOT EXECUTED
3b458: 2a000014 bcs 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
3b45c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3b460: e1500001 cmp r0, r1 <== NOT EXECUTED
3b464: 3a000011 bcc 3b4b0 <rtems_rfs_dir_empty+0x1a8> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
3b468: e352000b cmp r2, #11 <== NOT EXECUTED
3b46c: 1affffdd bne 3b3e8 <rtems_rfs_dir_empty+0xe0> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
3b470: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
3b474: e351002e cmp r1, #46 ; 0x2e <== NOT EXECUTED
3b478: 0affffe2 beq 3b408 <rtems_rfs_dir_empty+0x100> <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
3b47c: e3580000 cmp r8, #0 <== NOT EXECUTED
3b480: 03a0805a moveq r8, #90 ; 0x5a <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3b484: e1a01007 mov r1, r7 <== NOT EXECUTED
3b488: e1a00004 mov r0, r4 <== NOT EXECUTED
3b48c: ebfffbda bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3b490: e3a03000 mov r3, #0 <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
3b494: e1a00004 mov r0, r4 <== NOT EXECUTED
3b498: e1a01006 mov r1, r6 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3b49c: e58d305c str r3, [sp, #92] ; 0x5c <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3b4a0: e5cd3054 strb r3, [sp, #84] ; 0x54 <== NOT EXECUTED
handle->bnum = 0;
3b4a4: e58d3058 str r3, [sp, #88] ; 0x58 <== NOT EXECUTED
3b4a8: ebfffa95 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3b4ac: eaffff9d b 3b328 <rtems_rfs_dir_empty+0x20> <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3b4b0: e1a00004 mov r0, r4 <== NOT EXECUTED
3b4b4: e1a01006 mov r1, r6 <== NOT EXECUTED
3b4b8: e28d2060 add r2, sp, #96 ; 0x60 <== NOT EXECUTED
3b4bc: ebfff83c bl 395b4 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
3b4c0: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3b4c4: daffffaa ble 3b374 <rtems_rfs_dir_empty+0x6c> <== NOT EXECUTED
{
if (rc == ENXIO)
3b4c8: e3580006 cmp r8, #6 <== NOT EXECUTED
3b4cc: 03a08000 moveq r8, #0 <== NOT EXECUTED
3b4d0: eaffffeb b 3b484 <rtems_rfs_dir_empty+0x17c> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
3b4d4: e1a00004 mov r0, r4 <== NOT EXECUTED
3b4d8: e1a01006 mov r1, r6 <== NOT EXECUTED
3b4dc: ebfffa88 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3b4e0: eaffff90 b 3b328 <rtems_rfs_dir_empty+0x20> <== NOT EXECUTED
00043f98 <rtems_rfs_dir_hash>:
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
43f98: e281320e add r3, r1, #-536870912 ; 0xe0000000 <== NOT EXECUTED
43f9c: e2433983 sub r3, r3, #2146304 ; 0x20c000 <== NOT EXECUTED
43fa0: e2433da5 sub r3, r3, #10560 ; 0x2940 <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
43fa4: e351000c cmp r1, #12 <== NOT EXECUTED
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
43fa8: e2433021 sub r3, r3, #33 ; 0x21 <== NOT EXECUTED
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
43fac: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp} <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
43fb0: 91a0c003 movls ip, r3 <== NOT EXECUTED
43fb4: 91a02003 movls r2, r3 <== NOT EXECUTED
43fb8: 9a000032 bls 44088 <rtems_rfs_dir_hash+0xf0> <== NOT EXECUTED
43fbc: e1a0c003 mov ip, r3 <== NOT EXECUTED
43fc0: e1a02003 mov r2, r3 <== NOT EXECUTED
{
a += k[0];
43fc4: e5d09002 ldrb r9, [r0, #2] <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
43fc8: e5d0800a ldrb r8, [r0, #10] <== NOT EXECUTED
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
43fcc: e5d05001 ldrb r5, [r0, #1] <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
43fd0: e5d04009 ldrb r4, [r0, #9] <== NOT EXECUTED
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
43fd4: e5d0a000 ldrb sl, [r0] <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
43fd8: e5d06006 ldrb r6, [r0, #6] <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
43fdc: e5d07008 ldrb r7, [r0, #8] <== NOT EXECUTED
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
43fe0: e1a09809 lsl r9, r9, #16 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
43fe4: e1a08808 lsl r8, r8, #16 <== NOT EXECUTED
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
43fe8: e0899405 add r9, r9, r5, lsl #8 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
43fec: e0888404 add r8, r8, r4, lsl #8 <== NOT EXECUTED
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
43ff0: e5d05003 ldrb r5, [r0, #3] <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
43ff4: e5d04005 ldrb r4, [r0, #5] <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
43ff8: e5d0b00b ldrb fp, [r0, #11] <== NOT EXECUTED
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
43ffc: e089a00a add sl, r9, sl <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
44000: e1a06806 lsl r6, r6, #16 <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
44004: e5d09004 ldrb r9, [r0, #4] <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
44008: e0887007 add r7, r8, r7 <== NOT EXECUTED
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
4400c: e08aac05 add sl, sl, r5, lsl #24 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
44010: e0864404 add r4, r6, r4, lsl #8 <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
44014: e5d05007 ldrb r5, [r0, #7] <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
44018: e0877c0b add r7, r7, fp, lsl #24 <== NOT EXECUTED
c += ((uint32_t)k[11])<<24;
4401c: e0873003 add r3, r7, r3 <== NOT EXECUTED
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
44020: e08a2002 add r2, sl, r2 <== NOT EXECUTED
b += k[4];
b += ((uint32_t)k[5])<<8;
44024: e0844009 add r4, r4, r9 <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
44028: e0844c05 add r4, r4, r5, lsl #24 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
4402c: e0632002 rsb r2, r3, r2 <== NOT EXECUTED
44030: e0222e63 eor r2, r2, r3, ror #28 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
44034: e084c00c add ip, r4, ip <== NOT EXECUTED
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
44038: e062600c rsb r6, r2, ip <== NOT EXECUTED
4403c: e0266d62 eor r6, r6, r2, ror #26 <== NOT EXECUTED
44040: e083300c add r3, r3, ip <== NOT EXECUTED
44044: e0664003 rsb r4, r6, r3 <== NOT EXECUTED
44048: e0244c66 eor r4, r4, r6, ror #24 <== NOT EXECUTED
4404c: e0823003 add r3, r2, r3 <== NOT EXECUTED
44050: e0642003 rsb r2, r4, r3 <== NOT EXECUTED
44054: e0222864 eor r2, r2, r4, ror #16 <== NOT EXECUTED
44058: e0866003 add r6, r6, r3 <== NOT EXECUTED
4405c: e062c006 rsb ip, r2, r6 <== NOT EXECUTED
44060: e02cc6e2 eor ip, ip, r2, ror #13 <== NOT EXECUTED
44064: e0844006 add r4, r4, r6 <== NOT EXECUTED
length -= 12;
44068: e241100c sub r1, r1, #12 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
4406c: e0822004 add r2, r2, r4 <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
44070: e351000c cmp r1, #12 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
44074: e06c4004 rsb r4, ip, r4 <== NOT EXECUTED
44078: e0243e6c eor r3, r4, ip, ror #28 <== NOT EXECUTED
length -= 12;
k += 12;
4407c: e280000c add r0, r0, #12 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
44080: e08cc002 add ip, ip, r2 <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
44084: 8affffce bhi 43fc4 <rtems_rfs_dir_hash+0x2c> <== NOT EXECUTED
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
44088: e2411001 sub r1, r1, #1 <== NOT EXECUTED
4408c: e351000b cmp r1, #11 <== NOT EXECUTED
44090: 979ff101 ldrls pc, [pc, r1, lsl #2] <== NOT EXECUTED
44094: ea000031 b 44160 <rtems_rfs_dir_hash+0x1c8> <== NOT EXECUTED
44098: 00044120 .word 0x00044120 <== NOT EXECUTED
4409c: 00044118 .word 0x00044118 <== NOT EXECUTED
440a0: 00044110 .word 0x00044110 <== NOT EXECUTED
440a4: 00044108 .word 0x00044108 <== NOT EXECUTED
440a8: 00044100 .word 0x00044100 <== NOT EXECUTED
440ac: 000440f8 .word 0x000440f8 <== NOT EXECUTED
440b0: 000440f0 .word 0x000440f0 <== NOT EXECUTED
440b4: 000440e8 .word 0x000440e8 <== NOT EXECUTED
440b8: 000440e0 .word 0x000440e0 <== NOT EXECUTED
440bc: 000440d8 .word 0x000440d8 <== NOT EXECUTED
440c0: 000440d0 .word 0x000440d0 <== NOT EXECUTED
440c4: 000440c8 .word 0x000440c8 <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
440c8: e5d0100b ldrb r1, [r0, #11] <== NOT EXECUTED
440cc: e0833c01 add r3, r3, r1, lsl #24 <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
440d0: e5d0100a ldrb r1, [r0, #10] <== NOT EXECUTED
440d4: e0833801 add r3, r3, r1, lsl #16 <== NOT EXECUTED
case 10: c+=((uint32_t)k[9])<<8;
440d8: e5d01009 ldrb r1, [r0, #9] <== NOT EXECUTED
440dc: e0833401 add r3, r3, r1, lsl #8 <== NOT EXECUTED
case 9 : c+=k[8];
440e0: e5d01008 ldrb r1, [r0, #8] <== NOT EXECUTED
440e4: e0833001 add r3, r3, r1 <== NOT EXECUTED
case 8 : b+=((uint32_t)k[7])<<24;
440e8: e5d01007 ldrb r1, [r0, #7] <== NOT EXECUTED
440ec: e08ccc01 add ip, ip, r1, lsl #24 <== NOT EXECUTED
case 7 : b+=((uint32_t)k[6])<<16;
440f0: e5d01006 ldrb r1, [r0, #6] <== NOT EXECUTED
440f4: e08cc801 add ip, ip, r1, lsl #16 <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
440f8: e5d01005 ldrb r1, [r0, #5] <== NOT EXECUTED
440fc: e08cc401 add ip, ip, r1, lsl #8 <== NOT EXECUTED
case 5 : b+=k[4];
44100: e5d01004 ldrb r1, [r0, #4] <== NOT EXECUTED
44104: e08cc001 add ip, ip, r1 <== NOT EXECUTED
case 4 : a+=((uint32_t)k[3])<<24;
44108: e5d01003 ldrb r1, [r0, #3] <== NOT EXECUTED
4410c: e0822c01 add r2, r2, r1, lsl #24 <== NOT EXECUTED
case 3 : a+=((uint32_t)k[2])<<16;
44110: e5d01002 ldrb r1, [r0, #2] <== NOT EXECUTED
44114: e0822801 add r2, r2, r1, lsl #16 <== NOT EXECUTED
case 2 : a+=((uint32_t)k[1])<<8;
44118: e5d01001 ldrb r1, [r0, #1] <== NOT EXECUTED
4411c: e0822401 add r2, r2, r1, lsl #8 <== NOT EXECUTED
case 1 : a+=k[0];
44120: e5d01000 ldrb r1, [r0] <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
44124: e023300c eor r3, r3, ip <== NOT EXECUTED
44128: e043396c sub r3, r3, ip, ror #18 <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
4412c: e0822001 add r2, r2, r1 <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
44130: e0232002 eor r2, r3, r2 <== NOT EXECUTED
44134: e0422ae3 sub r2, r2, r3, ror #21 <== NOT EXECUTED
44138: e022c00c eor ip, r2, ip <== NOT EXECUTED
4413c: e04cc3e2 sub ip, ip, r2, ror #7 <== NOT EXECUTED
44140: e02c3003 eor r3, ip, r3 <== NOT EXECUTED
44144: e043186c sub r1, r3, ip, ror #16 <== NOT EXECUTED
44148: e0212002 eor r2, r1, r2 <== NOT EXECUTED
4414c: e0422e61 sub r2, r2, r1, ror #28 <== NOT EXECUTED
44150: e022c00c eor ip, r2, ip <== NOT EXECUTED
44154: e04cc962 sub ip, ip, r2, ror #18 <== NOT EXECUTED
44158: e02c3001 eor r3, ip, r1 <== NOT EXECUTED
4415c: e043346c sub r3, r3, ip, ror #8 <== NOT EXECUTED
return c;
}
44160: e1a00003 mov r0, r3 <== NOT EXECUTED
44164: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp} <== NOT EXECUTED
44168: e12fff1e bx lr <== NOT EXECUTED
0003b0a4 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
3b0a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3b0a8: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
3b0ac: e59d5094 ldr r5, [sp, #148] ; 0x94 <== NOT EXECUTED
3b0b0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
3b0b4: e59d2098 ldr r2, [sp, #152] ; 0x98 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
3b0b8: e3a06000 mov r6, #0 <== NOT EXECUTED
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
3b0bc: e28db010 add fp, sp, #16 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
3b0c0: e5856000 str r6, [r5] <== NOT EXECUTED
*offset = 0;
3b0c4: e5826000 str r6, [r2] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
3b0c8: e1a0200b mov r2, fp <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
3b0cc: e1a08003 mov r8, r3 <== NOT EXECUTED
3b0d0: e1a04000 mov r4, r0 <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
3b0d4: ebfffbfd bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3b0d8: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3b0dc: da000002 ble 3b0ec <rtems_rfs_dir_lookup_ino+0x48> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
3b0e0: e1a00009 mov r0, r9 <== NOT EXECUTED
3b0e4: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
3b0e8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
3b0ec: e1a01008 mov r1, r8 <== NOT EXECUTED
3b0f0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3b0f4: e5cd6060 strb r6, [sp, #96] ; 0x60 <== NOT EXECUTED
handle->bnum = 0;
3b0f8: e58d6064 str r6, [sp, #100] ; 0x64 <== NOT EXECUTED
handle->buffer = NULL;
3b0fc: e58d6068 str r6, [sp, #104] ; 0x68 <== NOT EXECUTED
3b100: eb0023a4 bl 43f98 <rtems_rfs_dir_hash> <== NOT EXECUTED
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
3b104: e28dc06c add ip, sp, #108 ; 0x6c <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
3b108: e1a07000 mov r7, r0 <== NOT EXECUTED
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
3b10c: e1a0100b mov r1, fp <== NOT EXECUTED
3b110: e1a00004 mov r0, r4 <== NOT EXECUTED
3b114: e3a02000 mov r2, #0 <== NOT EXECUTED
3b118: e3a03000 mov r3, #0 <== NOT EXECUTED
3b11c: e58dc000 str ip, [sp] <== NOT EXECUTED
3b120: ebfff930 bl 395e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3b124: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3b128: da00000b ble 3b15c <rtems_rfs_dir_lookup_ino+0xb8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3b12c: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED
3b130: e1a00004 mov r0, r4 <== NOT EXECUTED
3b134: ebfffcb0 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
3b138: e3590006 cmp r9, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
3b13c: e1a00004 mov r0, r4 <== NOT EXECUTED
3b140: e1a0100b mov r1, fp <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
3b144: 03a09002 moveq r9, #2 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3b148: e58d6068 str r6, [sp, #104] ; 0x68 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3b14c: e5cd6060 strb r6, [sp, #96] ; 0x60 <== NOT EXECUTED
handle->bnum = 0;
3b150: e58d6064 str r6, [sp, #100] ; 0x64 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
3b154: ebfffb6a bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3b158: eaffffe0 b 3b0e0 <rtems_rfs_dir_lookup_ino+0x3c> <== NOT EXECUTED
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b15c: e3a06801 mov r6, #65536 ; 0x10000 <== NOT EXECUTED
3b160: e58d9008 str r9, [sp, #8] <== NOT EXECUTED
3b164: e2466001 sub r6, r6, #1 <== NOT EXECUTED
3b168: e1a0a007 mov sl, r7 <== NOT EXECUTED
3b16c: e1a09008 mov r9, r8 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
3b170: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
3b174: e3520000 cmp r2, #0 <== NOT EXECUTED
3b178: 1a00005b bne 3b2ec <rtems_rfs_dir_lookup_ino+0x248> <== NOT EXECUTED
3b17c: e59d206c ldr r2, [sp, #108] ; 0x6c <== NOT EXECUTED
3b180: e3520000 cmp r2, #0 <== NOT EXECUTED
3b184: 0a00005a beq 3b2f4 <rtems_rfs_dir_lookup_ino+0x250> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
3b188: e1a00004 mov r0, r4 <== NOT EXECUTED
3b18c: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED
3b190: e3a03001 mov r3, #1 <== NOT EXECUTED
3b194: ebfffce2 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3b198: e3500000 cmp r0, #0 <== NOT EXECUTED
3b19c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
3b1a0: ca000040 bgt 3b2a8 <rtems_rfs_dir_lookup_ino+0x204> <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1a4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
3b1a8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1ac: e353000a cmp r3, #10 <== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
3b1b0: e59d3068 ldr r3, [sp, #104] ; 0x68 <== NOT EXECUTED
map.bpos.boff = 0;
3b1b4: e58d2024 str r2, [sp, #36] ; 0x24 <== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
3b1b8: e5937020 ldr r7, [r3, #32] <== NOT EXECUTED
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1bc: 1a000008 bne 3b1e4 <rtems_rfs_dir_lookup_ino+0x140> <== NOT EXECUTED
3b1c0: ea000035 b 3b29c <rtems_rfs_dir_lookup_ino+0x1f8> <== NOT EXECUTED
3b1c4: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
3b1c8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1cc: e242200a sub r2, r2, #10 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
3b1d0: e0883003 add r3, r8, r3 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1d4: e1520003 cmp r2, r3 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
3b1d8: e58d3024 str r3, [sp, #36] ; 0x24 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3b1dc: 9a00002e bls 3b29c <rtems_rfs_dir_lookup_ino+0x1f8> <== NOT EXECUTED
return 0;
}
}
map.bpos.boff += elength;
entry += elength;
3b1e0: e0877008 add r7, r7, r8 <== NOT EXECUTED
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
3b1e4: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
3b1e8: e5d70009 ldrb r0, [r7, #9] <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
3b1ec: e5d73003 ldrb r3, [r7, #3] <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
3b1f0: e5d78008 ldrb r8, [r7, #8] <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
3b1f4: e5d71001 ldrb r1, [r7, #1] <== NOT EXECUTED
3b1f8: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
3b1fc: e1808408 orr r8, r0, r8, lsl #8 <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
3b200: e5d70005 ldrb r0, [r7, #5] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
3b204: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
3b208: e5d71004 ldrb r1, [r7, #4] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
3b20c: e5d72002 ldrb r2, [r7, #2] <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
3b210: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
3b214: e1800c01 orr r0, r0, r1, lsl #24 <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
3b218: e5d71007 ldrb r1, [r7, #7] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
3b21c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
3b220: e5d72006 ldrb r2, [r7, #6] <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
3b224: e1801001 orr r1, r0, r1 <== NOT EXECUTED
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b228: e1580006 cmp r8, r6 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
3b22c: e1811402 orr r1, r1, r2, lsl #8 <== NOT EXECUTED
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
3b230: e5853000 str r3, [r5] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3b234: 0a000018 beq 3b29c <rtems_rfs_dir_lookup_ino+0x1f8> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
3b238: e358000a cmp r8, #10 <== NOT EXECUTED
3b23c: da00002e ble 3b2fc <rtems_rfs_dir_lookup_ino+0x258> <== NOT EXECUTED
3b240: e594c018 ldr ip, [r4, #24] <== NOT EXECUTED
3b244: e158000c cmp r8, ip <== NOT EXECUTED
3b248: 2a00002b bcs 3b2fc <rtems_rfs_dir_lookup_ino+0x258> <== NOT EXECUTED
3b24c: e3530000 cmp r3, #0 <== NOT EXECUTED
3b250: 0a000029 beq 3b2fc <rtems_rfs_dir_lookup_ino+0x258> <== NOT EXECUTED
3b254: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
3b258: e1530002 cmp r3, r2 <== NOT EXECUTED
3b25c: 8a000026 bhi 3b2fc <rtems_rfs_dir_lookup_ino+0x258> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
3b260: e15a0001 cmp sl, r1 <== NOT EXECUTED
3b264: 1affffd6 bne 3b1c4 <rtems_rfs_dir_lookup_ino+0x120> <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
3b268: e287000a add r0, r7, #10 <== NOT EXECUTED
3b26c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
3b270: e1a02009 mov r2, r9 <== NOT EXECUTED
3b274: eb003177 bl 47858 <memcmp> <== NOT EXECUTED
3b278: e3500000 cmp r0, #0 <== NOT EXECUTED
3b27c: 1affffd0 bne 3b1c4 <rtems_rfs_dir_lookup_ino+0x120> <== NOT EXECUTED
{
*offset = rtems_rfs_block_map_pos (fs, &map);
3b280: e1a00004 mov r0, r4 <== NOT EXECUTED
3b284: e28b1010 add r1, fp, #16 <== NOT EXECUTED
3b288: e59d9008 ldr r9, [sp, #8] <== NOT EXECUTED
3b28c: ebfff822 bl 3931c <rtems_rfs_block_get_pos> <== NOT EXECUTED
3b290: e59d3098 ldr r3, [sp, #152] ; 0x98 <== NOT EXECUTED
3b294: e5830000 str r0, [r3] <== NOT EXECUTED
3b298: ea000003 b 3b2ac <rtems_rfs_dir_lookup_ino+0x208> <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
3b29c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
3b2a0: e35c0000 cmp ip, #0 <== NOT EXECUTED
3b2a4: 0a000007 beq 3b2c8 <rtems_rfs_dir_lookup_ino+0x224> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
3b2a8: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
3b2ac: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED
3b2b0: e1a00004 mov r0, r4 <== NOT EXECUTED
3b2b4: ebfffd26 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3b2b8: e1a00004 mov r0, r4 <== NOT EXECUTED
3b2bc: e1a0100b mov r1, fp <== NOT EXECUTED
3b2c0: ebfffb0f bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3b2c4: eaffff85 b 3b0e0 <rtems_rfs_dir_lookup_ino+0x3c> <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3b2c8: e1a00004 mov r0, r4 <== NOT EXECUTED
3b2cc: e1a0100b mov r1, fp <== NOT EXECUTED
3b2d0: e28d206c add r2, sp, #108 ; 0x6c <== NOT EXECUTED
3b2d4: ebfff8b6 bl 395b4 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
3b2d8: e3500006 cmp r0, #6 <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3b2dc: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
3b2e0: 1affffa2 bne 3b170 <rtems_rfs_dir_lookup_ino+0xcc> <== NOT EXECUTED
3b2e4: e3a09002 mov r9, #2 <== NOT EXECUTED
3b2e8: eaffffef b 3b2ac <rtems_rfs_dir_lookup_ino+0x208> <== NOT EXECUTED
3b2ec: e59d9008 ldr r9, [sp, #8] <== NOT EXECUTED
3b2f0: eaffffed b 3b2ac <rtems_rfs_dir_lookup_ino+0x208> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
3b2f4: e3a09005 mov r9, #5 <== NOT EXECUTED
3b2f8: eaffffeb b 3b2ac <rtems_rfs_dir_lookup_ino+0x208> <== NOT EXECUTED
3b2fc: e3a03005 mov r3, #5 <== NOT EXECUTED
3b300: e58d300c str r3, [sp, #12] <== NOT EXECUTED
3b304: eaffffe7 b 3b2a8 <rtems_rfs_dir_lookup_ino+0x204> <== NOT EXECUTED
0003a774 <rtems_rfs_dir_read>:
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
3a774: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3a778: e24dd074 sub sp, sp, #116 ; 0x74 <== NOT EXECUTED
3a77c: e59d509c ldr r5, [sp, #156] ; 0x9c <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
3a780: e3a0c000 mov ip, #0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
3a784: e28d6014 add r6, sp, #20 <== NOT EXECUTED
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
3a788: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
3a78c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
3a790: e585c000 str ip, [r5] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
3a794: e1a02006 mov r2, r6 <== NOT EXECUTED
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
3a798: e1a04000 mov r4, r0 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
3a79c: ebfffe4b bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3a7a0: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3a7a4: da000002 ble 3a7b4 <rtems_rfs_dir_read+0x40> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
3a7a8: e1a00008 mov r0, r8 <== NOT EXECUTED
3a7ac: e28dd074 add sp, sp, #116 ; 0x74 <== NOT EXECUTED
3a7b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
3a7b4: e5947008 ldr r7, [r4, #8] <== NOT EXECUTED
3a7b8: e3a08000 mov r8, #0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
3a7bc: e1a02007 mov r2, r7 <== NOT EXECUTED
3a7c0: e1a03008 mov r3, r8 <== NOT EXECUTED
3a7c4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
3a7c8: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3a7cc: eb008a34 bl 5d0a4 <__moddi3> <== NOT EXECUTED
3a7d0: e1a02007 mov r2, r7 <== NOT EXECUTED
3a7d4: e1a03008 mov r3, r8 <== NOT EXECUTED
3a7d8: e0522000 subs r2, r2, r0 <== NOT EXECUTED
3a7dc: e0c33001 sbc r3, r3, r1 <== NOT EXECUTED
3a7e0: e3530000 cmp r3, #0 <== NOT EXECUTED
3a7e4: da00000e ble 3a824 <rtems_rfs_dir_read+0xb0> <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
3a7e8: e1a00004 mov r0, r4 <== NOT EXECUTED
3a7ec: e1a01006 mov r1, r6 <== NOT EXECUTED
3a7f0: e28d3008 add r3, sp, #8 <== NOT EXECUTED
3a7f4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
3a7f8: e28d9070 add r9, sp, #112 ; 0x70 <== NOT EXECUTED
3a7fc: e58d9000 str r9, [sp] <== NOT EXECUTED
3a800: ebfffb78 bl 395e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3a804: e2508000 subs r8, r0, #0 <== NOT EXECUTED
3a808: da000017 ble 3a86c <rtems_rfs_dir_read+0xf8> <== NOT EXECUTED
{
if (rc == ENXIO)
3a80c: e3580006 cmp r8, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
3a810: e1a00004 mov r0, r4 <== NOT EXECUTED
3a814: e1a01006 mov r1, r6 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
3a818: 03a08002 moveq r8, #2 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
3a81c: ebfffdb8 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3a820: eaffffe0 b 3a7a8 <rtems_rfs_dir_read+0x34> <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
3a824: 1a000001 bne 3a830 <rtems_rfs_dir_read+0xbc> <== NOT EXECUTED
3a828: e352000a cmp r2, #10 <== NOT EXECUTED
3a82c: 8affffed bhi 3a7e8 <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
3a830: e28d1008 add r1, sp, #8 <== NOT EXECUTED
3a834: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3a838: e1a02007 mov r2, r7 <== NOT EXECUTED
3a83c: e1a03008 mov r3, r8 <== NOT EXECUTED
3a840: eb0088ed bl 5cbfc <__divdi3> <== NOT EXECUTED
3a844: e3a02001 mov r2, #1 <== NOT EXECUTED
3a848: e0922000 adds r2, r2, r0 <== NOT EXECUTED
3a84c: e3a03000 mov r3, #0 <== NOT EXECUTED
3a850: e0a33001 adc r3, r3, r1 <== NOT EXECUTED
3a854: e0810792 umull r0, r1, r2, r7 <== NOT EXECUTED
3a858: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
3a85c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
3a860: e0211397 mla r1, r7, r3, r1 <== NOT EXECUTED
3a864: e58d100c str r1, [sp, #12] <== NOT EXECUTED
3a868: eaffffde b 3a7e8 <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
3a86c: e3a0c801 mov ip, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3a870: e3a03000 mov r3, #0 <== NOT EXECUTED
3a874: e24cc001 sub ip, ip, #1 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3a878: e58d306c str r3, [sp, #108] ; 0x6c <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3a87c: e5cd3064 strb r3, [sp, #100] ; 0x64 <== NOT EXECUTED
handle->bnum = 0;
3a880: e58d3068 str r3, [sp, #104] ; 0x68 <== NOT EXECUTED
3a884: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
3a888: ea000001 b 3a894 <rtems_rfs_dir_read+0x120> <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
3a88c: e3500000 cmp r0, #0 <== NOT EXECUTED
3a890: 1a000027 bne 3a934 <rtems_rfs_dir_read+0x1c0> <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
3a894: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
3a898: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
3a89c: e3a03001 mov r3, #1 <== NOT EXECUTED
3a8a0: e1a00004 mov r0, r4 <== NOT EXECUTED
3a8a4: ebffff1e bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3a8a8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3a8ac: e1a01006 mov r1, r6 <== NOT EXECUTED
3a8b0: e28d2070 add r2, sp, #112 ; 0x70 <== NOT EXECUTED
3a8b4: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
3a8b8: ca000024 bgt 3a950 <rtems_rfs_dir_read+0x1dc> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
3a8bc: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED
3a8c0: e593c020 ldr ip, [r3, #32] <== NOT EXECUTED
entry += map.bpos.boff;
3a8c4: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
3a8c8: e08c7003 add r7, ip, r3 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3a8cc: e7dca003 ldrb sl, [ip, r3] <== NOT EXECUTED
3a8d0: e5d79003 ldrb r9, [r7, #3] <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
3a8d4: e5d7c009 ldrb ip, [r7, #9] <== NOT EXECUTED
3a8d8: e5d7e008 ldrb lr, [r7, #8] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
3a8dc: e5d7b001 ldrb fp, [r7, #1] <== NOT EXECUTED
3a8e0: e189ac0a orr sl, r9, sl, lsl #24 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
3a8e4: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
3a8e8: e18ce40e orr lr, ip, lr, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
3a8ec: e5d7c002 ldrb ip, [r7, #2] <== NOT EXECUTED
3a8f0: e18aa80b orr sl, sl, fp, lsl #16 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
3a8f4: e15e0009 cmp lr, r9 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3a8f8: e18aa40c orr sl, sl, ip, lsl #8 <== NOT EXECUTED
3a8fc: e2879001 add r9, r7, #1 <== NOT EXECUTED
3a900: e287b002 add fp, r7, #2 <== NOT EXECUTED
3a904: e287c003 add ip, r7, #3 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
3a908: 1a000016 bne 3a968 <rtems_rfs_dir_read+0x1f4> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
3a90c: e594e008 ldr lr, [r4, #8] <== NOT EXECUTED
3a910: e595c000 ldr ip, [r5] <== NOT EXECUTED
3a914: e063300e rsb r3, r3, lr <== NOT EXECUTED
3a918: e08c3003 add r3, ip, r3 <== NOT EXECUTED
3a91c: e5853000 str r3, [r5] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3a920: ebfffb23 bl 395b4 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
3a924: e3500006 cmp r0, #6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3a928: e1a08000 mov r8, r0 <== NOT EXECUTED
if (rc == ENXIO)
3a92c: 1affffd6 bne 3a88c <rtems_rfs_dir_read+0x118> <== NOT EXECUTED
3a930: e3a08002 mov r8, #2 <== NOT EXECUTED
rc = ENOENT;
}
rtems_rfs_buffer_handle_close (fs, &buffer);
3a934: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
3a938: e1a00004 mov r0, r4 <== NOT EXECUTED
3a93c: ebffff84 bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3a940: e1a00004 mov r0, r4 <== NOT EXECUTED
3a944: e1a01006 mov r1, r6 <== NOT EXECUTED
3a948: ebfffd6d bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3a94c: eaffff95 b 3a7a8 <rtems_rfs_dir_read+0x34> <== NOT EXECUTED
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
3a950: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
3a954: ebffff7e bl 3a754 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
3a958: e1a00004 mov r0, r4 <== NOT EXECUTED
3a95c: e1a01006 mov r1, r6 <== NOT EXECUTED
3a960: ebfffd67 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
3a964: eaffff8f b 3a7a8 <rtems_rfs_dir_read+0x34> <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3a968: e35e000a cmp lr, #10 <== NOT EXECUTED
3a96c: e58db010 str fp, [sp, #16] <== NOT EXECUTED
3a970: e1a0b00e mov fp, lr <== NOT EXECUTED
3a974: ca000001 bgt 3a980 <rtems_rfs_dir_read+0x20c> <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
3a978: e3a08005 mov r8, #5 <== NOT EXECUTED
3a97c: eaffffec b 3a934 <rtems_rfs_dir_read+0x1c0> <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
3a980: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
3a984: e35a0000 cmp sl, #0 <== NOT EXECUTED
3a988: 115e0001 cmpne lr, r1 <== NOT EXECUTED
3a98c: 33a01000 movcc r1, #0 <== NOT EXECUTED
3a990: 23a01001 movcs r1, #1 <== NOT EXECUTED
3a994: 2afffff7 bcs 3a978 <rtems_rfs_dir_read+0x204> <== NOT EXECUTED
3a998: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
3a99c: e15a0003 cmp sl, r3 <== NOT EXECUTED
3a9a0: 8afffff4 bhi 3a978 <rtems_rfs_dir_read+0x204> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
3a9a4: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
3a9a8: e59d0098 ldr r0, [sp, #152] ; 0x98 <== NOT EXECUTED
3a9ac: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
3a9b0: eb003459 bl 47b1c <memset> <== NOT EXECUTED
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
3a9b4: e5952000 ldr r2, [r5] <== NOT EXECUTED
3a9b8: e08b2002 add r2, fp, r2 <== NOT EXECUTED
3a9bc: e5852000 str r2, [r5] <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
3a9c0: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
3a9c4: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
3a9c8: e0633001 rsb r3, r3, r1 <== NOT EXECUTED
3a9cc: e06b3003 rsb r3, fp, r3 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
3a9d0: e353000a cmp r3, #10 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
3a9d4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
3a9d8: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3a9dc: e59de098 ldr lr, [sp, #152] ; 0x98 <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
3a9e0: d0833002 addle r3, r3, r2 <== NOT EXECUTED
3a9e4: d5853000 strle r3, [r5] <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
3a9e8: e98e0003 stmib lr, {r0, r1} <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
3a9ec: e24b500a sub r5, fp, #10 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
3a9f0: e59d1098 ldr r1, [sp, #152] ; 0x98 <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
3a9f4: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
3a9f8: e3a00e11 mov r0, #272 ; 0x110 <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
3a9fc: e35500ff cmp r5, #255 ; 0xff <== NOT EXECUTED
3aa00: a3a050ff movge r5, #255 ; 0xff <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
3aa04: e1ce00bc strh r0, [lr, #12] <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
3aa08: e1a02005 mov r2, r5 <== NOT EXECUTED
3aa0c: e2810010 add r0, r1, #16 <== NOT EXECUTED
3aa10: e287100a add r1, r7, #10 <== NOT EXECUTED
3aa14: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
3aa18: eb0033b8 bl 47900 <memcpy> <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
3aa1c: e5d92000 ldrb r2, [r9] <== NOT EXECUTED
3aa20: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
3aa24: e5d71000 ldrb r1, [r7] <== NOT EXECUTED
3aa28: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
3aa2c: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
3aa30: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
3aa34: e1821c01 orr r1, r2, r1, lsl #24 <== NOT EXECUTED
3aa38: e5d92000 ldrb r2, [r9] <== NOT EXECUTED
dirent->d_namlen = elength;
3aa3c: e59dc098 ldr ip, [sp, #152] ; 0x98 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
3aa40: e1813003 orr r3, r1, r3 <== NOT EXECUTED
3aa44: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
dirent->d_namlen = elength;
3aa48: e1cc50be strh r5, [ip, #14] <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
3aa4c: e58c3000 str r3, [ip] <== NOT EXECUTED
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
3aa50: eaffffb7 b 3a934 <rtems_rfs_dir_read+0x1c0> <== NOT EXECUTED
0003bc60 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
3bc60: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3bc64: e1a04001 mov r4, r1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
3bc68: e591101c ldr r1, [r1, #28] <== NOT EXECUTED
3bc6c: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
3bc70: e3530000 cmp r3, #0 <== NOT EXECUTED
handle->shared->references--;
3bc74: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
3bc78: c5813008 strgt r3, [r1, #8] <== NOT EXECUTED
if (handle->shared->references == 0)
3bc7c: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
3bc80: e1a06000 mov r6, r0 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
3bc84: 13a05000 movne r5, #0 <== NOT EXECUTED
3bc88: 1a00004b bne 3bdbc <rtems_rfs_file_close+0x15c> <== NOT EXECUTED
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
3bc8c: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
3bc90: e3530000 cmp r3, #0 <== NOT EXECUTED
3bc94: 0a000058 beq 3bdfc <rtems_rfs_file_close+0x19c> <== NOT EXECUTED
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
3bc98: e591208c ldr r2, [r1, #140] ; 0x8c <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
3bc9c: e1a00c22 lsr r0, r2, #24 <== NOT EXECUTED
3bca0: e5c30010 strb r0, [r3, #16] <== NOT EXECUTED
3bca4: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
3bca8: e1a00822 lsr r0, r2, #16 <== NOT EXECUTED
3bcac: e5c30011 strb r0, [r3, #17] <== NOT EXECUTED
3bcb0: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
3bcb4: e1a00422 lsr r0, r2, #8 <== NOT EXECUTED
3bcb8: e5c30012 strb r0, [r3, #18] <== NOT EXECUTED
3bcbc: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
3bcc0: e5c32013 strb r2, [r3, #19] <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
3bcc4: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
3bcc8: e5923090 ldr r3, [r2, #144] ; 0x90 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
3bccc: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3bcd0: e3a00001 mov r0, #1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
3bcd4: e1a0ec23 lsr lr, r3, #24 <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3bcd8: e5c1001c strb r0, [r1, #28] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
3bcdc: e5cce014 strb lr, [ip, #20] <== NOT EXECUTED
3bce0: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
3bce4: e1a0c823 lsr ip, r3, #16 <== NOT EXECUTED
3bce8: e5c1c015 strb ip, [r1, #21] <== NOT EXECUTED
3bcec: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
3bcf0: e1a0c423 lsr ip, r3, #8 <== NOT EXECUTED
3bcf4: e5c1c016 strb ip, [r1, #22] <== NOT EXECUTED
3bcf8: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
3bcfc: e5c13017 strb r3, [r1, #23] <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
3bd00: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3bd04: e5931094 ldr r1, [r3, #148] ; 0x94 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
3bd08: e593c018 ldr ip, [r3, #24] <== NOT EXECUTED
3bd0c: e1a0ec21 lsr lr, r1, #24 <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3bd10: e5c2001c strb r0, [r2, #28] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
3bd14: e5cce018 strb lr, [ip, #24] <== NOT EXECUTED
3bd18: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
3bd1c: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED
3bd20: e5c2c019 strb ip, [r2, #25] <== NOT EXECUTED
3bd24: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
3bd28: e1a0c421 lsr ip, r1, #8 <== NOT EXECUTED
3bd2c: e5c2c01a strb ip, [r2, #26] <== NOT EXECUTED
3bd30: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
3bd34: e5c2101b strb r1, [r2, #27] <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
3bd38: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3bd3c: e5912084 ldr r2, [r1, #132] ; 0x84 <== NOT EXECUTED
3bd40: e591c03c ldr ip, [r1, #60] ; 0x3c <== NOT EXECUTED
3bd44: e152000c cmp r2, ip <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3bd48: e5c3001c strb r0, [r3, #28] <== NOT EXECUTED
3bd4c: e1a03001 mov r3, r1 <== NOT EXECUTED
3bd50: 15910088 ldrne r0, [r1, #136] ; 0x88 <== NOT EXECUTED
3bd54: 0a000023 beq 3bde8 <rtems_rfs_file_close+0x188> <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
3bd58: e583203c str r2, [r3, #60] ; 0x3c <== NOT EXECUTED
map->dirty = true;
3bd5c: e3a02001 mov r2, #1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
3bd60: e5830040 str r0, [r3, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
3bd64: e5c32034 strb r2, [r3, #52] ; 0x34 <== NOT EXECUTED
3bd68: e1a01003 mov r1, r3 <== NOT EXECUTED
3bd6c: e3a05000 mov r5, #0 <== NOT EXECUTED
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
3bd70: e2811034 add r1, r1, #52 ; 0x34 <== NOT EXECUTED
3bd74: e1a00006 mov r0, r6 <== NOT EXECUTED
3bd78: ebfff861 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
3bd7c: e3500000 cmp r0, #0 <== NOT EXECUTED
3bd80: da000001 ble 3bd8c <rtems_rfs_file_close+0x12c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
3bd84: e3550000 cmp r5, #0 <== NOT EXECUTED
3bd88: 01a05000 moveq r5, r0 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
3bd8c: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3bd90: e1a00006 mov r0, r6 <== NOT EXECUTED
3bd94: e281100c add r1, r1, #12 <== NOT EXECUTED
3bd98: eb0007c1 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3bd9c: e3500000 cmp r0, #0 <== NOT EXECUTED
3bda0: da000001 ble 3bdac <rtems_rfs_file_close+0x14c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
3bda4: e3550000 cmp r5, #0 <== NOT EXECUTED
3bda8: 01a05000 moveq r5, r0 <== NOT EXECUTED
3bdac: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
3bdb0: ebff44d1 bl d0fc <_Chain_Extract> <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
3bdb4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
3bdb8: ebff2fec bl 7d70 <free> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3bdbc: e2841004 add r1, r4, #4 <== NOT EXECUTED
3bdc0: e1a00006 mov r0, r6 <== NOT EXECUTED
3bdc4: ebfff98c bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3bdc8: e3a03000 mov r3, #0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
3bdcc: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3bdd0: e584300c str r3, [r4, #12] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3bdd4: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED
handle->bnum = 0;
3bdd8: e5843008 str r3, [r4, #8] <== NOT EXECUTED
3bddc: ebff2fe3 bl 7d70 <free> <== NOT EXECUTED
return rrc;
}
3bde0: e1a00005 mov r0, r5 <== NOT EXECUTED
3bde4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
3bde8: e5910088 ldr r0, [r1, #136] ; 0x88 <== NOT EXECUTED
3bdec: e591c040 ldr ip, [r1, #64] ; 0x40 <== NOT EXECUTED
3bdf0: e150000c cmp r0, ip <== NOT EXECUTED
3bdf4: 1affffd7 bne 3bd58 <rtems_rfs_file_close+0xf8> <== NOT EXECUTED
3bdf8: eaffffdb b 3bd6c <rtems_rfs_file_close+0x10c> <== NOT EXECUTED
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
3bdfc: e281100c add r1, r1, #12 <== NOT EXECUTED
3be00: eb0007b3 bl 3dcd4 <rtems_rfs_inode_load> <== NOT EXECUTED
if (rrc == 0)
3be04: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3be08: 1594101c ldrne r1, [r4, #28] <== NOT EXECUTED
3be0c: 1affffd7 bne 3bd70 <rtems_rfs_file_close+0x110> <== NOT EXECUTED
3be10: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3be14: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
3be18: eaffff9e b 3bc98 <rtems_rfs_file_close+0x38> <== NOT EXECUTED
0003b4e4 <rtems_rfs_file_get_shared>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
3b4e4: e5903070 ldr r3, [r0, #112] ; 0x70 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3b4e8: e2802074 add r2, r0, #116 ; 0x74 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
3b4ec: e1530002 cmp r3, r2 <== NOT EXECUTED
3b4f0: 0a00000b beq 3b524 <rtems_rfs_file_get_shared+0x40> <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
3b4f4: e5930014 ldr r0, [r3, #20] <== NOT EXECUTED
3b4f8: e1500001 cmp r0, r1 <== NOT EXECUTED
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
3b4fc: e1a00003 mov r0, r3 <== NOT EXECUTED
if (shared->inode.ino == ino)
3b500: 1a000004 bne 3b518 <rtems_rfs_file_get_shared+0x34> <== NOT EXECUTED
3b504: e12fff1e bx lr <== NOT EXECUTED
3b508: e5930014 ldr r0, [r3, #20] <== NOT EXECUTED
3b50c: e1500001 cmp r0, r1 <== NOT EXECUTED
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
3b510: e1a00003 mov r0, r3 <== NOT EXECUTED
if (shared->inode.ino == ino)
3b514: 012fff1e bxeq lr <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
3b518: e5933000 ldr r3, [r3] <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
3b51c: e1530002 cmp r3, r2 <== NOT EXECUTED
3b520: 1afffff8 bne 3b508 <rtems_rfs_file_get_shared+0x24> <== NOT EXECUTED
3b524: e3a00000 mov r0, #0 <== NOT EXECUTED
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
3b528: e12fff1e bx lr <== NOT EXECUTED
0003baa4 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
3baa4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
3baa8: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
3baac: e3540000 cmp r4, #0 <== NOT EXECUTED
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
3bab0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3bab4: e1a05000 mov r5, r0 <== NOT EXECUTED
3bab8: e1a07001 mov r7, r1 <== NOT EXECUTED
3babc: e20260ff and r6, r2, #255 ; 0xff <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
3bac0: 0a000017 beq 3bb24 <rtems_rfs_file_io_end+0x80> <== NOT EXECUTED
{
if (!read)
3bac4: e3560000 cmp r6, #0 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
3bac8: 03a03001 moveq r3, #1 <== NOT EXECUTED
3bacc: 05c03004 strbeq r3, [r0, #4] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
3bad0: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
3bad4: e2851004 add r1, r5, #4 <== NOT EXECUTED
3bad8: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3badc: ebfffa46 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
3bae0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3bae4: da00000e ble 3bb24 <rtems_rfs_file_io_end+0x80> <== NOT EXECUTED
{
printf (
3bae8: e59f3164 ldr r3, [pc, #356] ; 3bc54 <rtems_rfs_file_io_end+0x1b0><== NOT EXECUTED
3baec: e59f2164 ldr r2, [pc, #356] ; 3bc58 <rtems_rfs_file_io_end+0x1b4><== NOT EXECUTED
3baf0: e3560000 cmp r6, #0 <== NOT EXECUTED
3baf4: 11a06002 movne r6, r2 <== NOT EXECUTED
3baf8: 01a06003 moveq r6, r3 <== NOT EXECUTED
3bafc: eb003c51 bl 4ac48 <strerror> <== NOT EXECUTED
3bb00: e1a01006 mov r1, r6 <== NOT EXECUTED
3bb04: e58d0000 str r0, [sp] <== NOT EXECUTED
3bb08: e1a02007 mov r2, r7 <== NOT EXECUTED
3bb0c: e1a03004 mov r3, r4 <== NOT EXECUTED
3bb10: e59f0144 ldr r0, [pc, #324] ; 3bc5c <rtems_rfs_file_io_end+0x1b8><== NOT EXECUTED
3bb14: eb003427 bl 48bb8 <printf> <== NOT EXECUTED
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
3bb18: e1a00004 mov r0, r4 <== NOT EXECUTED
3bb1c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3bb20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
3bb24: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
3bb28: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
3bb2c: e0877002 add r7, r7, r2 <== NOT EXECUTED
3bb30: e5857014 str r7, [r5, #20] <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
3bb34: e5932098 ldr r2, [r3, #152] ; 0x98 <== NOT EXECUTED
3bb38: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
3bb3c: e1570001 cmp r7, r1 <== NOT EXECUTED
3bb40: 3a000005 bcc 3bb5c <rtems_rfs_file_io_end+0xb8> <== NOT EXECUTED
{
handle->bpos.bno++;
3bb44: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED
3bb48: e2811001 add r1, r1, #1 <== NOT EXECUTED
3bb4c: e5851010 str r1, [r5, #16] <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3bb50: e5922008 ldr r2, [r2, #8] <== NOT EXECUTED
3bb54: e0627007 rsb r7, r2, r7 <== NOT EXECUTED
3bb58: e5857014 str r7, [r5, #20] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
3bb5c: e3560000 cmp r6, #0 <== NOT EXECUTED
3bb60: 0a000019 beq 3bbcc <rtems_rfs_file_io_end+0x128> <== NOT EXECUTED
3bb64: e3a08000 mov r8, #0 <== NOT EXECUTED
3bb68: e1a07008 mov r7, r8 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
3bb6c: e595a000 ldr sl, [r5] <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
3bb70: e31a0002 tst sl, #2 <== NOT EXECUTED
3bb74: 13a07000 movne r7, #0 <== NOT EXECUTED
length = rtems_rfs_file_update_length (handle) && length;
3bb78: e31a0004 tst sl, #4 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
3bb7c: e22aa001 eor sl, sl, #1 <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
3bb80: 13a08000 movne r8, #0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
3bb84: e21aa001 ands sl, sl, #1 <== NOT EXECUTED
3bb88: 1a000001 bne 3bb94 <rtems_rfs_file_io_end+0xf0> <== NOT EXECUTED
3bb8c: e3570000 cmp r7, #0 <== NOT EXECUTED
3bb90: 0a000006 beq 3bbb0 <rtems_rfs_file_io_end+0x10c> <== NOT EXECUTED
{
time_t now = time (NULL);
3bb94: e3a00000 mov r0, #0 <== NOT EXECUTED
3bb98: eb00522b bl 5044c <time> <== NOT EXECUTED
if (read && atime)
3bb9c: e3560000 cmp r6, #0 <== NOT EXECUTED
3bba0: 0a000017 beq 3bc04 <rtems_rfs_file_io_end+0x160> <== NOT EXECUTED
3bba4: e35a0000 cmp sl, #0 <== NOT EXECUTED
handle->shared->atime = now;
3bba8: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
3bbac: 1583008c strne r0, [r3, #140] ; 0x8c <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
3bbb0: e3580000 cmp r8, #0 <== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
3bbb4: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
3bbb8: 1593203c ldrne r2, [r3, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
3bbbc: 15931040 ldrne r1, [r3, #64] ; 0x40 <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
3bbc0: 15832084 strne r2, [r3, #132] ; 0x84 <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
3bbc4: 15831088 strne r1, [r3, #136] ; 0x88 <== NOT EXECUTED
3bbc8: eaffffd2 b 3bb18 <rtems_rfs_file_io_end+0x74> <== NOT EXECUTED
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
3bbcc: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
3bbd0: e3520000 cmp r2, #0 <== NOT EXECUTED
3bbd4: 0593103c ldreq r1, [r3, #60] ; 0x3c <== NOT EXECUTED
3bbd8: 0a000013 beq 3bc2c <rtems_rfs_file_io_end+0x188> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
3bbdc: e593103c ldr r1, [r3, #60] ; 0x3c <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
3bbe0: e3510000 cmp r1, #0 <== NOT EXECUTED
3bbe4: 1a000010 bne 3bc2c <rtems_rfs_file_io_end+0x188> <== NOT EXECUTED
3bbe8: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
3bbec: e3a02001 mov r2, #1 <== NOT EXECUTED
3bbf0: e1a08002 mov r8, r2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
3bbf4: e5831040 str r1, [r3, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
3bbf8: e5c32034 strb r2, [r3, #52] ; 0x34 <== NOT EXECUTED
3bbfc: e1a07002 mov r7, r2 <== NOT EXECUTED
3bc00: eaffffd9 b 3bb6c <rtems_rfs_file_io_end+0xc8> <== NOT EXECUTED
if (atime || mtime)
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
3bc04: e3570000 cmp r7, #0 <== NOT EXECUTED
handle->shared->mtime = now;
3bc08: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
3bc0c: 15830090 strne r0, [r3, #144] ; 0x90 <== NOT EXECUTED
}
if (length)
3bc10: e3580000 cmp r8, #0 <== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
3bc14: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
3bc18: 1593203c ldrne r2, [r3, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
3bc1c: 15931040 ldrne r1, [r3, #64] ; 0x40 <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
3bc20: 15832084 strne r2, [r3, #132] ; 0x84 <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
3bc24: 15831088 strne r1, [r3, #136] ; 0x88 <== NOT EXECUTED
3bc28: eaffffba b 3bb18 <rtems_rfs_file_io_end+0x74> <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
3bc2c: e1520001 cmp r2, r1 <== NOT EXECUTED
3bc30: 2affffec bcs 3bbe8 <rtems_rfs_file_io_end+0x144> <== NOT EXECUTED
3bc34: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3bc38: e1520001 cmp r2, r1 <== NOT EXECUTED
3bc3c: 1affffc8 bne 3bb64 <rtems_rfs_file_io_end+0xc0> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
3bc40: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
3bc44: e5932040 ldr r2, [r3, #64] ; 0x40 <== NOT EXECUTED
3bc48: e1510002 cmp r1, r2 <== NOT EXECUTED
3bc4c: 9affffc4 bls 3bb64 <rtems_rfs_file_io_end+0xc0> <== NOT EXECUTED
3bc50: eaffffe5 b 3bbec <rtems_rfs_file_io_end+0x148> <== NOT EXECUTED
0003b690 <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
3b690: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
3b694: e3530000 cmp r3, #0 <== NOT EXECUTED
3b698: 0a000003 beq 3b6ac <rtems_rfs_file_io_release+0x1c> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
3b69c: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
3b6a0: e2801004 add r1, r0, #4 <== NOT EXECUTED
3b6a4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b6a8: eafffb53 b 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
3b6ac: e1a00003 mov r0, r3 <== NOT EXECUTED
3b6b0: e12fff1e bx lr <== NOT EXECUTED
0003b52c <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
3b52c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
3b530: e590600c ldr r6, [r0, #12] <== NOT EXECUTED
3b534: e3560000 cmp r6, #0 <== NOT EXECUTED
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
3b538: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3b53c: e1a04000 mov r4, r0 <== NOT EXECUTED
3b540: e1a07001 mov r7, r1 <== NOT EXECUTED
3b544: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
3b548: 0a00001a beq 3b5b8 <rtems_rfs_file_io_start+0x8c> <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
3b54c: e3550000 cmp r5, #0 <== NOT EXECUTED
3b550: 0594301c ldreq r3, [r4, #28] <== NOT EXECUTED
3b554: 1a000007 bne 3b578 <rtems_rfs_file_io_start+0x4c> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3b558: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3b55c: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
*available = size - rtems_rfs_file_block_offset (handle);
3b560: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
3b564: e0632002 rsb r2, r3, r2 <== NOT EXECUTED
3b568: e5872000 str r2, [r7] <== NOT EXECUTED
3b56c: e3a00000 mov r0, #0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
3b570: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3b574: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
3b578: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b57c: e5932044 ldr r2, [r3, #68] ; 0x44 <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
3b580: e3520000 cmp r2, #0 <== NOT EXECUTED
3b584: 1593103c ldrne r1, [r3, #60] ; 0x3c <== NOT EXECUTED
3b588: 1a000006 bne 3b5a8 <rtems_rfs_file_io_start+0x7c> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
3b58c: e593103c ldr r1, [r3, #60] ; 0x3c <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
3b590: e3510000 cmp r1, #0 <== NOT EXECUTED
3b594: 1a000003 bne 3b5a8 <rtems_rfs_file_io_start+0x7c> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
3b598: e5932040 ldr r2, [r3, #64] ; 0x40 <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
3b59c: e3520000 cmp r2, #0 <== NOT EXECUTED
3b5a0: 1affffee bne 3b560 <rtems_rfs_file_io_start+0x34> <== NOT EXECUTED
3b5a4: eaffffeb b 3b558 <rtems_rfs_file_io_start+0x2c> <== NOT EXECUTED
3b5a8: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3b5ac: e1520001 cmp r2, r1 <== NOT EXECUTED
3b5b0: 1affffe8 bne 3b558 <rtems_rfs_file_io_start+0x2c> <== NOT EXECUTED
3b5b4: eafffff7 b 3b598 <rtems_rfs_file_io_start+0x6c> <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3b5b8: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
3b5bc: e2842010 add r2, r4, #16 <== NOT EXECUTED
3b5c0: e2831034 add r1, r3, #52 ; 0x34 <== NOT EXECUTED
3b5c4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b5c8: e1a0300d mov r3, sp <== NOT EXECUTED
3b5cc: ebfff79d bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
3b5d0: e3500000 cmp r0, #0 <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3b5d4: e1a0800d mov r8, sp <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
3b5d8: da000005 ble 3b5f4 <rtems_rfs_file_io_start+0xc8> <== NOT EXECUTED
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
3b5dc: e3550000 cmp r5, #0 <== NOT EXECUTED
3b5e0: 0a00000e beq 3b620 <rtems_rfs_file_io_start+0xf4> <== NOT EXECUTED
3b5e4: e3500006 cmp r0, #6 <== NOT EXECUTED
{
*available = 0;
3b5e8: 05876000 streq r6, [r7] <== NOT EXECUTED
3b5ec: 01a00006 moveq r0, r6 <== NOT EXECUTED
3b5f0: eaffffde b 3b570 <rtems_rfs_file_io_start+0x44> <== NOT EXECUTED
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
3b5f4: e3550000 cmp r5, #0 <== NOT EXECUTED
3b5f8: 0a000016 beq 3b658 <rtems_rfs_file_io_start+0x12c> <== NOT EXECUTED
3b5fc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b600: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b604: e3a03001 mov r3, #1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
3b608: e2841004 add r1, r4, #4 <== NOT EXECUTED
3b60c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3b610: ebfffbc3 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
3b614: e3500000 cmp r0, #0 <== NOT EXECUTED
3b618: caffffd4 bgt 3b570 <rtems_rfs_file_io_start+0x44> <== NOT EXECUTED
3b61c: eaffffca b 3b54c <rtems_rfs_file_io_start+0x20> <== NOT EXECUTED
{
*available = 0;
return 0;
}
if (rc != ENXIO)
3b620: e3500006 cmp r0, #6 <== NOT EXECUTED
3b624: 1affffd1 bne 3b570 <rtems_rfs_file_io_start+0x44> <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
3b628: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
3b62c: e1a0300d mov r3, sp <== NOT EXECUTED
3b630: e2821034 add r1, r2, #52 ; 0x34 <== NOT EXECUTED
3b634: e5920098 ldr r0, [r2, #152] ; 0x98 <== NOT EXECUTED
3b638: e3a02001 mov r2, #1 <== NOT EXECUTED
3b63c: ebfff937 bl 39b20 <rtems_rfs_block_map_grow> <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
3b640: e3500000 cmp r0, #0 <== NOT EXECUTED
3b644: caffffc9 bgt 3b570 <rtems_rfs_file_io_start+0x44> <== NOT EXECUTED
3b648: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b64c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b650: e1a03005 mov r3, r5 <== NOT EXECUTED
3b654: eaffffeb b 3b608 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
3b658: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
3b65c: e3530000 cmp r3, #0 <== NOT EXECUTED
3b660: 1594301c ldrne r3, [r4, #28] <== NOT EXECUTED
3b664: 1a000006 bne 3b684 <rtems_rfs_file_io_start+0x158> <== NOT EXECUTED
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
3b668: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b66c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b670: e5971000 ldr r1, [r7] <== NOT EXECUTED
3b674: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
3b678: e1510002 cmp r1, r2 <== NOT EXECUTED
3b67c: 21a03005 movcs r3, r5 <== NOT EXECUTED
3b680: 2affffe0 bcs 3b608 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
3b684: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b688: e3a03001 mov r3, #1 <== NOT EXECUTED
3b68c: eaffffdd b 3b608 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
0003be1c <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
3be1c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
3be20: e3a04000 mov r4, #0 <== NOT EXECUTED
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
3be24: e1a08000 mov r8, r0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
3be28: e5834000 str r4, [r3] <== NOT EXECUTED
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
3be2c: e3a00020 mov r0, #32 <== NOT EXECUTED
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
3be30: e1a07003 mov r7, r3 <== NOT EXECUTED
3be34: e1a0a001 mov sl, r1 <== NOT EXECUTED
3be38: e1a09002 mov r9, r2 <== NOT EXECUTED
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
3be3c: ebff318f bl 8480 <malloc> <== NOT EXECUTED
if (!handle)
3be40: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3be44: 0a00002b beq 3bef8 <rtems_rfs_file_open+0xdc> <== NOT EXECUTED
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
3be48: e1a06005 mov r6, r5 <== NOT EXECUTED
3be4c: e4864004 str r4, [r6], #4 <== NOT EXECUTED
3be50: e2863008 add r3, r6, #8 <== NOT EXECUTED
3be54: e5854004 str r4, [r5, #4] <== NOT EXECUTED
3be58: e4834004 str r4, [r3], #4 <== NOT EXECUTED
3be5c: e4834004 str r4, [r3], #4 <== NOT EXECUTED
3be60: e4834004 str r4, [r3], #4 <== NOT EXECUTED
3be64: e4834004 str r4, [r3], #4 <== NOT EXECUTED
3be68: e5834000 str r4, [r3] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
3be6c: e5983070 ldr r3, [r8, #112] ; 0x70 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3be70: e2881074 add r1, r8, #116 ; 0x74 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
3be74: e1530001 cmp r3, r1 <== NOT EXECUTED
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3be78: e585400c str r4, [r5, #12] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
3be7c: e5854008 str r4, [r5, #8] <== NOT EXECUTED
3be80: 1a000003 bne 3be94 <rtems_rfs_file_open+0x78> <== NOT EXECUTED
3be84: ea00000f b 3bec8 <rtems_rfs_file_open+0xac> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
3be88: e5933000 ldr r3, [r3] <== NOT EXECUTED
3be8c: e1530001 cmp r3, r1 <== NOT EXECUTED
3be90: 0a00000c beq 3bec8 <rtems_rfs_file_open+0xac> <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
3be94: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
3be98: e15a0002 cmp sl, r2 <== NOT EXECUTED
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
3be9c: e1a04003 mov r4, r3 <== NOT EXECUTED
if (shared->inode.ino == ino)
3bea0: 1afffff8 bne 3be88 <rtems_rfs_file_open+0x6c> <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
3bea4: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
3bea8: e2822001 add r2, r2, #1 <== NOT EXECUTED
3beac: e5832008 str r2, [r3, #8] <== NOT EXECUTED
}
handle->flags = flags;
handle->shared = shared;
*file = handle;
3beb0: e5875000 str r5, [r7] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
3beb4: e5859000 str r9, [r5] <== NOT EXECUTED
handle->shared = shared;
3beb8: e585401c str r4, [r5, #28] <== NOT EXECUTED
*file = handle;
3bebc: e3a0a000 mov sl, #0 <== NOT EXECUTED
return 0;
}
3bec0: e1a0000a mov r0, sl <== NOT EXECUTED
3bec4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
3bec8: e3a0009c mov r0, #156 ; 0x9c <== NOT EXECUTED
3becc: ebff316b bl 8480 <malloc> <== NOT EXECUTED
if (!shared)
3bed0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3bed4: 1a00000a bne 3bf04 <rtems_rfs_file_open+0xe8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3bed8: e1a01006 mov r1, r6 <== NOT EXECUTED
3bedc: e1a00008 mov r0, r8 <== NOT EXECUTED
3bee0: ebfff945 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3bee4: e585400c str r4, [r5, #12] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3bee8: e5c54004 strb r4, [r5, #4] <== NOT EXECUTED
handle->bnum = 0;
3beec: e5854008 str r4, [r5, #8] <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
3bef0: e1a00005 mov r0, r5 <== NOT EXECUTED
3bef4: ebff2f9d bl 7d70 <free> <== NOT EXECUTED
3bef8: e3a0a00c mov sl, #12 <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
3befc: e1a0000a mov r0, sl <== NOT EXECUTED
3bf00: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
3bf04: e3a01000 mov r1, #0 <== NOT EXECUTED
3bf08: e3a0209c mov r2, #156 ; 0x9c <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
3bf0c: e284b00c add fp, r4, #12 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
3bf10: eb002f01 bl 47b1c <memset> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
3bf14: e1a0100a mov r1, sl <== NOT EXECUTED
3bf18: e1a00008 mov r0, r8 <== NOT EXECUTED
3bf1c: e1a0200b mov r2, fp <== NOT EXECUTED
3bf20: e3a03001 mov r3, #1 <== NOT EXECUTED
3bf24: eb000782 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3bf28: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3bf2c: da00000b ble 3bf60 <rtems_rfs_file_open+0x144> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
3bf30: e1a00004 mov r0, r4 <== NOT EXECUTED
3bf34: ebff2f8d bl 7d70 <free> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3bf38: e1a00008 mov r0, r8 <== NOT EXECUTED
3bf3c: e1a01006 mov r1, r6 <== NOT EXECUTED
3bf40: ebfff92d bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3bf44: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3bf48: e585300c str r3, [r5, #12] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3bf4c: e5c53004 strb r3, [r5, #4] <== NOT EXECUTED
handle->bnum = 0;
3bf50: e5853008 str r3, [r5, #8] <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
3bf54: e1a00005 mov r0, r5 <== NOT EXECUTED
3bf58: ebff2f84 bl 7d70 <free> <== NOT EXECUTED
return rc;
3bf5c: eaffffd7 b 3bec0 <rtems_rfs_file_open+0xa4> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
3bf60: e1a00008 mov r0, r8 <== NOT EXECUTED
3bf64: e1a0100b mov r1, fp <== NOT EXECUTED
3bf68: e2842034 add r2, r4, #52 ; 0x34 <== NOT EXECUTED
3bf6c: ebfff857 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3bf70: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3bf74: da000003 ble 3bf88 <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
3bf78: e1a0100b mov r1, fp <== NOT EXECUTED
3bf7c: e1a00008 mov r0, r8 <== NOT EXECUTED
3bf80: eb000747 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3bf84: eaffffe9 b 3bf30 <rtems_rfs_file_open+0x114> <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
3bf88: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
3bf8c: e3a02001 mov r2, #1 <== NOT EXECUTED
3bf90: e5842008 str r2, [r4, #8] <== NOT EXECUTED
3bf94: e283200c add r2, r3, #12 <== NOT EXECUTED
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
3bf98: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
3bf9c: e5d3000c ldrb r0, [r3, #12] <== NOT EXECUTED
3bfa0: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
3bfa4: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
3bfa8: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
3bfac: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
3bfb0: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3bfb4: e5842084 str r2, [r4, #132] ; 0x84 <== NOT EXECUTED
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
3bfb8: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
3bfbc: e5d3200b ldrb r2, [r3, #11] <== NOT EXECUTED
3bfc0: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3bfc4: e5842088 str r2, [r4, #136] ; 0x88 <== NOT EXECUTED
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
3bfc8: e2832010 add r2, r3, #16 <== NOT EXECUTED
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
3bfcc: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
3bfd0: e5d30010 ldrb r0, [r3, #16] <== NOT EXECUTED
3bfd4: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
3bfd8: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
3bfdc: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
3bfe0: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
3bfe4: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3bfe8: e584208c str r2, [r4, #140] ; 0x8c <== NOT EXECUTED
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
3bfec: e2832014 add r2, r3, #20 <== NOT EXECUTED
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
3bff0: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
3bff4: e5d30014 ldrb r0, [r3, #20] <== NOT EXECUTED
3bff8: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
3bffc: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
3c000: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
3c004: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
3c008: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3c00c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
3c010: e2832018 add r2, r3, #24 <== NOT EXECUTED
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
3c014: e5d30018 ldrb r0, [r3, #24] <== NOT EXECUTED
3c018: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
3c01c: e5d21001 ldrb r1, [r2, #1] <== NOT EXECUTED
3c020: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
3c024: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
3c028: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
3c02c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
3c030: e2880070 add r0, r8, #112 ; 0x70 <== NOT EXECUTED
3c034: e1a01004 mov r1, r4 <== NOT EXECUTED
3c038: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
shared->fs = fs;
3c03c: e5848098 str r8, [r4, #152] ; 0x98 <== NOT EXECUTED
3c040: ebff4422 bl d0d0 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
3c044: e1a00008 mov r0, r8 <== NOT EXECUTED
3c048: e1a0100b mov r1, fp <== NOT EXECUTED
3c04c: e3a02000 mov r2, #0 <== NOT EXECUTED
3c050: eb0006e8 bl 3dbf8 <rtems_rfs_inode_unload> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
3c054: eaffff95 b 3beb0 <rtems_rfs_file_open+0x94> <== NOT EXECUTED
0003b9d0 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
3b9d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
3b9d4: e1a04000 mov r4, r0 <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
3b9d8: e590001c ldr r0, [r0, #28] <== NOT EXECUTED
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
3b9dc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3b9e0: e1a06001 mov r6, r1 <== NOT EXECUTED
3b9e4: e2801084 add r1, r0, #132 ; 0x84 <== NOT EXECUTED
3b9e8: e5900098 ldr r0, [r0, #152] ; 0x98 <== NOT EXECUTED
3b9ec: e1a05002 mov r5, r2 <== NOT EXECUTED
3b9f0: e1a07003 mov r7, r3 <== NOT EXECUTED
3b9f4: ebfff664 bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
3b9f8: e1510005 cmp r1, r5 <== NOT EXECUTED
3b9fc: 8a000008 bhi 3ba24 <rtems_rfs_file_seek+0x54> <== NOT EXECUTED
3ba00: 0a000005 beq 3ba1c <rtems_rfs_file_seek+0x4c> <== NOT EXECUTED
{
/*
* The seek is outside the current file so release any buffer. A write will
* extend the file.
*/
int rc = rtems_rfs_file_io_release (handle);
3ba04: e1a00004 mov r0, r4 <== NOT EXECUTED
3ba08: ebffff20 bl 3b690 <rtems_rfs_file_io_release> <== NOT EXECUTED
if (rc > 0)
3ba0c: e3500000 cmp r0, #0 <== NOT EXECUTED
3ba10: da00001f ble 3ba94 <rtems_rfs_file_seek+0xc4> <== NOT EXECUTED
return rc;
}
*new_pos = pos;
return 0;
}
3ba14: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3ba18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
3ba1c: e1500006 cmp r0, r6 <== NOT EXECUTED
3ba20: 9afffff7 bls 3ba04 <rtems_rfs_file_seek+0x34> <== NOT EXECUTED
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
3ba24: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3ba28: e2848010 add r8, r4, #16 <== NOT EXECUTED
3ba2c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3ba30: e1a01006 mov r1, r6 <== NOT EXECUTED
3ba34: e1a03008 mov r3, r8 <== NOT EXECUTED
3ba38: e1a02005 mov r2, r5 <== NOT EXECUTED
3ba3c: ebfff623 bl 392d0 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
/*
* If the file has a block check if it maps to the current position and it
* does not release it. That will force us to get the block at the new
* position when the I/O starts.
*/
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
3ba40: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3ba44: e3530000 cmp r3, #0 <== NOT EXECUTED
3ba48: 0a000011 beq 3ba94 <rtems_rfs_file_seek+0xc4> <== NOT EXECUTED
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3ba4c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3ba50: e1a02008 mov r2, r8 <== NOT EXECUTED
3ba54: e2831034 add r1, r3, #52 ; 0x34 <== NOT EXECUTED
3ba58: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3ba5c: e1a0300d mov r3, sp <== NOT EXECUTED
3ba60: ebfff678 bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
3ba64: e3500000 cmp r0, #0 <== NOT EXECUTED
3ba68: caffffe9 bgt 3ba14 <rtems_rfs_file_seek+0x44> <== NOT EXECUTED
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
3ba6c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
3ba70: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3ba74: e1520003 cmp r2, r3 <== NOT EXECUTED
3ba78: 0a000005 beq 3ba94 <rtems_rfs_file_seek+0xc4> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
3ba7c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3ba80: e2841004 add r1, r4, #4 <== NOT EXECUTED
3ba84: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3ba88: ebfffa5b bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
3ba8c: e3500000 cmp r0, #0 <== NOT EXECUTED
3ba90: caffffdf bgt 3ba14 <rtems_rfs_file_seek+0x44> <== NOT EXECUTED
int rc = rtems_rfs_file_io_release (handle);
if (rc > 0)
return rc;
}
*new_pos = pos;
3ba94: e5875004 str r5, [r7, #4] <== NOT EXECUTED
3ba98: e5876000 str r6, [r7] <== NOT EXECUTED
3ba9c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
3baa0: eaffffdb b 3ba14 <rtems_rfs_file_seek+0x44> <== NOT EXECUTED
0003b6b4 <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
3b6b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
3b6b8: e590501c ldr r5, [r0, #28] <== NOT EXECUTED
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
3b6bc: e1a0a001 mov sl, r1 <== NOT EXECUTED
3b6c0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
3b6c4: e1a04000 mov r4, r0 <== NOT EXECUTED
3b6c8: e2851084 add r1, r5, #132 ; 0x84 <== NOT EXECUTED
3b6cc: e5950098 ldr r0, [r5, #152] ; 0x98 <== NOT EXECUTED
3b6d0: e1a0b002 mov fp, r2 <== NOT EXECUTED
3b6d4: ebfff72c bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
/*
* If the file is same size do nothing else grow or shrink it ?
*
* If the file does not change size do not update the times.
*/
if (size != new_size)
3b6d8: e15a0000 cmp sl, r0 <== NOT EXECUTED
3b6dc: 0a0000ab beq 3b990 <rtems_rfs_file_set_size+0x2dc> <== NOT EXECUTED
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
3b6e0: e19a200b orrs r2, sl, fp <== NOT EXECUTED
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
3b6e4: e2859034 add r9, r5, #52 ; 0x34 <== NOT EXECUTED
if (size != new_size)
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
3b6e8: 0a000083 beq 3b8fc <rtems_rfs_file_set_size+0x248> <== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
3b6ec: e15b0001 cmp fp, r1 <== NOT EXECUTED
3b6f0: 9a000054 bls 3b848 <rtems_rfs_file_set_size+0x194> <== NOT EXECUTED
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3b6f4: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
3b6f8: e1a0700a mov r7, sl <== NOT EXECUTED
3b6fc: e1a0800b mov r8, fp <== NOT EXECUTED
3b700: e0577000 subs r7, r7, r0 <== NOT EXECUTED
3b704: e0c88001 sbc r8, r8, r1 <== NOT EXECUTED
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3b708: e59c0098 ldr r0, [ip, #152] ; 0x98 <== NOT EXECUTED
read_block = false;
while (count)
3b70c: e1973008 orrs r3, r7, r8 <== NOT EXECUTED
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3b710: e5906008 ldr r6, [r0, #8] <== NOT EXECUTED
read_block = false;
while (count)
3b714: 0a00009b beq 3b988 <rtems_rfs_file_set_size+0x2d4> <== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
3b718: e3a02000 mov r2, #0 <== NOT EXECUTED
3b71c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
3b720: e284b004 add fp, r4, #4 <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
3b724: e1a0a002 mov sl, r2 <== NOT EXECUTED
3b728: ea000025 b 3b7c4 <rtems_rfs_file_set_size+0x110> <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
3b72c: e1520007 cmp r2, r7 <== NOT EXECUTED
3b730: 9a00003f bls 3b834 <rtems_rfs_file_set_size+0x180> <== NOT EXECUTED
{
length = count + bpos.boff;
3b734: e0836007 add r6, r3, r7 <== NOT EXECUTED
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
map->dirty = true;
3b738: e3a02001 mov r2, #1 <== NOT EXECUTED
3b73c: e3a03001 mov r3, #1 <== NOT EXECUTED
3b740: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
3b744: e5856040 str r6, [r5, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
3b748: e5c52034 strb r2, [r5, #52] ; 0x34 <== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
3b74c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
3b750: e1a0100b mov r1, fp <== NOT EXECUTED
3b754: e5920098 ldr r0, [r2, #152] ; 0x98 <== NOT EXECUTED
3b758: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
3b75c: ebfffb70 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
3b760: e3500000 cmp r0, #0 <== NOT EXECUTED
3b764: ca000062 bgt 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
3b768: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3b76c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3b770: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
3b774: e3a01000 mov r1, #0 <== NOT EXECUTED
3b778: e0632006 rsb r2, r3, r6 <== NOT EXECUTED
3b77c: e0800003 add r0, r0, r3 <== NOT EXECUTED
3b780: eb0030e5 bl 47b1c <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
3b784: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
3b788: e3a02001 mov r2, #1 <== NOT EXECUTED
3b78c: e5c42004 strb r2, [r4, #4] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
3b790: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b794: e1a0100b mov r1, fp <== NOT EXECUTED
3b798: ebfffb17 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
3b79c: e3500000 cmp r0, #0 <== NOT EXECUTED
3b7a0: ca000053 bgt 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
return rc;
count -= length - bpos.boff;
3b7a4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
3b7a8: e0633006 rsb r3, r3, r6 <== NOT EXECUTED
3b7ac: e0577003 subs r7, r7, r3 <== NOT EXECUTED
3b7b0: e2c88000 sbc r8, r8, #0 <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
3b7b4: e1973008 orrs r3, r7, r8 <== NOT EXECUTED
3b7b8: 0a000055 beq 3b914 <rtems_rfs_file_set_size+0x260> <== NOT EXECUTED
3b7bc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b7c0: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
3b7c4: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED
3b7c8: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
3b7cc: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED
3b7d0: e3530000 cmp r3, #0 <== NOT EXECUTED
3b7d4: 12422001 subne r2, r2, #1 <== NOT EXECUTED
3b7d8: 158d2008 strne r2, [sp, #8] <== NOT EXECUTED
3b7dc: e58d300c str r3, [sp, #12] <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3b7e0: e1a01009 mov r1, r9 <== NOT EXECUTED
3b7e4: e28d2008 add r2, sp, #8 <== NOT EXECUTED
3b7e8: e28d3014 add r3, sp, #20 <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
3b7ec: e58da010 str sl, [sp, #16] <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3b7f0: ebfff714 bl 39448 <rtems_rfs_block_map_find> <== NOT EXECUTED
map, &bpos, &block);
if (rc > 0)
3b7f4: e3500000 cmp r0, #0 <== NOT EXECUTED
3b7f8: da000009 ble 3b824 <rtems_rfs_file_set_size+0x170> <== NOT EXECUTED
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
3b7fc: e3500006 cmp r0, #6 <== NOT EXECUTED
3b800: 1a00003b bne 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
3b804: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b808: e1a01009 mov r1, r9 <== NOT EXECUTED
3b80c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b810: e3a02001 mov r2, #1 <== NOT EXECUTED
3b814: e28d3014 add r3, sp, #20 <== NOT EXECUTED
3b818: ebfff8c0 bl 39b20 <rtems_rfs_block_map_grow> <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
3b81c: e3500000 cmp r0, #0 <== NOT EXECUTED
3b820: ca000033 bgt 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
3b824: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
3b828: e15a0008 cmp sl, r8 <== NOT EXECUTED
3b82c: e0632006 rsb r2, r3, r6 <== NOT EXECUTED
3b830: 0affffbd beq 3b72c <rtems_rfs_file_set_size+0x78> <== NOT EXECUTED
3b834: e3a03001 mov r3, #1 <== NOT EXECUTED
3b838: e5c53034 strb r3, [r5, #52] ; 0x34 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
3b83c: e585a040 str sl, [r5, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
3b840: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
3b844: eaffffc0 b 3b74c <rtems_rfs_file_set_size+0x98> <== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
3b848: 0a000040 beq 3b950 <rtems_rfs_file_set_size+0x29c> <== NOT EXECUTED
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
3b84c: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED
3b850: e59c9098 ldr r9, [ip, #152] ; 0x98 <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
3b854: e3e00000 mvn r0, #0 <== NOT EXECUTED
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
3b858: e5997008 ldr r7, [r9, #8] <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
3b85c: e090000a adds r0, r0, sl <== NOT EXECUTED
3b860: e3e01000 mvn r1, #0 <== NOT EXECUTED
3b864: e0a1100b adc r1, r1, fp <== NOT EXECUTED
3b868: e1a02007 mov r2, r7 <== NOT EXECUTED
3b86c: e3a03000 mov r3, #0 <== NOT EXECUTED
3b870: e58dc000 str ip, [sp] <== NOT EXECUTED
3b874: eb00874c bl 5d5ac <__udivdi3> <== NOT EXECUTED
3b878: e595603c ldr r6, [r5, #60] ; 0x3c <== NOT EXECUTED
3b87c: e1e02000 mvn r2, r0 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
3b880: e0922006 adds r2, r2, r6 <== NOT EXECUTED
3b884: e59dc000 ldr ip, [sp] <== NOT EXECUTED
3b888: 1a000044 bne 3b9a0 <rtems_rfs_file_set_size+0x2ec> <== NOT EXECUTED
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
3b88c: e1a02007 mov r2, r7 <== NOT EXECUTED
3b890: e3a03000 mov r3, #0 <== NOT EXECUTED
3b894: e1a0000a mov r0, sl <== NOT EXECUTED
3b898: e1a0100b mov r1, fp <== NOT EXECUTED
3b89c: e58dc000 str ip, [sp] <== NOT EXECUTED
3b8a0: eb008852 bl 5d9f0 <__umoddi3> <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
3b8a4: e5850040 str r0, [r5, #64] ; 0x40 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
3b8a8: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
map->dirty = true;
3b8ac: e3a03001 mov r3, #1 <== NOT EXECUTED
3b8b0: e3520000 cmp r2, #0 <== NOT EXECUTED
3b8b4: e5c53034 strb r3, [r5, #52] ; 0x34 <== NOT EXECUTED
3b8b8: e59dc000 ldr ip, [sp] <== NOT EXECUTED
3b8bc: 01a03006 moveq r3, r6 <== NOT EXECUTED
3b8c0: 1a000025 bne 3b95c <rtems_rfs_file_set_size+0x2a8> <== NOT EXECUTED
3b8c4: e1560002 cmp r6, r2 <== NOT EXECUTED
3b8c8: 9a000026 bls 3b968 <rtems_rfs_file_set_size+0x2b4> <== NOT EXECUTED
3b8cc: e2461001 sub r1, r6, #1 <== NOT EXECUTED
3b8d0: e1520001 cmp r2, r1 <== NOT EXECUTED
3b8d4: 0a000039 beq 3b9c0 <rtems_rfs_file_set_size+0x30c> <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
3b8d8: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
3b8dc: e58c3084 str r3, [ip, #132] ; 0x84 <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
3b8e0: e58c2088 str r2, [ip, #136] ; 0x88 <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
3b8e4: e5944000 ldr r4, [r4] <== NOT EXECUTED
3b8e8: e2144002 ands r4, r4, #2 <== NOT EXECUTED
3b8ec: 0a000010 beq 3b934 <rtems_rfs_file_set_size+0x280> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
3b8f0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return 0;
}
3b8f4: e28dd018 add sp, sp, #24 <== NOT EXECUTED
3b8f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
3b8fc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3b900: e1a01009 mov r1, r9 <== NOT EXECUTED
3b904: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3b908: ebfff836 bl 399e8 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
if (rc > 0)
3b90c: e3500000 cmp r0, #0 <== NOT EXECUTED
3b910: cafffff7 bgt 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
3b914: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED
3b918: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
3b91c: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
3b920: e58c3084 str r3, [ip, #132] ; 0x84 <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
3b924: e58c2088 str r2, [ip, #136] ; 0x88 <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
3b928: e5944000 ldr r4, [r4] <== NOT EXECUTED
3b92c: e2144002 ands r4, r4, #2 <== NOT EXECUTED
3b930: 1affffee bne 3b8f0 <rtems_rfs_file_set_size+0x23c> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
3b934: e1a00004 mov r0, r4 <== NOT EXECUTED
3b938: e58dc000 str ip, [sp] <== NOT EXECUTED
3b93c: eb0052c2 bl 5044c <time> <== NOT EXECUTED
3b940: e59dc000 ldr ip, [sp] <== NOT EXECUTED
3b944: e58c0090 str r0, [ip, #144] ; 0x90 <== NOT EXECUTED
3b948: e1a00004 mov r0, r4 <== NOT EXECUTED
3b94c: eaffffe8 b 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
3b950: e15a0000 cmp sl, r0 <== NOT EXECUTED
3b954: 9affffbc bls 3b84c <rtems_rfs_file_set_size+0x198> <== NOT EXECUTED
3b958: eaffff65 b 3b6f4 <rtems_rfs_file_set_size+0x40> <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
3b95c: e3560000 cmp r6, #0 <== NOT EXECUTED
3b960: e1a03006 mov r3, r6 <== NOT EXECUTED
3b964: 1affffd6 bne 3b8c4 <rtems_rfs_file_set_size+0x210> <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
3b968: e5846010 str r6, [r4, #16] <== NOT EXECUTED
3b96c: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED
3b970: e3530000 cmp r3, #0 <== NOT EXECUTED
3b974: e3a02000 mov r2, #0 <== NOT EXECUTED
3b978: 12466001 subne r6, r6, #1 <== NOT EXECUTED
3b97c: e5842018 str r2, [r4, #24] <== NOT EXECUTED
3b980: e5843014 str r3, [r4, #20] <== NOT EXECUTED
3b984: 15846010 strne r6, [r4, #16] <== NOT EXECUTED
3b988: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
3b98c: eaffffd1 b 3b8d8 <rtems_rfs_file_set_size+0x224> <== NOT EXECUTED
/*
* If the file is same size do nothing else grow or shrink it ?
*
* If the file does not change size do not update the times.
*/
if (size != new_size)
3b990: e15b0001 cmp fp, r1 <== NOT EXECUTED
3b994: 1affff51 bne 3b6e0 <rtems_rfs_file_set_size+0x2c> <== NOT EXECUTED
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
3b998: e3a00000 mov r0, #0 <== NOT EXECUTED
3b99c: eaffffd4 b 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
3b9a0: e1a00009 mov r0, r9 <== NOT EXECUTED
3b9a4: e28c1034 add r1, ip, #52 ; 0x34 <== NOT EXECUTED
3b9a8: ebfff756 bl 39708 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
3b9ac: e3500000 cmp r0, #0 <== NOT EXECUTED
3b9b0: caffffcf bgt 3b8f4 <rtems_rfs_file_set_size+0x240> <== NOT EXECUTED
3b9b4: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED
3b9b8: e595603c ldr r6, [r5, #60] ; 0x3c <== NOT EXECUTED
3b9bc: eaffffb2 b 3b88c <rtems_rfs_file_set_size+0x1d8> <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
3b9c0: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
3b9c4: e1500002 cmp r0, r2 <== NOT EXECUTED
3b9c8: 2affffc2 bcs 3b8d8 <rtems_rfs_file_set_size+0x224> <== NOT EXECUTED
3b9cc: eaffffe5 b 3b968 <rtems_rfs_file_set_size+0x2b4> <== NOT EXECUTED
0003c6a8 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
3c6a8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
3c6ac: e5d13015 ldrb r3, [r1, #21] <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
3c6b0: e24dd0e8 sub sp, sp, #232 ; 0xe8 <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
3c6b4: e3530000 cmp r3, #0 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
3c6b8: e1a07001 mov r7, r1 <== NOT EXECUTED
3c6bc: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
3c6c0: 1a000098 bne 3c928 <rtems_rfs_format+0x280> <== NOT EXECUTED
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
3c6c4: e28d4014 add r4, sp, #20 <== NOT EXECUTED
3c6c8: e3a01000 mov r1, #0 <== NOT EXECUTED
3c6cc: e3a02080 mov r2, #128 ; 0x80 <== NOT EXECUTED
3c6d0: e1a00004 mov r0, r4 <== NOT EXECUTED
3c6d4: eb002d10 bl 47b1c <memset> <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
3c6d8: e2843070 add r3, r4, #112 ; 0x70 <== NOT EXECUTED
3c6dc: e58d308c str r3, [sp, #140] ; 0x8c <== NOT EXECUTED
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
3c6e0: e3a03005 mov r3, #5 <== NOT EXECUTED
3c6e4: e2845050 add r5, r4, #80 ; 0x50 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c6e8: e284e064 add lr, r4, #100 ; 0x64 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c6ec: e284c060 add ip, r4, #96 ; 0x60 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c6f0: e2842074 add r2, r4, #116 ; 0x74 <== NOT EXECUTED
3c6f4: e58d3050 str r3, [sp, #80] ; 0x50 <== NOT EXECUTED
3c6f8: e284a044 add sl, r4, #68 ; 0x44 <== NOT EXECUTED
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
3c6fc: e3a03002 mov r3, #2 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c700: e2848040 add r8, r4, #64 ; 0x40 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c704: e2846054 add r6, r4, #84 ; 0x54 <== NOT EXECUTED
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
3c708: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
3c70c: e1a01004 mov r1, r4 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c710: e58d506c str r5, [sp, #108] ; 0x6c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c714: e58da054 str sl, [sp, #84] ; 0x54 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c718: e58d805c str r8, [sp, #92] ; 0x5c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c71c: e58d6064 str r6, [sp, #100] ; 0x64 <== NOT EXECUTED
3c720: e58de074 str lr, [sp, #116] ; 0x74 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c724: e58dc07c str ip, [sp, #124] ; 0x7c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c728: e58d2084 str r2, [sp, #132] ; 0x84 <== NOT EXECUTED
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
3c72c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
3c730: ebfff71a bl 3a3a0 <rtems_rfs_buffer_open> <== NOT EXECUTED
if (rc > 0)
3c734: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3c738: ca00014b bgt 3cc6c <rtems_rfs_format+0x5c4> <== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
3c73c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
3c740: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
3c744: e3510000 cmp r1, #0 <== NOT EXECUTED
3c748: 0a000071 beq 3c914 <rtems_rfs_format+0x26c> <== NOT EXECUTED
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
3c74c: e5975000 ldr r5, [r7] <== NOT EXECUTED
if (!fs->block_size)
3c750: e3550000 cmp r5, #0 <== NOT EXECUTED
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
3c754: e58d501c str r5, [sp, #28] <== NOT EXECUTED
if (!fs->block_size)
3c758: 0a00011c beq 3cbd0 <rtems_rfs_format+0x528> <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
3c75c: e5936024 ldr r6, [r3, #36] ; 0x24 <== NOT EXECUTED
3c760: e1a00005 mov r0, r5 <== NOT EXECUTED
3c764: e1a01006 mov r1, r6 <== NOT EXECUTED
3c768: eb008017 bl 5c7cc <__umodsi3> <== NOT EXECUTED
3c76c: e3500000 cmp r0, #0 <== NOT EXECUTED
3c770: 1a000132 bne 3cc40 <rtems_rfs_format+0x598> <== NOT EXECUTED
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
3c774: e5973004 ldr r3, [r7, #4] <== NOT EXECUTED
if (!fs->group_blocks)
3c778: e3530000 cmp r3, #0 <== NOT EXECUTED
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
3c77c: 059d501c ldreq r5, [sp, #28] <== NOT EXECUTED
3c780: 159d501c ldrne r5, [sp, #28] <== NOT EXECUTED
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
3c784: e58d3038 str r3, [sp, #56] ; 0x38 <== NOT EXECUTED
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
3c788: 01a03185 lsleq r3, r5, #3 <== NOT EXECUTED
3c78c: 058d3038 streq r3, [sp, #56] ; 0x38 <== NOT EXECUTED
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
3c790: e1530185 cmp r3, r5, lsl #3 <== NOT EXECUTED
3c794: 8a000109 bhi 3cbc0 <rtems_rfs_format+0x518> <== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
3c798: e1a00004 mov r0, r4 <== NOT EXECUTED
3c79c: ebfffe35 bl 3c078 <rtems_rfs_fs_media_size> <== NOT EXECUTED
3c7a0: e59d501c ldr r5, [sp, #28] <== NOT EXECUTED
3c7a4: e3a03000 mov r3, #0 <== NOT EXECUTED
3c7a8: e1a02005 mov r2, r5 <== NOT EXECUTED
3c7ac: eb00837e bl 5d5ac <__udivdi3> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c7b0: e3500000 cmp r0, #0 <== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
3c7b4: e1a06000 mov r6, r0 <== NOT EXECUTED
3c7b8: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c7bc: 03a01001 moveq r1, #1 <== NOT EXECUTED
3c7c0: 0a000003 beq 3c7d4 <rtems_rfs_format+0x12c> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
3c7c4: e1a01185 lsl r1, r5, #3 <== NOT EXECUTED
3c7c8: e2460001 sub r0, r6, #1 <== NOT EXECUTED
3c7cc: eb007f6a bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3c7d0: e2801001 add r1, r0, #1 <== NOT EXECUTED
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
3c7d4: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
if (!fs->group_inodes)
3c7d8: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
3c7dc: e58d1034 str r1, [sp, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
3c7e0: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
if (!fs->group_inodes)
3c7e4: 1a000011 bne 3c830 <rtems_rfs_format+0x188> <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
3c7e8: e597300c ldr r3, [r7, #12] <== NOT EXECUTED
3c7ec: e3530000 cmp r3, #0 <== NOT EXECUTED
3c7f0: 03a03001 moveq r3, #1 <== NOT EXECUTED
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
3c7f4: e2466001 sub r6, r6, #1 <== NOT EXECUTED
3c7f8: e0000396 mul r0, r6, r3 <== NOT EXECUTED
3c7fc: e59f2b4c ldr r2, [pc, #2892] ; 3d350 <rtems_rfs_format+0xca8><== NOT EXECUTED
3c800: e083c092 umull ip, r3, r2, r0 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c804: e1b032a3 lsrs r3, r3, #5 <== NOT EXECUTED
3c808: 03a00001 moveq r0, #1 <== NOT EXECUTED
3c80c: 0a000002 beq 3c81c <rtems_rfs_format+0x174> <== NOT EXECUTED
3c810: e2430001 sub r0, r3, #1 <== NOT EXECUTED
3c814: eb007f58 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3c818: e2800001 add r0, r0, #1 <== NOT EXECUTED
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
inode_overhead = config->inode_overhead;
fs->group_inodes = rtems_rfs_inodes_from_percent (fs, inode_overhead);
3c81c: e59f3b30 ldr r3, [pc, #2864] ; 3d354 <rtems_rfs_format+0xcac><== NOT EXECUTED
3c820: e1a011a5 lsr r1, r5, #3 <== NOT EXECUTED
3c824: e082c193 umull ip, r2, r3, r1 <== NOT EXECUTED
3c828: e0030092 mul r3, r2, r0 <== NOT EXECUTED
3c82c: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
3c830: e59f3b1c ldr r3, [pc, #2844] ; 3d354 <rtems_rfs_format+0xcac><== NOT EXECUTED
3c834: e1a021a5 lsr r2, r5, #3 <== NOT EXECUTED
3c838: e0861293 umull r1, r6, r3, r2 <== NOT EXECUTED
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
3c83c: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c840: e3500000 cmp r0, #0 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
3c844: e58d6040 str r6, [sp, #64] ; 0x40 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c848: 03a00001 moveq r0, #1 <== NOT EXECUTED
3c84c: 0a000003 beq 3c860 <rtems_rfs_format+0x1b8> <== NOT EXECUTED
3c850: e2400001 sub r0, r0, #1 <== NOT EXECUTED
3c854: e1a01006 mov r1, r6 <== NOT EXECUTED
3c858: eb007f47 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3c85c: e2800001 add r0, r0, #1 <== NOT EXECUTED
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
3c860: e0030096 mul r3, r6, r0 <== NOT EXECUTED
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
3c864: e1a02185 lsl r2, r5, #3 <== NOT EXECUTED
3c868: e1530002 cmp r3, r2 <== NOT EXECUTED
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
3c86c: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
3c870: 858d203c strhi r2, [sp, #60] ; 0x3c <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
3c874: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
if (!fs->max_name_length)
3c878: e3530000 cmp r3, #0 <== NOT EXECUTED
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
fs->max_name_length = config->max_name_length;
3c87c: e58d302c str r3, [sp, #44] ; 0x2c <== NOT EXECUTED
if (!fs->max_name_length)
{
fs->max_name_length = 512;
3c880: 03a03c02 moveq r3, #512 ; 0x200 <== NOT EXECUTED
3c884: 058d302c streq r3, [sp, #44] ; 0x2c <== NOT EXECUTED
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
3c888: e5d73015 ldrb r3, [r7, #21] <== NOT EXECUTED
3c88c: e3530000 cmp r3, #0 <== NOT EXECUTED
3c890: 1a000091 bne 3cadc <rtems_rfs_format+0x434> <== NOT EXECUTED
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
3c894: e1a01005 mov r1, r5 <== NOT EXECUTED
3c898: e1a00004 mov r0, r4 <== NOT EXECUTED
3c89c: ebfff69e bl 3a31c <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
if (rc > 0)
3c8a0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3c8a4: ca0001f6 bgt 3d084 <rtems_rfs_format+0x9dc> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3c8a8: e3a09000 mov r9, #0 <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
3c8ac: e1a00004 mov r0, r4 <== NOT EXECUTED
3c8b0: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3c8b4: e1a02009 mov r2, r9 <== NOT EXECUTED
3c8b8: e1a03009 mov r3, r9 <== NOT EXECUTED
3c8bc: e5cd90d4 strb r9, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3c8c0: e58d90d8 str r9, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->buffer = NULL;
3c8c4: e58d90dc str r9, [sp, #220] ; 0xdc <== NOT EXECUTED
3c8c8: ebfff715 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3c8cc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3c8d0: da000018 ble 3c938 <rtems_rfs_format+0x290> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3c8d4: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3c8d8: e1a00004 mov r0, r4 <== NOT EXECUTED
3c8dc: ebfff6c6 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
3c8e0: e1a00005 mov r0, r5 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3c8e4: e58d90dc str r9, [sp, #220] ; 0xdc <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3c8e8: e5cd90d4 strb r9, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3c8ec: e58d90d8 str r9, [sp, #216] ; 0xd8 <== NOT EXECUTED
3c8f0: eb0038d4 bl 4ac48 <strerror> <== NOT EXECUTED
3c8f4: e1a01005 mov r1, r5 <== NOT EXECUTED
3c8f8: e1a02000 mov r2, r0 <== NOT EXECUTED
3c8fc: e59f0a54 ldr r0, [pc, #2644] ; 3d358 <rtems_rfs_format+0xcb0><== NOT EXECUTED
3c900: eb0030ac bl 48bb8 <printf> <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
3c904: e59f0a50 ldr r0, [pc, #2640] ; 3d35c <rtems_rfs_format+0xcb4><== NOT EXECUTED
3c908: eb00314f bl 48e4c <puts> <== NOT EXECUTED
3c90c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3c910: ea000002 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
3c914: e59f0a44 ldr r0, [pc, #2628] ; 3d360 <rtems_rfs_format+0xcb8><== NOT EXECUTED
3c918: eb0030a6 bl 48bb8 <printf> <== NOT EXECUTED
3c91c: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
3c920: e28dd0e8 add sp, sp, #232 ; 0xe8 <== NOT EXECUTED
3c924: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
3c928: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
3c92c: e59f0a30 ldr r0, [pc, #2608] ; 3d364 <rtems_rfs_format+0xcbc><== NOT EXECUTED
3c930: eb0030a0 bl 48bb8 <printf> <== NOT EXECUTED
3c934: eaffff62 b 3c6c4 <rtems_rfs_format+0x1c> <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
3c938: e59d30dc ldr r3, [sp, #220] ; 0xdc <== NOT EXECUTED
3c93c: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
3c940: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3c944: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3c948: e1a00005 mov r0, r5 <== NOT EXECUTED
3c94c: eb002c72 bl 47b1c <memset> <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
3c950: e3a03028 mov r3, #40 ; 0x28 <== NOT EXECUTED
3c954: e5c53000 strb r3, [r5] <== NOT EXECUTED
3c958: e3a03009 mov r3, #9 <== NOT EXECUTED
3c95c: e5c53001 strb r3, [r5, #1] <== NOT EXECUTED
3c960: e3a0a001 mov sl, #1 <== NOT EXECUTED
3c964: e3a03020 mov r3, #32 <== NOT EXECUTED
3c968: e5c53002 strb r3, [r5, #2] <== NOT EXECUTED
3c96c: e5c5a003 strb sl, [r5, #3] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
3c970: e5c59004 strb r9, [r5, #4] <== NOT EXECUTED
3c974: e5c59005 strb r9, [r5, #5] <== NOT EXECUTED
3c978: e5c59006 strb r9, [r5, #6] <== NOT EXECUTED
3c97c: e5c59007 strb r9, [r5, #7] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
3c980: e5dd301b ldrb r3, [sp, #27] <== NOT EXECUTED
3c984: e5c5300c strb r3, [r5, #12] <== NOT EXECUTED
3c988: e1dd31ba ldrh r3, [sp, #26] <== NOT EXECUTED
3c98c: e5c5300d strb r3, [r5, #13] <== NOT EXECUTED
3c990: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
3c994: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3c998: e5c5300e strb r3, [r5, #14] <== NOT EXECUTED
3c99c: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
3c9a0: e5c5300f strb r3, [r5, #15] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
3c9a4: e5dd301f ldrb r3, [sp, #31] <== NOT EXECUTED
3c9a8: e5c53008 strb r3, [r5, #8] <== NOT EXECUTED
3c9ac: e1dd31be ldrh r3, [sp, #30] <== NOT EXECUTED
3c9b0: e5c53009 strb r3, [r5, #9] <== NOT EXECUTED
3c9b4: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
3c9b8: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3c9bc: e5c5300a strb r3, [r5, #10] <== NOT EXECUTED
3c9c0: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
3c9c4: e5c5300b strb r3, [r5, #11] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
3c9c8: e5dd302b ldrb r3, [sp, #43] ; 0x2b <== NOT EXECUTED
3c9cc: e5c53010 strb r3, [r5, #16] <== NOT EXECUTED
3c9d0: e1dd32ba ldrh r3, [sp, #42] ; 0x2a <== NOT EXECUTED
3c9d4: e5c53011 strb r3, [r5, #17] <== NOT EXECUTED
3c9d8: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
3c9dc: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3c9e0: e5c53012 strb r3, [r5, #18] <== NOT EXECUTED
3c9e4: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
3c9e8: e5c53013 strb r3, [r5, #19] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
3c9ec: e5dd302f ldrb r3, [sp, #47] ; 0x2f <== NOT EXECUTED
3c9f0: e5c53014 strb r3, [r5, #20] <== NOT EXECUTED
3c9f4: e1dd32be ldrh r3, [sp, #46] ; 0x2e <== NOT EXECUTED
3c9f8: e5c53015 strb r3, [r5, #21] <== NOT EXECUTED
3c9fc: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
3ca00: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3ca04: e5c53016 strb r3, [r5, #22] <== NOT EXECUTED
3ca08: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
3ca0c: e5c53017 strb r3, [r5, #23] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
3ca10: e5dd3037 ldrb r3, [sp, #55] ; 0x37 <== NOT EXECUTED
3ca14: e5c53018 strb r3, [r5, #24] <== NOT EXECUTED
3ca18: e1dd33b6 ldrh r3, [sp, #54] ; 0x36 <== NOT EXECUTED
3ca1c: e5c53019 strb r3, [r5, #25] <== NOT EXECUTED
3ca20: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3ca24: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3ca28: e5c5301a strb r3, [r5, #26] <== NOT EXECUTED
3ca2c: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3ca30: e5c5301b strb r3, [r5, #27] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
3ca34: e5dd303b ldrb r3, [sp, #59] ; 0x3b <== NOT EXECUTED
3ca38: e5c5301c strb r3, [r5, #28] <== NOT EXECUTED
3ca3c: e1dd33ba ldrh r3, [sp, #58] ; 0x3a <== NOT EXECUTED
3ca40: e5c5301d strb r3, [r5, #29] <== NOT EXECUTED
3ca44: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3ca48: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3ca4c: e5c5301e strb r3, [r5, #30] <== NOT EXECUTED
3ca50: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3ca54: e5c5301f strb r3, [r5, #31] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
3ca58: e5dd303f ldrb r3, [sp, #63] ; 0x3f <== NOT EXECUTED
3ca5c: e5c53020 strb r3, [r5, #32] <== NOT EXECUTED
3ca60: e1dd33be ldrh r3, [sp, #62] ; 0x3e <== NOT EXECUTED
3ca64: e5c53021 strb r3, [r5, #33] ; 0x21 <== NOT EXECUTED
3ca68: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
3ca6c: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3ca70: e5c53022 strb r3, [r5, #34] ; 0x22 <== NOT EXECUTED
3ca74: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
3ca78: e1a00004 mov r0, r4 <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
3ca7c: e5c53023 strb r3, [r5, #35] ; 0x23 <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
3ca80: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
3ca84: e3a03038 mov r3, #56 ; 0x38 <== NOT EXECUTED
3ca88: e5c59024 strb r9, [r5, #36] ; 0x24 <== NOT EXECUTED
3ca8c: e5c59025 strb r9, [r5, #37] ; 0x25 <== NOT EXECUTED
3ca90: e5c59026 strb r9, [r5, #38] ; 0x26 <== NOT EXECUTED
3ca94: e5c53027 strb r3, [r5, #39] ; 0x27 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
3ca98: e5cda0d4 strb sl, [sp, #212] ; 0xd4 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (fs, &handle);
3ca9c: ebfff656 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (rc > 0)
3caa0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3caa4: da000077 ble 3cc88 <rtems_rfs_format+0x5e0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3caa8: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3caac: e1a00004 mov r0, r4 <== NOT EXECUTED
3cab0: ebfff651 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
3cab4: e1a00005 mov r0, r5 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3cab8: e58d90dc str r9, [sp, #220] ; 0xdc <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3cabc: e5cd90d4 strb r9, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cac0: e58d90d8 str r9, [sp, #216] ; 0xd8 <== NOT EXECUTED
3cac4: eb00385f bl 4ac48 <strerror> <== NOT EXECUTED
3cac8: e1a01005 mov r1, r5 <== NOT EXECUTED
3cacc: e1a02000 mov r2, r0 <== NOT EXECUTED
3cad0: e59f0890 ldr r0, [pc, #2192] ; 3d368 <rtems_rfs_format+0xcc0><== NOT EXECUTED
3cad4: eb003037 bl 48bb8 <printf> <== NOT EXECUTED
3cad8: eaffff89 b 3c904 <rtems_rfs_format+0x25c> <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
3cadc: e1a00004 mov r0, r4 <== NOT EXECUTED
3cae0: ebfffd64 bl 3c078 <rtems_rfs_fs_media_size> <== NOT EXECUTED
3cae4: e1a02001 mov r2, r1 <== NOT EXECUTED
3cae8: e1a01000 mov r1, r0 <== NOT EXECUTED
3caec: e59f0878 ldr r0, [pc, #2168] ; 3d36c <rtems_rfs_format+0xcc4><== NOT EXECUTED
3caf0: eb003030 bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
3caf4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
3caf8: e59f0870 ldr r0, [pc, #2160] ; 3d370 <rtems_rfs_format+0xcc8><== NOT EXECUTED
3cafc: e593101c ldr r1, [r3, #28] <== NOT EXECUTED
3cb00: eb00302c bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
3cb04: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
3cb08: e59f0864 ldr r0, [pc, #2148] ; 3d374 <rtems_rfs_format+0xccc><== NOT EXECUTED
3cb0c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
3cb10: eb003028 bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
3cb14: e1a00004 mov r0, r4 <== NOT EXECUTED
3cb18: ebfffd4e bl 3c058 <rtems_rfs_fs_size> <== NOT EXECUTED
3cb1c: e1a02001 mov r2, r1 <== NOT EXECUTED
3cb20: e1a01000 mov r1, r0 <== NOT EXECUTED
3cb24: e59f084c ldr r0, [pc, #2124] ; 3d378 <rtems_rfs_format+0xcd0><== NOT EXECUTED
3cb28: eb003022 bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
3cb2c: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
3cb30: e59f0844 ldr r0, [pc, #2116] ; 3d37c <rtems_rfs_format+0xcd4><== NOT EXECUTED
3cb34: eb00301f bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
3cb38: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
3cb3c: e59f083c ldr r0, [pc, #2108] ; 3d380 <rtems_rfs_format+0xcd8><== NOT EXECUTED
3cb40: eb00301c bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
3cb44: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
3cb48: e59f0834 ldr r0, [pc, #2100] ; 3d384 <rtems_rfs_format+0xcdc><== NOT EXECUTED
3cb4c: e1a01181 lsl r1, r1, #3 <== NOT EXECUTED
3cb50: eb003018 bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
3cb54: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
3cb58: e59f0828 ldr r0, [pc, #2088] ; 3d388 <rtems_rfs_format+0xce0><== NOT EXECUTED
3cb5c: eb003015 bl 48bb8 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
3cb60: e1a00004 mov r0, r4 <== NOT EXECUTED
3cb64: ebfffeb0 bl 3c62c <rtems_rfs_inode_overhead> <== NOT EXECUTED
3cb68: e59f381c ldr r3, [pc, #2076] ; 3d38c <rtems_rfs_format+0xce4><== NOT EXECUTED
3cb6c: e0c2c093 smull ip, r2, r3, r0 <== NOT EXECUTED
3cb70: e1a03fc0 asr r3, r0, #31 <== NOT EXECUTED
3cb74: e0632142 rsb r2, r3, r2, asr #2 <== NOT EXECUTED
3cb78: e0823102 add r3, r2, r2, lsl #2 <== NOT EXECUTED
3cb7c: e0403083 sub r3, r0, r3, lsl #1 <== NOT EXECUTED
3cb80: e59d1034 ldr r1, [sp, #52] ; 0x34 <== NOT EXECUTED
3cb84: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
3cb88: e0010190 mul r1, r0, r1 <== NOT EXECUTED
3cb8c: e59f07fc ldr r0, [pc, #2044] ; 3d390 <rtems_rfs_format+0xce8><== NOT EXECUTED
3cb90: eb003008 bl 48bb8 <printf> <== NOT EXECUTED
fs.group_inodes * fs.group_count,
rtems_rfs_inode_overhead (&fs) / 10,
rtems_rfs_inode_overhead (&fs) % 10);
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
3cb94: e59d1034 ldr r1, [sp, #52] ; 0x34 <== NOT EXECUTED
3cb98: e59f07f4 ldr r0, [pc, #2036] ; 3d394 <rtems_rfs_format+0xcec><== NOT EXECUTED
3cb9c: eb003005 bl 48bb8 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
3cba0: e59d1038 ldr r1, [sp, #56] ; 0x38 <== NOT EXECUTED
3cba4: e59f07ec ldr r0, [pc, #2028] ; 3d398 <rtems_rfs_format+0xcf0><== NOT EXECUTED
3cba8: eb003002 bl 48bb8 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
3cbac: e59f07e8 ldr r0, [pc, #2024] ; 3d39c <rtems_rfs_format+0xcf4><== NOT EXECUTED
3cbb0: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
3cbb4: eb002fff bl 48bb8 <printf> <== NOT EXECUTED
3cbb8: e59d501c ldr r5, [sp, #28] <== NOT EXECUTED
3cbbc: eaffff34 b 3c894 <rtems_rfs_format+0x1ec> <== NOT EXECUTED
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
{
printf ("group block count is higher than bits in block\n");
3cbc0: e59f07d8 ldr r0, [pc, #2008] ; 3d3a0 <rtems_rfs_format+0xcf8><== NOT EXECUTED
3cbc4: eb0030a0 bl 48e4c <puts> <== NOT EXECUTED
3cbc8: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cbcc: eaffff53 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
3cbd0: e1a00004 mov r0, r4 <== NOT EXECUTED
3cbd4: ebfffd27 bl 3c078 <rtems_rfs_fs_media_size> <== NOT EXECUTED
if (total_size >= GIGS (1))
3cbd8: e3510000 cmp r1, #0 <== NOT EXECUTED
3cbdc: 1a000002 bne 3cbec <rtems_rfs_format+0x544> <== NOT EXECUTED
3cbe0: e3500601 cmp r0, #1048576 ; 0x100000 <== NOT EXECUTED
3cbe4: 359d501c ldrcc r5, [sp, #28] <== NOT EXECUTED
3cbe8: 3a00000e bcc 3cc28 <rtems_rfs_format+0x580> <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
3cbec: e3a02601 mov r2, #1048576 ; 0x100000 <== NOT EXECUTED
3cbf0: e0922000 adds r2, r2, r0 <== NOT EXECUTED
3cbf4: e3a03000 mov r3, #0 <== NOT EXECUTED
3cbf8: e0a33001 adc r3, r3, r1 <== NOT EXECUTED
3cbfc: e1a01a22 lsr r1, r2, #20 <== NOT EXECUTED
3cc00: e1811603 orr r1, r1, r3, lsl #12 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
3cc04: e3a02001 mov r2, #1 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
3cc08: e3a0301f mov r3, #31 <== NOT EXECUTED
3cc0c: ea000001 b 3cc18 <rtems_rfs_format+0x570> <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
3cc10: e2533001 subs r3, r3, #1 <== NOT EXECUTED
3cc14: 0a000121 beq 3d0a0 <rtems_rfs_format+0x9f8> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
3cc18: e1a05312 lsl r5, r2, r3 <== NOT EXECUTED
3cc1c: e1150001 tst r5, r1 <== NOT EXECUTED
3cc20: 0afffffa beq 3cc10 <rtems_rfs_format+0x568> <== NOT EXECUTED
break;
fs->block_size = 1 << b;
3cc24: e58d501c str r5, [sp, #28] <== NOT EXECUTED
}
if (fs->block_size < 512)
3cc28: e3550c02 cmp r5, #512 ; 0x200 <== NOT EXECUTED
3cc2c: 2a000009 bcs 3cc58 <rtems_rfs_format+0x5b0> <== NOT EXECUTED
fs->block_size = 512;
3cc30: e3a05c02 mov r5, #512 ; 0x200 <== NOT EXECUTED
3cc34: e58d501c str r5, [sp, #28] <== NOT EXECUTED
3cc38: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
3cc3c: eafffec6 b 3c75c <rtems_rfs_format+0xb4> <== NOT EXECUTED
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
3cc40: e1a01005 mov r1, r5 <== NOT EXECUTED
3cc44: e1a02006 mov r2, r6 <== NOT EXECUTED
3cc48: e59f0754 ldr r0, [pc, #1876] ; 3d3a4 <rtems_rfs_format+0xcfc><== NOT EXECUTED
3cc4c: eb002fd9 bl 48bb8 <printf> <== NOT EXECUTED
3cc50: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cc54: eaffff31 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
3cc58: e3550a01 cmp r5, #4096 ; 0x1000 <== NOT EXECUTED
fs->block_size = (4 * 1024);
3cc5c: 83a05a01 movhi r5, #4096 ; 0x1000 <== NOT EXECUTED
3cc60: 858d501c strhi r5, [sp, #28] <== NOT EXECUTED
3cc64: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
3cc68: eafffebb b 3c75c <rtems_rfs_format+0xb4> <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
3cc6c: eb0037f5 bl 4ac48 <strerror> <== NOT EXECUTED
3cc70: e1a01005 mov r1, r5 <== NOT EXECUTED
3cc74: e1a02000 mov r2, r0 <== NOT EXECUTED
3cc78: e59f0728 ldr r0, [pc, #1832] ; 3d3a8 <rtems_rfs_format+0xd00><== NOT EXECUTED
3cc7c: eb002fcd bl 48bb8 <printf> <== NOT EXECUTED
3cc80: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
3cc84: eaffff25 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3cc88: e1a00004 mov r0, r4 <== NOT EXECUTED
3cc8c: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3cc90: ebfff5d9 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
3cc94: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3cc98: e3530000 cmp r3, #0 <== NOT EXECUTED
handle->dirty = false;
3cc9c: e5cd90d4 strb r9, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cca0: e58d90d8 str r9, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->buffer = NULL;
3cca4: e58d90dc str r9, [sp, #220] ; 0xdc <== NOT EXECUTED
3cca8: da00009d ble 3cf24 <rtems_rfs_format+0x87c> <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
3ccac: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
3ccb0: e5d72014 ldrb r2, [r7, #20] <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
3ccb4: e3530000 cmp r3, #0 <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
3ccb8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
3ccbc: e5d78015 ldrb r8, [r7, #21] <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
3ccc0: e59d6038 ldr r6, [sp, #56] ; 0x38 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
3ccc4: 01a09003 moveq r9, r3 <== NOT EXECUTED
3ccc8: 0a000056 beq 3ce28 <rtems_rfs_format+0x780> <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
3cccc: e1a0500a mov r5, sl <== NOT EXECUTED
3ccd0: e28da0bc add sl, sp, #188 ; 0xbc <== NOT EXECUTED
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
3ccd4: e0862005 add r2, r6, r5 <== NOT EXECUTED
3ccd8: e1530002 cmp r3, r2 <== NOT EXECUTED
group_size = rtems_rfs_fs_blocks (fs) - group_base;
3ccdc: 30656003 rsbcc r6, r5, r3 <== NOT EXECUTED
if (verbose)
3cce0: e3580000 cmp r8, #0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3cce4: 05cd80d4 strbeq r8, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cce8: 058d80d8 streq r8, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->buffer = NULL;
3ccec: 058d80dc streq r8, [sp, #220] ; 0xdc <== NOT EXECUTED
3ccf0: 1a000032 bne 3cdc0 <rtems_rfs_format+0x718> <== NOT EXECUTED
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
3ccf4: e1a0000a mov r0, sl <== NOT EXECUTED
3ccf8: e1a01004 mov r1, r4 <== NOT EXECUTED
3ccfc: e28d20d4 add r2, sp, #212 ; 0xd4 <== NOT EXECUTED
3cd00: e1a03006 mov r3, r6 <== NOT EXECUTED
3cd04: e58d5000 str r5, [sp] <== NOT EXECUTED
3cd08: eb001ade bl 43888 <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
3cd0c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3cd10: da00000f ble 3cd54 <rtems_rfs_format+0x6ac> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3cd14: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3cd18: e1a00004 mov r0, r4 <== NOT EXECUTED
3cd1c: ebfff5b6 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3cd20: e3a03000 mov r3, #0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
3cd24: e1a0000b mov r0, fp <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3cd28: e58d30dc str r3, [sp, #220] ; 0xdc <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3cd2c: e5cd30d4 strb r3, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cd30: e58d30d8 str r3, [sp, #216] ; 0xd8 <== NOT EXECUTED
3cd34: eb0037c3 bl 4ac48 <strerror> <== NOT EXECUTED
3cd38: e1a01009 mov r1, r9 <== NOT EXECUTED
3cd3c: e1a03000 mov r3, r0 <== NOT EXECUTED
3cd40: e1a0200b mov r2, fp <== NOT EXECUTED
3cd44: e59f0660 ldr r0, [pc, #1632] ; 3d3ac <rtems_rfs_format+0xd04><== NOT EXECUTED
3cd48: eb002f9a bl 48bb8 <printf> <== NOT EXECUTED
3cd4c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cd50: eafffef2 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
3cd54: e59d30dc ldr r3, [sp, #220] ; 0xdc <== NOT EXECUTED
3cd58: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3cd5c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3cd60: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3cd64: eb002b6c bl 47b1c <memset> <== NOT EXECUTED
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
3cd68: e1a0000a mov r0, sl <== NOT EXECUTED
3cd6c: eb001ad7 bl 438d0 <rtems_rfs_bitmap_map_clear_all> <== NOT EXECUTED
if (rc > 0)
3cd70: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3cd74: da000030 ble 3ce3c <rtems_rfs_format+0x794> <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
3cd78: e1a0000a mov r0, sl <== NOT EXECUTED
3cd7c: eb001a77 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3cd80: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3cd84: e1a00004 mov r0, r4 <== NOT EXECUTED
3cd88: ebfff59b bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3cd8c: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
3cd90: e1a0000b mov r0, fp <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3cd94: e58d30dc str r3, [sp, #220] ; 0xdc <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3cd98: e5cd30d4 strb r3, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cd9c: e58d30d8 str r3, [sp, #216] ; 0xd8 <== NOT EXECUTED
3cda0: eb0037a8 bl 4ac48 <strerror> <== NOT EXECUTED
3cda4: e1a01009 mov r1, r9 <== NOT EXECUTED
3cda8: e1a03000 mov r3, r0 <== NOT EXECUTED
3cdac: e1a0200b mov r2, fp <== NOT EXECUTED
3cdb0: e59f05f8 ldr r0, [pc, #1528] ; 3d3b0 <rtems_rfs_format+0xd08><== NOT EXECUTED
3cdb4: eb002f7f bl 48bb8 <printf> <== NOT EXECUTED
3cdb8: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cdbc: eafffed7 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
3cdc0: e1a02005 mov r2, r5 <== NOT EXECUTED
3cdc4: e1a03006 mov r3, r6 <== NOT EXECUTED
3cdc8: e1a01009 mov r1, r9 <== NOT EXECUTED
3cdcc: e59f05e0 ldr r0, [pc, #1504] ; 3d3b4 <rtems_rfs_format+0xd0c><== NOT EXECUTED
3cdd0: eb002f78 bl 48bb8 <printf> <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
3cdd4: e3a03000 mov r3, #0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3cdd8: e3a02000 mov r2, #0 <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
3cddc: e59f05d4 ldr r0, [pc, #1492] ; 3d3b8 <rtems_rfs_format+0xd10><== NOT EXECUTED
3cde0: e5cd20d4 strb r2, [sp, #212] ; 0xd4 <== NOT EXECUTED
handle->bnum = 0;
3cde4: e58d30d8 str r3, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->buffer = NULL;
3cde8: e58d30dc str r3, [sp, #220] ; 0xdc <== NOT EXECUTED
3cdec: eb002f71 bl 48bb8 <printf> <== NOT EXECUTED
3cdf0: eaffffbf b 3ccf4 <rtems_rfs_format+0x64c> <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
3cdf4: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3cdf8: e2899001 add r9, r9, #1 <== NOT EXECUTED
3cdfc: e1530009 cmp r3, r9 <== NOT EXECUTED
3ce00: da000047 ble 3cf24 <rtems_rfs_format+0x87c> <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
3ce04: e59d6038 ldr r6, [sp, #56] ; 0x38 <== NOT EXECUTED
3ce08: e0050996 mul r5, r6, r9 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
3ce0c: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
3ce10: e2855001 add r5, r5, #1 <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
3ce14: e5d71014 ldrb r1, [r7, #20] <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
3ce18: e1550003 cmp r5, r3 <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
3ce1c: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
3ce20: e5d78015 ldrb r8, [r7, #21] <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
3ce24: 9affffaa bls 3ccd4 <rtems_rfs_format+0x62c> <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
3ce28: e1a01009 mov r1, r9 <== NOT EXECUTED
3ce2c: e59f0588 ldr r0, [pc, #1416] ; 3d3bc <rtems_rfs_format+0xd14><== NOT EXECUTED
3ce30: eb002f60 bl 48bb8 <printf> <== NOT EXECUTED
3ce34: e3e00000 mvn r0, #0 <== NOT EXECUTED
3ce38: eafffeb8 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
3ce3c: e3a01000 mov r1, #0 <== NOT EXECUTED
3ce40: e1a0000a mov r0, sl <== NOT EXECUTED
3ce44: eb001b2f bl 43b08 <rtems_rfs_bitmap_map_set> <== NOT EXECUTED
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
3ce48: e3a01001 mov r1, #1 <== NOT EXECUTED
3ce4c: e1a0000a mov r0, sl <== NOT EXECUTED
3ce50: eb001b2c bl 43b08 <rtems_rfs_bitmap_map_set> <== NOT EXECUTED
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
3ce54: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3ce58: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
3ce5c: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3ce60: 1a000028 bne 3cf08 <rtems_rfs_format+0x860> <== NOT EXECUTED
3ce64: e3a0c001 mov ip, #1 <== NOT EXECUTED
3ce68: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
3ce6c: e58d8010 str r8, [sp, #16] <== NOT EXECUTED
3ce70: e59d800c ldr r8, [sp, #12] <== NOT EXECUTED
3ce74: e3a0b000 mov fp, #0 <== NOT EXECUTED
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
3ce78: e28b1002 add r1, fp, #2 <== NOT EXECUTED
3ce7c: e1a0000a mov r0, sl <== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
3ce80: e28bb001 add fp, fp, #1 <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
3ce84: eb001b1f bl 43b08 <rtems_rfs_bitmap_map_set> <== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
3ce88: e15b0008 cmp fp, r8 <== NOT EXECUTED
3ce8c: bafffff9 blt 3ce78 <rtems_rfs_format+0x7d0> <== NOT EXECUTED
3ce90: e59d8010 ldr r8, [sp, #16] <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
3ce94: e1a0000a mov r0, sl <== NOT EXECUTED
3ce98: eb001a30 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
if (rc > 0)
3ce9c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3cea0: ca00003f bgt 3cfa4 <rtems_rfs_format+0x8fc> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
3cea4: e3a01001 mov r1, #1 <== NOT EXECUTED
if (verbose)
3cea8: e3580000 cmp r8, #0 <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
3ceac: e5cd10d4 strb r1, [sp, #212] ; 0xd4 <== NOT EXECUTED
if (verbose)
3ceb0: 1a00005e bne 3d030 <rtems_rfs_format+0x988> <== NOT EXECUTED
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
3ceb4: e1a03006 mov r3, r6 <== NOT EXECUTED
3ceb8: e285c001 add ip, r5, #1 <== NOT EXECUTED
3cebc: e1a0000a mov r0, sl <== NOT EXECUTED
3cec0: e1a01004 mov r1, r4 <== NOT EXECUTED
3cec4: e28d20d4 add r2, sp, #212 ; 0xd4 <== NOT EXECUTED
3cec8: e58dc000 str ip, [sp] <== NOT EXECUTED
3cecc: eb001a6d bl 43888 <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
3ced0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3ced4: da00003e ble 3cfd4 <rtems_rfs_format+0x92c> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
3ced8: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3cedc: e1a00004 mov r0, r4 <== NOT EXECUTED
3cee0: ebfffde8 bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
3cee4: e1a00006 mov r0, r6 <== NOT EXECUTED
3cee8: eb003756 bl 4ac48 <strerror> <== NOT EXECUTED
3ceec: e1a01009 mov r1, r9 <== NOT EXECUTED
3cef0: e1a03000 mov r3, r0 <== NOT EXECUTED
3cef4: e1a02006 mov r2, r6 <== NOT EXECUTED
3cef8: e59f04c0 ldr r0, [pc, #1216] ; 3d3c0 <rtems_rfs_format+0xd18><== NOT EXECUTED
3cefc: eb002f2d bl 48bb8 <printf> <== NOT EXECUTED
3cf00: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cf04: eafffe85 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
3cf08: e2400001 sub r0, r0, #1 <== NOT EXECUTED
3cf0c: eb007d9a bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3cf10: e2800001 add r0, r0, #1 <== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
3cf14: e3500000 cmp r0, #0 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
3cf18: e58d000c str r0, [sp, #12] <== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
3cf1c: caffffd2 bgt 3ce6c <rtems_rfs_format+0x7c4> <== NOT EXECUTED
3cf20: eaffffdb b 3ce94 <rtems_rfs_format+0x7ec> <== NOT EXECUTED
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
3cf24: e5d73015 ldrb r3, [r7, #21] <== NOT EXECUTED
3cf28: e3530000 cmp r3, #0 <== NOT EXECUTED
3cf2c: 1a000051 bne 3d078 <rtems_rfs_format+0x9d0> <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
3cf30: e1a00004 mov r0, r4 <== NOT EXECUTED
3cf34: ebfff50f bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
if (rc > 0)
3cf38: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3cf3c: ca00009f bgt 3d1c0 <rtems_rfs_format+0xb18> <== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
3cf40: e3a01000 mov r1, #0 <== NOT EXECUTED
3cf44: e28dc0e4 add ip, sp, #228 ; 0xe4 <== NOT EXECUTED
3cf48: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
3cf4c: e3a02006 mov r2, #6 <== NOT EXECUTED
3cf50: e1a03001 mov r3, r1 <== NOT EXECUTED
3cf54: e58dc000 str ip, [sp] <== NOT EXECUTED
3cf58: ebfffc6d bl 3c114 <rtems_rfs_fs_open> <== NOT EXECUTED
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
3cf5c: e3500000 cmp r0, #0 <== NOT EXECUTED
3cf60: ba0000e4 blt 3d2f8 <rtems_rfs_format+0xc50> <== NOT EXECUTED
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
3cf64: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3cf68: e3a01001 mov r1, #1 <== NOT EXECUTED
3cf6c: e28d20e0 add r2, sp, #224 ; 0xe0 <== NOT EXECUTED
3cf70: eb0003c9 bl 3de9c <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
3cf74: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3cf78: ca00002f bgt 3d03c <rtems_rfs_format+0x994> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
3cf7c: e59d40e0 ldr r4, [sp, #224] ; 0xe0 <== NOT EXECUTED
3cf80: e3540001 cmp r4, #1 <== NOT EXECUTED
3cf84: 0a000048 beq 3d0ac <rtems_rfs_format+0xa04> <== NOT EXECUTED
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
3cf88: e1a01004 mov r1, r4 <== NOT EXECUTED
3cf8c: e59f0430 ldr r0, [pc, #1072] ; 3d3c4 <rtems_rfs_format+0xd1c><== NOT EXECUTED
3cf90: eb002f08 bl 48bb8 <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
3cf94: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3cf98: ebfffc3f bl 3c09c <rtems_rfs_fs_close> <== NOT EXECUTED
3cf9c: e3a00000 mov r0, #0 <== NOT EXECUTED
3cfa0: eafffe5e b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
3cfa4: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3cfa8: e1a00004 mov r0, r4 <== NOT EXECUTED
3cfac: ebfffdb5 bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
3cfb0: e1a0000b mov r0, fp <== NOT EXECUTED
3cfb4: eb003723 bl 4ac48 <strerror> <== NOT EXECUTED
3cfb8: e1a01009 mov r1, r9 <== NOT EXECUTED
3cfbc: e1a03000 mov r3, r0 <== NOT EXECUTED
3cfc0: e1a0200b mov r2, fp <== NOT EXECUTED
3cfc4: e59f03fc ldr r0, [pc, #1020] ; 3d3c8 <rtems_rfs_format+0xd20><== NOT EXECUTED
3cfc8: eb002efa bl 48bb8 <printf> <== NOT EXECUTED
3cfcc: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cfd0: eafffe52 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
3cfd4: e59d30dc ldr r3, [sp, #220] ; 0xdc <== NOT EXECUTED
3cfd8: e3a01000 mov r1, #0 <== NOT EXECUTED
3cfdc: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3cfe0: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3cfe4: eb002acc bl 47b1c <memset> <== NOT EXECUTED
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
3cfe8: e1a0000a mov r0, sl <== NOT EXECUTED
3cfec: eb001a37 bl 438d0 <rtems_rfs_bitmap_map_clear_all> <== NOT EXECUTED
if (rc > 0)
3cff0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3cff4: da000040 ble 3d0fc <rtems_rfs_format+0xa54> <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
3cff8: e1a0000a mov r0, sl <== NOT EXECUTED
3cffc: eb0019d7 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
3d000: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3d004: e1a00004 mov r0, r4 <== NOT EXECUTED
3d008: ebfffd9e bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
3d00c: e1a00006 mov r0, r6 <== NOT EXECUTED
3d010: eb00370c bl 4ac48 <strerror> <== NOT EXECUTED
3d014: e1a01009 mov r1, r9 <== NOT EXECUTED
3d018: e1a03000 mov r3, r0 <== NOT EXECUTED
3d01c: e1a02006 mov r2, r6 <== NOT EXECUTED
3d020: e59f03a4 ldr r0, [pc, #932] ; 3d3cc <rtems_rfs_format+0xd24><== NOT EXECUTED
3d024: eb002ee3 bl 48bb8 <printf> <== NOT EXECUTED
3d028: e3e00000 mvn r0, #0 <== NOT EXECUTED
3d02c: eafffe3b b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
3d030: e59f0398 ldr r0, [pc, #920] ; 3d3d0 <rtems_rfs_format+0xd28><== NOT EXECUTED
3d034: eb002edf bl 48bb8 <printf> <== NOT EXECUTED
3d038: eaffff9d b 3ceb4 <rtems_rfs_format+0x80c> <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
3d03c: eb003701 bl 4ac48 <strerror> <== NOT EXECUTED
3d040: e1a01006 mov r1, r6 <== NOT EXECUTED
3d044: e1a02000 mov r2, r0 <== NOT EXECUTED
3d048: e59f0384 ldr r0, [pc, #900] ; 3d3d4 <rtems_rfs_format+0xd2c><== NOT EXECUTED
3d04c: eb002ed9 bl 48bb8 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
3d050: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d054: ebfffc10 bl 3c09c <rtems_rfs_fs_close> <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
3d058: e1a00006 mov r0, r6 <== NOT EXECUTED
3d05c: eb0036f9 bl 4ac48 <strerror> <== NOT EXECUTED
3d060: e1a01006 mov r1, r6 <== NOT EXECUTED
3d064: e1a02000 mov r2, r0 <== NOT EXECUTED
3d068: e59f0368 ldr r0, [pc, #872] ; 3d3d8 <rtems_rfs_format+0xd30><== NOT EXECUTED
3d06c: eb002ed1 bl 48bb8 <printf> <== NOT EXECUTED
3d070: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
3d074: eafffe29 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
3d078: e3a0000a mov r0, #10 <== NOT EXECUTED
3d07c: eb002f42 bl 48d8c <putchar> <== NOT EXECUTED
3d080: eaffffaa b 3cf30 <rtems_rfs_format+0x888> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
3d084: eb0036ef bl 4ac48 <strerror> <== NOT EXECUTED
3d088: e1a01005 mov r1, r5 <== NOT EXECUTED
3d08c: e1a02000 mov r2, r0 <== NOT EXECUTED
3d090: e59f0344 ldr r0, [pc, #836] ; 3d3dc <rtems_rfs_format+0xd34><== NOT EXECUTED
3d094: eb002ec7 bl 48bb8 <printf> <== NOT EXECUTED
3d098: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
3d09c: eafffe1f b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
3d0a0: e3a05001 mov r5, #1 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
3d0a4: e58d501c str r5, [sp, #28] <== NOT EXECUTED
3d0a8: eafffede b 3cc28 <rtems_rfs_format+0x580> <== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3d0ac: e28d5094 add r5, sp, #148 ; 0x94 <== NOT EXECUTED
3d0b0: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d0b4: e1a01004 mov r1, r4 <== NOT EXECUTED
3d0b8: e1a02005 mov r2, r5 <== NOT EXECUTED
3d0bc: e1a03004 mov r3, r4 <== NOT EXECUTED
3d0c0: eb00031b bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3d0c4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3d0c8: da00004f ble 3d20c <rtems_rfs_format+0xb64> <== NOT EXECUTED
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
3d0cc: eb0036dd bl 4ac48 <strerror> <== NOT EXECUTED
3d0d0: e1a01006 mov r1, r6 <== NOT EXECUTED
3d0d4: e1a02000 mov r2, r0 <== NOT EXECUTED
3d0d8: e59f0300 ldr r0, [pc, #768] ; 3d3e0 <rtems_rfs_format+0xd38><== NOT EXECUTED
3d0dc: eb002eb5 bl 48bb8 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
3d0e0: e1a01004 mov r1, r4 <== NOT EXECUTED
3d0e4: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d0e8: e59d20e0 ldr r2, [sp, #224] ; 0xe0 <== NOT EXECUTED
3d0ec: eb000120 bl 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
3d0f0: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d0f4: ebfffbe8 bl 3c09c <rtems_rfs_fs_close> <== NOT EXECUTED
3d0f8: eaffffd6 b 3d058 <rtems_rfs_format+0x9b0> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
3d0fc: e1a0000a mov r0, sl <== NOT EXECUTED
3d100: eb001996 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
if (rc > 0)
3d104: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3d108: ca000033 bgt 3d1dc <rtems_rfs_format+0xb34> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
3d10c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
3d110: e3a03001 mov r3, #1 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
3d114: e3520000 cmp r2, #0 <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
3d118: e5cd30d4 strb r3, [sp, #212] ; 0xd4 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
3d11c: 0a000069 beq 3d2c8 <rtems_rfs_format+0xc20> <== NOT EXECUTED
{
for (b = 0; b < blocks; b++)
3d120: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
3d124: e35c0000 cmp ip, #0 <== NOT EXECUTED
3d128: da000066 ble 3d2c8 <rtems_rfs_format+0xc20> <== NOT EXECUTED
3d12c: e2856002 add r6, r5, #2 <== NOT EXECUTED
3d130: e1a08007 mov r8, r7 <== NOT EXECUTED
3d134: e3a05000 mov r5, #0 <== NOT EXECUTED
3d138: e1a0700c mov r7, ip <== NOT EXECUTED
3d13c: ea000008 b 3d164 <rtems_rfs_format+0xabc> <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
3d140: e59d30dc ldr r3, [sp, #220] ; 0xdc <== NOT EXECUTED
3d144: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3d148: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3d14c: eb002a72 bl 47b1c <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
3d150: e3a01001 mov r1, #1 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
3d154: e1550007 cmp r5, r7 <== NOT EXECUTED
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
rtems_rfs_buffer_mark_dirty (&handle);
3d158: e5cd10d4 strb r1, [sp, #212] ; 0xd4 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
3d15c: e2866001 add r6, r6, #1 <== NOT EXECUTED
3d160: aa000057 bge 3d2c4 <rtems_rfs_format+0xc1c> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
3d164: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3d168: e1a02006 mov r2, r6 <== NOT EXECUTED
3d16c: e3a03000 mov r3, #0 <== NOT EXECUTED
3d170: e1a00004 mov r0, r4 <== NOT EXECUTED
3d174: ebfff4ea bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
3d178: e3500000 cmp r0, #0 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
3d17c: e2855001 add r5, r5, #1 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
3d180: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
3d184: daffffed ble 3d140 <rtems_rfs_format+0xa98> <== NOT EXECUTED
3d188: e1a08000 mov r8, r0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
3d18c: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3d190: e1a00004 mov r0, r4 <== NOT EXECUTED
3d194: ebfffd3b bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
3d198: e1a00008 mov r0, r8 <== NOT EXECUTED
3d19c: eb0036a9 bl 4ac48 <strerror> <== NOT EXECUTED
3d1a0: e1a01009 mov r1, r9 <== NOT EXECUTED
3d1a4: e58d0000 str r0, [sp] <== NOT EXECUTED
3d1a8: e1a02006 mov r2, r6 <== NOT EXECUTED
3d1ac: e1a03008 mov r3, r8 <== NOT EXECUTED
3d1b0: e59f022c ldr r0, [pc, #556] ; 3d3e4 <rtems_rfs_format+0xd3c><== NOT EXECUTED
3d1b4: eb002e7f bl 48bb8 <printf> <== NOT EXECUTED
3d1b8: e3e00000 mvn r0, #0 <== NOT EXECUTED
3d1bc: eafffdd7 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
3d1c0: eb0036a0 bl 4ac48 <strerror> <== NOT EXECUTED
3d1c4: e1a01004 mov r1, r4 <== NOT EXECUTED
3d1c8: e1a02000 mov r2, r0 <== NOT EXECUTED
3d1cc: e59f0214 ldr r0, [pc, #532] ; 3d3e8 <rtems_rfs_format+0xd40><== NOT EXECUTED
3d1d0: eb002e78 bl 48bb8 <printf> <== NOT EXECUTED
3d1d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
3d1d8: eafffdd0 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
3d1dc: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3d1e0: e1a00004 mov r0, r4 <== NOT EXECUTED
3d1e4: ebfffd27 bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
3d1e8: e1a00006 mov r0, r6 <== NOT EXECUTED
3d1ec: eb003695 bl 4ac48 <strerror> <== NOT EXECUTED
3d1f0: e1a01009 mov r1, r9 <== NOT EXECUTED
3d1f4: e1a03000 mov r3, r0 <== NOT EXECUTED
3d1f8: e1a02006 mov r2, r6 <== NOT EXECUTED
3d1fc: e59f01e8 ldr r0, [pc, #488] ; 3d3ec <rtems_rfs_format+0xd44><== NOT EXECUTED
3d200: eb002e6c bl 48bb8 <printf> <== NOT EXECUTED
3d204: e3e00000 mvn r0, #0 <== NOT EXECUTED
3d208: eafffdc4 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
3d20c: e3a0c000 mov ip, #0 <== NOT EXECUTED
3d210: e3a02c41 mov r2, #16640 ; 0x4100 <== NOT EXECUTED
3d214: e1a0100c mov r1, ip <== NOT EXECUTED
3d218: e28220c9 add r2, r2, #201 ; 0xc9 <== NOT EXECUTED
3d21c: e1a00005 mov r0, r5 <== NOT EXECUTED
3d220: e1a0300c mov r3, ip <== NOT EXECUTED
3d224: e58dc000 str ip, [sp] <== NOT EXECUTED
3d228: eb000217 bl 3da8c <rtems_rfs_inode_initialise> <== NOT EXECUTED
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
3d22c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3d230: da000004 ble 3d248 <rtems_rfs_format+0xba0> <== NOT EXECUTED
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
3d234: eb003683 bl 4ac48 <strerror> <== NOT EXECUTED
3d238: e1a01004 mov r1, r4 <== NOT EXECUTED
3d23c: e1a02000 mov r2, r0 <== NOT EXECUTED
3d240: e59f01a8 ldr r0, [pc, #424] ; 3d3f0 <rtems_rfs_format+0xd48><== NOT EXECUTED
3d244: eb002e5b bl 48bb8 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
3d248: e59dc0e0 ldr ip, [sp, #224] ; 0xe0 <== NOT EXECUTED
3d24c: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d250: e1a01005 mov r1, r5 <== NOT EXECUTED
3d254: e59f2198 ldr r2, [pc, #408] ; 3d3f4 <rtems_rfs_format+0xd4c><== NOT EXECUTED
3d258: e3a03001 mov r3, #1 <== NOT EXECUTED
3d25c: e58dc000 str ip, [sp] <== NOT EXECUTED
3d260: ebfff6bc bl 3ad58 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
3d264: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3d268: da000004 ble 3d280 <rtems_rfs_format+0xbd8> <== NOT EXECUTED
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
3d26c: eb003675 bl 4ac48 <strerror> <== NOT EXECUTED
3d270: e1a01004 mov r1, r4 <== NOT EXECUTED
3d274: e1a02000 mov r2, r0 <== NOT EXECUTED
3d278: e59f0178 ldr r0, [pc, #376] ; 3d3f8 <rtems_rfs_format+0xd50><== NOT EXECUTED
3d27c: eb002e4d bl 48bb8 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
3d280: e1a01005 mov r1, r5 <== NOT EXECUTED
3d284: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d288: eb000285 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3d28c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3d290: da000004 ble 3d2a8 <rtems_rfs_format+0xc00> <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
3d294: eb00366b bl 4ac48 <strerror> <== NOT EXECUTED
3d298: e1a01004 mov r1, r4 <== NOT EXECUTED
3d29c: e1a02000 mov r2, r0 <== NOT EXECUTED
3d2a0: e59f0154 ldr r0, [pc, #340] ; 3d3fc <rtems_rfs_format+0xd54><== NOT EXECUTED
3d2a4: eb002e43 bl 48bb8 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
3d2a8: e59d00e4 ldr r0, [sp, #228] ; 0xe4 <== NOT EXECUTED
3d2ac: ebfffb7a bl 3c09c <rtems_rfs_fs_close> <== NOT EXECUTED
if (rc < 0)
3d2b0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3d2b4: ba00001a blt 3d324 <rtems_rfs_format+0xc7c> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
3d2b8: 01a00006 moveq r0, r6 <== NOT EXECUTED
3d2bc: 0afffd97 beq 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
3d2c0: eaffff64 b 3d058 <rtems_rfs_format+0x9b0> <== NOT EXECUTED
3d2c4: e1a07008 mov r7, r8 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
3d2c8: e1a00004 mov r0, r4 <== NOT EXECUTED
3d2cc: e28d10d4 add r1, sp, #212 ; 0xd4 <== NOT EXECUTED
3d2d0: ebfffcec bl 3c688 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
if (rc > 0)
3d2d4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3d2d8: dafffec5 ble 3cdf4 <rtems_rfs_format+0x74c> <== NOT EXECUTED
{
printf ("\nrtems-rfs: write-group: buffer handle close failed: %d: %s\n",
3d2dc: eb003659 bl 4ac48 <strerror> <== NOT EXECUTED
3d2e0: e1a01005 mov r1, r5 <== NOT EXECUTED
3d2e4: e1a02000 mov r2, r0 <== NOT EXECUTED
3d2e8: e59f0110 ldr r0, [pc, #272] ; 3d400 <rtems_rfs_format+0xd58><== NOT EXECUTED
3d2ec: eb002e31 bl 48bb8 <printf> <== NOT EXECUTED
3d2f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
3d2f4: eafffd89 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
rc = rtems_rfs_fs_open (name, NULL,
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
3d2f8: eb001cd0 bl 44640 <__errno> <== NOT EXECUTED
3d2fc: e5904000 ldr r4, [r0] <== NOT EXECUTED
3d300: eb001cce bl 44640 <__errno> <== NOT EXECUTED
3d304: e5900000 ldr r0, [r0] <== NOT EXECUTED
3d308: eb00364e bl 4ac48 <strerror> <== NOT EXECUTED
3d30c: e1a01004 mov r1, r4 <== NOT EXECUTED
3d310: e1a02000 mov r2, r0 <== NOT EXECUTED
3d314: e59f00e8 ldr r0, [pc, #232] ; 3d404 <rtems_rfs_format+0xd5c><== NOT EXECUTED
3d318: eb002e26 bl 48bb8 <printf> <== NOT EXECUTED
3d31c: e3a00000 mov r0, #0 <== NOT EXECUTED
3d320: eafffd7e b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
3d324: eb001cc5 bl 44640 <__errno> <== NOT EXECUTED
3d328: e5904000 ldr r4, [r0] <== NOT EXECUTED
3d32c: eb001cc3 bl 44640 <__errno> <== NOT EXECUTED
3d330: e5900000 ldr r0, [r0] <== NOT EXECUTED
3d334: eb003643 bl 4ac48 <strerror> <== NOT EXECUTED
3d338: e1a01004 mov r1, r4 <== NOT EXECUTED
3d33c: e1a02000 mov r2, r0 <== NOT EXECUTED
3d340: e59f00c0 ldr r0, [pc, #192] ; 3d408 <rtems_rfs_format+0xd60><== NOT EXECUTED
3d344: eb002e1b bl 48bb8 <printf> <== NOT EXECUTED
3d348: e3a00000 mov r0, #0 <== NOT EXECUTED
3d34c: eafffd73 b 3c920 <rtems_rfs_format+0x278> <== NOT EXECUTED
0003c09c <rtems_rfs_fs_close>:
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
3c09c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
3c0a0: e3530000 cmp r3, #0 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
3c0a4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3c0a8: e1a04000 mov r4, r0 <== NOT EXECUTED
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
3c0ac: da00000a ble 3c0dc <rtems_rfs_fs_close+0x40> <== NOT EXECUTED
3c0b0: e3a05000 mov r5, #0 <== NOT EXECUTED
3c0b4: e1a06005 mov r6, r5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
3c0b8: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3c0bc: e1a00004 mov r0, r4 <== NOT EXECUTED
3c0c0: e0811005 add r1, r1, r5 <== NOT EXECUTED
3c0c4: eb0005cc bl 3d7fc <rtems_rfs_group_close> <== NOT EXECUTED
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
3c0c8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3c0cc: e2866001 add r6, r6, #1 <== NOT EXECUTED
3c0d0: e1530006 cmp r3, r6 <== NOT EXECUTED
3c0d4: e2855050 add r5, r5, #80 ; 0x50 <== NOT EXECUTED
3c0d8: cafffff6 bgt 3c0b8 <rtems_rfs_fs_close+0x1c> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
3c0dc: e1a00004 mov r0, r4 <== NOT EXECUTED
3c0e0: ebfff8a4 bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (fs);
3c0e4: e1a00004 mov r0, r4 <== NOT EXECUTED
3c0e8: ebff2f20 bl 7d70 <free> <== NOT EXECUTED
return 0;
}
3c0ec: e3a00000 mov r0, #0 <== NOT EXECUTED
3c0f0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003c078 <rtems_rfs_fs_media_size>:
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
3c078: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
3c07c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
3c080: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
return blocks * block_size;
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
3c084: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
3c088: e0843291 umull r3, r4, r1, r2 <== NOT EXECUTED
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
}
3c08c: e1a01004 mov r1, r4 <== NOT EXECUTED
3c090: e1a00003 mov r0, r3 <== NOT EXECUTED
3c094: e8bd0010 pop {r4} <== NOT EXECUTED
3c098: e12fff1e bx lr <== NOT EXECUTED
0003c114 <rtems_rfs_fs_open>:
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
3c114: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3c118: e24dd03c sub sp, sp, #60 ; 0x3c <== NOT EXECUTED
3c11c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
3c120: e3a00080 mov r0, #128 ; 0x80 <== NOT EXECUTED
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
3c124: e59d5060 ldr r5, [sp, #96] ; 0x60 <== NOT EXECUTED
3c128: e1a07001 mov r7, r1 <== NOT EXECUTED
3c12c: e1a06002 mov r6, r2 <== NOT EXECUTED
3c130: e1a08003 mov r8, r3 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
3c134: ebff30d1 bl 8480 <malloc> <== NOT EXECUTED
if (!*fs)
3c138: e3500000 cmp r0, #0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
3c13c: e5850000 str r0, [r5] <== NOT EXECUTED
if (!*fs)
3c140: 0a0000c8 beq 3c468 <rtems_rfs_fs_open+0x354> <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
3c144: e3a01000 mov r1, #0 <== NOT EXECUTED
3c148: e3a02080 mov r2, #128 ; 0x80 <== NOT EXECUTED
3c14c: eb002e72 bl 47b1c <memset> <== NOT EXECUTED
(*fs)->user = user;
3c150: e5951000 ldr r1, [r5] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
3c154: e3a04000 mov r4, #0 <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
3c158: e2810060 add r0, r1, #96 ; 0x60 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c15c: e281b044 add fp, r1, #68 ; 0x44 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c160: e2819040 add r9, r1, #64 ; 0x40 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c164: e281a054 add sl, r1, #84 ; 0x54 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c168: e281e050 add lr, r1, #80 ; 0x50 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c16c: e281c064 add ip, r1, #100 ; 0x64 <== NOT EXECUTED
3c170: e2812074 add r2, r1, #116 ; 0x74 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c174: e2813070 add r3, r1, #112 ; 0x70 <== NOT EXECUTED
3c178: e5810068 str r0, [r1, #104] ; 0x68 <== NOT EXECUTED
(*fs)->max_held_buffers = max_held_buffers;
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
3c17c: e5816000 str r6, [r1] <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
3c180: e581707c str r7, [r1, #124] ; 0x7c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c184: e581b040 str fp, [r1, #64] ; 0x40 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c188: e5819048 str r9, [r1, #72] ; 0x48 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c18c: e581a050 str sl, [r1, #80] ; 0x50 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c190: e581e058 str lr, [r1, #88] ; 0x58 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3c194: e581c060 str ip, [r1, #96] ; 0x60 <== NOT EXECUTED
3c198: e5812070 str r2, [r1, #112] ; 0x70 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
3c19c: e5813078 str r3, [r1, #120] ; 0x78 <== NOT EXECUTED
rtems_chain_initialize_empty (&(*fs)->buffers);
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = max_held_buffers;
3c1a0: e581803c str r8, [r1, #60] ; 0x3c <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
3c1a4: e5814044 str r4, [r1, #68] ; 0x44 <== NOT EXECUTED
3c1a8: e5814054 str r4, [r1, #84] ; 0x54 <== NOT EXECUTED
3c1ac: e5814064 str r4, [r1, #100] ; 0x64 <== NOT EXECUTED
3c1b0: e5814074 str r4, [r1, #116] ; 0x74 <== NOT EXECUTED
(*fs)->buffers_count = 0;
3c1b4: e581404c str r4, [r1, #76] ; 0x4c <== NOT EXECUTED
(*fs)->release_count = 0;
3c1b8: e581405c str r4, [r1, #92] ; 0x5c <== NOT EXECUTED
(*fs)->release_modified_count = 0;
3c1bc: e581406c str r4, [r1, #108] ; 0x6c <== NOT EXECUTED
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
3c1c0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3c1c4: ebfff875 bl 3a3a0 <rtems_rfs_buffer_open> <== NOT EXECUTED
if (rc > 0)
3c1c8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3c1cc: ca00002b bgt 3c280 <rtems_rfs_fs_open+0x16c> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
3c1d0: e5956000 ldr r6, [r5] <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
3c1d4: e28d7030 add r7, sp, #48 ; 0x30 <== NOT EXECUTED
3c1d8: e1a00006 mov r0, r6 <== NOT EXECUTED
3c1dc: e1a01007 mov r1, r7 <== NOT EXECUTED
3c1e0: e1a02004 mov r2, r4 <== NOT EXECUTED
3c1e4: e3a03001 mov r3, #1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3c1e8: e5cd4030 strb r4, [sp, #48] ; 0x30 <== NOT EXECUTED
handle->bnum = 0;
3c1ec: e58d4034 str r4, [sp, #52] ; 0x34 <== NOT EXECUTED
handle->buffer = NULL;
3c1f0: e58d4038 str r4, [sp, #56] ; 0x38 <== NOT EXECUTED
3c1f4: ebfff8ca bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3c1f8: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3c1fc: da000008 ble 3c224 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
3c200: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c204: ebfff85b bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
3c208: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c20c: ebff2ed7 bl 7d70 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
rc, strerror (rc));
errno = rc;
3c210: eb00210a bl 44640 <__errno> <== NOT EXECUTED
3c214: e580a000 str sl, [r0] <== NOT EXECUTED
3c218: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
}
errno = 0;
return 0;
}
3c21c: e28dd03c add sp, sp, #60 ; 0x3c <== NOT EXECUTED
3c220: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
3c224: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3c228: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
3c22c: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
3c230: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
3c234: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
3c238: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
3c23c: e5d30002 ldrb r0, [r3, #2] <== NOT EXECUTED
3c240: e1811802 orr r1, r1, r2, lsl #16 <== NOT EXECUTED
3c244: e3a0234a mov r2, #671088641 ; 0x28000001 <== NOT EXECUTED
3c248: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
3c24c: e2822a92 add r2, r2, #598016 ; 0x92000 <== NOT EXECUTED
3c250: e1510002 cmp r1, r2 <== NOT EXECUTED
3c254: 0a00000f beq 3c298 <rtems_rfs_fs_open+0x184> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3c258: e1a00006 mov r0, r6 <== NOT EXECUTED
3c25c: e1a01007 mov r1, r7 <== NOT EXECUTED
3c260: ebfff865 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3c264: e3a0a005 mov sl, #5 <== NOT EXECUTED
3c268: e58d4038 str r4, [sp, #56] ; 0x38 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3c26c: e5cd4030 strb r4, [sp, #48] ; 0x30 <== NOT EXECUTED
handle->bnum = 0;
3c270: e58d4034 str r4, [sp, #52] ; 0x34 <== NOT EXECUTED
3c274: eaffffe1 b 3c200 <rtems_rfs_fs_open+0xec> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
3c278: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c27c: ebfff83d bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
3c280: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c284: ebff2eb9 bl 7d70 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
rc, strerror (rc));
errno = rc;
3c288: eb0020ec bl 44640 <__errno> <== NOT EXECUTED
3c28c: e5806000 str r6, [r0] <== NOT EXECUTED
3c290: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3c294: eaffffe0 b 3c21c <rtems_rfs_fs_open+0x108> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
3c298: e5d3100d ldrb r1, [r3, #13] <== NOT EXECUTED
3c29c: e5d3200c ldrb r2, [r3, #12] <== NOT EXECUTED
3c2a0: e5d3000f ldrb r0, [r3, #15] <== NOT EXECUTED
3c2a4: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c2a8: e1811c02 orr r1, r1, r2, lsl #24 <== NOT EXECUTED
3c2ac: e5d3200e ldrb r2, [r3, #14] <== NOT EXECUTED
3c2b0: e1811000 orr r1, r1, r0 <== NOT EXECUTED
3c2b4: e1811402 orr r1, r1, r2, lsl #8 <== NOT EXECUTED
3c2b8: e5861004 str r1, [r6, #4] <== NOT EXECUTED
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
3c2bc: e5d32009 ldrb r2, [r3, #9] <== NOT EXECUTED
3c2c0: e5d30008 ldrb r0, [r3, #8] <== NOT EXECUTED
3c2c4: e5d3c00b ldrb ip, [r3, #11] <== NOT EXECUTED
3c2c8: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
3c2cc: e1822c00 orr r2, r2, r0, lsl #24 <== NOT EXECUTED
3c2d0: e5d3000a ldrb r0, [r3, #10] <== NOT EXECUTED
3c2d4: e182200c orr r2, r2, ip <== NOT EXECUTED
3c2d8: e1822400 orr r2, r2, r0, lsl #8 <== NOT EXECUTED
3c2dc: e5862008 str r2, [r6, #8] <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
3c2e0: e596000c ldr r0, [r6, #12] <== NOT EXECUTED
3c2e4: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
3c2e8: e5900024 ldr r0, [r0, #36] ; 0x24 <== NOT EXECUTED
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
3c2ec: e08ba192 umull sl, fp, r2, r1 <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
3c2f0: e0898c90 umull r8, r9, r0, ip <== NOT EXECUTED
3c2f4: e15b0009 cmp fp, r9 <== NOT EXECUTED
3c2f8: 8a00000a bhi 3c328 <rtems_rfs_fs_open+0x214> <== NOT EXECUTED
3c2fc: 0a00000e beq 3c33c <rtems_rfs_fs_open+0x228> <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
3c300: e5d31025 ldrb r1, [r3, #37] ; 0x25 <== NOT EXECUTED
3c304: e5d30024 ldrb r0, [r3, #36] ; 0x24 <== NOT EXECUTED
3c308: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c30c: e5d3c027 ldrb ip, [r3, #39] ; 0x27 <== NOT EXECUTED
3c310: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
3c314: e5d30026 ldrb r0, [r3, #38] ; 0x26 <== NOT EXECUTED
3c318: e181100c orr r1, r1, ip <== NOT EXECUTED
3c31c: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
3c320: e3510038 cmp r1, #56 ; 0x38 <== NOT EXECUTED
3c324: 0a000007 beq 3c348 <rtems_rfs_fs_open+0x234> <== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
3c328: e1a00006 mov r0, r6 <== NOT EXECUTED
3c32c: e1a01007 mov r1, r7 <== NOT EXECUTED
3c330: ebffff6f bl 3c0f4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
3c334: e3a0a005 mov sl, #5 <== NOT EXECUTED
3c338: eaffffb0 b 3c200 <rtems_rfs_fs_open+0xec> <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
3c33c: e15a0008 cmp sl, r8 <== NOT EXECUTED
3c340: 9affffee bls 3c300 <rtems_rfs_fs_open+0x1ec> <== NOT EXECUTED
3c344: eafffff7 b 3c328 <rtems_rfs_fs_open+0x214> <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
3c348: e5d31011 ldrb r1, [r3, #17] <== NOT EXECUTED
3c34c: e5d30010 ldrb r0, [r3, #16] <== NOT EXECUTED
3c350: e5d3c013 ldrb ip, [r3, #19] <== NOT EXECUTED
3c354: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c358: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
3c35c: e5d30012 ldrb r0, [r3, #18] <== NOT EXECUTED
3c360: e181100c orr r1, r1, ip <== NOT EXECUTED
3c364: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
3c368: e5861014 str r1, [r6, #20] <== NOT EXECUTED
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
3c36c: e5d31015 ldrb r1, [r3, #21] <== NOT EXECUTED
3c370: e5d30014 ldrb r0, [r3, #20] <== NOT EXECUTED
3c374: e5d3c017 ldrb ip, [r3, #23] <== NOT EXECUTED
3c378: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c37c: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
3c380: e5d30016 ldrb r0, [r3, #22] <== NOT EXECUTED
3c384: e181100c orr r1, r1, ip <== NOT EXECUTED
3c388: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
3c38c: e5861018 str r1, [r6, #24] <== NOT EXECUTED
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
3c390: e5d31019 ldrb r1, [r3, #25] <== NOT EXECUTED
3c394: e5d3c018 ldrb ip, [r3, #24] <== NOT EXECUTED
3c398: e5d3001b ldrb r0, [r3, #27] <== NOT EXECUTED
3c39c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c3a0: e5d3e01a ldrb lr, [r3, #26] <== NOT EXECUTED
3c3a4: e1811c0c orr r1, r1, ip, lsl #24 <== NOT EXECUTED
3c3a8: e1811000 orr r1, r1, r0 <== NOT EXECUTED
3c3ac: e181e40e orr lr, r1, lr, lsl #8 <== NOT EXECUTED
3c3b0: e586e020 str lr, [r6, #32] <== NOT EXECUTED
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
3c3b4: e5d3101d ldrb r1, [r3, #29] <== NOT EXECUTED
3c3b8: e5d3c01c ldrb ip, [r3, #28] <== NOT EXECUTED
3c3bc: e5d3001f ldrb r0, [r3, #31] <== NOT EXECUTED
3c3c0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c3c4: e1811c0c orr r1, r1, ip, lsl #24 <== NOT EXECUTED
3c3c8: e5d3c01e ldrb ip, [r3, #30] <== NOT EXECUTED
3c3cc: e1811000 orr r1, r1, r0 <== NOT EXECUTED
3c3d0: e181c40c orr ip, r1, ip, lsl #8 <== NOT EXECUTED
3c3d4: e586c024 str ip, [r6, #36] ; 0x24 <== NOT EXECUTED
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
3c3d8: e5d31021 ldrb r1, [r3, #33] ; 0x21 <== NOT EXECUTED
3c3dc: e5d30020 ldrb r0, [r3, #32] <== NOT EXECUTED
3c3e0: e5d34023 ldrb r4, [r3, #35] ; 0x23 <== NOT EXECUTED
3c3e4: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
3c3e8: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
3c3ec: e5d30022 ldrb r0, [r3, #34] ; 0x22 <== NOT EXECUTED
3c3f0: e1811004 orr r1, r1, r4 <== NOT EXECUTED
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
3c3f4: e1a03122 lsr r3, r2, #2 <== NOT EXECUTED
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
3c3f8: e59f8208 ldr r8, [pc, #520] ; 3c608 <rtems_rfs_fs_open+0x4f4><== NOT EXECUTED
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
3c3fc: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
3c400: e1a0a1a2 lsr sl, r2, #3 <== NOT EXECUTED
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
3c404: e0000393 mul r0, r3, r3 <== NOT EXECUTED
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
3c408: e004019e mul r4, lr, r1 <== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
3c40c: e08e9a98 umull r9, lr, r8, sl <== NOT EXECUTED
if (fs->group_blocks >
3c410: e15c0182 cmp ip, r2, lsl #3 <== NOT EXECUTED
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
3c414: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
3c418: e0832103 add r2, r3, r3, lsl #2 <== NOT EXECUTED
3c41c: e5862034 str r2, [r6, #52] ; 0x34 <== NOT EXECUTED
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
3c420: e5860038 str r0, [r6, #56] ; 0x38 <== NOT EXECUTED
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
3c424: e5864010 str r4, [r6, #16] <== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
3c428: e586e02c str lr, [r6, #44] ; 0x2c <== NOT EXECUTED
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
3c42c: e5861028 str r1, [r6, #40] ; 0x28 <== NOT EXECUTED
fs->blocks_per_block =
3c430: e5863030 str r3, [r6, #48] ; 0x30 <== NOT EXECUTED
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
3c434: 8affffbb bhi 3c328 <rtems_rfs_fs_open+0x214> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
3c438: e1a01007 mov r1, r7 <== NOT EXECUTED
3c43c: e1a00006 mov r0, r6 <== NOT EXECUTED
3c440: ebffff2b bl 3c0f4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
3c444: e1a00006 mov r0, r6 <== NOT EXECUTED
3c448: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
3c44c: ebfff7b2 bl 3a31c <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
if (rc > 0)
3c450: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3c454: da000008 ble 3c47c <rtems_rfs_fs_open+0x368> <== NOT EXECUTED
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
3c458: e1a00006 mov r0, r6 <== NOT EXECUTED
3c45c: e1a01007 mov r1, r7 <== NOT EXECUTED
3c460: ebffff23 bl 3c0f4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
3c464: eaffff65 b 3c200 <rtems_rfs_fs_open+0xec> <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
3c468: eb002074 bl 44640 <__errno> <== NOT EXECUTED
3c46c: e3a0300c mov r3, #12 <== NOT EXECUTED
3c470: e5803000 str r3, [r0] <== NOT EXECUTED
3c474: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3c478: eaffff67 b 3c21c <rtems_rfs_fs_open+0x108> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
3c47c: e5960020 ldr r0, [r6, #32] <== NOT EXECUTED
3c480: e3a01050 mov r1, #80 ; 0x50 <== NOT EXECUTED
3c484: ebff2cb5 bl 7760 <calloc> <== NOT EXECUTED
if (!fs->groups)
3c488: e3500000 cmp r0, #0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
3c48c: e586001c str r0, [r6, #28] <== NOT EXECUTED
if (!fs->groups)
3c490: 0a000057 beq 3c5f4 <rtems_rfs_fs_open+0x4e0> <== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
3c494: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
3c498: e3530000 cmp r3, #0 <== NOT EXECUTED
3c49c: da000021 ble 3c528 <rtems_rfs_fs_open+0x414> <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
3c4a0: e3a08000 mov r8, #0 <== NOT EXECUTED
3c4a4: e5962024 ldr r2, [r6, #36] ; 0x24 <== NOT EXECUTED
3c4a8: e1a04008 mov r4, r8 <== NOT EXECUTED
3c4ac: ea000006 b 3c4cc <rtems_rfs_fs_open+0x3b8> <== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
3c4b0: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
3c4b4: e2844001 add r4, r4, #1 <== NOT EXECUTED
3c4b8: e1540003 cmp r4, r3 <== NOT EXECUTED
3c4bc: e2888050 add r8, r8, #80 ; 0x50 <== NOT EXECUTED
3c4c0: aa000018 bge 3c528 <rtems_rfs_fs_open+0x414> <== NOT EXECUTED
3c4c4: e5962024 ldr r2, [r6, #36] ; 0x24 <== NOT EXECUTED
3c4c8: e596001c ldr r0, [r6, #28] <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
3c4cc: e0010294 mul r1, r4, r2 <== NOT EXECUTED
3c4d0: e080c008 add ip, r0, r8 <== NOT EXECUTED
3c4d4: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED
3c4d8: e2811001 add r1, r1, #1 <== NOT EXECUTED
3c4dc: e1a00006 mov r0, r6 <== NOT EXECUTED
3c4e0: e58dc000 str ip, [sp] <== NOT EXECUTED
3c4e4: eb0004de bl 3d864 <rtems_rfs_group_open> <== NOT EXECUTED
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
3c4e8: e3500000 cmp r0, #0 <== NOT EXECUTED
3c4ec: daffffef ble 3c4b0 <rtems_rfs_fs_open+0x39c> <== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
3c4f0: e3540000 cmp r4, #0 <== NOT EXECUTED
3c4f4: e1a0a000 mov sl, r0 <== NOT EXECUTED
3c4f8: 0affffd6 beq 3c458 <rtems_rfs_fs_open+0x344> <== NOT EXECUTED
3c4fc: e3a08000 mov r8, #0 <== NOT EXECUTED
3c500: e1a09008 mov r9, r8 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
3c504: e596101c ldr r1, [r6, #28] <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
3c508: e2899001 add r9, r9, #1 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
3c50c: e0811008 add r1, r1, r8 <== NOT EXECUTED
3c510: e1a00006 mov r0, r6 <== NOT EXECUTED
3c514: eb0004b8 bl 3d7fc <rtems_rfs_group_close> <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
3c518: e1540009 cmp r4, r9 <== NOT EXECUTED
3c51c: e2888050 add r8, r8, #80 ; 0x50 <== NOT EXECUTED
3c520: cafffff7 bgt 3c504 <rtems_rfs_fs_open+0x3f0> <== NOT EXECUTED
3c524: eaffffcb b 3c458 <rtems_rfs_fs_open+0x344> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
3c528: e3a01001 mov r1, #1 <== NOT EXECUTED
3c52c: e28d4008 add r4, sp, #8 <== NOT EXECUTED
3c530: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c534: e1a02004 mov r2, r4 <== NOT EXECUTED
3c538: e1a03001 mov r3, r1 <== NOT EXECUTED
3c53c: eb0005fc bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3c540: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3c544: caffff4b bgt 3c278 <rtems_rfs_fs_open+0x164> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
3c548: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c54c: e5903000 ldr r3, [r0] <== NOT EXECUTED
3c550: e3130004 tst r3, #4 <== NOT EXECUTED
3c554: 1a00000a bne 3c584 <rtems_rfs_fs_open+0x470> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
3c558: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
3c55c: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
3c560: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
3c564: e3a03801 mov r3, #65536 ; 0x10000 <== NOT EXECUTED
3c568: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
3c56c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3c570: e1520003 cmp r2, r3 <== NOT EXECUTED
3c574: 0a000013 beq 3c5c8 <rtems_rfs_fs_open+0x4b4> <== NOT EXECUTED
3c578: e2022a0f and r2, r2, #61440 ; 0xf000 <== NOT EXECUTED
3c57c: e3520901 cmp r2, #16384 ; 0x4000 <== NOT EXECUTED
3c580: 1a000010 bne 3c5c8 <rtems_rfs_fs_open+0x4b4> <== NOT EXECUTED
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
3c584: e1a01004 mov r1, r4 <== NOT EXECUTED
3c588: eb0005c5 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3c58c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
3c590: ca000004 bgt 3c5a8 <rtems_rfs_fs_open+0x494> <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
3c594: eb002029 bl 44640 <__errno> <== NOT EXECUTED
3c598: e3a03000 mov r3, #0 <== NOT EXECUTED
3c59c: e5803000 str r3, [r0] <== NOT EXECUTED
3c5a0: e1a00003 mov r0, r3 <== NOT EXECUTED
return 0;
3c5a4: eaffff1c b 3c21c <rtems_rfs_fs_open+0x108> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
3c5a8: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c5ac: ebfff771 bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
3c5b0: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c5b4: ebff2ded bl 7d70 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
3c5b8: eb002020 bl 44640 <__errno> <== NOT EXECUTED
3c5bc: e5804000 str r4, [r0] <== NOT EXECUTED
3c5c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3c5c4: eaffff14 b 3c21c <rtems_rfs_fs_open+0x108> <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
3c5c8: e1a01004 mov r1, r4 <== NOT EXECUTED
3c5cc: eb0005b4 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
3c5d0: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c5d4: ebfff767 bl 3a378 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
3c5d8: e5950000 ldr r0, [r5] <== NOT EXECUTED
3c5dc: ebff2de3 bl 7d70 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
3c5e0: eb002016 bl 44640 <__errno> <== NOT EXECUTED
3c5e4: e3a03005 mov r3, #5 <== NOT EXECUTED
3c5e8: e5803000 str r3, [r0] <== NOT EXECUTED
3c5ec: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3c5f0: eaffff09 b 3c21c <rtems_rfs_fs_open+0x108> <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
3c5f4: e1a00006 mov r0, r6 <== NOT EXECUTED
3c5f8: e1a01007 mov r1, r7 <== NOT EXECUTED
3c5fc: ebfffebc bl 3c0f4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
3c600: e3a0a00c mov sl, #12 <== NOT EXECUTED
3c604: eafffefd b 3c200 <rtems_rfs_fs_open+0xec> <== NOT EXECUTED
0003c058 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
3c058: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
3c05c: e5902004 ldr r2, [r0, #4] <== NOT EXECUTED
3c060: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
3c064: e0843291 umull r3, r4, r1, r2 <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
}
3c068: e1a01004 mov r1, r4 <== NOT EXECUTED
3c06c: e1a00003 mov r0, r3 <== NOT EXECUTED
3c070: e8bd0010 pop {r4} <== NOT EXECUTED
3c074: e12fff1e bx lr <== NOT EXECUTED
0003d614 <rtems_rfs_group_bitmap_alloc>:
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
3d614: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
3d618: e21220ff ands r2, r2, #255 ; 0xff <== NOT EXECUTED
{
size = fs->group_inodes;
3d61c: 15905028 ldrne r5, [r0, #40] ; 0x28 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
3d620: 05905024 ldreq r5, [r0, #36] ; 0x24 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
3d624: e1a04001 mov r4, r1 <== NOT EXECUTED
int direction;
if (inode)
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
3d628: 12414001 subne r4, r1, #1 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
3d62c: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
3d630: e1a01005 mov r1, r5 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
3d634: e1a07000 mov r7, r0 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
3d638: e1a00004 mov r0, r4 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
3d63c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
3d640: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
3d644: eb007bcc bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (goal % size);
3d648: e1a01005 mov r1, r5 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
3d64c: e1a0a000 mov sl, r0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (goal % size);
3d650: e1a00004 mov r0, r4 <== NOT EXECUTED
3d654: eb007c5c bl 5c7cc <__umodsi3> <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
3d658: e28d901c add r9, sp, #28 <== NOT EXECUTED
3d65c: e3a03000 mov r3, #0 <== NOT EXECUTED
3d660: e5693001 strb r3, [r9, #-1]! <== NOT EXECUTED
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
3d664: e245c001 sub ip, r5, #1 <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
3d668: e1a0500a mov r5, sl <== NOT EXECUTED
3d66c: e3a04001 mov r4, #1 <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
3d670: e3550000 cmp r5, #0 <== NOT EXECUTED
3d674: e58d9008 str r9, [sp, #8] <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
3d678: e1a06003 mov r6, r3 <== NOT EXECUTED
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
3d67c: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
3d680: e1a08004 mov r8, r4 <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
3d684: e1a0b003 mov fp, r3 <== NOT EXECUTED
3d688: e1a0900c mov r9, ip <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
3d68c: ba000002 blt 3d69c <rtems_rfs_group_bitmap_alloc+0x88> <== NOT EXECUTED
3d690: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED
3d694: e1530005 cmp r3, r5 <== NOT EXECUTED
3d698: ca000012 bgt 3d6e8 <rtems_rfs_group_bitmap_alloc+0xd4> <== NOT EXECUTED
{
if (!updown)
3d69c: e3580000 cmp r8, #0 <== NOT EXECUTED
3d6a0: 0a00002f beq 3d764 <rtems_rfs_group_bitmap_alloc+0x150> <== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
3d6a4: e3540001 cmp r4, #1 <== NOT EXECUTED
3d6a8: 03e04000 mvneq r4, #0 <== NOT EXECUTED
3d6ac: 13a04001 movne r4, #1 <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
3d6b0: e3560000 cmp r6, #0 <== NOT EXECUTED
3d6b4: 13a08000 movne r8, #0 <== NOT EXECUTED
3d6b8: 0a00002c beq 3d770 <rtems_rfs_group_bitmap_alloc+0x15c> <== NOT EXECUTED
bit = direction > 0 ? 0 : size - 1;
3d6bc: e3540001 cmp r4, #1 <== NOT EXECUTED
3d6c0: 11a03009 movne r3, r9 <== NOT EXECUTED
3d6c4: 03a03000 moveq r3, #0 <== NOT EXECUTED
3d6c8: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
3d6cc: e025a694 mla r5, r4, r6, sl <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
3d6d0: e3550000 cmp r5, #0 <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
3d6d4: e5cdb01b strb fp, [sp, #27] <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
3d6d8: baffffef blt 3d69c <rtems_rfs_group_bitmap_alloc+0x88> <== NOT EXECUTED
3d6dc: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED
3d6e0: e1530005 cmp r3, r5 <== NOT EXECUTED
3d6e4: daffffec ble 3d69c <rtems_rfs_group_bitmap_alloc+0x88> <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
3d6e8: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3d6ec: e3520000 cmp r2, #0 <== NOT EXECUTED
3d6f0: 1a000020 bne 3d778 <rtems_rfs_group_bitmap_alloc+0x164> <== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
3d6f4: e1a02105 lsl r2, r5, #2 <== NOT EXECUTED
3d6f8: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
3d6fc: e58d200c str r2, [sp, #12] <== NOT EXECUTED
3d700: e0822005 add r2, r2, r5 <== NOT EXECUTED
3d704: e0833202 add r3, r3, r2, lsl #4 <== NOT EXECUTED
3d708: e283c008 add ip, r3, #8 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
3d70c: e1a0000c mov r0, ip <== NOT EXECUTED
3d710: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
3d714: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
3d718: e28d3014 add r3, sp, #20 <== NOT EXECUTED
3d71c: e58dc000 str ip, [sp] <== NOT EXECUTED
3d720: eb0019cd bl 43e5c <rtems_rfs_bitmap_map_alloc> <== NOT EXECUTED
if (rc > 0)
3d724: e3500000 cmp r0, #0 <== NOT EXECUTED
3d728: e59dc000 ldr ip, [sp] <== NOT EXECUTED
3d72c: ca00000d bgt 3d768 <rtems_rfs_group_bitmap_alloc+0x154> <== NOT EXECUTED
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
3d730: e5973000 ldr r3, [r7] <== NOT EXECUTED
3d734: e3130001 tst r3, #1 <== NOT EXECUTED
3d738: 0a000016 beq 3d798 <rtems_rfs_group_bitmap_alloc+0x184> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
3d73c: e5dd301b ldrb r3, [sp, #27] <== NOT EXECUTED
3d740: e3530000 cmp r3, #0 <== NOT EXECUTED
3d744: 1a000017 bne 3d7a8 <rtems_rfs_group_bitmap_alloc+0x194> <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
3d748: e3580000 cmp r8, #0 <== NOT EXECUTED
3d74c: 0a000002 beq 3d75c <rtems_rfs_group_bitmap_alloc+0x148> <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
3d750: e3540001 cmp r4, #1 <== NOT EXECUTED
3d754: 03e04000 mvneq r4, #0 <== NOT EXECUTED
3d758: 13a04001 movne r4, #1 <== NOT EXECUTED
offset++;
3d75c: e2866001 add r6, r6, #1 <== NOT EXECUTED
3d760: eaffffd5 b 3d6bc <rtems_rfs_group_bitmap_alloc+0xa8> <== NOT EXECUTED
3d764: e3a0001c mov r0, #28 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
return ENOSPC;
}
3d768: e28dd01c add sp, sp, #28 <== NOT EXECUTED
3d76c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
3d770: e1a08006 mov r8, r6 <== NOT EXECUTED
3d774: eaffffd4 b 3d6cc <rtems_rfs_group_bitmap_alloc+0xb8> <== NOT EXECUTED
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
3d778: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED
3d77c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
3d780: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
3d784: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
3d788: e0812005 add r2, r1, r5 <== NOT EXECUTED
3d78c: e0833202 add r3, r3, r2, lsl #4 <== NOT EXECUTED
3d790: e283c02c add ip, r3, #44 ; 0x2c <== NOT EXECUTED
3d794: eaffffdc b 3d70c <rtems_rfs_group_bitmap_alloc+0xf8> <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
3d798: e59c1000 ldr r1, [ip] <== NOT EXECUTED
3d79c: e1a00007 mov r0, r7 <== NOT EXECUTED
3d7a0: ebfff315 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
3d7a4: eaffffe4 b 3d73c <rtems_rfs_group_bitmap_alloc+0x128> <== NOT EXECUTED
if (allocated)
{
if (inode)
3d7a8: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
3d7ac: e3530000 cmp r3, #0 <== NOT EXECUTED
3d7b0: 0a000007 beq 3d7d4 <rtems_rfs_group_bitmap_alloc+0x1c0> <== NOT EXECUTED
*result = rtems_rfs_group_inode (fs, group, bit);
3d7b4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
3d7b8: e5971028 ldr r1, [r7, #40] ; 0x28 <== NOT EXECUTED
3d7bc: e2822001 add r2, r2, #1 <== NOT EXECUTED
3d7c0: e0232591 mla r3, r1, r5, r2 <== NOT EXECUTED
3d7c4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
3d7c8: e3a00000 mov r0, #0 <== NOT EXECUTED
3d7cc: e5813000 str r3, [r1] <== NOT EXECUTED
3d7d0: eaffffe4 b 3d768 <rtems_rfs_group_bitmap_alloc+0x154> <== NOT EXECUTED
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
3d7d4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
3d7d8: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
3d7dc: e0825005 add r5, r2, r5 <== NOT EXECUTED
3d7e0: e7933205 ldr r3, [r3, r5, lsl #4] <== NOT EXECUTED
3d7e4: e28d1010 add r1, sp, #16 <== NOT EXECUTED
3d7e8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
3d7ec: e0823003 add r3, r2, r3 <== NOT EXECUTED
3d7f0: e5813000 str r3, [r1] <== NOT EXECUTED
3d7f4: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3d7f8: eaffffda b 3d768 <rtems_rfs_group_bitmap_alloc+0x154> <== NOT EXECUTED
0003d574 <rtems_rfs_group_bitmap_free>:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
3d574: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
3d578: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
3d57c: e1a04000 mov r4, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
3d580: 0a000015 beq 3d5dc <rtems_rfs_group_bitmap_free+0x68> <== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
3d584: e5905028 ldr r5, [r0, #40] ; 0x28 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
3d588: e2427001 sub r7, r2, #1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
3d58c: e1a01005 mov r1, r5 <== NOT EXECUTED
3d590: e1a00007 mov r0, r7 <== NOT EXECUTED
3d594: eb007c8c bl 5c7cc <__umodsi3> <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
3d598: e1a01005 mov r1, r5 <== NOT EXECUTED
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
3d59c: e1a06000 mov r6, r0 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
3d5a0: e1a00007 mov r0, r7 <== NOT EXECUTED
3d5a4: eb007bf4 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3d5a8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3d5ac: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3d5b0: e0835200 add r5, r3, r0, lsl #4 <== NOT EXECUTED
3d5b4: e285502c add r5, r5, #44 ; 0x2c <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
3d5b8: e1a01006 mov r1, r6 <== NOT EXECUTED
3d5bc: e1a00005 mov r0, r5 <== NOT EXECUTED
3d5c0: eb00192e bl 43a80 <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
3d5c4: e5951000 ldr r1, [r5] <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
3d5c8: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
3d5cc: e1a00004 mov r0, r4 <== NOT EXECUTED
3d5d0: ebfff389 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
}
3d5d4: e1a00006 mov r0, r6 <== NOT EXECUTED
3d5d8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
size = fs->group_inodes;
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
3d5dc: e5905024 ldr r5, [r0, #36] ; 0x24 <== NOT EXECUTED
}
group = no / size;
3d5e0: e2427001 sub r7, r2, #1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
3d5e4: e1a01005 mov r1, r5 <== NOT EXECUTED
3d5e8: e1a00007 mov r0, r7 <== NOT EXECUTED
3d5ec: eb007c76 bl 5c7cc <__umodsi3> <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
3d5f0: e1a01005 mov r1, r5 <== NOT EXECUTED
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
3d5f4: e1a06000 mov r6, r0 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
3d5f8: e1a00007 mov r0, r7 <== NOT EXECUTED
3d5fc: eb007bde bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3d600: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3d604: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3d608: e0835200 add r5, r3, r0, lsl #4 <== NOT EXECUTED
3d60c: e2855008 add r5, r5, #8 <== NOT EXECUTED
3d610: eaffffe8 b 3d5b8 <rtems_rfs_group_bitmap_free+0x44> <== NOT EXECUTED
0003d4a0 <rtems_rfs_group_bitmap_test>:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
3d4a0: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
3d4a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
3d4a8: e1a04000 mov r4, r0 <== NOT EXECUTED
3d4ac: e1a05002 mov r5, r2 <== NOT EXECUTED
3d4b0: e1a06003 mov r6, r3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
3d4b4: 0a00001b beq 3d528 <rtems_rfs_group_bitmap_test+0x88> <== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
3d4b8: e3520000 cmp r2, #0 <== NOT EXECUTED
3d4bc: da000029 ble 3d568 <rtems_rfs_group_bitmap_test+0xc8> <== NOT EXECUTED
3d4c0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
3d4c4: e1520003 cmp r2, r3 <== NOT EXECUTED
3d4c8: 8a000026 bhi 3d568 <rtems_rfs_group_bitmap_test+0xc8> <== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
3d4cc: e5908028 ldr r8, [r0, #40] ; 0x28 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
3d4d0: e2425001 sub r5, r2, #1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
3d4d4: e1a00005 mov r0, r5 <== NOT EXECUTED
3d4d8: e1a01008 mov r1, r8 <== NOT EXECUTED
3d4dc: eb007cba bl 5c7cc <__umodsi3> <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
3d4e0: e1a01008 mov r1, r8 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
3d4e4: e1a07000 mov r7, r0 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
3d4e8: e1a00005 mov r0, r5 <== NOT EXECUTED
3d4ec: eb007c22 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3d4f0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3d4f4: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3d4f8: e0835200 add r5, r3, r0, lsl #4 <== NOT EXECUTED
3d4fc: e285502c add r5, r5, #44 ; 0x2c <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
3d500: e1a02006 mov r2, r6 <== NOT EXECUTED
3d504: e1a01007 mov r1, r7 <== NOT EXECUTED
3d508: e1a00005 mov r0, r5 <== NOT EXECUTED
3d50c: eb001942 bl 43a1c <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
3d510: e5951000 ldr r1, [r5] <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
3d514: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
3d518: e1a00004 mov r0, r4 <== NOT EXECUTED
3d51c: ebfff3b6 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
}
3d520: e1a00006 mov r0, r6 <== NOT EXECUTED
3d524: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
3d528: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
3d52c: e1520003 cmp r2, r3 <== NOT EXECUTED
3d530: 2a00000c bcs 3d568 <rtems_rfs_group_bitmap_test+0xc8> <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
3d534: e5908024 ldr r8, [r0, #36] ; 0x24 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
3d538: e1a00002 mov r0, r2 <== NOT EXECUTED
3d53c: e1a01008 mov r1, r8 <== NOT EXECUTED
3d540: eb007ca1 bl 5c7cc <__umodsi3> <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
3d544: e1a01008 mov r1, r8 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
3d548: e1a07000 mov r7, r0 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
3d54c: e1a00005 mov r0, r5 <== NOT EXECUTED
3d550: eb007c09 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3d554: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3d558: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3d55c: e0835200 add r5, r3, r0, lsl #4 <== NOT EXECUTED
3d560: e2855008 add r5, r5, #8 <== NOT EXECUTED
3d564: eaffffe5 b 3d500 <rtems_rfs_group_bitmap_test+0x60> <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
3d568: e3a06016 mov r6, #22 <== NOT EXECUTED
}
3d56c: e1a00006 mov r0, r6 <== NOT EXECUTED
3d570: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003d7fc <rtems_rfs_group_close>:
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
3d7fc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
3d800: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
3d804: e281002c add r0, r1, #44 ; 0x2c <== NOT EXECUTED
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
3d808: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
3d80c: eb0017d3 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3d810: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
3d814: e1a07000 mov r7, r0 <== NOT EXECUTED
3d818: e1a00005 mov r0, r5 <== NOT EXECUTED
3d81c: ebfff2f6 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3d820: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3d824: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3d828: e5c43044 strb r3, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
3d82c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
3d830: e2840008 add r0, r4, #8 <== NOT EXECUTED
3d834: eb0017c9 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3d838: e2841020 add r1, r4, #32 <== NOT EXECUTED
if (rc > 0)
3d83c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3d840: e1a00005 mov r0, r5 <== NOT EXECUTED
3d844: d1c76fc7 bicle r6, r7, r7, asr #31 <== NOT EXECUTED
3d848: ebfff2eb bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3d84c: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
3d850: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3d854: e5c43020 strb r3, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
3d858: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
3d85c: e1a00006 mov r0, r6 <== NOT EXECUTED
3d860: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0003d864 <rtems_rfs_group_open>:
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
3d864: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3d868: e1a06000 mov r6, r0 <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
3d86c: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
3d870: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
3d874: e1500001 cmp r0, r1 <== NOT EXECUTED
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
3d878: e1a0c001 mov ip, r1 <== NOT EXECUTED
3d87c: e1a07002 mov r7, r2 <== NOT EXECUTED
3d880: e1a09003 mov r9, r3 <== NOT EXECUTED
3d884: e59d402c ldr r4, [sp, #44] ; 0x2c <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
3d888: 93a0b005 movls fp, #5 <== NOT EXECUTED
3d88c: 9a000017 bls 3d8f0 <rtems_rfs_group_open+0x8c> <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
3d890: e0823001 add r3, r2, r1 <== NOT EXECUTED
3d894: e1500003 cmp r0, r3 <== NOT EXECUTED
size = rtems_rfs_fs_blocks (fs) - base;
3d898: 90617000 rsbls r7, r1, r0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3d89c: e3a05000 mov r5, #0 <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
3d8a0: e284a008 add sl, r4, #8 <== NOT EXECUTED
3d8a4: e2848020 add r8, r4, #32 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
3d8a8: e8840082 stm r4, {r1, r7} <== NOT EXECUTED
3d8ac: e5c45020 strb r5, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
3d8b0: e5845024 str r5, [r4, #36] ; 0x24 <== NOT EXECUTED
handle->buffer = NULL;
3d8b4: e5845028 str r5, [r4, #40] ; 0x28 <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
3d8b8: e1a0000a mov r0, sl <== NOT EXECUTED
3d8bc: e1a01006 mov r1, r6 <== NOT EXECUTED
3d8c0: e1a02008 mov r2, r8 <== NOT EXECUTED
3d8c4: e1a03007 mov r3, r7 <== NOT EXECUTED
3d8c8: e58dc000 str ip, [sp] <== NOT EXECUTED
3d8cc: eb0017ed bl 43888 <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
3d8d0: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3d8d4: da000008 ble 3d8fc <rtems_rfs_group_open+0x98> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3d8d8: e1a00006 mov r0, r6 <== NOT EXECUTED
3d8dc: e1a01008 mov r1, r8 <== NOT EXECUTED
3d8e0: ebfff2c5 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3d8e4: e5845028 str r5, [r4, #40] ; 0x28 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3d8e8: e5c45020 strb r5, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
3d8ec: e5845024 str r5, [r4, #36] ; 0x24 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
3d8f0: e1a0000b mov r0, fp <== NOT EXECUTED
3d8f4: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3d8f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
3d8fc: e594c000 ldr ip, [r4] <== NOT EXECUTED
3d900: e2843044 add r3, r4, #68 ; 0x44 <== NOT EXECUTED
3d904: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
3d908: e28cc001 add ip, ip, #1 <== NOT EXECUTED
3d90c: e1570009 cmp r7, r9 <== NOT EXECUTED
3d910: 31a03007 movcc r3, r7 <== NOT EXECUTED
3d914: 21a03009 movcs r3, r9 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3d918: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
3d91c: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
3d920: e584504c str r5, [r4, #76] ; 0x4c <== NOT EXECUTED
3d924: e284002c add r0, r4, #44 ; 0x2c <== NOT EXECUTED
3d928: e1a01006 mov r1, r6 <== NOT EXECUTED
3d92c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3d930: e58dc000 str ip, [sp] <== NOT EXECUTED
3d934: eb0017d3 bl 43888 <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
3d938: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3d93c: ca00000a bgt 3d96c <rtems_rfs_group_open+0x108> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
3d940: e596b000 ldr fp, [r6] <== NOT EXECUTED
3d944: e21bb001 ands fp, fp, #1 <== NOT EXECUTED
3d948: 11a0b005 movne fp, r5 <== NOT EXECUTED
3d94c: 1affffe7 bne 3d8f0 <rtems_rfs_group_open+0x8c> <== NOT EXECUTED
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
3d950: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
3d954: e1a00006 mov r0, r6 <== NOT EXECUTED
3d958: ebfff2a7 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
3d95c: e1a00006 mov r0, r6 <== NOT EXECUTED
3d960: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
3d964: ebfff2a4 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
3d968: eaffffe0 b 3d8f0 <rtems_rfs_group_open+0x8c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3d96c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
3d970: e1a00006 mov r0, r6 <== NOT EXECUTED
3d974: ebfff2a0 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3d978: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
3d97c: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
3d980: e584504c str r5, [r4, #76] ; 0x4c <== NOT EXECUTED
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
3d984: e1a0000a mov r0, sl <== NOT EXECUTED
3d988: eb001774 bl 43760 <rtems_rfs_bitmap_close> <== NOT EXECUTED
3d98c: eaffffd1 b 3d8d8 <rtems_rfs_group_open+0x74> <== NOT EXECUTED
0003d40c <rtems_rfs_group_usage>:
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
3d40c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
3d410: e92d0070 push {r4, r5, r6} <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
3d414: e3530000 cmp r3, #0 <== NOT EXECUTED
size_t* blocks,
size_t* inodes)
{
int g;
*blocks = 0;
3d418: e3a04000 mov r4, #0 <== NOT EXECUTED
3d41c: e5814000 str r4, [r1] <== NOT EXECUTED
*inodes = 0;
3d420: e5824000 str r4, [r2] <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
3d424: da000010 ble 3d46c <rtems_rfs_group_usage+0x60> <== NOT EXECUTED
3d428: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
3d42c: e28c6014 add r6, ip, #20 <== NOT EXECUTED
3d430: e8960060 ldm r6, {r5, r6} <== NOT EXECUTED
3d434: e0455006 sub r5, r5, r6 <== NOT EXECUTED
3d438: e5916000 ldr r6, [r1] <== NOT EXECUTED
3d43c: e0865005 add r5, r6, r5 <== NOT EXECUTED
3d440: e5815000 str r5, [r1] <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
3d444: e28c6038 add r6, ip, #56 ; 0x38 <== NOT EXECUTED
3d448: e8960060 ldm r6, {r5, r6} <== NOT EXECUTED
3d44c: e0455006 sub r5, r5, r6 <== NOT EXECUTED
3d450: e5926000 ldr r6, [r2] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
3d454: e2844001 add r4, r4, #1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
3d458: e0865005 add r5, r6, r5 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
3d45c: e1540003 cmp r4, r3 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
3d460: e5825000 str r5, [r2] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
3d464: e28cc050 add ip, ip, #80 ; 0x50 <== NOT EXECUTED
3d468: baffffef blt 3d42c <rtems_rfs_group_usage+0x20> <== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
3d46c: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
3d470: e591c000 ldr ip, [r1] <== NOT EXECUTED
3d474: e15c0003 cmp ip, r3 <== NOT EXECUTED
3d478: 9581c000 strls ip, [r1] <== NOT EXECUTED
3d47c: 85813000 strhi r3, [r1] <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
3d480: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
3d484: e5921000 ldr r1, [r2] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
3d488: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
3d48c: e1510003 cmp r1, r3 <== NOT EXECUTED
3d490: 95821000 strls r1, [r2] <== NOT EXECUTED
3d494: 85823000 strhi r3, [r2] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
3d498: e8bd0070 pop {r4, r5, r6} <== NOT EXECUTED
3d49c: e12fff1e bx lr <== NOT EXECUTED
0003de9c <rtems_rfs_inode_alloc>:
int
rtems_rfs_inode_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
rtems_rfs_ino* ino)
{
3de9c: e92d4010 push {r4, lr} <== NOT EXECUTED
3dea0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3dea4: e1a04002 mov r4, r2 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_group_bitmap_alloc (fs, goal, true, &bit);
3dea8: e1a0300d mov r3, sp <== NOT EXECUTED
3deac: e3a02001 mov r2, #1 <== NOT EXECUTED
3deb0: ebfffdd7 bl 3d614 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
*ino = bit;
3deb4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3deb8: e5843000 str r3, [r4] <== NOT EXECUTED
return rc;
}
3debc: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3dec0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003dca4 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3dca4: e92d4010 push {r4, lr} <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
3dca8: e3a02001 mov r2, #1 <== NOT EXECUTED
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3dcac: e1a04001 mov r4, r1 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
3dcb0: ebffffd0 bl 3dbf8 <rtems_rfs_inode_unload> <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
3dcb4: e3500000 cmp r0, #0 <== NOT EXECUTED
3dcb8: 1a000002 bne 3dcc8 <rtems_rfs_inode_close+0x24> <== NOT EXECUTED
3dcbc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
3dcc0: e3530000 cmp r3, #0 <== NOT EXECUTED
3dcc4: c3a00005 movgt r0, #5 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
3dcc8: e3a03000 mov r3, #0 <== NOT EXECUTED
3dccc: e5843008 str r3, [r4, #8] <== NOT EXECUTED
return rc;
}
3dcd0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003dec4 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
3dec4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3dec8: e24dd05c sub sp, sp, #92 ; 0x5c <== NOT EXECUTED
3decc: e1dd58b0 ldrh r5, [sp, #128] ; 0x80 <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
3ded0: e2054a0f and r4, r5, #61440 ; 0xf000 <== NOT EXECUTED
3ded4: e3540a06 cmp r4, #24576 ; 0x6000 <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
3ded8: e1a06000 mov r6, r0 <== NOT EXECUTED
3dedc: e1a07001 mov r7, r1 <== NOT EXECUTED
3dee0: e98d000c stmib sp, {r2, r3} <== NOT EXECUTED
3dee4: e1dd88b4 ldrh r8, [sp, #132] ; 0x84 <== NOT EXECUTED
3dee8: e1dda8b8 ldrh sl, [sp, #136] ; 0x88 <== NOT EXECUTED
3deec: e1dd98bc ldrh r9, [sp, #140] ; 0x8c <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
3def0: 0a00000c beq 3df28 <rtems_rfs_inode_create+0x64> <== NOT EXECUTED
3def4: da000007 ble 3df18 <rtems_rfs_inode_create+0x54> <== NOT EXECUTED
3def8: e3540902 cmp r4, #32768 ; 0x8000 <== NOT EXECUTED
3defc: 0a000009 beq 3df28 <rtems_rfs_inode_create+0x64> <== NOT EXECUTED
3df00: e3540a0a cmp r4, #40960 ; 0xa000 <== NOT EXECUTED
3df04: 0a000007 beq 3df28 <rtems_rfs_inode_create+0x64> <== NOT EXECUTED
3df08: e3a0b016 mov fp, #22 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
3df0c: e1a0000b mov r0, fp <== NOT EXECUTED
3df10: e28dd05c add sp, sp, #92 ; 0x5c <== NOT EXECUTED
3df14: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
3df18: e3540a02 cmp r4, #8192 ; 0x2000 <== NOT EXECUTED
3df1c: 0a000001 beq 3df28 <rtems_rfs_inode_create+0x64> <== NOT EXECUTED
3df20: e3540901 cmp r4, #16384 ; 0x4000 <== NOT EXECUTED
3df24: 1afffff7 bne 3df08 <rtems_rfs_inode_create+0x44> <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
3df28: e1a00006 mov r0, r6 <== NOT EXECUTED
3df2c: e1a01007 mov r1, r7 <== NOT EXECUTED
3df30: e59d2090 ldr r2, [sp, #144] ; 0x90 <== NOT EXECUTED
3df34: ebffffd8 bl 3de9c <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
3df38: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3df3c: cafffff2 bgt 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
3df40: e59d3090 ldr r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3df44: e1a00006 mov r0, r6 <== NOT EXECUTED
3df48: e5931000 ldr r1, [r3] <== NOT EXECUTED
3df4c: e28d200c add r2, sp, #12 <== NOT EXECUTED
3df50: e3a03001 mov r3, #1 <== NOT EXECUTED
3df54: ebffff76 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3df58: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3df5c: da000004 ble 3df74 <rtems_rfs_inode_create+0xb0> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_free (fs, *ino);
3df60: e59d3090 ldr r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3df64: e1a00006 mov r0, r6 <== NOT EXECUTED
3df68: e5931000 ldr r1, [r3] <== NOT EXECUTED
3df6c: ebffff9f bl 3ddf0 <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
3df70: eaffffe5 b 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
3df74: e1a01008 mov r1, r8 <== NOT EXECUTED
3df78: e1a02005 mov r2, r5 <== NOT EXECUTED
3df7c: e1a0300a mov r3, sl <== NOT EXECUTED
3df80: e28d000c add r0, sp, #12 <== NOT EXECUTED
3df84: e58d9000 str r9, [sp] <== NOT EXECUTED
3df88: ebfffebf bl 3da8c <rtems_rfs_inode_initialise> <== NOT EXECUTED
if (rc > 0)
3df8c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3df90: ca000010 bgt 3dfd8 <rtems_rfs_inode_create+0x114> <== NOT EXECUTED
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
3df94: e3540901 cmp r4, #16384 ; 0x4000 <== NOT EXECUTED
3df98: 0a00002d beq 3e054 <rtems_rfs_inode_create+0x190> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
3df9c: e28d5034 add r5, sp, #52 ; 0x34 <== NOT EXECUTED
3dfa0: e1a01007 mov r1, r7 <== NOT EXECUTED
3dfa4: e1a00006 mov r0, r6 <== NOT EXECUTED
3dfa8: e1a02005 mov r2, r5 <== NOT EXECUTED
3dfac: e3a03001 mov r3, #1 <== NOT EXECUTED
3dfb0: ebffff5f bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3dfb4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3dfb8: da00000e ble 3dff8 <rtems_rfs_inode_create+0x134> <== NOT EXECUTED
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
3dfbc: e28d100c add r1, sp, #12 <== NOT EXECUTED
3dfc0: e1a00006 mov r0, r6 <== NOT EXECUTED
3dfc4: ebffff8c bl 3ddfc <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
3dfc8: e1a00006 mov r0, r6 <== NOT EXECUTED
3dfcc: e28d100c add r1, sp, #12 <== NOT EXECUTED
3dfd0: ebffff33 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3dfd4: eaffffcc b 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
3dfd8: e28d100c add r1, sp, #12 <== NOT EXECUTED
3dfdc: e1a00006 mov r0, r6 <== NOT EXECUTED
3dfe0: ebffff2f bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
3dfe4: e59d3090 ldr r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3dfe8: e1a00006 mov r0, r6 <== NOT EXECUTED
3dfec: e5931000 ldr r1, [r3] <== NOT EXECUTED
3dff0: ebffff7e bl 3ddf0 <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
3dff4: eaffffc4 b 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
3dff8: e59d3090 ldr r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3dffc: e593c000 ldr ip, [r3] <== NOT EXECUTED
3e000: e99d000c ldmib sp, {r2, r3} <== NOT EXECUTED
3e004: e1a00006 mov r0, r6 <== NOT EXECUTED
3e008: e1a01005 mov r1, r5 <== NOT EXECUTED
3e00c: e58dc000 str ip, [sp] <== NOT EXECUTED
3e010: ebfff350 bl 3ad58 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
3e014: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e018: ca00001a bgt 3e088 <rtems_rfs_inode_create+0x1c4> <== NOT EXECUTED
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
3e01c: e3540901 cmp r4, #16384 ; 0x4000 <== NOT EXECUTED
3e020: 0a00002a beq 3e0d0 <rtems_rfs_inode_create+0x20c> <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
3e024: e1a01005 mov r1, r5 <== NOT EXECUTED
3e028: e1a00006 mov r0, r6 <== NOT EXECUTED
3e02c: ebffff1c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3e030: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e034: caffffe0 bgt 3dfbc <rtems_rfs_inode_create+0xf8> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
3e038: e28d100c add r1, sp, #12 <== NOT EXECUTED
3e03c: e1a00006 mov r0, r6 <== NOT EXECUTED
3e040: ebffff17 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3e044: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e048: d3a0b000 movle fp, #0 <== NOT EXECUTED
3e04c: caffffc3 bgt 3df60 <rtems_rfs_inode_create+0x9c> <== NOT EXECUTED
3e050: eaffffad b 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
3e054: e59d3090 ldr r3, [sp, #144] ; 0x90 <== NOT EXECUTED
3e058: e593c000 ldr ip, [r3] <== NOT EXECUTED
3e05c: e1a00006 mov r0, r6 <== NOT EXECUTED
3e060: e28d100c add r1, sp, #12 <== NOT EXECUTED
3e064: e59f20b4 ldr r2, [pc, #180] ; 3e120 <rtems_rfs_inode_create+0x25c><== NOT EXECUTED
3e068: e3a03001 mov r3, #1 <== NOT EXECUTED
3e06c: e58dc000 str ip, [sp] <== NOT EXECUTED
3e070: ebfff338 bl 3ad58 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc == 0)
3e074: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e078: 0a00000c beq 3e0b0 <rtems_rfs_inode_create+0x1ec> <== NOT EXECUTED
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
if (rc > 0)
3e07c: e35b0000 cmp fp, #0 <== NOT EXECUTED
3e080: daffffc5 ble 3df9c <rtems_rfs_inode_create+0xd8> <== NOT EXECUTED
3e084: eaffffcc b 3dfbc <rtems_rfs_inode_create+0xf8> <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
3e088: e28d100c add r1, sp, #12 <== NOT EXECUTED
3e08c: e1a00006 mov r0, r6 <== NOT EXECUTED
3e090: ebffff59 bl 3ddfc <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
3e094: e28d100c add r1, sp, #12 <== NOT EXECUTED
3e098: e1a00006 mov r0, r6 <== NOT EXECUTED
3e09c: ebffff00 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
3e0a0: e1a00006 mov r0, r6 <== NOT EXECUTED
3e0a4: e1a01005 mov r1, r5 <== NOT EXECUTED
3e0a8: ebfffefd bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e0ac: eaffff96 b 3df0c <rtems_rfs_inode_create+0x48> <== NOT EXECUTED
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
if (rc == 0)
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
3e0b0: e1a00006 mov r0, r6 <== NOT EXECUTED
3e0b4: e28d100c add r1, sp, #12 <== NOT EXECUTED
3e0b8: e59f2064 ldr r2, [pc, #100] ; 3e124 <rtems_rfs_inode_create+0x260><== NOT EXECUTED
3e0bc: e3a03002 mov r3, #2 <== NOT EXECUTED
3e0c0: e58d7000 str r7, [sp] <== NOT EXECUTED
3e0c4: ebfff323 bl 3ad58 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
3e0c8: e1a0b000 mov fp, r0 <== NOT EXECUTED
3e0cc: eaffffea b 3e07c <rtems_rfs_inode_create+0x1b8> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e0d0: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
3e0d4: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
3e0d8: e5d31001 ldrb r1, [r3, #1] <== NOT EXECUTED
if (links == 0xffff)
3e0dc: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e0e0: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
3e0e4: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3e0e8: e1510002 cmp r1, r2 <== NOT EXECUTED
3e0ec: 12811001 addne r1, r1, #1 <== NOT EXECUTED
3e0f0: 11a01801 lslne r1, r1, #16 <== NOT EXECUTED
3e0f4: 11a02821 lsrne r2, r1, #16 <== NOT EXECUTED
3e0f8: 03a01000 moveq r1, #0 <== NOT EXECUTED
3e0fc: 11a01c21 lsrne r1, r1, #24 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e100: e5c31000 strb r1, [r3] <== NOT EXECUTED
3e104: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
3e108: 03a02001 moveq r2, #1 <== NOT EXECUTED
3e10c: 120220ff andne r2, r2, #255 ; 0xff <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e110: e5c32001 strb r2, [r3, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e114: e3a03001 mov r3, #1 <== NOT EXECUTED
3e118: e5cd3044 strb r3, [sp, #68] ; 0x44 <== NOT EXECUTED
3e11c: eaffffc0 b 3e024 <rtems_rfs_inode_create+0x160> <== NOT EXECUTED
0003ddfc <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3ddfc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
3de00: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
3de04: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3de08: e1a05000 mov r5, r0 <== NOT EXECUTED
3de0c: e24dd050 sub sp, sp, #80 ; 0x50 <== NOT EXECUTED
3de10: e1a04001 mov r4, r1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
3de14: 01a00003 moveq r0, r3 <== NOT EXECUTED
3de18: 0a000003 beq 3de2c <rtems_rfs_inode_delete+0x30> <== NOT EXECUTED
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
3de1c: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
3de20: ebfffff2 bl 3ddf0 <rtems_rfs_inode_free> <== NOT EXECUTED
if (rc > 0)
3de24: e3500000 cmp r0, #0 <== NOT EXECUTED
3de28: da000001 ble 3de34 <rtems_rfs_inode_delete+0x38> <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
3de2c: e28dd050 add sp, sp, #80 ; 0x50 <== NOT EXECUTED
3de30: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
3de34: e1a00005 mov r0, r5 <== NOT EXECUTED
3de38: e1a01004 mov r1, r4 <== NOT EXECUTED
3de3c: e1a0200d mov r2, sp <== NOT EXECUTED
3de40: ebfff0a2 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc == 0)
3de44: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
3de48: e1a0600d mov r6, sp <== NOT EXECUTED
if (rc == 0)
3de4c: 1afffff6 bne 3de2c <rtems_rfs_inode_delete+0x30> <== NOT EXECUTED
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
3de50: e1a0100d mov r1, sp <== NOT EXECUTED
3de54: e1a00005 mov r0, r5 <== NOT EXECUTED
3de58: ebffeee2 bl 399e8 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &map);
3de5c: e1a0100d mov r1, sp <== NOT EXECUTED
3de60: e1a00005 mov r0, r5 <== NOT EXECUTED
3de64: ebfff026 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
3de68: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3de6c: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
3de70: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
3de74: eb002728 bl 47b1c <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3de78: e3a03001 mov r3, #1 <== NOT EXECUTED
3de7c: e1a01004 mov r1, r4 <== NOT EXECUTED
3de80: e5e13010 strb r3, [r1, #16]! <== NOT EXECUTED
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
3de84: e1a00005 mov r0, r5 <== NOT EXECUTED
3de88: ebfff15b bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->loads = 0;
3de8c: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->node = NULL;
3de90: e584300c str r3, [r4, #12] <== NOT EXECUTED
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
handle->loads = 0;
3de94: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
3de98: eaffffe3 b 3de2c <rtems_rfs_inode_delete+0x30> <== NOT EXECUTED
0003ddf0 <rtems_rfs_inode_free>:
}
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
3ddf0: e1a02001 mov r2, r1 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
3ddf4: e3a01001 mov r1, #1 <== NOT EXECUTED
3ddf8: eafffddd b 3d574 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
0003d990 <rtems_rfs_inode_get_size>:
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3d990: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
3d994: e591200c ldr r2, [r1, #12] <== NOT EXECUTED
3d998: e282300c add r3, r2, #12 <== NOT EXECUTED
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
3d99c: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
3d9a0: e5d2c00c ldrb ip, [r2, #12] <== NOT EXECUTED
3d9a4: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
3d9a8: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
3d9ac: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
3d9b0: e18c380e orr r3, ip, lr, lsl #16 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3d9b4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
3d9b8: e1833401 orr r3, r3, r1, lsl #8 <== NOT EXECUTED
3d9bc: e58d3000 str r3, [sp] <== NOT EXECUTED
size.offset = rtems_rfs_inode_get_block_offset (handle);
3d9c0: e5d2300b ldrb r3, [r2, #11] <== NOT EXECUTED
3d9c4: e5d2200a ldrb r2, [r2, #10] <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
3d9c8: e1a0100d mov r1, sp <== NOT EXECUTED
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
size.offset = rtems_rfs_inode_get_block_offset (handle);
3d9cc: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
3d9d0: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
3d9d4: ebffee6c bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
}
3d9d8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3d9dc: e8bd8000 pop {pc} <== NOT EXECUTED
0003da8c <rtems_rfs_inode_initialise>:
rtems_rfs_inode_initialise (rtems_rfs_inode_handle* handle,
uint16_t links,
uint16_t mode,
uid_t uid,
gid_t gid)
{
3da8c: e92d0030 push {r4, r5} <== NOT EXECUTED
3da90: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3da94: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
3da98: e1a05c21 lsr r5, r1, #24 <== NOT EXECUTED
3da9c: e1a0c000 mov ip, r0 <== NOT EXECUTED
3daa0: e1dd00b8 ldrh r0, [sp, #8] <== NOT EXECUTED
3daa4: e5c45000 strb r5, [r4] <== NOT EXECUTED
3daa8: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3daac: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
3dab0: e5c41001 strb r1, [r4, #1] <== NOT EXECUTED
* @prarm flags The flags.
*/
static inline void
rtems_rfs_inode_set_flags (rtems_rfs_inode_handle* handle, uint16_t flags)
{
rtems_rfs_write_u16 (&handle->node->flags, flags);
3dab4: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3dab8: e3a01000 mov r1, #0 <== NOT EXECUTED
3dabc: e5c41008 strb r1, [r4, #8] <== NOT EXECUTED
3dac0: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3dac4: e5c41009 strb r1, [r4, #9] <== NOT EXECUTED
3dac8: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
3dacc: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3dad0: e1a05c22 lsr r5, r2, #24 <== NOT EXECUTED
3dad4: e5c45002 strb r5, [r4, #2] <== NOT EXECUTED
3dad8: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3dadc: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
3dae0: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED
3dae4: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
3dae8: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
3daec: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
3daf0: e1830800 orr r0, r3, r0, lsl #16 <== NOT EXECUTED
3daf4: e1a04c20 lsr r4, r0, #24 <== NOT EXECUTED
3daf8: e5c24004 strb r4, [r2, #4] <== NOT EXECUTED
3dafc: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
3db00: e1a04820 lsr r4, r0, #16 <== NOT EXECUTED
3db04: e5c24005 strb r4, [r2, #5] <== NOT EXECUTED
3db08: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
3db0c: e1a00420 lsr r0, r0, #8 <== NOT EXECUTED
3db10: e5c20006 strb r0, [r2, #6] <== NOT EXECUTED
3db14: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
3db18: e5c23007 strb r3, [r2, #7] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
3db1c: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db20: e5c3100a strb r1, [r3, #10] <== NOT EXECUTED
3db24: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db28: e5c3100b strb r1, [r3, #11] <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
3db2c: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db30: e5c3100c strb r1, [r3, #12] <== NOT EXECUTED
3db34: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db38: e5c3100d strb r1, [r3, #13] <== NOT EXECUTED
3db3c: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db40: e5c3100e strb r1, [r3, #14] <== NOT EXECUTED
3db44: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3db48: e3a04001 mov r4, #1 <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
3db4c: e5c3100f strb r1, [r3, #15] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3db50: e5cc4010 strb r4, [ip, #16] <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
3db54: e1a00001 mov r0, r1 <== NOT EXECUTED
3db58: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db5c: e0833001 add r3, r3, r1 <== NOT EXECUTED
3db60: e5c3001c strb r0, [r3, #28] <== NOT EXECUTED
3db64: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db68: e3a02000 mov r2, #0 <== NOT EXECUTED
3db6c: e0833001 add r3, r3, r1 <== NOT EXECUTED
3db70: e5c3201d strb r2, [r3, #29] <== NOT EXECUTED
3db74: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db78: e0833001 add r3, r3, r1 <== NOT EXECUTED
3db7c: e5c3001e strb r0, [r3, #30] <== NOT EXECUTED
3db80: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3db84: e0833001 add r3, r3, r1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3db88: e2811004 add r1, r1, #4 <== NOT EXECUTED
rtems_rfs_inode_set_flags (handle, 0);
rtems_rfs_inode_set_mode (handle, mode);
rtems_rfs_inode_set_uid_gid (handle, uid, gid);
rtems_rfs_inode_set_block_offset (handle, 0);
rtems_rfs_inode_set_block_count (handle, 0);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
3db8c: e3510014 cmp r1, #20 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
3db90: e5c3001f strb r0, [r3, #31] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3db94: e5cc4010 strb r4, [ip, #16] <== NOT EXECUTED
3db98: e3a03001 mov r3, #1 <== NOT EXECUTED
3db9c: 1affffed bne 3db58 <rtems_rfs_inode_initialise+0xcc> <== NOT EXECUTED
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
3dba0: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dba4: e5c12030 strb r2, [r1, #48] ; 0x30 <== NOT EXECUTED
3dba8: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbac: e5c12031 strb r2, [r1, #49] ; 0x31 <== NOT EXECUTED
3dbb0: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbb4: e5c12032 strb r2, [r1, #50] ; 0x32 <== NOT EXECUTED
3dbb8: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbbc: e5c12033 strb r2, [r1, #51] ; 0x33 <== NOT EXECUTED
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
3dbc0: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbc4: e5c12034 strb r2, [r1, #52] ; 0x34 <== NOT EXECUTED
3dbc8: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbcc: e5c12035 strb r2, [r1, #53] ; 0x35 <== NOT EXECUTED
3dbd0: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3dbd4: e5c12036 strb r2, [r1, #54] ; 0x36 <== NOT EXECUTED
3dbd8: e59c000c ldr r0, [ip, #12] <== NOT EXECUTED
rtems_rfs_inode_set_block (handle, b, 0);
rtems_rfs_inode_set_last_map_block (handle, 0);
rtems_rfs_inode_set_last_data_block (handle, 0);
return rtems_rfs_inode_time_stamp_now (handle, true, true);
3dbdc: e1a01003 mov r1, r3 <== NOT EXECUTED
3dbe0: e5c02037 strb r2, [r0, #55] ; 0x37 <== NOT EXECUTED
3dbe4: e1a0000c mov r0, ip <== NOT EXECUTED
3dbe8: e1a02003 mov r2, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3dbec: e5cc3010 strb r3, [ip, #16] <== NOT EXECUTED
}
3dbf0: e8bd0030 pop {r4, r5} <== NOT EXECUTED
rtems_rfs_inode_set_block_count (handle, 0);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (handle, b, 0);
rtems_rfs_inode_set_last_map_block (handle, 0);
rtems_rfs_inode_set_last_data_block (handle, 0);
return rtems_rfs_inode_time_stamp_now (handle, true, true);
3dbf4: eaffff79 b 3d9e0 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
0003dcd4 <rtems_rfs_inode_load>:
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
3dcd4: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
3dcd8: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3dcdc: e92d4010 push {r4, lr} <== NOT EXECUTED
3dce0: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
3dce4: 0a000004 beq 3dcfc <rtems_rfs_inode_load+0x28> <== NOT EXECUTED
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
3dce8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
3dcec: e2833001 add r3, r3, #1 <== NOT EXECUTED
3dcf0: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
3dcf4: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3dcf8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
3dcfc: e2811010 add r1, r1, #16 <== NOT EXECUTED
3dd00: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
3dd04: e3a03001 mov r3, #1 <== NOT EXECUTED
3dd08: ebfff205 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
handle->block, true);
if (rc > 0)
3dd0c: e3500000 cmp r0, #0 <== NOT EXECUTED
3dd10: c8bd8010 popgt {r4, pc} <== NOT EXECUTED
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
3dd14: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
handle->block, true);
if (rc > 0)
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
3dd18: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
handle->node += handle->offset;
3dd1c: e1a01303 lsl r1, r3, #6 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
handle->block, true);
if (rc > 0)
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
3dd20: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
handle->node += handle->offset;
3dd24: e0413183 sub r3, r1, r3, lsl #3 <== NOT EXECUTED
3dd28: e0823003 add r3, r2, r3 <== NOT EXECUTED
3dd2c: e584300c str r3, [r4, #12] <== NOT EXECUTED
3dd30: eaffffec b 3dce8 <rtems_rfs_inode_load+0x14> <== NOT EXECUTED
0003dd34 <rtems_rfs_inode_open>:
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
3dd34: e3510000 cmp r1, #0 <== NOT EXECUTED
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
3dd38: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3dd3c: e1a04000 mov r4, r0 <== NOT EXECUTED
3dd40: e1a05002 mov r5, r2 <== NOT EXECUTED
3dd44: e20380ff and r8, r3, #255 ; 0xff <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
3dd48: 0a000026 beq 3dde8 <rtems_rfs_inode_open+0xb4> <== NOT EXECUTED
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
3dd4c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
3dd50: e2417001 sub r7, r1, #1 <== NOT EXECUTED
3dd54: e1570003 cmp r7, r3 <== NOT EXECUTED
3dd58: 8a000022 bhi 3dde8 <rtems_rfs_inode_open+0xb4> <== NOT EXECUTED
return EINVAL;
handle->ino = ino;
3dd5c: e5821008 str r1, [r2, #8] <== NOT EXECUTED
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
3dd60: e5909028 ldr r9, [r0, #40] ; 0x28 <== NOT EXECUTED
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
3dd64: e3a06000 mov r6, #0 <== NOT EXECUTED
3dd68: e582600c str r6, [r2, #12] <== NOT EXECUTED
handle->loads = 0;
3dd6c: e5826024 str r6, [r2, #36] ; 0x24 <== NOT EXECUTED
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
3dd70: e1a01009 mov r1, r9 <== NOT EXECUTED
3dd74: e1a00007 mov r0, r7 <== NOT EXECUTED
3dd78: eb007a93 bl 5c7cc <__umodsi3> <== NOT EXECUTED
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
3dd7c: e594a02c ldr sl, [r4, #44] ; 0x2c <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
3dd80: e1a0100a mov r1, sl <== NOT EXECUTED
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
3dd84: e1a0b000 mov fp, r0 <== NOT EXECUTED
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
3dd88: eb007a8f bl 5c7cc <__umodsi3> <== NOT EXECUTED
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
3dd8c: e1a01009 mov r1, r9 <== NOT EXECUTED
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
3dd90: e5850020 str r0, [r5, #32] <== NOT EXECUTED
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
3dd94: e1a00007 mov r0, r7 <== NOT EXECUTED
3dd98: eb0079f7 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3dd9c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3dda0: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3dda4: e7937200 ldr r7, [r3, r0, lsl #4] <== NOT EXECUTED
3dda8: e1a0100a mov r1, sl <== NOT EXECUTED
3ddac: e1a0000b mov r0, fp <== NOT EXECUTED
3ddb0: eb0079f1 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3ddb4: e2877002 add r7, r7, #2 <== NOT EXECUTED
3ddb8: e0870000 add r0, r7, r0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
3ddbc: e1580006 cmp r8, r6 <== NOT EXECUTED
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
3ddc0: e585001c str r0, [r5, #28] <== NOT EXECUTED
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3ddc4: e5856018 str r6, [r5, #24] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3ddc8: e5c56010 strb r6, [r5, #16] <== NOT EXECUTED
handle->bnum = 0;
3ddcc: e5856014 str r6, [r5, #20] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
3ddd0: 01a00008 moveq r0, r8 <== NOT EXECUTED
3ddd4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc = rtems_rfs_inode_load (fs, handle);
3ddd8: e1a00004 mov r0, r4 <== NOT EXECUTED
3dddc: e1a01005 mov r1, r5 <== NOT EXECUTED
return rc;
}
3dde0: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
3dde4: eaffffba b 3dcd4 <rtems_rfs_inode_load> <== NOT EXECUTED
3dde8: e3a00016 mov r0, #22 <== NOT EXECUTED
return rc;
}
3ddec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003c62c <rtems_rfs_inode_overhead>:
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
3c62c: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
/**
* Return the inode overhead given a number of inodes.
*/
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
3c630: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3c634: e1a04000 mov r4, r0 <== NOT EXECUTED
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
3c638: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c63c: e0500183 subs r0, r0, r3, lsl #3 <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
3c640: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c644: 03a00e7d moveq r0, #2000 ; 0x7d0 <== NOT EXECUTED
3c648: 0a000007 beq 3c66c <rtems_rfs_inode_overhead+0x40> <== NOT EXECUTED
3c64c: e2400001 sub r0, r0, #1 <== NOT EXECUTED
3c650: e1a01005 mov r1, r5 <== NOT EXECUTED
3c654: eb007fc8 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3c658: e2800002 add r0, r0, #2 <== NOT EXECUTED
3c65c: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3c660: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3c664: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
3c668: e1a00180 lsl r0, r0, #3 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
3c66c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
3c670: e1a01185 lsl r1, r5, #3 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
3c674: e2433001 sub r3, r3, #1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
3c678: e1510003 cmp r1, r3 <== NOT EXECUTED
3c67c: 21a01003 movcs r1, r3 <== NOT EXECUTED
3c680: eb008001 bl 5c68c <__aeabi_idiv> <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
}
3c684: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003d9e0 <rtems_rfs_inode_time_stamp_now>:
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
3d9e0: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
3d9e4: e3530000 cmp r3, #0 <== NOT EXECUTED
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
3d9e8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3d9ec: e1a04000 mov r4, r0 <== NOT EXECUTED
3d9f0: e20160ff and r6, r1, #255 ; 0xff <== NOT EXECUTED
3d9f4: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
3d9f8: 03a00006 moveq r0, #6 <== NOT EXECUTED
3d9fc: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return ENXIO;
now = time (NULL);
3da00: e3a00000 mov r0, #0 <== NOT EXECUTED
3da04: eb004a90 bl 5044c <time> <== NOT EXECUTED
if (atime)
3da08: e3560000 cmp r6, #0 <== NOT EXECUTED
3da0c: 0a00000c beq 3da44 <rtems_rfs_inode_time_stamp_now+0x64> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
3da10: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da14: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
3da18: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
3da1c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da20: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
3da24: e5c32011 strb r2, [r3, #17] <== NOT EXECUTED
3da28: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da2c: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
3da30: e5c32012 strb r2, [r3, #18] <== NOT EXECUTED
3da34: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da38: e5c30013 strb r0, [r3, #19] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3da3c: e3a03001 mov r3, #1 <== NOT EXECUTED
3da40: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
3da44: e3550000 cmp r5, #0 <== NOT EXECUTED
3da48: 01a00005 moveq r0, r5 <== NOT EXECUTED
3da4c: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
3da50: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da54: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
3da58: e5c32014 strb r2, [r3, #20] <== NOT EXECUTED
3da5c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da60: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
3da64: e5c32015 strb r2, [r3, #21] <== NOT EXECUTED
3da68: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da6c: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
3da70: e5c32016 strb r2, [r3, #22] <== NOT EXECUTED
3da74: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3da78: e5c30017 strb r0, [r3, #23] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3da7c: e3a03001 mov r3, #1 <== NOT EXECUTED
3da80: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
3da84: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
3da88: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003dbf8 <rtems_rfs_inode_unload>:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
3dbf8: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
3dbfc: e3530000 cmp r3, #0 <== NOT EXECUTED
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
3dc00: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3dc04: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
3dc08: e1a04001 mov r4, r1 <== NOT EXECUTED
3dc0c: e1a05000 mov r5, r0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
3dc10: 0a000012 beq 3dc60 <rtems_rfs_inode_unload+0x68> <== NOT EXECUTED
{
if (handle->loads == 0)
3dc14: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED
3dc18: e3500000 cmp r0, #0 <== NOT EXECUTED
3dc1c: 03a00005 moveq r0, #5 <== NOT EXECUTED
3dc20: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
return EIO;
handle->loads--;
3dc24: e2400001 sub r0, r0, #1 <== NOT EXECUTED
if (handle->loads == 0)
3dc28: e3500000 cmp r0, #0 <== NOT EXECUTED
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
3dc2c: e5810024 str r0, [r1, #36] ; 0x24 <== NOT EXECUTED
if (handle->loads == 0)
3dc30: 1a00000a bne 3dc60 <rtems_rfs_inode_unload+0x68> <== NOT EXECUTED
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
3dc34: e5d13010 ldrb r3, [r1, #16] <== NOT EXECUTED
3dc38: e3530000 cmp r3, #0 <== NOT EXECUTED
3dc3c: 0a000001 beq 3dc48 <rtems_rfs_inode_unload+0x50> <== NOT EXECUTED
3dc40: e3520000 cmp r2, #0 <== NOT EXECUTED
3dc44: 1a000007 bne 3dc68 <rtems_rfs_inode_unload+0x70> <== NOT EXECUTED
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
3dc48: e1a00005 mov r0, r5 <== NOT EXECUTED
3dc4c: e2841010 add r1, r4, #16 <== NOT EXECUTED
3dc50: ebfff1e9 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->node = NULL;
3dc54: e3a03000 mov r3, #0 <== NOT EXECUTED
3dc58: e584300c str r3, [r4, #12] <== NOT EXECUTED
3dc5c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
3dc60: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return rc;
}
3dc64: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
3dc68: eb0049f7 bl 5044c <time> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
3dc6c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3dc70: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
3dc74: e5c32018 strb r2, [r3, #24] <== NOT EXECUTED
3dc78: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3dc7c: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
3dc80: e5c32019 strb r2, [r3, #25] <== NOT EXECUTED
3dc84: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3dc88: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
3dc8c: e5c3201a strb r2, [r3, #26] <== NOT EXECUTED
3dc90: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3dc94: e5c3001b strb r0, [r3, #27] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3dc98: e3a03001 mov r3, #1 <== NOT EXECUTED
3dc9c: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
3dca0: eaffffe8 b 3dc48 <rtems_rfs_inode_unload+0x50> <== NOT EXECUTED
0003e724 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
3e724: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3e728: e24dd054 sub sp, sp, #84 ; 0x54 <== NOT EXECUTED
3e72c: e59db078 ldr fp, [sp, #120] ; 0x78 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e730: e28d5004 add r5, sp, #4 <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
3e734: e1a08001 mov r8, r1 <== NOT EXECUTED
3e738: e1a0a002 mov sl, r2 <== NOT EXECUTED
3e73c: e1a07003 mov r7, r3 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e740: e1a0100b mov r1, fp <== NOT EXECUTED
3e744: e1a02005 mov r2, r5 <== NOT EXECUTED
3e748: e3a03001 mov r3, #1 <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
3e74c: e1a04000 mov r4, r0 <== NOT EXECUTED
3e750: e5dd607c ldrb r6, [sp, #124] ; 0x7c <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e754: ebfffd76 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3e758: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e75c: 1a000036 bne 3e83c <rtems_rfs_link+0x118> <== NOT EXECUTED
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
3e760: e3560000 cmp r6, #0 <== NOT EXECUTED
3e764: 1a000005 bne 3e780 <rtems_rfs_link+0x5c> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
3e768: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3e76c: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
3e770: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
3e774: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
3e778: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
3e77c: 0a000038 beq 3e864 <rtems_rfs_link+0x140> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
3e780: e28d602c add r6, sp, #44 ; 0x2c <== NOT EXECUTED
3e784: e1a01007 mov r1, r7 <== NOT EXECUTED
3e788: e1a00004 mov r0, r4 <== NOT EXECUTED
3e78c: e1a02006 mov r2, r6 <== NOT EXECUTED
3e790: e3a03001 mov r3, #1 <== NOT EXECUTED
3e794: ebfffd66 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3e798: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e79c: 1a00002c bne 3e854 <rtems_rfs_link+0x130> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
3e7a0: e1a02008 mov r2, r8 <== NOT EXECUTED
3e7a4: e1a0300a mov r3, sl <== NOT EXECUTED
3e7a8: e1a00004 mov r0, r4 <== NOT EXECUTED
3e7ac: e1a01006 mov r1, r6 <== NOT EXECUTED
3e7b0: e58db000 str fp, [sp] <== NOT EXECUTED
3e7b4: ebfff167 bl 3ad58 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
3e7b8: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e7bc: ca000021 bgt 3e848 <rtems_rfs_link+0x124> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e7c0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3e7c4: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
3e7c8: e5d31001 ldrb r1, [r3, #1] <== NOT EXECUTED
if (links == 0xffff)
3e7cc: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e7d0: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
3e7d4: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3e7d8: e1510002 cmp r1, r2 <== NOT EXECUTED
3e7dc: 12811001 addne r1, r1, #1 <== NOT EXECUTED
3e7e0: 11a01801 lslne r1, r1, #16 <== NOT EXECUTED
3e7e4: 11a00821 lsrne r0, r1, #16 <== NOT EXECUTED
3e7e8: 03a01000 moveq r1, #0 <== NOT EXECUTED
3e7ec: 11a01c21 lsrne r1, r1, #24 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e7f0: e5c31000 strb r1, [r3] <== NOT EXECUTED
3e7f4: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
3e7f8: 03a00001 moveq r0, #1 <== NOT EXECUTED
3e7fc: 120000ff andne r0, r0, #255 ; 0xff <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e800: e3a03001 mov r3, #1 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e804: e5c20001 strb r0, [r2, #1] <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
3e808: e1a01003 mov r1, r3 <== NOT EXECUTED
3e80c: e1a00006 mov r0, r6 <== NOT EXECUTED
3e810: e1a02003 mov r2, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e814: e5cd3014 strb r3, [sp, #20] <== NOT EXECUTED
3e818: ebfffc70 bl 3d9e0 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
3e81c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e820: da000014 ble 3e878 <rtems_rfs_link+0x154> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
3e824: e1a01006 mov r1, r6 <== NOT EXECUTED
3e828: e1a00004 mov r0, r4 <== NOT EXECUTED
3e82c: ebfffd1c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
3e830: e1a00004 mov r0, r4 <== NOT EXECUTED
3e834: e1a01005 mov r1, r5 <== NOT EXECUTED
3e838: ebfffd19 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
3e83c: e1a00009 mov r0, r9 <== NOT EXECUTED
3e840: e28dd054 add sp, sp, #84 ; 0x54 <== NOT EXECUTED
3e844: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
3e848: e1a01006 mov r1, r6 <== NOT EXECUTED
3e84c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e850: ebfffd13 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
3e854: e1a00004 mov r0, r4 <== NOT EXECUTED
3e858: e1a01005 mov r1, r5 <== NOT EXECUTED
3e85c: ebfffd10 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e860: eafffff5 b 3e83c <rtems_rfs_link+0x118> <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
3e864: e1a00004 mov r0, r4 <== NOT EXECUTED
3e868: e1a01005 mov r1, r5 <== NOT EXECUTED
3e86c: ebfffd0c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e870: e3a09086 mov r9, #134 ; 0x86 <== NOT EXECUTED
return ENOTSUP;
3e874: eafffff0 b 3e83c <rtems_rfs_link+0x118> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
3e878: e1a01006 mov r1, r6 <== NOT EXECUTED
3e87c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e880: ebfffd07 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3e884: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e888: cafffff1 bgt 3e854 <rtems_rfs_link+0x130> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
3e88c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e890: e1a01005 mov r1, r5 <== NOT EXECUTED
3e894: ebfffd02 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e898: e1a09000 mov r9, r0 <== NOT EXECUTED
return rc;
3e89c: eaffffe6 b 3e83c <rtems_rfs_link+0x118> <== NOT EXECUTED
0003e8bc <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
3e8bc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3e8c0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
3e8c4: e58d0000 str r0, [sp] <== NOT EXECUTED
3e8c8: e3a01001 mov r1, #1 <== NOT EXECUTED
3e8cc: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
3e8d0: e3a03000 mov r3, #0 <== NOT EXECUTED
3e8d4: e59f0014 ldr r0, [pc, #20] ; 3e8f0 <rtems_rfs_mutex_create+0x34><== NOT EXECUTED
3e8d8: ebff3644 bl c1f0 <rtems_semaphore_create> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
3e8dc: e3500000 cmp r0, #0 <== NOT EXECUTED
3e8e0: 13a00005 movne r0, #5 <== NOT EXECUTED
3e8e4: 03a00000 moveq r0, #0 <== NOT EXECUTED
3e8e8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3e8ec: e8bd8000 pop {pc} <== NOT EXECUTED
0003e8a0 <rtems_rfs_mutex_destroy>:
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
3e8a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
3e8a4: e5900000 ldr r0, [r0] <== NOT EXECUTED
3e8a8: ebff36c2 bl c3b8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
3e8ac: e3500000 cmp r0, #0 <== NOT EXECUTED
3e8b0: 13a00005 movne r0, #5 <== NOT EXECUTED
3e8b4: 03a00000 moveq r0, #0 <== NOT EXECUTED
3e8b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0003a234 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
3a234: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
3a238: e3a05000 mov r5, #0 <== NOT EXECUTED
3a23c: e1a04000 mov r4, r0 <== NOT EXECUTED
3a240: e1a06001 mov r6, r1 <== NOT EXECUTED
3a244: e202a0ff and sl, r2, #255 ; 0xff <== NOT EXECUTED
3a248: e2807004 add r7, r0, #4 <== NOT EXECUTED
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
3a24c: e1a08005 mov r8, r5 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
3a250: ea00000d b 3a28c <rtems_rfs_release_chain+0x58> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
3a254: ebff4bb1 bl d120 <_Chain_Get> <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
3a258: e5962000 ldr r2, [r6] <== NOT EXECUTED
3a25c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3a260: e5862000 str r2, [r6] <== NOT EXECUTED
buffer->user = (void*) 0;
3a264: e5808038 str r8, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
3a268: e1a0100a mov r1, sl <== NOT EXECUTED
3a26c: eb00272e bl 43f2c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
3a270: e3500000 cmp r0, #0 <== NOT EXECUTED
3a274: d3a03000 movle r3, #0 <== NOT EXECUTED
3a278: c3a03001 movgt r3, #1 <== NOT EXECUTED
3a27c: e3550000 cmp r5, #0 <== NOT EXECUTED
3a280: 13a03000 movne r3, #0 <== NOT EXECUTED
3a284: e3530000 cmp r3, #0 <== NOT EXECUTED
3a288: 11a05000 movne r5, r0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
3a28c: e5943000 ldr r3, [r4] <== NOT EXECUTED
3a290: e1530007 cmp r3, r7 <== NOT EXECUTED
3a294: e1a00004 mov r0, r4 <== NOT EXECUTED
3a298: 1affffed bne 3a254 <rtems_rfs_release_chain+0x20> <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
3a29c: e1a00005 mov r0, r5 <== NOT EXECUTED
3a2a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00022864 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
22864: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
22868: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2286c: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
22870: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
22874: e5908000 ldr r8, [r0] <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
22878: e1a06801 lsl r6, r1, #16 <== NOT EXECUTED
2287c: e3a01000 mov r1, #0 <== NOT EXECUTED
22880: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
22884: e1a07802 lsl r7, r2, #16 <== NOT EXECUTED
22888: e5930000 ldr r0, [r3] <== NOT EXECUTED
2288c: e1a02001 mov r2, r1 <== NOT EXECUTED
22890: ebffa70b bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
22894: e1a01008 mov r1, r8 <== NOT EXECUTED
22898: e1a00004 mov r0, r4 <== NOT EXECUTED
2289c: e1a0200d mov r2, sp <== NOT EXECUTED
228a0: e3a03001 mov r3, #1 <== NOT EXECUTED
228a4: eb006d22 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
228a8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
228ac: e1a0500d mov r5, sp <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
228b0: e1a06826 lsr r6, r6, #16 <== NOT EXECUTED
228b4: e1a07827 lsr r7, r7, #16 <== NOT EXECUTED
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
228b8: da000009 ble 228e4 <rtems_rfs_rtems_chown+0x80> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
228bc: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
228c0: e1a00004 mov r0, r4 <== NOT EXECUTED
228c4: eb005e76 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
228c8: e5950000 ldr r0, [r5] <== NOT EXECUTED
228cc: ebffa744 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: opening inode", rc);
228d0: eb00875a bl 44640 <__errno> <== NOT EXECUTED
228d4: e5808000 str r8, [r0] <== NOT EXECUTED
228d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
228dc: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
228e0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
228e4: eb001adf bl 29468 <geteuid> <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
228e8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
228ec: e2823004 add r3, r2, #4 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
228f0: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
228f4: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
228f8: e1813403 orr r3, r1, r3, lsl #8 <== NOT EXECUTED
228fc: e1500003 cmp r0, r3 <== NOT EXECUTED
22900: 0a000001 beq 2290c <rtems_rfs_rtems_chown+0xa8> <== NOT EXECUTED
22904: e3500000 cmp r0, #0 <== NOT EXECUTED
22908: 1a000021 bne 22994 <rtems_rfs_rtems_chown+0x130> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
2290c: e1867807 orr r7, r6, r7, lsl #16 <== NOT EXECUTED
22910: e1a03c27 lsr r3, r7, #24 <== NOT EXECUTED
22914: e5c23004 strb r3, [r2, #4] <== NOT EXECUTED
22918: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
2291c: e1a02827 lsr r2, r7, #16 <== NOT EXECUTED
22920: e5c32005 strb r2, [r3, #5] <== NOT EXECUTED
22924: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
22928: e1a07427 lsr r7, r7, #8 <== NOT EXECUTED
2292c: e5c37006 strb r7, [r3, #6] <== NOT EXECUTED
22930: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
22934: e1a0100d mov r1, sp <== NOT EXECUTED
22938: e5c36007 strb r6, [r3, #7] <== NOT EXECUTED
2293c: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
22940: e3a03001 mov r3, #1 <== NOT EXECUTED
22944: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
22948: eb006cd5 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
2294c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
22950: 0a000008 beq 22978 <rtems_rfs_rtems_chown+0x114> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22954: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22958: e1a00004 mov r0, r4 <== NOT EXECUTED
2295c: eb005e50 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22960: e5960000 ldr r0, [r6] <== NOT EXECUTED
22964: ebffa71e bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
22968: eb008734 bl 44640 <__errno> <== NOT EXECUTED
2296c: e5805000 str r5, [r0] <== NOT EXECUTED
22970: e3e00000 mvn r0, #0 <== NOT EXECUTED
22974: eaffffd8 b 228dc <rtems_rfs_rtems_chown+0x78> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22978: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2297c: e1a00004 mov r0, r4 <== NOT EXECUTED
22980: eb005e47 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22984: e5960000 ldr r0, [r6] <== NOT EXECUTED
22988: ebffa715 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
2298c: e1a00005 mov r0, r5 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
22990: eaffffd1 b 228dc <rtems_rfs_rtems_chown+0x78> <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
22994: e1a0100d mov r1, sp <== NOT EXECUTED
22998: e1a00004 mov r0, r4 <== NOT EXECUTED
2299c: eb006cc0 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
229a0: e1a00004 mov r0, r4 <== NOT EXECUTED
229a4: ebfffa1f bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
229a8: eb008724 bl 44640 <__errno> <== NOT EXECUTED
229ac: e3a03001 mov r3, #1 <== NOT EXECUTED
229b0: e5803000 str r3, [r0] <== NOT EXECUTED
229b4: e3e00000 mvn r0, #0 <== NOT EXECUTED
229b8: eaffffc7 b 228dc <rtems_rfs_rtems_chown+0x78> <== NOT EXECUTED
0003ea14 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
3ea14: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3ea18: e1a03000 mov r3, r0 <== NOT EXECUTED
3ea1c: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
3ea20: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.flags = 0;
3ea24: e3a0c000 mov ip, #0 <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
3ea28: e5931034 ldr r1, [r3, #52] ; 0x34 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
3ea2c: e1a0200d mov r2, sp <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
3ea30: e58d3000 str r3, [sp] <== NOT EXECUTED
args.flags = 0;
args.mode = 0;
3ea34: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.flags = 0;
3ea38: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
3ea3c: eb000aec bl 415f4 <rtems_io_close> <== NOT EXECUTED
if (status)
3ea40: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3ea44: 01a00003 moveq r0, r3 <== NOT EXECUTED
return rtems_deviceio_errno (status);
3ea48: 1b00029c blne 3f4c0 <rtems_deviceio_errno> <== NOT EXECUTED
return 0;
}
3ea4c: e28dd00c add sp, sp, #12 <== NOT EXECUTED
3ea50: e8bd8000 pop {pc} <== NOT EXECUTED
0003e900 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
return 0;
}
3e900: e3a00000 mov r0, #0 <== NOT EXECUTED
3e904: e12fff1e bx lr <== NOT EXECUTED
0003e908 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
3e908: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3e90c: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
3e910: e593c034 ldr ip, [r3, #52] ; 0x34 <== NOT EXECUTED
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
3e914: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
3e918: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.command = command;
args.buffer = buffer;
3e91c: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
3e920: e1a0200d mov r2, sp <== NOT EXECUTED
3e924: e1a0100c mov r1, ip <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
3e928: e58d3000 str r3, [sp] <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
3e92c: eb000b44 bl 41644 <rtems_io_control> <== NOT EXECUTED
if (status)
3e930: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
3e934: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
3e938: 1a000001 bne 3e944 <rtems_rfs_rtems_device_ioctl+0x3c> <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
}
3e93c: e28dd010 add sp, sp, #16 <== NOT EXECUTED
3e940: e8bd8000 pop {pc} <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
3e944: eb0002dd bl 3f4c0 <rtems_deviceio_errno> <== NOT EXECUTED
3e948: eafffffb b 3e93c <rtems_rfs_rtems_device_ioctl+0x34> <== NOT EXECUTED
0003e8f4 <rtems_rfs_rtems_device_lseek>:
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
return offset;
}
3e8f4: e1a00001 mov r0, r1 <== NOT EXECUTED
3e8f8: e1a01002 mov r1, r2 <== NOT EXECUTED
3e8fc: e12fff1e bx lr <== NOT EXECUTED
0003ea54 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
3ea54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3ea58: e5902028 ldr r2, [r0, #40] ; 0x28 <== NOT EXECUTED
3ea5c: e5924034 ldr r4, [r2, #52] ; 0x34 <== NOT EXECUTED
3ea60: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
3ea64: e5907038 ldr r7, [r0, #56] ; 0x38 <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
3ea68: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED
3ea6c: e3a01000 mov r1, #0 <== NOT EXECUTED
3ea70: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3ea74: e28d6010 add r6, sp, #16 <== NOT EXECUTED
3ea78: e5920000 ldr r0, [r2] <== NOT EXECUTED
3ea7c: e1a02001 mov r2, r1 <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
3ea80: e1a08003 mov r8, r3 <== NOT EXECUTED
3ea84: ebff368e bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3ea88: e1a01007 mov r1, r7 <== NOT EXECUTED
3ea8c: e1a00004 mov r0, r4 <== NOT EXECUTED
3ea90: e1a02006 mov r2, r6 <== NOT EXECUTED
3ea94: e3a03001 mov r3, #1 <== NOT EXECUTED
3ea98: ebfffca5 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3ea9c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3eaa0: da000009 ble 3eacc <rtems_rfs_rtems_device_open+0x78> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3eaa4: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3eaa8: e1a00004 mov r0, r4 <== NOT EXECUTED
3eaac: ebffedfc bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3eab0: e5950000 ldr r0, [r5] <== NOT EXECUTED
3eab4: ebff36ca bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
3eab8: eb0016e0 bl 44640 <__errno> <== NOT EXECUTED
3eabc: e5807000 str r7, [r0] <== NOT EXECUTED
3eac0: e3e00000 mvn r0, #0 <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno(status);
return 0;
}
3eac4: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED
3eac8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
3eacc: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3ead0: e282301c add r3, r2, #28 <== NOT EXECUTED
3ead4: e5d2a01c ldrb sl, [r2, #28] <== NOT EXECUTED
3ead8: e5d32007 ldrb r2, [r3, #7] <== NOT EXECUTED
3eadc: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
3eae0: e5d32002 ldrb r2, [r3, #2] <== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
3eae4: e1a01006 mov r1, r6 <== NOT EXECUTED
3eae8: e5d36001 ldrb r6, [r3, #1] <== NOT EXECUTED
3eaec: e58d200c str r2, [sp, #12] <== NOT EXECUTED
3eaf0: e5d37003 ldrb r7, [r3, #3] <== NOT EXECUTED
3eaf4: e5d39004 ldrb r9, [r3, #4] <== NOT EXECUTED
3eaf8: e5d3b005 ldrb fp, [r3, #5] <== NOT EXECUTED
3eafc: e5d33006 ldrb r3, [r3, #6] <== NOT EXECUTED
3eb00: e1a00004 mov r0, r4 <== NOT EXECUTED
3eb04: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
3eb08: ebfffc65 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3eb0c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3eb10: da00000a ble 3eb40 <rtems_rfs_rtems_device_open+0xec> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3eb14: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3eb18: e1a00004 mov r0, r4 <== NOT EXECUTED
3eb1c: e58d3000 str r3, [sp] <== NOT EXECUTED
3eb20: ebffeddf bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3eb24: e5950000 ldr r0, [r5] <== NOT EXECUTED
3eb28: ebff36ad bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
3eb2c: eb0016c3 bl 44640 <__errno> <== NOT EXECUTED
3eb30: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3eb34: e5803000 str r3, [r0] <== NOT EXECUTED
3eb38: e3e00000 mvn r0, #0 <== NOT EXECUTED
3eb3c: eaffffe0 b 3eac4 <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
3eb40: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3eb44: e1a0b80b lsl fp, fp, #16 <== NOT EXECUTED
3eb48: e18b9c09 orr r9, fp, r9, lsl #24 <== NOT EXECUTED
3eb4c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3eb50: e594b07c ldr fp, [r4, #124] ; 0x7c <== NOT EXECUTED
3eb54: e1899003 orr r9, r9, r3 <== NOT EXECUTED
3eb58: e1877c0a orr r7, r7, sl, lsl #24 <== NOT EXECUTED
3eb5c: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
3eb60: e1876806 orr r6, r7, r6, lsl #16 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3eb64: e1a00004 mov r0, r4 <== NOT EXECUTED
3eb68: e1866402 orr r6, r6, r2, lsl #8 <== NOT EXECUTED
3eb6c: e1899403 orr r9, r9, r3, lsl #8 <== NOT EXECUTED
3eb70: ebffedcb bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3eb74: e59b0000 ldr r0, [fp] <== NOT EXECUTED
3eb78: ebff3699 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
3eb7c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
3eb80: e5856030 str r6, [r5, #48] ; 0x30 <== NOT EXECUTED
iop->data1 = (void*)((intptr_t) minor);
3eb84: e5859034 str r9, [r5, #52] ; 0x34 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
3eb88: e1a00006 mov r0, r6 <== NOT EXECUTED
3eb8c: e1a01009 mov r1, r9 <== NOT EXECUTED
3eb90: e28d2038 add r2, sp, #56 ; 0x38 <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
3eb94: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
args.mode = mode;
3eb98: e58d8040 str r8, [sp, #64] ; 0x40 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
3eb9c: e58d5038 str r5, [sp, #56] ; 0x38 <== NOT EXECUTED
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
3eba0: eb000abb bl 41694 <rtems_io_open> <== NOT EXECUTED
if (status)
3eba4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3eba8: 01a00003 moveq r0, r3 <== NOT EXECUTED
3ebac: 0affffc4 beq 3eac4 <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
return rtems_deviceio_errno(status);
3ebb0: eb000242 bl 3f4c0 <rtems_deviceio_errno> <== NOT EXECUTED
3ebb4: eaffffc2 b 3eac4 <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
0003e9b0 <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
3e9b0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3e9b4: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3e9b8: e593c014 ldr ip, [r3, #20] <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
3e9bc: e593e034 ldr lr, [r3, #52] ; 0x34 <== NOT EXECUTED
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
3e9c0: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
3e9c4: e283500c add r5, r3, #12 <== NOT EXECUTED
3e9c8: e8950030 ldm r5, {r4, r5} <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
3e9cc: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
3e9d0: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
3e9d4: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
3e9d8: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
3e9dc: e1a0100e mov r1, lr <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3e9e0: e3a0c000 mov ip, #0 <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
3e9e4: e1a0200d mov r2, sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
3e9e8: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3e9ec: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
3e9f0: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
3e9f4: eb000b3a bl 416e4 <rtems_io_read> <== NOT EXECUTED
if (status)
3e9f8: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
3e9fc: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
3ea00: 1a000001 bne 3ea0c <rtems_rfs_rtems_device_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
3ea04: e28dd01c add sp, sp, #28 <== NOT EXECUTED
3ea08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
3ea0c: eb0002ab bl 3f4c0 <rtems_deviceio_errno> <== NOT EXECUTED
3ea10: eafffffb b 3ea04 <rtems_rfs_rtems_device_read+0x54> <== NOT EXECUTED
0003e94c <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
3e94c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3e950: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3e954: e593c014 ldr ip, [r3, #20] <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
3e958: e593e034 ldr lr, [r3, #52] ; 0x34 <== NOT EXECUTED
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
3e95c: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
3e960: e283500c add r5, r3, #12 <== NOT EXECUTED
3e964: e8950030 ldm r5, {r4, r5} <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
3e968: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
3e96c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
3e970: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
3e974: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
3e978: e1a0100e mov r1, lr <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3e97c: e3a0c000 mov ip, #0 <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
3e980: e1a0200d mov r2, sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
3e984: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3e988: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
3e98c: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
3e990: eb000b67 bl 41734 <rtems_io_write> <== NOT EXECUTED
if (status)
3e994: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
3e998: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
3e99c: 1a000001 bne 3e9a8 <rtems_rfs_rtems_device_write+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
3e9a0: e28dd01c add sp, sp, #28 <== NOT EXECUTED
3e9a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
3e9a8: eb0002c4 bl 3f4c0 <rtems_deviceio_errno> <== NOT EXECUTED
3e9ac: eafffffb b 3e9a0 <rtems_rfs_rtems_device_write+0x54> <== NOT EXECUTED
0003ebb8 <rtems_rfs_rtems_dir_close>:
{
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
3ebb8: e3a00000 mov r0, #0 <== NOT EXECUTED
3ebbc: e12fff1e bx lr <== NOT EXECUTED
0003ebc0 <rtems_rfs_rtems_dir_lseek>:
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
switch (whence)
3ebc0: e3530001 cmp r3, #1 <== NOT EXECUTED
*/
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
3ebc4: e92d4010 push {r4, lr} <== NOT EXECUTED
switch (whence)
3ebc8: 93a03000 movls r3, #0 <== NOT EXECUTED
3ebcc: 93a04000 movls r4, #0 <== NOT EXECUTED
3ebd0: 9a000004 bls 3ebe8 <rtems_rfs_rtems_dir_lseek+0x28> <== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
3ebd4: eb001699 bl 44640 <__errno> <== NOT EXECUTED
3ebd8: e3a03016 mov r3, #22 <== NOT EXECUTED
3ebdc: e5803000 str r3, [r0] <== NOT EXECUTED
3ebe0: e3e04000 mvn r4, #0 <== NOT EXECUTED
3ebe4: e3e03000 mvn r3, #0 <== NOT EXECUTED
break;
}
return 0;
}
3ebe8: e1a01004 mov r1, r4 <== NOT EXECUTED
3ebec: e1a00003 mov r0, r3 <== NOT EXECUTED
3ebf0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003ede4 <rtems_rfs_rtems_dir_open>:
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3ede4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
3ede8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3edec: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3edf0: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
3edf4: e5907038 ldr r7, [r0, #56] ; 0x38 <== NOT EXECUTED
3edf8: e3a01000 mov r1, #0 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
3edfc: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
3ee00: e1a02001 mov r2, r1 <== NOT EXECUTED
3ee04: e1a05000 mov r5, r0 <== NOT EXECUTED
3ee08: e5930000 ldr r0, [r3] <== NOT EXECUTED
3ee0c: ebff35ac bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3ee10: e1a01007 mov r1, r7 <== NOT EXECUTED
3ee14: e1a00004 mov r0, r4 <== NOT EXECUTED
3ee18: e1a0200d mov r2, sp <== NOT EXECUTED
3ee1c: e3a03001 mov r3, #1 <== NOT EXECUTED
3ee20: ebfffbc3 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3ee24: e2507000 subs r7, r0, #0 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3ee28: e1a0600d mov r6, sp <== NOT EXECUTED
if (rc)
3ee2c: 1a000014 bne 3ee84 <rtems_rfs_rtems_dir_open+0xa0> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
3ee30: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
3ee34: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
3ee38: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
3ee3c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
3ee40: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
3ee44: 1a000017 bne 3eea8 <rtems_rfs_rtems_dir_open+0xc4> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
3ee48: e3a02000 mov r2, #0 <== NOT EXECUTED
3ee4c: e3a03000 mov r3, #0 <== NOT EXECUTED
3ee50: e585200c str r2, [r5, #12] <== NOT EXECUTED
3ee54: e5853010 str r3, [r5, #16] <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
3ee58: e1a0100d mov r1, sp <== NOT EXECUTED
3ee5c: e1a00004 mov r0, r4 <== NOT EXECUTED
3ee60: ebfffb8f bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3ee64: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3ee68: e1a00004 mov r0, r4 <== NOT EXECUTED
3ee6c: ebffed0c bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3ee70: e5950000 ldr r0, [r5] <== NOT EXECUTED
3ee74: ebff35da bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
3ee78: e1a00007 mov r0, r7 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
3ee7c: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
3ee80: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3ee84: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3ee88: e1a00004 mov r0, r4 <== NOT EXECUTED
3ee8c: ebffed04 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3ee90: e5950000 ldr r0, [r5] <== NOT EXECUTED
3ee94: ebff35d2 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
3ee98: eb0015e8 bl 44640 <__errno> <== NOT EXECUTED
3ee9c: e5807000 str r7, [r0] <== NOT EXECUTED
3eea0: e3e00000 mvn r0, #0 <== NOT EXECUTED
3eea4: eafffff4 b 3ee7c <rtems_rfs_rtems_dir_open+0x98> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
3eea8: e1a0100d mov r1, sp <== NOT EXECUTED
3eeac: e1a00004 mov r0, r4 <== NOT EXECUTED
3eeb0: ebfffb7b bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3eeb4: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3eeb8: e1a00004 mov r0, r4 <== NOT EXECUTED
3eebc: ebffecf8 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3eec0: e5950000 ldr r0, [r5] <== NOT EXECUTED
3eec4: ebff35c6 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
3eec8: eb0015dc bl 44640 <__errno> <== NOT EXECUTED
3eecc: e3a03014 mov r3, #20 <== NOT EXECUTED
3eed0: e5803000 str r3, [r0] <== NOT EXECUTED
3eed4: e3e00000 mvn r0, #0 <== NOT EXECUTED
3eed8: eaffffe7 b 3ee7c <rtems_rfs_rtems_dir_open+0x98> <== NOT EXECUTED
0003eca8 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
3eca8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3ecac: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
3ecb0: e5937034 ldr r7, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3ecb4: e597307c ldr r3, [r7, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
3ecb8: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
3ecbc: e24dd038 sub sp, sp, #56 ; 0x38 <== NOT EXECUTED
3ecc0: e1a0a001 mov sl, r1 <== NOT EXECUTED
3ecc4: e3a01000 mov r1, #0 <== NOT EXECUTED
3ecc8: e1a06000 mov r6, r0 <== NOT EXECUTED
3eccc: e1a04002 mov r4, r2 <== NOT EXECUTED
3ecd0: e5930000 ldr r0, [r3] <== NOT EXECUTED
3ecd4: e1a02001 mov r2, r1 <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3ecd8: e28d800c add r8, sp, #12 <== NOT EXECUTED
3ecdc: ebff35f8 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
3ece0: e1a01005 mov r1, r5 <== NOT EXECUTED
3ece4: e1a00007 mov r0, r7 <== NOT EXECUTED
3ece8: e1a02008 mov r2, r8 <== NOT EXECUTED
3ecec: e3a03001 mov r3, #1 <== NOT EXECUTED
3ecf0: ebfffc0f bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3ecf4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3ecf8: 1a000029 bne 3eda4 <rtems_rfs_rtems_dir_read+0xfc> <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
3ecfc: e59f30dc ldr r3, [pc, #220] ; 3ede0 <rtems_rfs_rtems_dir_read+0x138><== NOT EXECUTED
3ed00: e08b2493 umull r2, fp, r3, r4 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
3ed04: e1b0b42b lsrs fp, fp, #8 <== NOT EXECUTED
3ed08: 01a0400b moveq r4, fp <== NOT EXECUTED
3ed0c: 0a000019 beq 3ed78 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
3ed10: e286300c add r3, r6, #12 <== NOT EXECUTED
3ed14: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
3ed18: e1a04005 mov r4, r5 <== NOT EXECUTED
3ed1c: e28d9034 add r9, sp, #52 ; 0x34 <== NOT EXECUTED
3ed20: ea00000b b 3ed54 <rtems_rfs_rtems_dir_read+0xac> <== NOT EXECUTED
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
3ed24: e3500000 cmp r0, #0 <== NOT EXECUTED
3ed28: ca000026 bgt 3edc8 <rtems_rfs_rtems_dir_read+0x120> <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
3ed2c: e286100c add r1, r6, #12 <== NOT EXECUTED
3ed30: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3ed34: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED
3ed38: e090200c adds r2, r0, ip <== NOT EXECUTED
3ed3c: e2a13000 adc r3, r1, #0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
3ed40: e15b0005 cmp fp, r5 <== NOT EXECUTED
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
3ed44: e586200c str r2, [r6, #12] <== NOT EXECUTED
3ed48: e5863010 str r3, [r6, #16] <== NOT EXECUTED
3ed4c: e2844e11 add r4, r4, #272 ; 0x110 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
3ed50: 9a000008 bls 3ed78 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
3ed54: e08ac004 add ip, sl, r4 <== NOT EXECUTED
3ed58: e1a00007 mov r0, r7 <== NOT EXECUTED
3ed5c: e1a01008 mov r1, r8 <== NOT EXECUTED
3ed60: e58dc000 str ip, [sp] <== NOT EXECUTED
3ed64: e58d9004 str r9, [sp, #4] <== NOT EXECUTED
3ed68: ebffee81 bl 3a774 <rtems_rfs_dir_read> <== NOT EXECUTED
if (rc == ENOENT)
3ed6c: e3500002 cmp r0, #2 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
3ed70: e2855001 add r5, r5, #1 <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
if (rc == ENOENT)
3ed74: 1affffea bne 3ed24 <rtems_rfs_rtems_dir_read+0x7c> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
3ed78: e1a01008 mov r1, r8 <== NOT EXECUTED
3ed7c: e1a00007 mov r0, r7 <== NOT EXECUTED
3ed80: ebfffbc7 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3ed84: e597507c ldr r5, [r7, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3ed88: e1a00007 mov r0, r7 <== NOT EXECUTED
3ed8c: ebffed44 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3ed90: e5950000 ldr r0, [r5] <== NOT EXECUTED
3ed94: ebff3612 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
3ed98: e1a00004 mov r0, r4 <== NOT EXECUTED
3ed9c: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
3eda0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3eda4: e597407c ldr r4, [r7, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3eda8: e1a00007 mov r0, r7 <== NOT EXECUTED
3edac: ebffed3c bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3edb0: e5940000 ldr r0, [r4] <== NOT EXECUTED
3edb4: ebff360a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
3edb8: eb001620 bl 44640 <__errno> <== NOT EXECUTED
3edbc: e3e04000 mvn r4, #0 <== NOT EXECUTED
3edc0: e5805000 str r5, [r0] <== NOT EXECUTED
3edc4: eafffff3 b 3ed98 <rtems_rfs_rtems_dir_read+0xf0> <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
3edc8: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
3edcc: eb00161b bl 44640 <__errno> <== NOT EXECUTED
3edd0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3edd4: e3e04000 mvn r4, #0 <== NOT EXECUTED
3edd8: e5803000 str r3, [r0] <== NOT EXECUTED
3eddc: eaffffe5 b 3ed78 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
0003ebf4 <rtems_rfs_rtems_dir_rmnod>:
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
3ebf4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
3ebf8: e5915000 ldr r5, [r1] <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
3ebfc: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
3ec00: e3550001 cmp r5, #1 <== NOT EXECUTED
}
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
3ec04: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
3ec08: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
3ec0c: e5907000 ldr r7, [r0] <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
3ec10: e5916004 ldr r6, [r1, #4] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
3ec14: 0a00001e beq 3ec94 <rtems_rfs_rtems_dir_rmnod+0xa0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3ec18: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
3ec1c: e3a01000 mov r1, #0 <== NOT EXECUTED
3ec20: e1a02001 mov r2, r1 <== NOT EXECUTED
3ec24: e5930000 ldr r0, [r3] <== NOT EXECUTED
3ec28: ebff3625 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
3ec2c: e1a02005 mov r2, r5 <== NOT EXECUTED
3ec30: e3a0c001 mov ip, #1 <== NOT EXECUTED
3ec34: e1a01007 mov r1, r7 <== NOT EXECUTED
3ec38: e1a03006 mov r3, r6 <== NOT EXECUTED
3ec3c: e1a00004 mov r0, r4 <== NOT EXECUTED
3ec40: e58dc000 str ip, [sp] <== NOT EXECUTED
3ec44: ebfffe32 bl 3e514 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
3ec48: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3ec4c: 1a000007 bne 3ec70 <rtems_rfs_rtems_dir_rmnod+0x7c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3ec50: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3ec54: e1a00004 mov r0, r4 <== NOT EXECUTED
3ec58: ebffed91 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3ec5c: e5960000 ldr r0, [r6] <== NOT EXECUTED
3ec60: ebff365f bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
3ec64: e1a00005 mov r0, r5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
3ec68: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3ec6c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3ec70: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3ec74: e1a00004 mov r0, r4 <== NOT EXECUTED
3ec78: ebffed89 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3ec7c: e5960000 ldr r0, [r6] <== NOT EXECUTED
3ec80: ebff3657 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
3ec84: eb00166d bl 44640 <__errno> <== NOT EXECUTED
3ec88: e5805000 str r5, [r0] <== NOT EXECUTED
3ec8c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3ec90: eafffff4 b 3ec68 <rtems_rfs_rtems_dir_rmnod+0x74> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
3ec94: eb001669 bl 44640 <__errno> <== NOT EXECUTED
3ec98: e3a03010 mov r3, #16 <== NOT EXECUTED
3ec9c: e5803000 str r3, [r0] <== NOT EXECUTED
3eca0: e3e00000 mvn r0, #0 <== NOT EXECUTED
3eca4: eaffffef b 3ec68 <rtems_rfs_rtems_dir_rmnod+0x74> <== NOT EXECUTED
000220b8 <rtems_rfs_rtems_eval_for_make>:
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
220b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
220bc: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
220c0: e1a09001 mov r9, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
220c4: e5911000 ldr r1, [r1] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
220c8: e24dd040 sub sp, sp, #64 ; 0x40 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
220cc: e58d103c str r1, [sp, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_ino node_ino;
uint32_t doff = 0;
220d0: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
220d4: e1a06002 mov r6, r2 <== NOT EXECUTED
220d8: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_ino node_ino;
uint32_t doff = 0;
220dc: e58d1034 str r1, [sp, #52] ; 0x34 <== NOT EXECUTED
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
220e0: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
220e4: eb00a463 bl 4b278 <strlen> <== NOT EXECUTED
220e8: e0840000 add r0, r4, r0 <== NOT EXECUTED
220ec: e5860000 str r0, [r6] <== NOT EXECUTED
while (*name != path)
220f0: ea000000 b 220f8 <rtems_rfs_rtems_eval_for_make+0x40> <== NOT EXECUTED
{
(*name)--;
if (rtems_filesystem_is_separator (**name))
{
(*name)++;
break;
220f4: e5960000 ldr r0, [r6] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
while (*name != path)
220f8: e1540000 cmp r4, r0 <== NOT EXECUTED
{
(*name)--;
220fc: e2403001 sub r3, r0, #1 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
while (*name != path)
22100: 0a000007 beq 22124 <rtems_rfs_rtems_eval_for_make+0x6c> <== NOT EXECUTED
{
(*name)--;
22104: e5863000 str r3, [r6] <== NOT EXECUTED
if (rtems_filesystem_is_separator (**name))
22108: e5500001 ldrb r0, [r0, #-1] <== NOT EXECUTED
2210c: ebff9da1 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
22110: e3500000 cmp r0, #0 <== NOT EXECUTED
22114: 0afffff6 beq 220f4 <rtems_rfs_rtems_eval_for_make+0x3c> <== NOT EXECUTED
{
(*name)++;
22118: e5963000 ldr r3, [r6] <== NOT EXECUTED
2211c: e2833001 add r3, r3, #1 <== NOT EXECUTED
22120: e5863000 str r3, [r6] <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
22124: e1a00004 mov r0, r4 <== NOT EXECUTED
22128: eb00a452 bl 4b278 <strlen> <== NOT EXECUTED
2212c: e1a01000 mov r1, r0 <== NOT EXECUTED
22130: e1a00004 mov r0, r4 <== NOT EXECUTED
22134: ebff9689 bl 7b60 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
22138: e595307c ldr r3, [r5, #124] ; 0x7c <== NOT EXECUTED
2213c: e3a01000 mov r1, #0 <== NOT EXECUTED
path += stripped;
22140: e0844000 add r4, r4, r0 <== NOT EXECUTED
22144: e1a02001 mov r2, r1 <== NOT EXECUTED
22148: e5930000 ldr r0, [r3] <== NOT EXECUTED
2214c: ebffa8dc bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
22150: e28d700c add r7, sp, #12 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
22154: e1a00005 mov r0, r5 <== NOT EXECUTED
22158: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
2215c: e1a02007 mov r2, r7 <== NOT EXECUTED
22160: e3a03001 mov r3, #1 <== NOT EXECUTED
22164: eb006ef2 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
22168: e2508000 subs r8, r0, #0 <== NOT EXECUTED
2216c: ca0000b5 bgt 22448 <rtems_rfs_rtems_eval_for_make+0x390> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
22170: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
22174: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
22178: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
2217c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
22180: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
22184: 0a000061 beq 22310 <rtems_rfs_rtems_eval_for_make+0x258> <== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
22188: e5963000 ldr r3, [r6] <== NOT EXECUTED
2218c: e1530004 cmp r3, r4 <== NOT EXECUTED
22190: 0a000035 beq 2226c <rtems_rfs_rtems_eval_for_make+0x1b4> <== NOT EXECUTED
22194: e3a0a000 mov sl, #0 <== NOT EXECUTED
22198: ea000007 b 221bc <rtems_rfs_rtems_eval_for_make+0x104> <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
2219c: e7d4300a ldrb r3, [r4, sl] <== NOT EXECUTED
221a0: e3530000 cmp r3, #0 <== NOT EXECUTED
221a4: 0a000009 beq 221d0 <rtems_rfs_rtems_eval_for_make+0x118> <== NOT EXECUTED
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
221a8: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
221ac: e2433001 sub r3, r3, #1 <== NOT EXECUTED
221b0: e15a0003 cmp sl, r3 <== NOT EXECUTED
221b4: 2a000005 bcs 221d0 <rtems_rfs_rtems_eval_for_make+0x118> <== NOT EXECUTED
{
node_len++;
221b8: e28aa001 add sl, sl, #1 <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
221bc: e7d4000a ldrb r0, [r4, sl] <== NOT EXECUTED
221c0: ebff9d74 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
221c4: e3500000 cmp r0, #0 <== NOT EXECUTED
* @param pathloc
* @param name
* @return int
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
221c8: e084b00a add fp, r4, sl <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
221cc: 0afffff2 beq 2219c <rtems_rfs_rtems_eval_for_make+0xe4> <== NOT EXECUTED
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
221d0: e1a0000b mov r0, fp <== NOT EXECUTED
221d4: eb00a427 bl 4b278 <strlen> <== NOT EXECUTED
221d8: e1a01000 mov r1, r0 <== NOT EXECUTED
221dc: e1a0000b mov r0, fp <== NOT EXECUTED
221e0: ebff965e bl 7b60 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
221e4: e5d42000 ldrb r2, [r4] <== NOT EXECUTED
221e8: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
221ec: e1a03000 mov r3, r0 <== NOT EXECUTED
path += stripped;
221f0: e08b8000 add r8, fp, r0 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
221f4: 0a000016 beq 22254 <rtems_rfs_rtems_eval_for_make+0x19c> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
221f8: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
221fc: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
22200: 1a000002 bne 22210 <rtems_rfs_rtems_eval_for_make+0x158> <== NOT EXECUTED
22204: e5d83001 ldrb r3, [r8, #1] <== NOT EXECUTED
22208: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
2220c: 0a00004e beq 2234c <rtems_rfs_rtems_eval_for_make+0x294> <== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
22210: e1a02004 mov r2, r4 <== NOT EXECUTED
22214: e1a0300a mov r3, sl <== NOT EXECUTED
22218: e1a00005 mov r0, r5 <== NOT EXECUTED
2221c: e1a01007 mov r1, r7 <== NOT EXECUTED
22220: e28dc03c add ip, sp, #60 ; 0x3c <== NOT EXECUTED
22224: e28de034 add lr, sp, #52 ; 0x34 <== NOT EXECUTED
22228: e88d5000 stm sp, {ip, lr} <== NOT EXECUTED
2222c: eb00639c bl 3b0a4 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
22230: e2504000 subs r4, r0, #0 <== NOT EXECUTED
22234: ca000076 bgt 22414 <rtems_rfs_rtems_eval_for_make+0x35c> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
22238: e1a00005 mov r0, r5 <== NOT EXECUTED
2223c: e1a01007 mov r1, r7 <== NOT EXECUTED
22240: eb006e97 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
22244: e2504000 subs r4, r0, #0 <== NOT EXECUTED
22248: ca000074 bgt 22420 <rtems_rfs_rtems_eval_for_make+0x368> <== NOT EXECUTED
2224c: e1a04008 mov r4, r8 <== NOT EXECUTED
22250: eaffffbf b 22154 <rtems_rfs_rtems_eval_for_make+0x9c> <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
22254: e5d40001 ldrb r0, [r4, #1] <== NOT EXECUTED
22258: e3500000 cmp r0, #0 <== NOT EXECUTED
2225c: 1a00004c bne 22394 <rtems_rfs_rtems_eval_for_make+0x2dc> <== NOT EXECUTED
{
if (*path)
22260: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
22264: e3530000 cmp r3, #0 <== NOT EXECUTED
22268: 1a000051 bne 223b4 <rtems_rfs_rtems_eval_for_make+0x2fc> <== NOT EXECUTED
2226c: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
22270: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
22274: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
22278: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
2227c: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
22280: 1a000076 bne 22460 <rtems_rfs_rtems_eval_for_make+0x3a8> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
22284: e1a00007 mov r0, r7 <== NOT EXECUTED
22288: e3a01003 mov r1, #3 <== NOT EXECUTED
2228c: eb000238 bl 22b74 <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
22290: e3500000 cmp r0, #0 <== NOT EXECUTED
22294: 0a000022 beq 22324 <rtems_rfs_rtems_eval_for_make+0x26c> <== NOT EXECUTED
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
22298: e5964000 ldr r4, [r6] <== NOT EXECUTED
2229c: e1a00004 mov r0, r4 <== NOT EXECUTED
222a0: eb00a3f4 bl 4b278 <strlen> <== NOT EXECUTED
222a4: e28dc038 add ip, sp, #56 ; 0x38 <== NOT EXECUTED
222a8: e1a03000 mov r3, r0 <== NOT EXECUTED
222ac: e1a02004 mov r2, r4 <== NOT EXECUTED
222b0: e58dc000 str ip, [sp] <== NOT EXECUTED
222b4: e1a00005 mov r0, r5 <== NOT EXECUTED
222b8: e28dc034 add ip, sp, #52 ; 0x34 <== NOT EXECUTED
222bc: e1a01007 mov r1, r7 <== NOT EXECUTED
222c0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
222c4: eb006376 bl 3b0a4 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
&node_ino, &doff);
if (rc == 0)
222c8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
222cc: 0a000081 beq 224d8 <rtems_rfs_rtems_eval_for_make+0x420> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
222d0: e3540002 cmp r4, #2 <== NOT EXECUTED
222d4: 0a00003b beq 223c8 <rtems_rfs_rtems_eval_for_make+0x310> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
222d8: e1a01007 mov r1, r7 <== NOT EXECUTED
222dc: e1a00005 mov r0, r5 <== NOT EXECUTED
222e0: eb006e6f bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
222e4: e595607c ldr r6, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
222e8: e1a00005 mov r0, r5 <== NOT EXECUTED
222ec: eb005fec bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
222f0: e5960000 ldr r0, [r6] <== NOT EXECUTED
222f4: ebffa8ba bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
222f8: eb0088d0 bl 44640 <__errno> <== NOT EXECUTED
222fc: e5804000 str r4, [r0] <== NOT EXECUTED
22300: e3e04000 mvn r4, #0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
22304: e1a00004 mov r0, r4 <== NOT EXECUTED
22308: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED
2230c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
22310: e1a00007 mov r0, r7 <== NOT EXECUTED
22314: e3a01001 mov r1, #1 <== NOT EXECUTED
22318: eb000215 bl 22b74 <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
2231c: e3500000 cmp r0, #0 <== NOT EXECUTED
22320: 1affff98 bne 22188 <rtems_rfs_rtems_eval_for_make+0xd0> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
22324: e1a01007 mov r1, r7 <== NOT EXECUTED
22328: e1a00005 mov r0, r5 <== NOT EXECUTED
2232c: eb006e5c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
22330: e1a00005 mov r0, r5 <== NOT EXECUTED
22334: ebfffbbb bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
22338: eb0088c0 bl 44640 <__errno> <== NOT EXECUTED
2233c: e3a0300d mov r3, #13 <== NOT EXECUTED
22340: e5803000 str r3, [r0] <== NOT EXECUTED
22344: e3e04000 mvn r4, #0 <== NOT EXECUTED
22348: eaffffed b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
2234c: e5d80002 ldrb r0, [r8, #2] <== NOT EXECUTED
22350: e3500000 cmp r0, #0 <== NOT EXECUTED
22354: e288b002 add fp, r8, #2 <== NOT EXECUTED
22358: 1a000036 bne 22438 <rtems_rfs_rtems_eval_for_make+0x380> <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2235c: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
22360: e3530001 cmp r3, #1 <== NOT EXECUTED
22364: 0a000047 beq 22488 <rtems_rfs_rtems_eval_for_make+0x3d0> <== NOT EXECUTED
22368: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
/*
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
2236c: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
22370: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
22374: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
22378: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
2237c: 1a00005f bne 22500 <rtems_rfs_rtems_eval_for_make+0x448> <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
22380: e1a00005 mov r0, r5 <== NOT EXECUTED
22384: e1a01007 mov r1, r7 <== NOT EXECUTED
22388: e59f2198 ldr r2, [pc, #408] ; 22528 <rtems_rfs_rtems_eval_for_make+0x470><== NOT EXECUTED
2238c: e3a03002 mov r3, #2 <== NOT EXECUTED
22390: eaffffa2 b 22220 <rtems_rfs_rtems_eval_for_make+0x168> <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
22394: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
22398: ebff9cfe bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
2239c: e3500000 cmp r0, #0 <== NOT EXECUTED
223a0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
223a4: 0affff93 beq 221f8 <rtems_rfs_rtems_eval_for_make+0x140> <== NOT EXECUTED
{
if (*path)
223a8: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
223ac: e3530000 cmp r3, #0 <== NOT EXECUTED
223b0: 0affffad beq 2226c <rtems_rfs_rtems_eval_for_make+0x1b4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
223b4: e1a00005 mov r0, r5 <== NOT EXECUTED
223b8: e1a01007 mov r1, r7 <== NOT EXECUTED
223bc: eb006e38 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
223c0: e1a04008 mov r4, r8 <== NOT EXECUTED
223c4: eaffff62 b 22154 <rtems_rfs_rtems_eval_for_make+0x9c> <== NOT EXECUTED
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
223c8: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
223cc: e5893000 str r3, [r9] <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
223d0: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
223d4: e1a01007 mov r1, r7 <== NOT EXECUTED
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
223d8: e5893004 str r3, [r9, #4] <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
223dc: e1a00009 mov r0, r9 <== NOT EXECUTED
223e0: eb0001b7 bl 22ac4 <rtems_rfs_rtems_set_handlers> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
223e4: e1a01007 mov r1, r7 <== NOT EXECUTED
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
223e8: e3500000 cmp r0, #0 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
223ec: e1a00005 mov r0, r5 <== NOT EXECUTED
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
223f0: 03a04005 moveq r4, #5 <== NOT EXECUTED
223f4: 13a04000 movne r4, #0 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
223f8: eb006e29 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
223fc: e595607c ldr r6, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22400: e1a00005 mov r0, r5 <== NOT EXECUTED
22404: eb005fa6 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
22408: e5960000 ldr r0, [r6] <== NOT EXECUTED
2240c: ebffa874 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
22410: eaffffbb b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
22414: e1a01007 mov r1, r7 <== NOT EXECUTED
22418: e1a00005 mov r0, r5 <== NOT EXECUTED
2241c: eb006e20 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
22420: e1a00005 mov r0, r5 <== NOT EXECUTED
22424: ebfffb7f bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
22428: eb008884 bl 44640 <__errno> <== NOT EXECUTED
2242c: e5804000 str r4, [r0] <== NOT EXECUTED
22430: e3e04000 mvn r4, #0 <== NOT EXECUTED
22434: eaffffb2 b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
22438: ebff9cd6 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
2243c: e3500000 cmp r0, #0 <== NOT EXECUTED
22440: 0affff72 beq 22210 <rtems_rfs_rtems_eval_for_make+0x158> <== NOT EXECUTED
22444: eaffffc4 b 2235c <rtems_rfs_rtems_eval_for_make+0x2a4> <== NOT EXECUTED
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
22448: e1a00005 mov r0, r5 <== NOT EXECUTED
2244c: ebfffb75 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: read ino", rc);
22450: eb00887a bl 44640 <__errno> <== NOT EXECUTED
22454: e3e04000 mvn r4, #0 <== NOT EXECUTED
22458: e5808000 str r8, [r0] <== NOT EXECUTED
2245c: eaffffa8 b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
22460: e1a01007 mov r1, r7 <== NOT EXECUTED
22464: e1a00005 mov r0, r5 <== NOT EXECUTED
22468: eb006e0d bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
2246c: e1a00005 mov r0, r5 <== NOT EXECUTED
22470: ebfffb6c bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
22474: eb008871 bl 44640 <__errno> <== NOT EXECUTED
22478: e3a03014 mov r3, #20 <== NOT EXECUTED
2247c: e5803000 str r3, [r0] <== NOT EXECUTED
22480: e3e04000 mvn r4, #0 <== NOT EXECUTED
22484: eaffff9e b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
22488: e1a01007 mov r1, r7 <== NOT EXECUTED
2248c: e1a00005 mov r0, r5 <== NOT EXECUTED
22490: eb006e03 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
22494: e1a00005 mov r0, r5 <== NOT EXECUTED
22498: ebfffb62 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
2249c: e599c010 ldr ip, [r9, #16] <== NOT EXECUTED
224a0: e28cc008 add ip, ip, #8 <== NOT EXECUTED
224a4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
224a8: e1a0e009 mov lr, r9 <== NOT EXECUTED
224ac: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
224b0: e59c2000 ldr r2, [ip] <== NOT EXECUTED
224b4: e58e2000 str r2, [lr] <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
224b8: e1a0000b mov r0, fp <== NOT EXECUTED
224bc: e1a01009 mov r1, r9 <== NOT EXECUTED
224c0: e1a02006 mov r2, r6 <== NOT EXECUTED
224c4: e599300c ldr r3, [r9, #12] <== NOT EXECUTED
224c8: e1a0e00f mov lr, pc <== NOT EXECUTED
224cc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
224d0: e1a04000 mov r4, r0 <== NOT EXECUTED
224d4: eaffff8a b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
224d8: e1a01007 mov r1, r7 <== NOT EXECUTED
224dc: e1a00005 mov r0, r5 <== NOT EXECUTED
224e0: eb006def bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
224e4: e1a00005 mov r0, r5 <== NOT EXECUTED
224e8: ebfffb4e bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
224ec: eb008853 bl 44640 <__errno> <== NOT EXECUTED
224f0: e3a03011 mov r3, #17 <== NOT EXECUTED
224f4: e5803000 str r3, [r0] <== NOT EXECUTED
224f8: e3e04000 mvn r4, #0 <== NOT EXECUTED
224fc: eaffff80 b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
22500: e1a01007 mov r1, r7 <== NOT EXECUTED
22504: e1a00005 mov r0, r5 <== NOT EXECUTED
22508: eb006de5 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
2250c: e1a00005 mov r0, r5 <== NOT EXECUTED
22510: ebfffb44 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
22514: eb008849 bl 44640 <__errno> <== NOT EXECUTED
22518: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2251c: e5803000 str r3, [r0] <== NOT EXECUTED
22520: e3e04000 mvn r4, #0 <== NOT EXECUTED
22524: eaffff76 b 22304 <rtems_rfs_rtems_eval_for_make+0x24c> <== NOT EXECUTED
00021524 <rtems_rfs_rtems_eval_path>:
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
21524: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
21528: e1a08003 mov r8, r3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2152c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
21530: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
21534: e5983000 ldr r3, [r8] <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
21538: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = 0;
2153c: e3a07000 mov r7, #0 <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
21540: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
21544: e58d3040 str r3, [sp, #64] ; 0x40 <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
21548: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = 0;
2154c: e58d703c str r7, [sp, #60] ; 0x3c <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
21550: e1a04000 mov r4, r0 <== NOT EXECUTED
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
21554: ebff9981 bl 7b60 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21558: e596207c ldr r2, [r6, #124] ; 0x7c <== NOT EXECUTED
2155c: e1a03000 mov r3, r0 <== NOT EXECUTED
21560: e1a01007 mov r1, r7 <== NOT EXECUTED
21564: e5920000 ldr r0, [r2] <== NOT EXECUTED
21568: e1a02007 mov r2, r7 <== NOT EXECUTED
path += stripped;
pathlen -= stripped;
2156c: e0635005 rsb r5, r3, r5 <== NOT EXECUTED
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
21570: e0844003 add r4, r4, r3 <== NOT EXECUTED
21574: ebffabd2 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
21578: e28d7014 add r7, sp, #20 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2157c: e1a00006 mov r0, r6 <== NOT EXECUTED
21580: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
21584: e1a02007 mov r2, r7 <== NOT EXECUTED
21588: e3a03001 mov r3, #1 <== NOT EXECUTED
2158c: eb0071e8 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
21590: e3500000 cmp r0, #0 <== NOT EXECUTED
21594: ca00008b bgt 217c8 <rtems_rfs_rtems_eval_path+0x2a4> <== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if ((*path == '\0') || (pathlen == 0))
21598: e5d40000 ldrb r0, [r4] <== NOT EXECUTED
2159c: e3550000 cmp r5, #0 <== NOT EXECUTED
215a0: 13500000 cmpne r0, #0 <== NOT EXECUTED
215a4: 0a00003f beq 216a8 <rtems_rfs_rtems_eval_path+0x184> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
215a8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
215ac: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
215b0: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
215b4: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
215b8: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
215bc: 0a00002b beq 21670 <rtems_rfs_rtems_eval_path+0x14c> <== NOT EXECUTED
215c0: e3a0a000 mov sl, #0 <== NOT EXECUTED
215c4: ea000009 b 215f0 <rtems_rfs_rtems_eval_path+0xcc> <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
215c8: e7d4200a ldrb r2, [r4, sl] <== NOT EXECUTED
215cc: e3550000 cmp r5, #0 <== NOT EXECUTED
215d0: 13520000 cmpne r2, #0 <== NOT EXECUTED
215d4: 0a00000a beq 21604 <rtems_rfs_rtems_eval_path+0xe0> <== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
215d8: e5962018 ldr r2, [r6, #24] <== NOT EXECUTED
215dc: e1530002 cmp r3, r2 <== NOT EXECUTED
215e0: 2a000007 bcs 21604 <rtems_rfs_rtems_eval_path+0xe0> <== NOT EXECUTED
{
path++;
pathlen--;
215e4: e7d40003 ldrb r0, [r4, r3] <== NOT EXECUTED
215e8: e2455001 sub r5, r5, #1 <== NOT EXECUTED
215ec: e1a0a003 mov sl, r3 <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
215f0: ebffa068 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
215f4: e3500000 cmp r0, #0 <== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
215f8: e28a3001 add r3, sl, #1 <== NOT EXECUTED
* @param pathlen
* @param flags
* @param pathloc
*/
int
rtems_rfs_rtems_eval_path (const char* path,
215fc: e084b00a add fp, r4, sl <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
21600: 0afffff0 beq 215c8 <rtems_rfs_rtems_eval_path+0xa4> <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
21604: e1a01005 mov r1, r5 <== NOT EXECUTED
21608: e1a0000b mov r0, fp <== NOT EXECUTED
2160c: ebff9953 bl 7b60 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
21610: e5d43000 ldrb r3, [r4] <== NOT EXECUTED
21614: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
21618: e1a09000 mov r9, r0 <== NOT EXECUTED
path += stripped;
pathlen -= stripped;
node_len += stripped;
2161c: e080300a add r3, r0, sl <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
21620: e0605005 rsb r5, r0, r5 <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
21624: e08ba000 add sl, fp, r0 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
21628: 0a000017 beq 2168c <rtems_rfs_rtems_eval_path+0x168> <== NOT EXECUTED
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2162c: e28dc040 add ip, sp, #64 ; 0x40 <== NOT EXECUTED
21630: e28de03c add lr, sp, #60 ; 0x3c <== NOT EXECUTED
21634: e0693003 rsb r3, r9, r3 <== NOT EXECUTED
21638: e1a02004 mov r2, r4 <== NOT EXECUTED
2163c: e1a00006 mov r0, r6 <== NOT EXECUTED
21640: e1a01007 mov r1, r7 <== NOT EXECUTED
21644: e88d5000 stm sp, {ip, lr} <== NOT EXECUTED
21648: eb006695 bl 3b0a4 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
2164c: e3500000 cmp r0, #0 <== NOT EXECUTED
21650: ca00004c bgt 21788 <rtems_rfs_rtems_eval_path+0x264> <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
21654: e1a00006 mov r0, r6 <== NOT EXECUTED
21658: e1a01007 mov r1, r7 <== NOT EXECUTED
2165c: eb007190 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
21660: e3500000 cmp r0, #0 <== NOT EXECUTED
21664: ca000047 bgt 21788 <rtems_rfs_rtems_eval_path+0x264> <== NOT EXECUTED
21668: e1a0400a mov r4, sl <== NOT EXECUTED
2166c: eaffffc2 b 2157c <rtems_rfs_rtems_eval_path+0x58> <== NOT EXECUTED
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
21670: e1a00007 mov r0, r7 <== NOT EXECUTED
21674: e3a01001 mov r1, #1 <== NOT EXECUTED
21678: eb00053d bl 22b74 <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
2167c: e3500000 cmp r0, #0 <== NOT EXECUTED
21680: 0a00006d beq 2183c <rtems_rfs_rtems_eval_path+0x318> <== NOT EXECUTED
21684: e5d40000 ldrb r0, [r4] <== NOT EXECUTED
21688: eaffffcc b 215c0 <rtems_rfs_rtems_eval_path+0x9c> <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2168c: e5d40001 ldrb r0, [r4, #1] <== NOT EXECUTED
21690: e3500000 cmp r0, #0 <== NOT EXECUTED
21694: e2842001 add r2, r4, #1 <== NOT EXECUTED
21698: 1a000017 bne 216fc <rtems_rfs_rtems_eval_path+0x1d8> <== NOT EXECUTED
{
if (*path)
2169c: e7db3009 ldrb r3, [fp, r9] <== NOT EXECUTED
216a0: e3530000 cmp r3, #0 <== NOT EXECUTED
216a4: 1a000032 bne 21774 <rtems_rfs_rtems_eval_path+0x250> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
216a8: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
216ac: e5883000 str r3, [r8] <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
216b0: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
216b4: e1a01007 mov r1, r7 <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
216b8: e5883004 str r3, [r8, #4] <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
216bc: e1a00008 mov r0, r8 <== NOT EXECUTED
216c0: eb0004ff bl 22ac4 <rtems_rfs_rtems_set_handlers> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
216c4: e1a01007 mov r1, r7 <== NOT EXECUTED
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
216c8: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
216cc: e1a00006 mov r0, r6 <== NOT EXECUTED
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
216d0: 03a04005 moveq r4, #5 <== NOT EXECUTED
216d4: 13a04000 movne r4, #0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
216d8: eb007171 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
216dc: e596507c ldr r5, [r6, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
216e0: e1a00006 mov r0, r6 <== NOT EXECUTED
216e4: eb0062ee bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
216e8: e5950000 ldr r0, [r5] <== NOT EXECUTED
216ec: ebffabbc bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
216f0: e1a00004 mov r0, r4 <== NOT EXECUTED
216f4: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED
216f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
216fc: e58d200c str r2, [sp, #12] <== NOT EXECUTED
21700: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
21704: ebffa023 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
21708: e3500000 cmp r0, #0 <== NOT EXECUTED
2170c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
21710: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
21714: 1affffe0 bne 2169c <rtems_rfs_rtems_eval_path+0x178> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
21718: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
2171c: e351002e cmp r1, #46 ; 0x2e <== NOT EXECUTED
21720: 1affffc1 bne 2162c <rtems_rfs_rtems_eval_path+0x108> <== NOT EXECUTED
21724: e5d22000 ldrb r2, [r2] <== NOT EXECUTED
21728: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
2172c: 1affffbe bne 2162c <rtems_rfs_rtems_eval_path+0x108> <== NOT EXECUTED
21730: e5d40002 ldrb r0, [r4, #2] <== NOT EXECUTED
21734: e3500000 cmp r0, #0 <== NOT EXECUTED
21738: 1a00001c bne 217b0 <rtems_rfs_rtems_eval_path+0x28c> <== NOT EXECUTED
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2173c: e59d2040 ldr r2, [sp, #64] ; 0x40 <== NOT EXECUTED
21740: e3520001 cmp r2, #1 <== NOT EXECUTED
21744: 0a000026 beq 217e4 <rtems_rfs_rtems_eval_path+0x2c0> <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
21748: e28dc040 add ip, sp, #64 ; 0x40 <== NOT EXECUTED
2174c: e28de03c add lr, sp, #60 ; 0x3c <== NOT EXECUTED
21750: e1a00006 mov r0, r6 <== NOT EXECUTED
21754: e1a01007 mov r1, r7 <== NOT EXECUTED
21758: e59f2104 ldr r2, [pc, #260] ; 21864 <rtems_rfs_rtems_eval_path+0x340><== NOT EXECUTED
2175c: e3a03002 mov r3, #2 <== NOT EXECUTED
21760: e88d5000 stm sp, {ip, lr} <== NOT EXECUTED
21764: eb00664e bl 3b0a4 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
if (rc > 0)
21768: e2504000 subs r4, r0, #0 <== NOT EXECUTED
2176c: daffffb8 ble 21654 <rtems_rfs_rtems_eval_path+0x130> <== NOT EXECUTED
21770: ea000005 b 2178c <rtems_rfs_rtems_eval_path+0x268> <== NOT EXECUTED
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
21774: e1a00006 mov r0, r6 <== NOT EXECUTED
21778: e1a01007 mov r1, r7 <== NOT EXECUTED
2177c: eb007148 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21780: e1a0400a mov r4, sl <== NOT EXECUTED
21784: eaffff7c b 2157c <rtems_rfs_rtems_eval_path+0x58> <== NOT EXECUTED
21788: e1a04000 mov r4, r0 <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
2178c: e1a01007 mov r1, r7 <== NOT EXECUTED
21790: e1a00006 mov r0, r6 <== NOT EXECUTED
21794: eb007142 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
21798: e1a00006 mov r0, r6 <== NOT EXECUTED
2179c: ebfffea1 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return ((errno = rc) == 0) ? 0 : -1;
217a0: eb008ba6 bl 44640 <__errno> <== NOT EXECUTED
217a4: e5804000 str r4, [r0] <== NOT EXECUTED
217a8: e3e04000 mvn r4, #0 <== NOT EXECUTED
217ac: eaffffcf b 216f0 <rtems_rfs_rtems_eval_path+0x1cc> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
217b0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
217b4: ebff9ff7 bl 9798 <rtems_filesystem_is_separator> <== NOT EXECUTED
217b8: e3500000 cmp r0, #0 <== NOT EXECUTED
217bc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
217c0: 0affff99 beq 2162c <rtems_rfs_rtems_eval_path+0x108> <== NOT EXECUTED
217c4: eaffffdc b 2173c <rtems_rfs_rtems_eval_path+0x218> <== NOT EXECUTED
217c8: e1a0a000 mov sl, r0 <== NOT EXECUTED
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
217cc: e1a00006 mov r0, r6 <== NOT EXECUTED
217d0: ebfffe94 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
217d4: eb008b99 bl 44640 <__errno> <== NOT EXECUTED
217d8: e3e04000 mvn r4, #0 <== NOT EXECUTED
217dc: e580a000 str sl, [r0] <== NOT EXECUTED
217e0: eaffffc2 b 216f0 <rtems_rfs_rtems_eval_path+0x1cc> <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
217e4: e1a01007 mov r1, r7 <== NOT EXECUTED
217e8: e1a00006 mov r0, r6 <== NOT EXECUTED
217ec: e1a09003 mov r9, r3 <== NOT EXECUTED
217f0: eb00712b bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
217f4: e1a00006 mov r0, r6 <== NOT EXECUTED
217f8: ebfffe8a bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
217fc: e598c010 ldr ip, [r8, #16] <== NOT EXECUTED
21800: e28cc008 add ip, ip, #8 <== NOT EXECUTED
21804: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
21808: e1a0e008 mov lr, r8 <== NOT EXECUTED
2180c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
21810: e59c2000 ldr r2, [ip] <== NOT EXECUTED
21814: e58e2000 str r2, [lr] <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
21818: e0891005 add r1, r9, r5 <== NOT EXECUTED
2181c: e069000a rsb r0, r9, sl <== NOT EXECUTED
21820: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
21824: e1a03008 mov r3, r8 <== NOT EXECUTED
21828: e598c00c ldr ip, [r8, #12] <== NOT EXECUTED
2182c: e1a0e00f mov lr, pc <== NOT EXECUTED
21830: e59cf000 ldr pc, [ip] <== NOT EXECUTED
21834: e1a04000 mov r4, r0 <== NOT EXECUTED
21838: eaffffac b 216f0 <rtems_rfs_rtems_eval_path+0x1cc> <== NOT EXECUTED
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
2183c: e1a01007 mov r1, r7 <== NOT EXECUTED
21840: e1a00006 mov r0, r6 <== NOT EXECUTED
21844: eb007116 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
21848: e1a00006 mov r0, r6 <== NOT EXECUTED
2184c: ebfffe75 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
21850: eb008b7a bl 44640 <__errno> <== NOT EXECUTED
21854: e3a0300d mov r3, #13 <== NOT EXECUTED
21858: e5803000 str r3, [r0] <== NOT EXECUTED
2185c: e3e04000 mvn r4, #0 <== NOT EXECUTED
21860: eaffffa2 b 216f0 <rtems_rfs_rtems_eval_path+0x1cc> <== NOT EXECUTED
00022b74 <rtems_rfs_rtems_eval_perms>:
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
22b74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
22b78: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
22b7c: e2832004 add r2, r3, #4 <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
22b80: e5d38003 ldrb r8, [r3, #3] <== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
22b84: e5d3b004 ldrb fp, [r3, #4] <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
22b88: e5d3a002 ldrb sl, [r3, #2] <== NOT EXECUTED
22b8c: e1a07001 mov r7, r1 <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
22b90: e5d24003 ldrb r4, [r2, #3] <== NOT EXECUTED
22b94: e5d25002 ldrb r5, [r2, #2] <== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
22b98: e5d29001 ldrb r9, [r2, #1] <== NOT EXECUTED
uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
#if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
22b9c: eb001a31 bl 29468 <geteuid> <== NOT EXECUTED
22ba0: e1a06000 mov r6, r0 <== NOT EXECUTED
st_gid = getegid ();
22ba4: eb001a2a bl 29454 <getegid> <== NOT EXECUTED
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
22ba8: e1a05405 lsl r5, r5, #8 <== NOT EXECUTED
22bac: e1845005 orr r5, r4, r5 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
22bb0: e1844c0b orr r4, r4, fp, lsl #24 <== NOT EXECUTED
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
22bb4: e2762001 rsbs r2, r6, #1 <== NOT EXECUTED
22bb8: 33a02000 movcc r2, #0 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
22bbc: e1849809 orr r9, r4, r9, lsl #16 <== NOT EXECUTED
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
22bc0: e3560000 cmp r6, #0 <== NOT EXECUTED
22bc4: 11560005 cmpne r6, r5 <== NOT EXECUTED
22bc8: 11a03007 movne r3, r7 <== NOT EXECUTED
flags_to_test |= flags << 6;
22bcc: 01873307 orreq r3, r7, r7, lsl #6 <== NOT EXECUTED
if ((st_uid == 0) || (st_gid == gid))
22bd0: e1500829 cmp r0, r9, lsr #16 <== NOT EXECUTED
22bd4: 03822001 orreq r2, r2, #1 <== NOT EXECUTED
flags_to_test |= flags << 3;
22bd8: e188840a orr r8, r8, sl, lsl #8 <== NOT EXECUTED
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
22bdc: e3520000 cmp r2, #0 <== NOT EXECUTED
flags_to_test |= flags << 3;
22be0: e1a08b88 lsl r8, r8, #23 <== NOT EXECUTED
22be4: 11833187 orrne r3, r3, r7, lsl #3 <== NOT EXECUTED
22be8: e1a08ba8 lsr r8, r8, #23 <== NOT EXECUTED
22bec: e1180003 tst r8, r3 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
22bf0: 03a00000 moveq r0, #0 <== NOT EXECUTED
22bf4: 13a00001 movne r0, #1 <== NOT EXECUTED
22bf8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00022710 <rtems_rfs_rtems_fchmod>:
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
22710: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
22714: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
22718: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2271c: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
22720: e5907000 ldr r7, [r0] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
22724: e1a06001 mov r6, r1 <== NOT EXECUTED
22728: e3a01000 mov r1, #0 <== NOT EXECUTED
2272c: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
22730: e1a02001 mov r2, r1 <== NOT EXECUTED
22734: e5930000 ldr r0, [r3] <== NOT EXECUTED
22738: ebffa761 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2273c: e1a01007 mov r1, r7 <== NOT EXECUTED
22740: e1a00004 mov r0, r4 <== NOT EXECUTED
22744: e1a0200d mov r2, sp <== NOT EXECUTED
22748: e3a03001 mov r3, #1 <== NOT EXECUTED
2274c: eb006d78 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
22750: e2507000 subs r7, r0, #0 <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
22754: e1a0500d mov r5, sp <== NOT EXECUTED
if (rc)
22758: 0a000009 beq 22784 <rtems_rfs_rtems_fchmod+0x74> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2275c: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22760: e1a00004 mov r0, r4 <== NOT EXECUTED
22764: eb005ece bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
22768: e5950000 ldr r0, [r5] <== NOT EXECUTED
2276c: ebffa79c bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
22770: eb0087b2 bl 44640 <__errno> <== NOT EXECUTED
22774: e5807000 str r7, [r0] <== NOT EXECUTED
22778: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2277c: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
22780: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
22784: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
22788: e5d37003 ldrb r7, [r3, #3] <== NOT EXECUTED
2278c: e5d38002 ldrb r8, [r3, #2] <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
22790: eb001b34 bl 29468 <geteuid> <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
22794: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
22798: e2823004 add r3, r2, #4 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
2279c: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
227a0: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
227a4: e1813403 orr r3, r1, r3, lsl #8 <== NOT EXECUTED
227a8: e1500003 cmp r0, r3 <== NOT EXECUTED
227ac: 0a000001 beq 227b8 <rtems_rfs_rtems_fchmod+0xa8> <== NOT EXECUTED
227b0: e3500000 cmp r0, #0 <== NOT EXECUTED
227b4: 1a000020 bne 2283c <rtems_rfs_rtems_fchmod+0x12c> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
227b8: e1877408 orr r7, r7, r8, lsl #8 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: not owner", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
227bc: e2077a0f and r7, r7, #61440 ; 0xf000 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
227c0: e3c66a0f bic r6, r6, #61440 ; 0xf000 <== NOT EXECUTED
227c4: e1876006 orr r6, r7, r6 <== NOT EXECUTED
227c8: e1a06806 lsl r6, r6, #16 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
227cc: e1a03c26 lsr r3, r6, #24 <== NOT EXECUTED
227d0: e5c23002 strb r3, [r2, #2] <== NOT EXECUTED
227d4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
227d8: e1a06826 lsr r6, r6, #16 <== NOT EXECUTED
227dc: e5c36003 strb r6, [r3, #3] <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
227e0: e1a0100d mov r1, sp <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
227e4: e3a03001 mov r3, #1 <== NOT EXECUTED
227e8: e1a00004 mov r0, r4 <== NOT EXECUTED
227ec: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
227f0: eb006d2b bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
227f4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
227f8: da000008 ble 22820 <rtems_rfs_rtems_fchmod+0x110> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
227fc: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22800: e1a00004 mov r0, r4 <== NOT EXECUTED
22804: eb005ea6 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22808: e5960000 ldr r0, [r6] <== NOT EXECUTED
2280c: ebffa774 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
22810: eb00878a bl 44640 <__errno> <== NOT EXECUTED
22814: e5805000 str r5, [r0] <== NOT EXECUTED
22818: e3e00000 mvn r0, #0 <== NOT EXECUTED
2281c: eaffffd6 b 2277c <rtems_rfs_rtems_fchmod+0x6c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22820: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22824: e1a00004 mov r0, r4 <== NOT EXECUTED
22828: eb005e9d bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2282c: e5950000 ldr r0, [r5] <== NOT EXECUTED
22830: ebffa76b bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
22834: e3a00000 mov r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
22838: eaffffcf b 2277c <rtems_rfs_rtems_fchmod+0x6c> <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
2283c: e1a0100d mov r1, sp <== NOT EXECUTED
22840: e1a00004 mov r0, r4 <== NOT EXECUTED
22844: eb006d16 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
22848: e1a00004 mov r0, r4 <== NOT EXECUTED
2284c: ebfffa75 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: not owner", EPERM);
22850: eb00877a bl 44640 <__errno> <== NOT EXECUTED
22854: e3a03001 mov r3, #1 <== NOT EXECUTED
22858: e5803000 str r3, [r0] <== NOT EXECUTED
2285c: e3e00000 mvn r0, #0 <== NOT EXECUTED
22860: eaffffc5 b 2277c <rtems_rfs_rtems_fchmod+0x6c> <== NOT EXECUTED
00021220 <rtems_rfs_rtems_fcntl>:
int
rtems_rfs_rtems_fcntl (int cmd,
rtems_libio_t* iop)
{
return 0;
}
21220: e3a00000 mov r0, #0 <== NOT EXECUTED
21224: e12fff1e bx lr <== NOT EXECUTED
000214f8 <rtems_rfs_rtems_fdatasync>:
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
214f8: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
214fc: e92d4010 push {r4, lr} <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
21500: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
21504: eb006378 bl 3a2ec <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
21508: e2504000 subs r4, r0, #0 <== NOT EXECUTED
2150c: 01a00004 moveq r0, r4 <== NOT EXECUTED
21510: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
21514: eb008c49 bl 44640 <__errno> <== NOT EXECUTED
21518: e5804000 str r4, [r0] <== NOT EXECUTED
2151c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0;
}
21520: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003f014 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
3f014: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
3f018: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
3f01c: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f020: e5934098 ldr r4, [r3, #152] ; 0x98 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3f024: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
3f028: e3a01000 mov r1, #0 <== NOT EXECUTED
3f02c: e1a02001 mov r2, r1 <== NOT EXECUTED
3f030: e5930000 ldr r0, [r3] <== NOT EXECUTED
3f034: ebff3522 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
3f038: e1a01005 mov r1, r5 <== NOT EXECUTED
3f03c: e1a00004 mov r0, r4 <== NOT EXECUTED
3f040: ebfff306 bl 3bc60 <rtems_rfs_file_close> <== NOT EXECUTED
if (rc > 0)
3f044: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3f048: da000002 ble 3f058 <rtems_rfs_rtems_file_close+0x44> <== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
3f04c: eb00157b bl 44640 <__errno> <== NOT EXECUTED
3f050: e5805000 str r5, [r0] <== NOT EXECUTED
3f054: e3e05000 mvn r5, #0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f058: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f05c: e1a00004 mov r0, r4 <== NOT EXECUTED
3f060: ebffec8f bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3f064: e5960000 ldr r0, [r6] <== NOT EXECUTED
3f068: ebff355d bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
3f06c: e1a00005 mov r0, r5 <== NOT EXECUTED
3f070: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003f074 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
3f074: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
3f078: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3f07c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f080: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3f084: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
3f088: e1a06001 mov r6, r1 <== NOT EXECUTED
3f08c: e3a01000 mov r1, #0 <== NOT EXECUTED
3f090: e1a07002 mov r7, r2 <== NOT EXECUTED
3f094: e1a05000 mov r5, r0 <== NOT EXECUTED
3f098: e1a02001 mov r2, r1 <== NOT EXECUTED
3f09c: e5930000 ldr r0, [r3] <== NOT EXECUTED
3f0a0: ebff3507 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
3f0a4: e1a01006 mov r1, r6 <== NOT EXECUTED
3f0a8: e1a00004 mov r0, r4 <== NOT EXECUTED
3f0ac: e1a02007 mov r2, r7 <== NOT EXECUTED
3f0b0: ebfff17f bl 3b6b4 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
3f0b4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3f0b8: 0a000002 beq 3f0c8 <rtems_rfs_rtems_file_ftruncate+0x54> <== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
3f0bc: eb00155f bl 44640 <__errno> <== NOT EXECUTED
3f0c0: e5806000 str r6, [r0] <== NOT EXECUTED
3f0c4: e3e06000 mvn r6, #0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
3f0c8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f0cc: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3f0d0: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3f0d4: ebffe8ac bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3f0d8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f0dc: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f0e0: e593407c ldr r4, [r3, #124] ; 0x7c <== NOT EXECUTED
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
3f0e4: e9850003 stmib r5, {r0, r1} <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f0e8: e1a00003 mov r0, r3 <== NOT EXECUTED
3f0ec: ebffec6c bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3f0f0: e5940000 ldr r0, [r4] <== NOT EXECUTED
3f0f4: ebff353a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
}
3f0f8: e1a00006 mov r0, r6 <== NOT EXECUTED
3f0fc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0003eedc <rtems_rfs_rtems_file_ioctl>:
int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
3eedc: e3a00000 mov r0, #0 <== NOT EXECUTED
3eee0: e12fff1e bx lr <== NOT EXECUTED
0003f2c0 <rtems_rfs_rtems_file_lseek>:
*/
rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
3f2c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
3f2c4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3f2c8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f2cc: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3f2d0: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
3f2d4: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
3f2d8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
3f2dc: e1a05000 mov r5, r0 <== NOT EXECUTED
3f2e0: e1a02001 mov r2, r1 <== NOT EXECUTED
3f2e4: e5930000 ldr r0, [r3] <== NOT EXECUTED
3f2e8: ebff3475 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
3f2ec: e285200c add r2, r5, #12 <== NOT EXECUTED
3f2f0: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
3f2f4: e28d3008 add r3, sp, #8 <== NOT EXECUTED
3f2f8: e9230006 stmdb r3!, {r1, r2} <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
3f2fc: e1a00004 mov r0, r4 <== NOT EXECUTED
3f300: e1a0300d mov r3, sp <== NOT EXECUTED
3f304: ebfff1b1 bl 3b9d0 <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
3f308: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3f30c: 0a00000d beq 3f348 <rtems_rfs_rtems_file_lseek+0x88> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3f310: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f314: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f318: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f31c: ebffebe0 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3f320: e5940000 ldr r0, [r4] <== NOT EXECUTED
3f324: ebff34ae bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
3f328: eb0014c4 bl 44640 <__errno> <== NOT EXECUTED
3f32c: e5806000 str r6, [r0] <== NOT EXECUTED
3f330: e3e03000 mvn r3, #0 <== NOT EXECUTED
3f334: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
}
3f338: e1a01004 mov r1, r4 <== NOT EXECUTED
3f33c: e1a00003 mov r0, r3 <== NOT EXECUTED
3f340: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3f344: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3f348: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3f34c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f350: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f354: ebffebd2 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3f358: e5940000 ldr r0, [r4] <== NOT EXECUTED
3f35c: ebff34a0 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return iop->offset;
3f360: e285400c add r4, r5, #12 <== NOT EXECUTED
3f364: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
3f368: eafffff2 b 3f338 <rtems_rfs_rtems_file_lseek+0x78> <== NOT EXECUTED
0003f36c <rtems_rfs_rtems_file_open>:
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3f36c: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
3f370: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3f374: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3f378: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
3f37c: e3a01000 mov r1, #0 <== NOT EXECUTED
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
3f380: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3f384: e1a02001 mov r2, r1 <== NOT EXECUTED
3f388: e1a05000 mov r5, r0 <== NOT EXECUTED
3f38c: e5930000 ldr r0, [r3] <== NOT EXECUTED
3f390: ebff344b bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
3f394: e1a00004 mov r0, r4 <== NOT EXECUTED
3f398: e5951038 ldr r1, [r5, #56] ; 0x38 <== NOT EXECUTED
3f39c: e3a02000 mov r2, #0 <== NOT EXECUTED
3f3a0: e1a0300d mov r3, sp <== NOT EXECUTED
3f3a4: ebfff29c bl 3be1c <rtems_rfs_file_open> <== NOT EXECUTED
if (rc > 0)
3f3a8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3f3ac: da000009 ble 3f3d8 <rtems_rfs_rtems_file_open+0x6c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f3b0: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f3b4: e1a00004 mov r0, r4 <== NOT EXECUTED
3f3b8: ebffebb9 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3f3bc: e5950000 ldr r0, [r5] <== NOT EXECUTED
3f3c0: ebff3487 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
3f3c4: eb00149d bl 44640 <__errno> <== NOT EXECUTED
3f3c8: e5806000 str r6, [r0] <== NOT EXECUTED
3f3cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
iop->file_info = file;
rtems_rfs_rtems_unlock (fs);
return 0;
}
3f3d0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3f3d4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
3f3d8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f3dc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3f3e0: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3f3e4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3f3e8: ebffe7e7 bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
iop->file_info = file;
3f3ec: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3f3f0: e5853038 str r3, [r5, #56] ; 0x38 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f3f4: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
3f3f8: e9850003 stmib r5, {r0, r1} <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f3fc: e1a00004 mov r0, r4 <== NOT EXECUTED
3f400: ebffeba7 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3f404: e5960000 ldr r0, [r6] <== NOT EXECUTED
3f408: ebff3475 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
3f40c: e3a00000 mov r0, #0 <== NOT EXECUTED
3f410: eaffffee b 3f3d0 <rtems_rfs_rtems_file_open+0x64> <== NOT EXECUTED
0003eee4 <rtems_rfs_rtems_file_read>:
*/
ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
3eee4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
3eee8: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3eeec: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3eef0: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3eef4: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
*/
ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
3eef8: e1a07001 mov r7, r1 <== NOT EXECUTED
3eefc: e3a01000 mov r1, #0 <== NOT EXECUTED
3ef00: e1a05000 mov r5, r0 <== NOT EXECUTED
3ef04: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3ef08: e5930000 ldr r0, [r3] <== NOT EXECUTED
3ef0c: e1a06002 mov r6, r2 <== NOT EXECUTED
3ef10: e1a02001 mov r2, r1 <== NOT EXECUTED
3ef14: ebff356a bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
3ef18: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3ef1c: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3ef20: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
3ef24: e285500c add r5, r5, #12 <== NOT EXECUTED
3ef28: e8950120 ldm r5, {r5, r8} <== NOT EXECUTED
3ef2c: ebffe916 bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
3ef30: e1510008 cmp r1, r8 <== NOT EXECUTED
3ef34: 9a00002d bls 3eff0 <rtems_rfs_rtems_file_read+0x10c> <== NOT EXECUTED
{
while (count)
3ef38: e3560000 cmp r6, #0 <== NOT EXECUTED
void* buffer,
size_t count)
{
rtems_rfs_file_handle* file = iop->file_info;
rtems_rfs_pos pos;
uint8_t* data = buffer;
3ef3c: 13a08000 movne r8, #0 <== NOT EXECUTED
3ef40: 11a0a00d movne sl, sp <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
3ef44: 1a000004 bne 3ef5c <rtems_rfs_rtems_file_read+0x78> <== NOT EXECUTED
3ef48: ea00002b b 3effc <rtems_rfs_rtems_file_read+0x118> <== NOT EXECUTED
3ef4c: e0566005 subs r6, r6, r5 <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
read += size;
3ef50: e0888005 add r8, r8, r5 <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
3ef54: 0a00001c beq 3efcc <rtems_rfs_rtems_file_read+0xe8> <== NOT EXECUTED
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
3ef58: e0877005 add r7, r7, r5 <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
3ef5c: e1a0100d mov r1, sp <== NOT EXECUTED
3ef60: e1a00004 mov r0, r4 <== NOT EXECUTED
3ef64: e3a02001 mov r2, #1 <== NOT EXECUTED
3ef68: ebfff16f bl 3b52c <rtems_rfs_file_io_start> <== NOT EXECUTED
if (rc > 0)
3ef6c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
3ef70: e1a00007 mov r0, r7 <== NOT EXECUTED
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
3ef74: ca000022 bgt 3f004 <rtems_rfs_rtems_file_read+0x120> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
3ef78: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3ef7c: e3520000 cmp r2, #0 <== NOT EXECUTED
3ef80: 0a000011 beq 3efcc <rtems_rfs_rtems_file_read+0xe8> <== NOT EXECUTED
break;
if (size > count)
3ef84: e1520006 cmp r2, r6 <== NOT EXECUTED
size = count;
3ef88: 858d6000 strhi r6, [sp] <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
3ef8c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3ef90: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
3ef94: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
if (size == 0)
break;
if (size > count)
size = count;
3ef98: 81a02006 movhi r2, r6 <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
3ef9c: e0811003 add r1, r1, r3 <== NOT EXECUTED
3efa0: eb002256 bl 47900 <memcpy> <== NOT EXECUTED
data += size;
3efa4: e59d5000 ldr r5, [sp] <== NOT EXECUTED
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
3efa8: e1a00004 mov r0, r4 <== NOT EXECUTED
3efac: e1a01005 mov r1, r5 <== NOT EXECUTED
3efb0: e3a02001 mov r2, #1 <== NOT EXECUTED
3efb4: ebfff2ba bl 3baa4 <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc > 0)
3efb8: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3efbc: daffffe2 ble 3ef4c <rtems_rfs_rtems_file_read+0x68> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
3efc0: eb00159e bl 44640 <__errno> <== NOT EXECUTED
3efc4: e5809000 str r9, [r0] <== NOT EXECUTED
3efc8: e3e08000 mvn r8, #0 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3efcc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3efd0: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3efd4: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3efd8: ebffecb1 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3efdc: e5940000 ldr r0, [r4] <== NOT EXECUTED
3efe0: ebff357f bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return read;
}
3efe4: e1a00008 mov r0, r8 <== NOT EXECUTED
3efe8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3efec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
3eff0: 1a000001 bne 3effc <rtems_rfs_rtems_file_read+0x118> <== NOT EXECUTED
3eff4: e1500005 cmp r0, r5 <== NOT EXECUTED
3eff8: 8affffce bhi 3ef38 <rtems_rfs_rtems_file_read+0x54> <== NOT EXECUTED
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
3effc: e3a08000 mov r8, #0 <== NOT EXECUTED
3f000: eafffff1 b 3efcc <rtems_rfs_rtems_file_read+0xe8> <== NOT EXECUTED
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
3f004: eb00158d bl 44640 <__errno> <== NOT EXECUTED
3f008: e3e08000 mvn r8, #0 <== NOT EXECUTED
3f00c: e5805000 str r5, [r0] <== NOT EXECUTED
3f010: eaffffed b 3efcc <rtems_rfs_rtems_file_read+0xe8> <== NOT EXECUTED
0003f100 <rtems_rfs_rtems_file_write>:
*/
ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
3f100: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
3f104: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
3f108: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f10c: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3f110: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
*/
ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
3f114: e1a07001 mov r7, r1 <== NOT EXECUTED
3f118: e3a01000 mov r1, #0 <== NOT EXECUTED
3f11c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
3f120: e1a09000 mov r9, r0 <== NOT EXECUTED
3f124: e1a04002 mov r4, r2 <== NOT EXECUTED
3f128: e5930000 ldr r0, [r3] <== NOT EXECUTED
3f12c: e1a02001 mov r2, r1 <== NOT EXECUTED
3f130: ebff34e3 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
3f134: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f138: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3f13c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
3f140: e289b00c add fp, r9, #12 <== NOT EXECUTED
3f144: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED
3f148: ebffe88f bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
3f14c: e151000b cmp r1, fp <== NOT EXECUTED
3f150: 8a000008 bhi 3f178 <rtems_rfs_rtems_file_write+0x78> <== NOT EXECUTED
3f154: 0a000041 beq 3f260 <rtems_rfs_rtems_file_write+0x160> <== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
3f158: e3a01001 mov r1, #1 <== NOT EXECUTED
3f15c: e091100a adds r1, r1, sl <== NOT EXECUTED
3f160: e3a02000 mov r2, #0 <== NOT EXECUTED
3f164: e0a2200b adc r2, r2, fp <== NOT EXECUTED
3f168: e1a00005 mov r0, r5 <== NOT EXECUTED
3f16c: ebfff150 bl 3b6b4 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
3f170: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3f174: 1a000043 bne 3f288 <rtems_rfs_rtems_file_write+0x188> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
rtems_rfs_file_set_bpos (file, pos);
3f178: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f17c: e1a0100a mov r1, sl <== NOT EXECUTED
3f180: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3f184: e1a0200b mov r2, fp <== NOT EXECUTED
3f188: e2853010 add r3, r5, #16 <== NOT EXECUTED
3f18c: ebffe84f bl 392d0 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
while (count)
3f190: e3540000 cmp r4, #0 <== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
3f194: 01a08004 moveq r8, r4 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
3f198: 0a000021 beq 3f224 <rtems_rfs_rtems_file_write+0x124> <== NOT EXECUTED
const void* buffer,
size_t count)
{
rtems_rfs_file_handle* file = iop->file_info;
rtems_rfs_pos pos;
const uint8_t* data = buffer;
3f19c: e3a08000 mov r8, #0 <== NOT EXECUTED
3f1a0: e1a0a00d mov sl, sp <== NOT EXECUTED
3f1a4: ea000003 b 3f1b8 <rtems_rfs_rtems_file_write+0xb8> <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
3f1a8: e0544006 subs r4, r4, r6 <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
count -= size;
write += size;
3f1ac: e0888006 add r8, r8, r6 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
3f1b0: 0a00001b beq 3f224 <rtems_rfs_rtems_file_write+0x124> <== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
3f1b4: e0877006 add r7, r7, r6 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
3f1b8: e1a0100d mov r1, sp <== NOT EXECUTED
3f1bc: e1a00005 mov r0, r5 <== NOT EXECUTED
3f1c0: e3a02000 mov r2, #0 <== NOT EXECUTED
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
3f1c4: e58d4000 str r4, [sp] <== NOT EXECUTED
rc = rtems_rfs_file_io_start (file, &size, false);
3f1c8: ebfff0d7 bl 3b52c <rtems_rfs_file_io_start> <== NOT EXECUTED
if (rc)
3f1cc: e2506000 subs r6, r0, #0 <== NOT EXECUTED
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
3f1d0: e1a01007 mov r1, r7 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
3f1d4: 1a000035 bne 3f2b0 <rtems_rfs_rtems_file_write+0x1b0> <== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
3f1d8: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3f1dc: e1520004 cmp r2, r4 <== NOT EXECUTED
size = count;
3f1e0: 858d4000 strhi r4, [sp] <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
3f1e4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
3f1e8: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3f1ec: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
size = count;
3f1f0: 81a02004 movhi r2, r4 <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
3f1f4: e0800003 add r0, r0, r3 <== NOT EXECUTED
3f1f8: eb0021c0 bl 47900 <memcpy> <== NOT EXECUTED
data += size;
3f1fc: e59d6000 ldr r6, [sp] <== NOT EXECUTED
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
3f200: e1a00005 mov r0, r5 <== NOT EXECUTED
3f204: e1a01006 mov r1, r6 <== NOT EXECUTED
3f208: e3a02000 mov r2, #0 <== NOT EXECUTED
3f20c: ebfff224 bl 3baa4 <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc)
3f210: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3f214: 0affffe3 beq 3f1a8 <rtems_rfs_rtems_file_write+0xa8> <== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
3f218: eb001508 bl 44640 <__errno> <== NOT EXECUTED
3f21c: e580b000 str fp, [r0] <== NOT EXECUTED
3f220: e3e08000 mvn r8, #0 <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
3f224: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f228: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3f22c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3f230: ebffe855 bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3f234: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f238: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f23c: e593407c ldr r4, [r3, #124] ; 0x7c <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
3f240: e9890003 stmib r9, {r0, r1} <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f244: e1a00003 mov r0, r3 <== NOT EXECUTED
3f248: ebffec15 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
3f24c: e5940000 ldr r0, [r4] <== NOT EXECUTED
3f250: ebff34e3 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
3f254: e1a00008 mov r0, r8 <== NOT EXECUTED
3f258: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3f25c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
3f260: e150000a cmp r0, sl <== NOT EXECUTED
3f264: 8affffc3 bhi 3f178 <rtems_rfs_rtems_file_write+0x78> <== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
3f268: e3a01001 mov r1, #1 <== NOT EXECUTED
3f26c: e091100a adds r1, r1, sl <== NOT EXECUTED
3f270: e3a02000 mov r2, #0 <== NOT EXECUTED
3f274: e0a2200b adc r2, r2, fp <== NOT EXECUTED
3f278: e1a00005 mov r0, r5 <== NOT EXECUTED
3f27c: ebfff10c bl 3b6b4 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
3f280: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3f284: 0affffbb beq 3f178 <rtems_rfs_rtems_file_write+0x78> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3f288: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
3f28c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
3f290: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
3f294: ebffec02 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
3f298: e5940000 ldr r0, [r4] <== NOT EXECUTED
3f29c: ebff34d0 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
3f2a0: eb0014e6 bl 44640 <__errno> <== NOT EXECUTED
3f2a4: e3e08000 mvn r8, #0 <== NOT EXECUTED
3f2a8: e5806000 str r6, [r0] <== NOT EXECUTED
3f2ac: eaffffe8 b 3f254 <rtems_rfs_rtems_file_write+0x154> <== NOT EXECUTED
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
3f2b0: eb0014e2 bl 44640 <__errno> <== NOT EXECUTED
3f2b4: e3e08000 mvn r8, #0 <== NOT EXECUTED
3f2b8: e5806000 str r6, [r0] <== NOT EXECUTED
3f2bc: eaffffd8 b 3f224 <rtems_rfs_rtems_file_write+0x124> <== NOT EXECUTED
00021218 <rtems_rfs_rtems_freenodinfo>:
int
rtems_rfs_rtems_freenodinfo (rtems_filesystem_location_info_t* pathloc)
{
return 0;
}
21218: e3a00000 mov r0, #0 <== NOT EXECUTED
2121c: e12fff1e bx lr <== NOT EXECUTED
00022ab4 <rtems_rfs_rtems_imode>:
return true;
}
uint16_t
rtems_rfs_rtems_imode (mode_t mode)
{
22ab4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return mode;
}
22ab8: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
22abc: e12fff1e bx lr <== NOT EXECUTED
00021280 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
21280: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
21284: e2514000 subs r4, r1, #0 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
21288: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
2128c: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
21290: 01a06004 moveq r6, r4 <== NOT EXECUTED
21294: 03a07005 moveq r7, #5 <== NOT EXECUTED
21298: 0a000025 beq 21334 <rtems_rfs_rtems_initialise+0xb4> <== NOT EXECUTED
2129c: e3a07005 mov r7, #5 <== NOT EXECUTED
212a0: e3a06000 mov r6, #0 <== NOT EXECUTED
{
printf ("options=%s\n", options);
212a4: e1a01004 mov r1, r4 <== NOT EXECUTED
212a8: e59f0190 ldr r0, [pc, #400] ; 21440 <rtems_rfs_rtems_initialise+0x1c0><== NOT EXECUTED
212ac: eb009e41 bl 48bb8 <printf> <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
212b0: e59f118c ldr r1, [pc, #396] ; 21444 <rtems_rfs_rtems_initialise+0x1c4><== NOT EXECUTED
212b4: e3a0200c mov r2, #12 <== NOT EXECUTED
212b8: e1a00004 mov r0, r4 <== NOT EXECUTED
212bc: eb00a837 bl 4b3a0 <strncmp> <== NOT EXECUTED
212c0: e3500000 cmp r0, #0 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
212c4: e59f117c ldr r1, [pc, #380] ; 21448 <rtems_rfs_rtems_initialise+0x1c8><== NOT EXECUTED
212c8: e3a0200e mov r2, #14 <== NOT EXECUTED
212cc: e1a00004 mov r0, r4 <== NOT EXECUTED
while (options)
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
212d0: 03866001 orreq r6, r6, #1 <== NOT EXECUTED
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
212d4: 0a00000d beq 21310 <rtems_rfs_rtems_initialise+0x90> <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
212d8: eb00a830 bl 4b3a0 <strncmp> <== NOT EXECUTED
212dc: e3500000 cmp r0, #0 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
212e0: e59f1164 ldr r1, [pc, #356] ; 2144c <rtems_rfs_rtems_initialise+0x1cc><== NOT EXECUTED
212e4: e3a0200d mov r2, #13 <== NOT EXECUTED
212e8: e1a00004 mov r0, r4 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
212ec: 03866002 orreq r6, r6, #2 <== NOT EXECUTED
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
212f0: 0a000006 beq 21310 <rtems_rfs_rtems_initialise+0x90> <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
212f4: eb00a829 bl 4b3a0 <strncmp> <== NOT EXECUTED
212f8: e2501000 subs r1, r0, #0 <== NOT EXECUTED
212fc: 1a00003a bne 213ec <rtems_rfs_rtems_initialise+0x16c> <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
21300: e284000e add r0, r4, #14 <== NOT EXECUTED
21304: e1a02001 mov r2, r1 <== NOT EXECUTED
21308: eb00acf6 bl 4c6e8 <strtoul> <== NOT EXECUTED
2130c: e1a07000 mov r7, r0 <== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
21310: e1a00004 mov r0, r4 <== NOT EXECUTED
21314: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED
21318: eb00a507 bl 4a73c <strchr> <== NOT EXECUTED
if (options)
2131c: e3500000 cmp r0, #0 <== NOT EXECUTED
21320: 0a000003 beq 21334 <rtems_rfs_rtems_initialise+0xb4> <== NOT EXECUTED
{
++options;
if (*options == '\0')
21324: e5d03001 ldrb r3, [r0, #1] <== NOT EXECUTED
21328: e3530000 cmp r3, #0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
if (options)
{
++options;
2132c: e2804001 add r4, r0, #1 <== NOT EXECUTED
if (*options == '\0')
21330: 1affffdb bne 212a4 <rtems_rfs_rtems_initialise+0x24> <== NOT EXECUTED
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
21334: e3a00004 mov r0, #4 <== NOT EXECUTED
21338: ebff9c50 bl 8480 <malloc> <== NOT EXECUTED
if (!rtems)
2133c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
21340: 0a000039 beq 2142c <rtems_rfs_rtems_initialise+0x1ac> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
21344: e3a08000 mov r8, #0 <== NOT EXECUTED
21348: e5848000 str r8, [r4] <== NOT EXECUTED
rc = rtems_rfs_mutex_create (&rtems->access);
2134c: eb00755a bl 3e8bc <rtems_rfs_mutex_create> <== NOT EXECUTED
if (rc > 0)
21350: e250a000 subs sl, r0, #0 <== NOT EXECUTED
21354: da000006 ble 21374 <rtems_rfs_rtems_initialise+0xf4> <== NOT EXECUTED
{
free (rtems);
21358: e1a00004 mov r0, r4 <== NOT EXECUTED
2135c: ebff9a83 bl 7d70 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
21360: eb008cb6 bl 44640 <__errno> <== NOT EXECUTED
21364: e580a000 str sl, [r0] <== NOT EXECUTED
21368: e3e00000 mvn r0, #0 <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
2136c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
21370: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21374: e1a01008 mov r1, r8 <== NOT EXECUTED
21378: e5940000 ldr r0, [r4] <== NOT EXECUTED
2137c: e1a02008 mov r2, r8 <== NOT EXECUTED
21380: ebffac4f bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
21384: e3500000 cmp r0, #0 <== NOT EXECUTED
21388: 1a00000e bne 213c8 <rtems_rfs_rtems_initialise+0x148> <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
2138c: e5950070 ldr r0, [r5, #112] ; 0x70 <== NOT EXECUTED
21390: e1a02006 mov r2, r6 <== NOT EXECUTED
21394: e28dc004 add ip, sp, #4 <== NOT EXECUTED
21398: e1a03007 mov r3, r7 <== NOT EXECUTED
2139c: e1a01004 mov r1, r4 <== NOT EXECUTED
213a0: e58dc000 str ip, [sp] <== NOT EXECUTED
213a4: eb006b5a bl 3c114 <rtems_rfs_fs_open> <== NOT EXECUTED
if (rc)
213a8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
213ac: 0a000013 beq 21400 <rtems_rfs_rtems_initialise+0x180> <== NOT EXECUTED
{
free (rtems);
213b0: e1a00004 mov r0, r4 <== NOT EXECUTED
213b4: ebff9a6d bl 7d70 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
213b8: eb008ca0 bl 44640 <__errno> <== NOT EXECUTED
213bc: e5806000 str r6, [r0] <== NOT EXECUTED
213c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
213c4: eaffffe8 b 2136c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
213c8: e1a00004 mov r0, r4 <== NOT EXECUTED
213cc: eb007533 bl 3e8a0 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
213d0: e1a00004 mov r0, r4 <== NOT EXECUTED
213d4: ebff9a65 bl 7d70 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
213d8: eb008c98 bl 44640 <__errno> <== NOT EXECUTED
213dc: e3a03005 mov r3, #5 <== NOT EXECUTED
213e0: e5803000 str r3, [r0] <== NOT EXECUTED
213e4: e3e00000 mvn r0, #0 <== NOT EXECUTED
213e8: eaffffdf b 2136c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
213ec: eb008c93 bl 44640 <__errno> <== NOT EXECUTED
213f0: e3a03016 mov r3, #22 <== NOT EXECUTED
213f4: e5803000 str r3, [r0] <== NOT EXECUTED
213f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
213fc: eaffffda b 2136c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
21400: e59f3048 ldr r3, [pc, #72] ; 21450 <rtems_rfs_rtems_initialise+0x1d0><== NOT EXECUTED
21404: e5853028 str r3, [r5, #40] ; 0x28 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
21408: e3a03001 mov r3, #1 <== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
2140c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
21410: e585301c str r3, [r5, #28] <== NOT EXECUTED
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
21414: e59f3038 ldr r3, [pc, #56] ; 21454 <rtems_rfs_rtems_initialise+0x1d4><== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
21418: e5850034 str r0, [r5, #52] ; 0x34 <== NOT EXECUTED
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
2141c: e5853024 str r3, [r5, #36] ; 0x24 <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
21420: ebffff80 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
21424: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
21428: eaffffcf b 2136c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
2142c: eb008c83 bl 44640 <__errno> <== NOT EXECUTED
21430: e3a0300c mov r3, #12 <== NOT EXECUTED
21434: e5803000 str r3, [r0] <== NOT EXECUTED
21438: e3e00000 mvn r0, #0 <== NOT EXECUTED
2143c: eaffffca b 2136c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
00021afc <rtems_rfs_rtems_link>:
*/
int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
21afc: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
21b00: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
21b04: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
21b08: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21b0c: e594007c ldr r0, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
21b10: e5917000 ldr r7, [r1] <== NOT EXECUTED
21b14: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
21b18: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
21b1c: e1a06002 mov r6, r2 <== NOT EXECUTED
21b20: e5900000 ldr r0, [r0] <== NOT EXECUTED
21b24: e1a02001 mov r2, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
21b28: e5935000 ldr r5, [r3] <== NOT EXECUTED
21b2c: ebffaa64 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
21b30: e1a00006 mov r0, r6 <== NOT EXECUTED
21b34: eb00a5cf bl 4b278 <strlen> <== NOT EXECUTED
21b38: e3a0c000 mov ip, #0 <== NOT EXECUTED
21b3c: e1a02000 mov r2, r0 <== NOT EXECUTED
21b40: e1a01006 mov r1, r6 <== NOT EXECUTED
21b44: e1a03007 mov r3, r7 <== NOT EXECUTED
21b48: e1a00004 mov r0, r4 <== NOT EXECUTED
21b4c: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED
21b50: eb0072f3 bl 3e724 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
21b54: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21b58: 0a000009 beq 21b84 <rtems_rfs_rtems_link+0x88> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21b5c: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21b60: e1a00004 mov r0, r4 <== NOT EXECUTED
21b64: eb0061ce bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21b68: e5960000 ldr r0, [r6] <== NOT EXECUTED
21b6c: ebffaa9c bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
21b70: eb008ab2 bl 44640 <__errno> <== NOT EXECUTED
21b74: e5805000 str r5, [r0] <== NOT EXECUTED
21b78: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21b7c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
21b80: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21b84: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21b88: e1a00004 mov r0, r4 <== NOT EXECUTED
21b8c: eb0061c4 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21b90: e5960000 ldr r0, [r6] <== NOT EXECUTED
21b94: ebffaa92 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21b98: e1a00005 mov r0, r5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("link: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
21b9c: eafffff6 b 21b7c <rtems_rfs_rtems_link+0x80> <== NOT EXECUTED
0002252c <rtems_rfs_rtems_mknod>:
int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
2252c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
22530: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED
22534: e59dc068 ldr ip, [sp, #104] ; 0x68 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
22538: e59ce010 ldr lr, [ip, #16] <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2253c: e59ca000 ldr sl, [ip] <== NOT EXECUTED
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
22540: e59e4034 ldr r4, [lr, #52] ; 0x34 <== NOT EXECUTED
int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
22544: e1a06001 mov r6, r1 <== NOT EXECUTED
22548: e1a05000 mov r5, r0 <== NOT EXECUTED
2254c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
22550: e1a0b002 mov fp, r2 <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
22554: eb001bc3 bl 29468 <geteuid> <== NOT EXECUTED
22558: e1a07000 mov r7, r0 <== NOT EXECUTED
gid = getegid ();
2255c: eb001bbc bl 29454 <getegid> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
22560: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
22564: e3a01000 mov r1, #0 <== NOT EXECUTED
22568: e1a02001 mov r2, r1 <== NOT EXECUTED
2256c: e1a09000 mov r9, r0 <== NOT EXECUTED
22570: e5930000 ldr r0, [r3] <== NOT EXECUTED
22574: ebffa7d2 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
22578: e1a00005 mov r0, r5 <== NOT EXECUTED
2257c: eb00a33d bl 4b278 <strlen> <== NOT EXECUTED
22580: e1a08000 mov r8, r0 <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
22584: e1a00006 mov r0, r6 <== NOT EXECUTED
22588: eb000149 bl 22ab4 <rtems_rfs_rtems_imode> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
2258c: e1a02005 mov r2, r5 <== NOT EXECUTED
22590: e58d0000 str r0, [sp] <== NOT EXECUTED
22594: e28dc040 add ip, sp, #64 ; 0x40 <== NOT EXECUTED
22598: e1a0100a mov r1, sl <== NOT EXECUTED
2259c: e1a03008 mov r3, r8 <== NOT EXECUTED
225a0: e3a05001 mov r5, #1 <== NOT EXECUTED
225a4: e1a00004 mov r0, r4 <== NOT EXECUTED
225a8: e98d12a0 stmib sp, {r5, r7, r9, ip} <== NOT EXECUTED
225ac: eb006e44 bl 3dec4 <rtems_rfs_inode_create> <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
225b0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
225b4: da000009 ble 225e0 <rtems_rfs_rtems_mknod+0xb4> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
225b8: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
225bc: e1a00004 mov r0, r4 <== NOT EXECUTED
225c0: eb005f37 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
225c4: e5950000 ldr r0, [r5] <== NOT EXECUTED
225c8: ebffa805 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
225cc: eb00881b bl 44640 <__errno> <== NOT EXECUTED
225d0: e5807000 str r7, [r0] <== NOT EXECUTED
225d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
225d8: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED
225dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
225e0: e28d7018 add r7, sp, #24 <== NOT EXECUTED
225e4: e1a00004 mov r0, r4 <== NOT EXECUTED
225e8: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
225ec: e1a02007 mov r2, r7 <== NOT EXECUTED
225f0: e1a03005 mov r3, r5 <== NOT EXECUTED
225f4: eb006dce bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
225f8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
225fc: da000008 ble 22624 <rtems_rfs_rtems_mknod+0xf8> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22600: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22604: e1a00004 mov r0, r4 <== NOT EXECUTED
22608: eb005f25 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2260c: e5950000 ldr r0, [r5] <== NOT EXECUTED
22610: ebffa7f3 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
22614: eb008809 bl 44640 <__errno> <== NOT EXECUTED
22618: e5808000 str r8, [r0] <== NOT EXECUTED
2261c: e3e00000 mvn r0, #0 <== NOT EXECUTED
22620: eaffffec b 225d8 <rtems_rfs_rtems_mknod+0xac> <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
22624: e2066a0f and r6, r6, #61440 ; 0xf000 <== NOT EXECUTED
22628: e3560901 cmp r6, #16384 ; 0x4000 <== NOT EXECUTED
2262c: 13560902 cmpne r6, #32768 ; 0x8000 <== NOT EXECUTED
22630: 0a00001d beq 226ac <rtems_rfs_rtems_mknod+0x180> <== NOT EXECUTED
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
22634: e3560a02 cmp r6, #8192 ; 0x2000 <== NOT EXECUTED
22638: 13560a06 cmpne r6, #24576 ; 0x6000 <== NOT EXECUTED
2263c: 1a000029 bne 226e8 <rtems_rfs_rtems_mknod+0x1bc> <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
22640: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22644: e1a02c2b lsr r2, fp, #24 <== NOT EXECUTED
22648: e5c3201c strb r2, [r3, #28] <== NOT EXECUTED
2264c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22650: e1a0282b lsr r2, fp, #16 <== NOT EXECUTED
22654: e5c3201d strb r2, [r3, #29] <== NOT EXECUTED
22658: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
2265c: e1a0242b lsr r2, fp, #8 <== NOT EXECUTED
22660: e5c3201e strb r2, [r3, #30] <== NOT EXECUTED
22664: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22668: e5c3b01f strb fp, [r3, #31] <== NOT EXECUTED
2266c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
22670: e1a02c23 lsr r2, r3, #24 <== NOT EXECUTED
22674: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22678: e5c32020 strb r2, [r3, #32] <== NOT EXECUTED
2267c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
22680: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED
22684: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22688: e5c32021 strb r2, [r3, #33] ; 0x21 <== NOT EXECUTED
2268c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
22690: e1a02423 lsr r2, r3, #8 <== NOT EXECUTED
22694: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
22698: e5c32022 strb r2, [r3, #34] ; 0x22 <== NOT EXECUTED
2269c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
226a0: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
226a4: e5c32023 strb r2, [r3, #35] ; 0x23 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
226a8: e5cd5028 strb r5, [sp, #40] ; 0x28 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
226ac: e1a01007 mov r1, r7 <== NOT EXECUTED
226b0: e1a00004 mov r0, r4 <== NOT EXECUTED
226b4: eb006d7a bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
226b8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
226bc: da000005 ble 226d8 <rtems_rfs_rtems_mknod+0x1ac> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
226c0: e1a00004 mov r0, r4 <== NOT EXECUTED
226c4: ebfffad7 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
226c8: eb0087dc bl 44640 <__errno> <== NOT EXECUTED
226cc: e5805000 str r5, [r0] <== NOT EXECUTED
226d0: e3e00000 mvn r0, #0 <== NOT EXECUTED
226d4: eaffffbf b 225d8 <rtems_rfs_rtems_mknod+0xac> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
226d8: e1a00004 mov r0, r4 <== NOT EXECUTED
226dc: ebfffad1 bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
226e0: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
226e4: eaffffbb b 225d8 <rtems_rfs_rtems_mknod+0xac> <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
226e8: e1a01007 mov r1, r7 <== NOT EXECUTED
226ec: e1a00004 mov r0, r4 <== NOT EXECUTED
226f0: eb006d6b bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
226f4: e1a00004 mov r0, r4 <== NOT EXECUTED
226f8: ebfffaca bl 21228 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
226fc: eb0087cf bl 44640 <__errno> <== NOT EXECUTED
22700: e3a03016 mov r3, #22 <== NOT EXECUTED
22704: e5803000 str r3, [r0] <== NOT EXECUTED
22708: e3e00000 mvn r0, #0 <== NOT EXECUTED
2270c: eaffffb1 b 225d8 <rtems_rfs_rtems_mknod+0xac> <== NOT EXECUTED
00022ac0 <rtems_rfs_rtems_mode>:
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
22ac0: e12fff1e bx lr <== NOT EXECUTED
000229bc <rtems_rfs_rtems_node_type>:
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
229bc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
* @return rtems_filesystem_node_types_t
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
229c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
229c4: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
229c8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
229cc: e5906000 ldr r6, [r0] <== NOT EXECUTED
229d0: e3a01000 mov r1, #0 <== NOT EXECUTED
* @return rtems_filesystem_node_types_t
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
229d4: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
229d8: e1a02001 mov r2, r1 <== NOT EXECUTED
229dc: e5930000 ldr r0, [r3] <== NOT EXECUTED
229e0: ebffa6b7 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
229e4: e1a01006 mov r1, r6 <== NOT EXECUTED
229e8: e1a00004 mov r0, r4 <== NOT EXECUTED
229ec: e1a0200d mov r2, sp <== NOT EXECUTED
229f0: e3a03001 mov r3, #1 <== NOT EXECUTED
229f4: eb006cce bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
229f8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
229fc: da00000a ble 22a2c <rtems_rfs_rtems_node_type+0x70> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22a00: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22a04: e1a00004 mov r0, r4 <== NOT EXECUTED
22a08: eb005e25 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
22a0c: e5950000 ldr r0, [r5] <== NOT EXECUTED
22a10: ebffa6f3 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
22a14: eb008709 bl 44640 <__errno> <== NOT EXECUTED
22a18: e5806000 str r6, [r0] <== NOT EXECUTED
22a1c: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
22a20: e1a00006 mov r0, r6 <== NOT EXECUTED
22a24: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
22a28: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
22a2c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
* link is actually the normal path to a regular file, directory, device
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
22a30: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
22a34: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
22a38: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
22a3c: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
22a40: 03a06001 moveq r6, #1 <== NOT EXECUTED
22a44: 0a000006 beq 22a64 <rtems_rfs_rtems_node_type+0xa8> <== NOT EXECUTED
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
22a48: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
22a4c: 03a06004 moveq r6, #4 <== NOT EXECUTED
22a50: 0a000003 beq 22a64 <rtems_rfs_rtems_node_type+0xa8> <== NOT EXECUTED
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
22a54: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
22a58: 13530a02 cmpne r3, #8192 ; 0x2000 <== NOT EXECUTED
22a5c: 03a06002 moveq r6, #2 <== NOT EXECUTED
22a60: 13a06005 movne r6, #5 <== NOT EXECUTED
type = RTEMS_FILESYSTEM_DEVICE;
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
rc = rtems_rfs_inode_close (fs, &inode);
22a64: e1a0100d mov r1, sp <== NOT EXECUTED
22a68: e1a00004 mov r0, r4 <== NOT EXECUTED
22a6c: eb006c8c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
22a70: e2505000 subs r5, r0, #0 <== NOT EXECUTED
22a74: da000008 ble 22a9c <rtems_rfs_rtems_node_type+0xe0> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22a78: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22a7c: e1a00004 mov r0, r4 <== NOT EXECUTED
22a80: eb005e07 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22a84: e5960000 ldr r0, [r6] <== NOT EXECUTED
22a88: ebffa6d5 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
22a8c: eb0086eb bl 44640 <__errno> <== NOT EXECUTED
22a90: e3e06000 mvn r6, #0 <== NOT EXECUTED
22a94: e5805000 str r5, [r0] <== NOT EXECUTED
22a98: eaffffe0 b 22a20 <rtems_rfs_rtems_node_type+0x64> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22a9c: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22aa0: e1a00004 mov r0, r4 <== NOT EXECUTED
22aa4: eb005dfe bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22aa8: e5950000 ldr r0, [r5] <== NOT EXECUTED
22aac: ebffa6cc bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
22ab0: eaffffda b 22a20 <rtems_rfs_rtems_node_type+0x64> <== NOT EXECUTED
00021868 <rtems_rfs_rtems_readlink>:
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21868: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
2186c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21870: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
21874: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
21878: e5907000 ldr r7, [r0] <== NOT EXECUTED
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
2187c: e1a06001 mov r6, r1 <== NOT EXECUTED
21880: e3a01000 mov r1, #0 <== NOT EXECUTED
21884: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
21888: e1a05002 mov r5, r2 <== NOT EXECUTED
2188c: e5930000 ldr r0, [r3] <== NOT EXECUTED
21890: e1a02001 mov r2, r1 <== NOT EXECUTED
21894: ebffab0a bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
21898: e1a03005 mov r3, r5 <== NOT EXECUTED
2189c: e28dc004 add ip, sp, #4 <== NOT EXECUTED
218a0: e1a01007 mov r1, r7 <== NOT EXECUTED
218a4: e1a02006 mov r2, r6 <== NOT EXECUTED
218a8: e1a00004 mov r0, r4 <== NOT EXECUTED
218ac: e58dc000 str ip, [sp] <== NOT EXECUTED
218b0: eb00721c bl 3e128 <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc)
218b4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
218b8: 0a000009 beq 218e4 <rtems_rfs_rtems_readlink+0x7c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
218bc: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
218c0: e1a00004 mov r0, r4 <== NOT EXECUTED
218c4: eb006276 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
218c8: e5960000 ldr r0, [r6] <== NOT EXECUTED
218cc: ebffab44 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
218d0: eb008b5a bl 44640 <__errno> <== NOT EXECUTED
218d4: e5805000 str r5, [r0] <== NOT EXECUTED
218d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
}
218dc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
218e0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
218e4: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
218e8: e1a00004 mov r0, r4 <== NOT EXECUTED
218ec: eb00626c bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
218f0: e5950000 ldr r0, [r5] <== NOT EXECUTED
218f4: ebffab3a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
return rtems_rfs_rtems_error ("readlink: reading link", rc);
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
218f8: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
218fc: eafffff6 b 218dc <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
00021ccc <rtems_rfs_rtems_rename>:
int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
21ccc: e1a0c001 mov ip, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
21cd0: e5911010 ldr r1, [r1, #16] <== NOT EXECUTED
int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
21cd4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
21cd8: e5914034 ldr r4, [r1, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21cdc: e594e07c ldr lr, [r4, #124] ; 0x7c <== NOT EXECUTED
21ce0: e3a01000 mov r1, #0 <== NOT EXECUTED
int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
21ce4: e1a08003 mov r8, r3 <== NOT EXECUTED
21ce8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
21cec: e592a000 ldr sl, [r2] <== NOT EXECUTED
rtems_rfs_ino new_parent;
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
21cf0: e5907000 ldr r7, [r0] <== NOT EXECUTED
21cf4: e1a02001 mov r2, r1 <== NOT EXECUTED
21cf8: e59e0000 ldr r0, [lr] <== NOT EXECUTED
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
21cfc: e89c0060 ldm ip, {r5, r6} <== NOT EXECUTED
21d00: ebffa9ef bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
21d04: e1a00008 mov r0, r8 <== NOT EXECUTED
21d08: eb00a55a bl 4b278 <strlen> <== NOT EXECUTED
21d0c: e1a01008 mov r1, r8 <== NOT EXECUTED
21d10: e1a02000 mov r2, r0 <== NOT EXECUTED
21d14: e3a0c001 mov ip, #1 <== NOT EXECUTED
21d18: e1a0300a mov r3, sl <== NOT EXECUTED
21d1c: e1a00004 mov r0, r4 <== NOT EXECUTED
21d20: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED
21d24: eb00727e bl 3e724 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
21d28: e2508000 subs r8, r0, #0 <== NOT EXECUTED
21d2c: 0a000009 beq 21d58 <rtems_rfs_rtems_rename+0x8c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21d30: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21d34: e1a00004 mov r0, r4 <== NOT EXECUTED
21d38: eb006159 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21d3c: e5950000 ldr r0, [r5] <== NOT EXECUTED
21d40: ebffaa27 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: linking", rc);
21d44: eb008a3d bl 44640 <__errno> <== NOT EXECUTED
21d48: e5808000 str r8, [r0] <== NOT EXECUTED
21d4c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21d50: e28dd008 add sp, sp, #8 <== NOT EXECUTED
21d54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
21d58: e1a02005 mov r2, r5 <== NOT EXECUTED
21d5c: e3a0c002 mov ip, #2 <== NOT EXECUTED
21d60: e1a01007 mov r1, r7 <== NOT EXECUTED
21d64: e1a03006 mov r3, r6 <== NOT EXECUTED
21d68: e1a00004 mov r0, r4 <== NOT EXECUTED
21d6c: e58dc000 str ip, [sp] <== NOT EXECUTED
21d70: eb0071e7 bl 3e514 <rtems_rfs_unlink> <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
21d74: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21d78: 0a000008 beq 21da0 <rtems_rfs_rtems_rename+0xd4> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21d7c: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21d80: e1a00004 mov r0, r4 <== NOT EXECUTED
21d84: eb006146 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21d88: e5960000 ldr r0, [r6] <== NOT EXECUTED
21d8c: ebffaa14 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
21d90: eb008a2a bl 44640 <__errno> <== NOT EXECUTED
21d94: e5805000 str r5, [r0] <== NOT EXECUTED
21d98: e3e00000 mvn r0, #0 <== NOT EXECUTED
21d9c: eaffffeb b 21d50 <rtems_rfs_rtems_rename+0x84> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21da0: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21da4: e1a00004 mov r0, r4 <== NOT EXECUTED
21da8: eb00613d bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21dac: e5960000 ldr r0, [r6] <== NOT EXECUTED
21db0: ebffaa0b bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21db4: e1a00005 mov r0, r5 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
21db8: eaffffe4 b 21d50 <rtems_rfs_rtems_rename+0x84> <== NOT EXECUTED
000219c4 <rtems_rfs_rtems_rmnod>:
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
219c4: e5912010 ldr r2, [r1, #16] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
219c8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
219cc: e5924034 ldr r4, [r2, #52] ; 0x34 <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
219d0: e1a03001 mov r3, r1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
219d4: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
219d8: e5915004 ldr r5, [r1, #4] <== NOT EXECUTED
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
219dc: e5907000 ldr r7, [r0] <== NOT EXECUTED
219e0: e3a01000 mov r1, #0 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
219e4: e5936000 ldr r6, [r3] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
219e8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
219ec: e5920000 ldr r0, [r2] <== NOT EXECUTED
219f0: e1a02001 mov r2, r1 <== NOT EXECUTED
219f4: ebffaab2 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
219f8: e1a03005 mov r3, r5 <== NOT EXECUTED
219fc: e3a0c000 mov ip, #0 <== NOT EXECUTED
21a00: e1a01007 mov r1, r7 <== NOT EXECUTED
21a04: e1a02006 mov r2, r6 <== NOT EXECUTED
21a08: e1a00004 mov r0, r4 <== NOT EXECUTED
21a0c: e58dc000 str ip, [sp] <== NOT EXECUTED
21a10: eb0072bf bl 3e514 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
21a14: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21a18: 0a000009 beq 21a44 <rtems_rfs_rtems_rmnod+0x80> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21a1c: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21a20: e1a00004 mov r0, r4 <== NOT EXECUTED
21a24: eb00621e bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21a28: e5960000 ldr r0, [r6] <== NOT EXECUTED
21a2c: ebffaaec bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
21a30: eb008b02 bl 44640 <__errno> <== NOT EXECUTED
21a34: e5805000 str r5, [r0] <== NOT EXECUTED
21a38: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21a3c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
21a40: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21a44: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21a48: e1a00004 mov r0, r4 <== NOT EXECUTED
21a4c: eb006214 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21a50: e5960000 ldr r0, [r6] <== NOT EXECUTED
21a54: ebffaae2 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21a58: e1a00005 mov r0, r5 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
21a5c: eafffff6 b 21a3c <rtems_rfs_rtems_rmnod+0x78> <== NOT EXECUTED
00022ac4 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
22ac4: e92d4010 push {r4, lr} <== NOT EXECUTED
22ac8: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
22acc: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
22ad0: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
22ad4: e1821401 orr r1, r2, r1, lsl #8 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
22ad8: e2013a0f and r3, r1, #61440 ; 0xf000 <== NOT EXECUTED
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
22adc: e3a02000 mov r2, #0 <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
22ae0: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
22ae4: e5802008 str r2, [r0, #8] <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
22ae8: 0a000010 beq 22b30 <rtems_rfs_rtems_set_handlers+0x6c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
22aec: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
22af0: 13530a06 cmpne r3, #24576 ; 0x6000 <== NOT EXECUTED
22af4: 13a04000 movne r4, #0 <== NOT EXECUTED
22af8: 03a04001 moveq r4, #1 <== NOT EXECUTED
22afc: 0a000007 beq 22b20 <rtems_rfs_rtems_set_handlers+0x5c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
22b00: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
22b04: 0a000011 beq 22b50 <rtems_rfs_rtems_set_handlers+0x8c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
22b08: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
22b0c: 0a00000b beq 22b40 <rtems_rfs_rtems_set_handlers+0x7c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
22b10: e59f0048 ldr r0, [pc, #72] ; 22b60 <rtems_rfs_rtems_set_handlers+0x9c><== NOT EXECUTED
22b14: eb009827 bl 48bb8 <printf> <== NOT EXECUTED
22b18: e1a00004 mov r0, r4 <== NOT EXECUTED
return false;
}
return true;
}
22b1c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
22b20: e59f303c ldr r3, [pc, #60] ; 22b64 <rtems_rfs_rtems_set_handlers+0xa0><== NOT EXECUTED
22b24: e5803008 str r3, [r0, #8] <== NOT EXECUTED
22b28: e3a00001 mov r0, #1 <== NOT EXECUTED
22b2c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
22b30: e59f3030 ldr r3, [pc, #48] ; 22b68 <rtems_rfs_rtems_set_handlers+0xa4><== NOT EXECUTED
22b34: e5803008 str r3, [r0, #8] <== NOT EXECUTED
22b38: e3a00001 mov r0, #1 <== NOT EXECUTED
22b3c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
22b40: e59f3024 ldr r3, [pc, #36] ; 22b6c <rtems_rfs_rtems_set_handlers+0xa8><== NOT EXECUTED
22b44: e5803008 str r3, [r0, #8] <== NOT EXECUTED
22b48: e3a00001 mov r0, #1 <== NOT EXECUTED
22b4c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
22b50: e59f3018 ldr r3, [pc, #24] ; 22b70 <rtems_rfs_rtems_set_handlers+0xac><== NOT EXECUTED
22b54: e5803008 str r3, [r0, #8] <== NOT EXECUTED
22b58: e3a00001 mov r0, #1 <== NOT EXECUTED
22b5c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00021240 <rtems_rfs_rtems_shutdown>:
* Shutdown the file system.
*/
int
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
rtems_rfs_file_system* fs = mt_entry->fs_info;
21240: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
/**
* Shutdown the file system.
*/
int
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
21244: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
rtems_rfs_rtems_private* rtems;
int rc;
rtems = rtems_rfs_fs_user (fs);
rc = rtems_rfs_fs_close(fs);
21248: e1a00003 mov r0, r3 <== NOT EXECUTED
{
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_private* rtems;
int rc;
rtems = rtems_rfs_fs_user (fs);
2124c: e593507c ldr r5, [r3, #124] ; 0x7c <== NOT EXECUTED
rc = rtems_rfs_fs_close(fs);
21250: eb006b91 bl 3c09c <rtems_rfs_fs_close> <== NOT EXECUTED
21254: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
21258: e1a00005 mov r0, r5 <== NOT EXECUTED
2125c: eb00758f bl 3e8a0 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
21260: e1a00005 mov r0, r5 <== NOT EXECUTED
21264: ebff9ac1 bl 7d70 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("shutdown: close", rc);
21268: eb008cf4 bl 44640 <__errno> <== NOT EXECUTED
2126c: e3540000 cmp r4, #0 <== NOT EXECUTED
21270: e5804000 str r4, [r0] <== NOT EXECUTED
}
21274: 01a00004 moveq r0, r4 <== NOT EXECUTED
21278: 13e00000 mvnne r0, #0 <== NOT EXECUTED
2127c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00021dbc <rtems_rfs_rtems_stat>:
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21dbc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
21dc0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21dc4: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21dc8: e595307c ldr r3, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
21dcc: e5906000 ldr r6, [r0] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
21dd0: e1a04001 mov r4, r1 <== NOT EXECUTED
21dd4: e3a01000 mov r1, #0 <== NOT EXECUTED
21dd8: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
21ddc: e1a02001 mov r2, r1 <== NOT EXECUTED
21de0: e5930000 ldr r0, [r3] <== NOT EXECUTED
21de4: ebffa9b6 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
21de8: e1a00005 mov r0, r5 <== NOT EXECUTED
21dec: e1a01006 mov r1, r6 <== NOT EXECUTED
21df0: e1a0200d mov r2, sp <== NOT EXECUTED
21df4: e3a03001 mov r3, #1 <== NOT EXECUTED
21df8: eb006fcd bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
21dfc: e2508000 subs r8, r0, #0 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
21e00: e1a0700d mov r7, sp <== NOT EXECUTED
if (rc)
21e04: 1a00006d bne 21fc0 <rtems_rfs_rtems_stat+0x204> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
21e08: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
21e0c: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
21e10: e5d20002 ldrb r0, [r2, #2] <== NOT EXECUTED
21e14: e1830400 orr r0, r3, r0, lsl #8 <== NOT EXECUTED
21e18: e2003a0f and r3, r0, #61440 ; 0xf000 <== NOT EXECUTED
21e1c: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
21e20: 13530a06 cmpne r3, #24576 ; 0x6000 <== NOT EXECUTED
21e24: 0a000040 beq 21f2c <rtems_rfs_rtems_stat+0x170> <== NOT EXECUTED
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
21e28: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
21e2c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
buf->st_ino = ino;
21e30: e5846008 str r6, [r4, #8] <== NOT EXECUTED
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
21e34: e884000c stm r4, {r2, r3} <== NOT EXECUTED
buf->st_ino = ino;
buf->st_mode = rtems_rfs_rtems_mode (mode);
21e38: eb000320 bl 22ac0 <rtems_rfs_rtems_mode> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
21e3c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21e40: e584000c str r0, [r4, #12] <== NOT EXECUTED
21e44: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
21e48: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
if (links == 0xffff)
21e4c: e3a01801 mov r1, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
21e50: e1822400 orr r2, r2, r0, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
21e54: e2411001 sub r1, r1, #1 <== NOT EXECUTED
21e58: e1520001 cmp r2, r1 <== NOT EXECUTED
21e5c: 03a02000 moveq r2, #0 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
21e60: e1c421b0 strh r2, [r4, #16] <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
21e64: e5d31006 ldrb r1, [r3, #6] <== NOT EXECUTED
21e68: e5d32007 ldrb r2, [r3, #7] <== NOT EXECUTED
21e6c: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
21e70: e1c421b2 strh r2, [r4, #18] <== NOT EXECUTED
buf->st_gid = rtems_rfs_inode_get_gid (&inode);
21e74: e5d31007 ldrb r1, [r3, #7] <== NOT EXECUTED
21e78: e5d30004 ldrb r0, [r3, #4] <== NOT EXECUTED
21e7c: e5d32005 ldrb r2, [r3, #5] <== NOT EXECUTED
21e80: e1813c00 orr r3, r1, r0, lsl #24 <== NOT EXECUTED
21e84: e1833802 orr r3, r3, r2, lsl #16 <== NOT EXECUTED
21e88: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
21e8c: e1c431b4 strh r3, [r4, #20] <== NOT EXECUTED
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
21e90: e1a01006 mov r1, r6 <== NOT EXECUTED
21e94: e1a00005 mov r0, r5 <== NOT EXECUTED
21e98: eb006591 bl 3b4e4 <rtems_rfs_file_get_shared> <== NOT EXECUTED
if (shared)
21e9c: e3500000 cmp r0, #0 <== NOT EXECUTED
21ea0: 0a00004f beq 21fe4 <rtems_rfs_rtems_stat+0x228> <== NOT EXECUTED
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
21ea4: e590308c ldr r3, [r0, #140] ; 0x8c <== NOT EXECUTED
21ea8: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
21eac: e5903090 ldr r3, [r0, #144] ; 0x90 <== NOT EXECUTED
21eb0: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
21eb4: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
21eb8: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
21ebc: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
21ec0: e2022a0f and r2, r2, #61440 ; 0xf000 <== NOT EXECUTED
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
21ec4: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
21ec8: e3520a0a cmp r2, #40960 ; 0xa000 <== NOT EXECUTED
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
21ecc: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
21ed0: 0a000028 beq 21f78 <rtems_rfs_rtems_stat+0x1bc> <== NOT EXECUTED
*/
static inline rtems_rfs_pos
rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
return rtems_rfs_block_get_size (fs, &shared->size);
21ed4: e2801084 add r1, r0, #132 ; 0x84 <== NOT EXECUTED
21ed8: e1a00005 mov r0, r5 <== NOT EXECUTED
21edc: eb005d2a bl 3938c <rtems_rfs_block_get_size> <== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
21ee0: e5840020 str r0, [r4, #32] <== NOT EXECUTED
21ee4: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
21ee8: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
21eec: e1a0100d mov r1, sp <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
21ef0: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
21ef4: e1a00005 mov r0, r5 <== NOT EXECUTED
21ef8: eb006f69 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
21efc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
21f00: da000027 ble 21fa4 <rtems_rfs_rtems_stat+0x1e8> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21f04: e595607c ldr r6, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21f08: e1a00005 mov r0, r5 <== NOT EXECUTED
21f0c: eb0060e4 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21f10: e5960000 ldr r0, [r6] <== NOT EXECUTED
21f14: ebffa9b2 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
21f18: eb0089c8 bl 44640 <__errno> <== NOT EXECUTED
21f1c: e5804000 str r4, [r0] <== NOT EXECUTED
21f20: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21f24: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
21f28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
21f2c: e282301c add r3, r2, #28 <== NOT EXECUTED
21f30: e5d3a005 ldrb sl, [r3, #5] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
21f34: e5d2101c ldrb r1, [r2, #28] <== NOT EXECUTED
21f38: e5d3c004 ldrb ip, [r3, #4] <== NOT EXECUTED
21f3c: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
21f40: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
21f44: e5d38007 ldrb r8, [r3, #7] <== NOT EXECUTED
21f48: e1a0a80a lsl sl, sl, #16 <== NOT EXECUTED
21f4c: e18aac0c orr sl, sl, ip, lsl #24 <== NOT EXECUTED
21f50: e1822c01 orr r2, r2, r1, lsl #24 <== NOT EXECUTED
21f54: e5d3c006 ldrb ip, [r3, #6] <== NOT EXECUTED
21f58: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
21f5c: e182280e orr r2, r2, lr, lsl #16 <== NOT EXECUTED
21f60: e18a3008 orr r3, sl, r8 <== NOT EXECUTED
21f64: e183340c orr r3, r3, ip, lsl #8 <== NOT EXECUTED
21f68: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
buf->st_rdev =
21f6c: e5842018 str r2, [r4, #24] <== NOT EXECUTED
21f70: e584301c str r3, [r4, #28] <== NOT EXECUTED
21f74: eaffffab b 21e28 <rtems_rfs_rtems_stat+0x6c> <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
21f78: e1d038b8 ldrh r3, [r0, #136] ; 0x88 <== NOT EXECUTED
21f7c: e5843020 str r3, [r4, #32] <== NOT EXECUTED
21f80: e3a03000 mov r3, #0 <== NOT EXECUTED
21f84: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
21f88: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
21f8c: e1a0100d mov r1, sp <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
21f90: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
21f94: e1a00005 mov r0, r5 <== NOT EXECUTED
21f98: eb006f41 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
21f9c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
21fa0: caffffd7 bgt 21f04 <rtems_rfs_rtems_stat+0x148> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21fa4: e595407c ldr r4, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21fa8: e1a00005 mov r0, r5 <== NOT EXECUTED
21fac: eb0060bc bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21fb0: e5940000 ldr r0, [r4] <== NOT EXECUTED
21fb4: ebffa98a bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21fb8: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
21fbc: eaffffd8 b 21f24 <rtems_rfs_rtems_stat+0x168> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21fc0: e595407c ldr r4, [r5, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21fc4: e1a00005 mov r0, r5 <== NOT EXECUTED
21fc8: eb0060b5 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21fcc: e5940000 ldr r0, [r4] <== NOT EXECUTED
21fd0: ebffa983 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: opening inode", rc);
21fd4: eb008999 bl 44640 <__errno> <== NOT EXECUTED
21fd8: e5808000 str r8, [r0] <== NOT EXECUTED
21fdc: e3e00000 mvn r0, #0 <== NOT EXECUTED
21fe0: eaffffcf b 21f24 <rtems_rfs_rtems_stat+0x168> <== NOT EXECUTED
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
21fe4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21fe8: e2832010 add r2, r3, #16 <== NOT EXECUTED
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
21fec: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
21ff0: e5d3c010 ldrb ip, [r3, #16] <== NOT EXECUTED
21ff4: e5d2e001 ldrb lr, [r2, #1] <== NOT EXECUTED
21ff8: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
21ffc: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
22000: e18c280e orr r2, ip, lr, lsl #16 <== NOT EXECUTED
22004: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
22008: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
2200c: e2832014 add r2, r3, #20 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
22010: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
22014: e5d3c014 ldrb ip, [r3, #20] <== NOT EXECUTED
22018: e5d2e001 ldrb lr, [r2, #1] <== NOT EXECUTED
2201c: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
22020: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
22024: e18c280e orr r2, ip, lr, lsl #16 <== NOT EXECUTED
22028: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
2202c: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
22030: e2832018 add r2, r3, #24 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
22034: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
22038: e5d3c018 ldrb ip, [r3, #24] <== NOT EXECUTED
2203c: e5d2e001 ldrb lr, [r2, #1] <== NOT EXECUTED
22040: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
22044: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
22048: e18c280e orr r2, ip, lr, lsl #16 <== NOT EXECUTED
2204c: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
22050: e5842038 str r2, [r4, #56] ; 0x38 <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
22054: e283200c add r2, r3, #12 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
22058: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
2205c: e5d3e00c ldrb lr, [r3, #12] <== NOT EXECUTED
22060: e5d26001 ldrb r6, [r2, #1] <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
22064: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
22068: e18cec0e orr lr, ip, lr, lsl #24 <== NOT EXECUTED
2206c: e5d2c002 ldrb ip, [r2, #2] <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
22070: e2011a0f and r1, r1, #61440 ; 0xf000 <== NOT EXECUTED
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
22074: e18e2806 orr r2, lr, r6, lsl #16 <== NOT EXECUTED
22078: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
2207c: e3510a0a cmp r1, #40960 ; 0xa000 <== NOT EXECUTED
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
22080: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
22084: 1a000005 bne 220a0 <rtems_rfs_rtems_stat+0x2e4> <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
22088: e5d3200b ldrb r2, [r3, #11] <== NOT EXECUTED
2208c: e5d3300a ldrb r3, [r3, #10] <== NOT EXECUTED
22090: e1823403 orr r3, r2, r3, lsl #8 <== NOT EXECUTED
22094: e5843020 str r3, [r4, #32] <== NOT EXECUTED
22098: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED
2209c: eaffff91 b 21ee8 <rtems_rfs_rtems_stat+0x12c> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
220a0: e1a00005 mov r0, r5 <== NOT EXECUTED
220a4: e1a0100d mov r1, sp <== NOT EXECUTED
220a8: eb006e38 bl 3d990 <rtems_rfs_inode_get_size> <== NOT EXECUTED
220ac: e5840020 str r0, [r4, #32] <== NOT EXECUTED
220b0: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
220b4: eaffff8b b 21ee8 <rtems_rfs_rtems_stat+0x12c> <== NOT EXECUTED
00021458 <rtems_rfs_rtems_statvfs>:
* @return int
*/
int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
21458: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2145c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
21460: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
21464: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
21468: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
2146c: e1a0200d mov r2, sp <== NOT EXECUTED
21470: e28d1004 add r1, sp, #4 <== NOT EXECUTED
21474: e1a00005 mov r0, r5 <== NOT EXECUTED
21478: eb006fe3 bl 3d40c <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2147c: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
21480: e595000c ldr r0, [r5, #12] <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
21484: e5843000 str r3, [r4] <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
21488: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
2148c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
21490: e59d2000 ldr r2, [sp] <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
21494: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
21498: e3a0334a mov r3, #671088641 ; 0x28000001 <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
2149c: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
214a0: e2833a92 add r3, r3, #598016 ; 0x92000 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
214a4: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
214a8: e5950004 ldr r0, [r5, #4] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
214ac: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
214b0: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
214b4: e5841020 str r1, [r4, #32] <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
214b8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
214bc: e5953000 ldr r3, [r5] <== NOT EXECUTED
214c0: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
214c4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
214c8: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
214cc: e0633000 rsb r3, r3, r0 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
214d0: e3a00000 mov r0, #0 <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
214d4: e5842034 str r2, [r4, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
214d8: e584c008 str ip, [r4, #8] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
214dc: e5843018 str r3, [r4, #24] <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
214e0: e584000c str r0, [r4, #12] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
214e4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
214e8: e5840014 str r0, [r4, #20] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
214ec: e584001c str r0, [r4, #28] <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
214f0: e28dd008 add sp, sp, #8 <== NOT EXECUTED
214f4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00021900 <rtems_rfs_rtems_symlink>:
int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
21900: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
21904: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
21908: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
2190c: e1a08001 mov r8, r1 <== NOT EXECUTED
21910: e1a0a002 mov sl, r2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
21914: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
21918: e5905000 ldr r5, [r0] <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
2191c: eb001ed1 bl 29468 <geteuid> <== NOT EXECUTED
21920: e1a07000 mov r7, r0 <== NOT EXECUTED
gid = getegid ();
21924: eb001eca bl 29454 <getegid> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21928: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
2192c: e3a01000 mov r1, #0 <== NOT EXECUTED
21930: e1a02001 mov r2, r1 <== NOT EXECUTED
21934: e1a06000 mov r6, r0 <== NOT EXECUTED
21938: e5930000 ldr r0, [r3] <== NOT EXECUTED
2193c: ebffaae0 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
21940: e1a0000a mov r0, sl <== NOT EXECUTED
21944: eb00a64b bl 4b278 <strlen> <== NOT EXECUTED
21948: e1a09000 mov r9, r0 <== NOT EXECUTED
link_name, strlen (link_name),
2194c: e1a00008 mov r0, r8 <== NOT EXECUTED
21950: eb00a648 bl 4b278 <strlen> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
21954: e1a0100a mov r1, sl <== NOT EXECUTED
21958: e58d0000 str r0, [sp] <== NOT EXECUTED
2195c: e1a02009 mov r2, r9 <== NOT EXECUTED
21960: e1a03008 mov r3, r8 <== NOT EXECUTED
21964: e1a00004 mov r0, r4 <== NOT EXECUTED
21968: e58d500c str r5, [sp, #12] <== NOT EXECUTED
2196c: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
21970: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
21974: eb00725a bl 3e2e4 <rtems_rfs_symlink> <== NOT EXECUTED
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
21978: e2505000 subs r5, r0, #0 <== NOT EXECUTED
2197c: 0a000009 beq 219a8 <rtems_rfs_rtems_symlink+0xa8> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21980: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21984: e1a00004 mov r0, r4 <== NOT EXECUTED
21988: eb006245 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2198c: e5960000 ldr r0, [r6] <== NOT EXECUTED
21990: ebffab13 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
21994: eb008b29 bl 44640 <__errno> <== NOT EXECUTED
21998: e5805000 str r5, [r0] <== NOT EXECUTED
2199c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
219a0: e28dd010 add sp, sp, #16 <== NOT EXECUTED
219a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
219a8: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
219ac: e1a00004 mov r0, r4 <== NOT EXECUTED
219b0: eb00623b bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
219b4: e5960000 ldr r0, [r6] <== NOT EXECUTED
219b8: ebffab09 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
219bc: e1a00005 mov r0, r5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
219c0: eafffff6 b 219a0 <rtems_rfs_rtems_symlink+0xa0> <== NOT EXECUTED
00021a60 <rtems_rfs_rtems_unlink>:
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
21a60: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
21a64: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
21a68: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
21a6c: e1a03001 mov r3, r1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21a70: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
21a74: e5915004 ldr r5, [r1, #4] <== NOT EXECUTED
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
21a78: e5907000 ldr r7, [r0] <== NOT EXECUTED
21a7c: e3a01000 mov r1, #0 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
21a80: e5936000 ldr r6, [r3] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
21a84: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
21a88: e5920000 ldr r0, [r2] <== NOT EXECUTED
21a8c: e1a02001 mov r2, r1 <== NOT EXECUTED
21a90: ebffaa8b bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
21a94: e1a03005 mov r3, r5 <== NOT EXECUTED
21a98: e3a0c000 mov ip, #0 <== NOT EXECUTED
21a9c: e1a01007 mov r1, r7 <== NOT EXECUTED
21aa0: e1a02006 mov r2, r6 <== NOT EXECUTED
21aa4: e1a00004 mov r0, r4 <== NOT EXECUTED
21aa8: e58dc000 str ip, [sp] <== NOT EXECUTED
21aac: eb007298 bl 3e514 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
21ab0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21ab4: 0a000009 beq 21ae0 <rtems_rfs_rtems_unlink+0x80> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21ab8: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21abc: e1a00004 mov r0, r4 <== NOT EXECUTED
21ac0: eb0061f7 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21ac4: e5960000 ldr r0, [r6] <== NOT EXECUTED
21ac8: ebffaac5 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
21acc: eb008adb bl 44640 <__errno> <== NOT EXECUTED
21ad0: e5805000 str r5, [r0] <== NOT EXECUTED
21ad4: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21ad8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
21adc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21ae0: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21ae4: e1a00004 mov r0, r4 <== NOT EXECUTED
21ae8: eb0061ed bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21aec: e5960000 ldr r0, [r6] <== NOT EXECUTED
21af0: ebffaabb bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21af4: e1a00005 mov r0, r5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
21af8: eafffff6 b 21ad8 <rtems_rfs_rtems_unlink+0x78> <== NOT EXECUTED
00021228 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
21228: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2122c: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21230: eb00641b bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21234: e5940000 ldr r0, [r4] <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
21238: e8bd4010 pop {r4, lr} <== NOT EXECUTED
2123c: eafface8 b c5e4 <rtems_semaphore_release> <== NOT EXECUTED
00021ba0 <rtems_rfs_rtems_utime>:
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21ba0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
21ba4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
21ba8: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
21bac: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
21bb0: e5908000 ldr r8, [r0] <== NOT EXECUTED
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
21bb4: e1a06001 mov r6, r1 <== NOT EXECUTED
21bb8: e3a01000 mov r1, #0 <== NOT EXECUTED
21bbc: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
21bc0: e5930000 ldr r0, [r3] <== NOT EXECUTED
21bc4: e1a05002 mov r5, r2 <== NOT EXECUTED
21bc8: e1a02001 mov r2, r1 <== NOT EXECUTED
21bcc: ebffaa3c bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
21bd0: e1a01008 mov r1, r8 <== NOT EXECUTED
21bd4: e1a00004 mov r0, r4 <== NOT EXECUTED
21bd8: e1a0200d mov r2, sp <== NOT EXECUTED
21bdc: e3a03001 mov r3, #1 <== NOT EXECUTED
21be0: eb007053 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
21be4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
21be8: e1a0700d mov r7, sp <== NOT EXECUTED
if (rc)
21bec: 0a000009 beq 21c18 <rtems_rfs_rtems_utime+0x78> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21bf0: e594507c ldr r5, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21bf4: e1a00004 mov r0, r4 <== NOT EXECUTED
21bf8: eb0061a9 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
21bfc: e5950000 ldr r0, [r5] <== NOT EXECUTED
21c00: ebffaa77 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: read inode", rc);
21c04: eb008a8d bl 44640 <__errno> <== NOT EXECUTED
21c08: e5808000 str r8, [r0] <== NOT EXECUTED
21c0c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
21c10: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
21c14: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
21c18: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c1c: e1a02c26 lsr r2, r6, #24 <== NOT EXECUTED
21c20: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
21c24: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c28: e1a02826 lsr r2, r6, #16 <== NOT EXECUTED
21c2c: e5c32011 strb r2, [r3, #17] <== NOT EXECUTED
21c30: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c34: e1a02426 lsr r2, r6, #8 <== NOT EXECUTED
21c38: e5c32012 strb r2, [r3, #18] <== NOT EXECUTED
21c3c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c40: e5c36013 strb r6, [r3, #19] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
21c44: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c48: e1a02c25 lsr r2, r5, #24 <== NOT EXECUTED
21c4c: e5c32014 strb r2, [r3, #20] <== NOT EXECUTED
21c50: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c54: e1a02825 lsr r2, r5, #16 <== NOT EXECUTED
21c58: e5c32015 strb r2, [r3, #21] <== NOT EXECUTED
21c5c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
21c60: e1a02425 lsr r2, r5, #8 <== NOT EXECUTED
21c64: e5c32016 strb r2, [r3, #22] <== NOT EXECUTED
21c68: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
21c6c: e1a0100d mov r1, sp <== NOT EXECUTED
21c70: e5c35017 strb r5, [r3, #23] <== NOT EXECUTED
21c74: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
21c78: e3a03001 mov r3, #1 <== NOT EXECUTED
21c7c: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
21c80: eb007007 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
21c84: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21c88: 0a000008 beq 21cb0 <rtems_rfs_rtems_utime+0x110> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21c8c: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21c90: e1a00004 mov r0, r4 <== NOT EXECUTED
21c94: eb006182 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21c98: e5960000 ldr r0, [r6] <== NOT EXECUTED
21c9c: ebffaa50 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
21ca0: eb008a66 bl 44640 <__errno> <== NOT EXECUTED
21ca4: e5805000 str r5, [r0] <== NOT EXECUTED
21ca8: e3e00000 mvn r0, #0 <== NOT EXECUTED
21cac: eaffffd7 b 21c10 <rtems_rfs_rtems_utime+0x70> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
21cb0: e594607c ldr r6, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
21cb4: e1a00004 mov r0, r4 <== NOT EXECUTED
21cb8: eb006179 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
21cbc: e5960000 ldr r0, [r6] <== NOT EXECUTED
21cc0: ebffaa47 bl c5e4 <rtems_semaphore_release> <== NOT EXECUTED
21cc4: e1a00005 mov r0, r5 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
21cc8: eaffffd0 b 21c10 <rtems_rfs_rtems_utime+0x70> <== NOT EXECUTED
0003c60c <rtems_rfs_rup_quotient>:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
3c60c: e3500000 cmp r0, #0 <== NOT EXECUTED
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
3c610: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if (dividend == 0)
3c614: 03a00001 moveq r0, #1 <== NOT EXECUTED
3c618: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
3c61c: e2400001 sub r0, r0, #1 <== NOT EXECUTED
3c620: eb007fd5 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
3c624: e2800001 add r0, r0, #1 <== NOT EXECUTED
}
3c628: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000238a4 <rtems_rfs_shell_block>:
return 0;
}
static int
rtems_rfs_shell_block (rtems_rfs_file_system* fs, int argc, char *argv[])
{
238a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
238a8: e3510001 cmp r1, #1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_block (rtems_rfs_file_system* fs, int argc, char *argv[])
{
238ac: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
238b0: e1a04000 mov r4, r0 <== NOT EXECUTED
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
238b4: da000070 ble 23a7c <rtems_rfs_shell_block+0x1d8> <== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
238b8: e3a01000 mov r1, #0 <== NOT EXECUTED
238bc: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
238c0: e1a02001 mov r2, r1 <== NOT EXECUTED
238c4: eb00a387 bl 4c6e8 <strtoul> <== NOT EXECUTED
238c8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
238cc: e3a01000 mov r1, #0 <== NOT EXECUTED
238d0: e1a02001 mov r2, r1 <== NOT EXECUTED
238d4: e1a05000 mov r5, r0 <== NOT EXECUTED
238d8: e5930000 ldr r0, [r3] <== NOT EXECUTED
238dc: ebffa2f8 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
238e0: e1a00004 mov r0, r4 <== NOT EXECUTED
238e4: e3a01000 mov r1, #0 <== NOT EXECUTED
238e8: e1a02005 mov r2, r5 <== NOT EXECUTED
238ec: e28d300f add r3, sp, #15 <== NOT EXECUTED
238f0: eb0066ea bl 3d4a0 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
238f4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
238f8: ca00003f bgt 239fc <rtems_rfs_shell_block+0x158> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
238fc: e5dd100f ldrb r1, [sp, #15] <== NOT EXECUTED
23900: e59f3184 ldr r3, [pc, #388] ; 23a8c <rtems_rfs_shell_block+0x1e8><== NOT EXECUTED
23904: e3510000 cmp r1, #0 <== NOT EXECUTED
23908: e59f2180 ldr r2, [pc, #384] ; 23a90 <rtems_rfs_shell_block+0x1ec><== NOT EXECUTED
2390c: e1a01005 mov r1, r5 <== NOT EXECUTED
23910: 01a02003 moveq r2, r3 <== NOT EXECUTED
23914: e59f0178 ldr r0, [pc, #376] ; 23a94 <rtems_rfs_shell_block+0x1f0><== NOT EXECUTED
23918: eb0094a6 bl 48bb8 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2391c: e3a06000 mov r6, #0 <== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
23920: e1a00004 mov r0, r4 <== NOT EXECUTED
23924: e1a0100d mov r1, sp <== NOT EXECUTED
23928: e1a02005 mov r2, r5 <== NOT EXECUTED
2392c: e3a03001 mov r3, #1 <== NOT EXECUTED
23930: e5cd6000 strb r6, [sp] <== NOT EXECUTED
handle->bnum = 0;
23934: e58d6004 str r6, [sp, #4] <== NOT EXECUTED
handle->buffer = NULL;
23938: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
2393c: eb005af8 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
23940: e2508000 subs r8, r0, #0 <== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
23944: e1a0700d mov r7, sp <== NOT EXECUTED
if (rc > 0)
23948: ca00003a bgt 23a38 <rtems_rfs_shell_block+0x194> <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
2394c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
23950: e3530000 cmp r3, #0 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
23954: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
23958: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
b < rtems_rfs_fs_block_size (fs);
2395c: 1a00000c bne 23994 <rtems_rfs_shell_block+0xf0> <== NOT EXECUTED
23960: ea000018 b 239c8 <rtems_rfs_shell_block+0x124> <== NOT EXECUTED
b++, data++)
{
int mod = b % 16;
if (mod == 0)
{
if (b)
23964: e3560000 cmp r6, #0 <== NOT EXECUTED
23968: 1a00002f bne 23a2c <rtems_rfs_shell_block+0x188> <== NOT EXECUTED
printf ("\n");
printf ("%04x ", b);
2396c: e1a01006 mov r1, r6 <== NOT EXECUTED
23970: e59f0120 ldr r0, [pc, #288] ; 23a98 <rtems_rfs_shell_block+0x1f4><== NOT EXECUTED
23974: eb00948f bl 48bb8 <printf> <== NOT EXECUTED
}
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
23978: e7d51006 ldrb r1, [r5, r6] <== NOT EXECUTED
2397c: e59f0118 ldr r0, [pc, #280] ; 23a9c <rtems_rfs_shell_block+0x1f8><== NOT EXECUTED
23980: eb00948c bl 48bb8 <printf> <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
23984: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
b++, data++)
23988: e2866001 add r6, r6, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
2398c: e1530006 cmp r3, r6 <== NOT EXECUTED
23990: 9a00000c bls 239c8 <rtems_rfs_shell_block+0x124> <== NOT EXECUTED
b++, data++)
{
int mod = b % 16;
if (mod == 0)
23994: e216300f ands r3, r6, #15 <== NOT EXECUTED
23998: 0afffff1 beq 23964 <rtems_rfs_shell_block+0xc0> <== NOT EXECUTED
{
if (b)
printf ("\n");
printf ("%04x ", b);
}
if (mod == 8)
2399c: e3530008 cmp r3, #8 <== NOT EXECUTED
239a0: 1afffff4 bne 23978 <rtems_rfs_shell_block+0xd4> <== NOT EXECUTED
printf (" ");
239a4: e3a00020 mov r0, #32 <== NOT EXECUTED
239a8: eb0094f7 bl 48d8c <putchar> <== NOT EXECUTED
printf ("%02x ", *data);
239ac: e7d51006 ldrb r1, [r5, r6] <== NOT EXECUTED
239b0: e59f00e4 ldr r0, [pc, #228] ; 23a9c <rtems_rfs_shell_block+0x1f8><== NOT EXECUTED
239b4: eb00947f bl 48bb8 <printf> <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
239b8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
b++, data++)
239bc: e2866001 add r6, r6, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
239c0: e1530006 cmp r3, r6 <== NOT EXECUTED
239c4: 8afffff2 bhi 23994 <rtems_rfs_shell_block+0xf0> <== NOT EXECUTED
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
}
printf ("\n");
239c8: e3a0000a mov r0, #10 <== NOT EXECUTED
239cc: eb0094ee bl 48d8c <putchar> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
239d0: e1a00004 mov r0, r4 <== NOT EXECUTED
239d4: e1a0100d mov r1, sp <== NOT EXECUTED
239d8: eb005a87 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
239dc: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
239e0: e3a04000 mov r4, #0 <== NOT EXECUTED
239e4: e5cd4000 strb r4, [sp] <== NOT EXECUTED
handle->bnum = 0;
239e8: e58d4004 str r4, [sp, #4] <== NOT EXECUTED
handle->buffer = NULL;
239ec: e58d4008 str r4, [sp, #8] <== NOT EXECUTED
239f0: ebfffd52 bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
239f4: e1a00004 mov r0, r4 <== NOT EXECUTED
return 0;
239f8: ea000009 b 23a24 <rtems_rfs_shell_block+0x180> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
239fc: e1a00004 mov r0, r4 <== NOT EXECUTED
23a00: ebfffd4e bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
23a04: e1a00006 mov r0, r6 <== NOT EXECUTED
23a08: eb009c8e bl 4ac48 <strerror> <== NOT EXECUTED
23a0c: e1a01005 mov r1, r5 <== NOT EXECUTED
23a10: e1a03000 mov r3, r0 <== NOT EXECUTED
23a14: e1a02006 mov r2, r6 <== NOT EXECUTED
23a18: e59f0080 ldr r0, [pc, #128] ; 23aa0 <rtems_rfs_shell_block+0x1fc><== NOT EXECUTED
23a1c: eb009465 bl 48bb8 <printf> <== NOT EXECUTED
23a20: e3a00001 mov r0, #1 <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
23a24: e28dd010 add sp, sp, #16 <== NOT EXECUTED
23a28: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
int mod = b % 16;
if (mod == 0)
{
if (b)
printf ("\n");
23a2c: e3a0000a mov r0, #10 <== NOT EXECUTED
23a30: eb0094d5 bl 48d8c <putchar> <== NOT EXECUTED
23a34: eaffffcc b 2396c <rtems_rfs_shell_block+0xc8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
23a38: e1a0100d mov r1, sp <== NOT EXECUTED
23a3c: e1a00004 mov r0, r4 <== NOT EXECUTED
23a40: eb005a6d bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
23a44: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
23a48: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
23a4c: e5cd6000 strb r6, [sp] <== NOT EXECUTED
handle->bnum = 0;
23a50: e58d6004 str r6, [sp, #4] <== NOT EXECUTED
23a54: ebfffd39 bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
23a58: e1a00008 mov r0, r8 <== NOT EXECUTED
23a5c: eb009c79 bl 4ac48 <strerror> <== NOT EXECUTED
23a60: e1a01005 mov r1, r5 <== NOT EXECUTED
23a64: e1a03000 mov r3, r0 <== NOT EXECUTED
23a68: e1a02008 mov r2, r8 <== NOT EXECUTED
23a6c: e59f0030 ldr r0, [pc, #48] ; 23aa4 <rtems_rfs_shell_block+0x200><== NOT EXECUTED
23a70: eb009450 bl 48bb8 <printf> <== NOT EXECUTED
23a74: e3a00001 mov r0, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
23a78: eaffffe9 b 23a24 <rtems_rfs_shell_block+0x180> <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
23a7c: e59f0024 ldr r0, [pc, #36] ; 23aa8 <rtems_rfs_shell_block+0x204><== NOT EXECUTED
23a80: eb0094f1 bl 48e4c <puts> <== NOT EXECUTED
23a84: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
23a88: eaffffe5 b 23a24 <rtems_rfs_shell_block+0x180> <== NOT EXECUTED
00023aac <rtems_rfs_shell_data>:
return rc;
}
static int
rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
{
23aac: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
23ab0: e1a04000 mov r4, r0 <== NOT EXECUTED
23ab4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
size_t blocks;
size_t inodes;
int bpcent;
int ipcent;
printf ("RFS Filesystem Data\n");
23ab8: e59f01a4 ldr r0, [pc, #420] ; 23c64 <rtems_rfs_shell_data+0x1b8><== NOT EXECUTED
23abc: eb0094e2 bl 48e4c <puts> <== NOT EXECUTED
printf (" flags: %08" PRIx32 "\n", fs->flags);
23ac0: e5941000 ldr r1, [r4] <== NOT EXECUTED
23ac4: e59f019c ldr r0, [pc, #412] ; 23c68 <rtems_rfs_shell_data+0x1bc><== NOT EXECUTED
23ac8: eb00943a bl 48bb8 <printf> <== NOT EXECUTED
#if 0
printf (" device: %08lx\n", rtems_rfs_fs_device (fs));
#endif
printf (" blocks: %zu\n", rtems_rfs_fs_blocks (fs));
23acc: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
23ad0: e59f0194 ldr r0, [pc, #404] ; 23c6c <rtems_rfs_shell_data+0x1c0><== NOT EXECUTED
23ad4: eb009437 bl 48bb8 <printf> <== NOT EXECUTED
printf (" block size: %zu\n", rtems_rfs_fs_block_size (fs));
23ad8: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
23adc: e59f018c ldr r0, [pc, #396] ; 23c70 <rtems_rfs_shell_data+0x1c4><== NOT EXECUTED
23ae0: eb009434 bl 48bb8 <printf> <== NOT EXECUTED
printf (" size: %" PRIu64 "\n", rtems_rfs_fs_size (fs));
23ae4: e1a00004 mov r0, r4 <== NOT EXECUTED
23ae8: eb00615a bl 3c058 <rtems_rfs_fs_size> <== NOT EXECUTED
23aec: e1a02001 mov r2, r1 <== NOT EXECUTED
23af0: e1a01000 mov r1, r0 <== NOT EXECUTED
23af4: e59f0178 ldr r0, [pc, #376] ; 23c74 <rtems_rfs_shell_data+0x1c8><== NOT EXECUTED
23af8: eb00942e bl 48bb8 <printf> <== NOT EXECUTED
printf (" media block size: %" PRIu32 "\n", rtems_rfs_fs_media_block_size (fs));
23afc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
23b00: e59f0170 ldr r0, [pc, #368] ; 23c78 <rtems_rfs_shell_data+0x1cc><== NOT EXECUTED
23b04: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
23b08: eb00942a bl 48bb8 <printf> <== NOT EXECUTED
printf (" media size: %" PRIu64 "\n", rtems_rfs_fs_media_size (fs));
23b0c: e1a00004 mov r0, r4 <== NOT EXECUTED
23b10: eb006158 bl 3c078 <rtems_rfs_fs_media_size> <== NOT EXECUTED
23b14: e1a02001 mov r2, r1 <== NOT EXECUTED
23b18: e1a01000 mov r1, r0 <== NOT EXECUTED
23b1c: e59f0158 ldr r0, [pc, #344] ; 23c7c <rtems_rfs_shell_data+0x1d0><== NOT EXECUTED
23b20: eb009424 bl 48bb8 <printf> <== NOT EXECUTED
printf (" inodes: %" PRIu32 "\n", rtems_rfs_fs_inodes (fs));
23b24: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
23b28: e59f0150 ldr r0, [pc, #336] ; 23c80 <rtems_rfs_shell_data+0x1d4><== NOT EXECUTED
23b2c: eb009421 bl 48bb8 <printf> <== NOT EXECUTED
printf (" bad blocks: %" PRIu32 "\n", fs->bad_blocks);
23b30: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
23b34: e59f0148 ldr r0, [pc, #328] ; 23c84 <rtems_rfs_shell_data+0x1d8><== NOT EXECUTED
23b38: eb00941e bl 48bb8 <printf> <== NOT EXECUTED
printf (" max. name length: %" PRIu32 "\n", rtems_rfs_fs_max_name (fs));
23b3c: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
23b40: e59f0140 ldr r0, [pc, #320] ; 23c88 <rtems_rfs_shell_data+0x1dc><== NOT EXECUTED
23b44: eb00941b bl 48bb8 <printf> <== NOT EXECUTED
printf (" groups: %d\n", fs->group_count);
23b48: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
23b4c: e59f0138 ldr r0, [pc, #312] ; 23c8c <rtems_rfs_shell_data+0x1e0><== NOT EXECUTED
23b50: eb009418 bl 48bb8 <printf> <== NOT EXECUTED
printf (" group blocks: %zd\n", fs->group_blocks);
23b54: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
23b58: e59f0130 ldr r0, [pc, #304] ; 23c90 <rtems_rfs_shell_data+0x1e4><== NOT EXECUTED
23b5c: eb009415 bl 48bb8 <printf> <== NOT EXECUTED
printf (" group inodes: %zd\n", fs->group_inodes);
23b60: e5941028 ldr r1, [r4, #40] ; 0x28 <== NOT EXECUTED
23b64: e59f0128 ldr r0, [pc, #296] ; 23c94 <rtems_rfs_shell_data+0x1e8><== NOT EXECUTED
23b68: eb009412 bl 48bb8 <printf> <== NOT EXECUTED
printf (" inodes per block: %zd\n", fs->inodes_per_block);
23b6c: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
23b70: e59f0120 ldr r0, [pc, #288] ; 23c98 <rtems_rfs_shell_data+0x1ec><== NOT EXECUTED
23b74: eb00940f bl 48bb8 <printf> <== NOT EXECUTED
printf (" blocks per block: %zd\n", fs->blocks_per_block);
23b78: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
23b7c: e59f0118 ldr r0, [pc, #280] ; 23c9c <rtems_rfs_shell_data+0x1f0><== NOT EXECUTED
23b80: eb00940c bl 48bb8 <printf> <== NOT EXECUTED
printf (" singly blocks: %zd\n", fs->block_map_singly_blocks);
23b84: e5941034 ldr r1, [r4, #52] ; 0x34 <== NOT EXECUTED
23b88: e59f0110 ldr r0, [pc, #272] ; 23ca0 <rtems_rfs_shell_data+0x1f4><== NOT EXECUTED
23b8c: eb009409 bl 48bb8 <printf> <== NOT EXECUTED
printf (" doublly blocks: %zd\n", fs->block_map_doubly_blocks);
23b90: e5941038 ldr r1, [r4, #56] ; 0x38 <== NOT EXECUTED
23b94: e59f0108 ldr r0, [pc, #264] ; 23ca4 <rtems_rfs_shell_data+0x1f8><== NOT EXECUTED
23b98: eb009406 bl 48bb8 <printf> <== NOT EXECUTED
printf (" max. held buffers: %" PRId32 "\n", fs->max_held_buffers);
23b9c: e594103c ldr r1, [r4, #60] ; 0x3c <== NOT EXECUTED
23ba0: e59f0100 ldr r0, [pc, #256] ; 23ca8 <rtems_rfs_shell_data+0x1fc><== NOT EXECUTED
23ba4: eb009403 bl 48bb8 <printf> <== NOT EXECUTED
23ba8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
23bac: e3a01000 mov r1, #0 <== NOT EXECUTED
23bb0: e5930000 ldr r0, [r3] <== NOT EXECUTED
23bb4: e1a02001 mov r2, r1 <== NOT EXECUTED
23bb8: ebffa241 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rtems_rfs_group_usage (fs, &blocks, &inodes);
23bbc: e1a0200d mov r2, sp <== NOT EXECUTED
23bc0: e28d1004 add r1, sp, #4 <== NOT EXECUTED
23bc4: e1a00004 mov r0, r4 <== NOT EXECUTED
23bc8: eb00660f bl 3d40c <rtems_rfs_group_usage> <== NOT EXECUTED
rtems_rfs_shell_unlock_rfs (fs);
23bcc: e1a00004 mov r0, r4 <== NOT EXECUTED
23bd0: ebfffcda bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
23bd4: e59d6004 ldr r6, [sp, #4] <== NOT EXECUTED
23bd8: e0860106 add r0, r6, r6, lsl #2 <== NOT EXECUTED
23bdc: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
23be0: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
23be4: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
23be8: e1a00180 lsl r0, r0, #3 <== NOT EXECUTED
23bec: eb00e262 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
23bf0: e1a07000 mov r7, r0 <== NOT EXECUTED
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
23bf4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
23bf8: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
23bfc: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
23c00: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
23c04: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
23c08: e1a00180 lsl r0, r0, #3 <== NOT EXECUTED
23c0c: eb00e25a bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
23c10: e59f5094 ldr r5, [pc, #148] ; 23cac <rtems_rfs_shell_data+0x200><== NOT EXECUTED
23c14: e0c23795 smull r3, r2, r5, r7 <== NOT EXECUTED
23c18: e1a03fc7 asr r3, r7, #31 <== NOT EXECUTED
23c1c: e0632142 rsb r2, r3, r2, asr #2 <== NOT EXECUTED
23c20: e0823102 add r3, r2, r2, lsl #2 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
23c24: e1a04000 mov r4, r0 <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
23c28: e0473083 sub r3, r7, r3, lsl #1 <== NOT EXECUTED
23c2c: e1a01006 mov r1, r6 <== NOT EXECUTED
23c30: e59f0078 ldr r0, [pc, #120] ; 23cb0 <rtems_rfs_shell_data+0x204><== NOT EXECUTED
23c34: eb0093df bl 48bb8 <printf> <== NOT EXECUTED
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
23c38: e0c23495 smull r3, r2, r5, r4 <== NOT EXECUTED
23c3c: e1a03fc4 asr r3, r4, #31 <== NOT EXECUTED
23c40: e0632142 rsb r2, r3, r2, asr #2 <== NOT EXECUTED
23c44: e0823102 add r3, r2, r2, lsl #2 <== NOT EXECUTED
23c48: e0443083 sub r3, r4, r3, lsl #1 <== NOT EXECUTED
23c4c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
23c50: e59f005c ldr r0, [pc, #92] ; 23cb4 <rtems_rfs_shell_data+0x208><== NOT EXECUTED
23c54: eb0093d7 bl 48bb8 <printf> <== NOT EXECUTED
inodes, ipcent / 10, ipcent % 10);
return 0;
}
23c58: e3a00000 mov r0, #0 <== NOT EXECUTED
23c5c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
23c60: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00023598 <rtems_rfs_shell_dir>:
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
23598: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
2359c: e3510001 cmp r1, #1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
235a0: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
235a4: e1a07000 mov r7, r0 <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
235a8: da0000aa ble 23858 <rtems_rfs_shell_dir+0x2c0> <== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
235ac: e3a01000 mov r1, #0 <== NOT EXECUTED
235b0: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
235b4: e1a02001 mov r2, r1 <== NOT EXECUTED
235b8: eb00a44a bl 4c6e8 <strtoul> <== NOT EXECUTED
235bc: e597307c ldr r3, [r7, #124] ; 0x7c <== NOT EXECUTED
235c0: e3a01000 mov r1, #0 <== NOT EXECUTED
235c4: e1a02001 mov r2, r1 <== NOT EXECUTED
235c8: e1a04000 mov r4, r0 <== NOT EXECUTED
235cc: e5930000 ldr r0, [r3] <== NOT EXECUTED
235d0: ebffa3bb bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
235d4: e1a00007 mov r0, r7 <== NOT EXECUTED
235d8: e3a01000 mov r1, #0 <== NOT EXECUTED
235dc: e1a02004 mov r2, r4 <== NOT EXECUTED
235e0: e28d301f add r3, sp, #31 <== NOT EXECUTED
235e4: eb0067ad bl 3d4a0 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
235e8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
235ec: ca00006a bgt 2379c <rtems_rfs_shell_dir+0x204> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
235f0: e5dd101f ldrb r1, [sp, #31] <== NOT EXECUTED
235f4: e59f3280 ldr r3, [pc, #640] ; 2387c <rtems_rfs_shell_dir+0x2e4><== NOT EXECUTED
235f8: e3510000 cmp r1, #0 <== NOT EXECUTED
235fc: e59f227c ldr r2, [pc, #636] ; 23880 <rtems_rfs_shell_dir+0x2e8><== NOT EXECUTED
23600: e1a01004 mov r1, r4 <== NOT EXECUTED
23604: 01a02003 moveq r2, r3 <== NOT EXECUTED
23608: e59f0274 ldr r0, [pc, #628] ; 23884 <rtems_rfs_shell_dir+0x2ec><== NOT EXECUTED
2360c: eb009569 bl 48bb8 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
23610: e3a08000 mov r8, #0 <== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
23614: e1a00007 mov r0, r7 <== NOT EXECUTED
23618: e28d1010 add r1, sp, #16 <== NOT EXECUTED
2361c: e1a02004 mov r2, r4 <== NOT EXECUTED
23620: e3a03001 mov r3, #1 <== NOT EXECUTED
23624: e5cd8010 strb r8, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
23628: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
handle->buffer = NULL;
2362c: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
23630: eb005bbb bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
23634: e2505000 subs r5, r0, #0 <== NOT EXECUTED
23638: ca000075 bgt 23814 <rtems_rfs_shell_dir+0x27c> <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
2363c: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
23640: e353000b cmp r3, #11 <== NOT EXECUTED
return 1;
}
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
23644: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
23648: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
2364c: 0a000065 beq 237e8 <rtems_rfs_shell_dir+0x250> <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
23650: e5d53009 ldrb r3, [r5, #9] <== NOT EXECUTED
23654: e5d56008 ldrb r6, [r5, #8] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
23658: e3a0b801 mov fp, #65536 ; 0x10000 <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
2365c: e1836406 orr r6, r3, r6, lsl #8 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
23660: e24bb001 sub fp, fp, #1 <== NOT EXECUTED
23664: e156000b cmp r6, fp <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
23668: e5d50000 ldrb r0, [r5] <== NOT EXECUTED
2366c: e5d52001 ldrb r2, [r5, #1] <== NOT EXECUTED
23670: e5d53002 ldrb r3, [r5, #2] <== NOT EXECUTED
23674: e5d51003 ldrb r1, [r5, #3] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
23678: 0a00005a beq 237e8 <rtems_rfs_shell_dir+0x250> <== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
2367c: e3560009 cmp r6, #9 <== NOT EXECUTED
23680: d3a09001 movle r9, #1 <== NOT EXECUTED
23684: da000053 ble 237d8 <rtems_rfs_shell_dir+0x240> <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
23688: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
2368c: e1812802 orr r2, r1, r2, lsl #16 <== NOT EXECUTED
23690: e1823403 orr r3, r2, r3, lsl #8 <== NOT EXECUTED
23694: e3a09001 mov r9, #1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
(elength >= rtems_rfs_fs_max_name (fs)))
23698: e5972018 ldr r2, [r7, #24] <== NOT EXECUTED
2369c: e1560002 cmp r6, r2 <== NOT EXECUTED
236a0: 2a00004c bcs 237d8 <rtems_rfs_shell_dir+0x240> <== NOT EXECUTED
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
break;
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
236a4: e3530000 cmp r3, #0 <== NOT EXECUTED
236a8: 0a00006e beq 23868 <rtems_rfs_shell_dir+0x2d0> <== NOT EXECUTED
236ac: e5972010 ldr r2, [r7, #16] <== NOT EXECUTED
236b0: e1520003 cmp r2, r3 <== NOT EXECUTED
236b4: 9a00006b bls 23868 <rtems_rfs_shell_dir+0x2d0> <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
236b8: e5d5c005 ldrb ip, [r5, #5] <== NOT EXECUTED
236bc: e5d52004 ldrb r2, [r5, #4] <== NOT EXECUTED
236c0: e5d51007 ldrb r1, [r5, #7] <== NOT EXECUTED
236c4: e1a0c80c lsl ip, ip, #16 <== NOT EXECUTED
236c8: e18ccc02 orr ip, ip, r2, lsl #24 <== NOT EXECUTED
236cc: e5d52006 ldrb r2, [r5, #6] <== NOT EXECUTED
236d0: e18cc001 orr ip, ip, r1 <== NOT EXECUTED
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
236d4: e246a00a sub sl, r6, #10 <== NOT EXECUTED
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
236d8: e18cc402 orr ip, ip, r2, lsl #8 <== NOT EXECUTED
236dc: e35a0032 cmp sl, #50 ; 0x32 <== NOT EXECUTED
236e0: b1a0400a movlt r4, sl <== NOT EXECUTED
236e4: a3a04032 movge r4, #50 ; 0x32 <== NOT EXECUTED
236e8: e59f0198 ldr r0, [pc, #408] ; 23888 <rtems_rfs_shell_dir+0x2f0><== NOT EXECUTED
236ec: e1a01009 mov r1, r9 <== NOT EXECUTED
236f0: e1a02008 mov r2, r8 <== NOT EXECUTED
236f4: e58dc000 str ip, [sp] <== NOT EXECUTED
236f8: e58da004 str sl, [sp, #4] <== NOT EXECUTED
236fc: eb00952d bl 48bb8 <printf> <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
23700: e3540000 cmp r4, #0 <== NOT EXECUTED
23704: da00000b ble 23738 <rtems_rfs_shell_dir+0x1a0> <== NOT EXECUTED
23708: e1a02005 mov r2, r5 <== NOT EXECUTED
2370c: e3a03000 mov r3, #0 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
23710: e5d2000a ldrb r0, [r2, #10] <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
23714: e2833001 add r3, r3, #1 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
23718: e58d200c str r2, [sp, #12] <== NOT EXECUTED
2371c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
23720: eb009599 bl 48d8c <putchar> <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
23724: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
23728: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
2372c: e1540003 cmp r4, r3 <== NOT EXECUTED
23730: e2822001 add r2, r2, #1 <== NOT EXECUTED
23734: cafffff5 bgt 23710 <rtems_rfs_shell_dir+0x178> <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
23738: e15a0004 cmp sl, r4 <== NOT EXECUTED
2373c: ca000022 bgt 237cc <rtems_rfs_shell_dir+0x234> <== NOT EXECUTED
printf ("...");
printf ("\n");
23740: e3a0000a mov r0, #10 <== NOT EXECUTED
23744: eb009590 bl 48d8c <putchar> <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
23748: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
printf ("\n");
b += elength;
2374c: e0888006 add r8, r8, r6 <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
23750: e243300b sub r3, r3, #11 <== NOT EXECUTED
23754: e1580003 cmp r8, r3 <== NOT EXECUTED
23758: 2a000022 bcs 237e8 <rtems_rfs_shell_dir+0x250> <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
2375c: e7f50006 ldrb r0, [r5, r6]! <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
23760: e5d52009 ldrb r2, [r5, #9] <== NOT EXECUTED
23764: e5d56008 ldrb r6, [r5, #8] <== NOT EXECUTED
23768: e1826406 orr r6, r2, r6, lsl #8 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
2376c: e156000b cmp r6, fp <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
23770: e5d51001 ldrb r1, [r5, #1] <== NOT EXECUTED
23774: e5d52002 ldrb r2, [r5, #2] <== NOT EXECUTED
23778: e5d53003 ldrb r3, [r5, #3] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
2377c: 0a000019 beq 237e8 <rtems_rfs_shell_dir+0x250> <== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
23780: e3560009 cmp r6, #9 <== NOT EXECUTED
printf ("...");
printf ("\n");
b += elength;
data += elength;
entry++;
23784: e2899001 add r9, r9, #1 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
23788: da000012 ble 237d8 <rtems_rfs_shell_dir+0x240> <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
2378c: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
23790: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
23794: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
23798: eaffffbe b 23698 <rtems_rfs_shell_dir+0x100> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
2379c: e1a00007 mov r0, r7 <== NOT EXECUTED
237a0: ebfffde6 bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
237a4: e1a00005 mov r0, r5 <== NOT EXECUTED
237a8: eb009d26 bl 4ac48 <strerror> <== NOT EXECUTED
237ac: e1a01004 mov r1, r4 <== NOT EXECUTED
237b0: e1a03000 mov r3, r0 <== NOT EXECUTED
237b4: e1a02005 mov r2, r5 <== NOT EXECUTED
237b8: e59f00cc ldr r0, [pc, #204] ; 2388c <rtems_rfs_shell_dir+0x2f4><== NOT EXECUTED
237bc: eb0094fd bl 48bb8 <printf> <== NOT EXECUTED
237c0: e3a00001 mov r0, #1 <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
237c4: e28dd020 add sp, sp, #32 <== NOT EXECUTED
237c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
length = 50;
for (c = 0; c < length; c++)
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
237cc: e59f00bc ldr r0, [pc, #188] ; 23890 <rtems_rfs_shell_dir+0x2f8><== NOT EXECUTED
237d0: eb0094f8 bl 48bb8 <printf> <== NOT EXECUTED
237d4: eaffffd9 b 23740 <rtems_rfs_shell_dir+0x1a8> <== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
(elength >= rtems_rfs_fs_max_name (fs)))
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
237d8: e1a01009 mov r1, r9 <== NOT EXECUTED
237dc: e1a02006 mov r2, r6 <== NOT EXECUTED
237e0: e59f00ac ldr r0, [pc, #172] ; 23894 <rtems_rfs_shell_dir+0x2fc><== NOT EXECUTED
237e4: eb0094f3 bl 48bb8 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
237e8: e28d1010 add r1, sp, #16 <== NOT EXECUTED
237ec: e1a00007 mov r0, r7 <== NOT EXECUTED
237f0: eb005b01 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
237f4: e3a04000 mov r4, #0 <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
237f8: e1a00007 mov r0, r7 <== NOT EXECUTED
237fc: e5cd4010 strb r4, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
23800: e58d4014 str r4, [sp, #20] <== NOT EXECUTED
handle->buffer = NULL;
23804: e58d4018 str r4, [sp, #24] <== NOT EXECUTED
23808: ebfffdcc bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2380c: e1a00004 mov r0, r4 <== NOT EXECUTED
return 0;
23810: eaffffeb b 237c4 <rtems_rfs_shell_dir+0x22c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
23814: e28d1010 add r1, sp, #16 <== NOT EXECUTED
23818: e1a00007 mov r0, r7 <== NOT EXECUTED
2381c: eb005af6 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
23820: e1a00007 mov r0, r7 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
23824: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
23828: e5cd8010 strb r8, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
2382c: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
23830: ebfffdc2 bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
23834: e1a00005 mov r0, r5 <== NOT EXECUTED
23838: eb009d02 bl 4ac48 <strerror> <== NOT EXECUTED
2383c: e1a01004 mov r1, r4 <== NOT EXECUTED
23840: e1a03000 mov r3, r0 <== NOT EXECUTED
23844: e1a02005 mov r2, r5 <== NOT EXECUTED
23848: e59f0048 ldr r0, [pc, #72] ; 23898 <rtems_rfs_shell_dir+0x300><== NOT EXECUTED
2384c: eb0094d9 bl 48bb8 <printf> <== NOT EXECUTED
23850: e3a00001 mov r0, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
23854: eaffffda b 237c4 <rtems_rfs_shell_dir+0x22c> <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
23858: e59f003c ldr r0, [pc, #60] ; 2389c <rtems_rfs_shell_dir+0x304><== NOT EXECUTED
2385c: eb00957a bl 48e4c <puts> <== NOT EXECUTED
23860: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
23864: eaffffd6 b 237c4 <rtems_rfs_shell_dir+0x22c> <== NOT EXECUTED
break;
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
23868: e1a01009 mov r1, r9 <== NOT EXECUTED
2386c: e1a02003 mov r2, r3 <== NOT EXECUTED
23870: e59f0028 ldr r0, [pc, #40] ; 238a0 <rtems_rfs_shell_dir+0x308><== NOT EXECUTED
23874: eb0094cf bl 48bb8 <printf> <== NOT EXECUTED
break;
23878: eaffffda b 237e8 <rtems_rfs_shell_dir+0x250> <== NOT EXECUTED
00023400 <rtems_rfs_shell_group>:
return 0;
}
static int
rtems_rfs_shell_group (rtems_rfs_file_system* fs, int argc, char *argv[])
{
23400: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int g;
start = 0;
end = fs->group_count - 1;
switch (argc)
23404: e3510002 cmp r1, #2 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_group (rtems_rfs_file_system* fs, int argc, char *argv[])
{
23408: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
2340c: e1a06000 mov r6, r0 <== NOT EXECUTED
23410: e1a05002 mov r5, r2 <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
23414: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
switch (argc)
23418: 0a000025 beq 234b4 <rtems_rfs_shell_group+0xb4> <== NOT EXECUTED
2341c: e3510003 cmp r1, #3 <== NOT EXECUTED
23420: 0a000015 beq 2347c <rtems_rfs_shell_group+0x7c> <== NOT EXECUTED
23424: e3510001 cmp r1, #1 <== NOT EXECUTED
23428: 0a000004 beq 23440 <rtems_rfs_shell_group+0x40> <== NOT EXECUTED
case 3:
start = strtoul (argv[1], 0, 0);
end = strtoul (argv[2], 0, 0);
break;
default:
printf ("error: too many arguments.\n");
2342c: e59f0158 ldr r0, [pc, #344] ; 2358c <rtems_rfs_shell_group+0x18c><== NOT EXECUTED
23430: eb009685 bl 48e4c <puts> <== NOT EXECUTED
23434: e3a00001 mov r0, #1 <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
23438: e28dd010 add sp, sp, #16 <== NOT EXECUTED
2343c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
23440: e2437001 sub r7, r3, #1 <== NOT EXECUTED
23444: e3a02000 mov r2, #0 <== NOT EXECUTED
23448: e1a01fa7 lsr r1, r7, #31 <== NOT EXECUTED
2344c: e1a04002 mov r4, r2 <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
23450: e1911002 orrs r1, r1, r2 <== NOT EXECUTED
23454: 1a000003 bne 23468 <rtems_rfs_shell_group+0x68> <== NOT EXECUTED
23458: e1540003 cmp r4, r3 <== NOT EXECUTED
2345c: aa000001 bge 23468 <rtems_rfs_shell_group+0x68> <== NOT EXECUTED
23460: e1570003 cmp r7, r3 <== NOT EXECUTED
23464: ba00001c blt 234dc <rtems_rfs_shell_group+0xdc> <== NOT EXECUTED
(start >= fs->group_count) || (end >= fs->group_count))
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
23468: e1a01003 mov r1, r3 <== NOT EXECUTED
2346c: e59f011c ldr r0, [pc, #284] ; 23590 <rtems_rfs_shell_group+0x190><== NOT EXECUTED
23470: eb0095d0 bl 48bb8 <printf> <== NOT EXECUTED
23474: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
23478: eaffffee b 23438 <rtems_rfs_shell_group+0x38> <== NOT EXECUTED
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
break;
case 3:
start = strtoul (argv[1], 0, 0);
2347c: e3a01000 mov r1, #0 <== NOT EXECUTED
23480: e1a02001 mov r2, r1 <== NOT EXECUTED
23484: e5950004 ldr r0, [r5, #4] <== NOT EXECUTED
23488: eb00a496 bl 4c6e8 <strtoul> <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
2348c: e3a01000 mov r1, #0 <== NOT EXECUTED
23490: e1a02001 mov r2, r1 <== NOT EXECUTED
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
break;
case 3:
start = strtoul (argv[1], 0, 0);
23494: e1a04000 mov r4, r0 <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
23498: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
2349c: eb00a491 bl 4c6e8 <strtoul> <== NOT EXECUTED
234a0: e1a02fa4 lsr r2, r4, #31 <== NOT EXECUTED
234a4: e1a07000 mov r7, r0 <== NOT EXECUTED
234a8: e1a01fa0 lsr r1, r0, #31 <== NOT EXECUTED
234ac: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
break;
234b0: eaffffe6 b 23450 <rtems_rfs_shell_group+0x50> <== NOT EXECUTED
switch (argc)
{
case 1:
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
234b4: e3a01000 mov r1, #0 <== NOT EXECUTED
234b8: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
234bc: e1a02001 mov r2, r1 <== NOT EXECUTED
234c0: eb00a488 bl 4c6e8 <strtoul> <== NOT EXECUTED
234c4: e1a02fa0 lsr r2, r0, #31 <== NOT EXECUTED
234c8: e1a07000 mov r7, r0 <== NOT EXECUTED
234cc: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
234d0: e1a01002 mov r1, r2 <== NOT EXECUTED
234d4: e1a04000 mov r4, r0 <== NOT EXECUTED
break;
234d8: eaffffdc b 23450 <rtems_rfs_shell_group+0x50> <== NOT EXECUTED
234dc: e596307c ldr r3, [r6, #124] ; 0x7c <== NOT EXECUTED
234e0: e1a02001 mov r2, r1 <== NOT EXECUTED
234e4: e5930000 ldr r0, [r3] <== NOT EXECUTED
234e8: ebffa3f5 bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
234ec: e1540007 cmp r4, r7 <== NOT EXECUTED
234f0: ca000021 bgt 2357c <rtems_rfs_shell_group+0x17c> <== NOT EXECUTED
234f4: e0845104 add r5, r4, r4, lsl #2 <== NOT EXECUTED
234f8: e1a05205 lsl r5, r5, #4 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
234fc: e596201c ldr r2, [r6, #28] <== NOT EXECUTED
23500: e0821005 add r1, r2, r5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
23504: e5918004 ldr r8, [r1, #4] <== NOT EXECUTED
23508: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
2350c: e0633008 rsb r3, r3, r8 <== NOT EXECUTED
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
23510: e0830103 add r0, r3, r3, lsl #2 <== NOT EXECUTED
23514: e0800100 add r0, r0, r0, lsl #2 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
23518: e591a03c ldr sl, [r1, #60] ; 0x3c <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2351c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
23520: e1a01008 mov r1, r8 <== NOT EXECUTED
23524: e792b005 ldr fp, [r2, r5] <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
23528: e5969028 ldr r9, [r6, #40] ; 0x28 <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2352c: e58d3000 str r3, [sp] <== NOT EXECUTED
23530: eb00e411 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
23534: e06aa009 rsb sl, sl, r9 <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
23538: e08a310a add r3, sl, sl, lsl #2 <== NOT EXECUTED
2353c: e0833103 add r3, r3, r3, lsl #2 <== NOT EXECUTED
23540: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
23544: e1a01009 mov r1, r9 <== NOT EXECUTED
23548: e1a00103 lsl r0, r3, #2 <== NOT EXECUTED
2354c: e58da008 str sl, [sp, #8] <== NOT EXECUTED
23550: eb00e409 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED
23554: e1a01004 mov r1, r4 <== NOT EXECUTED
23558: e58d000c str r0, [sp, #12] <== NOT EXECUTED
2355c: e1a0200b mov r2, fp <== NOT EXECUTED
23560: e1a03008 mov r3, r8 <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
23564: e2844001 add r4, r4, #1 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
23568: e59f0024 ldr r0, [pc, #36] ; 23594 <rtems_rfs_shell_group+0x194><== NOT EXECUTED
2356c: eb009591 bl 48bb8 <printf> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
23570: e1570004 cmp r7, r4 <== NOT EXECUTED
23574: e2855050 add r5, r5, #80 ; 0x50 <== NOT EXECUTED
23578: aaffffdf bge 234fc <rtems_rfs_shell_group+0xfc> <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
}
rtems_rfs_shell_unlock_rfs (fs);
2357c: e1a00006 mov r0, r6 <== NOT EXECUTED
23580: ebfffe6e bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
23584: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
23588: eaffffaa b 23438 <rtems_rfs_shell_group+0x38> <== NOT EXECUTED
00022f58 <rtems_rfs_shell_inode>:
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
22f58: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
22f5c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
22f60: e1a05000 mov r5, r0 <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
22f64: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
22f68: e0030390 mul r3, r0, r3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
22f6c: e24dd04c sub sp, sp, #76 ; 0x4c <== NOT EXECUTED
int b;
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
22f70: e2430001 sub r0, r3, #1 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
22f74: e3510001 cmp r1, #1 <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
22f78: e58d300c str r3, [sp, #12] <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
22f7c: e1a08001 mov r8, r1 <== NOT EXECUTED
22f80: e1a09002 mov r9, r2 <== NOT EXECUTED
int b;
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
22f84: e58d001c str r0, [sp, #28] <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
22f88: da000104 ble 233a0 <rtems_rfs_shell_inode+0x448> <== NOT EXECUTED
22f8c: e3a07000 mov r7, #0 <== NOT EXECUTED
22f90: e3a04001 mov r4, #1 <== NOT EXECUTED
22f94: e59d601c ldr r6, [sp, #28] <== NOT EXECUTED
22f98: e1a0a007 mov sl, r7 <== NOT EXECUTED
22f9c: e58d7018 str r7, [sp, #24] <== NOT EXECUTED
22fa0: e58d7014 str r7, [sp, #20] <== NOT EXECUTED
22fa4: e1a0b007 mov fp, r7 <== NOT EXECUTED
22fa8: e58d4010 str r4, [sp, #16] <== NOT EXECUTED
22fac: ea00000a b 22fdc <rtems_rfs_shell_inode+0x84> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
22fb0: e35a0000 cmp sl, #0 <== NOT EXECUTED
22fb4: 1a0000c2 bne 232c4 <rtems_rfs_shell_inode+0x36c> <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
{
start = end = strtoul (argv[arg], 0, 0);
22fb8: e3a01000 mov r1, #0 <== NOT EXECUTED
22fbc: e1a02001 mov r2, r1 <== NOT EXECUTED
22fc0: eb00a5c8 bl 4c6e8 <strtoul> <== NOT EXECUTED
22fc4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
22fc8: e1a06000 mov r6, r0 <== NOT EXECUTED
22fcc: e3a0a001 mov sl, #1 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
22fd0: e2844001 add r4, r4, #1 <== NOT EXECUTED
22fd4: e1580004 cmp r8, r4 <== NOT EXECUTED
22fd8: da00000f ble 2301c <rtems_rfs_shell_inode+0xc4> <== NOT EXECUTED
{
if (argv[arg][0] == '-')
22fdc: e7990104 ldr r0, [r9, r4, lsl #2] <== NOT EXECUTED
22fe0: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
22fe4: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
22fe8: 0a0000aa beq 23298 <rtems_rfs_shell_inode+0x340> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
22fec: e3570000 cmp r7, #0 <== NOT EXECUTED
22ff0: 1affffee bne 22fb0 <rtems_rfs_shell_inode+0x58> <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
22ff4: e35a0000 cmp sl, #0 <== NOT EXECUTED
22ff8: 0affffee beq 22fb8 <rtems_rfs_shell_inode+0x60> <== NOT EXECUTED
start = end = strtoul (argv[arg], 0, 0);
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
22ffc: e1a01007 mov r1, r7 <== NOT EXECUTED
23000: e1a02007 mov r2, r7 <== NOT EXECUTED
23004: eb00a5b7 bl 4c6e8 <strtoul> <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
23008: e2844001 add r4, r4, #1 <== NOT EXECUTED
2300c: e1580004 cmp r8, r4 <== NOT EXECUTED
start = end = strtoul (argv[arg], 0, 0);
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
23010: e1a06000 mov r6, r0 <== NOT EXECUTED
23014: e3a07001 mov r7, #1 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
23018: caffffef bgt 22fdc <rtems_rfs_shell_inode+0x84> <== NOT EXECUTED
have_end = true;
}
}
}
if ((start >= total) || (end >= total))
2301c: e28d200c add r2, sp, #12 <== NOT EXECUTED
23020: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
23024: e1530002 cmp r3, r2 <== NOT EXECUTED
23028: 31560002 cmpcc r6, r2 <== NOT EXECUTED
2302c: 33a01000 movcc r1, #0 <== NOT EXECUTED
23030: 23a01001 movcs r1, #1 <== NOT EXECUTED
23034: 2a0000bb bcs 23328 <rtems_rfs_shell_inode+0x3d0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
23038: e595307c ldr r3, [r5, #124] ; 0x7c <== NOT EXECUTED
2303c: e1a02001 mov r2, r1 <== NOT EXECUTED
23040: e5930000 ldr r0, [r3] <== NOT EXECUTED
23044: ebffa51e bl c4c4 <rtems_semaphore_obtain> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
23048: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2304c: e1530006 cmp r3, r6 <== NOT EXECUTED
23050: 8a00008c bhi 23288 <rtems_rfs_shell_inode+0x330> <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
23054: e3a00801 mov r0, #65536 ; 0x10000 <== NOT EXECUTED
23058: e2400001 sub r0, r0, #1 <== NOT EXECUTED
2305c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
23060: e1a04003 mov r4, r3 <== NOT EXECUTED
23064: e28da04b add sl, sp, #75 ; 0x4b <== NOT EXECUTED
if (show_all || allocated)
{
uint16_t mode;
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
23068: e28d8020 add r8, sp, #32 <== NOT EXECUTED
2306c: e1a09006 mov r9, r6 <== NOT EXECUTED
for (ino = start; ino <= end; ino++)
{
rtems_rfs_inode_handle inode;
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
23070: e1a00005 mov r0, r5 <== NOT EXECUTED
23074: e3a01001 mov r1, #1 <== NOT EXECUTED
23078: e1a02004 mov r2, r4 <== NOT EXECUTED
2307c: e1a0300a mov r3, sl <== NOT EXECUTED
23080: eb006906 bl 3d4a0 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
23084: e3500000 cmp r0, #0 <== NOT EXECUTED
23088: ca0000ac bgt 23340 <rtems_rfs_shell_inode+0x3e8> <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
ino, rc, strerror (rc));
return 1;
}
if (show_all || allocated)
2308c: e35b0000 cmp fp, #0 <== NOT EXECUTED
23090: 1a000002 bne 230a0 <rtems_rfs_shell_inode+0x148> <== NOT EXECUTED
23094: e5dd304b ldrb r3, [sp, #75] ; 0x4b <== NOT EXECUTED
23098: e3530000 cmp r3, #0 <== NOT EXECUTED
2309c: 0a000076 beq 2327c <rtems_rfs_shell_inode+0x324> <== NOT EXECUTED
{
uint16_t mode;
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
230a0: e1a00005 mov r0, r5 <== NOT EXECUTED
230a4: e1a01004 mov r1, r4 <== NOT EXECUTED
230a8: e1a02008 mov r2, r8 <== NOT EXECUTED
230ac: e3a03001 mov r3, #1 <== NOT EXECUTED
230b0: eb006b1f bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
230b4: e3500000 cmp r0, #0 <== NOT EXECUTED
230b8: ca0000ac bgt 23370 <rtems_rfs_shell_inode+0x418> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
230bc: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
error = false;
mode = rtems_rfs_inode_get_mode (&inode);
if (error_check_only)
230c0: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
230c4: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
230c8: e5d36002 ldrb r6, [r3, #2] <== NOT EXECUTED
230cc: e3510000 cmp r1, #0 <== NOT EXECUTED
230d0: e1826406 orr r6, r2, r6, lsl #8 <== NOT EXECUTED
230d4: 0a000009 beq 23100 <rtems_rfs_shell_inode+0x1a8> <== NOT EXECUTED
{
if (!RTEMS_RFS_S_ISDIR (mode) &&
230d8: e2063a0f and r3, r6, #61440 ; 0xf000 <== NOT EXECUTED
230dc: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
230e0: 13530901 cmpne r3, #16384 ; 0x4000 <== NOT EXECUTED
230e4: 0a00005f beq 23268 <rtems_rfs_shell_inode+0x310> <== NOT EXECUTED
230e8: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
230ec: 0a00005d beq 23268 <rtems_rfs_shell_inode+0x310> <== NOT EXECUTED
230f0: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
230f4: 0a00005b beq 23268 <rtems_rfs_shell_inode+0x310> <== NOT EXECUTED
}
#endif
}
}
if (!error_check_only || error)
230f8: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
230fc: 0a000059 beq 23268 <rtems_rfs_shell_inode+0x310> <== NOT EXECUTED
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
23100: e5ddc04b ldrb ip, [sp, #75] ; 0x4b <== NOT EXECUTED
23104: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
23108: e35c0000 cmp ip, #0 <== NOT EXECUTED
2310c: e1a02303 lsl r2, r3, #6 <== NOT EXECUTED
23110: 13a0c041 movne ip, #65 ; 0x41 <== NOT EXECUTED
23114: 03a0c046 moveq ip, #70 ; 0x46 <== NOT EXECUTED
23118: e0423183 sub r3, r2, r3, lsl #3 <== NOT EXECUTED
2311c: e59f029c ldr r0, [pc, #668] ; 233c0 <rtems_rfs_shell_inode+0x468><== NOT EXECUTED
23120: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
23124: e1a01004 mov r1, r4 <== NOT EXECUTED
23128: e58dc000 str ip, [sp] <== NOT EXECUTED
2312c: eb0096a1 bl 48bb8 <printf> <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
23130: e5dd304b ldrb r3, [sp, #75] ; 0x4b <== NOT EXECUTED
23134: e3530000 cmp r3, #0 <== NOT EXECUTED
23138: 1a000002 bne 23148 <rtems_rfs_shell_inode+0x1f0> <== NOT EXECUTED
2313c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
23140: e3520000 cmp r2, #0 <== NOT EXECUTED
23144: 0a000064 beq 232dc <rtems_rfs_shell_inode+0x384> <== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
23148: e2063a0f and r3, r6, #61440 ; 0xf000 <== NOT EXECUTED
2314c: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
23150: 059f326c ldreq r3, [pc, #620] ; 233c4 <rtems_rfs_shell_inode+0x46c><== NOT EXECUTED
23154: 0a00000d beq 23190 <rtems_rfs_shell_inode+0x238> <== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
23158: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
2315c: 059f3264 ldreq r3, [pc, #612] ; 233c8 <rtems_rfs_shell_inode+0x470><== NOT EXECUTED
23160: 0a00000a beq 23190 <rtems_rfs_shell_inode+0x238> <== NOT EXECUTED
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
23164: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
23168: 059f325c ldreq r3, [pc, #604] ; 233cc <rtems_rfs_shell_inode+0x474><== NOT EXECUTED
2316c: 0a000007 beq 23190 <rtems_rfs_shell_inode+0x238> <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
23170: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
23174: 059f3254 ldreq r3, [pc, #596] ; 233d0 <rtems_rfs_shell_inode+0x478><== NOT EXECUTED
23178: 0a000004 beq 23190 <rtems_rfs_shell_inode+0x238> <== NOT EXECUTED
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
2317c: e59f1250 ldr r1, [pc, #592] ; 233d4 <rtems_rfs_shell_inode+0x47c><== NOT EXECUTED
23180: e59f0250 ldr r0, [pc, #592] ; 233d8 <rtems_rfs_shell_inode+0x480><== NOT EXECUTED
23184: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
23188: 01a00001 moveq r0, r1 <== NOT EXECUTED
2318c: e1a03000 mov r3, r0 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
23190: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
23194: e1a02b06 lsl r2, r6, #22 <== NOT EXECUTED
23198: e1a02b22 lsr r2, r2, #22 <== NOT EXECUTED
2319c: e5d0e000 ldrb lr, [r0] <== NOT EXECUTED
231a0: e5d01001 ldrb r1, [r0, #1] <== NOT EXECUTED
231a4: e58d2000 str r2, [sp] <== NOT EXECUTED
231a8: e5d0c00a ldrb ip, [r0, #10] <== NOT EXECUTED
231ac: e5d0200b ldrb r2, [r0, #11] <== NOT EXECUTED
231b0: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
231b4: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
231b8: e280200c add r2, r0, #12 <== NOT EXECUTED
231bc: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
231c0: e5d0700c ldrb r7, [r0, #12] <== NOT EXECUTED
231c4: e5d20001 ldrb r0, [r2, #1] <== NOT EXECUTED
231c8: e18c7c07 orr r7, ip, r7, lsl #24 <== NOT EXECUTED
231cc: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
231d0: e187c800 orr ip, r7, r0, lsl #16 <== NOT EXECUTED
231d4: e18cc402 orr ip, ip, r2, lsl #8 <== NOT EXECUTED
231d8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
231dc: e181140e orr r1, r1, lr, lsl #8 <== NOT EXECUTED
231e0: e1510002 cmp r1, r2 <== NOT EXECUTED
231e4: 03a01000 moveq r1, #0 <== NOT EXECUTED
231e8: e1a02006 mov r2, r6 <== NOT EXECUTED
231ec: e59f01e8 ldr r0, [pc, #488] ; 233dc <rtems_rfs_shell_inode+0x484><== NOT EXECUTED
231f0: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
231f4: eb00966f bl 48bb8 <printf> <== NOT EXECUTED
231f8: e3a06000 mov r6, #0 <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
231fc: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
23200: e282201c add r2, r2, #28 <== NOT EXECUTED
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
23204: e0823006 add r3, r2, r6 <== NOT EXECUTED
23208: e7d21006 ldrb r1, [r2, r6] <== NOT EXECUTED
2320c: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
23210: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
23214: e1822c01 orr r2, r2, r1, lsl #24 <== NOT EXECUTED
23218: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
2321c: e1823800 orr r3, r2, r0, lsl #16 <== NOT EXECUTED
23220: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
23224: e2866004 add r6, r6, #4 <== NOT EXECUTED
23228: e59f01b0 ldr r0, [pc, #432] ; 233e0 <rtems_rfs_shell_inode+0x488><== NOT EXECUTED
2322c: eb009661 bl 48bb8 <printf> <== NOT EXECUTED
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
23230: e3560010 cmp r6, #16 <== NOT EXECUTED
23234: 1afffff0 bne 231fc <rtems_rfs_shell_inode+0x2a4> <== NOT EXECUTED
23238: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
2323c: e283301c add r3, r3, #28 <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
23240: e5d30011 ldrb r0, [r3, #17] <== NOT EXECUTED
23244: e5d31010 ldrb r1, [r3, #16] <== NOT EXECUTED
23248: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
2324c: e5d32013 ldrb r2, [r3, #19] <== NOT EXECUTED
23250: e1800c01 orr r0, r0, r1, lsl #24 <== NOT EXECUTED
23254: e5d31012 ldrb r1, [r3, #18] <== NOT EXECUTED
23258: e1803002 orr r3, r0, r2 <== NOT EXECUTED
2325c: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
23260: e59f017c ldr r0, [pc, #380] ; 233e4 <rtems_rfs_shell_inode+0x48c><== NOT EXECUTED
23264: eb009653 bl 48bb8 <printf> <== NOT EXECUTED
}
}
rc = rtems_rfs_inode_close (fs, &inode);
23268: e1a00005 mov r0, r5 <== NOT EXECUTED
2326c: e1a01008 mov r1, r8 <== NOT EXECUTED
23270: eb006a8b bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
23274: e3500000 cmp r0, #0 <== NOT EXECUTED
23278: ca00001e bgt 232f8 <rtems_rfs_shell_inode+0x3a0> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
2327c: e2844001 add r4, r4, #1 <== NOT EXECUTED
23280: e1540009 cmp r4, r9 <== NOT EXECUTED
23284: 9affff79 bls 23070 <rtems_rfs_shell_inode+0x118> <== NOT EXECUTED
return 1;
}
}
}
rtems_rfs_shell_unlock_rfs (fs);
23288: e1a00005 mov r0, r5 <== NOT EXECUTED
2328c: ebffff2b bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
23290: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
23294: ea000027 b 23338 <rtems_rfs_shell_inode+0x3e0> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
23298: e5d03001 ldrb r3, [r0, #1] <== NOT EXECUTED
2329c: e3530065 cmp r3, #101 ; 0x65 <== NOT EXECUTED
232a0: 03a03001 moveq r3, #1 <== NOT EXECUTED
232a4: 058d3014 streq r3, [sp, #20] <== NOT EXECUTED
232a8: 0affff48 beq 22fd0 <rtems_rfs_shell_inode+0x78> <== NOT EXECUTED
232ac: e3530066 cmp r3, #102 ; 0x66 <== NOT EXECUTED
232b0: 03a00001 moveq r0, #1 <== NOT EXECUTED
232b4: 058d0018 streq r0, [sp, #24] <== NOT EXECUTED
232b8: 0affff44 beq 22fd0 <rtems_rfs_shell_inode+0x78> <== NOT EXECUTED
232bc: e3530061 cmp r3, #97 ; 0x61 <== NOT EXECUTED
232c0: 0a000003 beq 232d4 <rtems_rfs_shell_inode+0x37c> <== NOT EXECUTED
}
}
else
{
if (have_end && have_start)
printf ("warning: option ignored: %s\n", argv[arg]);
232c4: e1a01000 mov r1, r0 <== NOT EXECUTED
232c8: e59f0118 ldr r0, [pc, #280] ; 233e8 <rtems_rfs_shell_inode+0x490><== NOT EXECUTED
232cc: eb009639 bl 48bb8 <printf> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
232d0: eaffff3e b 22fd0 <rtems_rfs_shell_inode+0x78> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
232d4: e3a0b001 mov fp, #1 <== NOT EXECUTED
232d8: eaffff3c b 22fd0 <rtems_rfs_shell_inode+0x78> <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
printf (" --\n");
232dc: e59f0108 ldr r0, [pc, #264] ; 233ec <rtems_rfs_shell_inode+0x494><== NOT EXECUTED
232e0: eb0096d9 bl 48e4c <puts> <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
}
}
rc = rtems_rfs_inode_close (fs, &inode);
232e4: e1a00005 mov r0, r5 <== NOT EXECUTED
232e8: e1a01008 mov r1, r8 <== NOT EXECUTED
232ec: eb006a6c bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
232f0: e3500000 cmp r0, #0 <== NOT EXECUTED
232f4: daffffe0 ble 2327c <rtems_rfs_shell_inode+0x324> <== NOT EXECUTED
232f8: e1a07000 mov r7, r0 <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
232fc: e1a00005 mov r0, r5 <== NOT EXECUTED
23300: ebffff0e bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
23304: e1a00007 mov r0, r7 <== NOT EXECUTED
23308: eb009e4e bl 4ac48 <strerror> <== NOT EXECUTED
2330c: e1a01004 mov r1, r4 <== NOT EXECUTED
23310: e1a03000 mov r3, r0 <== NOT EXECUTED
23314: e1a02007 mov r2, r7 <== NOT EXECUTED
23318: e59f00d0 ldr r0, [pc, #208] ; 233f0 <rtems_rfs_shell_inode+0x498><== NOT EXECUTED
2331c: eb009625 bl 48bb8 <printf> <== NOT EXECUTED
23320: e3a00001 mov r0, #1 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
23324: ea000003 b 23338 <rtems_rfs_shell_inode+0x3e0> <== NOT EXECUTED
}
}
if ((start >= total) || (end >= total))
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
23328: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
2332c: e59f00c0 ldr r0, [pc, #192] ; 233f4 <rtems_rfs_shell_inode+0x49c><== NOT EXECUTED
23330: eb009620 bl 48bb8 <printf> <== NOT EXECUTED
23334: e3a00001 mov r0, #1 <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
23338: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED
2333c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
23340: e1a07000 mov r7, r0 <== NOT EXECUTED
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
23344: e1a00005 mov r0, r5 <== NOT EXECUTED
23348: ebfffefc bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
2334c: e1a00007 mov r0, r7 <== NOT EXECUTED
23350: eb009e3c bl 4ac48 <strerror> <== NOT EXECUTED
23354: e1a01004 mov r1, r4 <== NOT EXECUTED
23358: e1a03000 mov r3, r0 <== NOT EXECUTED
2335c: e1a02007 mov r2, r7 <== NOT EXECUTED
23360: e59f0090 ldr r0, [pc, #144] ; 233f8 <rtems_rfs_shell_inode+0x4a0><== NOT EXECUTED
23364: eb009613 bl 48bb8 <printf> <== NOT EXECUTED
23368: e3a00001 mov r0, #1 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2336c: eafffff1 b 23338 <rtems_rfs_shell_inode+0x3e0> <== NOT EXECUTED
23370: e1a07000 mov r7, r0 <== NOT EXECUTED
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
23374: e1a00005 mov r0, r5 <== NOT EXECUTED
23378: ebfffef0 bl 22f40 <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
2337c: e1a00007 mov r0, r7 <== NOT EXECUTED
23380: eb009e30 bl 4ac48 <strerror> <== NOT EXECUTED
23384: e1a01004 mov r1, r4 <== NOT EXECUTED
23388: e1a03000 mov r3, r0 <== NOT EXECUTED
2338c: e1a02007 mov r2, r7 <== NOT EXECUTED
23390: e59f0064 ldr r0, [pc, #100] ; 233fc <rtems_rfs_shell_inode+0x4a4><== NOT EXECUTED
23394: eb009607 bl 48bb8 <printf> <== NOT EXECUTED
23398: e3a00001 mov r0, #1 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2339c: eaffffe5 b 23338 <rtems_rfs_shell_inode+0x3e0> <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
233a0: e3a01000 mov r1, #0 <== NOT EXECUTED
233a4: e3a02001 mov r2, #1 <== NOT EXECUTED
233a8: e58d1018 str r1, [sp, #24] <== NOT EXECUTED
233ac: e1a06000 mov r6, r0 <== NOT EXECUTED
233b0: e58d1014 str r1, [sp, #20] <== NOT EXECUTED
233b4: e1a0b001 mov fp, r1 <== NOT EXECUTED
233b8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
233bc: eaffff16 b 2301c <rtems_rfs_shell_inode+0xc4> <== NOT EXECUTED
00022f40 <rtems_rfs_shell_unlock_rfs>:
/**
* Unlock the file system.
*/
static void
rtems_rfs_shell_unlock_rfs (rtems_rfs_file_system* fs)
{
22f40: e92d4010 push {r4, lr} <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
22f44: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
22f48: eb005cd5 bl 3a2a4 <rtems_rfs_buffers_release> <== NOT EXECUTED
22f4c: e5940000 ldr r0, [r4] <== NOT EXECUTED
#if __rtems__
rtems_rfs_rtems_unlock (fs);
#endif
}
22f50: e8bd4010 pop {r4, lr} <== NOT EXECUTED
22f54: eaffa5a2 b c5e4 <rtems_semaphore_release> <== NOT EXECUTED
00022bfc <rtems_rfs_shell_usage>:
}
void
rtems_rfs_shell_usage (const char* arg)
{
22bfc: e92d4010 push {r4, lr} <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
22c00: e1a01000 mov r1, r0 <== NOT EXECUTED
}
void
rtems_rfs_shell_usage (const char* arg)
{
22c04: e1a04000 mov r4, r0 <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
22c08: e59f0038 ldr r0, [pc, #56] ; 22c48 <rtems_rfs_shell_usage+0x4c><== NOT EXECUTED
22c0c: eb0097e9 bl 48bb8 <printf> <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
22c10: e1a01004 mov r1, r4 <== NOT EXECUTED
22c14: e59f0030 ldr r0, [pc, #48] ; 22c4c <rtems_rfs_shell_usage+0x50><== NOT EXECUTED
22c18: eb0097e6 bl 48bb8 <printf> <== NOT EXECUTED
printf (" where:\n");
22c1c: e59f002c ldr r0, [pc, #44] ; 22c50 <rtems_rfs_shell_usage+0x54><== NOT EXECUTED
22c20: eb009889 bl 48e4c <puts> <== NOT EXECUTED
printf (" path: Path to the mounted RFS file system\n");
22c24: e59f0028 ldr r0, [pc, #40] ; 22c54 <rtems_rfs_shell_usage+0x58><== NOT EXECUTED
22c28: eb009887 bl 48e4c <puts> <== NOT EXECUTED
printf (" command: A debugger command. See -l for a list plus help.\n");
22c2c: e59f0024 ldr r0, [pc, #36] ; 22c58 <rtems_rfs_shell_usage+0x5c><== NOT EXECUTED
22c30: eb009885 bl 48e4c <puts> <== NOT EXECUTED
printf (" -h: This help\n");
22c34: e59f0020 ldr r0, [pc, #32] ; 22c5c <rtems_rfs_shell_usage+0x60><== NOT EXECUTED
22c38: eb009883 bl 48e4c <puts> <== NOT EXECUTED
printf (" -l: The debugger command list.\n");
22c3c: e59f001c ldr r0, [pc, #28] ; 22c60 <rtems_rfs_shell_usage+0x64><== NOT EXECUTED
}
22c40: e8bd4010 pop {r4, lr} <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
printf (" where:\n");
printf (" path: Path to the mounted RFS file system\n");
printf (" command: A debugger command. See -l for a list plus help.\n");
printf (" -h: This help\n");
printf (" -l: The debugger command list.\n");
22c44: ea009880 b 48e4c <puts> <== NOT EXECUTED
0003e2e4 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
3e2e4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3e2e8: e24dd0a0 sub sp, sp, #160 ; 0xa0 <== NOT EXECUTED
3e2ec: e59d50c4 ldr r5, [sp, #196] ; 0xc4 <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
3e2f0: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
3e2f4: e1550002 cmp r5, r2 <== NOT EXECUTED
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
3e2f8: e1a04000 mov r4, r0 <== NOT EXECUTED
3e2fc: e1a08001 mov r8, r1 <== NOT EXECUTED
3e300: e1a0a003 mov sl, r3 <== NOT EXECUTED
3e304: e1dd7cb8 ldrh r7, [sp, #200] ; 0xc8 <== NOT EXECUTED
3e308: e1dd6cbc ldrh r6, [sp, #204] ; 0xcc <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
3e30c: 23a0905b movcs r9, #91 ; 0x5b <== NOT EXECUTED
3e310: 3a000002 bcc 3e320 <rtems_rfs_symlink+0x3c> <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
3e314: e1a00009 mov r0, r9 <== NOT EXECUTED
3e318: e28dd0a0 add sp, sp, #160 ; 0xa0 <== NOT EXECUTED
3e31c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
3e320: e1a00001 mov r0, r1 <== NOT EXECUTED
3e324: eb0033d3 bl 4b278 <strlen> <== NOT EXECUTED
3e328: e3a0cca2 mov ip, #41472 ; 0xa200 <== NOT EXECUTED
3e32c: e24cc001 sub ip, ip, #1 <== NOT EXECUTED
3e330: e1a03000 mov r3, r0 <== NOT EXECUTED
3e334: e1a02008 mov r2, r8 <== NOT EXECUTED
3e338: e58dc000 str ip, [sp] <== NOT EXECUTED
3e33c: e59d10d0 ldr r1, [sp, #208] ; 0xd0 <== NOT EXECUTED
3e340: e28dc09c add ip, sp, #156 ; 0x9c <== NOT EXECUTED
3e344: e3a08001 mov r8, #1 <== NOT EXECUTED
3e348: e1a00004 mov r0, r4 <== NOT EXECUTED
3e34c: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
3e350: e58d600c str r6, [sp, #12] <== NOT EXECUTED
3e354: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
3e358: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
3e35c: ebfffed8 bl 3dec4 <rtems_rfs_inode_create> <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
3e360: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e364: caffffea bgt 3e314 <rtems_rfs_symlink+0x30> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
3e368: e28d6064 add r6, sp, #100 ; 0x64 <== NOT EXECUTED
3e36c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e370: e59d109c ldr r1, [sp, #156] ; 0x9c <== NOT EXECUTED
3e374: e1a02006 mov r2, r6 <== NOT EXECUTED
3e378: e1a03008 mov r3, r8 <== NOT EXECUTED
3e37c: ebfffe6c bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3e380: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e384: caffffe2 bgt 3e314 <rtems_rfs_symlink+0x30> <== NOT EXECUTED
/*
* If the link length is less than the length of data union in the inode
* place the link into the data area else allocate a block and write the link
* to that.
*/
if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
3e388: e3550013 cmp r5, #19 <== NOT EXECUTED
3e38c: 8a000021 bhi 3e418 <rtems_rfs_symlink+0x134> <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
3e390: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e394: e3a07000 mov r7, #0 <== NOT EXECUTED
3e398: e583702c str r7, [r3, #44] ; 0x2c <== NOT EXECUTED
3e39c: e583701c str r7, [r3, #28] <== NOT EXECUTED
3e3a0: e5837020 str r7, [r3, #32] <== NOT EXECUTED
3e3a4: e5837024 str r7, [r3, #36] ; 0x24 <== NOT EXECUTED
3e3a8: e5837028 str r7, [r3, #40] ; 0x28 <== NOT EXECUTED
memcpy (inode.node->data.name, link, link_length);
3e3ac: e59d0070 ldr r0, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3b0: e1a0100a mov r1, sl <== NOT EXECUTED
3e3b4: e280001c add r0, r0, #28 <== NOT EXECUTED
3e3b8: e1a02005 mov r2, r5 <== NOT EXECUTED
3e3bc: eb00254f bl 47900 <memcpy> <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
3e3c0: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3c4: e5c3700c strb r7, [r3, #12] <== NOT EXECUTED
3e3c8: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3cc: e5c3700d strb r7, [r3, #13] <== NOT EXECUTED
3e3d0: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3d4: e5c3700e strb r7, [r3, #14] <== NOT EXECUTED
3e3d8: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3dc: e5c3700f strb r7, [r3, #15] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
3e3e0: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
3e3e4: e1a05805 lsl r5, r5, #16 <== NOT EXECUTED
3e3e8: e1a02c25 lsr r2, r5, #24 <== NOT EXECUTED
3e3ec: e5c3200a strb r2, [r3, #10] <== NOT EXECUTED
3e3f0: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
3e3f4: e1a05825 lsr r5, r5, #16 <== NOT EXECUTED
3e3f8: e5c3500b strb r5, [r3, #11] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
3e3fc: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e400: e3a03001 mov r3, #1 <== NOT EXECUTED
3e404: e1a01006 mov r1, r6 <== NOT EXECUTED
3e408: e5cd3074 strb r3, [sp, #116] ; 0x74 <== NOT EXECUTED
3e40c: ebfffe24 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e410: e1a09000 mov r9, r0 <== NOT EXECUTED
return rc;
3e414: eaffffbe b 3e314 <rtems_rfs_symlink+0x30> <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
3e418: e28d7014 add r7, sp, #20 <== NOT EXECUTED
3e41c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e420: e1a01006 mov r1, r6 <== NOT EXECUTED
3e424: e1a02007 mov r2, r7 <== NOT EXECUTED
3e428: ebffef28 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3e42c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e430: da000003 ble 3e444 <rtems_rfs_symlink+0x160> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
3e434: e1a00004 mov r0, r4 <== NOT EXECUTED
3e438: e1a01006 mov r1, r6 <== NOT EXECUTED
3e43c: ebfffe18 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e440: eaffffb3 b 3e314 <rtems_rfs_symlink+0x30> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
3e444: e1a02008 mov r2, r8 <== NOT EXECUTED
3e448: e1a00004 mov r0, r4 <== NOT EXECUTED
3e44c: e1a01007 mov r1, r7 <== NOT EXECUTED
3e450: e28d3098 add r3, sp, #152 ; 0x98 <== NOT EXECUTED
3e454: ebffedb1 bl 39b20 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
3e458: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e45c: da000006 ble 3e47c <rtems_rfs_symlink+0x198> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
3e460: e1a01007 mov r1, r7 <== NOT EXECUTED
3e464: e1a00004 mov r0, r4 <== NOT EXECUTED
3e468: ebffeea5 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
3e46c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e470: e1a01006 mov r1, r6 <== NOT EXECUTED
3e474: ebfffe0a bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e478: eaffffa5 b 3e314 <rtems_rfs_symlink+0x30> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3e47c: e3a08000 mov r8, #0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
3e480: e28db08c add fp, sp, #140 ; 0x8c <== NOT EXECUTED
3e484: e1a00004 mov r0, r4 <== NOT EXECUTED
3e488: e1a0100b mov r1, fp <== NOT EXECUTED
3e48c: e59d2098 ldr r2, [sp, #152] ; 0x98 <== NOT EXECUTED
3e490: e1a03008 mov r3, r8 <== NOT EXECUTED
3e494: e5cd808c strb r8, [sp, #140] ; 0x8c <== NOT EXECUTED
handle->bnum = 0;
3e498: e58d8090 str r8, [sp, #144] ; 0x90 <== NOT EXECUTED
handle->buffer = NULL;
3e49c: e58d8094 str r8, [sp, #148] ; 0x94 <== NOT EXECUTED
3e4a0: ebfff01f bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3e4a4: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e4a8: da000003 ble 3e4bc <rtems_rfs_symlink+0x1d8> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
3e4ac: e1a01007 mov r1, r7 <== NOT EXECUTED
3e4b0: e1a00004 mov r0, r4 <== NOT EXECUTED
3e4b4: ebffee92 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
3e4b8: eaffffdd b 3e434 <rtems_rfs_symlink+0x150> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
3e4bc: e59d3094 ldr r3, [sp, #148] ; 0x94 <== NOT EXECUTED
3e4c0: e5939020 ldr r9, [r3, #32] <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
3e4c4: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
3e4c8: e1a00009 mov r0, r9 <== NOT EXECUTED
3e4cc: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
3e4d0: eb002591 bl 47b1c <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
3e4d4: e1a02005 mov r2, r5 <== NOT EXECUTED
3e4d8: e1a00009 mov r0, r9 <== NOT EXECUTED
3e4dc: e1a0100a mov r1, sl <== NOT EXECUTED
3e4e0: eb002506 bl 47900 <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3e4e4: e1a0100b mov r1, fp <== NOT EXECUTED
3e4e8: e1a00004 mov r0, r4 <== NOT EXECUTED
3e4ec: ebffefc2 bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
3e4f0: e1a01007 mov r1, r7 <== NOT EXECUTED
3e4f4: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3e4f8: e58d8094 str r8, [sp, #148] ; 0x94 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3e4fc: e5cd808c strb r8, [sp, #140] ; 0x8c <== NOT EXECUTED
handle->bnum = 0;
3e500: e58d8090 str r8, [sp, #144] ; 0x90 <== NOT EXECUTED
3e504: ebffee7e bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
3e508: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e50c: daffffb3 ble 3e3e0 <rtems_rfs_symlink+0xfc> <== NOT EXECUTED
3e510: eaffffc7 b 3e434 <rtems_rfs_symlink+0x150> <== NOT EXECUTED
0003e128 <rtems_rfs_symlink_read>:
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
3e128: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3e12c: e24dd08c sub sp, sp, #140 ; 0x8c <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
3e130: e28d4054 add r4, sp, #84 ; 0x54 <== NOT EXECUTED
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
3e134: e1a07002 mov r7, r2 <== NOT EXECUTED
3e138: e1a06003 mov r6, r3 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
3e13c: e1a02004 mov r2, r4 <== NOT EXECUTED
3e140: e3a03001 mov r3, #1 <== NOT EXECUTED
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
3e144: e1a05000 mov r5, r0 <== NOT EXECUTED
3e148: e59d80b0 ldr r8, [sp, #176] ; 0xb0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
3e14c: ebfffef8 bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3e150: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e154: 1a000009 bne 3e180 <rtems_rfs_symlink_read+0x58> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
3e158: e59d1060 ldr r1, [sp, #96] ; 0x60 <== NOT EXECUTED
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
3e15c: e5d13002 ldrb r3, [r1, #2] <== NOT EXECUTED
3e160: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
3e164: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
3e168: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
3e16c: 0a000006 beq 3e18c <rtems_rfs_symlink_read+0x64> <== NOT EXECUTED
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
3e170: e1a00005 mov r0, r5 <== NOT EXECUTED
3e174: e1a01004 mov r1, r4 <== NOT EXECUTED
3e178: ebfffec9 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e17c: e3a09016 mov r9, #22 <== NOT EXECUTED
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
3e180: e1a00009 mov r0, r9 <== NOT EXECUTED
3e184: e28dd08c add sp, sp, #140 ; 0x8c <== NOT EXECUTED
3e188: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
3e18c: e5d1200a ldrb r2, [r1, #10] <== NOT EXECUTED
3e190: e5d1300b ldrb r3, [r1, #11] <== NOT EXECUTED
3e194: e1832402 orr r2, r3, r2, lsl #8 <== NOT EXECUTED
if (size < *length)
3e198: e1520006 cmp r2, r6 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
3e19c: e5882000 str r2, [r8] <== NOT EXECUTED
if (size < *length)
3e1a0: 8afffff2 bhi 3e170 <rtems_rfs_symlink_read+0x48> <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
3e1a4: e281300c add r3, r1, #12 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
3e1a8: e5d30003 ldrb r0, [r3, #3] <== NOT EXECUTED
3e1ac: e5d1c00c ldrb ip, [r1, #12] <== NOT EXECUTED
3e1b0: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
3e1b4: e180cc0c orr ip, r0, ip, lsl #24 <== NOT EXECUTED
3e1b8: e5d30002 ldrb r0, [r3, #2] <== NOT EXECUTED
3e1bc: e18c380e orr r3, ip, lr, lsl #16 <== NOT EXECUTED
3e1c0: e1930400 orrs r0, r3, r0, lsl #8 <== NOT EXECUTED
3e1c4: 1a00000a bne 3e1f4 <rtems_rfs_symlink_read+0xcc> <== NOT EXECUTED
{
memcpy (path, inode.node->data.name, *length);
3e1c8: e281101c add r1, r1, #28 <== NOT EXECUTED
3e1cc: e1a00007 mov r0, r7 <== NOT EXECUTED
3e1d0: eb0025ca bl 47900 <memcpy> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
3e1d4: e5983000 ldr r3, [r8] <== NOT EXECUTED
3e1d8: e3a02000 mov r2, #0 <== NOT EXECUTED
3e1dc: e7c72003 strb r2, [r7, r3] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
3e1e0: e1a00005 mov r0, r5 <== NOT EXECUTED
3e1e4: e1a01004 mov r1, r4 <== NOT EXECUTED
3e1e8: ebfffead bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e1ec: e1a09000 mov r9, r0 <== NOT EXECUTED
return rc;
3e1f0: eaffffe2 b 3e180 <rtems_rfs_symlink_read+0x58> <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
3e1f4: e28d6004 add r6, sp, #4 <== NOT EXECUTED
3e1f8: e1a00005 mov r0, r5 <== NOT EXECUTED
3e1fc: e1a01004 mov r1, r4 <== NOT EXECUTED
3e200: e1a02006 mov r2, r6 <== NOT EXECUTED
3e204: ebffefb1 bl 3a0d0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3e208: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e20c: da000003 ble 3e220 <rtems_rfs_symlink_read+0xf8> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
3e210: e1a00005 mov r0, r5 <== NOT EXECUTED
3e214: e1a01004 mov r1, r4 <== NOT EXECUTED
3e218: ebfffea1 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e21c: eaffffd7 b 3e180 <rtems_rfs_symlink_read+0x58> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
3e220: e28dc088 add ip, sp, #136 ; 0x88 <== NOT EXECUTED
3e224: e1a00005 mov r0, r5 <== NOT EXECUTED
3e228: e1a01006 mov r1, r6 <== NOT EXECUTED
3e22c: e3a02000 mov r2, #0 <== NOT EXECUTED
3e230: e3a03000 mov r3, #0 <== NOT EXECUTED
3e234: e58dc000 str ip, [sp] <== NOT EXECUTED
3e238: ebffecea bl 395e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3e23c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e240: da000006 ble 3e260 <rtems_rfs_symlink_read+0x138> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
3e244: e1a01006 mov r1, r6 <== NOT EXECUTED
3e248: e1a00005 mov r0, r5 <== NOT EXECUTED
3e24c: ebffef2c bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
3e250: e1a00005 mov r0, r5 <== NOT EXECUTED
3e254: e1a01004 mov r1, r4 <== NOT EXECUTED
3e258: ebfffe91 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e25c: eaffffc7 b 3e180 <rtems_rfs_symlink_read+0x58> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3e260: e3a0a000 mov sl, #0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
3e264: e28db07c add fp, sp, #124 ; 0x7c <== NOT EXECUTED
3e268: e1a00005 mov r0, r5 <== NOT EXECUTED
3e26c: e1a0100b mov r1, fp <== NOT EXECUTED
3e270: e59d2088 ldr r2, [sp, #136] ; 0x88 <== NOT EXECUTED
3e274: e1a0300a mov r3, sl <== NOT EXECUTED
3e278: e5cda07c strb sl, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
3e27c: e58da080 str sl, [sp, #128] ; 0x80 <== NOT EXECUTED
handle->buffer = NULL;
3e280: e58da084 str sl, [sp, #132] ; 0x84 <== NOT EXECUTED
3e284: ebfff0a6 bl 3a524 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3e288: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e28c: da000003 ble 3e2a0 <rtems_rfs_symlink_read+0x178> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
3e290: e1a01006 mov r1, r6 <== NOT EXECUTED
3e294: e1a00005 mov r0, r5 <== NOT EXECUTED
3e298: ebffef19 bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
3e29c: eaffffdb b 3e210 <rtems_rfs_symlink_read+0xe8> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
3e2a0: e59d3084 ldr r3, [sp, #132] ; 0x84 <== NOT EXECUTED
3e2a4: e5982000 ldr r2, [r8] <== NOT EXECUTED
3e2a8: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
3e2ac: e1a00007 mov r0, r7 <== NOT EXECUTED
3e2b0: eb002592 bl 47900 <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
3e2b4: e1a0100b mov r1, fp <== NOT EXECUTED
3e2b8: e1a00005 mov r0, r5 <== NOT EXECUTED
3e2bc: ebfff04e bl 3a3fc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
3e2c0: e1a01006 mov r1, r6 <== NOT EXECUTED
3e2c4: e1a00005 mov r0, r5 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
3e2c8: e58da084 str sl, [sp, #132] ; 0x84 <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
3e2cc: e5cda07c strb sl, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
3e2d0: e58da080 str sl, [sp, #128] ; 0x80 <== NOT EXECUTED
3e2d4: ebffef0a bl 39f04 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
3e2d8: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3e2dc: daffffbc ble 3e1d4 <rtems_rfs_symlink_read+0xac> <== NOT EXECUTED
3e2e0: eaffffca b 3e210 <rtems_rfs_symlink_read+0xe8> <== NOT EXECUTED
0003e514 <rtems_rfs_unlink>:
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
3e514: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3e518: e24dd050 sub sp, sp, #80 ; 0x50 <== NOT EXECUTED
3e51c: e1a06002 mov r6, r2 <== NOT EXECUTED
3e520: e1a08001 mov r8, r1 <== NOT EXECUTED
3e524: e1a0a003 mov sl, r3 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e528: e1a01002 mov r1, r2 <== NOT EXECUTED
3e52c: e3a03001 mov r3, #1 <== NOT EXECUTED
3e530: e1a0200d mov r2, sp <== NOT EXECUTED
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
3e534: e1a05000 mov r5, r0 <== NOT EXECUTED
3e538: e59d7074 ldr r7, [sp, #116] ; 0x74 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e53c: ebfffdfc bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3e540: e250b000 subs fp, r0, #0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
3e544: e1a0400d mov r4, sp <== NOT EXECUTED
if (rc)
3e548: 1a00000e bne 3e588 <rtems_rfs_unlink+0x74> <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
3e54c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
3e550: e5d39002 ldrb r9, [r3, #2] <== NOT EXECUTED
3e554: e1a09409 lsl r9, r9, #8 <== NOT EXECUTED
3e558: e2099a0f and r9, r9, #61440 ; 0xf000 <== NOT EXECUTED
3e55c: e3590901 cmp r9, #16384 ; 0x4000 <== NOT EXECUTED
3e560: 13a09000 movne r9, #0 <== NOT EXECUTED
3e564: 03a09001 moveq r9, #1 <== NOT EXECUTED
if (dir)
3e568: e3590000 cmp r9, #0 <== NOT EXECUTED
3e56c: 0a00000a beq 3e59c <rtems_rfs_unlink+0x88> <== NOT EXECUTED
{
switch (dir_mode)
3e570: e3570000 cmp r7, #0 <== NOT EXECUTED
3e574: 1a000006 bne 3e594 <rtems_rfs_unlink+0x80> <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
3e578: e1a00005 mov r0, r5 <== NOT EXECUTED
3e57c: e1a0100d mov r1, sp <== NOT EXECUTED
3e580: ebfffdc7 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e584: e3a0b015 mov fp, #21 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
3e588: e1a0000b mov r0, fp <== NOT EXECUTED
3e58c: e28dd050 add sp, sp, #80 ; 0x50 <== NOT EXECUTED
3e590: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
3e594: e3570001 cmp r7, #1 <== NOT EXECUTED
3e598: 0a000037 beq 3e67c <rtems_rfs_unlink+0x168> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
3e59c: e28d7028 add r7, sp, #40 ; 0x28 <== NOT EXECUTED
3e5a0: e1a01008 mov r1, r8 <== NOT EXECUTED
3e5a4: e1a00005 mov r0, r5 <== NOT EXECUTED
3e5a8: e1a02007 mov r2, r7 <== NOT EXECUTED
3e5ac: e3a03001 mov r3, #1 <== NOT EXECUTED
3e5b0: ebfffddf bl 3dd34 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
3e5b4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e5b8: 1a00002b bne 3e66c <rtems_rfs_unlink+0x158> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
3e5bc: e1a02006 mov r2, r6 <== NOT EXECUTED
3e5c0: e1a0300a mov r3, sl <== NOT EXECUTED
3e5c4: e1a00005 mov r0, r5 <== NOT EXECUTED
3e5c8: e1a01007 mov r1, r7 <== NOT EXECUTED
3e5cc: ebfff120 bl 3aa54 <rtems_rfs_dir_del_entry> <== NOT EXECUTED
if (rc > 0)
3e5d0: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e5d4: ca000018 bgt 3e63c <rtems_rfs_unlink+0x128> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e5d8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
3e5dc: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
3e5e0: e5d21001 ldrb r1, [r2, #1] <== NOT EXECUTED
if (links == 0xffff)
3e5e4: e3a03801 mov r3, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e5e8: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
3e5ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3e5f0: e1510003 cmp r1, r3 <== NOT EXECUTED
3e5f4: 0a00002b beq 3e6a8 <rtems_rfs_unlink+0x194> <== NOT EXECUTED
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
3e5f8: e3510001 cmp r1, #1 <== NOT EXECUTED
3e5fc: 9a000029 bls 3e6a8 <rtems_rfs_unlink+0x194> <== NOT EXECUTED
{
links--;
3e600: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3e604: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e608: e1a03c21 lsr r3, r1, #24 <== NOT EXECUTED
3e60c: e5c23000 strb r3, [r2] <== NOT EXECUTED
3e610: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
3e614: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
3e618: e5c31001 strb r1, [r3, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e61c: e3a03001 mov r3, #1 <== NOT EXECUTED
3e620: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
3e624: e3a01001 mov r1, #1 <== NOT EXECUTED
3e628: e1a00007 mov r0, r7 <== NOT EXECUTED
3e62c: e1a02001 mov r2, r1 <== NOT EXECUTED
3e630: ebfffcea bl 3d9e0 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
3e634: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e638: da000006 ble 3e658 <rtems_rfs_unlink+0x144> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
3e63c: e1a01007 mov r1, r7 <== NOT EXECUTED
3e640: e1a00005 mov r0, r5 <== NOT EXECUTED
3e644: ebfffd96 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
3e648: e1a00005 mov r0, r5 <== NOT EXECUTED
3e64c: e1a0100d mov r1, sp <== NOT EXECUTED
3e650: ebfffd93 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e654: eaffffcb b 3e588 <rtems_rfs_unlink+0x74> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
3e658: e1a01007 mov r1, r7 <== NOT EXECUTED
3e65c: e1a00005 mov r0, r5 <== NOT EXECUTED
3e660: ebfffd8f bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3e664: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e668: da000009 ble 3e694 <rtems_rfs_unlink+0x180> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
3e66c: e1a00005 mov r0, r5 <== NOT EXECUTED
3e670: e1a0100d mov r1, sp <== NOT EXECUTED
3e674: ebfffd8a bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3e678: eaffffc2 b 3e588 <rtems_rfs_unlink+0x74> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
3e67c: e1a00005 mov r0, r5 <== NOT EXECUTED
3e680: e1a0100d mov r1, sp <== NOT EXECUTED
3e684: ebfff31f bl 3b308 <rtems_rfs_dir_empty> <== NOT EXECUTED
if (rc > 0)
3e688: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e68c: daffffc2 ble 3e59c <rtems_rfs_unlink+0x88> <== NOT EXECUTED
3e690: eafffff5 b 3e66c <rtems_rfs_unlink+0x158> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
3e694: e1a00005 mov r0, r5 <== NOT EXECUTED
3e698: e1a0100d mov r1, sp <== NOT EXECUTED
3e69c: ebfffd80 bl 3dca4 <rtems_rfs_inode_close> <== NOT EXECUTED
3e6a0: e1a0b000 mov fp, r0 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
3e6a4: eaffffb7 b 3e588 <rtems_rfs_unlink+0x74> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
3e6a8: e1a00005 mov r0, r5 <== NOT EXECUTED
3e6ac: e1a0100d mov r1, sp <== NOT EXECUTED
3e6b0: ebfffdd1 bl 3ddfc <rtems_rfs_inode_delete> <== NOT EXECUTED
if (rc > 0)
3e6b4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3e6b8: caffffdf bgt 3e63c <rtems_rfs_unlink+0x128> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
3e6bc: e3590000 cmp r9, #0 <== NOT EXECUTED
3e6c0: 0affffd7 beq 3e624 <rtems_rfs_unlink+0x110> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e6c4: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3e6c8: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
3e6cc: e5d31001 ldrb r1, [r3, #1] <== NOT EXECUTED
if (links == 0xffff)
3e6d0: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
3e6d4: e1811400 orr r1, r1, r0, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
3e6d8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
3e6dc: e1510002 cmp r1, r2 <== NOT EXECUTED
3e6e0: 03a01000 moveq r1, #0 <== NOT EXECUTED
3e6e4: 01a02001 moveq r2, r1 <== NOT EXECUTED
3e6e8: 0a000007 beq 3e70c <rtems_rfs_unlink+0x1f8> <== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
3e6ec: e3510001 cmp r1, #1 <== NOT EXECUTED
links--;
3e6f0: 82412001 subhi r2, r1, #1 <== NOT EXECUTED
3e6f4: 81a02802 lslhi r2, r2, #16 <== NOT EXECUTED
3e6f8: 81a01822 lsrhi r1, r2, #16 <== NOT EXECUTED
}
if (dir)
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
3e6fc: 920110ff andls r1, r1, #255 ; 0xff <== NOT EXECUTED
3e700: 93a02000 movls r2, #0 <== NOT EXECUTED
links--;
3e704: 81a02c22 lsrhi r2, r2, #24 <== NOT EXECUTED
3e708: 820110ff andhi r1, r1, #255 ; 0xff <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
3e70c: e5c32000 strb r2, [r3] <== NOT EXECUTED
3e710: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3e714: e5c31001 strb r1, [r3, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3e718: e3a03001 mov r3, #1 <== NOT EXECUTED
3e71c: e5cd3038 strb r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3e720: eaffffbf b 3e624 <rtems_rfs_unlink+0x110> <== NOT EXECUTED
00023cb8 <rtems_shell_debugrfs>:
printf (" -l: The debugger command list.\n");
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
23cb8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
"Display a block as a table for directory entrie, dir <bno>" },
{ "group", rtems_rfs_shell_group,
"Display the group data of a file system, group, group <group>, group <start> <end>" },
{ "inode", rtems_rfs_shell_inode,
"Display an inode, inode <ino>, inode> <ino>..<ino>" }
};
23cbc: e59fe234 ldr lr, [pc, #564] ; 23ef8 <rtems_shell_debugrfs+0x240><== NOT EXECUTED
printf (" -l: The debugger command list.\n");
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
23cc0: e24dd08c sub sp, sp, #140 ; 0x8c <== NOT EXECUTED
23cc4: e1a06000 mov r6, r0 <== NOT EXECUTED
23cc8: e1a05001 mov r5, r1 <== NOT EXECUTED
"Display a block as a table for directory entrie, dir <bno>" },
{ "group", rtems_rfs_shell_group,
"Display the group data of a file system, group, group <group>, group <start> <end>" },
{ "inode", rtems_rfs_shell_inode,
"Display an inode, inode <ino>, inode> <ino>..<ino>" }
};
23ccc: e28d4004 add r4, sp, #4 <== NOT EXECUTED
23cd0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
23cd4: e1a0c004 mov ip, r4 <== NOT EXECUTED
23cd8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
23cdc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
23ce0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
23ce4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
23ce8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
23cec: e89e0007 ldm lr, {r0, r1, r2} <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
23cf0: e3560001 cmp r6, #1 <== NOT EXECUTED
"Display a block as a table for directory entrie, dir <bno>" },
{ "group", rtems_rfs_shell_group,
"Display the group data of a file system, group, group <group>, group <start> <end>" },
{ "inode", rtems_rfs_shell_inode,
"Display an inode, inode <ino>, inode> <ino>..<ino>" }
};
23cf4: e88c0007 stm ip, {r0, r1, r2} <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
23cf8: da000038 ble 23de0 <rtems_shell_debugrfs+0x128> <== NOT EXECUTED
{
if (argv[arg][0] != '-')
23cfc: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
23d00: e5d83000 ldrb r3, [r8] <== NOT EXECUTED
23d04: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
23d08: 0a000039 beq 23df4 <rtems_shell_debugrfs+0x13c> <== NOT EXECUTED
printf ("error: unknown option: %s\n", argv[arg]);
return 1;
}
}
if ((argc - arg) < 2)
23d0c: e3560002 cmp r6, #2 <== NOT EXECUTED
23d10: 0a000032 beq 23de0 <rtems_shell_debugrfs+0x128> <== NOT EXECUTED
rtems_rfs_get_fs (const char* path, rtems_rfs_file_system** fs)
{
struct statvfs sb;
int rc;
rc = statvfs (path, &sb);
23d14: e1a00008 mov r0, r8 <== NOT EXECUTED
23d18: e28d1040 add r1, sp, #64 ; 0x40 <== NOT EXECUTED
23d1c: eb001be1 bl 2aca8 <statvfs> <== NOT EXECUTED
if (rc < 0)
23d20: e3500000 cmp r0, #0 <== NOT EXECUTED
23d24: ba000067 blt 23ec8 <rtems_shell_debugrfs+0x210> <== NOT EXECUTED
printf ("error: cannot statvfs path: %s: (%d) %s\n",
path, errno, strerror (errno));
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
23d28: e3a0334a mov r3, #671088641 ; 0x28000001 <== NOT EXECUTED
23d2c: e59d206c ldr r2, [sp, #108] ; 0x6c <== NOT EXECUTED
23d30: e2833a92 add r3, r3, #598016 ; 0x92000 <== NOT EXECUTED
23d34: e1520003 cmp r2, r3 <== NOT EXECUTED
23d38: 1a00005d bne 23eb4 <rtems_shell_debugrfs+0x1fc> <== NOT EXECUTED
* Now find the path location on the file system. This will give the file
* system data.
*/
{
rtems_filesystem_location_info_t pathloc;
rc = rtems_filesystem_evaluate_path (path, strlen (path), 0, &pathloc, true);
23d3c: e1a00008 mov r0, r8 <== NOT EXECUTED
23d40: eb009d4c bl 4b278 <strlen> <== NOT EXECUTED
23d44: e28d7078 add r7, sp, #120 ; 0x78 <== NOT EXECUTED
23d48: e1a01000 mov r1, r0 <== NOT EXECUTED
23d4c: e3a02000 mov r2, #0 <== NOT EXECUTED
23d50: e1a00008 mov r0, r8 <== NOT EXECUTED
23d54: e1a03007 mov r3, r7 <== NOT EXECUTED
23d58: e3a0c001 mov ip, #1 <== NOT EXECUTED
23d5c: e58dc000 str ip, [sp] <== NOT EXECUTED
23d60: ebff8fe0 bl 7ce8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
rtems_filesystem_freenode (&pathloc);
23d64: e59d3084 ldr r3, [sp, #132] ; 0x84 <== NOT EXECUTED
* system data.
*/
{
rtems_filesystem_location_info_t pathloc;
rc = rtems_filesystem_evaluate_path (path, strlen (path), 0, &pathloc, true);
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
23d68: e59d2088 ldr r2, [sp, #136] ; 0x88 <== NOT EXECUTED
rtems_filesystem_freenode (&pathloc);
23d6c: e3530000 cmp r3, #0 <== NOT EXECUTED
* Now find the path location on the file system. This will give the file
* system data.
*/
{
rtems_filesystem_location_info_t pathloc;
rc = rtems_filesystem_evaluate_path (path, strlen (path), 0, &pathloc, true);
23d70: e1a08000 mov r8, r0 <== NOT EXECUTED
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
23d74: e592a034 ldr sl, [r2, #52] ; 0x34 <== NOT EXECUTED
rtems_filesystem_freenode (&pathloc);
23d78: 0a000004 beq 23d90 <rtems_shell_debugrfs+0xd8> <== NOT EXECUTED
23d7c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
23d80: e3530000 cmp r3, #0 <== NOT EXECUTED
23d84: 11a00007 movne r0, r7 <== NOT EXECUTED
23d88: 11a0e00f movne lr, pc <== NOT EXECUTED
23d8c: 112fff13 bxne r3 <== NOT EXECUTED
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
23d90: e3580000 cmp r8, #0 <== NOT EXECUTED
23d94: 1a00000e bne 23dd4 <rtems_shell_debugrfs+0x11c> <== NOT EXECUTED
23d98: e5959008 ldr r9, [r5, #8] <== NOT EXECUTED
23d9c: e1a07008 mov r7, r8 <== NOT EXECUTED
23da0: e2855008 add r5, r5, #8 <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
23da4: e7941007 ldr r1, [r4, r7] <== NOT EXECUTED
23da8: e1a00009 mov r0, r9 <== NOT EXECUTED
23dac: eb009ac9 bl 4a8d8 <strcmp> <== NOT EXECUTED
23db0: e3500000 cmp r0, #0 <== NOT EXECUTED
23db4: 0a000035 beq 23e90 <rtems_shell_debugrfs+0x1d8> <== NOT EXECUTED
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
23db8: e2888001 add r8, r8, #1 <== NOT EXECUTED
23dbc: e3580005 cmp r8, #5 <== NOT EXECUTED
23dc0: e287700c add r7, r7, #12 <== NOT EXECUTED
23dc4: 1afffff6 bne 23da4 <rtems_shell_debugrfs+0xec> <== NOT EXECUTED
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
23dc8: e1a01009 mov r1, r9 <== NOT EXECUTED
23dcc: e59f0128 ldr r0, [pc, #296] ; 23efc <rtems_shell_debugrfs+0x244><== NOT EXECUTED
23dd0: eb009378 bl 48bb8 <printf> <== NOT EXECUTED
23dd4: e3a00001 mov r0, #1 <== NOT EXECUTED
}
}
return 1;
}
23dd8: e28dd08c add sp, sp, #140 ; 0x8c <== NOT EXECUTED
23ddc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
return 1;
}
}
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
23de0: e5951000 ldr r1, [r5] <== NOT EXECUTED
23de4: e59f0114 ldr r0, [pc, #276] ; 23f00 <rtems_shell_debugrfs+0x248><== NOT EXECUTED
23de8: eb009372 bl 48bb8 <printf> <== NOT EXECUTED
23dec: e3a00001 mov r0, #1 <== NOT EXECUTED
23df0: eafffff8 b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] != '-')
break;
switch (argv[arg][1])
23df4: e5d83001 ldrb r3, [r8, #1] <== NOT EXECUTED
23df8: e3530068 cmp r3, #104 ; 0x68 <== NOT EXECUTED
23dfc: 0a000006 beq 23e1c <rtems_shell_debugrfs+0x164> <== NOT EXECUTED
23e00: e353006c cmp r3, #108 ; 0x6c <== NOT EXECUTED
23e04: 0a000008 beq 23e2c <rtems_shell_debugrfs+0x174> <== NOT EXECUTED
printf ("%s: commands are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
return 0;
default:
printf ("error: unknown option: %s\n", argv[arg]);
23e08: e1a01008 mov r1, r8 <== NOT EXECUTED
23e0c: e59f00f0 ldr r0, [pc, #240] ; 23f04 <rtems_shell_debugrfs+0x24c><== NOT EXECUTED
23e10: eb009368 bl 48bb8 <printf> <== NOT EXECUTED
23e14: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
23e18: eaffffee b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
break;
switch (argv[arg][1])
{
case 'h':
rtems_rfs_shell_usage (argv[0]);
23e1c: e5950000 ldr r0, [r5] <== NOT EXECUTED
23e20: ebfffb75 bl 22bfc <rtems_rfs_shell_usage> <== NOT EXECUTED
23e24: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
23e28: eaffffea b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
case 'l':
printf ("%s: commands are:\n", argv[0]);
23e2c: e5951000 ldr r1, [r5] <== NOT EXECUTED
23e30: e59f00d0 ldr r0, [pc, #208] ; 23f08 <rtems_shell_debugrfs+0x250><== NOT EXECUTED
23e34: eb00935f bl 48bb8 <printf> <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
23e38: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
23e3c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
23e40: e59f00c4 ldr r0, [pc, #196] ; 23f0c <rtems_shell_debugrfs+0x254><== NOT EXECUTED
23e44: eb00935b bl 48bb8 <printf> <== NOT EXECUTED
23e48: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
23e4c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
23e50: e59f00b4 ldr r0, [pc, #180] ; 23f0c <rtems_shell_debugrfs+0x254><== NOT EXECUTED
23e54: eb009357 bl 48bb8 <printf> <== NOT EXECUTED
23e58: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
23e5c: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
23e60: e59f00a4 ldr r0, [pc, #164] ; 23f0c <rtems_shell_debugrfs+0x254><== NOT EXECUTED
23e64: eb009353 bl 48bb8 <printf> <== NOT EXECUTED
23e68: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
23e6c: e59d2030 ldr r2, [sp, #48] ; 0x30 <== NOT EXECUTED
23e70: e59f0094 ldr r0, [pc, #148] ; 23f0c <rtems_shell_debugrfs+0x254><== NOT EXECUTED
23e74: eb00934f bl 48bb8 <printf> <== NOT EXECUTED
23e78: e59f008c ldr r0, [pc, #140] ; 23f0c <rtems_shell_debugrfs+0x254><== NOT EXECUTED
23e7c: e59d1034 ldr r1, [sp, #52] ; 0x34 <== NOT EXECUTED
23e80: e59d203c ldr r2, [sp, #60] ; 0x3c <== NOT EXECUTED
23e84: eb00934b bl 48bb8 <printf> <== NOT EXECUTED
23e88: e3a00000 mov r0, #0 <== NOT EXECUTED
23e8c: eaffffd1 b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
23e90: e28d208c add r2, sp, #140 ; 0x8c <== NOT EXECUTED
23e94: e0888088 add r8, r8, r8, lsl #1 <== NOT EXECUTED
23e98: e0823108 add r3, r2, r8, lsl #2 <== NOT EXECUTED
23e9c: e1a0000a mov r0, sl <== NOT EXECUTED
23ea0: e2461002 sub r1, r6, #2 <== NOT EXECUTED
23ea4: e1a02005 mov r2, r5 <== NOT EXECUTED
23ea8: e1a0e00f mov lr, pc <== NOT EXECUTED
23eac: e513f084 ldr pc, [r3, #-132] ; 0x84 <== NOT EXECUTED
23eb0: eaffffc8 b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
{
printf ("error: path '%s' is not on an RFS file system\n", path);
23eb4: e1a01008 mov r1, r8 <== NOT EXECUTED
23eb8: e59f0050 ldr r0, [pc, #80] ; 23f10 <rtems_shell_debugrfs+0x258><== NOT EXECUTED
23ebc: eb00933d bl 48bb8 <printf> <== NOT EXECUTED
23ec0: e3a00001 mov r0, #1 <== NOT EXECUTED
23ec4: eaffffc3 b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
int rc;
rc = statvfs (path, &sb);
if (rc < 0)
{
printf ("error: cannot statvfs path: %s: (%d) %s\n",
23ec8: eb0081dc bl 44640 <__errno> <== NOT EXECUTED
23ecc: e5904000 ldr r4, [r0] <== NOT EXECUTED
23ed0: eb0081da bl 44640 <__errno> <== NOT EXECUTED
23ed4: e5900000 ldr r0, [r0] <== NOT EXECUTED
23ed8: eb009b5a bl 4ac48 <strerror> <== NOT EXECUTED
23edc: e1a01008 mov r1, r8 <== NOT EXECUTED
23ee0: e1a03000 mov r3, r0 <== NOT EXECUTED
23ee4: e1a02004 mov r2, r4 <== NOT EXECUTED
23ee8: e59f0024 ldr r0, [pc, #36] ; 23f14 <rtems_shell_debugrfs+0x25c><== NOT EXECUTED
23eec: eb009331 bl 48bb8 <printf> <== NOT EXECUTED
23ef0: e3a00001 mov r0, #1 <== NOT EXECUTED
23ef4: eaffffb7 b 23dd8 <rtems_shell_debugrfs+0x120> <== NOT EXECUTED
00022c64 <rtems_shell_rfs_format>:
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
22c64: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
22c68: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
22c6c: e3a05000 mov r5, #0 <== NOT EXECUTED
22c70: e28d3008 add r3, sp, #8 <== NOT EXECUTED
22c74: e4835004 str r5, [r3], #4 <== NOT EXECUTED
22c78: e4835004 str r5, [r3], #4 <== NOT EXECUTED
22c7c: e4835004 str r5, [r3], #4 <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
22c80: e3500001 cmp r0, #1 <== NOT EXECUTED
{
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
22c84: e1a0800d mov r8, sp <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
22c88: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
22c8c: e5835000 str r5, [r3] <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
22c90: e1a07001 mov r7, r1 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
22c94: e58d5000 str r5, [sp] <== NOT EXECUTED
22c98: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
22c9c: da00008b ble 22ed0 <rtems_shell_rfs_format+0x26c> <== NOT EXECUTED
22ca0: e3a04001 mov r4, #1 <== NOT EXECUTED
}
config.group_inodes = strtoul (argv[arg], 0, 0);
break;
case 'I':
config.initialise_inodes = true;
22ca4: e1a0a004 mov sl, r4 <== NOT EXECUTED
22ca8: ea000005 b 22cc4 <rtems_shell_rfs_format+0x60> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
22cac: e3550000 cmp r5, #0 <== NOT EXECUTED
22cb0: 1a000081 bne 22ebc <rtems_shell_rfs_format+0x258> <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
22cb4: e2844001 add r4, r4, #1 <== NOT EXECUTED
22cb8: e1560004 cmp r6, r4 <== NOT EXECUTED
22cbc: da00003c ble 22db4 <rtems_shell_rfs_format+0x150> <== NOT EXECUTED
22cc0: e1a05009 mov r5, r9 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
22cc4: e7979104 ldr r9, [r7, r4, lsl #2] <== NOT EXECUTED
22cc8: e5d93000 ldrb r3, [r9] <== NOT EXECUTED
22ccc: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
22cd0: 1afffff5 bne 22cac <rtems_shell_rfs_format+0x48> <== NOT EXECUTED
{
switch (argv[arg][1])
22cd4: e5d93001 ldrb r3, [r9, #1] <== NOT EXECUTED
22cd8: e2433049 sub r3, r3, #73 ; 0x49 <== NOT EXECUTED
22cdc: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
22ce0: 979ff103 ldrls pc, [pc, r3, lsl #2] <== NOT EXECUTED
22ce4: ea00006e b 22ea4 <rtems_shell_rfs_format+0x240> <== NOT EXECUTED
22ce8: 00022e98 .word 0x00022e98 <== NOT EXECUTED
22cec: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22cf0: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22cf4: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22cf8: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22cfc: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d00: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d04: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d08: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d0c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d10: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d14: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d18: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d1c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d20: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d24: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d28: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d2c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d30: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d34: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d38: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d3c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d40: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d44: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d48: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d4c: 00022e70 .word 0x00022e70 <== NOT EXECUTED
22d50: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d54: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d58: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d5c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d60: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d64: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d68: 00022e48 .word 0x00022e48 <== NOT EXECUTED
22d6c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d70: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d74: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d78: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d7c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d80: 00022e20 .word 0x00022e20 <== NOT EXECUTED
22d84: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d88: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d8c: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d90: 00022df8 .word 0x00022df8 <== NOT EXECUTED
22d94: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d98: 00022ea4 .word 0x00022ea4 <== NOT EXECUTED
22d9c: 00022da0 .word 0x00022da0 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
22da0: e2844001 add r4, r4, #1 <== NOT EXECUTED
22da4: e1560004 cmp r6, r4 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'v':
config.verbose = true;
22da8: e5cda015 strb sl, [sp, #21] <== NOT EXECUTED
22dac: e1a09005 mov r9, r5 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
22db0: caffffc2 bgt 22cc0 <rtems_shell_rfs_format+0x5c> <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
22db4: e3590000 cmp r9, #0 <== NOT EXECUTED
22db8: 0a000044 beq 22ed0 <rtems_shell_rfs_format+0x26c> <== NOT EXECUTED
printf ("error: no driver name provided\n");
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
22dbc: e1a0100d mov r1, sp <== NOT EXECUTED
22dc0: e1a00009 mov r0, r9 <== NOT EXECUTED
22dc4: eb006637 bl 3c6a8 <rtems_rfs_format> <== NOT EXECUTED
22dc8: e3500000 cmp r0, #0 <== NOT EXECUTED
22dcc: a3a00000 movge r0, #0 <== NOT EXECUTED
22dd0: aa000037 bge 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
22dd4: eb008619 bl 44640 <__errno> <== NOT EXECUTED
22dd8: e5900000 ldr r0, [r0] <== NOT EXECUTED
22ddc: eb009f99 bl 4ac48 <strerror> <== NOT EXECUTED
22de0: e1a01009 mov r1, r9 <== NOT EXECUTED
22de4: e1a02000 mov r2, r0 <== NOT EXECUTED
22de8: e59f0130 ldr r0, [pc, #304] ; 22f20 <rtems_shell_rfs_format+0x2bc><== NOT EXECUTED
22dec: eb009771 bl 48bb8 <printf> <== NOT EXECUTED
22df0: e3a00001 mov r0, #1 <== NOT EXECUTED
driver, strerror (errno));
return 1;
22df4: ea00002e b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
case 'v':
config.verbose = true;
break;
case 's':
arg++;
22df8: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
22dfc: e1560004 cmp r6, r4 <== NOT EXECUTED
22e00: da00003a ble 22ef0 <rtems_shell_rfs_format+0x28c> <== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
22e04: e3a01000 mov r1, #0 <== NOT EXECUTED
22e08: e7970104 ldr r0, [r7, r4, lsl #2] <== NOT EXECUTED
22e0c: e1a02001 mov r2, r1 <== NOT EXECUTED
22e10: eb00a634 bl 4c6e8 <strtoul> <== NOT EXECUTED
22e14: e1a09005 mov r9, r5 <== NOT EXECUTED
22e18: e58d0000 str r0, [sp] <== NOT EXECUTED
break;
22e1c: eaffffa4 b 22cb4 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
break;
case 'o':
arg++;
22e20: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
22e24: e1560004 cmp r6, r4 <== NOT EXECUTED
22e28: da000038 ble 22f10 <rtems_shell_rfs_format+0x2ac> <== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
22e2c: e3a01000 mov r1, #0 <== NOT EXECUTED
22e30: e7970104 ldr r0, [r7, r4, lsl #2] <== NOT EXECUTED
22e34: e1a02001 mov r2, r1 <== NOT EXECUTED
22e38: eb00a62a bl 4c6e8 <strtoul> <== NOT EXECUTED
22e3c: e1a09005 mov r9, r5 <== NOT EXECUTED
22e40: e58d000c str r0, [sp, #12] <== NOT EXECUTED
break;
22e44: eaffff9a b 22cb4 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
}
config.group_blocks = strtoul (argv[arg], 0, 0);
break;
case 'i':
arg++;
22e48: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
22e4c: e1560004 cmp r6, r4 <== NOT EXECUTED
22e50: da00002a ble 22f00 <rtems_shell_rfs_format+0x29c> <== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
22e54: e3a01000 mov r1, #0 <== NOT EXECUTED
22e58: e7970104 ldr r0, [r7, r4, lsl #2] <== NOT EXECUTED
22e5c: e1a02001 mov r2, r1 <== NOT EXECUTED
22e60: eb00a620 bl 4c6e8 <strtoul> <== NOT EXECUTED
22e64: e1a09005 mov r9, r5 <== NOT EXECUTED
22e68: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
break;
22e6c: eaffff90 b 22cb4 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
}
config.block_size = strtoul (argv[arg], 0, 0);
break;
case 'b':
arg++;
22e70: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
22e74: e1560004 cmp r6, r4 <== NOT EXECUTED
22e78: da000018 ble 22ee0 <rtems_shell_rfs_format+0x27c> <== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
22e7c: e3a01000 mov r1, #0 <== NOT EXECUTED
22e80: e7970104 ldr r0, [r7, r4, lsl #2] <== NOT EXECUTED
22e84: e1a02001 mov r2, r1 <== NOT EXECUTED
22e88: eb00a616 bl 4c6e8 <strtoul> <== NOT EXECUTED
22e8c: e1a09005 mov r9, r5 <== NOT EXECUTED
22e90: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
break;
22e94: eaffff86 b 22cb4 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
}
config.group_inodes = strtoul (argv[arg], 0, 0);
break;
case 'I':
config.initialise_inodes = true;
22e98: e5cda014 strb sl, [sp, #20] <== NOT EXECUTED
22e9c: e1a09005 mov r9, r5 <== NOT EXECUTED
break;
22ea0: eaffff83 b 22cb4 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
22ea4: e1a01009 mov r1, r9 <== NOT EXECUTED
22ea8: e59f0074 ldr r0, [pc, #116] ; 22f24 <rtems_shell_rfs_format+0x2c0><== NOT EXECUTED
22eac: eb009741 bl 48bb8 <printf> <== NOT EXECUTED
22eb0: e3a00001 mov r0, #1 <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
22eb4: e28dd018 add sp, sp, #24 <== NOT EXECUTED
22eb8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (!driver)
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
22ebc: e1a01009 mov r1, r9 <== NOT EXECUTED
22ec0: e59f0060 ldr r0, [pc, #96] ; 22f28 <rtems_shell_rfs_format+0x2c4><== NOT EXECUTED
22ec4: eb00973b bl 48bb8 <printf> <== NOT EXECUTED
22ec8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22ecc: eafffff8 b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
}
}
}
if (!driver) {
printf ("error: no driver name provided\n");
22ed0: e59f0054 ldr r0, [pc, #84] ; 22f2c <rtems_shell_rfs_format+0x2c8><== NOT EXECUTED
22ed4: eb0097dc bl 48e4c <puts> <== NOT EXECUTED
22ed8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22edc: eafffff4 b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
case 'b':
arg++;
if (arg >= argc)
{
printf ("error: group block count needs an argument\n");
22ee0: e59f0048 ldr r0, [pc, #72] ; 22f30 <rtems_shell_rfs_format+0x2cc><== NOT EXECUTED
22ee4: eb0097d8 bl 48e4c <puts> <== NOT EXECUTED
22ee8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22eec: eafffff0 b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
case 's':
arg++;
if (arg >= argc)
{
printf ("error: block size needs an argument\n");
22ef0: e59f003c ldr r0, [pc, #60] ; 22f34 <rtems_shell_rfs_format+0x2d0><== NOT EXECUTED
22ef4: eb0097d4 bl 48e4c <puts> <== NOT EXECUTED
22ef8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22efc: eaffffec b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
case 'i':
arg++;
if (arg >= argc)
{
printf ("error: group inode count needs an argument\n");
22f00: e59f0030 ldr r0, [pc, #48] ; 22f38 <rtems_shell_rfs_format+0x2d4><== NOT EXECUTED
22f04: eb0097d0 bl 48e4c <puts> <== NOT EXECUTED
22f08: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22f0c: eaffffe8 b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
case 'o':
arg++;
if (arg >= argc)
{
printf ("error: inode percentage overhead needs an argument\n");
22f10: e59f0024 ldr r0, [pc, #36] ; 22f3c <rtems_shell_rfs_format+0x2d8><== NOT EXECUTED
22f14: eb0097cc bl 48e4c <puts> <== NOT EXECUTED
22f18: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
22f1c: eaffffe4 b 22eb4 <rtems_shell_rfs_format+0x250> <== NOT EXECUTED
0000635c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
635c: e92d4830 push {r4, r5, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
6360: e59f4078 ldr r4, [pc, #120] ; 63e0 <rtems_stack_checker_is_blown+0x84>
6364: e5943000 ldr r3, [r4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
6368: e59300c8 ldr r0, [r3, #200] ; 0xc8
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
636c: e28db00c add fp, sp, #12
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
6370: e15b0000 cmp fp, r0
6374: 33a05000 movcc r5, #0
6378: 3a000004 bcc 6390 <rtems_stack_checker_is_blown+0x34>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
637c: e59350c4 ldr r5, [r3, #196] ; 0xc4
6380: e0805005 add r5, r0, r5
6384: e15b0005 cmp fp, r5
6388: 83a05000 movhi r5, #0
638c: 93a05001 movls r5, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
6390: e59f304c ldr r3, [pc, #76] ; 63e4 <rtems_stack_checker_is_blown+0x88>
6394: e5933000 ldr r3, [r3]
6398: e3530000 cmp r3, #0
639c: 03a01001 moveq r1, #1
63a0: 0a000005 beq 63bc <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
63a4: e59f103c ldr r1, [pc, #60] ; 63e8 <rtems_stack_checker_is_blown+0x8c>
63a8: e2800008 add r0, r0, #8
63ac: e3a02010 mov r2, #16
63b0: eb010528 bl 47858 <memcmp>
63b4: e2701001 rsbs r1, r0, #1
63b8: 33a01000 movcc r1, #0
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
63bc: e3550000 cmp r5, #0
63c0: 0a000002 beq 63d0 <rtems_stack_checker_is_blown+0x74>
63c4: e3510000 cmp r1, #0
63c8: 13a00000 movne r0, #0
63cc: 18bd8830 popne {r4, r5, fp, pc}
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
63d0: e5940000 ldr r0, [r4] <== NOT EXECUTED
63d4: ebffffb3 bl 62a8 <Stack_check_report_blown_task> <== NOT EXECUTED
63d8: e3a00001 mov r0, #1 <== NOT EXECUTED
return true;
}
63dc: e8bd8830 pop {r4, r5, fp, pc} <== NOT EXECUTED
00006298 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
6298: e59f1004 ldr r1, [pc, #4] ; 62a4 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
629c: e3a00000 mov r0, #0 <== NOT EXECUTED
62a0: eaffffe3 b 6234 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00006234 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
6234: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
6238: e59f4048 ldr r4, [pc, #72] ; 6288 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
623c: e1a05001 mov r5, r1 <== NOT EXECUTED
6240: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context;
print_handler = print;
6244: e5841004 str r1, [r4, #4] <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
6248: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
624c: e59f1038 ldr r1, [pc, #56] ; 628c <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
6250: e1a0e00f mov lr, pc <== NOT EXECUTED
6254: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
6258: e59f1030 ldr r1, [pc, #48] ; 6290 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
625c: e1a00006 mov r0, r6 <== NOT EXECUTED
6260: e1a0e00f mov lr, pc <== NOT EXECUTED
6264: e12fff15 bx r5 <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
6268: e59f0024 ldr r0, [pc, #36] ; 6294 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED
626c: eb001e07 bl da90 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
6270: e3e00000 mvn r0, #0 <== NOT EXECUTED
6274: ebffff9d bl 60f0 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
6278: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
627c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
print_context = NULL;
6280: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL;
}
6284: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000063ec <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
63ec: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
63f0: e59030c8 ldr r3, [r0, #200] ; 0xc8
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
63f4: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
63f8: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
63fc: e1a04000 mov r4, r0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
6400: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
6404: 3a000003 bcc 6418 <rtems_stack_checker_switch_extension+0x2c>
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
6408: e59420c4 ldr r2, [r4, #196] ; 0xc4
640c: e0833002 add r3, r3, r2
6410: e15b0003 cmp fp, r3
6414: 9a000007 bls 6438 <rtems_stack_checker_switch_extension+0x4c>
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
6418: e59f1034 ldr r1, [pc, #52] ; 6454 <rtems_stack_checker_switch_extension+0x68><== NOT EXECUTED
641c: e3a02010 mov r2, #16 <== NOT EXECUTED
6420: eb01050c bl 47858 <memcmp> <== NOT EXECUTED
6424: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED
6428: 33a01000 movcc r1, #0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
642c: e1a00004 mov r0, r4
}
}
6430: e8bd4810 pop {r4, fp, lr}
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
6434: eaffff9b b 62a8 <Stack_check_report_blown_task>
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
6438: e59f1014 ldr r1, [pc, #20] ; 6454 <rtems_stack_checker_switch_extension+0x68>
643c: e3a02010 mov r2, #16
6440: eb010504 bl 47858 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
6444: e3500000 cmp r0, #0
6448: 13a01000 movne r1, #0
644c: 1afffff6 bne 642c <rtems_stack_checker_switch_extension+0x40>
6450: e8bd8810 pop {r4, fp, pc}
0000b968 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
b968: e92d41f0 push {r4, r5, r6, r7, r8, lr}
double result;
char *end;
if ( !n )
b96c: e2514000 subs r4, r1, #0
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
b970: e1a07000 mov r7, r0
b974: e24dd004 sub sp, sp, #4
b978: e1a08002 mov r8, r2
double result;
char *end;
if ( !n )
b97c: 03a00009 moveq r0, #9
b980: 0a000017 beq b9e4 <rtems_string_to_double+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
b984: eb000c00 bl e98c <__errno>
b988: e3a03000 mov r3, #0
b98c: e5803000 str r3, [r0]
*n = 0;
b990: e3a02000 mov r2, #0
b994: e3a03000 mov r3, #0
b998: e884000c stm r4, {r2, r3}
result = strtod( s, &end );
b99c: e1a00007 mov r0, r7
b9a0: e1a0100d mov r1, sp
b9a4: eb001776 bl 11784 <strtod>
if ( endptr )
b9a8: e3580000 cmp r8, #0
*endptr = end;
b9ac: 159d3000 ldrne r3, [sp]
b9b0: 059d3000 ldreq r3, [sp]
b9b4: 15883000 strne r3, [r8]
if ( end == s )
b9b8: e1530007 cmp r3, r7
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
b9bc: e1a05000 mov r5, r0
b9c0: e1a06001 mov r6, r1
if ( endptr )
*endptr = end;
if ( end == s )
b9c4: 03a0000b moveq r0, #11
b9c8: 0a000005 beq b9e4 <rtems_string_to_double+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
b9cc: eb000bee bl e98c <__errno>
b9d0: e5903000 ldr r3, [r0]
b9d4: e3530022 cmp r3, #34 ; 0x22
b9d8: 0a000003 beq b9ec <rtems_string_to_double+0x84>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
b9dc: e8840060 stm r4, {r5, r6}
b9e0: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b9e4: e28dd004 add sp, sp, #4
b9e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
b9ec: e1a00005 mov r0, r5
b9f0: e1a01006 mov r1, r6
b9f4: e3a02000 mov r2, #0
b9f8: e3a03000 mov r3, #0
b9fc: ebffdd31 bl 2ec8 <__cmpdf2>
ba00: e3500000 cmp r0, #0
ba04: 0a00000e beq ba44 <rtems_string_to_double+0xdc>
ba08: e3e03102 mvn r3, #-2147483648 ; 0x80000000
ba0c: e1a00005 mov r0, r5
ba10: e1a01006 mov r1, r6
ba14: e3e02000 mvn r2, #0
ba18: e2433601 sub r3, r3, #1048576 ; 0x100000
ba1c: ebffdd25 bl 2eb8 <__gedf2>
ba20: e3500000 cmp r0, #0
ba24: ca000006 bgt ba44 <rtems_string_to_double+0xdc>
ba28: e1a00005 mov r0, r5 <== NOT EXECUTED
ba2c: e1a01006 mov r1, r6 <== NOT EXECUTED
ba30: e3e02000 mvn r2, #0 <== NOT EXECUTED
ba34: e3e03601 mvn r3, #1048576 ; 0x100000 <== NOT EXECUTED
ba38: ebffdd20 bl 2ec0 <__ledf2> <== NOT EXECUTED
ba3c: e3500000 cmp r0, #0 <== NOT EXECUTED
ba40: aaffffe5 bge b9dc <rtems_string_to_double+0x74> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
ba44: e3a0000a mov r0, #10
ba48: eaffffe5 b b9e4 <rtems_string_to_double+0x7c>
0000ba4c <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ba4c: e92d40f0 push {r4, r5, r6, r7, lr}
float result;
char *end;
if ( !n )
ba50: e2515000 subs r5, r1, #0
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ba54: e1a04000 mov r4, r0
ba58: e24dd004 sub sp, sp, #4
ba5c: e1a06002 mov r6, r2
float result;
char *end;
if ( !n )
ba60: 03a00009 moveq r0, #9
ba64: 0a000015 beq bac0 <rtems_string_to_float+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ba68: eb000bc7 bl e98c <__errno>
ba6c: e3a03000 mov r3, #0
ba70: e5803000 str r3, [r0]
*n = 0;
ba74: e3a03000 mov r3, #0
ba78: e5853000 str r3, [r5]
result = strtof( s, &end );
ba7c: e1a00004 mov r0, r4
ba80: e1a0100d mov r1, sp
ba84: eb00172b bl 11738 <strtof>
if ( endptr )
ba88: e3560000 cmp r6, #0
*endptr = end;
ba8c: 159d3000 ldrne r3, [sp]
ba90: 059d3000 ldreq r3, [sp]
ba94: 15863000 strne r3, [r6]
if ( end == s )
ba98: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
ba9c: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
baa0: 03a0000b moveq r0, #11
baa4: 0a000005 beq bac0 <rtems_string_to_float+0x74>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
baa8: eb000bb7 bl e98c <__errno>
baac: e5903000 ldr r3, [r0]
bab0: e3530022 cmp r3, #34 ; 0x22
bab4: 0a000003 beq bac8 <rtems_string_to_float+0x7c>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
bab8: e5857000 str r7, [r5]
babc: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
bac0: e28dd004 add sp, sp, #4
bac4: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
bac8: e1a00007 mov r0, r7
bacc: e3a01000 mov r1, #0
bad0: ebffdd47 bl 2ff4 <__cmpsf2>
bad4: e3500000 cmp r0, #0
bad8: 0a00000a beq bb08 <rtems_string_to_float+0xbc>
badc: e3e01102 mvn r1, #-2147483648 ; 0x80000000
bae0: e1a00007 mov r0, r7
bae4: e2411502 sub r1, r1, #8388608 ; 0x800000
bae8: ebffdd3d bl 2fe4 <__gesf2>
baec: e3500000 cmp r0, #0
baf0: ca000004 bgt bb08 <rtems_string_to_float+0xbc>
baf4: e1a00007 mov r0, r7 <== NOT EXECUTED
baf8: e3e01502 mvn r1, #8388608 ; 0x800000 <== NOT EXECUTED
bafc: ebffdd3a bl 2fec <__lesf2> <== NOT EXECUTED
bb00: e3500000 cmp r0, #0 <== NOT EXECUTED
bb04: aaffffeb bge bab8 <rtems_string_to_float+0x6c> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
bb08: e3a0000a mov r0, #10
bb0c: eaffffeb b bac0 <rtems_string_to_float+0x74>
0001ef58 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
1ef58: e92d40f0 push {r4, r5, r6, r7, lr}
long result;
char *end;
if ( !n )
1ef5c: e2516000 subs r6, r1, #0
const char *s,
int *n,
char **endptr,
int base
)
{
1ef60: e1a04000 mov r4, r0
1ef64: e24dd004 sub sp, sp, #4
1ef68: e1a05002 mov r5, r2
1ef6c: e1a07003 mov r7, r3
long result;
char *end;
if ( !n )
1ef70: 03a00009 moveq r0, #9
1ef74: 0a000015 beq 1efd0 <rtems_string_to_int+0x78>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1ef78: eb0095b0 bl 44640 <__errno>
1ef7c: e3a03000 mov r3, #0
1ef80: e5803000 str r3, [r0]
*n = 0;
result = strtol( s, &end, base );
1ef84: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
1ef88: e5863000 str r3, [r6]
result = strtol( s, &end, base );
1ef8c: e1a00004 mov r0, r4
1ef90: e1a0100d mov r1, sp
1ef94: eb00b4b6 bl 4c274 <strtol>
if ( endptr )
1ef98: e3550000 cmp r5, #0
*endptr = end;
1ef9c: 159d3000 ldrne r3, [sp]
1efa0: 059d3000 ldreq r3, [sp]
1efa4: 15853000 strne r3, [r5]
if ( end == s )
1efa8: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
1efac: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
1efb0: 03a0000b moveq r0, #11
1efb4: 0a000005 beq 1efd0 <rtems_string_to_int+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1efb8: eb0095a0 bl 44640 <__errno>
1efbc: e5903000 ldr r3, [r0]
1efc0: e3530022 cmp r3, #34 ; 0x22
1efc4: 0a000003 beq 1efd8 <rtems_string_to_int+0x80>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1efc8: e5867000 str r7, [r6]
1efcc: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
1efd0: e28dd004 add sp, sp, #4
1efd4: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1efd8: e3770106 cmn r7, #-2147483647 ; 0x80000001
1efdc: 13570000 cmpne r7, #0
1efe0: 0a000001 beq 1efec <rtems_string_to_int+0x94>
1efe4: e3570102 cmp r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED
1efe8: 1afffff6 bne 1efc8 <rtems_string_to_int+0x70> <== NOT EXECUTED
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
1efec: e3a0000a mov r0, #10
1eff0: eafffff6 b 1efd0 <rtems_string_to_int+0x78>
0001effc <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
1effc: e92d40f0 push {r4, r5, r6, r7, lr}
unsigned long result;
char *end;
if ( !n )
1f000: e2516000 subs r6, r1, #0
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
1f004: e1a04000 mov r4, r0
1f008: e24dd004 sub sp, sp, #4
1f00c: e1a05002 mov r5, r2
1f010: e1a07003 mov r7, r3
unsigned long result;
char *end;
if ( !n )
1f014: 03a00009 moveq r0, #9
1f018: 0a000017 beq 1f07c <rtems_string_to_unsigned_char+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1f01c: eb009587 bl 44640 <__errno>
1f020: e3a03000 mov r3, #0
1f024: e5803000 str r3, [r0]
*n = 0;
result = strtoul( s, &end, base );
1f028: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
1f02c: e5c63000 strb r3, [r6]
result = strtoul( s, &end, base );
1f030: e1a00004 mov r0, r4
1f034: e1a0100d mov r1, sp
1f038: eb00b5aa bl 4c6e8 <strtoul>
if ( endptr )
1f03c: e3550000 cmp r5, #0
*endptr = end;
1f040: 159d3000 ldrne r3, [sp]
1f044: 059d3000 ldreq r3, [sp]
1f048: 15853000 strne r3, [r5]
if ( end == s )
1f04c: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
1f050: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
1f054: 03a0000b moveq r0, #11
1f058: 0a000007 beq 1f07c <rtems_string_to_unsigned_char+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1f05c: eb009577 bl 44640 <__errno>
1f060: e5903000 ldr r3, [r0]
1f064: e3530022 cmp r3, #34 ; 0x22
1f068: 0a000005 beq 1f084 <rtems_string_to_unsigned_char+0x88>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
1f06c: e35700ff cmp r7, #255 ; 0xff
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1f070: 95c67000 strbls r7, [r6]
1f074: 93a00000 movls r0, #0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
1f078: 8a000006 bhi 1f098 <rtems_string_to_unsigned_char+0x9c>
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1f07c: e28dd004 add sp, sp, #4
1f080: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1f084: e2473001 sub r3, r7, #1 <== NOT EXECUTED
1f088: e3730003 cmn r3, #3 <== NOT EXECUTED
1f08c: 9afffff6 bls 1f06c <rtems_string_to_unsigned_char+0x70> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
1f090: e3a0000a mov r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
1f094: eafffff8 b 1f07c <rtems_string_to_unsigned_char+0x80> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
1f098: eb009568 bl 44640 <__errno> <== NOT EXECUTED
1f09c: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED
1f0a0: e5803000 str r3, [r0] <== NOT EXECUTED
1f0a4: e3a0000a mov r0, #10 <== NOT EXECUTED
1f0a8: eafffff3 b 1f07c <rtems_string_to_unsigned_char+0x80> <== NOT EXECUTED
00004644 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4644: e3500009 cmp r0, #9
4648: 012fff1e bxeq lr
464c: da000013 ble 46a0 <rtems_termios_baud_to_index+0x5c>
4650: e350000e cmp r0, #14 <== NOT EXECUTED
4654: 012fff1e bxeq lr <== NOT EXECUTED
4658: da00001b ble 46cc <rtems_termios_baud_to_index+0x88> <== NOT EXECUTED
465c: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED
4660: e2833002 add r3, r3, #2 <== NOT EXECUTED
4664: e1500003 cmp r0, r3 <== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
4668: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
466c: 012fff1e bxeq lr <== NOT EXECUTED
4670: da000028 ble 4718 <rtems_termios_baud_to_index+0xd4> <== NOT EXECUTED
4674: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED
4678: e2833003 add r3, r3, #3 <== NOT EXECUTED
467c: e1500003 cmp r0, r3 <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
4680: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4684: 012fff1e bxeq lr <== NOT EXECUTED
4688: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED
468c: e2833004 add r3, r3, #4 <== NOT EXECUTED
4690: e1500003 cmp r0, r3 <== NOT EXECUTED
4694: 1a00001d bne 4710 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
4698: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
469c: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
46a0: e3500004 cmp r0, #4
46a4: 012fff1e bxeq lr
46a8: ca000010 bgt 46f0 <rtems_termios_baud_to_index+0xac>
46ac: e3500001 cmp r0, #1
46b0: 012fff1e bxeq lr
46b4: da00001f ble 4738 <rtems_termios_baud_to_index+0xf4>
46b8: e3500002 cmp r0, #2 <== NOT EXECUTED
46bc: 012fff1e bxeq lr <== NOT EXECUTED
46c0: e3500003 cmp r0, #3 <== NOT EXECUTED
46c4: 1a000011 bne 4710 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED
46c8: e12fff1e bx lr <== NOT EXECUTED
46cc: e350000b cmp r0, #11 <== NOT EXECUTED
46d0: 012fff1e bxeq lr <== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
46d4: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
46d8: b12fff1e bxlt lr <== NOT EXECUTED
46dc: e350000c cmp r0, #12 <== NOT EXECUTED
46e0: 012fff1e bxeq lr <== NOT EXECUTED
46e4: e350000d cmp r0, #13 <== NOT EXECUTED
46e8: 1a000008 bne 4710 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED
46ec: e12fff1e bx lr <== NOT EXECUTED
46f0: e3500006 cmp r0, #6 <== NOT EXECUTED
46f4: 012fff1e bxeq lr <== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
46f8: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
46fc: b12fff1e bxlt lr <== NOT EXECUTED
4700: e3500007 cmp r0, #7 <== NOT EXECUTED
4704: 012fff1e bxeq lr <== NOT EXECUTED
4708: e3500008 cmp r0, #8 <== NOT EXECUTED
470c: 012fff1e bxeq lr <== NOT EXECUTED
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
4710: e3e00000 mvn r0, #0
default: baud_index = -1; break;
}
return baud_index;
}
4714: e12fff1e bx lr
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4718: e350000f cmp r0, #15 <== NOT EXECUTED
471c: 012fff1e bxeq lr <== NOT EXECUTED
4720: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED
4724: e2833001 add r3, r3, #1 <== NOT EXECUTED
4728: e1500003 cmp r0, r3 <== NOT EXECUTED
472c: 1afffff7 bne 4710 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
4730: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
4734: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4738: e3500000 cmp r0, #0
473c: 012fff1e bxeq lr
4740: eafffff2 b 4710 <rtems_termios_baud_to_index+0xcc>
00003084 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
3084: e59f3008 ldr r3, [pc, #8] ; 3094 <rtems_termios_bufsize+0x10><== NOT EXECUTED
3088: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
308c: e3a00000 mov r0, #0 <== NOT EXECUTED
3090: e12fff1e bx lr <== NOT EXECUTED
00004638 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4638: e92d4070 push {r4, r5, r6, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
463c: e59f51b0 ldr r5, [pc, #432] ; 47f4 <rtems_termios_close+0x1bc>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4640: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4644: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4648: e1a06000 mov r6, r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
464c: e1a02001 mov r2, r1
4650: e5950000 ldr r0, [r5]
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4654: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4658: eb000453 bl 57ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
465c: e3500000 cmp r0, #0
4660: 1a00005f bne 47e4 <rtems_termios_close+0x1ac>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
4664: e5943008 ldr r3, [r4, #8]
4668: e2433001 sub r3, r3, #1
466c: e3530000 cmp r3, #0
4670: e5843008 str r3, [r4, #8]
4674: 1a00002f bne 4738 <rtems_termios_close+0x100>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4678: e59420cc ldr r2, [r4, #204] ; 0xcc
467c: e59f3174 ldr r3, [pc, #372] ; 47f8 <rtems_termios_close+0x1c0>
4680: e0833282 add r3, r3, r2, lsl #5
4684: e5931004 ldr r1, [r3, #4]
4688: e3510000 cmp r1, #0
468c: 0a000040 beq 4794 <rtems_termios_close+0x15c>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4690: e1a00004 mov r0, r4 <== NOT EXECUTED
4694: e1a0e00f mov lr, pc <== NOT EXECUTED
4698: e12fff11 bx r1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
469c: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED
46a0: e3530002 cmp r3, #2 <== NOT EXECUTED
46a4: 0a000044 beq 47bc <rtems_termios_close+0x184> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
46a8: e594309c ldr r3, [r4, #156] ; 0x9c
46ac: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
46b0: 11a02006 movne r2, r6
46b4: 1284000c addne r0, r4, #12
46b8: 18900003 ldmne r0, {r0, r1}
46bc: 11a0e00f movne lr, pc
46c0: 112fff13 bxne r3
if (tty->forw == NULL) {
46c4: e5943000 ldr r3, [r4]
46c8: e3530000 cmp r3, #0
46cc: 0a000020 beq 4754 <rtems_termios_close+0x11c>
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
46d0: e5942004 ldr r2, [r4, #4]
46d4: e5832004 str r2, [r3, #4]
}
if (tty->back == NULL) {
46d8: e5942004 ldr r2, [r4, #4]
46dc: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
46e0: 15823000 strne r3, [r2]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
46e4: 0a000025 beq 4780 <rtems_termios_close+0x148>
}
}
else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
46e8: e5940014 ldr r0, [r4, #20]
46ec: eb000405 bl 5708 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
46f0: e5940018 ldr r0, [r4, #24]
46f4: eb000403 bl 5708 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
46f8: e594008c ldr r0, [r4, #140] ; 0x8c
46fc: eb000401 bl 5708 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
4700: e59430a0 ldr r3, [r4, #160] ; 0xa0
4704: e3530000 cmp r3, #0
4708: 0a00000e beq 4748 <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
470c: e59430b4 ldr r3, [r4, #180] ; 0xb4
4710: e3530002 cmp r3, #2
4714: 0a00000b beq 4748 <rtems_termios_close+0x110>
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
4718: e5940058 ldr r0, [r4, #88] ; 0x58
471c: ebfff661 bl 20a8 <free>
free (tty->rawOutBuf.theBuf);
4720: e594007c ldr r0, [r4, #124] ; 0x7c
4724: ebfff65f bl 20a8 <free>
free (tty->cbuf);
4728: e594001c ldr r0, [r4, #28]
472c: ebfff65d bl 20a8 <free>
free (tty);
4730: e1a00004 mov r0, r4
4734: ebfff65b bl 20a8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
4738: e5950000 ldr r0, [r5]
473c: eb000462 bl 58cc <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
4740: e3a00000 mov r0, #0
4744: e8bd8070 pop {r4, r5, r6, pc}
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
4748: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
474c: eb0003ed bl 5708 <rtems_semaphore_delete> <== NOT EXECUTED
4750: eafffff0 b 4718 <rtems_termios_close+0xe0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
4754: e5942004 ldr r2, [r4, #4]
4758: e59f109c ldr r1, [pc, #156] ; 47fc <rtems_termios_close+0x1c4>
if ( rtems_termios_ttyTail != NULL ) {
475c: e3520000 cmp r2, #0
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
4760: e5812000 str r2, [r1]
if ( rtems_termios_ttyTail != NULL ) {
4764: 0a00001f beq 47e8 <rtems_termios_close+0x1b0>
rtems_termios_ttyTail->forw = NULL;
4768: e5823000 str r3, [r2] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
476c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
4770: e5943000 ldr r3, [r4] <== NOT EXECUTED
4774: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
4778: 15823000 strne r3, [r2] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
477c: 1affffd9 bne 46e8 <rtems_termios_close+0xb0> <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
4780: e59f1078 ldr r1, [pc, #120] ; 4800 <rtems_termios_close+0x1c8>
if ( rtems_termios_ttyHead != NULL ) {
4784: e3530000 cmp r3, #0
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
4788: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
478c: 15832004 strne r2, [r3, #4]
4790: eaffffd4 b 46e8 <rtems_termios_close+0xb0>
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4794: e5940018 ldr r0, [r4, #24]
4798: e1a02001 mov r2, r1
479c: eb000402 bl 57ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
47a0: e3500000 cmp r0, #0
47a4: 1a00000e bne 47e4 <rtems_termios_close+0x1ac>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
47a8: e1a00004 mov r0, r4
47ac: ebfffd9e bl 3e2c <drainOutput>
}
if (tty->device.outputUsesInterrupts
47b0: e59430b4 ldr r3, [r4, #180] ; 0xb4
47b4: e3530002 cmp r3, #2
47b8: 1affffba bne 46a8 <rtems_termios_close+0x70>
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
47bc: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED
47c0: e3a01001 mov r1, #1 <== NOT EXECUTED
47c4: eb0002d2 bl 5314 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
47c8: e3500000 cmp r0, #0 <== NOT EXECUTED
47cc: 1a000004 bne 47e4 <rtems_termios_close+0x1ac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
47d0: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED
47d4: e3a01001 mov r1, #1 <== NOT EXECUTED
47d8: eb0002cd bl 5314 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
47dc: e3500000 cmp r0, #0 <== NOT EXECUTED
47e0: 0affffb0 beq 46a8 <rtems_termios_close+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
47e4: eb00057e bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
47e8: e59f3010 ldr r3, [pc, #16] ; 4800 <rtems_termios_close+0x1c8>
47ec: e5832000 str r2, [r3]
47f0: eaffffbc b 46e8 <rtems_termios_close+0xb0>
000032a0 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
32a0: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
32a4: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
32a8: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
32ac: e3520002 cmp r2, #2 <== NOT EXECUTED
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
32b0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
32b4: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
32b8: 0a00000b beq 32ec <rtems_termios_dequeue_characters+0x4c> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
32bc: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
32c0: e3530005 cmp r3, #5 <== NOT EXECUTED
32c4: 0a000001 beq 32d0 <rtems_termios_dequeue_characters+0x30> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
32c8: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
32cc: eaffff74 b 30a4 <rtems_termios_refill_transmitter> <== NOT EXECUTED
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
32d0: e59f302c ldr r3, [pc, #44] ; 3304 <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED
32d4: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED
32d8: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
32dc: 11a0e00f movne lr, pc <== NOT EXECUTED
32e0: 112fff13 bxne r3 <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
32e4: e3a00000 mov r0, #0 <== NOT EXECUTED
32e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
32ec: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED
32f0: e1a01002 mov r1, r2 <== NOT EXECUTED
32f4: eb000806 bl 5314 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
32f8: e3500000 cmp r0, #0 <== NOT EXECUTED
32fc: 0afffff8 beq 32e4 <rtems_termios_dequeue_characters+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3300: eb000ab7 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00003308 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
3308: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
330c: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
3310: e59f82f0 ldr r8, [pc, #752] ; 3608 <rtems_termios_enqueue_raw_characters+0x300><== NOT EXECUTED
3314: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED
3318: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
331c: e3560000 cmp r6, #0 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
3320: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
3324: e1a04000 mov r4, r0 <== NOT EXECUTED
3328: e1a05001 mov r5, r1 <== NOT EXECUTED
332c: e1a07002 mov r7, r2 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
3330: 0a00001e beq 33b0 <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
while (len--) {
3334: e3520000 cmp r2, #0 <== NOT EXECUTED
3338: 0a00000b beq 336c <rtems_termios_enqueue_raw_characters+0x64><== NOT EXECUTED
333c: e3a0a000 mov sl, #0 <== NOT EXECUTED
3340: ea000002 b 3350 <rtems_termios_enqueue_raw_characters+0x48><== NOT EXECUTED
3344: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
3348: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED
334c: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
3350: e7d5000a ldrb r0, [r5, sl] <== NOT EXECUTED
3354: e1a01004 mov r1, r4 <== NOT EXECUTED
3358: e28aa001 add sl, sl, #1 <== NOT EXECUTED
335c: e1a0e00f mov lr, pc <== NOT EXECUTED
3360: e12fff16 bx r6 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
3364: e157000a cmp r7, sl <== NOT EXECUTED
3368: 1afffff5 bne 3344 <rtems_termios_enqueue_raw_characters+0x3c><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
336c: e59490e4 ldr r9, [r4, #228] ; 0xe4 <== NOT EXECUTED
3370: e3590000 cmp r9, #0 <== NOT EXECUTED
3374: 1a00000b bne 33a8 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
3378: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
337c: e3530000 cmp r3, #0 <== NOT EXECUTED
3380: 0a000008 beq 33a8 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3384: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
3388: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
338c: e1a0e00f mov lr, pc <== NOT EXECUTED
3390: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3394: e3a03001 mov r3, #1 <== NOT EXECUTED
3398: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
339c: e1a00009 mov r0, r9 <== NOT EXECUTED
33a0: e28dd00c add sp, sp, #12 <== NOT EXECUTED
33a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
33a8: e3a09000 mov r9, #0 <== NOT EXECUTED
33ac: eafffffa b 339c <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
33b0: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED
33b4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
33b8: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED
33bc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
33c0: e1a0b006 mov fp, r6 <== NOT EXECUTED
33c4: e58d6000 str r6, [sp] <== NOT EXECUTED
33c8: ea000036 b 34a8 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
33cc: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
33d0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
33d4: e2800001 add r0, r0, #1 <== NOT EXECUTED
33d8: eb00569b bl 18e4c <__umodsi3> <== NOT EXECUTED
33dc: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
33e0: e10f9000 mrs r9, CPSR <== NOT EXECUTED
33e4: e3893080 orr r3, r9, #128 ; 0x80 <== NOT EXECUTED
33e8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
33ec: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
33f0: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
33f4: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
33f8: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
33fc: e0800008 add r0, r0, r8 <== NOT EXECUTED
3400: eb005691 bl 18e4c <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
3404: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED
3408: e1500003 cmp r0, r3 <== NOT EXECUTED
340c: 9a000010 bls 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
3410: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
3414: e3130001 tst r3, #1 <== NOT EXECUTED
3418: 1a00000d bne 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
341c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3420: e3833001 orr r3, r3, #1 <== NOT EXECUTED
3424: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
3428: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
342c: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED
3430: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
3434: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED
3438: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED
343c: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
3440: 0a000057 beq 35a4 <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
3444: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3448: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
344c: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
3450: 0a000062 beq 35e0 <rtems_termios_enqueue_raw_characters+0x2d8><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3454: e129f009 msr CPSR_fc, r9 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
3458: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
345c: e1530008 cmp r3, r8 <== NOT EXECUTED
3460: 0a00002d beq 351c <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
3464: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3468: e7c3a008 strb sl, [r3, r8] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
346c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
3470: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
3474: e5848060 str r8, [r4, #96] ; 0x60 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
3478: 1a000008 bne 34a0 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
347c: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
3480: e3530000 cmp r3, #0 <== NOT EXECUTED
3484: 0a000005 beq 34a0 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3488: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
348c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
3490: e1a0e00f mov lr, pc <== NOT EXECUTED
3494: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3498: e3a03001 mov r3, #1 <== NOT EXECUTED
349c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
34a0: e2866001 add r6, r6, #1 <== NOT EXECUTED
34a4: e2477001 sub r7, r7, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
34a8: e3570000 cmp r7, #0 <== NOT EXECUTED
34ac: 0a00002d beq 3568 <rtems_termios_enqueue_raw_characters+0x260><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
34b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
34b4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
34b8: e7d5a006 ldrb sl, [r5, r6] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
34bc: 0a000005 beq 34d8 <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
34c0: e5d4304a ldrb r3, [r4, #74] ; 0x4a <== NOT EXECUTED
34c4: e153000a cmp r3, sl <== NOT EXECUTED
34c8: 0a000017 beq 352c <rtems_termios_enqueue_raw_characters+0x224><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
34cc: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED
34d0: e153000a cmp r3, sl <== NOT EXECUTED
34d4: 0a00001e beq 3554 <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
34d8: e35b0000 cmp fp, #0 <== NOT EXECUTED
34dc: 0affffba beq 33cc <rtems_termios_enqueue_raw_characters+0xc4><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
34e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
34e4: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
34e8: e3530020 cmp r3, #32 <== NOT EXECUTED
34ec: 1affffeb bne 34a0 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
34f0: e10f8000 mrs r8, CPSR <== NOT EXECUTED
34f4: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
34f8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
34fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3500: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3504: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3508: e3520000 cmp r2, #0 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
350c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3510: 1a00001b bne 3584 <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3514: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
3518: eaffffe0 b 34a0 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
351c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3520: e2833001 add r3, r3, #1 <== NOT EXECUTED
3524: e58d3000 str r3, [sp] <== NOT EXECUTED
3528: eaffffdc b 34a0 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
352c: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED
3530: e1520003 cmp r2, r3 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
3534: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
3538: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
353c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
3540: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
3544: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
3548: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
354c: e3a0b001 mov fp, #1 <== NOT EXECUTED
3550: eaffffe2 b 34e0 <rtems_termios_enqueue_raw_characters+0x1d8><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
3554: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3558: e3c33010 bic r3, r3, #16 <== NOT EXECUTED
355c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
3560: e3a0b001 mov fp, #1 <== NOT EXECUTED
3564: eaffffdd b 34e0 <rtems_termios_enqueue_raw_characters+0x1d8><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
3568: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
356c: e59d9000 ldr r9, [sp] <== NOT EXECUTED
3570: e0833009 add r3, r3, r9 <== NOT EXECUTED
3574: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3578: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
357c: eb0008d2 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
3580: eaffff85 b 339c <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
3584: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
3588: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
358c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3590: e0811003 add r1, r1, r3 <== NOT EXECUTED
3594: e3a02001 mov r2, #1 <== NOT EXECUTED
3598: e1a0e00f mov lr, pc <== NOT EXECUTED
359c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
35a0: eaffffdb b 3514 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
35a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
35a8: e3130020 tst r3, #32 <== NOT EXECUTED
35ac: 1a000002 bne 35bc <rtems_termios_enqueue_raw_characters+0x2b4><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
35b0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
35b4: e3530000 cmp r3, #0 <== NOT EXECUTED
35b8: 1affffa5 bne 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
35bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
35c0: e3833002 orr r3, r3, #2 <== NOT EXECUTED
35c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
35c8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
35cc: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
35d0: e3a02001 mov r2, #1 <== NOT EXECUTED
35d4: e1a0e00f mov lr, pc <== NOT EXECUTED
35d8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
35dc: eaffff9c b 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
35e0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
35e4: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
35e8: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
35ec: e3530000 cmp r3, #0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
35f0: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
35f4: 0affff96 beq 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
35f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
35fc: e1a0e00f mov lr, pc <== NOT EXECUTED
3600: e12fff13 bx r3 <== NOT EXECUTED
3604: eaffff92 b 3454 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
0000303c <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
303c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
3040: e59fc034 ldr ip, [pc, #52] ; 307c <rtems_termios_initialize+0x40>
3044: e59c3000 ldr r3, [ip]
3048: e3530000 cmp r3, #0
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
304c: e24dd004 sub sp, sp, #4
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
3050: 0a000001 beq 305c <rtems_termios_initialize+0x20>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
3054: e28dd004 add sp, sp, #4
3058: e8bd8000 pop {pc}
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
305c: e59f001c ldr r0, [pc, #28] ; 3080 <rtems_termios_initialize+0x44>
3060: e3a01001 mov r1, #1
3064: e3a02054 mov r2, #84 ; 0x54
3068: e58dc000 str ip, [sp]
306c: eb000933 bl 5540 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
3070: e3500000 cmp r0, #0
3074: 0afffff6 beq 3054 <rtems_termios_initialize+0x18>
rtems_fatal_error_occurred (sc);
3078: eb000b59 bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00004258 <rtems_termios_ioctl>:
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4258: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
425c: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
4260: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
4264: e580100c str r1, [r0, #12]
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4268: e5935034 ldr r5, [r3, #52] ; 0x34
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
426c: e1a04000 mov r4, r0
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4270: e1a02001 mov r2, r1
4274: e5950018 ldr r0, [r5, #24]
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
4278: e5947008 ldr r7, [r4, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
427c: eb00054a bl 57ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
4280: e2506000 subs r6, r0, #0
4284: 1a00000e bne 42c4 <rtems_termios_ioctl+0x6c>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
4288: e5943004 ldr r3, [r4, #4]
428c: e3530004 cmp r3, #4
4290: 0a000006 beq 42b0 <rtems_termios_ioctl+0x58>
4294: 8a00000d bhi 42d0 <rtems_termios_ioctl+0x78>
4298: e3530002 cmp r3, #2
429c: 0a000020 beq 4324 <rtems_termios_ioctl+0xcc>
42a0: 9a000087 bls 44c4 <rtems_termios_ioctl+0x26c>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
42a4: e1a00005 mov r0, r5
42a8: ebfffedf bl 3e2c <drainOutput>
break;
42ac: ea000002 b 42bc <rtems_termios_ioctl+0x64>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
42b0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
42b4: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED
42b8: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
42bc: e5950018 ldr r0, [r5, #24]
42c0: eb000581 bl 58cc <rtems_semaphore_release>
args->ioctl_return = sc;
42c4: e584600c str r6, [r4, #12]
return sc;
}
42c8: e1a00006 mov r0, r6
42cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
42d0: e3a02a46 mov r2, #286720 ; 0x46000 <== NOT EXECUTED
42d4: e2822e67 add r2, r2, #1648 ; 0x670 <== NOT EXECUTED
42d8: e282213d add r2, r2, #1073741839 ; 0x4000000f <== NOT EXECUTED
42dc: e1530002 cmp r3, r2 <== NOT EXECUTED
42e0: 0a00006b beq 4494 <rtems_termios_ioctl+0x23c> <== NOT EXECUTED
42e4: 8a000082 bhi 44f4 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
42e8: e3530005 cmp r3, #5 <== NOT EXECUTED
42ec: 0a0000a5 beq 4588 <rtems_termios_ioctl+0x330> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
42f0: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED
42f4: e59f3334 ldr r3, [pc, #820] ; 4630 <rtems_termios_ioctl+0x3d8><== NOT EXECUTED
42f8: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
42fc: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
4300: e3530000 cmp r3, #0 <== NOT EXECUTED
4304: 03a0600a moveq r6, #10 <== NOT EXECUTED
4308: 0affffeb beq 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
430c: e1a00005 mov r0, r5 <== NOT EXECUTED
4310: e1a01004 mov r1, r4 <== NOT EXECUTED
4314: e1a0e00f mov lr, pc <== NOT EXECUTED
4318: e12fff13 bx r3 <== NOT EXECUTED
431c: e1a06000 mov r6, r0 <== NOT EXECUTED
4320: eaffffe5 b 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
4324: e594e008 ldr lr, [r4, #8]
4328: e2857030 add r7, r5, #48 ; 0x30
432c: e8be000f ldm lr!, {r0, r1, r2, r3}
4330: e1a0c007 mov ip, r7
4334: e8ac000f stmia ip!, {r0, r1, r2, r3}
4338: e8be000f ldm lr!, {r0, r1, r2, r3}
433c: e8ac000f stmia ip!, {r0, r1, r2, r3}
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4340: e59520b8 ldr r2, [r5, #184] ; 0xb8
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
4344: e59e3000 ldr r3, [lr]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4348: e3120c02 tst r2, #512 ; 0x200
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
434c: e58c3000 str r3, [ip]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4350: 0a000012 beq 43a0 <rtems_termios_ioctl+0x148>
4354: e5953030 ldr r3, [r5, #48] ; 0x30
4358: e3130b01 tst r3, #1024 ; 0x400
435c: 1a00000f bne 43a0 <rtems_termios_ioctl+0x148>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
4360: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
4364: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
4368: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
436c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
4370: e3130020 tst r3, #32 <== NOT EXECUTED
4374: 0a000009 beq 43a0 <rtems_termios_ioctl+0x148> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
4378: e10f8000 mrs r8, CPSR <== NOT EXECUTED
437c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
4380: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
4384: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
4388: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
438c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
4390: e3520000 cmp r2, #0 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
4394: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
4398: 1a00009c bne 4610 <rtems_termios_ioctl+0x3b8> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
439c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
43a0: e59530b8 ldr r3, [r5, #184] ; 0xb8
43a4: e3130b01 tst r3, #1024 ; 0x400
43a8: 0a000008 beq 43d0 <rtems_termios_ioctl+0x178>
43ac: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED
43b0: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
43b4: 1a000005 bne 43d0 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
43b8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
43bc: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
43c0: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
43c4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
43c8: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
43cc: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
43d0: e59530b8 ldr r3, [r5, #184] ; 0xb8
43d4: e3130c01 tst r3, #256 ; 0x100
43d8: 05952038 ldreq r2, [r5, #56] ; 0x38
43dc: 0a000012 beq 442c <rtems_termios_ioctl+0x1d4>
43e0: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
43e4: e3520000 cmp r2, #0 <== NOT EXECUTED
43e8: ba00007c blt 45e0 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
43ec: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
43f0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
43f4: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
43f8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
43fc: e3130004 tst r3, #4 <== NOT EXECUTED
4400: 0a000006 beq 4420 <rtems_termios_ioctl+0x1c8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
4404: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
4408: e3530000 cmp r3, #0 <== NOT EXECUTED
440c: 0a000003 beq 4420 <rtems_termios_ioctl+0x1c8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
4410: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
4414: e1a0e00f mov lr, pc <== NOT EXECUTED
4418: e12fff13 bx r3 <== NOT EXECUTED
441c: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
4420: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
4424: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
4428: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
442c: e3520000 cmp r2, #0
4430: ba00006a blt 45e0 <rtems_termios_ioctl+0x388>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
4434: e5953030 ldr r3, [r5, #48] ; 0x30
4438: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
443c: 159520b8 ldrne r2, [r5, #184] ; 0xb8
4440: 13822b01 orrne r2, r2, #1024 ; 0x400
4444: 158520b8 strne r2, [r5, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
4448: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
444c: 159530b8 ldrne r3, [r5, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
4450: e595803c ldr r8, [r5, #60] ; 0x3c
if (tty->termios.c_iflag & IXOFF) {
tty->flow_ctrl |= FL_MDXOF;
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
tty->flow_ctrl |= FL_MDXON;
4454: 13833c02 orrne r3, r3, #512 ; 0x200
4458: 158530b8 strne r3, [r5, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
445c: e2188002 ands r8, r8, #2
4460: 0a00004c beq 4598 <rtems_termios_ioctl+0x340>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
4464: e3a03000 mov r3, #0
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
4468: e5853074 str r3, [r5, #116] ; 0x74
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
446c: e585306c str r3, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4470: e5853070 str r3, [r5, #112] ; 0x70
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4474: e59530a8 ldr r3, [r5, #168] ; 0xa8
4478: e3530000 cmp r3, #0
447c: 0affff8e beq 42bc <rtems_termios_ioctl+0x64>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
4480: e1a01007 mov r1, r7
4484: e5950010 ldr r0, [r5, #16]
4488: e1a0e00f mov lr, pc
448c: e12fff13 bx r3
4490: eaffff89 b 42bc <rtems_termios_ioctl+0x64>
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
4494: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED
4498: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
449c: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
44a0: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED
44a4: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44a8: e2851020 add r1, r5, #32 <== NOT EXECUTED
44ac: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
44b0: e0412002 sub r2, r1, r2 <== NOT EXECUTED
44b4: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
44b8: e0823003 add r3, r2, r3 <== NOT EXECUTED
44bc: e5813000 str r3, [r1] <== NOT EXECUTED
44c0: eaffff7d b 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44c4: e3530001 cmp r3, #1
44c8: 1affff88 bne 42f0 <rtems_termios_ioctl+0x98>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
44cc: e5947008 ldr r7, [r4, #8]
44d0: e285c030 add ip, r5, #48 ; 0x30
44d4: e8bc000f ldm ip!, {r0, r1, r2, r3}
44d8: e1a0e007 mov lr, r7
44dc: e8ae000f stmia lr!, {r0, r1, r2, r3}
44e0: e8bc000f ldm ip!, {r0, r1, r2, r3}
44e4: e8ae000f stmia lr!, {r0, r1, r2, r3}
44e8: e59c3000 ldr r3, [ip]
44ec: e58e3000 str r3, [lr]
break;
44f0: eaffff71 b 42bc <rtems_termios_ioctl+0x64>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44f4: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED
44f8: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED
44fc: e2822129 add r2, r2, #1073741834 ; 0x4000000a <== NOT EXECUTED
4500: e1530002 cmp r3, r2 <== NOT EXECUTED
4504: 0a00001b beq 4578 <rtems_termios_ioctl+0x320> <== NOT EXECUTED
4508: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED
450c: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED
4510: e282212e add r2, r2, #-2147483637 ; 0x8000000b <== NOT EXECUTED
4514: e1530002 cmp r3, r2 <== NOT EXECUTED
4518: 1affff74 bne 42f0 <rtems_termios_ioctl+0x98> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
451c: e59f710c ldr r7, [pc, #268] ; 4630 <rtems_termios_ioctl+0x3d8><== NOT EXECUTED
4520: e59530cc ldr r3, [r5, #204] ; 0xcc <== NOT EXECUTED
4524: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
4528: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
452c: e3530000 cmp r3, #0 <== NOT EXECUTED
4530: 0a000003 beq 4544 <rtems_termios_ioctl+0x2ec> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4534: e1a00005 mov r0, r5 <== NOT EXECUTED
4538: e1a0e00f mov lr, pc <== NOT EXECUTED
453c: e12fff13 bx r3 <== NOT EXECUTED
4540: e1a06000 mov r6, r0 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
4544: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
4548: e5932000 ldr r2, [r3] <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
454c: e7973282 ldr r3, [r7, r2, lsl #5] <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
4550: e3a01000 mov r1, #0 <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4554: e3530000 cmp r3, #0 <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
4558: e58510d0 str r1, [r5, #208] ; 0xd0 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
455c: e58520cc str r2, [r5, #204] ; 0xcc <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4560: 0affff55 beq 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
4564: e1a00005 mov r0, r5 <== NOT EXECUTED
4568: e1a0e00f mov lr, pc <== NOT EXECUTED
456c: e12fff13 bx r3 <== NOT EXECUTED
4570: e1a06000 mov r6, r0 <== NOT EXECUTED
4574: eaffff50 b 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
4578: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
457c: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED
4580: e5832000 str r2, [r3] <== NOT EXECUTED
break;
4584: eaffff4c b 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
4588: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
458c: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED
4590: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED
break;
4594: eaffff48 b 42bc <rtems_termios_ioctl+0x64> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
4598: e5d5a046 ldrb sl, [r5, #70] ; 0x46
459c: eb0002d6 bl 50fc <rtems_clock_get_ticks_per_second>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
45a0: e000009a mul r0, sl, r0
45a4: e59f2088 ldr r2, [pc, #136] ; 4634 <rtems_termios_ioctl+0x3dc>
45a8: e0831092 umull r1, r3, r2, r0
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
45ac: e5d52046 ldrb r2, [r5, #70] ; 0x46
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
45b0: e1a031a3 lsr r3, r3, #3
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
45b4: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
45b8: e5853054 str r3, [r5, #84] ; 0x54
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
45bc: 0a00000b beq 45f0 <rtems_termios_ioctl+0x398>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
45c0: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
45c4: e3520000 cmp r2, #0 <== NOT EXECUTED
45c8: 01a02003 moveq r2, r3 <== NOT EXECUTED
45cc: 13a02000 movne r2, #0 <== NOT EXECUTED
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
45d0: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
45d4: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
45d8: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED
45dc: eaffffa4 b 4474 <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
45e0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
45e4: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED
45e8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
45ec: eaffff90 b 4434 <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
45f0: e5d53047 ldrb r3, [r5, #71] ; 0x47
45f4: e3530000 cmp r3, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
45f8: 03a03001 moveq r3, #1
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
45fc: 15852074 strne r2, [r5, #116] ; 0x74
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
4600: 1585206c strne r2, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4604: 15852070 strne r2, [r5, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
4608: 0585306c streq r3, [r5, #108] ; 0x6c
460c: eaffff98 b 4474 <rtems_termios_ioctl+0x21c>
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
4610: e5953084 ldr r3, [r5, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
4614: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED
4618: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
461c: e0811003 add r1, r1, r3 <== NOT EXECUTED
4620: e3a02001 mov r2, #1 <== NOT EXECUTED
4624: e1a0e00f mov lr, pc <== NOT EXECUTED
4628: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED
462c: eaffff5a b 439c <rtems_termios_ioctl+0x144> <== NOT EXECUTED
00004804 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4804: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4808: e59f7490 ldr r7, [pc, #1168] ; 4ca0 <rtems_termios_open+0x49c>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
480c: e1a06001 mov r6, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4810: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4814: e24dd014 sub sp, sp, #20
4818: e1a05000 mov r5, r0
481c: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4820: e5970000 ldr r0, [r7]
4824: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4828: e1a09003 mov r9, r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
482c: eb0003de bl 57ac <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4830: e250a000 subs sl, r0, #0
4834: 1a000020 bne 48bc <rtems_termios_open+0xb8>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
4838: e59fb464 ldr fp, [pc, #1124] ; 4ca4 <rtems_termios_open+0x4a0>
483c: e59b4000 ldr r4, [fp]
4840: e3540000 cmp r4, #0
4844: 1a000003 bne 4858 <rtems_termios_open+0x54>
4848: ea00002b b 48fc <rtems_termios_open+0xf8>
484c: e5944000 ldr r4, [r4]
4850: e3540000 cmp r4, #0
4854: 0a000028 beq 48fc <rtems_termios_open+0xf8>
if ((tty->major == major) && (tty->minor == minor))
4858: e594300c ldr r3, [r4, #12]
485c: e1530005 cmp r3, r5
4860: 1afffff9 bne 484c <rtems_termios_open+0x48>
4864: e5943010 ldr r3, [r4, #16]
4868: e1530006 cmp r3, r6
486c: 1afffff6 bne 484c <rtems_termios_open+0x48>
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
4870: e5943008 ldr r3, [r4, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4874: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
4878: e3530000 cmp r3, #0
487c: e2833001 add r3, r3, #1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4880: e5824034 str r4, [r2, #52] ; 0x34
if (!tty->refcount++) {
4884: e5843008 str r3, [r4, #8]
4888: 1a000009 bne 48b4 <rtems_termios_open+0xb0>
if (tty->device.firstOpen)
488c: e5943098 ldr r3, [r4, #152] ; 0x98
4890: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
4894: 11a00005 movne r0, r5
4898: 11a01006 movne r1, r6
489c: 11a02008 movne r2, r8
48a0: 11a0e00f movne lr, pc
48a4: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
48a8: e59430b4 ldr r3, [r4, #180] ; 0xb4
48ac: e3530002 cmp r3, #2
48b0: 0a000004 beq 48c8 <rtems_termios_open+0xc4>
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
48b4: e5970000 ldr r0, [r7]
48b8: eb000403 bl 58cc <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
48bc: e1a0000a mov r0, sl
48c0: e28dd014 add sp, sp, #20
48c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
48c8: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED
48cc: e59f13d4 ldr r1, [pc, #980] ; 4ca8 <rtems_termios_open+0x4a4><== NOT EXECUTED
48d0: e1a02004 mov r2, r4 <== NOT EXECUTED
48d4: eb0004cd bl 5c10 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
48d8: e3500000 cmp r0, #0 <== NOT EXECUTED
48dc: 1a0000d2 bne 4c2c <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
48e0: e1a02004 mov r2, r4 <== NOT EXECUTED
48e4: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED
48e8: e59f13bc ldr r1, [pc, #956] ; 4cac <rtems_termios_open+0x4a8><== NOT EXECUTED
48ec: eb0004c7 bl 5c10 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
48f0: e3500000 cmp r0, #0 <== NOT EXECUTED
48f4: 0affffee beq 48b4 <rtems_termios_open+0xb0> <== NOT EXECUTED
48f8: ea0000cb b 4c2c <rtems_termios_open+0x428> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
48fc: e3a00001 mov r0, #1
4900: e3a010e8 mov r1, #232 ; 0xe8
4904: ebfff551 bl 1e50 <calloc>
if (tty == NULL) {
4908: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
490c: e58d0010 str r0, [sp, #16]
4910: e1a04000 mov r4, r0
if (tty == NULL) {
4914: 0a0000af beq 4bd8 <rtems_termios_open+0x3d4>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
4918: e59f0390 ldr r0, [pc, #912] ; 4cb0 <rtems_termios_open+0x4ac>
491c: e59d1010 ldr r1, [sp, #16]
4920: e5903004 ldr r3, [r0, #4]
4924: e5813064 str r3, [r1, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4928: e5910064 ldr r0, [r1, #100] ; 0x64
492c: ebfff6b6 bl 240c <malloc>
4930: e59d2010 ldr r2, [sp, #16]
if (tty->rawInBuf.theBuf == NULL) {
4934: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4938: e5820058 str r0, [r2, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
493c: 0a0000a9 beq 4be8 <rtems_termios_open+0x3e4>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
4940: e59fc368 ldr ip, [pc, #872] ; 4cb0 <rtems_termios_open+0x4ac>
4944: e59de010 ldr lr, [sp, #16]
4948: e59c3008 ldr r3, [ip, #8]
494c: e58e3088 str r3, [lr, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
4950: e59e0088 ldr r0, [lr, #136] ; 0x88
4954: ebfff6ac bl 240c <malloc>
4958: e59d1010 ldr r1, [sp, #16]
if (tty->rawOutBuf.theBuf == NULL) {
495c: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
4960: e581007c str r0, [r1, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
4964: 05910058 ldreq r0, [r1, #88] ; 0x58
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
4968: 0a000097 beq 4bcc <rtems_termios_open+0x3c8>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
496c: e59f233c ldr r2, [pc, #828] ; 4cb0 <rtems_termios_open+0x4ac>
4970: e5920000 ldr r0, [r2]
4974: ebfff6a4 bl 240c <malloc>
4978: e59d3010 ldr r3, [sp, #16]
if (tty->cbuf == NULL) {
497c: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
4980: e583001c str r0, [r3, #28]
if (tty->cbuf == NULL) {
4984: 0a00008c beq 4bbc <rtems_termios_open+0x3b8>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
4988: e59b2000 ldr r2, [fp]
tty->back = NULL;
498c: e59dc010 ldr ip, [sp, #16]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
4990: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
4994: e3520000 cmp r2, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
4998: e88c000c stm ip, {r2, r3}
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
499c: 1582c004 strne ip, [r2, #4]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
49a0: e58c30d4 str r3, [ip, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
49a4: e58c30d8 str r3, [ip, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
49a8: e58c30dc str r3, [ip, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
49ac: e58c30e0 str r3, [ip, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
49b0: e58c30e4 str r3, [ip, #228] ; 0xe4
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
49b4: e59f32f8 ldr r3, [pc, #760] ; 4cb4 <rtems_termios_open+0x4b0>
49b8: e5932000 ldr r2, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
49bc: e59f12ec ldr r1, [pc, #748] ; 4cb0 <rtems_termios_open+0x4ac>
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
49c0: e3520000 cmp r2, #0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
49c4: e59d2010 ldr r2, [sp, #16]
49c8: e5d1000c ldrb r0, [r1, #12]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
49cc: e59de010 ldr lr, [sp, #16]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
49d0: e282c014 add ip, r2, #20
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
49d4: 0583e000 streq lr, [r3]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
49d8: e58be000 str lr, [fp]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
49dc: e3800315 orr r0, r0, #1409286144 ; 0x54000000
49e0: e58dc000 str ip, [sp]
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
49e4: e59dc010 ldr ip, [sp, #16]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
49e8: e3800852 orr r0, r0, #5373952 ; 0x520000
49ec: e3a03000 mov r3, #0
49f0: e3800c69 orr r0, r0, #26880 ; 0x6900
49f4: e3a01001 mov r1, #1
49f8: e3a02054 mov r2, #84 ; 0x54
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
49fc: e58c6010 str r6, [ip, #16]
tty->major = major;
4a00: e58c500c str r5, [ip, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4a04: eb0002cd bl 5540 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
4a08: e2503000 subs r3, r0, #0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4a0c: e59fb29c ldr fp, [pc, #668] ; 4cb0 <rtems_termios_open+0x4ac>
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
4a10: 1a000085 bne 4c2c <rtems_termios_open+0x428>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4a14: e5db000c ldrb r0, [fp, #12]
4a18: e59de010 ldr lr, [sp, #16]
4a1c: e3800315 orr r0, r0, #1409286144 ; 0x54000000
4a20: e3800852 orr r0, r0, #5373952 ; 0x520000
4a24: e28ec018 add ip, lr, #24
4a28: e3a01001 mov r1, #1
4a2c: e3800c6f orr r0, r0, #28416 ; 0x6f00
4a30: e3a02054 mov r2, #84 ; 0x54
4a34: e58dc000 str ip, [sp]
4a38: eb0002c0 bl 5540 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
4a3c: e2501000 subs r1, r0, #0
4a40: 1a000079 bne 4c2c <rtems_termios_open+0x428>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4a44: e5db000c ldrb r0, [fp, #12]
4a48: e59d2010 ldr r2, [sp, #16]
4a4c: e3800315 orr r0, r0, #1409286144 ; 0x54000000
4a50: e3800852 orr r0, r0, #5373952 ; 0x520000
4a54: e282c08c add ip, r2, #140 ; 0x8c
4a58: e3800b1e orr r0, r0, #30720 ; 0x7800
4a5c: e3a02020 mov r2, #32
4a60: e1a03001 mov r3, r1
4a64: e58dc000 str ip, [sp]
4a68: eb0002b4 bl 5540 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
4a6c: e250e000 subs lr, r0, #0
4a70: 1a00006d bne 4c2c <rtems_termios_open+0x428>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
4a74: e8b9000f ldm r9!, {r0, r1, r2, r3}
4a78: e58d900c str r9, [sp, #12]
4a7c: e59d9010 ldr r9, [sp, #16]
4a80: e289c098 add ip, r9, #152 ; 0x98
4a84: e8ac000f stmia ip!, {r0, r1, r2, r3}
4a88: e59d900c ldr r9, [sp, #12]
4a8c: e899000f ldm r9, {r0, r1, r2, r3}
4a90: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4a94: e59dc010 ldr ip, [sp, #16]
4a98: e59c30b4 ldr r3, [ip, #180] ; 0xb4
4a9c: e3530002 cmp r3, #2
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
4aa0: e58ce094 str lr, [ip, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4aa4: 0a000061 beq 4c30 <rtems_termios_open+0x42c>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
4aa8: e59d9010 ldr r9, [sp, #16]
4aac: e59930a0 ldr r3, [r9, #160] ; 0xa0
4ab0: e3530000 cmp r3, #0
4ab4: 0a00004e beq 4bf4 <rtems_termios_open+0x3f0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
4ab8: e59930b4 ldr r3, [r9, #180] ; 0xb4
4abc: e3530002 cmp r3, #2
4ac0: 0a00004b beq 4bf4 <rtems_termios_open+0x3f0>
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
4ac4: e59d0010 ldr r0, [sp, #16]
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
4ac8: e3a03000 mov r3, #0
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
4acc: e58030b8 str r3, [r0, #184] ; 0xb8
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
4ad0: e5909064 ldr r9, [r0, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
4ad4: e590b064 ldr fp, [r0, #100] ; 0x64
/*
* Bump name characer
*/
if (c++ == 'z')
4ad8: e59f11d0 ldr r1, [pc, #464] ; 4cb0 <rtems_termios_open+0x4ac>
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
4adc: e1a090a9 lsr r9, r9, #1
4ae0: e58d9008 str r9, [sp, #8]
tty->highwater = tty->rawInBuf.Size * 3/4;
4ae4: e08bb08b add fp, fp, fp, lsl #1
4ae8: e59d9010 ldr r9, [sp, #16]
/*
* Bump name characer
*/
if (c++ == 'z')
4aec: e5d1e00c ldrb lr, [r1, #12]
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
4af0: e1a0b12b lsr fp, fp, #2
4af4: e589b0c0 str fp, [r9, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
4af8: e59f91b0 ldr r9, [pc, #432] ; 4cb0 <rtems_termios_open+0x4ac>
4afc: e35e007a cmp lr, #122 ; 0x7a
4b00: e28ee001 add lr, lr, #1
4b04: e5c9e00c strb lr, [r9, #12]
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
4b08: e3a02c82 mov r2, #33280 ; 0x8200
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4b0c: e59de010 ldr lr, [sp, #16]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
4b10: e282203b add r2, r2, #59 ; 0x3b
4b14: e58e203c str r2, [lr, #60] ; 0x3c
tty->termios.c_cc[VINTR] = '\003';
4b18: e3a02003 mov r2, #3
4b1c: e5ce2041 strb r2, [lr, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
4b20: e3a0201c mov r2, #28
4b24: e5ce2042 strb r2, [lr, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
4b28: e3a0207f mov r2, #127 ; 0x7f
4b2c: e5ce2043 strb r2, [lr, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
4b30: e3a02015 mov r2, #21
4b34: e5ce2044 strb r2, [lr, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
4b38: e3a02004 mov r2, #4
4b3c: e5ce2045 strb r2, [lr, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
4b40: e3a02011 mov r2, #17
4b44: e5ce2049 strb r2, [lr, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
4b48: e3a02013 mov r2, #19
4b4c: e5ce204a strb r2, [lr, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
4b50: e3a0201a mov r2, #26
4b54: e5ce204b strb r2, [lr, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
4b58: e3a02012 mov r2, #18
4b5c: e5ce204d strb r2, [lr, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
4b60: e3a0200f mov r2, #15
4b64: e5ce204e strb r2, [lr, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
4b68: e3a02017 mov r2, #23
4b6c: e5ce204f strb r2, [lr, #79] ; 0x4f
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
4b70: e3a00b06 mov r0, #6144 ; 0x1800
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
4b74: e3a02016 mov r2, #22
4b78: e5ce2050 strb r2, [lr, #80] ; 0x50
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
4b7c: e2800005 add r0, r0, #5
4b80: e58e0034 str r0, [lr, #52] ; 0x34
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4b84: e3a0cc25 mov ip, #9472 ; 0x2500
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
4b88: e59d0008 ldr r0, [sp, #8]
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4b8c: e3a01e8b mov r1, #2224 ; 0x8b0
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
4b90: e5ce304c strb r3, [lr, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
4b94: e5ce3051 strb r3, [lr, #81] ; 0x51
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4b98: e28cc002 add ip, ip, #2
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4b9c: e281100d add r1, r1, #13
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
4ba0: 0282204b addeq r2, r2, #75 ; 0x4b
4ba4: 01a03009 moveq r3, r9
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4ba8: e58ec030 str ip, [lr, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4bac: e58e1038 str r1, [lr, #56] ; 0x38
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
4bb0: e58e00bc str r0, [lr, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
4bb4: 05c3200c strbeq r2, [r3, #12]
4bb8: eaffff2c b 4870 <rtems_termios_open+0x6c>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
4bbc: e593007c ldr r0, [r3, #124] ; 0x7c <== NOT EXECUTED
4bc0: ebfff538 bl 20a8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
4bc4: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
4bc8: e5990058 ldr r0, [r9, #88] ; 0x58 <== NOT EXECUTED
4bcc: ebfff535 bl 20a8 <free> <== NOT EXECUTED
free(tty);
4bd0: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
4bd4: ebfff533 bl 20a8 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4bd8: e5970000 ldr r0, [r7] <== NOT EXECUTED
4bdc: eb00033a bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
4be0: e3a0a01a mov sl, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4be4: eaffff34 b 48bc <rtems_termios_open+0xb8> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
4be8: e1a00002 mov r0, r2 <== NOT EXECUTED
4bec: ebfff52d bl 20a8 <free> <== NOT EXECUTED
4bf0: eafffff8 b 4bd8 <rtems_termios_open+0x3d4> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
4bf4: e59fc0b4 ldr ip, [pc, #180] ; 4cb0 <rtems_termios_open+0x4ac><== NOT EXECUTED
4bf8: e5dc000c ldrb r0, [ip, #12] <== NOT EXECUTED
4bfc: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
4c00: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED
4c04: e3a01000 mov r1, #0 <== NOT EXECUTED
4c08: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED
4c0c: e28ec068 add ip, lr, #104 ; 0x68 <== NOT EXECUTED
4c10: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED
4c14: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
4c18: e1a03001 mov r3, r1 <== NOT EXECUTED
4c1c: e58dc000 str ip, [sp] <== NOT EXECUTED
4c20: eb000246 bl 5540 <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
4c24: e3500000 cmp r0, #0 <== NOT EXECUTED
4c28: 0affffa5 beq 4ac4 <rtems_termios_open+0x2c0> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
4c2c: eb00046c bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
4c30: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED
4c34: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED
4c38: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED
4c3c: e28cc0c8 add ip, ip, #200 ; 0xc8 <== NOT EXECUTED
4c40: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED
4c44: e3a0100a mov r1, #10 <== NOT EXECUTED
4c48: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
4c4c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
4c50: e58de000 str lr, [sp] <== NOT EXECUTED
4c54: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
4c58: eb000345 bl 5974 <rtems_task_create> <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
4c5c: e250e000 subs lr, r0, #0 <== NOT EXECUTED
4c60: 1afffff1 bne 4c2c <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
4c64: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED
4c68: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
4c6c: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED
4c70: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED
4c74: e282c0c4 add ip, r2, #196 ; 0xc4 <== NOT EXECUTED
4c78: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED
4c7c: e3a01009 mov r1, #9 <== NOT EXECUTED
4c80: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
4c84: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
4c88: e58de000 str lr, [sp] <== NOT EXECUTED
4c8c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
4c90: eb000337 bl 5974 <rtems_task_create> <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
4c94: e3500000 cmp r0, #0 <== NOT EXECUTED
4c98: 0affff82 beq 4aa8 <rtems_termios_open+0x2a4> <== NOT EXECUTED
4c9c: eaffffe2 b 4c2c <rtems_termios_open+0x428> <== NOT EXECUTED
0000360c <rtems_termios_puts>:
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
360c: e59230b4 ldr r3, [r2, #180] ; 0xb4
3610: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
3614: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3618: e1a04002 mov r4, r2
361c: e1a0b000 mov fp, r0
3620: e1a09001 mov r9, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
3624: 0a000039 beq 3710 <rtems_termios_puts+0x104>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
3628: e3510000 cmp r1, #0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
362c: e5928080 ldr r8, [r2, #128] ; 0x80 <== NOT EXECUTED
while (len) {
3630: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
3634: e3a0a000 mov sl, #0 <== NOT EXECUTED
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
3638: e3a07002 mov r7, #2 <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
363c: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
3640: e2880001 add r0, r8, #1 <== NOT EXECUTED
3644: eb005600 bl 18e4c <__umodsi3> <== NOT EXECUTED
3648: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
364c: e10f5000 mrs r5, CPSR <== NOT EXECUTED
3650: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED
3654: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
3658: e5946084 ldr r6, [r4, #132] ; 0x84 <== NOT EXECUTED
365c: e1560000 cmp r6, r0 <== NOT EXECUTED
3660: 1a00000d bne 369c <rtems_termios_puts+0x90> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3664: e5847094 str r7, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3668: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
366c: e3a01000 mov r1, #0 <== NOT EXECUTED
3670: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
3674: e1a02001 mov r2, r1 <== NOT EXECUTED
3678: eb00084b bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
367c: e3500000 cmp r0, #0 <== NOT EXECUTED
3680: 1a000028 bne 3728 <rtems_termios_puts+0x11c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3684: e10f5000 mrs r5, CPSR <== NOT EXECUTED
3688: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED
368c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
3690: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
3694: e1530006 cmp r3, r6 <== NOT EXECUTED
3698: 0afffff1 beq 3664 <rtems_termios_puts+0x58> <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
369c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
36a0: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED
36a4: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
36a8: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
36ac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
36b0: e3530000 cmp r3, #0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
36b4: e5848080 str r8, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
36b8: 1a000007 bne 36dc <rtems_termios_puts+0xd0> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
36bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
36c0: e3130010 tst r3, #16 <== NOT EXECUTED
36c4: 0a000009 beq 36f0 <rtems_termios_puts+0xe4> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
36c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
36cc: e3833020 orr r3, r3, #32 <== NOT EXECUTED
36d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
36d4: e3a03001 mov r3, #1 <== NOT EXECUTED
36d8: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
36dc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
36e0: e2599001 subs r9, r9, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
36e4: e28aa001 add sl, sl, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
36e8: 1affffd3 bne 363c <rtems_termios_puts+0x30> <== NOT EXECUTED
36ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
36f0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
36f4: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
36f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
36fc: e0811003 add r1, r1, r3 <== NOT EXECUTED
3700: e3a02001 mov r2, #1 <== NOT EXECUTED
3704: e1a0e00f mov lr, pc <== NOT EXECUTED
3708: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
370c: eafffff0 b 36d4 <rtems_termios_puts+0xc8> <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
3710: e1a01000 mov r1, r0
3714: e1a02009 mov r2, r9
3718: e5940010 ldr r0, [r4, #16]
371c: e1a0e00f mov lr, pc
3720: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
3724: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
3728: eb0009ad bl 5de4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00003ea8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3ea8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3eac: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3eb0: e1a0a000 mov sl, r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3eb4: e5934034 ldr r4, [r3, #52] ; 0x34
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3eb8: e3a01000 mov r1, #0
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
3ebc: e59a300c ldr r3, [sl, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3ec0: e24dd008 sub sp, sp, #8
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ec4: e5940014 ldr r0, [r4, #20]
3ec8: e1a02001 mov r2, r1
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
3ecc: e59a7010 ldr r7, [sl, #16]
char *buffer = args->buffer;
3ed0: e58d3000 str r3, [sp]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ed4: eb000634 bl 57ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3ed8: e250b000 subs fp, r0, #0
3edc: 1a00000e bne 3f1c <rtems_termios_read+0x74>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3ee0: e59420cc ldr r2, [r4, #204] ; 0xcc
3ee4: e59f3364 ldr r3, [pc, #868] ; 4250 <rtems_termios_read+0x3a8>
3ee8: e0833282 add r3, r3, r2, lsl #5
3eec: e5933008 ldr r3, [r3, #8]
3ef0: e3530000 cmp r3, #0
3ef4: 0a00000b beq 3f28 <rtems_termios_read+0x80>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3ef8: e1a0100a mov r1, sl <== NOT EXECUTED
3efc: e1a00004 mov r0, r4 <== NOT EXECUTED
3f00: e1a0e00f mov lr, pc <== NOT EXECUTED
3f04: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3f08: e3a03000 mov r3, #0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3f0c: e1a0b000 mov fp, r0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3f10: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3f14: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3f18: eb00066b bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
3f1c: e1a0000b mov r0, fp <== NOT EXECUTED
3f20: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3f24: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
3f28: e5942024 ldr r2, [r4, #36] ; 0x24
3f2c: e5943020 ldr r3, [r4, #32]
3f30: e1520003 cmp r2, r3
3f34: 0a00001a beq 3fa4 <rtems_termios_read+0xfc>
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3f38: e3570000 cmp r7, #0 <== NOT EXECUTED
3f3c: 0a000010 beq 3f84 <rtems_termios_read+0xdc> <== NOT EXECUTED
3f40: e2842020 add r2, r4, #32 <== NOT EXECUTED
3f44: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
3f48: e1530002 cmp r3, r2 <== NOT EXECUTED
3f4c: aa00000c bge 3f84 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
3f50: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3f54: e0631002 rsb r1, r3, r2 <== NOT EXECUTED
3f58: ea000002 b 3f68 <rtems_termios_read+0xc0> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3f5c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3f60: e1520003 cmp r2, r3 <== NOT EXECUTED
3f64: da000006 ble 3f84 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
3f68: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
3f6c: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3f70: e2577001 subs r7, r7, #1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
3f74: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED
3f78: e2833001 add r3, r3, #1 <== NOT EXECUTED
3f7c: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3f80: 1afffff5 bne 3f5c <rtems_termios_read+0xb4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
3f84: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED
3f88: e0677003 rsb r7, r7, r3 <== NOT EXECUTED
3f8c: e58a7018 str r7, [sl, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3f90: e3a03000 mov r3, #0 <== NOT EXECUTED
3f94: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3f98: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3f9c: eb00064a bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
return sc;
3fa0: eaffffdd b 3f1c <rtems_termios_read+0x74> <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3fa4: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
3fa8: e5942028 ldr r2, [r4, #40] ; 0x28
if (tty->device.pollRead != NULL
3fac: e3530000 cmp r3, #0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
3fb0: e584202c str r2, [r4, #44] ; 0x2c
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
3fb4: e584b020 str fp, [r4, #32]
3fb8: e584b024 str fp, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
3fbc: 0a000002 beq 3fcc <rtems_termios_read+0x124>
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3fc0: e59420b4 ldr r2, [r4, #180] ; 0xb4
3fc4: e3520000 cmp r2, #0
3fc8: 0a000064 beq 4160 <rtems_termios_read+0x2b8>
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3fcc: e2842049 add r2, r4, #73 ; 0x49 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
3fd0: e3a09c02 mov r9, #512 ; 0x200 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
3fd4: e5945074 ldr r5, [r4, #116] ; 0x74 <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3fd8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3fdc: e59f6270 ldr r6, [pc, #624] ; 4254 <rtems_termios_read+0x3ac><== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
3fe0: e2899002 add r9, r9, #2 <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3fe4: e3a08001 mov r8, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3fe8: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
3fec: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
3ff0: e1520003 cmp r2, r3 <== NOT EXECUTED
3ff4: 0a00003b beq 40e8 <rtems_termios_read+0x240> <== NOT EXECUTED
3ff8: e5962000 ldr r2, [r6] <== NOT EXECUTED
3ffc: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
4000: e2422001 sub r2, r2, #1 <== NOT EXECUTED
4004: e1520003 cmp r2, r3 <== NOT EXECUTED
4008: da000036 ble 40e8 <rtems_termios_read+0x240> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
400c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
4010: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
4014: e2800001 add r0, r0, #1 <== NOT EXECUTED
4018: eb00538b bl 18e4c <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
401c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
4020: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
4024: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
4028: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
402c: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED
4030: e0823003 add r3, r2, r3 <== NOT EXECUTED
4034: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
4038: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
403c: eb005382 bl 18e4c <__umodsi3> <== NOT EXECUTED
4040: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED
4044: e1500003 cmp r0, r3 <== NOT EXECUTED
4048: 2a000014 bcs 40a0 <rtems_termios_read+0x1f8> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
404c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4050: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
4054: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4058: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
405c: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED
4060: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
4064: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED
4068: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED
406c: e1530009 cmp r3, r9 <== NOT EXECUTED
4070: 0a00002e beq 4130 <rtems_termios_read+0x288> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
4074: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4078: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
407c: 0a000007 beq 40a0 <rtems_termios_read+0x1f8> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
4080: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
4084: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
4088: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
408c: e3530000 cmp r3, #0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
4090: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
4094: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
4098: 11a0e00f movne lr, pc <== NOT EXECUTED
409c: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
40a0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
40a4: e3130002 tst r3, #2 <== NOT EXECUTED
40a8: 0a000017 beq 410c <rtems_termios_read+0x264> <== NOT EXECUTED
if (siproc (c, tty))
40ac: e1a00005 mov r0, r5 <== NOT EXECUTED
40b0: e1a01004 mov r1, r4 <== NOT EXECUTED
40b4: ebffff0f bl 3cf8 <siproc> <== NOT EXECUTED
40b8: e3500000 cmp r0, #0 <== NOT EXECUTED
40bc: 1a000019 bne 4128 <rtems_termios_read+0x280> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
40c0: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
40c4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
40c8: e1520003 cmp r2, r3 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
40cc: e5945070 ldr r5, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
40d0: 0a000004 beq 40e8 <rtems_termios_read+0x240> <== NOT EXECUTED
40d4: e5963000 ldr r3, [r6] <== NOT EXECUTED
40d8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
40dc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
40e0: e1520003 cmp r2, r3 <== NOT EXECUTED
40e4: baffffc8 blt 400c <rtems_termios_read+0x164> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
40e8: e3580000 cmp r8, #0 <== NOT EXECUTED
40ec: 0affff91 beq 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
40f0: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED
40f4: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
40f8: e1a02005 mov r2, r5 <== NOT EXECUTED
40fc: eb0005aa bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
4100: e3500000 cmp r0, #0 <== NOT EXECUTED
4104: 0affffb7 beq 3fe8 <rtems_termios_read+0x140> <== NOT EXECUTED
4108: eaffff8a b 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
410c: e1a00005 mov r0, r5 <== NOT EXECUTED
4110: e1a01004 mov r1, r4 <== NOT EXECUTED
4114: ebfffef7 bl 3cf8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
4118: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
411c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
4120: e1520003 cmp r2, r3 <== NOT EXECUTED
4124: baffffe5 blt 40c0 <rtems_termios_read+0x218> <== NOT EXECUTED
4128: e3a08000 mov r8, #0 <== NOT EXECUTED
412c: eaffffe3 b 40c0 <rtems_termios_read+0x218> <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4130: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
4134: e3530000 cmp r3, #0 <== NOT EXECUTED
4138: 0a000002 beq 4148 <rtems_termios_read+0x2a0> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
413c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4140: e3130020 tst r3, #32 <== NOT EXECUTED
4144: 0affffca beq 4074 <rtems_termios_read+0x1cc> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
4148: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
414c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
4150: e3a02001 mov r2, #1 <== NOT EXECUTED
4154: e1a0e00f mov lr, pc <== NOT EXECUTED
4158: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
415c: eaffffcf b 40a0 <rtems_termios_read+0x1f8> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4160: e594203c ldr r2, [r4, #60] ; 0x3c
4164: e3120002 tst r2, #2
4168: 0a00000b beq 419c <rtems_termios_read+0x2f4>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
416c: e5940010 ldr r0, [r4, #16]
4170: e1a0e00f mov lr, pc
4174: e12fff13 bx r3
if (n < 0) {
4178: e3500000 cmp r0, #0
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
417c: e1a01004 mov r1, r4
4180: e20000ff and r0, r0, #255 ; 0xff
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
4184: ba00002d blt 4240 <rtems_termios_read+0x398>
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
4188: ebfffeda bl 3cf8 <siproc> <== NOT EXECUTED
418c: e3500000 cmp r0, #0 <== NOT EXECUTED
4190: 1affff68 bne 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4194: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
4198: eafffff3 b 416c <rtems_termios_read+0x2c4> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
419c: eb0003de bl 511c <rtems_clock_get_ticks_since_boot>
41a0: e1a05000 mov r5, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
41a4: e5940010 ldr r0, [r4, #16]
41a8: e1a0e00f mov lr, pc
41ac: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
41b0: e3500000 cmp r0, #0
41b4: ba00000c blt 41ec <rtems_termios_read+0x344>
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
41b8: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
41bc: e1a01004 mov r1, r4 <== NOT EXECUTED
41c0: ebfffecc bl 3cf8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
41c4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
41c8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
41cc: e1520003 cmp r2, r3 <== NOT EXECUTED
41d0: aaffff58 bge 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
41d4: e3530000 cmp r3, #0 <== NOT EXECUTED
41d8: 0afffff1 beq 41a4 <rtems_termios_read+0x2fc> <== NOT EXECUTED
41dc: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
41e0: e3530000 cmp r3, #0 <== NOT EXECUTED
41e4: 0affffee beq 41a4 <rtems_termios_read+0x2fc> <== NOT EXECUTED
41e8: eaffffeb b 419c <rtems_termios_read+0x2f4> <== NOT EXECUTED
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
41ec: e5d43047 ldrb r3, [r4, #71] ; 0x47
41f0: e3530000 cmp r3, #0
41f4: 0a000008 beq 421c <rtems_termios_read+0x374>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
41f8: e5d43046 ldrb r3, [r4, #70] ; 0x46
41fc: e3530000 cmp r3, #0
4200: 0a000002 beq 4210 <rtems_termios_read+0x368>
4204: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
4208: e3530000 cmp r3, #0 <== NOT EXECUTED
420c: 1a000005 bne 4228 <rtems_termios_read+0x380> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
4210: e3a00001 mov r0, #1
4214: eb000697 bl 5c78 <rtems_task_wake_after>
4218: eaffffe1 b 41a4 <rtems_termios_read+0x2fc>
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
421c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
4220: e3530000 cmp r3, #0 <== NOT EXECUTED
4224: 0affff43 beq 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
4228: eb0003bb bl 511c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
422c: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
4230: e0650000 rsb r0, r5, r0 <== NOT EXECUTED
4234: e1500003 cmp r0, r3 <== NOT EXECUTED
4238: 9afffff4 bls 4210 <rtems_termios_read+0x368> <== NOT EXECUTED
423c: eaffff3d b 3f38 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4240: e3a00001 mov r0, #1
4244: eb00068b bl 5c78 <rtems_task_wake_after>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4248: e59430a0 ldr r3, [r4, #160] ; 0xa0
424c: eaffffc6 b 416c <rtems_termios_read+0x2c4>
000030a4 <rtems_termios_refill_transmitter>:
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30a4: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
30a8: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED
30ac: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED
30b0: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
30b4: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED
30b8: e2822001 add r2, r2, #1 <== NOT EXECUTED
30bc: e1530002 cmp r3, r2 <== NOT EXECUTED
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
30c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
30c4: e1a04000 mov r4, r0 <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30c8: 0a000046 beq 31e8 <rtems_termios_refill_transmitter+0x144> <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
30cc: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
30d0: e2033003 and r3, r3, #3 <== NOT EXECUTED
30d4: e3530002 cmp r3, #2 <== NOT EXECUTED
30d8: 0a000054 beq 3230 <rtems_termios_refill_transmitter+0x18c> <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
30dc: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED
30e0: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED
30e4: e1520003 cmp r2, r3 <== NOT EXECUTED
30e8: 0a00002a beq 3198 <rtems_termios_refill_transmitter+0xf4> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30ec: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30f0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30f4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
30f8: e3a02000 mov r2, #0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
30fc: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
3100: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3104: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
3108: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
310c: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
3110: e0800003 add r0, r0, r3 <== NOT EXECUTED
3114: eb00574c bl 18e4c <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
3118: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
311c: e3530002 cmp r3, #2 <== NOT EXECUTED
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
3120: e1a05000 mov r5, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
3124: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
3128: 0a00002b beq 31dc <rtems_termios_refill_transmitter+0x138> <== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
312c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
3130: e1530005 cmp r3, r5 <== NOT EXECUTED
3134: 0a00001d beq 31b0 <rtems_termios_refill_transmitter+0x10c> <== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
3138: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
313c: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED
3140: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED
3144: 0a000046 beq 3264 <rtems_termios_refill_transmitter+0x1c0> <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
3148: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
314c: e1550003 cmp r5, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
3150: 85946088 ldrhi r6, [r4, #136] ; 0x88 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
3154: 95946080 ldrls r6, [r4, #128] ; 0x80 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
3158: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
315c: 80656006 rsbhi r6, r5, r6 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
3160: 90656006 rsbls r6, r5, r6 <== NOT EXECUTED
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
3164: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
3168: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
316c: 13a06001 movne r6, #1 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
3170: e3a03001 mov r3, #1 <== NOT EXECUTED
3174: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
3178: e0811005 add r1, r1, r5 <== NOT EXECUTED
317c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3180: e1a02006 mov r2, r6 <== NOT EXECUTED
3184: e1a0e00f mov lr, pc <== NOT EXECUTED
3188: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
318c: e5845084 str r5, [r4, #132] ; 0x84 <== NOT EXECUTED
}
return nToSend;
}
3190: e1a00006 mov r0, r6 <== NOT EXECUTED
3194: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
3198: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED
319c: e3530002 cmp r3, #2 <== NOT EXECUTED
31a0: 0a00003a beq 3290 <rtems_termios_refill_transmitter+0x1ec> <== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
31a4: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
31a8: e1a00006 mov r0, r6 <== NOT EXECUTED
31ac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
31b0: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
31b4: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
31b8: e3530000 cmp r3, #0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
31bc: e5846094 str r6, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
31c0: 01a06003 moveq r6, r3 <== NOT EXECUTED
31c4: 0afffff0 beq 318c <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
31c8: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
31cc: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
31d0: e1a0e00f mov lr, pc <== NOT EXECUTED
31d4: e12fff13 bx r3 <== NOT EXECUTED
31d8: eaffffeb b 318c <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
31dc: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
31e0: eb0009b9 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
31e4: eaffffd0 b 312c <rtems_termios_refill_transmitter+0x88> <== NOT EXECUTED
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
31e8: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
31ec: e3a02001 mov r2, #1 <== NOT EXECUTED
31f0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
31f4: e1a0e00f mov lr, pc <== NOT EXECUTED
31f8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
31fc: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3200: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3204: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
3208: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
320c: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
3210: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
3214: e3811002 orr r1, r1, #2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
3218: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
321c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3220: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3224: e3a06001 mov r6, #1 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
3228: e1a00006 mov r0, r6 <== NOT EXECUTED
322c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor,
3230: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
3234: e3a02001 mov r2, #1 <== NOT EXECUTED
3238: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
323c: e1a0e00f mov lr, pc <== NOT EXECUTED
3240: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3244: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3248: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
324c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
3250: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
3254: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
3258: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
325c: e3c11002 bic r1, r1, #2 <== NOT EXECUTED
3260: eaffffec b 3218 <rtems_termios_refill_transmitter+0x174> <== NOT EXECUTED
3264: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3268: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
326c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
3270: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
3274: e3822020 orr r2, r2, #32 <== NOT EXECUTED
3278: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
327c: e3a02001 mov r2, #1 <== NOT EXECUTED
3280: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3284: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3288: e3a06000 mov r6, #0 <== NOT EXECUTED
328c: eaffffbe b 318c <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
3290: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
3294: eb00098c bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
3298: e3a06000 mov r6, #0 <== NOT EXECUTED
329c: eaffffc1 b 31a8 <rtems_termios_refill_transmitter+0x104> <== NOT EXECUTED
00004d28 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
4d28: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
4d2c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
4d30: e1a04000 mov r4, r0 <== NOT EXECUTED
4d34: e28d7007 add r7, sp, #7 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4d38: e3a06000 mov r6, #0 <== NOT EXECUTED
4d3c: e1a0300d mov r3, sp <== NOT EXECUTED
4d40: e3a01002 mov r1, #2 <== NOT EXECUTED
4d44: e3a02000 mov r2, #0 <== NOT EXECUTED
4d48: e3a00003 mov r0, #3 <== NOT EXECUTED
4d4c: eb000112 bl 519c <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
4d50: e59d3000 ldr r3, [sp] <== NOT EXECUTED
4d54: e3130001 tst r3, #1 <== NOT EXECUTED
4d58: 1a000012 bne 4da8 <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4d5c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
4d60: e1a0e00f mov lr, pc <== NOT EXECUTED
4d64: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
4d68: e3700001 cmn r0, #1 <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4d6c: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
4d70: 0afffff1 beq 4d3c <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
4d74: e1a01007 mov r1, r7 <== NOT EXECUTED
4d78: e3a02001 mov r2, #1 <== NOT EXECUTED
4d7c: e1a00004 mov r0, r4 <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
4d80: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
4d84: ebfff95f bl 3308 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4d88: e1a0300d mov r3, sp <== NOT EXECUTED
4d8c: e3a01002 mov r1, #2 <== NOT EXECUTED
4d90: e3a02000 mov r2, #0 <== NOT EXECUTED
4d94: e3a00003 mov r0, #3 <== NOT EXECUTED
4d98: eb0000ff bl 519c <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
4d9c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
4da0: e3130001 tst r3, #1 <== NOT EXECUTED
4da4: 0affffec beq 4d5c <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
tty->rxTaskId = 0;
4da8: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4dac: e1a00006 mov r0, r6 <== NOT EXECUTED
4db0: eb00033d bl 5aac <rtems_task_delete> <== NOT EXECUTED
4db4: eaffffe0 b 4d3c <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
00003098 <rtems_termios_rxirq_occured>:
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
3098: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED
309c: e3a01002 mov r1, #2 <== NOT EXECUTED
30a0: ea00089b b 5314 <rtems_event_send> <== NOT EXECUTED
00004cb8 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
4cb8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
4cbc: e59f6060 ldr r6, [pc, #96] ; 4d24 <rtems_termios_txdaemon+0x6c><== NOT EXECUTED
4cc0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
4cc4: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
4cc8: e3a07000 mov r7, #0 <== NOT EXECUTED
4ccc: e1a0300d mov r3, sp <== NOT EXECUTED
4cd0: e3a01002 mov r1, #2 <== NOT EXECUTED
4cd4: e3a02000 mov r2, #0 <== NOT EXECUTED
4cd8: e3a00003 mov r0, #3 <== NOT EXECUTED
4cdc: eb00012e bl 519c <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
4ce0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
4ce4: e3130001 tst r3, #1 <== NOT EXECUTED
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
rtems_termios_linesw[tty->t_line].l_start(tty);
4ce8: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_event_receive((TERMIOS_TX_START_EVENT |
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
4cec: 1a000008 bne 4d14 <rtems_termios_txdaemon+0x5c> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4cf0: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
4cf4: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED
4cf8: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
4cfc: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
4d00: 11a0e00f movne lr, pc <== NOT EXECUTED
4d04: 112fff13 bxne r3 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
4d08: e1a00004 mov r0, r4 <== NOT EXECUTED
4d0c: ebfff8e4 bl 30a4 <rtems_termios_refill_transmitter> <== NOT EXECUTED
4d10: eaffffed b 4ccc <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
4d14: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4d18: e1a00007 mov r0, r7 <== NOT EXECUTED
4d1c: eb000362 bl 5aac <rtems_task_delete> <== NOT EXECUTED
4d20: eaffffe9 b 4ccc <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
00003d5c <rtems_termios_write>:
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3d5c: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
3d60: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3d64: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3d68: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
3d6c: e1a05000 mov r5, r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3d70: e1a02001 mov r2, r1
3d74: e5940018 ldr r0, [r4, #24]
3d78: eb00068b bl 57ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3d7c: e2506000 subs r6, r0, #0
3d80: 1a00000c bne 3db8 <rtems_termios_write+0x5c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
3d84: e59420cc ldr r2, [r4, #204] ; 0xcc
3d88: e59f3098 ldr r3, [pc, #152] ; 3e28 <rtems_termios_write+0xcc>
3d8c: e0833282 add r3, r3, r2, lsl #5
3d90: e593300c ldr r3, [r3, #12]
3d94: e3530000 cmp r3, #0
3d98: 0a000008 beq 3dc0 <rtems_termios_write+0x64>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
3d9c: e1a01005 mov r1, r5 <== NOT EXECUTED
3da0: e1a00004 mov r0, r4 <== NOT EXECUTED
3da4: e1a0e00f mov lr, pc <== NOT EXECUTED
3da8: e12fff13 bx r3 <== NOT EXECUTED
3dac: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
3db0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
3db4: eb0006c4 bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
3db8: e1a00006 mov r0, r6 <== NOT EXECUTED
3dbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
3dc0: e5943034 ldr r3, [r4, #52] ; 0x34
3dc4: e3130001 tst r3, #1
3dc8: 0a000011 beq 3e14 <rtems_termios_write+0xb8>
uint32_t count = args->count;
3dcc: e5958010 ldr r8, [r5, #16]
char *buffer = args->buffer;
while (count--)
3dd0: e3580000 cmp r8, #0
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
3dd4: e595a00c ldr sl, [r5, #12]
while (count--)
3dd8: 01a03006 moveq r3, r6
3ddc: 0a000007 beq 3e00 <rtems_termios_write+0xa4>
3de0: e1a07006 mov r7, r6
oproc (*buffer++, tty);
3de4: e7da0007 ldrb r0, [sl, r7]
3de8: e1a01004 mov r1, r4
3dec: e2877001 add r7, r7, #1
3df0: ebfffe4d bl 372c <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
3df4: e1580007 cmp r8, r7
3df8: 1afffff9 bne 3de4 <rtems_termios_write+0x88>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
3dfc: e5953010 ldr r3, [r5, #16]
3e00: e5853018 str r3, [r5, #24]
}
rtems_semaphore_release (tty->osem);
3e04: e5940018 ldr r0, [r4, #24]
3e08: eb0006af bl 58cc <rtems_semaphore_release>
return sc;
}
3e0c: e1a00006 mov r0, r6
3e10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
3e14: e285000c add r0, r5, #12 <== NOT EXECUTED
3e18: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3e1c: e1a02004 mov r2, r4 <== NOT EXECUTED
3e20: ebfffdf9 bl 360c <rtems_termios_puts> <== NOT EXECUTED
3e24: eafffff4 b 3dfc <rtems_termios_write+0xa0> <== NOT EXECUTED
00006b68 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
6b68: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
6b6c: e2108202 ands r8, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
6b70: e1a04000 mov r4, r0 <== NOT EXECUTED
6b74: e1a09001 mov r9, r1 <== NOT EXECUTED
6b78: e1a07002 mov r7, r2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
6b7c: 0a00000c beq 6bb4 <rtems_verror+0x4c> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
6b80: e59f2160 ldr r2, [pc, #352] ; 6ce8 <rtems_verror+0x180> <== NOT EXECUTED
6b84: e5923000 ldr r3, [r2] <== NOT EXECUTED
6b88: e3530000 cmp r3, #0 <== NOT EXECUTED
6b8c: e2833001 add r3, r3, #1 <== NOT EXECUTED
6b90: e5823000 str r3, [r2] <== NOT EXECUTED
6b94: 0a000004 beq 6bac <rtems_verror+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
6b98: e59f314c ldr r3, [pc, #332] ; 6cec <rtems_verror+0x184> <== NOT EXECUTED
6b9c: e5931000 ldr r1, [r3] <== NOT EXECUTED
6ba0: e2811001 add r1, r1, #1 <== NOT EXECUTED
6ba4: e5831000 str r1, [r3] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
6ba8: e5923000 ldr r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
6bac: e3530002 cmp r3, #2 <== NOT EXECUTED
6bb0: ca00002e bgt 6c70 <rtems_verror+0x108> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
6bb4: e59f5134 ldr r5, [pc, #308] ; 6cf0 <rtems_verror+0x188> <== NOT EXECUTED
6bb8: e5953000 ldr r3, [r5] <== NOT EXECUTED
6bbc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
6bc0: eb003943 bl 150d4 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6bc4: e2146101 ands r6, r4, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
6bc8: e3c4a207 bic sl, r4, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6bcc: 1a000038 bne 6cb4 <rtems_verror+0x14c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
6bd0: e5953000 ldr r3, [r5] <== NOT EXECUTED
6bd4: e1a02007 mov r2, r7 <== NOT EXECUTED
6bd8: e1a01009 mov r1, r9 <== NOT EXECUTED
6bdc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6be0: eb005161 bl 1b16c <vfprintf> <== NOT EXECUTED
if (status)
6be4: e35a0000 cmp sl, #0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
6be8: e1a07000 mov r7, r0 <== NOT EXECUTED
if (status)
6bec: 1a000025 bne 6c88 <rtems_verror+0x120> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
6bf0: e3560000 cmp r6, #0 <== NOT EXECUTED
6bf4: 0a00000b beq 6c28 <rtems_verror+0xc0> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
6bf8: da000004 ble 6c10 <rtems_verror+0xa8> <== NOT EXECUTED
6bfc: e1a00006 mov r0, r6 <== NOT EXECUTED
6c00: eb003d04 bl 16018 <strerror> <== NOT EXECUTED
6c04: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
6c08: e3530000 cmp r3, #0 <== NOT EXECUTED
6c0c: 1a00002b bne 6cc0 <rtems_verror+0x158> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6c10: e5953000 ldr r3, [r5] <== NOT EXECUTED
6c14: e59f10d8 ldr r1, [pc, #216] ; 6cf4 <rtems_verror+0x18c> <== NOT EXECUTED
6c18: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6c1c: e1a02006 mov r2, r6 <== NOT EXECUTED
6c20: eb0039e9 bl 153cc <fprintf> <== NOT EXECUTED
6c24: e0877000 add r7, r7, r0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
6c28: e5953000 ldr r3, [r5] <== NOT EXECUTED
6c2c: e59f10c4 ldr r1, [pc, #196] ; 6cf8 <rtems_verror+0x190> <== NOT EXECUTED
6c30: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6c34: eb0039e4 bl 153cc <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
6c38: e5953000 ldr r3, [r5] <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
6c3c: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
6c40: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6c44: eb003922 bl 150d4 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
6c48: e3140203 tst r4, #805306368 ; 0x30000000 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
6c4c: 008a0007 addeq r0, sl, r7 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
6c50: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
6c54: e3580000 cmp r8, #0 <== NOT EXECUTED
6c58: 0a000006 beq 6c78 <rtems_verror+0x110> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
6c5c: e3a00000 mov r0, #0 <== NOT EXECUTED
6c60: e59f1094 ldr r1, [pc, #148] ; 6cfc <rtems_verror+0x194> <== NOT EXECUTED
6c64: eb000035 bl 6d40 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
6c68: e1a00006 mov r0, r6 <== NOT EXECUTED
6c6c: eb000336 bl 794c <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
6c70: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return chars_written;
}
6c74: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
6c78: e59f1080 ldr r1, [pc, #128] ; 6d00 <rtems_verror+0x198> <== NOT EXECUTED
6c7c: e1a00008 mov r0, r8 <== NOT EXECUTED
6c80: eb00002e bl 6d40 <rtems_error> <== NOT EXECUTED
abort();
6c84: eb003816 bl 14ce4 <abort> <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
6c88: e59f3060 ldr r3, [pc, #96] ; 6cf0 <rtems_verror+0x188> <== NOT EXECUTED
6c8c: e5933000 ldr r3, [r3] <== NOT EXECUTED
6c90: e1a0000a mov r0, sl <== NOT EXECUTED
6c94: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED
6c98: ebffffae bl 6b58 <rtems_status_text> <== NOT EXECUTED
6c9c: e59f1060 ldr r1, [pc, #96] ; 6d04 <rtems_verror+0x19c> <== NOT EXECUTED
6ca0: e1a02000 mov r2, r0 <== NOT EXECUTED
6ca4: e1a0000a mov r0, sl <== NOT EXECUTED
6ca8: eb0039c7 bl 153cc <fprintf> <== NOT EXECUTED
6cac: e0877000 add r7, r7, r0 <== NOT EXECUTED
6cb0: eaffffce b 6bf0 <rtems_verror+0x88> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
6cb4: eb003813 bl 14d08 <__errno> <== NOT EXECUTED
6cb8: e5906000 ldr r6, [r0] <== NOT EXECUTED
6cbc: eaffffc3 b 6bd0 <rtems_verror+0x68> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
6cc0: e5953000 ldr r3, [r5] <== NOT EXECUTED
6cc4: e1a00006 mov r0, r6 <== NOT EXECUTED
6cc8: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED
6ccc: eb003cd1 bl 16018 <strerror> <== NOT EXECUTED
6cd0: e59f1030 ldr r1, [pc, #48] ; 6d08 <rtems_verror+0x1a0> <== NOT EXECUTED
6cd4: e1a02000 mov r2, r0 <== NOT EXECUTED
6cd8: e1a0000a mov r0, sl <== NOT EXECUTED
6cdc: eb0039ba bl 153cc <fprintf> <== NOT EXECUTED
6ce0: e0877000 add r7, r7, r0 <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
6ce4: eaffffcf b 6c28 <rtems_verror+0xc0> <== NOT EXECUTED
000294e8 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
294e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
294ec: e3a06000 mov r6, #0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
294f0: e59f90e8 ldr r9, [pc, #232] ; 295e0 <scanInt+0xf8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
294f4: e59f80e8 ldr r8, [pc, #232] ; 295e4 <scanInt+0xfc>
return 0;
d = c - '0';
if ((i > (limit / 10))
294f8: e59fa0e8 ldr sl, [pc, #232] ; 295e8 <scanInt+0x100>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
294fc: e1a04000 mov r4, r0
29500: e1a0b001 mov fp, r1
29504: e3e07102 mvn r7, #-2147483648 ; 0x80000000
29508: e1a05006 mov r5, r6
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2950c: e5943004 ldr r3, [r4, #4]
29510: e2433001 sub r3, r3, #1
29514: e3530000 cmp r3, #0
29518: e5843004 str r3, [r4, #4]
2951c: ba00001d blt 29598 <scanInt+0xb0>
29520: e5943000 ldr r3, [r4]
29524: e4d30001 ldrb r0, [r3], #1
if (c == ':')
29528: e350003a cmp r0, #58 ; 0x3a
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2952c: e5843000 str r3, [r4]
if (c == ':')
29530: 0a00001d beq 295ac <scanInt+0xc4>
break;
if (sign == 0) {
29534: e3560000 cmp r6, #0
29538: 1a000004 bne 29550 <scanInt+0x68>
if (c == '-') {
2953c: e350002d cmp r0, #45 ; 0x2d
sign = -1;
limit++;
29540: 02877001 addeq r7, r7, #1
29544: 03e06000 mvneq r6, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
29548: 0affffef beq 2950c <scanInt+0x24>
sign = -1;
limit++;
continue;
2954c: e3a06001 mov r6, #1
}
sign = 1;
}
if (!isdigit(c))
29550: e5983000 ldr r3, [r8]
29554: e0833000 add r3, r3, r0
29558: e5d33001 ldrb r3, [r3, #1]
2955c: e3130004 tst r3, #4
29560: 0a00001c beq 295d8 <scanInt+0xf0>
return 0;
d = c - '0';
if ((i > (limit / 10))
29564: e083279a umull r2, r3, sl, r7
29568: e15501a3 cmp r5, r3, lsr #3
2956c: 8a000019 bhi 295d8 <scanInt+0xf0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
29570: e2400030 sub r0, r0, #48 ; 0x30
29574: 11a03105 lslne r3, r5, #2
if ((i > (limit / 10))
29578: 0a000011 beq 295c4 <scanInt+0xdc>
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
2957c: e0835005 add r5, r3, r5
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
29580: e5943004 ldr r3, [r4, #4]
29584: e2433001 sub r3, r3, #1
29588: e3530000 cmp r3, #0
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
2958c: e0805085 add r5, r0, r5, lsl #1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
29590: e5843004 str r3, [r4, #4]
29594: aaffffe1 bge 29520 <scanInt+0x38>
29598: e5990000 ldr r0, [r9] <== NOT EXECUTED
2959c: e1a01004 mov r1, r4 <== NOT EXECUTED
295a0: eb0081a8 bl 49c48 <__srget_r> <== NOT EXECUTED
if (c == ':')
295a4: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED
295a8: 1affffe1 bne 29534 <scanInt+0x4c> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
295ac: e3560000 cmp r6, #0
295b0: 0a000008 beq 295d8 <scanInt+0xf0>
return 0;
*val = i * sign;
295b4: e0030695 mul r3, r5, r6
295b8: e3a00001 mov r0, #1
295bc: e58b3000 str r3, [fp]
return 1;
295c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
295c4: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED
295c8: e0832005 add r2, r3, r5 <== NOT EXECUTED
295cc: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED
295d0: e1500002 cmp r0, r2 <== NOT EXECUTED
295d4: 9affffe8 bls 2957c <scanInt+0x94> <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
295d8: e3a00000 mov r0, #0 <== NOT EXECUTED
}
295dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000295ec <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
295ec: e92d41f0 push {r4, r5, r6, r7, r8, lr}
295f0: e1a05002 mov r5, r2
int c;
*name = *bufp;
295f4: e5922000 ldr r2, [r2]
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
295f8: e59d7018 ldr r7, [sp, #24]
int c;
*name = *bufp;
295fc: e5812000 str r2, [r1]
for (;;) {
c = getc(fp);
29600: e59f60c4 ldr r6, [pc, #196] ; 296cc <scanString+0xe0>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
29604: e1a04000 mov r4, r0
29608: e1a08003 mov r8, r3
2960c: ea000013 b 29660 <scanString+0x74>
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
29610: e5943000 ldr r3, [r4]
29614: e4d30001 ldrb r0, [r3], #1
if (c == ':') {
29618: e350003a cmp r0, #58 ; 0x3a
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
2961c: e5843000 str r3, [r4]
if (c == ':') {
29620: 0a000018 beq 29688 <scanString+0x9c>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
29624: e350000a cmp r0, #10
29628: 0a000023 beq 296bc <scanString+0xd0>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
2962c: e3700001 cmn r0, #1
29630: 0a000023 beq 296c4 <scanString+0xd8>
return 0;
if (*nleft < 2)
29634: e5983000 ldr r3, [r8]
29638: e3530001 cmp r3, #1
2963c: 9a000020 bls 296c4 <scanString+0xd8>
return 0;
**bufp = c;
29640: e5953000 ldr r3, [r5]
29644: e5c30000 strb r0, [r3]
++(*bufp);
29648: e5952000 ldr r2, [r5]
--(*nleft);
2964c: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
29650: e2822001 add r2, r2, #1
--(*nleft);
29654: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
29658: e5852000 str r2, [r5]
--(*nleft);
2965c: e5883000 str r3, [r8]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
29660: e5943004 ldr r3, [r4, #4]
29664: e2433001 sub r3, r3, #1
29668: e3530000 cmp r3, #0
2966c: e5843004 str r3, [r4, #4]
29670: aaffffe6 bge 29610 <scanString+0x24>
29674: e5960000 ldr r0, [r6]
29678: e1a01004 mov r1, r4
2967c: eb008171 bl 49c48 <__srget_r>
if (c == ':') {
29680: e350003a cmp r0, #58 ; 0x3a
29684: 1affffe6 bne 29624 <scanString+0x38>
if (nlFlag)
29688: e3570000 cmp r7, #0
2968c: 1a00000c bne 296c4 <scanString+0xd8>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
29690: e5953000 ldr r3, [r5]
29694: e3a02000 mov r2, #0
29698: e5c32000 strb r2, [r3]
++(*bufp);
2969c: e5952000 ldr r2, [r5]
--(*nleft);
296a0: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
296a4: e2822001 add r2, r2, #1
--(*nleft);
296a8: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
296ac: e5852000 str r2, [r5]
--(*nleft);
296b0: e5883000 str r3, [r8]
296b4: e3a00001 mov r0, #1
return 1;
296b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
296bc: e3570000 cmp r7, #0
296c0: 1afffff2 bne 29690 <scanString+0xa4>
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
296c4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
296c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000296d0 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
296d0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
296d4: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
296d8: e28d5008 add r5, sp, #8
296dc: e28d4004 add r4, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
296e0: e58d2008 str r2, [sp, #8]
296e4: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
296e8: e3a06000 mov r6, #0
296ec: e1a02005 mov r2, r5
296f0: e1a03004 mov r3, r4
296f4: e58d6000 str r6, [sp]
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
296f8: e1a07000 mov r7, r0
296fc: e1a08001 mov r8, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
29700: ebffffb9 bl 295ec <scanString>
29704: e1500006 cmp r0, r6
29708: 1a000002 bne 29718 <scangr+0x48>
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
2970c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
29710: e28dd014 add sp, sp, #20
29714: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
29718: e1a00007 mov r0, r7
2971c: e2881004 add r1, r8, #4
29720: e1a02005 mov r2, r5
29724: e1a03004 mov r3, r4
29728: e58d6000 str r6, [sp]
2972c: ebffffae bl 295ec <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
29730: e1500006 cmp r0, r6
29734: 0afffff4 beq 2970c <scangr+0x3c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
29738: e1a00007 mov r0, r7
2973c: e28d1010 add r1, sp, #16
29740: ebffff68 bl 294e8 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
29744: e1500006 cmp r0, r6
29748: 0affffef beq 2970c <scangr+0x3c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
2974c: e1a03004 mov r3, r4
29750: e1a00007 mov r0, r7
29754: e1a02005 mov r2, r5
29758: e3a04001 mov r4, #1
2975c: e28d100c add r1, sp, #12
29760: e58d4000 str r4, [sp]
29764: ebffffa0 bl 295ec <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
29768: e1500006 cmp r0, r6
2976c: 0affffe6 beq 2970c <scangr+0x3c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
29770: e1dd31b0 ldrh r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
29774: e59d100c ldr r1, [sp, #12]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
29778: e1c830b8 strh r3, [r8, #8]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2977c: e5d13000 ldrb r3, [r1]
29780: e1530006 cmp r3, r6
29784: 03a04017 moveq r4, #23
29788: 0a000007 beq 297ac <scangr+0xdc>
2978c: e1a02001 mov r2, r1
if(*cp == ',')
29790: e353002c cmp r3, #44 ; 0x2c
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
29794: e5f23001 ldrb r3, [r2, #1]!
if(*cp == ',')
memcount++;
29798: 02844001 addeq r4, r4, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2979c: e3530000 cmp r3, #0
297a0: 1afffffa bne 29790 <scangr+0xc0>
297a4: e1a04104 lsl r4, r4, #2
297a8: e2844013 add r4, r4, #19
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
297ac: e59d3004 ldr r3, [sp, #4]
297b0: e1530004 cmp r3, r4
297b4: 3affffd4 bcc 2970c <scangr+0x3c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
297b8: e59d3008 ldr r3, [sp, #8]
297bc: e283300f add r3, r3, #15
297c0: e3c3300f bic r3, r3, #15
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
297c4: e5831000 str r1, [r3]
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
297c8: e588300c str r3, [r8, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
297cc: e59d200c ldr r2, [sp, #12]
297d0: e5d23000 ldrb r3, [r2]
297d4: e3530000 cmp r3, #0
297d8: 03a01004 moveq r1, #4
297dc: 0a00000b beq 29810 <scangr+0x140>
297e0: e2822001 add r2, r2, #1
297e4: e3a01001 mov r1, #1
if(*cp == ',') {
*cp = '\0';
297e8: e3a00000 mov r0, #0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
297ec: e353002c cmp r3, #44 ; 0x2c
*cp = '\0';
297f0: 05420001 strbeq r0, [r2, #-1]
grp->gr_mem[memcount++] = cp + 1;
297f4: 0598300c ldreq r3, [r8, #12]
297f8: 07832101 streq r2, [r3, r1, lsl #2]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
297fc: e4d23001 ldrb r3, [r2], #1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
29800: 02811001 addeq r1, r1, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
29804: e3530000 cmp r3, #0
29808: 1afffff7 bne 297ec <scangr+0x11c>
2980c: e1a01101 lsl r1, r1, #2
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
29810: e598300c ldr r3, [r8, #12]
29814: e3a02000 mov r2, #0
29818: e7832001 str r2, [r3, r1]
2981c: e3a00001 mov r0, #1
return 1;
29820: eaffffba b 29710 <scangr+0x40>
00029864 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
29864: e92d41f0 push {r4, r5, r6, r7, r8, lr}
29868: e24dd014 sub sp, sp, #20
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2986c: e28d5008 add r5, sp, #8
29870: e28d4004 add r4, sp, #4
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
29874: e58d2008 str r2, [sp, #8]
29878: e58d3004 str r3, [sp, #4]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2987c: e3a06000 mov r6, #0
29880: e1a02005 mov r2, r5
29884: e1a03004 mov r3, r4
29888: e58d6000 str r6, [sp]
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2988c: e1a07000 mov r7, r0
29890: e1a08001 mov r8, r1
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
29894: ebffff54 bl 295ec <scanString>
29898: e1500006 cmp r0, r6
2989c: 1a000002 bne 298ac <scanpw+0x48>
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
298a0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
298a4: e28dd014 add sp, sp, #20
298a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
298ac: e1a00007 mov r0, r7
298b0: e2881004 add r1, r8, #4
298b4: e1a02005 mov r2, r5
298b8: e1a03004 mov r3, r4
298bc: e58d6000 str r6, [sp]
298c0: ebffff49 bl 295ec <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
298c4: e1500006 cmp r0, r6
298c8: 0afffff4 beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
298cc: e1a00007 mov r0, r7
298d0: e28d1010 add r1, sp, #16
298d4: ebffff03 bl 294e8 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
298d8: e1500006 cmp r0, r6
298dc: 0affffef beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
298e0: e1a00007 mov r0, r7
298e4: e28d100c add r1, sp, #12
298e8: ebfffefe bl 294e8 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
298ec: e1500006 cmp r0, r6
298f0: 0affffea beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
298f4: e1a00007 mov r0, r7
298f8: e288100c add r1, r8, #12
298fc: e1a02005 mov r2, r5
29900: e1a03004 mov r3, r4
29904: e58d6000 str r6, [sp]
29908: ebffff37 bl 295ec <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2990c: e1500006 cmp r0, r6
29910: 0affffe2 beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
29914: e1a00007 mov r0, r7
29918: e2881010 add r1, r8, #16
2991c: e1a02005 mov r2, r5
29920: e1a03004 mov r3, r4
29924: e58d6000 str r6, [sp]
29928: ebffff2f bl 295ec <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2992c: e1500006 cmp r0, r6
29930: 0affffda beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
29934: e1a00007 mov r0, r7
29938: e2881014 add r1, r8, #20
2993c: e1a02005 mov r2, r5
29940: e1a03004 mov r3, r4
29944: e58d6000 str r6, [sp]
29948: ebffff27 bl 295ec <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2994c: e1500006 cmp r0, r6
29950: 0affffd2 beq 298a0 <scanpw+0x3c>
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
29954: e1a03004 mov r3, r4
29958: e1a00007 mov r0, r7
2995c: e1a02005 mov r2, r5
29960: e3a04001 mov r4, #1
29964: e2881018 add r1, r8, #24
29968: e58d4000 str r4, [sp]
2996c: ebffff1e bl 295ec <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
29970: e1500006 cmp r0, r6
29974: 0affffc9 beq 298a0 <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
29978: e1dd30bc ldrh r3, [sp, #12]
2997c: e1c830ba strh r3, [r8, #10]
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
29980: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
29984: e1a00004 mov r0, r4
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
29988: e1c830b8 strh r3, [r8, #8]
pwd->pw_gid = pwgid;
return 1;
2998c: eaffffc4 b 298a4 <scanpw+0x40>
00006240 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
6240: e3500004 cmp r0, #4
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
6244: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
6248: 9a000004 bls 6260 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
624c: eb00297f bl 10850 <__errno>
6250: e3a03016 mov r3, #22
6254: e5803000 str r3, [r0]
6258: e3e00000 mvn r0, #0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
625c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
6260: e3a03001 mov r3, #1
6264: e1a00013 lsl r0, r3, r0
6268: e3100017 tst r0, #23
626c: 11a00003 movne r0, r3
6270: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
6274: eb002975 bl 10850 <__errno> <== NOT EXECUTED
6278: e3a03016 mov r3, #22 <== NOT EXECUTED
627c: e5803000 str r3, [r0] <== NOT EXECUTED
6280: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
6284: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00008810 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
8810: e92d4010 push {r4, lr}
8814: e24dd004 sub sp, sp, #4
8818: e1a04000 mov r4, r0
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
881c: e1a00001 mov r0, r1
8820: e1a0100d mov r1, sp
8824: eb00197e bl ee24 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
8828: e3500003 cmp r0, #3
882c: 0a000005 beq 8848 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
8830: e1a00004 mov r0, r4 <== NOT EXECUTED
8834: e3a01000 mov r1, #0 <== NOT EXECUTED
8838: e59d2000 ldr r2, [sp] <== NOT EXECUTED
883c: eb001c42 bl f94c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
8840: e28dd004 add sp, sp, #4
8844: e8bd8010 pop {r4, pc}
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
8848: e1a00004 mov r0, r4
884c: e3a01001 mov r1, #1
8850: e59d2000 ldr r2, [sp]
8854: eb001c3c bl f94c <_POSIX_Semaphore_Wait_support>
8858: eafffff8 b 8840 <sem_timedwait+0x30>
00029490 <setgid>:
int setgid(
gid_t gid
)
{
_POSIX_types_Gid = gid;
29490: e59f300c ldr r3, [pc, #12] ; 294a4 <setgid+0x14> <== NOT EXECUTED
29494: e5933000 ldr r3, [r3] <== NOT EXECUTED
29498: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
return 0;
}
2949c: e3a00000 mov r0, #0 <== NOT EXECUTED
294a0: e12fff1e bx lr <== NOT EXECUTED
00029ab0 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
29ab0: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group();
if (group_fp != NULL)
29ab4: e59f4020 ldr r4, [pc, #32] ; 29adc <setgrent+0x2c> <== NOT EXECUTED
return &grent;
}
void setgrent(void)
{
init_etc_passwd_group();
29ab8: ebffffc4 bl 299d0 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
29abc: e5940000 ldr r0, [r4] <== NOT EXECUTED
29ac0: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
29ac4: 1b006b2a blne 44774 <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
29ac8: e59f0010 ldr r0, [pc, #16] ; 29ae0 <setgrent+0x30> <== NOT EXECUTED
29acc: e59f1010 ldr r1, [pc, #16] ; 29ae4 <setgrent+0x34> <== NOT EXECUTED
29ad0: eb006d4a bl 45000 <fopen> <== NOT EXECUTED
29ad4: e5840000 str r0, [r4] <== NOT EXECUTED
}
29ad8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00029ca8 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
29ca8: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group();
if (passwd_fp != NULL)
29cac: e59f4020 ldr r4, [pc, #32] ; 29cd4 <setpwent+0x2c> <== NOT EXECUTED
return &pwent;
}
void setpwent(void)
{
init_etc_passwd_group();
29cb0: ebffff46 bl 299d0 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
29cb4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
29cb8: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
29cbc: 1b006aac blne 44774 <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
29cc0: e59f0010 ldr r0, [pc, #16] ; 29cd8 <setpwent+0x30> <== NOT EXECUTED
29cc4: e59f1010 ldr r1, [pc, #16] ; 29cdc <setpwent+0x34> <== NOT EXECUTED
29cc8: eb006ccc bl 45000 <fopen> <== NOT EXECUTED
29ccc: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
29cd0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00007ea0 <setuid>:
int setuid(
uid_t uid
)
{
_POSIX_types_Uid = uid;
7ea0: e59f300c ldr r3, [pc, #12] ; 7eb4 <setuid+0x14> <== NOT EXECUTED
7ea4: e5933000 ldr r3, [r3] <== NOT EXECUTED
7ea8: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
return 0;
}
7eac: e3a00000 mov r0, #0 <== NOT EXECUTED
7eb0: e12fff1e bx lr <== NOT EXECUTED
00003cf8 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3cf8: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED
3cfc: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED
3d00: e3c33003 bic r3, r3, #3 <== NOT EXECUTED
3d04: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED
3d08: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED
3d0c: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
3d10: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3d14: e1a04001 mov r4, r1 <== NOT EXECUTED
3d18: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3d1c: 1a000002 bne 3d2c <siproc+0x34> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
3d20: e1a00005 mov r0, r5 <== NOT EXECUTED
}
return i;
}
3d24: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
3d28: eaffff80 b 3b30 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3d2c: e3a01000 mov r1, #0 <== NOT EXECUTED
3d30: e1a02001 mov r2, r1 <== NOT EXECUTED
3d34: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
3d38: eb00069b bl 57ac <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
3d3c: e1a01004 mov r1, r4 <== NOT EXECUTED
3d40: e1a00005 mov r0, r5 <== NOT EXECUTED
3d44: ebffff79 bl 3b30 <iproc> <== NOT EXECUTED
3d48: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
3d4c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
3d50: eb0006dd bl 58cc <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
3d54: e1a00005 mov r0, r5 <== NOT EXECUTED
3d58: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00009638 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
9638: e92d4070 push {r4, r5, r6, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
963c: e2515000 subs r5, r1, #0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
9640: e24dd018 sub sp, sp, #24
9644: e1a06000 mov r6, r0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
9648: 0a00002f beq 970c <stat+0xd4>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
964c: eb010709 bl 4b278 <strlen>
9650: e28d4004 add r4, sp, #4
9654: e1a01000 mov r1, r0
9658: e3a0c001 mov ip, #1
965c: e1a00006 mov r0, r6
9660: e3a02000 mov r2, #0
9664: e1a03004 mov r3, r4
9668: e58dc000 str ip, [sp]
966c: ebfff99d bl 7ce8 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
9670: e2501000 subs r1, r0, #0
9674: 1a000022 bne 9704 <stat+0xcc>
return -1;
if ( !loc.handlers->fstat_h ){
9678: e59d300c ldr r3, [sp, #12]
967c: e5933018 ldr r3, [r3, #24]
9680: e3530000 cmp r3, #0
9684: 0a000013 beq 96d8 <stat+0xa0>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
9688: e3a02048 mov r2, #72 ; 0x48
968c: e1a00005 mov r0, r5
9690: eb00f921 bl 47b1c <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
9694: e1a01005 mov r1, r5
9698: e59d300c ldr r3, [sp, #12]
969c: e1a00004 mov r0, r4
96a0: e1a0e00f mov lr, pc
96a4: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
96a8: e59d3010 ldr r3, [sp, #16]
96ac: e3530000 cmp r3, #0
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
96b0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
96b4: 0a000004 beq 96cc <stat+0x94>
96b8: e593301c ldr r3, [r3, #28]
96bc: e3530000 cmp r3, #0
96c0: 11a00004 movne r0, r4
96c4: 11a0e00f movne lr, pc
96c8: 112fff13 bxne r3
return status;
}
96cc: e1a00005 mov r0, r5
96d0: e28dd018 add sp, sp, #24
96d4: e8bd8070 pop {r4, r5, r6, pc}
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
96d8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
96dc: e3530000 cmp r3, #0 <== NOT EXECUTED
96e0: 0a000004 beq 96f8 <stat+0xc0> <== NOT EXECUTED
96e4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
96e8: e3530000 cmp r3, #0 <== NOT EXECUTED
96ec: 11a00004 movne r0, r4 <== NOT EXECUTED
96f0: 11a0e00f movne lr, pc <== NOT EXECUTED
96f4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
96f8: eb00ebd0 bl 44640 <__errno> <== NOT EXECUTED
96fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
9700: e5803000 str r3, [r0] <== NOT EXECUTED
9704: e3e05000 mvn r5, #0
9708: eaffffef b 96cc <stat+0x94>
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
970c: eb00ebcb bl 44640 <__errno>
9710: e3a0300e mov r3, #14
9714: e5803000 str r3, [r0]
9718: e3e05000 mvn r5, #0
971c: eaffffea b 96cc <stat+0x94>
0002aca8 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
2aca8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2acac: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
2acb0: e1a04001 mov r4, r1 <== NOT EXECUTED
2acb4: e1a06000 mov r6, r0 <== NOT EXECUTED
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
2acb8: eb00816e bl 4b278 <strlen> <== NOT EXECUTED
2acbc: e28d5004 add r5, sp, #4 <== NOT EXECUTED
2acc0: e1a01000 mov r1, r0 <== NOT EXECUTED
2acc4: e3a0c001 mov ip, #1 <== NOT EXECUTED
2acc8: e1a00006 mov r0, r6 <== NOT EXECUTED
2accc: e3a02000 mov r2, #0 <== NOT EXECUTED
2acd0: e1a03005 mov r3, r5 <== NOT EXECUTED
2acd4: e58dc000 str ip, [sp] <== NOT EXECUTED
2acd8: ebff7402 bl 7ce8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
2acdc: e3500000 cmp r0, #0 <== NOT EXECUTED
2ace0: 1a000028 bne 2ad88 <statvfs+0xe0> <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
2ace4: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
2ace8: e5932028 ldr r2, [r3, #40] ; 0x28 <== NOT EXECUTED
2acec: e5922044 ldr r2, [r2, #68] ; 0x44 <== NOT EXECUTED
2acf0: e3520000 cmp r2, #0 <== NOT EXECUTED
2acf4: 0a000020 beq 2ad7c <statvfs+0xd4> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
memset (sb, 0, sizeof (struct statvfs));
2acf8: e1a02004 mov r2, r4 <== NOT EXECUTED
2acfc: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad00: e2822004 add r2, r2, #4 <== NOT EXECUTED
2ad04: e5840004 str r0, [r4, #4] <== NOT EXECUTED
2ad08: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad0c: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad10: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad14: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad18: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad1c: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad20: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad24: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad28: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad2c: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad30: e4820004 str r0, [r2], #4 <== NOT EXECUTED
2ad34: e5820000 str r0, [r2] <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
2ad38: e1a01004 mov r1, r4 <== NOT EXECUTED
2ad3c: e283001c add r0, r3, #28 <== NOT EXECUTED
2ad40: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED
2ad44: e1a0e00f mov lr, pc <== NOT EXECUTED
2ad48: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2ad4c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2ad50: e3530000 cmp r3, #0 <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
2ad54: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2ad58: 0a000004 beq 2ad70 <statvfs+0xc8> <== NOT EXECUTED
2ad5c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2ad60: e3530000 cmp r3, #0 <== NOT EXECUTED
2ad64: 11a00005 movne r0, r5 <== NOT EXECUTED
2ad68: 11a0e00f movne lr, pc <== NOT EXECUTED
2ad6c: 112fff13 bxne r3 <== NOT EXECUTED
return result;
}
2ad70: e1a00004 mov r0, r4 <== NOT EXECUTED
2ad74: e28dd018 add sp, sp, #24 <== NOT EXECUTED
2ad78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2ad7c: eb00662f bl 44640 <__errno> <== NOT EXECUTED
2ad80: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2ad84: e5803000 str r3, [r0] <== NOT EXECUTED
2ad88: e3e04000 mvn r4, #0 <== NOT EXECUTED
2ad8c: eafffff7 b 2ad70 <statvfs+0xc8> <== NOT EXECUTED
0002addc <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
2addc: e92d4070 push {r4, r5, r6, lr}
2ade0: e1a05001 mov r5, r1
2ade4: e24dd01c sub sp, sp, #28
2ade8: e1a06000 mov r6, r0
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
2adec: e28d1018 add r1, sp, #24
2adf0: e1a00005 mov r0, r5
2adf4: e1a0200d mov r2, sp
2adf8: ebff7a4b bl 972c <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
2adfc: e59d300c ldr r3, [sp, #12]
2ae00: e5933004 ldr r3, [r3, #4]
2ae04: e3530000 cmp r3, #0
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
2ae08: e1a0400d mov r4, sp
if ( !loc.ops->evalformake_h ) {
2ae0c: 0a000021 beq 2ae98 <symlink+0xbc>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
2ae10: e59d0018 ldr r0, [sp, #24]
2ae14: e1a0100d mov r1, sp
2ae18: e0850000 add r0, r5, r0
2ae1c: e28d2014 add r2, sp, #20
2ae20: e1a0e00f mov lr, pc
2ae24: e12fff13 bx r3
if ( result != 0 )
2ae28: e3500000 cmp r0, #0
2ae2c: 1a00001c bne 2aea4 <symlink+0xc8>
return -1;
if ( !loc.ops->symlink_h ) {
2ae30: e59d200c ldr r2, [sp, #12]
2ae34: e5923038 ldr r3, [r2, #56] ; 0x38
2ae38: e3530000 cmp r3, #0
2ae3c: 0a000010 beq 2ae84 <symlink+0xa8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
2ae40: e1a01006 mov r1, r6
2ae44: e1a0000d mov r0, sp
2ae48: e59d2014 ldr r2, [sp, #20]
2ae4c: e1a0e00f mov lr, pc
2ae50: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
2ae54: e59d300c ldr r3, [sp, #12]
2ae58: e3530000 cmp r3, #0
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
2ae5c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
2ae60: 0a000004 beq 2ae78 <symlink+0x9c>
2ae64: e593301c ldr r3, [r3, #28]
2ae68: e3530000 cmp r3, #0
2ae6c: 11a0000d movne r0, sp
2ae70: 11a0e00f movne lr, pc
2ae74: 112fff13 bxne r3
return result;
}
2ae78: e1a00005 mov r0, r5
2ae7c: e28dd01c add sp, sp, #28
2ae80: e8bd8070 pop {r4, r5, r6, pc}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
2ae84: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2ae88: e3530000 cmp r3, #0 <== NOT EXECUTED
2ae8c: 11a0000d movne r0, sp <== NOT EXECUTED
2ae90: 11a0e00f movne lr, pc <== NOT EXECUTED
2ae94: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2ae98: eb0065e8 bl 44640 <__errno> <== NOT EXECUTED
2ae9c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2aea0: e5803000 str r3, [r0] <== NOT EXECUTED
2aea4: e3e05000 mvn r5, #0
2aea8: eafffff2 b 2ae78 <symlink+0x9c>
00013668 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
13668: e3510000 cmp r1, #0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
1366c: e92d4030 push {r4, r5, lr}
13670: e1a04002 mov r4, r2
13674: e1a05000 mov r5, r0
switch (opt) {
13678: 0a00000b beq 136ac <tcsetattr+0x44>
1367c: e3510001 cmp r1, #1 <== NOT EXECUTED
13680: 0a000004 beq 13698 <tcsetattr+0x30> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
13684: eb00167a bl 19074 <__errno> <== NOT EXECUTED
13688: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1368c: e5803000 str r3, [r0] <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
13690: e3e00000 mvn r0, #0 <== NOT EXECUTED
13694: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
13698: e3a01003 mov r1, #3 <== NOT EXECUTED
1369c: e3a02000 mov r2, #0 <== NOT EXECUTED
136a0: eb001196 bl 17d00 <ioctl> <== NOT EXECUTED
136a4: e3500000 cmp r0, #0 <== NOT EXECUTED
136a8: bafffff8 blt 13690 <tcsetattr+0x28> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
136ac: e1a00005 mov r0, r5
136b0: e1a02004 mov r2, r4
136b4: e3a01002 mov r1, #2
}
}
136b8: e8bd4030 pop {r4, r5, lr}
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
136bc: ea00118f b 17d00 <ioctl>
0000e580 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
e580: e92d40f0 push {r4, r5, r6, r7, lr}
e584: e24dd030 sub sp, sp, #48 ; 0x30
e588: e1a07000 mov r7, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
e58c: ebffce56 bl 1eec <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
e590: e2505000 subs r5, r0, #0
e594: 1a000045 bne e6b0 <unlink+0x130>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
e598: e28d4018 add r4, sp, #24
e59c: e1a00007 mov r0, r7
e5a0: e28d102c add r1, sp, #44 ; 0x2c
e5a4: e1a02004 mov r2, r4
e5a8: ebffd280 bl 2fb0 <rtems_filesystem_get_start_loc>
e5ac: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
e5b0: e1a0e004 mov lr, r4
e5b4: e8be000f ldm lr!, {r0, r1, r2, r3}
e5b8: e28dc004 add ip, sp, #4
e5bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
e5c0: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
e5c4: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
e5c8: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
e5cc: e1a00005 mov r0, r5
e5d0: eb000854 bl 10728 <strlen>
e5d4: e1a01000 mov r1, r0
e5d8: e1a00005 mov r0, r5
e5dc: ebffce2d bl 1e98 <rtems_filesystem_prefix_separators>
e5e0: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
e5e4: e1a00007 mov r0, r7
e5e8: eb00084e bl 10728 <strlen>
e5ec: e28d5004 add r5, sp, #4
e5f0: e3a0c000 mov ip, #0
e5f4: e1a01000 mov r1, r0
e5f8: e1a0200c mov r2, ip
e5fc: e1a00007 mov r0, r7
e600: e1a03005 mov r3, r5
e604: e58dc000 str ip, [sp]
e608: ebffce48 bl 1f30 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
e60c: e3500000 cmp r0, #0
e610: 1a000033 bne e6e4 <unlink+0x164>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
e614: e59d2010 ldr r2, [sp, #16]
e618: e5923010 ldr r3, [r2, #16]
e61c: e3530000 cmp r3, #0
e620: 0a00003c beq e718 <unlink+0x198>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
e624: e1a00005 mov r0, r5
e628: e1a0e00f mov lr, pc
e62c: e12fff13 bx r3
e630: e3500001 cmp r0, #1
e634: 0a00004b beq e768 <unlink+0x1e8>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
e638: e59d2010 ldr r2, [sp, #16]
e63c: e592300c ldr r3, [r2, #12]
e640: e3530000 cmp r3, #0
e644: 0a000033 beq e718 <unlink+0x198>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
e648: e1a00004 mov r0, r4
e64c: e1a01005 mov r1, r5
e650: e1a0e00f mov lr, pc
e654: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
e658: e59d3010 ldr r3, [sp, #16]
e65c: e3530000 cmp r3, #0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
e660: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
e664: 0a000004 beq e67c <unlink+0xfc>
e668: e593301c ldr r3, [r3, #28]
e66c: e3530000 cmp r3, #0
e670: 11a00005 movne r0, r5
e674: 11a0e00f movne lr, pc
e678: 112fff13 bxne r3
if ( free_parentloc )
e67c: e3560000 cmp r6, #0
e680: 0a000007 beq e6a4 <unlink+0x124>
rtems_filesystem_freenode( &parentloc );
e684: e59d3024 ldr r3, [sp, #36] ; 0x24
e688: e3530000 cmp r3, #0
e68c: 0a000004 beq e6a4 <unlink+0x124>
e690: e593301c ldr r3, [r3, #28]
e694: e3530000 cmp r3, #0
e698: 11a00004 movne r0, r4
e69c: 11a0e00f movne lr, pc
e6a0: 112fff13 bxne r3
return result;
}
e6a4: e1a00007 mov r0, r7
e6a8: e28dd030 add sp, sp, #48 ; 0x30
e6ac: e8bd80f0 pop {r4, r5, r6, r7, pc}
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
e6b0: e28d4018 add r4, sp, #24
e6b4: e3a0c000 mov ip, #0
e6b8: e1a00007 mov r0, r7
e6bc: e1a01005 mov r1, r5
e6c0: e3a02002 mov r2, #2
e6c4: e1a03004 mov r3, r4
e6c8: e58dc000 str ip, [sp]
e6cc: ebffce53 bl 2020 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
e6d0: e3500000 cmp r0, #0
e6d4: 03a06001 moveq r6, #1
e6d8: 0affffb4 beq e5b0 <unlink+0x30>
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
e6dc: e3e07000 mvn r7, #0 <== NOT EXECUTED
e6e0: eaffffef b e6a4 <unlink+0x124> <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
e6e4: e3560000 cmp r6, #0
e6e8: 0afffffb beq e6dc <unlink+0x15c>
rtems_filesystem_freenode( &parentloc );
e6ec: e59d3024 ldr r3, [sp, #36] ; 0x24
e6f0: e3530000 cmp r3, #0
e6f4: 0afffff8 beq e6dc <unlink+0x15c>
e6f8: e593301c ldr r3, [r3, #28]
e6fc: e3530000 cmp r3, #0
e700: 0afffff5 beq e6dc <unlink+0x15c>
e704: e1a00004 mov r0, r4
e708: e1a0e00f mov lr, pc
e70c: e12fff13 bx r3
e710: e3e07000 mvn r7, #0
e714: eaffffe2 b e6a4 <unlink+0x124>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
e718: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
e71c: e3530000 cmp r3, #0 <== NOT EXECUTED
e720: 11a00005 movne r0, r5 <== NOT EXECUTED
e724: 11a0e00f movne lr, pc <== NOT EXECUTED
e728: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
e72c: e3560000 cmp r6, #0 <== NOT EXECUTED
e730: 0a000007 beq e754 <unlink+0x1d4> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
e734: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
e738: e3530000 cmp r3, #0 <== NOT EXECUTED
e73c: 0a000004 beq e754 <unlink+0x1d4> <== NOT EXECUTED
e740: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
e744: e3530000 cmp r3, #0 <== NOT EXECUTED
e748: 11a00004 movne r0, r4 <== NOT EXECUTED
e74c: 11a0e00f movne lr, pc <== NOT EXECUTED
e750: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
e754: eb0003ee bl f714 <__errno> <== NOT EXECUTED
e758: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
e75c: e5803000 str r3, [r0] <== NOT EXECUTED
e760: e3e07000 mvn r7, #0 <== NOT EXECUTED
e764: eaffffce b e6a4 <unlink+0x124> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
e768: e59d3010 ldr r3, [sp, #16]
e76c: e3530000 cmp r3, #0
e770: 0a000004 beq e788 <unlink+0x208>
e774: e593301c ldr r3, [r3, #28]
e778: e3530000 cmp r3, #0
e77c: 11a00005 movne r0, r5
e780: 11a0e00f movne lr, pc
e784: 112fff13 bxne r3
if ( free_parentloc )
e788: e3560000 cmp r6, #0
e78c: 0a000007 beq e7b0 <unlink+0x230>
rtems_filesystem_freenode( &parentloc );
e790: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
e794: e3530000 cmp r3, #0 <== NOT EXECUTED
e798: 0a000004 beq e7b0 <unlink+0x230> <== NOT EXECUTED
e79c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
e7a0: e3530000 cmp r3, #0 <== NOT EXECUTED
e7a4: 11a00004 movne r0, r4 <== NOT EXECUTED
e7a8: 11a0e00f movne lr, pc <== NOT EXECUTED
e7ac: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
e7b0: eb0003d7 bl f714 <__errno>
e7b4: e3a03015 mov r3, #21
e7b8: e5803000 str r3, [r0]
e7bc: e3e07000 mvn r7, #0
e7c0: eaffffb7 b e6a4 <unlink+0x124>
0002af30 <unmount>:
*/
int unmount(
const char *path
)
{
2af30: e92d4030 push {r4, r5, lr}
2af34: e24dd018 sub sp, sp, #24
2af38: e1a05000 mov r5, r0
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
2af3c: eb0080cd bl 4b278 <strlen>
2af40: e28d4004 add r4, sp, #4
2af44: e1a01000 mov r1, r0
2af48: e3a0c001 mov ip, #1
2af4c: e1a00005 mov r0, r5
2af50: e3a02000 mov r2, #0
2af54: e1a03004 mov r3, r4
2af58: e58dc000 str ip, [sp]
2af5c: ebff7361 bl 7ce8 <rtems_filesystem_evaluate_path>
2af60: e3500000 cmp r0, #0
2af64: 1a000028 bne 2b00c <unmount+0xdc>
return -1;
mt_entry = loc.mt_entry;
2af68: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
2af6c: e59d3004 ldr r3, [sp, #4]
2af70: e595201c ldr r2, [r5, #28]
2af74: e1520003 cmp r2, r3
2af78: 1a000040 bne 2b080 <unmount+0x150>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
2af7c: e59d3010 ldr r3, [sp, #16]
2af80: e3530000 cmp r3, #0
2af84: 0a000004 beq 2af9c <unmount+0x6c>
2af88: e593301c ldr r3, [r3, #28]
2af8c: e3530000 cmp r3, #0
2af90: 11a00004 movne r0, r4
2af94: 11a0e00f movne lr, pc
2af98: 112fff13 bxne r3
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
2af9c: e5953014 ldr r3, [r5, #20]
2afa0: e5933028 ldr r3, [r3, #40] ; 0x28
2afa4: e3530000 cmp r3, #0
2afa8: 0a00004e beq 2b0e8 <unmount+0x1b8>
fs_root_loc = &mt_entry->mt_fs_root;
2afac: e5953028 ldr r3, [r5, #40] ; 0x28
2afb0: e593302c ldr r3, [r3, #44] ; 0x2c
2afb4: e3530000 cmp r3, #0
2afb8: 0a00004a beq 2b0e8 <unmount+0x1b8>
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
2afbc: e59f3138 ldr r3, [pc, #312] ; 2b0fc <unmount+0x1cc>
2afc0: e5933000 ldr r3, [r3]
2afc4: e5933014 ldr r3, [r3, #20]
2afc8: e1530005 cmp r3, r5
2afcc: 0a000038 beq 2b0b4 <unmount+0x184>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
2afd0: e59f0128 ldr r0, [pc, #296] ; 2b100 <unmount+0x1d0>
2afd4: e595102c ldr r1, [r5, #44] ; 0x2c
2afd8: ebff75fb bl 87cc <rtems_filesystem_mount_iterate>
2afdc: e3500000 cmp r0, #0
2afe0: 1a000033 bne 2b0b4 <unmount+0x184>
* Run the file descriptor table to determine if there are any file
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
2afe4: e1a00005 mov r0, r5
2afe8: ebff7447 bl 810c <rtems_libio_is_open_files_in_fs>
2afec: e3500001 cmp r0, #1
2aff0: 0a00002f beq 2b0b4 <unmount+0x184>
* Allow the file system being unmounted on to do its cleanup.
* If it fails it will set the errno to the approprate value
* and the fileystem will not be modified.
*/
if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 )
2aff4: e5953014 ldr r3, [r5, #20]
2aff8: e1a00005 mov r0, r5
2affc: e1a0e00f mov lr, pc
2b000: e593f028 ldr pc, [r3, #40] ; 0x28
2b004: e2504000 subs r4, r0, #0
2b008: 0a000002 beq 2b018 <unmount+0xe8>
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
2b00c: e3e00000 mvn r0, #0
}
2b010: e28dd018 add sp, sp, #24
2b014: e8bd8030 pop {r4, r5, pc}
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
2b018: e5953028 ldr r3, [r5, #40] ; 0x28
2b01c: e1a00005 mov r0, r5
2b020: e1a0e00f mov lr, pc
2b024: e593f02c ldr pc, [r3, #44] ; 0x2c
2b028: e2501000 subs r1, r0, #0
2b02c: 1a000025 bne 2b0c8 <unmount+0x198>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2b030: e59f40cc ldr r4, [pc, #204] ; 2b104 <unmount+0x1d4>
2b034: e1a02001 mov r2, r1
2b038: e5940000 ldr r0, [r4]
2b03c: ebff8520 bl c4c4 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2b040: e1a00005 mov r0, r5
2b044: ebff882c bl d0fc <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2b048: e5940000 ldr r0, [r4]
2b04c: ebff8564 bl c5e4 <rtems_semaphore_release>
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
2b050: e5953014 ldr r3, [r5, #20]
2b054: e3530000 cmp r3, #0
2b058: 0a000004 beq 2b070 <unmount+0x140>
2b05c: e593301c ldr r3, [r3, #28]
2b060: e3530000 cmp r3, #0
2b064: 12850008 addne r0, r5, #8
2b068: 11a0e00f movne lr, pc
2b06c: 112fff13 bxne r3
free( mt_entry );
2b070: e1a00005 mov r0, r5
2b074: ebff733d bl 7d70 <free>
2b078: e3a00000 mov r0, #0
return 0;
2b07c: eaffffe3 b 2b010 <unmount+0xe0>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
2b080: e59d3010 ldr r3, [sp, #16]
2b084: e3530000 cmp r3, #0
2b088: 0a000004 beq 2b0a0 <unmount+0x170>
2b08c: e593301c ldr r3, [r3, #28]
2b090: e3530000 cmp r3, #0
2b094: 11a00004 movne r0, r4
2b098: 11a0e00f movne lr, pc
2b09c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
2b0a0: eb006566 bl 44640 <__errno>
2b0a4: e3a0300d mov r3, #13
2b0a8: e5803000 str r3, [r0]
2b0ac: e3e00000 mvn r0, #0
2b0b0: eaffffd6 b 2b010 <unmount+0xe0>
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
2b0b4: eb006561 bl 44640 <__errno>
2b0b8: e3a03010 mov r3, #16
2b0bc: e5803000 str r3, [r0]
2b0c0: e3e00000 mvn r0, #0
2b0c4: eaffffd1 b 2b010 <unmount+0xe0>
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
2b0c8: e1a00005 mov r0, r5 <== NOT EXECUTED
2b0cc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
2b0d0: e1a0e00f mov lr, pc <== NOT EXECUTED
2b0d4: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
2b0d8: e3500000 cmp r0, #0 <== NOT EXECUTED
2b0dc: 0affffca beq 2b00c <unmount+0xdc> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
2b0e0: e1a00004 mov r0, r4 <== NOT EXECUTED
2b0e4: ebff86d8 bl cc4c <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2b0e8: eb006554 bl 44640 <__errno> <== NOT EXECUTED
2b0ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2b0f0: e5803000 str r3, [r0] <== NOT EXECUTED
2b0f4: e3e00000 mvn r0, #0 <== NOT EXECUTED
2b0f8: eaffffc4 b 2b010 <unmount+0xe0> <== NOT EXECUTED
0002b108 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
2b108: e92d4070 push {r4, r5, r6, lr}
2b10c: e24dd018 sub sp, sp, #24
2b110: e1a05001 mov r5, r1
2b114: e1a06000 mov r6, r0
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
2b118: eb008056 bl 4b278 <strlen>
2b11c: e28d4004 add r4, sp, #4
2b120: e1a01000 mov r1, r0
2b124: e3a0c001 mov ip, #1
2b128: e1a00006 mov r0, r6
2b12c: e3a02000 mov r2, #0
2b130: e1a03004 mov r3, r4
2b134: e58dc000 str ip, [sp]
2b138: ebff72ea bl 7ce8 <rtems_filesystem_evaluate_path>
2b13c: e3500000 cmp r0, #0
2b140: 1a00001b bne 2b1b4 <utime+0xac>
return -1;
if ( !temp_loc.ops->utime_h ){
2b144: e59d2010 ldr r2, [sp, #16]
2b148: e5923030 ldr r3, [r2, #48] ; 0x30
2b14c: e3530000 cmp r3, #0
2b150: 0a00000f beq 2b194 <utime+0x8c>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
2b154: e8950006 ldm r5, {r1, r2}
2b158: e1a00004 mov r0, r4
2b15c: e1a0e00f mov lr, pc
2b160: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
2b164: e59d3010 ldr r3, [sp, #16]
2b168: e3530000 cmp r3, #0
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
2b16c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
2b170: 0a000004 beq 2b188 <utime+0x80>
2b174: e593301c ldr r3, [r3, #28]
2b178: e3530000 cmp r3, #0
2b17c: 11a00004 movne r0, r4
2b180: 11a0e00f movne lr, pc
2b184: 112fff13 bxne r3
return result;
}
2b188: e1a00005 mov r0, r5
2b18c: e28dd018 add sp, sp, #24
2b190: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
2b194: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2b198: e3530000 cmp r3, #0 <== NOT EXECUTED
2b19c: 11a00004 movne r0, r4 <== NOT EXECUTED
2b1a0: 11a0e00f movne lr, pc <== NOT EXECUTED
2b1a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2b1a8: eb006524 bl 44640 <__errno> <== NOT EXECUTED
2b1ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2b1b0: e5803000 str r3, [r0] <== NOT EXECUTED
2b1b4: e3e05000 mvn r5, #0
2b1b8: eafffff2 b 2b188 <utime+0x80>
0001b444 <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1b444: e59f30bc ldr r3, [pc, #188] ; 1b508 <write+0xc4>
1b448: e5933000 ldr r3, [r3]
1b44c: e1500003 cmp r0, r3
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
1b450: e92d4810 push {r4, fp, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1b454: 2a00001c bcs 1b4cc <write+0x88>
iop = rtems_libio_iop( fd );
1b458: e59f40ac ldr r4, [pc, #172] ; 1b50c <write+0xc8>
1b45c: e5944000 ldr r4, [r4]
1b460: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1b464: e5940014 ldr r0, [r4, #20]
1b468: e3100c01 tst r0, #256 ; 0x100
1b46c: 0a000016 beq 1b4cc <write+0x88>
rtems_libio_check_buffer( buffer );
1b470: e3510000 cmp r1, #0
1b474: 0a00001e beq 1b4f4 <write+0xb0>
rtems_libio_check_count( count );
1b478: e3520000 cmp r2, #0
1b47c: 01a00002 moveq r0, r2
1b480: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
1b484: e3100004 tst r0, #4
1b488: 0a00000f beq 1b4cc <write+0x88>
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
1b48c: e594303c ldr r3, [r4, #60] ; 0x3c
1b490: e593300c ldr r3, [r3, #12]
1b494: e3530000 cmp r3, #0
1b498: 0a000010 beq 1b4e0 <write+0x9c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
1b49c: e1a00004 mov r0, r4
1b4a0: e1a0e00f mov lr, pc
1b4a4: e12fff13 bx r3
if ( rc > 0 )
1b4a8: e3500000 cmp r0, #0
1b4ac: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
1b4b0: e284c00c add ip, r4, #12
1b4b4: e89c1800 ldm ip, {fp, ip}
1b4b8: e09b2000 adds r2, fp, r0
1b4bc: e0ac3fc0 adc r3, ip, r0, asr #31
1b4c0: e584200c str r2, [r4, #12]
1b4c4: e5843010 str r3, [r4, #16]
return rc;
}
1b4c8: e8bd8810 pop {r4, fp, pc}
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
1b4cc: ebffd090 bl f714 <__errno> <== NOT EXECUTED
1b4d0: e3a03009 mov r3, #9 <== NOT EXECUTED
1b4d4: e5803000 str r3, [r0] <== NOT EXECUTED
1b4d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b4dc: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1b4e0: ebffd08b bl f714 <__errno> <== NOT EXECUTED
1b4e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1b4e8: e5803000 str r3, [r0] <== NOT EXECUTED
1b4ec: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b4f0: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
1b4f4: ebffd086 bl f714 <__errno> <== NOT EXECUTED
1b4f8: e3a03016 mov r3, #22 <== NOT EXECUTED
1b4fc: e5803000 str r3, [r0] <== NOT EXECUTED
1b500: e3e00000 mvn r0, #0 <== NOT EXECUTED
1b504: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
00006204 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
6204: e59f3174 ldr r3, [pc, #372] ; 6380 <writev+0x17c>
6208: e5933000 ldr r3, [r3]
620c: e1500003 cmp r0, r3
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
6210: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
6214: e1a05002 mov r5, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
6218: 2a00004c bcs 6350 <writev+0x14c>
iop = rtems_libio_iop( fd );
621c: e59f3160 ldr r3, [pc, #352] ; 6384 <writev+0x180>
6220: e5937000 ldr r7, [r3]
6224: e0877300 add r7, r7, r0, lsl #6
rtems_libio_check_is_open( iop );
6228: e5973014 ldr r3, [r7, #20]
622c: e3130c01 tst r3, #256 ; 0x100
6230: 0a000046 beq 6350 <writev+0x14c>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
6234: e3130004 tst r3, #4
6238: 0a000044 beq 6350 <writev+0x14c>
/*
* Argument validation on IO vector
*/
if ( !iov )
623c: e3510000 cmp r1, #0
6240: 0a00003c beq 6338 <writev+0x134>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
6244: e3520000 cmp r2, #0
6248: da00003a ble 6338 <writev+0x134>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
624c: e3520b01 cmp r2, #1024 ; 0x400
6250: ca000038 bgt 6338 <writev+0x134>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
6254: e597303c ldr r3, [r7, #60] ; 0x3c
6258: e593300c ldr r3, [r3, #12]
625c: e3530000 cmp r3, #0
6260: 0a000041 beq 636c <writev+0x168>
rtems_set_errno_and_return_minus_one( ENOTSUP );
6264: e1a04001 mov r4, r1
6268: e3a01000 mov r1, #0
626c: e1a02004 mov r2, r4
6270: e1a08001 mov r8, r1
6274: e3a06001 mov r6, #1
6278: ea000000 b 6280 <writev+0x7c>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
627c: e1a08003 mov r8, r3
if ( !iov[v].iov_base )
6280: e5923000 ldr r3, [r2]
6284: e3530000 cmp r3, #0
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
6288: e2811001 add r1, r1, #1
if ( !iov[v].iov_base )
628c: 0a000029 beq 6338 <writev+0x134>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
6290: e5920004 ldr r0, [r2, #4]
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
6294: e0883000 add r3, r8, r0
if ( total < old || total > SSIZE_MAX )
6298: e1580003 cmp r8, r3
629c: d3a08000 movle r8, #0
62a0: c3a08001 movgt r8, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
62a4: e3500000 cmp r0, #0
62a8: 13a06000 movne r6, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
62ac: e1988fa3 orrs r8, r8, r3, lsr #31
62b0: 1a000020 bne 6338 <writev+0x134>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
62b4: e1550001 cmp r5, r1
62b8: e2822008 add r2, r2, #8
62bc: caffffee bgt 627c <writev+0x78>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
62c0: e3560000 cmp r6, #0
62c4: 1a00001f bne 6348 <writev+0x144>
62c8: e1a08006 mov r8, r6
62cc: ea000002 b 62dc <writev+0xd8>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
62d0: e1550006 cmp r5, r6
62d4: e2844008 add r4, r4, #8
62d8: da00001a ble 6348 <writev+0x144>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
62dc: e5942004 ldr r2, [r4, #4]
62e0: e3520000 cmp r2, #0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
62e4: e2866001 add r6, r6, #1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
62e8: 0afffff8 beq 62d0 <writev+0xcc>
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
62ec: e5941000 ldr r1, [r4]
62f0: e597303c ldr r3, [r7, #60] ; 0x3c
62f4: e1a00007 mov r0, r7
62f8: e1a0e00f mov lr, pc
62fc: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
6300: e3500000 cmp r0, #0
6304: ba000016 blt 6364 <writev+0x160>
return -1;
if ( bytes > 0 ) {
6308: 0a000006 beq 6328 <writev+0x124>
iop->offset += bytes;
630c: e287c00c add ip, r7, #12
6310: e89c1800 ldm ip, {fp, ip}
6314: e09b2000 adds r2, fp, r0
6318: e0ac3fc0 adc r3, ip, r0, asr #31
631c: e587200c str r2, [r7, #12]
6320: e5873010 str r3, [r7, #16]
total += bytes;
6324: e0888000 add r8, r8, r0
}
if (bytes != iov[ v ].iov_len)
6328: e5943004 ldr r3, [r4, #4]
632c: e1500003 cmp r0, r3
6330: 0affffe6 beq 62d0 <writev+0xcc>
6334: ea000003 b 6348 <writev+0x144> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
6338: eb002966 bl 108d8 <__errno>
633c: e3a03016 mov r3, #22
6340: e5803000 str r3, [r0]
6344: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
6348: e1a00008 mov r0, r8
634c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
6350: eb002960 bl 108d8 <__errno>
6354: e3a03009 mov r3, #9
6358: e5803000 str r3, [r0]
635c: e3e08000 mvn r8, #0
6360: eafffff8 b 6348 <writev+0x144>
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
6364: e3e08000 mvn r8, #0 <== NOT EXECUTED
6368: eafffff6 b 6348 <writev+0x144> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
636c: eb002959 bl 108d8 <__errno> <== NOT EXECUTED
6370: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
6374: e5803000 str r3, [r0] <== NOT EXECUTED
6378: e3e08000 mvn r8, #0 <== NOT EXECUTED
637c: eafffff1 b 6348 <writev+0x144> <== NOT EXECUTED